openapi.json 499 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "required": false,
  119. "schema": {
  120. "type": "string"
  121. }
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "required": false,
  127. "schema": {
  128. "type": "string"
  129. }
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "required": false,
  450. "schema": {
  451. "type": "string"
  452. }
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "required": false,
  458. "schema": {
  459. "type": "string"
  460. }
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "required": false,
  494. "schema": {
  495. "type": "string"
  496. }
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "required": false,
  502. "schema": {
  503. "type": "string"
  504. }
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "required": false,
  536. "schema": {
  537. "type": "string"
  538. }
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "required": false,
  544. "schema": {
  545. "type": "string"
  546. }
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "required": false,
  599. "schema": {
  600. "type": "string"
  601. }
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "required": false,
  607. "schema": {
  608. "type": "string"
  609. }
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "required": false,
  660. "schema": {
  661. "type": "string"
  662. }
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "required": false,
  668. "schema": {
  669. "type": "string"
  670. }
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. }
  684. },
  685. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  686. "summary": "Get active Console provider metadata",
  687. "x-codeSamples": [
  688. {
  689. "lang": "js",
  690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  691. }
  692. ]
  693. }
  694. },
  695. "/experimental/console/orgs": {
  696. "get": {
  697. "tags": ["experimental"],
  698. "operationId": "experimental.console.listOrgs",
  699. "parameters": [
  700. {
  701. "name": "directory",
  702. "in": "query",
  703. "required": false,
  704. "schema": {
  705. "type": "string"
  706. }
  707. },
  708. {
  709. "name": "workspace",
  710. "in": "query",
  711. "required": false,
  712. "schema": {
  713. "type": "string"
  714. }
  715. }
  716. ],
  717. "responses": {
  718. "200": {
  719. "description": "Switchable Console orgs",
  720. "content": {
  721. "application/json": {
  722. "schema": {
  723. "type": "object",
  724. "properties": {
  725. "orgs": {
  726. "type": "array",
  727. "items": {
  728. "type": "object",
  729. "properties": {
  730. "accountID": {
  731. "type": "string"
  732. },
  733. "accountEmail": {
  734. "type": "string"
  735. },
  736. "accountUrl": {
  737. "type": "string"
  738. },
  739. "orgID": {
  740. "type": "string"
  741. },
  742. "orgName": {
  743. "type": "string"
  744. },
  745. "active": {
  746. "type": "boolean"
  747. }
  748. },
  749. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  750. "additionalProperties": false
  751. }
  752. }
  753. },
  754. "required": ["orgs"],
  755. "additionalProperties": false,
  756. "description": "Switchable Console orgs"
  757. }
  758. }
  759. }
  760. }
  761. },
  762. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  763. "summary": "List switchable Console orgs",
  764. "x-codeSamples": [
  765. {
  766. "lang": "js",
  767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  768. }
  769. ]
  770. }
  771. },
  772. "/experimental/console/switch": {
  773. "post": {
  774. "tags": ["experimental"],
  775. "operationId": "experimental.console.switchOrg",
  776. "parameters": [
  777. {
  778. "name": "directory",
  779. "in": "query",
  780. "required": false,
  781. "schema": {
  782. "type": "string"
  783. }
  784. },
  785. {
  786. "name": "workspace",
  787. "in": "query",
  788. "required": false,
  789. "schema": {
  790. "type": "string"
  791. }
  792. }
  793. ],
  794. "responses": {
  795. "200": {
  796. "description": "Switch success",
  797. "content": {
  798. "application/json": {
  799. "schema": {
  800. "type": "boolean",
  801. "description": "Switch success"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  808. "summary": "Switch active Console org",
  809. "requestBody": {
  810. "content": {
  811. "application/json": {
  812. "schema": {
  813. "type": "object",
  814. "properties": {
  815. "accountID": {
  816. "type": "string"
  817. },
  818. "orgID": {
  819. "type": "string"
  820. }
  821. },
  822. "required": ["accountID", "orgID"],
  823. "additionalProperties": false
  824. }
  825. }
  826. }
  827. },
  828. "x-codeSamples": [
  829. {
  830. "lang": "js",
  831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  832. }
  833. ]
  834. }
  835. },
  836. "/experimental/tool": {
  837. "get": {
  838. "tags": ["experimental"],
  839. "operationId": "tool.list",
  840. "parameters": [
  841. {
  842. "name": "directory",
  843. "in": "query",
  844. "required": false,
  845. "schema": {
  846. "type": "string"
  847. }
  848. },
  849. {
  850. "name": "workspace",
  851. "in": "query",
  852. "required": false,
  853. "schema": {
  854. "type": "string"
  855. }
  856. },
  857. {
  858. "name": "provider",
  859. "in": "query",
  860. "schema": {
  861. "type": "string"
  862. },
  863. "required": true
  864. },
  865. {
  866. "name": "model",
  867. "in": "query",
  868. "schema": {
  869. "type": "string"
  870. },
  871. "required": true
  872. }
  873. ],
  874. "responses": {
  875. "200": {
  876. "description": "Tools",
  877. "content": {
  878. "application/json": {
  879. "schema": {
  880. "$ref": "#/components/schemas/ToolList"
  881. }
  882. }
  883. }
  884. },
  885. "400": {
  886. "description": "Bad request",
  887. "content": {
  888. "application/json": {
  889. "schema": {
  890. "$ref": "#/components/schemas/BadRequestError"
  891. }
  892. }
  893. }
  894. }
  895. },
  896. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  897. "summary": "List tools",
  898. "x-codeSamples": [
  899. {
  900. "lang": "js",
  901. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  902. }
  903. ]
  904. }
  905. },
  906. "/experimental/tool/ids": {
  907. "get": {
  908. "tags": ["experimental"],
  909. "operationId": "tool.ids",
  910. "parameters": [
  911. {
  912. "name": "directory",
  913. "in": "query",
  914. "required": false,
  915. "schema": {
  916. "type": "string"
  917. }
  918. },
  919. {
  920. "name": "workspace",
  921. "in": "query",
  922. "required": false,
  923. "schema": {
  924. "type": "string"
  925. }
  926. }
  927. ],
  928. "responses": {
  929. "200": {
  930. "description": "Tool IDs",
  931. "content": {
  932. "application/json": {
  933. "schema": {
  934. "$ref": "#/components/schemas/ToolIDs"
  935. }
  936. }
  937. }
  938. },
  939. "400": {
  940. "description": "Bad request",
  941. "content": {
  942. "application/json": {
  943. "schema": {
  944. "$ref": "#/components/schemas/BadRequestError"
  945. }
  946. }
  947. }
  948. }
  949. },
  950. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  951. "summary": "List tool IDs",
  952. "x-codeSamples": [
  953. {
  954. "lang": "js",
  955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  956. }
  957. ]
  958. }
  959. },
  960. "/experimental/worktree": {
  961. "get": {
  962. "tags": ["experimental"],
  963. "operationId": "worktree.list",
  964. "parameters": [
  965. {
  966. "name": "directory",
  967. "in": "query",
  968. "required": false,
  969. "schema": {
  970. "type": "string"
  971. }
  972. },
  973. {
  974. "name": "workspace",
  975. "in": "query",
  976. "required": false,
  977. "schema": {
  978. "type": "string"
  979. }
  980. }
  981. ],
  982. "responses": {
  983. "200": {
  984. "description": "List of worktree directories",
  985. "content": {
  986. "application/json": {
  987. "schema": {
  988. "type": "array",
  989. "items": {
  990. "type": "string"
  991. },
  992. "description": "List of worktree directories"
  993. }
  994. }
  995. }
  996. }
  997. },
  998. "description": "List all sandbox worktrees for the current project.",
  999. "summary": "List worktrees",
  1000. "x-codeSamples": [
  1001. {
  1002. "lang": "js",
  1003. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1004. }
  1005. ]
  1006. },
  1007. "post": {
  1008. "tags": ["experimental"],
  1009. "operationId": "worktree.create",
  1010. "parameters": [
  1011. {
  1012. "name": "directory",
  1013. "in": "query",
  1014. "required": false,
  1015. "schema": {
  1016. "type": "string"
  1017. }
  1018. },
  1019. {
  1020. "name": "workspace",
  1021. "in": "query",
  1022. "required": false,
  1023. "schema": {
  1024. "type": "string"
  1025. }
  1026. }
  1027. ],
  1028. "responses": {
  1029. "200": {
  1030. "description": "Worktree created",
  1031. "content": {
  1032. "application/json": {
  1033. "schema": {
  1034. "$ref": "#/components/schemas/Worktree"
  1035. }
  1036. }
  1037. }
  1038. },
  1039. "400": {
  1040. "description": "Bad request",
  1041. "content": {
  1042. "application/json": {
  1043. "schema": {
  1044. "$ref": "#/components/schemas/BadRequestError"
  1045. }
  1046. }
  1047. }
  1048. }
  1049. },
  1050. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1051. "summary": "Create worktree",
  1052. "requestBody": {
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "$ref": "#/components/schemas/WorktreeCreateInput"
  1057. }
  1058. }
  1059. }
  1060. },
  1061. "x-codeSamples": [
  1062. {
  1063. "lang": "js",
  1064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1065. }
  1066. ]
  1067. },
  1068. "delete": {
  1069. "tags": ["experimental"],
  1070. "operationId": "worktree.remove",
  1071. "parameters": [
  1072. {
  1073. "name": "directory",
  1074. "in": "query",
  1075. "required": false,
  1076. "schema": {
  1077. "type": "string"
  1078. }
  1079. },
  1080. {
  1081. "name": "workspace",
  1082. "in": "query",
  1083. "required": false,
  1084. "schema": {
  1085. "type": "string"
  1086. }
  1087. }
  1088. ],
  1089. "responses": {
  1090. "200": {
  1091. "description": "Worktree removed",
  1092. "content": {
  1093. "application/json": {
  1094. "schema": {
  1095. "type": "boolean",
  1096. "description": "Worktree removed"
  1097. }
  1098. }
  1099. }
  1100. },
  1101. "400": {
  1102. "description": "Bad request",
  1103. "content": {
  1104. "application/json": {
  1105. "schema": {
  1106. "$ref": "#/components/schemas/BadRequestError"
  1107. }
  1108. }
  1109. }
  1110. }
  1111. },
  1112. "description": "Remove a git worktree and delete its branch.",
  1113. "summary": "Remove worktree",
  1114. "requestBody": {
  1115. "content": {
  1116. "application/json": {
  1117. "schema": {
  1118. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1119. }
  1120. }
  1121. }
  1122. },
  1123. "x-codeSamples": [
  1124. {
  1125. "lang": "js",
  1126. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1127. }
  1128. ]
  1129. }
  1130. },
  1131. "/experimental/worktree/reset": {
  1132. "post": {
  1133. "tags": ["experimental"],
  1134. "operationId": "worktree.reset",
  1135. "parameters": [
  1136. {
  1137. "name": "directory",
  1138. "in": "query",
  1139. "required": false,
  1140. "schema": {
  1141. "type": "string"
  1142. }
  1143. },
  1144. {
  1145. "name": "workspace",
  1146. "in": "query",
  1147. "required": false,
  1148. "schema": {
  1149. "type": "string"
  1150. }
  1151. }
  1152. ],
  1153. "responses": {
  1154. "200": {
  1155. "description": "Worktree reset",
  1156. "content": {
  1157. "application/json": {
  1158. "schema": {
  1159. "type": "boolean",
  1160. "description": "Worktree reset"
  1161. }
  1162. }
  1163. }
  1164. },
  1165. "400": {
  1166. "description": "Bad request",
  1167. "content": {
  1168. "application/json": {
  1169. "schema": {
  1170. "$ref": "#/components/schemas/BadRequestError"
  1171. }
  1172. }
  1173. }
  1174. }
  1175. },
  1176. "description": "Reset a worktree branch to the primary default branch.",
  1177. "summary": "Reset worktree",
  1178. "requestBody": {
  1179. "content": {
  1180. "application/json": {
  1181. "schema": {
  1182. "$ref": "#/components/schemas/WorktreeResetInput"
  1183. }
  1184. }
  1185. }
  1186. },
  1187. "x-codeSamples": [
  1188. {
  1189. "lang": "js",
  1190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1191. }
  1192. ]
  1193. }
  1194. },
  1195. "/experimental/session": {
  1196. "get": {
  1197. "tags": ["experimental"],
  1198. "operationId": "experimental.session.list",
  1199. "parameters": [
  1200. {
  1201. "name": "directory",
  1202. "in": "query",
  1203. "required": false,
  1204. "schema": {
  1205. "type": "string"
  1206. }
  1207. },
  1208. {
  1209. "name": "workspace",
  1210. "in": "query",
  1211. "required": false,
  1212. "schema": {
  1213. "type": "string"
  1214. }
  1215. },
  1216. {
  1217. "name": "roots",
  1218. "in": "query",
  1219. "schema": {
  1220. "anyOf": [
  1221. {
  1222. "type": "boolean"
  1223. },
  1224. {
  1225. "type": "string",
  1226. "enum": ["true", "false"]
  1227. }
  1228. ]
  1229. },
  1230. "required": false
  1231. },
  1232. {
  1233. "name": "start",
  1234. "in": "query",
  1235. "schema": {
  1236. "type": "number"
  1237. },
  1238. "required": false
  1239. },
  1240. {
  1241. "name": "cursor",
  1242. "in": "query",
  1243. "schema": {
  1244. "type": "number"
  1245. },
  1246. "required": false
  1247. },
  1248. {
  1249. "name": "search",
  1250. "in": "query",
  1251. "schema": {
  1252. "type": "string"
  1253. },
  1254. "required": false
  1255. },
  1256. {
  1257. "name": "limit",
  1258. "in": "query",
  1259. "schema": {
  1260. "type": "number"
  1261. },
  1262. "required": false
  1263. },
  1264. {
  1265. "name": "archived",
  1266. "in": "query",
  1267. "schema": {
  1268. "anyOf": [
  1269. {
  1270. "type": "boolean"
  1271. },
  1272. {
  1273. "type": "string",
  1274. "enum": ["true", "false"]
  1275. }
  1276. ]
  1277. },
  1278. "required": false
  1279. }
  1280. ],
  1281. "responses": {
  1282. "200": {
  1283. "description": "List of sessions",
  1284. "content": {
  1285. "application/json": {
  1286. "schema": {
  1287. "type": "array",
  1288. "items": {
  1289. "$ref": "#/components/schemas/GlobalSession"
  1290. },
  1291. "description": "List of sessions"
  1292. }
  1293. }
  1294. }
  1295. }
  1296. },
  1297. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1298. "summary": "List sessions",
  1299. "x-codeSamples": [
  1300. {
  1301. "lang": "js",
  1302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1303. }
  1304. ]
  1305. }
  1306. },
  1307. "/experimental/resource": {
  1308. "get": {
  1309. "tags": ["experimental"],
  1310. "operationId": "experimental.resource.list",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "required": false,
  1316. "schema": {
  1317. "type": "string"
  1318. }
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "required": false,
  1324. "schema": {
  1325. "type": "string"
  1326. }
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "MCP resources",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "object",
  1336. "additionalProperties": {
  1337. "$ref": "#/components/schemas/McpResource"
  1338. },
  1339. "description": "MCP resources"
  1340. }
  1341. }
  1342. }
  1343. }
  1344. },
  1345. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1346. "summary": "Get MCP resources",
  1347. "x-codeSamples": [
  1348. {
  1349. "lang": "js",
  1350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1351. }
  1352. ]
  1353. }
  1354. },
  1355. "/find": {
  1356. "get": {
  1357. "tags": ["file"],
  1358. "operationId": "find.text",
  1359. "parameters": [
  1360. {
  1361. "name": "directory",
  1362. "in": "query",
  1363. "required": false,
  1364. "schema": {
  1365. "type": "string"
  1366. }
  1367. },
  1368. {
  1369. "name": "workspace",
  1370. "in": "query",
  1371. "required": false,
  1372. "schema": {
  1373. "type": "string"
  1374. }
  1375. },
  1376. {
  1377. "name": "pattern",
  1378. "in": "query",
  1379. "schema": {
  1380. "type": "string"
  1381. },
  1382. "required": true
  1383. }
  1384. ],
  1385. "responses": {
  1386. "200": {
  1387. "description": "Matches",
  1388. "content": {
  1389. "application/json": {
  1390. "schema": {
  1391. "type": "array",
  1392. "items": {
  1393. "type": "object",
  1394. "properties": {
  1395. "path": {
  1396. "type": "object",
  1397. "properties": {
  1398. "text": {
  1399. "type": "string"
  1400. }
  1401. },
  1402. "required": ["text"],
  1403. "additionalProperties": false
  1404. },
  1405. "lines": {
  1406. "type": "object",
  1407. "properties": {
  1408. "text": {
  1409. "type": "string"
  1410. }
  1411. },
  1412. "required": ["text"],
  1413. "additionalProperties": false
  1414. },
  1415. "line_number": {
  1416. "type": "integer",
  1417. "minimum": 0
  1418. },
  1419. "absolute_offset": {
  1420. "type": "integer",
  1421. "minimum": 0
  1422. },
  1423. "submatches": {
  1424. "type": "array",
  1425. "items": {
  1426. "type": "object",
  1427. "properties": {
  1428. "match": {
  1429. "type": "object",
  1430. "properties": {
  1431. "text": {
  1432. "type": "string"
  1433. }
  1434. },
  1435. "required": ["text"],
  1436. "additionalProperties": false
  1437. },
  1438. "start": {
  1439. "type": "integer",
  1440. "minimum": 0
  1441. },
  1442. "end": {
  1443. "type": "integer",
  1444. "minimum": 0
  1445. }
  1446. },
  1447. "required": ["match", "start", "end"],
  1448. "additionalProperties": false
  1449. }
  1450. }
  1451. },
  1452. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1453. "additionalProperties": false
  1454. },
  1455. "description": "Matches"
  1456. }
  1457. }
  1458. }
  1459. }
  1460. },
  1461. "description": "Search for text patterns across files in the project using ripgrep.",
  1462. "summary": "Find text",
  1463. "x-codeSamples": [
  1464. {
  1465. "lang": "js",
  1466. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1467. }
  1468. ]
  1469. }
  1470. },
  1471. "/find/file": {
  1472. "get": {
  1473. "tags": ["file"],
  1474. "operationId": "find.files",
  1475. "parameters": [
  1476. {
  1477. "name": "directory",
  1478. "in": "query",
  1479. "required": false,
  1480. "schema": {
  1481. "type": "string"
  1482. }
  1483. },
  1484. {
  1485. "name": "workspace",
  1486. "in": "query",
  1487. "required": false,
  1488. "schema": {
  1489. "type": "string"
  1490. }
  1491. },
  1492. {
  1493. "name": "query",
  1494. "in": "query",
  1495. "schema": {
  1496. "type": "string"
  1497. },
  1498. "required": true
  1499. },
  1500. {
  1501. "name": "dirs",
  1502. "in": "query",
  1503. "schema": {
  1504. "type": "string",
  1505. "enum": ["true", "false"]
  1506. },
  1507. "required": false
  1508. },
  1509. {
  1510. "name": "type",
  1511. "in": "query",
  1512. "schema": {
  1513. "type": "string",
  1514. "enum": ["file", "directory"]
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "limit",
  1520. "in": "query",
  1521. "schema": {
  1522. "type": "integer",
  1523. "minimum": 1,
  1524. "maximum": 200
  1525. },
  1526. "required": false
  1527. }
  1528. ],
  1529. "responses": {
  1530. "200": {
  1531. "description": "File paths",
  1532. "content": {
  1533. "application/json": {
  1534. "schema": {
  1535. "type": "array",
  1536. "items": {
  1537. "type": "string"
  1538. },
  1539. "description": "File paths"
  1540. }
  1541. }
  1542. }
  1543. }
  1544. },
  1545. "description": "Search for files or directories by name or pattern in the project directory.",
  1546. "summary": "Find files",
  1547. "x-codeSamples": [
  1548. {
  1549. "lang": "js",
  1550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1551. }
  1552. ]
  1553. }
  1554. },
  1555. "/find/symbol": {
  1556. "get": {
  1557. "tags": ["file"],
  1558. "operationId": "find.symbols",
  1559. "parameters": [
  1560. {
  1561. "name": "directory",
  1562. "in": "query",
  1563. "required": false,
  1564. "schema": {
  1565. "type": "string"
  1566. }
  1567. },
  1568. {
  1569. "name": "workspace",
  1570. "in": "query",
  1571. "required": false,
  1572. "schema": {
  1573. "type": "string"
  1574. }
  1575. },
  1576. {
  1577. "name": "query",
  1578. "in": "query",
  1579. "schema": {
  1580. "type": "string"
  1581. },
  1582. "required": true
  1583. }
  1584. ],
  1585. "responses": {
  1586. "200": {
  1587. "description": "Symbols",
  1588. "content": {
  1589. "application/json": {
  1590. "schema": {
  1591. "type": "array",
  1592. "items": {
  1593. "$ref": "#/components/schemas/Symbol"
  1594. },
  1595. "description": "Symbols"
  1596. }
  1597. }
  1598. }
  1599. }
  1600. },
  1601. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1602. "summary": "Find symbols",
  1603. "x-codeSamples": [
  1604. {
  1605. "lang": "js",
  1606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1607. }
  1608. ]
  1609. }
  1610. },
  1611. "/file": {
  1612. "get": {
  1613. "tags": ["file"],
  1614. "operationId": "file.list",
  1615. "parameters": [
  1616. {
  1617. "name": "directory",
  1618. "in": "query",
  1619. "required": false,
  1620. "schema": {
  1621. "type": "string"
  1622. }
  1623. },
  1624. {
  1625. "name": "workspace",
  1626. "in": "query",
  1627. "required": false,
  1628. "schema": {
  1629. "type": "string"
  1630. }
  1631. },
  1632. {
  1633. "name": "path",
  1634. "in": "query",
  1635. "schema": {
  1636. "type": "string"
  1637. },
  1638. "required": true
  1639. }
  1640. ],
  1641. "responses": {
  1642. "200": {
  1643. "description": "Files and directories",
  1644. "content": {
  1645. "application/json": {
  1646. "schema": {
  1647. "type": "array",
  1648. "items": {
  1649. "$ref": "#/components/schemas/FileNode"
  1650. },
  1651. "description": "Files and directories"
  1652. }
  1653. }
  1654. }
  1655. }
  1656. },
  1657. "description": "List files and directories in a specified path.",
  1658. "summary": "List files",
  1659. "x-codeSamples": [
  1660. {
  1661. "lang": "js",
  1662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1663. }
  1664. ]
  1665. }
  1666. },
  1667. "/file/content": {
  1668. "get": {
  1669. "tags": ["file"],
  1670. "operationId": "file.read",
  1671. "parameters": [
  1672. {
  1673. "name": "directory",
  1674. "in": "query",
  1675. "required": false,
  1676. "schema": {
  1677. "type": "string"
  1678. }
  1679. },
  1680. {
  1681. "name": "workspace",
  1682. "in": "query",
  1683. "required": false,
  1684. "schema": {
  1685. "type": "string"
  1686. }
  1687. },
  1688. {
  1689. "name": "path",
  1690. "in": "query",
  1691. "schema": {
  1692. "type": "string"
  1693. },
  1694. "required": true
  1695. }
  1696. ],
  1697. "responses": {
  1698. "200": {
  1699. "description": "File content",
  1700. "content": {
  1701. "application/json": {
  1702. "schema": {
  1703. "$ref": "#/components/schemas/FileContent"
  1704. }
  1705. }
  1706. }
  1707. }
  1708. },
  1709. "description": "Read the content of a specified file.",
  1710. "summary": "Read file",
  1711. "x-codeSamples": [
  1712. {
  1713. "lang": "js",
  1714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1715. }
  1716. ]
  1717. }
  1718. },
  1719. "/file/status": {
  1720. "get": {
  1721. "tags": ["file"],
  1722. "operationId": "file.status",
  1723. "parameters": [
  1724. {
  1725. "name": "directory",
  1726. "in": "query",
  1727. "required": false,
  1728. "schema": {
  1729. "type": "string"
  1730. }
  1731. },
  1732. {
  1733. "name": "workspace",
  1734. "in": "query",
  1735. "required": false,
  1736. "schema": {
  1737. "type": "string"
  1738. }
  1739. }
  1740. ],
  1741. "responses": {
  1742. "200": {
  1743. "description": "File status",
  1744. "content": {
  1745. "application/json": {
  1746. "schema": {
  1747. "type": "array",
  1748. "items": {
  1749. "$ref": "#/components/schemas/File"
  1750. },
  1751. "description": "File status"
  1752. }
  1753. }
  1754. }
  1755. }
  1756. },
  1757. "description": "Get the git status of all files in the project.",
  1758. "summary": "Get file status",
  1759. "x-codeSamples": [
  1760. {
  1761. "lang": "js",
  1762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1763. }
  1764. ]
  1765. }
  1766. },
  1767. "/instance/dispose": {
  1768. "post": {
  1769. "tags": ["instance"],
  1770. "operationId": "instance.dispose",
  1771. "parameters": [
  1772. {
  1773. "name": "directory",
  1774. "in": "query",
  1775. "required": false,
  1776. "schema": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. {
  1781. "name": "workspace",
  1782. "in": "query",
  1783. "required": false,
  1784. "schema": {
  1785. "type": "string"
  1786. }
  1787. }
  1788. ],
  1789. "responses": {
  1790. "200": {
  1791. "description": "Instance disposed",
  1792. "content": {
  1793. "application/json": {
  1794. "schema": {
  1795. "type": "boolean",
  1796. "description": "Instance disposed"
  1797. }
  1798. }
  1799. }
  1800. }
  1801. },
  1802. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1803. "summary": "Dispose instance",
  1804. "x-codeSamples": [
  1805. {
  1806. "lang": "js",
  1807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1808. }
  1809. ]
  1810. }
  1811. },
  1812. "/path": {
  1813. "get": {
  1814. "tags": ["instance"],
  1815. "operationId": "path.get",
  1816. "parameters": [
  1817. {
  1818. "name": "directory",
  1819. "in": "query",
  1820. "required": false,
  1821. "schema": {
  1822. "type": "string"
  1823. }
  1824. },
  1825. {
  1826. "name": "workspace",
  1827. "in": "query",
  1828. "required": false,
  1829. "schema": {
  1830. "type": "string"
  1831. }
  1832. }
  1833. ],
  1834. "responses": {
  1835. "200": {
  1836. "description": "Path",
  1837. "content": {
  1838. "application/json": {
  1839. "schema": {
  1840. "$ref": "#/components/schemas/Path"
  1841. }
  1842. }
  1843. }
  1844. }
  1845. },
  1846. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1847. "summary": "Get paths",
  1848. "x-codeSamples": [
  1849. {
  1850. "lang": "js",
  1851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1852. }
  1853. ]
  1854. }
  1855. },
  1856. "/vcs": {
  1857. "get": {
  1858. "tags": ["instance"],
  1859. "operationId": "vcs.get",
  1860. "parameters": [
  1861. {
  1862. "name": "directory",
  1863. "in": "query",
  1864. "required": false,
  1865. "schema": {
  1866. "type": "string"
  1867. }
  1868. },
  1869. {
  1870. "name": "workspace",
  1871. "in": "query",
  1872. "required": false,
  1873. "schema": {
  1874. "type": "string"
  1875. }
  1876. }
  1877. ],
  1878. "responses": {
  1879. "200": {
  1880. "description": "VCS info",
  1881. "content": {
  1882. "application/json": {
  1883. "schema": {
  1884. "$ref": "#/components/schemas/VcsInfo"
  1885. }
  1886. }
  1887. }
  1888. }
  1889. },
  1890. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1891. "summary": "Get VCS info",
  1892. "x-codeSamples": [
  1893. {
  1894. "lang": "js",
  1895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1896. }
  1897. ]
  1898. }
  1899. },
  1900. "/vcs/status": {
  1901. "get": {
  1902. "tags": ["instance"],
  1903. "operationId": "vcs.status",
  1904. "parameters": [
  1905. {
  1906. "name": "directory",
  1907. "in": "query",
  1908. "required": false,
  1909. "schema": {
  1910. "type": "string"
  1911. }
  1912. },
  1913. {
  1914. "name": "workspace",
  1915. "in": "query",
  1916. "required": false,
  1917. "schema": {
  1918. "type": "string"
  1919. }
  1920. }
  1921. ],
  1922. "responses": {
  1923. "200": {
  1924. "description": "VCS status",
  1925. "content": {
  1926. "application/json": {
  1927. "schema": {
  1928. "type": "array",
  1929. "items": {
  1930. "$ref": "#/components/schemas/VcsFileStatus"
  1931. },
  1932. "description": "VCS status"
  1933. }
  1934. }
  1935. }
  1936. }
  1937. },
  1938. "description": "Retrieve changed files in the current working tree without patches.",
  1939. "summary": "Get VCS status",
  1940. "x-codeSamples": [
  1941. {
  1942. "lang": "js",
  1943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1944. }
  1945. ]
  1946. }
  1947. },
  1948. "/vcs/diff": {
  1949. "get": {
  1950. "tags": ["instance"],
  1951. "operationId": "vcs.diff",
  1952. "parameters": [
  1953. {
  1954. "name": "directory",
  1955. "in": "query",
  1956. "required": false,
  1957. "schema": {
  1958. "type": "string"
  1959. }
  1960. },
  1961. {
  1962. "name": "workspace",
  1963. "in": "query",
  1964. "required": false,
  1965. "schema": {
  1966. "type": "string"
  1967. }
  1968. },
  1969. {
  1970. "name": "mode",
  1971. "in": "query",
  1972. "schema": {
  1973. "type": "string",
  1974. "enum": ["git", "branch"]
  1975. },
  1976. "required": true
  1977. }
  1978. ],
  1979. "responses": {
  1980. "200": {
  1981. "description": "VCS diff",
  1982. "content": {
  1983. "application/json": {
  1984. "schema": {
  1985. "type": "array",
  1986. "items": {
  1987. "$ref": "#/components/schemas/VcsFileDiff"
  1988. },
  1989. "description": "VCS diff"
  1990. }
  1991. }
  1992. }
  1993. }
  1994. },
  1995. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  1996. "summary": "Get VCS diff",
  1997. "x-codeSamples": [
  1998. {
  1999. "lang": "js",
  2000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2001. }
  2002. ]
  2003. }
  2004. },
  2005. "/vcs/diff/raw": {
  2006. "get": {
  2007. "tags": ["instance"],
  2008. "operationId": "vcs.diff.raw",
  2009. "parameters": [
  2010. {
  2011. "name": "directory",
  2012. "in": "query",
  2013. "required": false,
  2014. "schema": {
  2015. "type": "string"
  2016. }
  2017. },
  2018. {
  2019. "name": "workspace",
  2020. "in": "query",
  2021. "required": false,
  2022. "schema": {
  2023. "type": "string"
  2024. }
  2025. }
  2026. ],
  2027. "responses": {
  2028. "200": {
  2029. "description": "Raw VCS diff",
  2030. "content": {
  2031. "text/x-diff; charset=utf-8": {
  2032. "schema": {
  2033. "type": "string"
  2034. }
  2035. }
  2036. }
  2037. }
  2038. },
  2039. "description": "Retrieve a raw patch for current uncommitted changes.",
  2040. "summary": "Get raw VCS diff",
  2041. "x-codeSamples": [
  2042. {
  2043. "lang": "js",
  2044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2045. }
  2046. ]
  2047. }
  2048. },
  2049. "/vcs/apply": {
  2050. "post": {
  2051. "tags": ["instance"],
  2052. "operationId": "vcs.apply",
  2053. "parameters": [
  2054. {
  2055. "name": "directory",
  2056. "in": "query",
  2057. "required": false,
  2058. "schema": {
  2059. "type": "string"
  2060. }
  2061. },
  2062. {
  2063. "name": "workspace",
  2064. "in": "query",
  2065. "required": false,
  2066. "schema": {
  2067. "type": "string"
  2068. }
  2069. }
  2070. ],
  2071. "responses": {
  2072. "200": {
  2073. "description": "VCS patch applied",
  2074. "content": {
  2075. "application/json": {
  2076. "schema": {
  2077. "type": "object",
  2078. "properties": {
  2079. "applied": {
  2080. "type": "boolean"
  2081. }
  2082. },
  2083. "required": ["applied"],
  2084. "additionalProperties": false,
  2085. "description": "VCS patch applied"
  2086. }
  2087. }
  2088. }
  2089. },
  2090. "400": {
  2091. "description": "VcsApplyError",
  2092. "content": {
  2093. "application/json": {
  2094. "schema": {
  2095. "$ref": "#/components/schemas/VcsApplyError"
  2096. }
  2097. }
  2098. }
  2099. }
  2100. },
  2101. "description": "Apply a raw patch to the current working tree.",
  2102. "summary": "Apply VCS patch",
  2103. "requestBody": {
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "patch": {
  2110. "type": "string"
  2111. }
  2112. },
  2113. "required": ["patch"],
  2114. "additionalProperties": false
  2115. }
  2116. }
  2117. }
  2118. },
  2119. "x-codeSamples": [
  2120. {
  2121. "lang": "js",
  2122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2123. }
  2124. ]
  2125. }
  2126. },
  2127. "/command": {
  2128. "get": {
  2129. "tags": ["instance"],
  2130. "operationId": "command.list",
  2131. "parameters": [
  2132. {
  2133. "name": "directory",
  2134. "in": "query",
  2135. "required": false,
  2136. "schema": {
  2137. "type": "string"
  2138. }
  2139. },
  2140. {
  2141. "name": "workspace",
  2142. "in": "query",
  2143. "required": false,
  2144. "schema": {
  2145. "type": "string"
  2146. }
  2147. }
  2148. ],
  2149. "responses": {
  2150. "200": {
  2151. "description": "List of commands",
  2152. "content": {
  2153. "application/json": {
  2154. "schema": {
  2155. "type": "array",
  2156. "items": {
  2157. "$ref": "#/components/schemas/Command"
  2158. },
  2159. "description": "List of commands"
  2160. }
  2161. }
  2162. }
  2163. }
  2164. },
  2165. "description": "Get a list of all available commands in the OpenCode system.",
  2166. "summary": "List commands",
  2167. "x-codeSamples": [
  2168. {
  2169. "lang": "js",
  2170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2171. }
  2172. ]
  2173. }
  2174. },
  2175. "/agent": {
  2176. "get": {
  2177. "tags": ["instance"],
  2178. "operationId": "app.agents",
  2179. "parameters": [
  2180. {
  2181. "name": "directory",
  2182. "in": "query",
  2183. "required": false,
  2184. "schema": {
  2185. "type": "string"
  2186. }
  2187. },
  2188. {
  2189. "name": "workspace",
  2190. "in": "query",
  2191. "required": false,
  2192. "schema": {
  2193. "type": "string"
  2194. }
  2195. }
  2196. ],
  2197. "responses": {
  2198. "200": {
  2199. "description": "List of agents",
  2200. "content": {
  2201. "application/json": {
  2202. "schema": {
  2203. "type": "array",
  2204. "items": {
  2205. "$ref": "#/components/schemas/Agent"
  2206. },
  2207. "description": "List of agents"
  2208. }
  2209. }
  2210. }
  2211. }
  2212. },
  2213. "description": "Get a list of all available AI agents in the OpenCode system.",
  2214. "summary": "List agents",
  2215. "x-codeSamples": [
  2216. {
  2217. "lang": "js",
  2218. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2219. }
  2220. ]
  2221. }
  2222. },
  2223. "/skill": {
  2224. "get": {
  2225. "tags": ["instance"],
  2226. "operationId": "app.skills",
  2227. "parameters": [
  2228. {
  2229. "name": "directory",
  2230. "in": "query",
  2231. "required": false,
  2232. "schema": {
  2233. "type": "string"
  2234. }
  2235. },
  2236. {
  2237. "name": "workspace",
  2238. "in": "query",
  2239. "required": false,
  2240. "schema": {
  2241. "type": "string"
  2242. }
  2243. }
  2244. ],
  2245. "responses": {
  2246. "200": {
  2247. "description": "List of skills",
  2248. "content": {
  2249. "application/json": {
  2250. "schema": {
  2251. "type": "array",
  2252. "items": {
  2253. "type": "object",
  2254. "properties": {
  2255. "name": {
  2256. "type": "string"
  2257. },
  2258. "description": {
  2259. "type": "string"
  2260. },
  2261. "location": {
  2262. "type": "string"
  2263. },
  2264. "content": {
  2265. "type": "string"
  2266. }
  2267. },
  2268. "required": ["name", "description", "location", "content"],
  2269. "additionalProperties": false
  2270. },
  2271. "description": "List of skills"
  2272. }
  2273. }
  2274. }
  2275. }
  2276. },
  2277. "description": "Get a list of all available skills in the OpenCode system.",
  2278. "summary": "List skills",
  2279. "x-codeSamples": [
  2280. {
  2281. "lang": "js",
  2282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2283. }
  2284. ]
  2285. }
  2286. },
  2287. "/lsp": {
  2288. "get": {
  2289. "tags": ["instance"],
  2290. "operationId": "lsp.status",
  2291. "parameters": [
  2292. {
  2293. "name": "directory",
  2294. "in": "query",
  2295. "required": false,
  2296. "schema": {
  2297. "type": "string"
  2298. }
  2299. },
  2300. {
  2301. "name": "workspace",
  2302. "in": "query",
  2303. "required": false,
  2304. "schema": {
  2305. "type": "string"
  2306. }
  2307. }
  2308. ],
  2309. "responses": {
  2310. "200": {
  2311. "description": "LSP server status",
  2312. "content": {
  2313. "application/json": {
  2314. "schema": {
  2315. "type": "array",
  2316. "items": {
  2317. "$ref": "#/components/schemas/LSPStatus"
  2318. },
  2319. "description": "LSP server status"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Get LSP server status",
  2326. "summary": "Get LSP status",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/formatter": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "formatter.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "required": false,
  2344. "schema": {
  2345. "type": "string"
  2346. }
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "required": false,
  2352. "schema": {
  2353. "type": "string"
  2354. }
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "Formatter status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/FormatterStatus"
  2366. },
  2367. "description": "Formatter status"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Get formatter status",
  2374. "summary": "Get formatter status",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/mcp": {
  2384. "get": {
  2385. "tags": ["mcp"],
  2386. "operationId": "mcp.status",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "required": false,
  2392. "schema": {
  2393. "type": "string"
  2394. }
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "required": false,
  2400. "schema": {
  2401. "type": "string"
  2402. }
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "MCP server status",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "additionalProperties": {
  2413. "$ref": "#/components/schemas/MCPStatus"
  2414. },
  2415. "description": "MCP server status"
  2416. }
  2417. }
  2418. }
  2419. }
  2420. },
  2421. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2422. "summary": "Get MCP status",
  2423. "x-codeSamples": [
  2424. {
  2425. "lang": "js",
  2426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2427. }
  2428. ]
  2429. },
  2430. "post": {
  2431. "tags": ["mcp"],
  2432. "operationId": "mcp.add",
  2433. "parameters": [
  2434. {
  2435. "name": "directory",
  2436. "in": "query",
  2437. "required": false,
  2438. "schema": {
  2439. "type": "string"
  2440. }
  2441. },
  2442. {
  2443. "name": "workspace",
  2444. "in": "query",
  2445. "required": false,
  2446. "schema": {
  2447. "type": "string"
  2448. }
  2449. }
  2450. ],
  2451. "responses": {
  2452. "200": {
  2453. "description": "MCP server added successfully",
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "additionalProperties": {
  2459. "$ref": "#/components/schemas/MCPStatus"
  2460. },
  2461. "description": "MCP server added successfully"
  2462. }
  2463. }
  2464. }
  2465. },
  2466. "400": {
  2467. "description": "Bad request",
  2468. "content": {
  2469. "application/json": {
  2470. "schema": {
  2471. "$ref": "#/components/schemas/BadRequestError"
  2472. }
  2473. }
  2474. }
  2475. }
  2476. },
  2477. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2478. "summary": "Add MCP server",
  2479. "requestBody": {
  2480. "content": {
  2481. "application/json": {
  2482. "schema": {
  2483. "type": "object",
  2484. "properties": {
  2485. "name": {
  2486. "type": "string"
  2487. },
  2488. "config": {
  2489. "anyOf": [
  2490. {
  2491. "$ref": "#/components/schemas/McpLocalConfig"
  2492. },
  2493. {
  2494. "$ref": "#/components/schemas/McpRemoteConfig"
  2495. }
  2496. ]
  2497. }
  2498. },
  2499. "required": ["name", "config"],
  2500. "additionalProperties": false
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "x-codeSamples": [
  2506. {
  2507. "lang": "js",
  2508. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2509. }
  2510. ]
  2511. }
  2512. },
  2513. "/mcp/{name}/auth": {
  2514. "post": {
  2515. "tags": ["mcp"],
  2516. "operationId": "mcp.auth.start",
  2517. "parameters": [
  2518. {
  2519. "name": "directory",
  2520. "in": "query",
  2521. "required": false,
  2522. "schema": {
  2523. "type": "string"
  2524. }
  2525. },
  2526. {
  2527. "name": "workspace",
  2528. "in": "query",
  2529. "required": false,
  2530. "schema": {
  2531. "type": "string"
  2532. }
  2533. },
  2534. {
  2535. "name": "name",
  2536. "in": "path",
  2537. "schema": {
  2538. "type": "string"
  2539. },
  2540. "required": true
  2541. }
  2542. ],
  2543. "responses": {
  2544. "200": {
  2545. "description": "OAuth flow started",
  2546. "content": {
  2547. "application/json": {
  2548. "schema": {
  2549. "type": "object",
  2550. "properties": {
  2551. "authorizationUrl": {
  2552. "type": "string"
  2553. },
  2554. "oauthState": {
  2555. "type": "string"
  2556. }
  2557. },
  2558. "required": ["authorizationUrl", "oauthState"],
  2559. "additionalProperties": false,
  2560. "description": "OAuth flow started"
  2561. }
  2562. }
  2563. }
  2564. },
  2565. "400": {
  2566. "description": "McpUnsupportedOAuthError",
  2567. "content": {
  2568. "application/json": {
  2569. "schema": {
  2570. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2571. }
  2572. }
  2573. }
  2574. },
  2575. "404": {
  2576. "description": "Not found",
  2577. "content": {
  2578. "application/json": {
  2579. "schema": {
  2580. "$ref": "#/components/schemas/NotFoundError"
  2581. }
  2582. }
  2583. }
  2584. }
  2585. },
  2586. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2587. "summary": "Start MCP OAuth",
  2588. "x-codeSamples": [
  2589. {
  2590. "lang": "js",
  2591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2592. }
  2593. ]
  2594. },
  2595. "delete": {
  2596. "tags": ["mcp"],
  2597. "operationId": "mcp.auth.remove",
  2598. "parameters": [
  2599. {
  2600. "name": "directory",
  2601. "in": "query",
  2602. "required": false,
  2603. "schema": {
  2604. "type": "string"
  2605. }
  2606. },
  2607. {
  2608. "name": "workspace",
  2609. "in": "query",
  2610. "required": false,
  2611. "schema": {
  2612. "type": "string"
  2613. }
  2614. },
  2615. {
  2616. "name": "name",
  2617. "in": "path",
  2618. "schema": {
  2619. "type": "string"
  2620. },
  2621. "required": true
  2622. }
  2623. ],
  2624. "responses": {
  2625. "200": {
  2626. "description": "OAuth credentials removed",
  2627. "content": {
  2628. "application/json": {
  2629. "schema": {
  2630. "type": "object",
  2631. "properties": {
  2632. "success": {
  2633. "type": "boolean",
  2634. "enum": [true]
  2635. }
  2636. },
  2637. "required": ["success"],
  2638. "additionalProperties": false,
  2639. "description": "OAuth credentials removed"
  2640. }
  2641. }
  2642. }
  2643. },
  2644. "404": {
  2645. "description": "Not found",
  2646. "content": {
  2647. "application/json": {
  2648. "schema": {
  2649. "$ref": "#/components/schemas/NotFoundError"
  2650. }
  2651. }
  2652. }
  2653. }
  2654. },
  2655. "description": "Remove OAuth credentials for an MCP server.",
  2656. "summary": "Remove MCP OAuth",
  2657. "x-codeSamples": [
  2658. {
  2659. "lang": "js",
  2660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2661. }
  2662. ]
  2663. }
  2664. },
  2665. "/mcp/{name}/auth/callback": {
  2666. "post": {
  2667. "tags": ["mcp"],
  2668. "operationId": "mcp.auth.callback",
  2669. "parameters": [
  2670. {
  2671. "name": "directory",
  2672. "in": "query",
  2673. "required": false,
  2674. "schema": {
  2675. "type": "string"
  2676. }
  2677. },
  2678. {
  2679. "name": "workspace",
  2680. "in": "query",
  2681. "required": false,
  2682. "schema": {
  2683. "type": "string"
  2684. }
  2685. },
  2686. {
  2687. "name": "name",
  2688. "in": "path",
  2689. "schema": {
  2690. "type": "string"
  2691. },
  2692. "required": true
  2693. }
  2694. ],
  2695. "responses": {
  2696. "200": {
  2697. "description": "OAuth authentication completed",
  2698. "content": {
  2699. "application/json": {
  2700. "schema": {
  2701. "$ref": "#/components/schemas/MCPStatus"
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "400": {
  2707. "description": "Bad request",
  2708. "content": {
  2709. "application/json": {
  2710. "schema": {
  2711. "$ref": "#/components/schemas/BadRequestError"
  2712. }
  2713. }
  2714. }
  2715. },
  2716. "404": {
  2717. "description": "Not found",
  2718. "content": {
  2719. "application/json": {
  2720. "schema": {
  2721. "$ref": "#/components/schemas/NotFoundError"
  2722. }
  2723. }
  2724. }
  2725. }
  2726. },
  2727. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2728. "summary": "Complete MCP OAuth",
  2729. "requestBody": {
  2730. "content": {
  2731. "application/json": {
  2732. "schema": {
  2733. "type": "object",
  2734. "properties": {
  2735. "code": {
  2736. "type": "string"
  2737. }
  2738. },
  2739. "required": ["code"],
  2740. "additionalProperties": false
  2741. }
  2742. }
  2743. }
  2744. },
  2745. "x-codeSamples": [
  2746. {
  2747. "lang": "js",
  2748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2749. }
  2750. ]
  2751. }
  2752. },
  2753. "/mcp/{name}/auth/authenticate": {
  2754. "post": {
  2755. "tags": ["mcp"],
  2756. "operationId": "mcp.auth.authenticate",
  2757. "parameters": [
  2758. {
  2759. "name": "directory",
  2760. "in": "query",
  2761. "required": false,
  2762. "schema": {
  2763. "type": "string"
  2764. }
  2765. },
  2766. {
  2767. "name": "workspace",
  2768. "in": "query",
  2769. "required": false,
  2770. "schema": {
  2771. "type": "string"
  2772. }
  2773. },
  2774. {
  2775. "name": "name",
  2776. "in": "path",
  2777. "schema": {
  2778. "type": "string"
  2779. },
  2780. "required": true
  2781. }
  2782. ],
  2783. "responses": {
  2784. "200": {
  2785. "description": "OAuth authentication completed",
  2786. "content": {
  2787. "application/json": {
  2788. "schema": {
  2789. "$ref": "#/components/schemas/MCPStatus"
  2790. }
  2791. }
  2792. }
  2793. },
  2794. "400": {
  2795. "description": "McpUnsupportedOAuthError",
  2796. "content": {
  2797. "application/json": {
  2798. "schema": {
  2799. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2800. }
  2801. }
  2802. }
  2803. },
  2804. "404": {
  2805. "description": "Not found",
  2806. "content": {
  2807. "application/json": {
  2808. "schema": {
  2809. "$ref": "#/components/schemas/NotFoundError"
  2810. }
  2811. }
  2812. }
  2813. }
  2814. },
  2815. "description": "Start OAuth flow and wait for callback (opens browser).",
  2816. "summary": "Authenticate MCP OAuth",
  2817. "x-codeSamples": [
  2818. {
  2819. "lang": "js",
  2820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2821. }
  2822. ]
  2823. }
  2824. },
  2825. "/mcp/{name}/connect": {
  2826. "post": {
  2827. "tags": ["mcp"],
  2828. "operationId": "mcp.connect",
  2829. "parameters": [
  2830. {
  2831. "name": "directory",
  2832. "in": "query",
  2833. "required": false,
  2834. "schema": {
  2835. "type": "string"
  2836. }
  2837. },
  2838. {
  2839. "name": "workspace",
  2840. "in": "query",
  2841. "required": false,
  2842. "schema": {
  2843. "type": "string"
  2844. }
  2845. },
  2846. {
  2847. "name": "name",
  2848. "in": "path",
  2849. "schema": {
  2850. "type": "string"
  2851. },
  2852. "required": true
  2853. }
  2854. ],
  2855. "responses": {
  2856. "200": {
  2857. "description": "MCP server connected successfully",
  2858. "content": {
  2859. "application/json": {
  2860. "schema": {
  2861. "type": "boolean",
  2862. "description": "MCP server connected successfully"
  2863. }
  2864. }
  2865. }
  2866. }
  2867. },
  2868. "description": "Connect an MCP server.",
  2869. "x-codeSamples": [
  2870. {
  2871. "lang": "js",
  2872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2873. }
  2874. ]
  2875. }
  2876. },
  2877. "/mcp/{name}/disconnect": {
  2878. "post": {
  2879. "tags": ["mcp"],
  2880. "operationId": "mcp.disconnect",
  2881. "parameters": [
  2882. {
  2883. "name": "directory",
  2884. "in": "query",
  2885. "required": false,
  2886. "schema": {
  2887. "type": "string"
  2888. }
  2889. },
  2890. {
  2891. "name": "workspace",
  2892. "in": "query",
  2893. "required": false,
  2894. "schema": {
  2895. "type": "string"
  2896. }
  2897. },
  2898. {
  2899. "name": "name",
  2900. "in": "path",
  2901. "schema": {
  2902. "type": "string"
  2903. },
  2904. "required": true
  2905. }
  2906. ],
  2907. "responses": {
  2908. "200": {
  2909. "description": "MCP server disconnected successfully",
  2910. "content": {
  2911. "application/json": {
  2912. "schema": {
  2913. "type": "boolean",
  2914. "description": "MCP server disconnected successfully"
  2915. }
  2916. }
  2917. }
  2918. }
  2919. },
  2920. "description": "Disconnect an MCP server.",
  2921. "x-codeSamples": [
  2922. {
  2923. "lang": "js",
  2924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2925. }
  2926. ]
  2927. }
  2928. },
  2929. "/project": {
  2930. "get": {
  2931. "tags": ["project"],
  2932. "operationId": "project.list",
  2933. "parameters": [
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "required": false,
  2938. "schema": {
  2939. "type": "string"
  2940. }
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "required": false,
  2946. "schema": {
  2947. "type": "string"
  2948. }
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "List of projects",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "array",
  2958. "items": {
  2959. "$ref": "#/components/schemas/Project"
  2960. },
  2961. "description": "List of projects"
  2962. }
  2963. }
  2964. }
  2965. }
  2966. },
  2967. "description": "Get a list of projects that have been opened with OpenCode.",
  2968. "summary": "List all projects",
  2969. "x-codeSamples": [
  2970. {
  2971. "lang": "js",
  2972. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  2973. }
  2974. ]
  2975. }
  2976. },
  2977. "/project/current": {
  2978. "get": {
  2979. "tags": ["project"],
  2980. "operationId": "project.current",
  2981. "parameters": [
  2982. {
  2983. "name": "directory",
  2984. "in": "query",
  2985. "required": false,
  2986. "schema": {
  2987. "type": "string"
  2988. }
  2989. },
  2990. {
  2991. "name": "workspace",
  2992. "in": "query",
  2993. "required": false,
  2994. "schema": {
  2995. "type": "string"
  2996. }
  2997. }
  2998. ],
  2999. "responses": {
  3000. "200": {
  3001. "description": "Current project information",
  3002. "content": {
  3003. "application/json": {
  3004. "schema": {
  3005. "$ref": "#/components/schemas/Project"
  3006. }
  3007. }
  3008. }
  3009. }
  3010. },
  3011. "description": "Retrieve the currently active project that OpenCode is working with.",
  3012. "summary": "Get current project",
  3013. "x-codeSamples": [
  3014. {
  3015. "lang": "js",
  3016. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3017. }
  3018. ]
  3019. }
  3020. },
  3021. "/project/git/init": {
  3022. "post": {
  3023. "tags": ["project"],
  3024. "operationId": "project.initGit",
  3025. "parameters": [
  3026. {
  3027. "name": "directory",
  3028. "in": "query",
  3029. "required": false,
  3030. "schema": {
  3031. "type": "string"
  3032. }
  3033. },
  3034. {
  3035. "name": "workspace",
  3036. "in": "query",
  3037. "required": false,
  3038. "schema": {
  3039. "type": "string"
  3040. }
  3041. }
  3042. ],
  3043. "responses": {
  3044. "200": {
  3045. "description": "Project information after git initialization",
  3046. "content": {
  3047. "application/json": {
  3048. "schema": {
  3049. "$ref": "#/components/schemas/Project"
  3050. }
  3051. }
  3052. }
  3053. }
  3054. },
  3055. "description": "Create a git repository for the current project and return the refreshed project info.",
  3056. "summary": "Initialize git repository",
  3057. "x-codeSamples": [
  3058. {
  3059. "lang": "js",
  3060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3061. }
  3062. ]
  3063. }
  3064. },
  3065. "/project/{projectID}": {
  3066. "patch": {
  3067. "tags": ["project"],
  3068. "operationId": "project.update",
  3069. "parameters": [
  3070. {
  3071. "name": "directory",
  3072. "in": "query",
  3073. "required": false,
  3074. "schema": {
  3075. "type": "string"
  3076. }
  3077. },
  3078. {
  3079. "name": "workspace",
  3080. "in": "query",
  3081. "required": false,
  3082. "schema": {
  3083. "type": "string"
  3084. }
  3085. },
  3086. {
  3087. "name": "projectID",
  3088. "in": "path",
  3089. "schema": {
  3090. "type": "string"
  3091. },
  3092. "required": true
  3093. }
  3094. ],
  3095. "responses": {
  3096. "200": {
  3097. "description": "Updated project information",
  3098. "content": {
  3099. "application/json": {
  3100. "schema": {
  3101. "$ref": "#/components/schemas/Project"
  3102. }
  3103. }
  3104. }
  3105. },
  3106. "400": {
  3107. "description": "Bad request",
  3108. "content": {
  3109. "application/json": {
  3110. "schema": {
  3111. "$ref": "#/components/schemas/BadRequestError"
  3112. }
  3113. }
  3114. }
  3115. },
  3116. "404": {
  3117. "description": "Not found",
  3118. "content": {
  3119. "application/json": {
  3120. "schema": {
  3121. "$ref": "#/components/schemas/NotFoundError"
  3122. }
  3123. }
  3124. }
  3125. }
  3126. },
  3127. "description": "Update project properties such as name, icon, and commands.",
  3128. "summary": "Update project",
  3129. "requestBody": {
  3130. "content": {
  3131. "application/json": {
  3132. "schema": {
  3133. "type": "object",
  3134. "properties": {
  3135. "name": {
  3136. "type": "string"
  3137. },
  3138. "icon": {
  3139. "type": "object",
  3140. "properties": {
  3141. "url": {
  3142. "type": "string"
  3143. },
  3144. "override": {
  3145. "type": "string"
  3146. },
  3147. "color": {
  3148. "type": "string"
  3149. }
  3150. },
  3151. "additionalProperties": false
  3152. },
  3153. "commands": {
  3154. "type": "object",
  3155. "properties": {
  3156. "start": {
  3157. "type": "string",
  3158. "description": "Startup script to run when creating a new workspace (worktree)"
  3159. }
  3160. },
  3161. "additionalProperties": false
  3162. }
  3163. },
  3164. "additionalProperties": false
  3165. }
  3166. }
  3167. }
  3168. },
  3169. "x-codeSamples": [
  3170. {
  3171. "lang": "js",
  3172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3173. }
  3174. ]
  3175. }
  3176. },
  3177. "/pty/shells": {
  3178. "get": {
  3179. "tags": ["pty"],
  3180. "operationId": "pty.shells",
  3181. "parameters": [
  3182. {
  3183. "name": "directory",
  3184. "in": "query",
  3185. "required": false,
  3186. "schema": {
  3187. "type": "string"
  3188. }
  3189. },
  3190. {
  3191. "name": "workspace",
  3192. "in": "query",
  3193. "required": false,
  3194. "schema": {
  3195. "type": "string"
  3196. }
  3197. }
  3198. ],
  3199. "responses": {
  3200. "200": {
  3201. "description": "List of shells",
  3202. "content": {
  3203. "application/json": {
  3204. "schema": {
  3205. "type": "array",
  3206. "items": {
  3207. "type": "object",
  3208. "properties": {
  3209. "path": {
  3210. "type": "string"
  3211. },
  3212. "name": {
  3213. "type": "string"
  3214. },
  3215. "acceptable": {
  3216. "type": "boolean"
  3217. }
  3218. },
  3219. "required": ["path", "name", "acceptable"],
  3220. "additionalProperties": false
  3221. },
  3222. "description": "List of shells"
  3223. }
  3224. }
  3225. }
  3226. }
  3227. },
  3228. "description": "Get a list of available shells on the system.",
  3229. "summary": "List available shells",
  3230. "x-codeSamples": [
  3231. {
  3232. "lang": "js",
  3233. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3234. }
  3235. ]
  3236. }
  3237. },
  3238. "/pty": {
  3239. "get": {
  3240. "tags": ["pty"],
  3241. "operationId": "pty.list",
  3242. "parameters": [
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "required": false,
  3247. "schema": {
  3248. "type": "string"
  3249. }
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "required": false,
  3255. "schema": {
  3256. "type": "string"
  3257. }
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "List of sessions",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "type": "array",
  3267. "items": {
  3268. "$ref": "#/components/schemas/Pty"
  3269. },
  3270. "description": "List of sessions"
  3271. }
  3272. }
  3273. }
  3274. }
  3275. },
  3276. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3277. "summary": "List PTY sessions",
  3278. "x-codeSamples": [
  3279. {
  3280. "lang": "js",
  3281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3282. }
  3283. ]
  3284. },
  3285. "post": {
  3286. "tags": ["pty"],
  3287. "operationId": "pty.create",
  3288. "parameters": [
  3289. {
  3290. "name": "directory",
  3291. "in": "query",
  3292. "required": false,
  3293. "schema": {
  3294. "type": "string"
  3295. }
  3296. },
  3297. {
  3298. "name": "workspace",
  3299. "in": "query",
  3300. "required": false,
  3301. "schema": {
  3302. "type": "string"
  3303. }
  3304. }
  3305. ],
  3306. "responses": {
  3307. "200": {
  3308. "description": "Created session",
  3309. "content": {
  3310. "application/json": {
  3311. "schema": {
  3312. "$ref": "#/components/schemas/Pty"
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "400": {
  3318. "description": "Bad request",
  3319. "content": {
  3320. "application/json": {
  3321. "schema": {
  3322. "$ref": "#/components/schemas/BadRequestError"
  3323. }
  3324. }
  3325. }
  3326. }
  3327. },
  3328. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3329. "summary": "Create PTY session",
  3330. "requestBody": {
  3331. "content": {
  3332. "application/json": {
  3333. "schema": {
  3334. "type": "object",
  3335. "properties": {
  3336. "command": {
  3337. "type": "string"
  3338. },
  3339. "args": {
  3340. "type": "array",
  3341. "items": {
  3342. "type": "string"
  3343. }
  3344. },
  3345. "cwd": {
  3346. "type": "string"
  3347. },
  3348. "title": {
  3349. "type": "string"
  3350. },
  3351. "env": {
  3352. "type": "object",
  3353. "additionalProperties": {
  3354. "type": "string"
  3355. }
  3356. }
  3357. },
  3358. "additionalProperties": false
  3359. }
  3360. }
  3361. }
  3362. },
  3363. "x-codeSamples": [
  3364. {
  3365. "lang": "js",
  3366. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3367. }
  3368. ]
  3369. }
  3370. },
  3371. "/pty/{ptyID}": {
  3372. "get": {
  3373. "tags": ["pty"],
  3374. "operationId": "pty.get",
  3375. "parameters": [
  3376. {
  3377. "name": "directory",
  3378. "in": "query",
  3379. "required": false,
  3380. "schema": {
  3381. "type": "string"
  3382. }
  3383. },
  3384. {
  3385. "name": "workspace",
  3386. "in": "query",
  3387. "required": false,
  3388. "schema": {
  3389. "type": "string"
  3390. }
  3391. },
  3392. {
  3393. "name": "ptyID",
  3394. "in": "path",
  3395. "schema": {
  3396. "type": "string",
  3397. "pattern": "^pty.*"
  3398. },
  3399. "required": true
  3400. }
  3401. ],
  3402. "responses": {
  3403. "200": {
  3404. "description": "Session info",
  3405. "content": {
  3406. "application/json": {
  3407. "schema": {
  3408. "$ref": "#/components/schemas/Pty"
  3409. }
  3410. }
  3411. }
  3412. },
  3413. "404": {
  3414. "description": "NotFoundError",
  3415. "content": {
  3416. "application/json": {
  3417. "schema": {
  3418. "$ref": "#/components/schemas/NotFoundError"
  3419. }
  3420. }
  3421. }
  3422. }
  3423. },
  3424. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3425. "summary": "Get PTY session",
  3426. "x-codeSamples": [
  3427. {
  3428. "lang": "js",
  3429. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3430. }
  3431. ]
  3432. },
  3433. "put": {
  3434. "tags": ["pty"],
  3435. "operationId": "pty.update",
  3436. "parameters": [
  3437. {
  3438. "name": "directory",
  3439. "in": "query",
  3440. "required": false,
  3441. "schema": {
  3442. "type": "string"
  3443. }
  3444. },
  3445. {
  3446. "name": "workspace",
  3447. "in": "query",
  3448. "required": false,
  3449. "schema": {
  3450. "type": "string"
  3451. }
  3452. },
  3453. {
  3454. "name": "ptyID",
  3455. "in": "path",
  3456. "schema": {
  3457. "type": "string",
  3458. "pattern": "^pty.*"
  3459. },
  3460. "required": true
  3461. }
  3462. ],
  3463. "responses": {
  3464. "200": {
  3465. "description": "Updated session",
  3466. "content": {
  3467. "application/json": {
  3468. "schema": {
  3469. "$ref": "#/components/schemas/Pty"
  3470. }
  3471. }
  3472. }
  3473. },
  3474. "400": {
  3475. "description": "Bad request",
  3476. "content": {
  3477. "application/json": {
  3478. "schema": {
  3479. "$ref": "#/components/schemas/BadRequestError"
  3480. }
  3481. }
  3482. }
  3483. }
  3484. },
  3485. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3486. "summary": "Update PTY session",
  3487. "requestBody": {
  3488. "content": {
  3489. "application/json": {
  3490. "schema": {
  3491. "type": "object",
  3492. "properties": {
  3493. "title": {
  3494. "type": "string"
  3495. },
  3496. "size": {
  3497. "type": "object",
  3498. "properties": {
  3499. "rows": {
  3500. "type": "integer",
  3501. "exclusiveMinimum": 0
  3502. },
  3503. "cols": {
  3504. "type": "integer",
  3505. "exclusiveMinimum": 0
  3506. }
  3507. },
  3508. "required": ["rows", "cols"],
  3509. "additionalProperties": false
  3510. }
  3511. },
  3512. "additionalProperties": false
  3513. }
  3514. }
  3515. }
  3516. },
  3517. "x-codeSamples": [
  3518. {
  3519. "lang": "js",
  3520. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3521. }
  3522. ]
  3523. },
  3524. "delete": {
  3525. "tags": ["pty"],
  3526. "operationId": "pty.remove",
  3527. "parameters": [
  3528. {
  3529. "name": "directory",
  3530. "in": "query",
  3531. "required": false,
  3532. "schema": {
  3533. "type": "string"
  3534. }
  3535. },
  3536. {
  3537. "name": "workspace",
  3538. "in": "query",
  3539. "required": false,
  3540. "schema": {
  3541. "type": "string"
  3542. }
  3543. },
  3544. {
  3545. "name": "ptyID",
  3546. "in": "path",
  3547. "schema": {
  3548. "type": "string",
  3549. "pattern": "^pty.*"
  3550. },
  3551. "required": true
  3552. }
  3553. ],
  3554. "responses": {
  3555. "200": {
  3556. "description": "Session removed",
  3557. "content": {
  3558. "application/json": {
  3559. "schema": {
  3560. "type": "boolean",
  3561. "description": "Session removed"
  3562. }
  3563. }
  3564. }
  3565. },
  3566. "404": {
  3567. "description": "NotFoundError",
  3568. "content": {
  3569. "application/json": {
  3570. "schema": {
  3571. "$ref": "#/components/schemas/NotFoundError"
  3572. }
  3573. }
  3574. }
  3575. }
  3576. },
  3577. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3578. "summary": "Remove PTY session",
  3579. "x-codeSamples": [
  3580. {
  3581. "lang": "js",
  3582. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3583. }
  3584. ]
  3585. }
  3586. },
  3587. "/pty/{ptyID}/connect-token": {
  3588. "post": {
  3589. "tags": ["pty"],
  3590. "operationId": "pty.connectToken",
  3591. "parameters": [
  3592. {
  3593. "name": "directory",
  3594. "in": "query",
  3595. "required": false,
  3596. "schema": {
  3597. "type": "string"
  3598. }
  3599. },
  3600. {
  3601. "name": "workspace",
  3602. "in": "query",
  3603. "required": false,
  3604. "schema": {
  3605. "type": "string"
  3606. }
  3607. },
  3608. {
  3609. "name": "ptyID",
  3610. "in": "path",
  3611. "schema": {
  3612. "type": "string",
  3613. "pattern": "^pty.*"
  3614. },
  3615. "required": true
  3616. }
  3617. ],
  3618. "responses": {
  3619. "200": {
  3620. "description": "WebSocket connect token",
  3621. "content": {
  3622. "application/json": {
  3623. "schema": {
  3624. "type": "object",
  3625. "properties": {
  3626. "ticket": {
  3627. "type": "string"
  3628. },
  3629. "expires_in": {
  3630. "type": "integer",
  3631. "exclusiveMinimum": 0
  3632. }
  3633. },
  3634. "required": ["ticket", "expires_in"],
  3635. "additionalProperties": false,
  3636. "description": "WebSocket connect token"
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "403": {
  3642. "description": "Forbidden",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3647. }
  3648. }
  3649. }
  3650. },
  3651. "404": {
  3652. "description": "NotFoundError",
  3653. "content": {
  3654. "application/json": {
  3655. "schema": {
  3656. "$ref": "#/components/schemas/NotFoundError"
  3657. }
  3658. }
  3659. }
  3660. }
  3661. },
  3662. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3663. "summary": "Create PTY WebSocket token",
  3664. "x-codeSamples": [
  3665. {
  3666. "lang": "js",
  3667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3668. }
  3669. ]
  3670. }
  3671. },
  3672. "/question": {
  3673. "get": {
  3674. "tags": ["question"],
  3675. "operationId": "question.list",
  3676. "parameters": [
  3677. {
  3678. "name": "directory",
  3679. "in": "query",
  3680. "required": false,
  3681. "schema": {
  3682. "type": "string"
  3683. }
  3684. },
  3685. {
  3686. "name": "workspace",
  3687. "in": "query",
  3688. "required": false,
  3689. "schema": {
  3690. "type": "string"
  3691. }
  3692. }
  3693. ],
  3694. "responses": {
  3695. "200": {
  3696. "description": "List of pending questions",
  3697. "content": {
  3698. "application/json": {
  3699. "schema": {
  3700. "type": "array",
  3701. "items": {
  3702. "$ref": "#/components/schemas/QuestionRequest"
  3703. },
  3704. "description": "List of pending questions"
  3705. }
  3706. }
  3707. }
  3708. }
  3709. },
  3710. "description": "Get all pending question requests across all sessions.",
  3711. "summary": "List pending questions",
  3712. "x-codeSamples": [
  3713. {
  3714. "lang": "js",
  3715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3716. }
  3717. ]
  3718. }
  3719. },
  3720. "/question/{requestID}/reply": {
  3721. "post": {
  3722. "tags": ["question"],
  3723. "operationId": "question.reply",
  3724. "parameters": [
  3725. {
  3726. "name": "directory",
  3727. "in": "query",
  3728. "required": false,
  3729. "schema": {
  3730. "type": "string"
  3731. }
  3732. },
  3733. {
  3734. "name": "workspace",
  3735. "in": "query",
  3736. "required": false,
  3737. "schema": {
  3738. "type": "string"
  3739. }
  3740. },
  3741. {
  3742. "name": "requestID",
  3743. "in": "path",
  3744. "schema": {
  3745. "type": "string",
  3746. "pattern": "^que.*"
  3747. },
  3748. "required": true
  3749. }
  3750. ],
  3751. "responses": {
  3752. "200": {
  3753. "description": "Question answered successfully",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "type": "boolean",
  3758. "description": "Question answered successfully"
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "400": {
  3764. "description": "Bad request",
  3765. "content": {
  3766. "application/json": {
  3767. "schema": {
  3768. "$ref": "#/components/schemas/BadRequestError"
  3769. }
  3770. }
  3771. }
  3772. },
  3773. "404": {
  3774. "description": "Not found",
  3775. "content": {
  3776. "application/json": {
  3777. "schema": {
  3778. "$ref": "#/components/schemas/NotFoundError"
  3779. }
  3780. }
  3781. }
  3782. }
  3783. },
  3784. "description": "Provide answers to a question request from the AI assistant.",
  3785. "summary": "Reply to question request",
  3786. "requestBody": {
  3787. "content": {
  3788. "application/json": {
  3789. "schema": {
  3790. "type": "object",
  3791. "properties": {
  3792. "answers": {
  3793. "type": "array",
  3794. "items": {
  3795. "$ref": "#/components/schemas/QuestionAnswer"
  3796. },
  3797. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3798. }
  3799. },
  3800. "required": ["answers"],
  3801. "additionalProperties": false
  3802. }
  3803. }
  3804. }
  3805. },
  3806. "x-codeSamples": [
  3807. {
  3808. "lang": "js",
  3809. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3810. }
  3811. ]
  3812. }
  3813. },
  3814. "/question/{requestID}/reject": {
  3815. "post": {
  3816. "tags": ["question"],
  3817. "operationId": "question.reject",
  3818. "parameters": [
  3819. {
  3820. "name": "directory",
  3821. "in": "query",
  3822. "required": false,
  3823. "schema": {
  3824. "type": "string"
  3825. }
  3826. },
  3827. {
  3828. "name": "workspace",
  3829. "in": "query",
  3830. "required": false,
  3831. "schema": {
  3832. "type": "string"
  3833. }
  3834. },
  3835. {
  3836. "name": "requestID",
  3837. "in": "path",
  3838. "schema": {
  3839. "type": "string",
  3840. "pattern": "^que.*"
  3841. },
  3842. "required": true
  3843. }
  3844. ],
  3845. "responses": {
  3846. "200": {
  3847. "description": "Question rejected successfully",
  3848. "content": {
  3849. "application/json": {
  3850. "schema": {
  3851. "type": "boolean",
  3852. "description": "Question rejected successfully"
  3853. }
  3854. }
  3855. }
  3856. },
  3857. "400": {
  3858. "description": "Bad request",
  3859. "content": {
  3860. "application/json": {
  3861. "schema": {
  3862. "$ref": "#/components/schemas/BadRequestError"
  3863. }
  3864. }
  3865. }
  3866. },
  3867. "404": {
  3868. "description": "Not found",
  3869. "content": {
  3870. "application/json": {
  3871. "schema": {
  3872. "$ref": "#/components/schemas/NotFoundError"
  3873. }
  3874. }
  3875. }
  3876. }
  3877. },
  3878. "description": "Reject a question request from the AI assistant.",
  3879. "summary": "Reject question request",
  3880. "x-codeSamples": [
  3881. {
  3882. "lang": "js",
  3883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3884. }
  3885. ]
  3886. }
  3887. },
  3888. "/permission": {
  3889. "get": {
  3890. "tags": ["permission"],
  3891. "operationId": "permission.list",
  3892. "parameters": [
  3893. {
  3894. "name": "directory",
  3895. "in": "query",
  3896. "required": false,
  3897. "schema": {
  3898. "type": "string"
  3899. }
  3900. },
  3901. {
  3902. "name": "workspace",
  3903. "in": "query",
  3904. "required": false,
  3905. "schema": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. ],
  3910. "responses": {
  3911. "200": {
  3912. "description": "List of pending permissions",
  3913. "content": {
  3914. "application/json": {
  3915. "schema": {
  3916. "type": "array",
  3917. "items": {
  3918. "$ref": "#/components/schemas/PermissionRequest"
  3919. },
  3920. "description": "List of pending permissions"
  3921. }
  3922. }
  3923. }
  3924. }
  3925. },
  3926. "description": "Get all pending permission requests across all sessions.",
  3927. "summary": "List pending permissions",
  3928. "x-codeSamples": [
  3929. {
  3930. "lang": "js",
  3931. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3932. }
  3933. ]
  3934. }
  3935. },
  3936. "/permission/{requestID}/reply": {
  3937. "post": {
  3938. "tags": ["permission"],
  3939. "operationId": "permission.reply",
  3940. "parameters": [
  3941. {
  3942. "name": "directory",
  3943. "in": "query",
  3944. "required": false,
  3945. "schema": {
  3946. "type": "string"
  3947. }
  3948. },
  3949. {
  3950. "name": "workspace",
  3951. "in": "query",
  3952. "required": false,
  3953. "schema": {
  3954. "type": "string"
  3955. }
  3956. },
  3957. {
  3958. "name": "requestID",
  3959. "in": "path",
  3960. "schema": {
  3961. "type": "string",
  3962. "pattern": "^per.*"
  3963. },
  3964. "required": true
  3965. }
  3966. ],
  3967. "responses": {
  3968. "200": {
  3969. "description": "Permission processed successfully",
  3970. "content": {
  3971. "application/json": {
  3972. "schema": {
  3973. "type": "boolean",
  3974. "description": "Permission processed successfully"
  3975. }
  3976. }
  3977. }
  3978. },
  3979. "400": {
  3980. "description": "Bad request",
  3981. "content": {
  3982. "application/json": {
  3983. "schema": {
  3984. "$ref": "#/components/schemas/BadRequestError"
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "404": {
  3990. "description": "Not found",
  3991. "content": {
  3992. "application/json": {
  3993. "schema": {
  3994. "$ref": "#/components/schemas/NotFoundError"
  3995. }
  3996. }
  3997. }
  3998. }
  3999. },
  4000. "description": "Approve or deny a permission request from the AI assistant.",
  4001. "summary": "Respond to permission request",
  4002. "requestBody": {
  4003. "content": {
  4004. "application/json": {
  4005. "schema": {
  4006. "type": "object",
  4007. "properties": {
  4008. "reply": {
  4009. "type": "string",
  4010. "enum": ["once", "always", "reject"]
  4011. },
  4012. "message": {
  4013. "type": "string"
  4014. }
  4015. },
  4016. "required": ["reply"],
  4017. "additionalProperties": false
  4018. }
  4019. }
  4020. }
  4021. },
  4022. "x-codeSamples": [
  4023. {
  4024. "lang": "js",
  4025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4026. }
  4027. ]
  4028. }
  4029. },
  4030. "/provider": {
  4031. "get": {
  4032. "tags": ["provider"],
  4033. "operationId": "provider.list",
  4034. "parameters": [
  4035. {
  4036. "name": "directory",
  4037. "in": "query",
  4038. "required": false,
  4039. "schema": {
  4040. "type": "string"
  4041. }
  4042. },
  4043. {
  4044. "name": "workspace",
  4045. "in": "query",
  4046. "required": false,
  4047. "schema": {
  4048. "type": "string"
  4049. }
  4050. }
  4051. ],
  4052. "responses": {
  4053. "200": {
  4054. "description": "List of providers",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "type": "object",
  4059. "properties": {
  4060. "all": {
  4061. "type": "array",
  4062. "items": {
  4063. "$ref": "#/components/schemas/Provider"
  4064. }
  4065. },
  4066. "default": {
  4067. "type": "object",
  4068. "additionalProperties": {
  4069. "type": "string"
  4070. }
  4071. },
  4072. "connected": {
  4073. "type": "array",
  4074. "items": {
  4075. "type": "string"
  4076. }
  4077. }
  4078. },
  4079. "required": ["all", "default", "connected"],
  4080. "additionalProperties": false,
  4081. "description": "List of providers"
  4082. }
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4088. "summary": "List providers",
  4089. "x-codeSamples": [
  4090. {
  4091. "lang": "js",
  4092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4093. }
  4094. ]
  4095. }
  4096. },
  4097. "/provider/auth": {
  4098. "get": {
  4099. "tags": ["provider"],
  4100. "operationId": "provider.auth",
  4101. "parameters": [
  4102. {
  4103. "name": "directory",
  4104. "in": "query",
  4105. "required": false,
  4106. "schema": {
  4107. "type": "string"
  4108. }
  4109. },
  4110. {
  4111. "name": "workspace",
  4112. "in": "query",
  4113. "required": false,
  4114. "schema": {
  4115. "type": "string"
  4116. }
  4117. }
  4118. ],
  4119. "responses": {
  4120. "200": {
  4121. "description": "Provider auth methods",
  4122. "content": {
  4123. "application/json": {
  4124. "schema": {
  4125. "type": "object",
  4126. "additionalProperties": {
  4127. "type": "array",
  4128. "items": {
  4129. "$ref": "#/components/schemas/ProviderAuthMethod"
  4130. }
  4131. },
  4132. "description": "Provider auth methods"
  4133. }
  4134. }
  4135. }
  4136. }
  4137. },
  4138. "description": "Retrieve available authentication methods for all AI providers.",
  4139. "summary": "Get provider auth methods",
  4140. "x-codeSamples": [
  4141. {
  4142. "lang": "js",
  4143. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4144. }
  4145. ]
  4146. }
  4147. },
  4148. "/provider/{providerID}/oauth/authorize": {
  4149. "post": {
  4150. "tags": ["provider"],
  4151. "operationId": "provider.oauth.authorize",
  4152. "parameters": [
  4153. {
  4154. "name": "directory",
  4155. "in": "query",
  4156. "required": false,
  4157. "schema": {
  4158. "type": "string"
  4159. }
  4160. },
  4161. {
  4162. "name": "workspace",
  4163. "in": "query",
  4164. "required": false,
  4165. "schema": {
  4166. "type": "string"
  4167. }
  4168. },
  4169. {
  4170. "name": "providerID",
  4171. "in": "path",
  4172. "schema": {
  4173. "type": "string"
  4174. },
  4175. "required": true
  4176. }
  4177. ],
  4178. "responses": {
  4179. "200": {
  4180. "description": "Authorization URL and method",
  4181. "content": {
  4182. "application/json": {
  4183. "schema": {
  4184. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4185. }
  4186. }
  4187. }
  4188. },
  4189. "400": {
  4190. "description": "Bad request",
  4191. "content": {
  4192. "application/json": {
  4193. "schema": {
  4194. "$ref": "#/components/schemas/BadRequestError"
  4195. }
  4196. }
  4197. }
  4198. }
  4199. },
  4200. "description": "Start the OAuth authorization flow for a provider.",
  4201. "summary": "Start OAuth authorization",
  4202. "requestBody": {
  4203. "content": {
  4204. "application/json": {
  4205. "schema": {
  4206. "type": "object",
  4207. "properties": {
  4208. "method": {
  4209. "type": "number",
  4210. "description": "Auth method index"
  4211. },
  4212. "inputs": {
  4213. "type": "object",
  4214. "additionalProperties": {
  4215. "type": "string"
  4216. }
  4217. }
  4218. },
  4219. "required": ["method"],
  4220. "additionalProperties": false
  4221. }
  4222. }
  4223. }
  4224. },
  4225. "x-codeSamples": [
  4226. {
  4227. "lang": "js",
  4228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4229. }
  4230. ]
  4231. }
  4232. },
  4233. "/provider/{providerID}/oauth/callback": {
  4234. "post": {
  4235. "tags": ["provider"],
  4236. "operationId": "provider.oauth.callback",
  4237. "parameters": [
  4238. {
  4239. "name": "directory",
  4240. "in": "query",
  4241. "required": false,
  4242. "schema": {
  4243. "type": "string"
  4244. }
  4245. },
  4246. {
  4247. "name": "workspace",
  4248. "in": "query",
  4249. "required": false,
  4250. "schema": {
  4251. "type": "string"
  4252. }
  4253. },
  4254. {
  4255. "name": "providerID",
  4256. "in": "path",
  4257. "schema": {
  4258. "type": "string"
  4259. },
  4260. "required": true
  4261. }
  4262. ],
  4263. "responses": {
  4264. "200": {
  4265. "description": "OAuth callback processed successfully",
  4266. "content": {
  4267. "application/json": {
  4268. "schema": {
  4269. "type": "boolean",
  4270. "description": "OAuth callback processed successfully"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "Bad request",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "$ref": "#/components/schemas/BadRequestError"
  4281. }
  4282. }
  4283. }
  4284. }
  4285. },
  4286. "description": "Handle the OAuth callback from a provider after user authorization.",
  4287. "summary": "Handle OAuth callback",
  4288. "requestBody": {
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "type": "object",
  4293. "properties": {
  4294. "method": {
  4295. "type": "number",
  4296. "description": "Auth method index"
  4297. },
  4298. "code": {
  4299. "type": "string"
  4300. }
  4301. },
  4302. "required": ["method"],
  4303. "additionalProperties": false
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "x-codeSamples": [
  4309. {
  4310. "lang": "js",
  4311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4312. }
  4313. ]
  4314. }
  4315. },
  4316. "/session": {
  4317. "get": {
  4318. "tags": ["session"],
  4319. "operationId": "session.list",
  4320. "parameters": [
  4321. {
  4322. "name": "directory",
  4323. "in": "query",
  4324. "required": false,
  4325. "schema": {
  4326. "type": "string"
  4327. }
  4328. },
  4329. {
  4330. "name": "workspace",
  4331. "in": "query",
  4332. "required": false,
  4333. "schema": {
  4334. "type": "string"
  4335. }
  4336. },
  4337. {
  4338. "name": "scope",
  4339. "in": "query",
  4340. "schema": {
  4341. "type": "string",
  4342. "enum": ["project"]
  4343. },
  4344. "required": false
  4345. },
  4346. {
  4347. "name": "path",
  4348. "in": "query",
  4349. "schema": {
  4350. "type": "string"
  4351. },
  4352. "required": false
  4353. },
  4354. {
  4355. "name": "roots",
  4356. "in": "query",
  4357. "schema": {
  4358. "anyOf": [
  4359. {
  4360. "type": "boolean"
  4361. },
  4362. {
  4363. "type": "string",
  4364. "enum": ["true", "false"]
  4365. }
  4366. ]
  4367. },
  4368. "required": false
  4369. },
  4370. {
  4371. "name": "start",
  4372. "in": "query",
  4373. "schema": {
  4374. "type": "number"
  4375. },
  4376. "required": false
  4377. },
  4378. {
  4379. "name": "search",
  4380. "in": "query",
  4381. "schema": {
  4382. "type": "string"
  4383. },
  4384. "required": false
  4385. },
  4386. {
  4387. "name": "limit",
  4388. "in": "query",
  4389. "schema": {
  4390. "type": "number"
  4391. },
  4392. "required": false
  4393. }
  4394. ],
  4395. "responses": {
  4396. "200": {
  4397. "description": "List of sessions",
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "array",
  4402. "items": {
  4403. "$ref": "#/components/schemas/Session"
  4404. },
  4405. "description": "List of sessions"
  4406. }
  4407. }
  4408. }
  4409. }
  4410. },
  4411. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4412. "summary": "List sessions",
  4413. "x-codeSamples": [
  4414. {
  4415. "lang": "js",
  4416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4417. }
  4418. ]
  4419. },
  4420. "post": {
  4421. "tags": ["session"],
  4422. "operationId": "session.create",
  4423. "parameters": [
  4424. {
  4425. "name": "directory",
  4426. "in": "query",
  4427. "required": false,
  4428. "schema": {
  4429. "type": "string"
  4430. }
  4431. },
  4432. {
  4433. "name": "workspace",
  4434. "in": "query",
  4435. "required": false,
  4436. "schema": {
  4437. "type": "string"
  4438. }
  4439. }
  4440. ],
  4441. "responses": {
  4442. "200": {
  4443. "description": "Successfully created session",
  4444. "content": {
  4445. "application/json": {
  4446. "schema": {
  4447. "$ref": "#/components/schemas/Session"
  4448. }
  4449. }
  4450. }
  4451. },
  4452. "400": {
  4453. "description": "Bad request",
  4454. "content": {
  4455. "application/json": {
  4456. "schema": {
  4457. "$ref": "#/components/schemas/BadRequestError"
  4458. }
  4459. }
  4460. }
  4461. }
  4462. },
  4463. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4464. "summary": "Create session",
  4465. "requestBody": {
  4466. "content": {
  4467. "application/json": {
  4468. "schema": {
  4469. "type": "object",
  4470. "properties": {
  4471. "parentID": {
  4472. "type": "string"
  4473. },
  4474. "title": {
  4475. "type": "string"
  4476. },
  4477. "agent": {
  4478. "type": "string"
  4479. },
  4480. "model": {
  4481. "type": "object",
  4482. "properties": {
  4483. "id": {
  4484. "type": "string"
  4485. },
  4486. "providerID": {
  4487. "type": "string"
  4488. },
  4489. "variant": {
  4490. "type": "string"
  4491. }
  4492. },
  4493. "required": ["id", "providerID"],
  4494. "additionalProperties": false
  4495. },
  4496. "permission": {
  4497. "$ref": "#/components/schemas/PermissionRuleset"
  4498. },
  4499. "workspaceID": {
  4500. "type": "string"
  4501. }
  4502. },
  4503. "additionalProperties": false
  4504. }
  4505. }
  4506. }
  4507. },
  4508. "x-codeSamples": [
  4509. {
  4510. "lang": "js",
  4511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4512. }
  4513. ]
  4514. }
  4515. },
  4516. "/session/status": {
  4517. "get": {
  4518. "tags": ["session"],
  4519. "operationId": "session.status",
  4520. "parameters": [
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "required": false,
  4525. "schema": {
  4526. "type": "string"
  4527. }
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "required": false,
  4533. "schema": {
  4534. "type": "string"
  4535. }
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "Get session status",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "additionalProperties": {
  4546. "$ref": "#/components/schemas/SessionStatus"
  4547. },
  4548. "description": "Get session status"
  4549. }
  4550. }
  4551. }
  4552. },
  4553. "400": {
  4554. "description": "Bad request",
  4555. "content": {
  4556. "application/json": {
  4557. "schema": {
  4558. "$ref": "#/components/schemas/BadRequestError"
  4559. }
  4560. }
  4561. }
  4562. }
  4563. },
  4564. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4565. "summary": "Get session status",
  4566. "x-codeSamples": [
  4567. {
  4568. "lang": "js",
  4569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4570. }
  4571. ]
  4572. }
  4573. },
  4574. "/session/{sessionID}": {
  4575. "get": {
  4576. "tags": ["session"],
  4577. "operationId": "session.get",
  4578. "parameters": [
  4579. {
  4580. "name": "directory",
  4581. "in": "query",
  4582. "required": false,
  4583. "schema": {
  4584. "type": "string"
  4585. }
  4586. },
  4587. {
  4588. "name": "workspace",
  4589. "in": "query",
  4590. "required": false,
  4591. "schema": {
  4592. "type": "string"
  4593. }
  4594. },
  4595. {
  4596. "name": "sessionID",
  4597. "in": "path",
  4598. "schema": {
  4599. "type": "string",
  4600. "pattern": "^ses.*"
  4601. },
  4602. "required": true
  4603. }
  4604. ],
  4605. "responses": {
  4606. "200": {
  4607. "description": "Get session",
  4608. "content": {
  4609. "application/json": {
  4610. "schema": {
  4611. "$ref": "#/components/schemas/Session"
  4612. }
  4613. }
  4614. }
  4615. },
  4616. "400": {
  4617. "description": "Bad request",
  4618. "content": {
  4619. "application/json": {
  4620. "schema": {
  4621. "$ref": "#/components/schemas/BadRequestError"
  4622. }
  4623. }
  4624. }
  4625. },
  4626. "404": {
  4627. "description": "NotFoundError",
  4628. "content": {
  4629. "application/json": {
  4630. "schema": {
  4631. "$ref": "#/components/schemas/NotFoundError"
  4632. }
  4633. }
  4634. }
  4635. }
  4636. },
  4637. "description": "Retrieve detailed information about a specific OpenCode session.",
  4638. "summary": "Get session",
  4639. "x-codeSamples": [
  4640. {
  4641. "lang": "js",
  4642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4643. }
  4644. ]
  4645. },
  4646. "delete": {
  4647. "tags": ["session"],
  4648. "operationId": "session.delete",
  4649. "parameters": [
  4650. {
  4651. "name": "directory",
  4652. "in": "query",
  4653. "required": false,
  4654. "schema": {
  4655. "type": "string"
  4656. }
  4657. },
  4658. {
  4659. "name": "workspace",
  4660. "in": "query",
  4661. "required": false,
  4662. "schema": {
  4663. "type": "string"
  4664. }
  4665. },
  4666. {
  4667. "name": "sessionID",
  4668. "in": "path",
  4669. "schema": {
  4670. "type": "string",
  4671. "pattern": "^ses.*"
  4672. },
  4673. "required": true
  4674. }
  4675. ],
  4676. "responses": {
  4677. "200": {
  4678. "description": "Successfully deleted session",
  4679. "content": {
  4680. "application/json": {
  4681. "schema": {
  4682. "type": "boolean",
  4683. "description": "Successfully deleted session"
  4684. }
  4685. }
  4686. }
  4687. },
  4688. "400": {
  4689. "description": "Bad request",
  4690. "content": {
  4691. "application/json": {
  4692. "schema": {
  4693. "$ref": "#/components/schemas/BadRequestError"
  4694. }
  4695. }
  4696. }
  4697. },
  4698. "404": {
  4699. "description": "NotFoundError",
  4700. "content": {
  4701. "application/json": {
  4702. "schema": {
  4703. "$ref": "#/components/schemas/NotFoundError"
  4704. }
  4705. }
  4706. }
  4707. }
  4708. },
  4709. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4710. "summary": "Delete session",
  4711. "x-codeSamples": [
  4712. {
  4713. "lang": "js",
  4714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4715. }
  4716. ]
  4717. },
  4718. "patch": {
  4719. "tags": ["session"],
  4720. "operationId": "session.update",
  4721. "parameters": [
  4722. {
  4723. "name": "directory",
  4724. "in": "query",
  4725. "required": false,
  4726. "schema": {
  4727. "type": "string"
  4728. }
  4729. },
  4730. {
  4731. "name": "workspace",
  4732. "in": "query",
  4733. "required": false,
  4734. "schema": {
  4735. "type": "string"
  4736. }
  4737. },
  4738. {
  4739. "name": "sessionID",
  4740. "in": "path",
  4741. "schema": {
  4742. "type": "string",
  4743. "pattern": "^ses.*"
  4744. },
  4745. "required": true
  4746. }
  4747. ],
  4748. "responses": {
  4749. "200": {
  4750. "description": "Successfully updated session",
  4751. "content": {
  4752. "application/json": {
  4753. "schema": {
  4754. "$ref": "#/components/schemas/Session"
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "400": {
  4760. "description": "Bad request",
  4761. "content": {
  4762. "application/json": {
  4763. "schema": {
  4764. "$ref": "#/components/schemas/BadRequestError"
  4765. }
  4766. }
  4767. }
  4768. },
  4769. "404": {
  4770. "description": "NotFoundError",
  4771. "content": {
  4772. "application/json": {
  4773. "schema": {
  4774. "$ref": "#/components/schemas/NotFoundError"
  4775. }
  4776. }
  4777. }
  4778. }
  4779. },
  4780. "description": "Update properties of an existing session, such as title or other metadata.",
  4781. "summary": "Update session",
  4782. "requestBody": {
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "type": "object",
  4787. "properties": {
  4788. "title": {
  4789. "type": "string"
  4790. },
  4791. "permission": {
  4792. "$ref": "#/components/schemas/PermissionRuleset"
  4793. },
  4794. "time": {
  4795. "type": "object",
  4796. "properties": {
  4797. "archived": {
  4798. "type": "number"
  4799. }
  4800. },
  4801. "additionalProperties": false
  4802. }
  4803. },
  4804. "additionalProperties": false
  4805. }
  4806. }
  4807. }
  4808. },
  4809. "x-codeSamples": [
  4810. {
  4811. "lang": "js",
  4812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4813. }
  4814. ]
  4815. }
  4816. },
  4817. "/session/{sessionID}/children": {
  4818. "get": {
  4819. "tags": ["session"],
  4820. "operationId": "session.children",
  4821. "parameters": [
  4822. {
  4823. "name": "directory",
  4824. "in": "query",
  4825. "required": false,
  4826. "schema": {
  4827. "type": "string"
  4828. }
  4829. },
  4830. {
  4831. "name": "workspace",
  4832. "in": "query",
  4833. "required": false,
  4834. "schema": {
  4835. "type": "string"
  4836. }
  4837. },
  4838. {
  4839. "name": "sessionID",
  4840. "in": "path",
  4841. "schema": {
  4842. "type": "string",
  4843. "pattern": "^ses.*"
  4844. },
  4845. "required": true
  4846. }
  4847. ],
  4848. "responses": {
  4849. "200": {
  4850. "description": "List of children",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "type": "array",
  4855. "items": {
  4856. "$ref": "#/components/schemas/Session"
  4857. },
  4858. "description": "List of children"
  4859. }
  4860. }
  4861. }
  4862. },
  4863. "400": {
  4864. "description": "Bad request",
  4865. "content": {
  4866. "application/json": {
  4867. "schema": {
  4868. "$ref": "#/components/schemas/BadRequestError"
  4869. }
  4870. }
  4871. }
  4872. },
  4873. "404": {
  4874. "description": "Not found",
  4875. "content": {
  4876. "application/json": {
  4877. "schema": {
  4878. "$ref": "#/components/schemas/NotFoundError"
  4879. }
  4880. }
  4881. }
  4882. }
  4883. },
  4884. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4885. "summary": "Get session children",
  4886. "x-codeSamples": [
  4887. {
  4888. "lang": "js",
  4889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4890. }
  4891. ]
  4892. }
  4893. },
  4894. "/session/{sessionID}/todo": {
  4895. "get": {
  4896. "tags": ["session"],
  4897. "operationId": "session.todo",
  4898. "parameters": [
  4899. {
  4900. "name": "directory",
  4901. "in": "query",
  4902. "required": false,
  4903. "schema": {
  4904. "type": "string"
  4905. }
  4906. },
  4907. {
  4908. "name": "workspace",
  4909. "in": "query",
  4910. "required": false,
  4911. "schema": {
  4912. "type": "string"
  4913. }
  4914. },
  4915. {
  4916. "name": "sessionID",
  4917. "in": "path",
  4918. "schema": {
  4919. "type": "string",
  4920. "pattern": "^ses.*"
  4921. },
  4922. "required": true
  4923. }
  4924. ],
  4925. "responses": {
  4926. "200": {
  4927. "description": "Todo list",
  4928. "content": {
  4929. "application/json": {
  4930. "schema": {
  4931. "type": "array",
  4932. "items": {
  4933. "$ref": "#/components/schemas/Todo"
  4934. },
  4935. "description": "Todo list"
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "400": {
  4941. "description": "Bad request",
  4942. "content": {
  4943. "application/json": {
  4944. "schema": {
  4945. "$ref": "#/components/schemas/BadRequestError"
  4946. }
  4947. }
  4948. }
  4949. },
  4950. "404": {
  4951. "description": "Not found",
  4952. "content": {
  4953. "application/json": {
  4954. "schema": {
  4955. "$ref": "#/components/schemas/NotFoundError"
  4956. }
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4962. "summary": "Get session todos",
  4963. "x-codeSamples": [
  4964. {
  4965. "lang": "js",
  4966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4967. }
  4968. ]
  4969. }
  4970. },
  4971. "/session/{sessionID}/diff": {
  4972. "get": {
  4973. "tags": ["session"],
  4974. "operationId": "session.diff",
  4975. "parameters": [
  4976. {
  4977. "name": "directory",
  4978. "in": "query",
  4979. "required": false,
  4980. "schema": {
  4981. "type": "string"
  4982. }
  4983. },
  4984. {
  4985. "name": "workspace",
  4986. "in": "query",
  4987. "required": false,
  4988. "schema": {
  4989. "type": "string"
  4990. }
  4991. },
  4992. {
  4993. "name": "sessionID",
  4994. "in": "path",
  4995. "schema": {
  4996. "type": "string",
  4997. "pattern": "^ses.*"
  4998. },
  4999. "required": true
  5000. },
  5001. {
  5002. "name": "messageID",
  5003. "in": "query",
  5004. "schema": {
  5005. "type": "string",
  5006. "pattern": "^msg.*"
  5007. },
  5008. "required": false
  5009. }
  5010. ],
  5011. "responses": {
  5012. "200": {
  5013. "description": "Successfully retrieved diff",
  5014. "content": {
  5015. "application/json": {
  5016. "schema": {
  5017. "type": "array",
  5018. "items": {
  5019. "$ref": "#/components/schemas/SnapshotFileDiff"
  5020. },
  5021. "description": "Successfully retrieved diff"
  5022. }
  5023. }
  5024. }
  5025. }
  5026. },
  5027. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5028. "summary": "Get message diff",
  5029. "x-codeSamples": [
  5030. {
  5031. "lang": "js",
  5032. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5033. }
  5034. ]
  5035. }
  5036. },
  5037. "/session/{sessionID}/message": {
  5038. "get": {
  5039. "tags": ["session"],
  5040. "operationId": "session.messages",
  5041. "parameters": [
  5042. {
  5043. "name": "directory",
  5044. "in": "query",
  5045. "required": false,
  5046. "schema": {
  5047. "type": "string"
  5048. }
  5049. },
  5050. {
  5051. "name": "workspace",
  5052. "in": "query",
  5053. "required": false,
  5054. "schema": {
  5055. "type": "string"
  5056. }
  5057. },
  5058. {
  5059. "name": "sessionID",
  5060. "in": "path",
  5061. "schema": {
  5062. "type": "string",
  5063. "pattern": "^ses.*"
  5064. },
  5065. "required": true
  5066. },
  5067. {
  5068. "name": "limit",
  5069. "in": "query",
  5070. "schema": {
  5071. "type": "integer",
  5072. "minimum": 0,
  5073. "maximum": 9007199254740991
  5074. },
  5075. "required": false
  5076. },
  5077. {
  5078. "name": "before",
  5079. "in": "query",
  5080. "schema": {
  5081. "type": "string"
  5082. },
  5083. "required": false
  5084. }
  5085. ],
  5086. "responses": {
  5087. "200": {
  5088. "description": "List of messages",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "type": "array",
  5093. "items": {
  5094. "type": "object",
  5095. "properties": {
  5096. "info": {
  5097. "$ref": "#/components/schemas/Message"
  5098. },
  5099. "parts": {
  5100. "type": "array",
  5101. "items": {
  5102. "$ref": "#/components/schemas/Part"
  5103. }
  5104. }
  5105. },
  5106. "required": ["info", "parts"],
  5107. "additionalProperties": false
  5108. },
  5109. "description": "List of messages"
  5110. }
  5111. }
  5112. }
  5113. },
  5114. "400": {
  5115. "description": "Bad request",
  5116. "content": {
  5117. "application/json": {
  5118. "schema": {
  5119. "$ref": "#/components/schemas/BadRequestError"
  5120. }
  5121. }
  5122. }
  5123. },
  5124. "404": {
  5125. "description": "NotFoundError",
  5126. "content": {
  5127. "application/json": {
  5128. "schema": {
  5129. "$ref": "#/components/schemas/NotFoundError"
  5130. }
  5131. }
  5132. }
  5133. }
  5134. },
  5135. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5136. "summary": "Get session messages",
  5137. "x-codeSamples": [
  5138. {
  5139. "lang": "js",
  5140. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5141. }
  5142. ]
  5143. },
  5144. "post": {
  5145. "tags": ["session"],
  5146. "operationId": "session.prompt",
  5147. "parameters": [
  5148. {
  5149. "name": "directory",
  5150. "in": "query",
  5151. "required": false,
  5152. "schema": {
  5153. "type": "string"
  5154. }
  5155. },
  5156. {
  5157. "name": "workspace",
  5158. "in": "query",
  5159. "required": false,
  5160. "schema": {
  5161. "type": "string"
  5162. }
  5163. },
  5164. {
  5165. "name": "sessionID",
  5166. "in": "path",
  5167. "schema": {
  5168. "type": "string",
  5169. "pattern": "^ses.*"
  5170. },
  5171. "required": true
  5172. }
  5173. ],
  5174. "responses": {
  5175. "200": {
  5176. "description": "Created message",
  5177. "content": {
  5178. "application/json": {
  5179. "schema": {
  5180. "type": "object",
  5181. "required": ["info", "parts"],
  5182. "properties": {
  5183. "info": {
  5184. "$ref": "#/components/schemas/AssistantMessage"
  5185. },
  5186. "parts": {
  5187. "type": "array",
  5188. "items": {
  5189. "$ref": "#/components/schemas/Part"
  5190. }
  5191. }
  5192. }
  5193. }
  5194. }
  5195. }
  5196. },
  5197. "400": {
  5198. "description": "Bad request",
  5199. "content": {
  5200. "application/json": {
  5201. "schema": {
  5202. "$ref": "#/components/schemas/BadRequestError"
  5203. }
  5204. }
  5205. }
  5206. },
  5207. "404": {
  5208. "description": "Not found",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "$ref": "#/components/schemas/NotFoundError"
  5213. }
  5214. }
  5215. }
  5216. }
  5217. },
  5218. "description": "Create and send a new message to a session, streaming the AI response.",
  5219. "summary": "Send message",
  5220. "requestBody": {
  5221. "content": {
  5222. "application/json": {
  5223. "schema": {
  5224. "type": "object",
  5225. "properties": {
  5226. "messageID": {
  5227. "type": "string"
  5228. },
  5229. "model": {
  5230. "type": "object",
  5231. "properties": {
  5232. "providerID": {
  5233. "type": "string"
  5234. },
  5235. "modelID": {
  5236. "type": "string"
  5237. }
  5238. },
  5239. "required": ["providerID", "modelID"],
  5240. "additionalProperties": false
  5241. },
  5242. "agent": {
  5243. "type": "string"
  5244. },
  5245. "noReply": {
  5246. "type": "boolean"
  5247. },
  5248. "tools": {
  5249. "type": "object",
  5250. "additionalProperties": {
  5251. "type": "boolean"
  5252. }
  5253. },
  5254. "format": {
  5255. "$ref": "#/components/schemas/OutputFormat"
  5256. },
  5257. "system": {
  5258. "type": "string"
  5259. },
  5260. "variant": {
  5261. "type": "string"
  5262. },
  5263. "parts": {
  5264. "type": "array",
  5265. "items": {
  5266. "anyOf": [
  5267. {
  5268. "$ref": "#/components/schemas/TextPartInput"
  5269. },
  5270. {
  5271. "$ref": "#/components/schemas/FilePartInput"
  5272. },
  5273. {
  5274. "$ref": "#/components/schemas/AgentPartInput"
  5275. },
  5276. {
  5277. "$ref": "#/components/schemas/SubtaskPartInput"
  5278. }
  5279. ]
  5280. }
  5281. }
  5282. },
  5283. "required": ["parts"],
  5284. "additionalProperties": false
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "x-codeSamples": [
  5290. {
  5291. "lang": "js",
  5292. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5293. }
  5294. ]
  5295. }
  5296. },
  5297. "/session/{sessionID}/message/{messageID}": {
  5298. "get": {
  5299. "tags": ["session"],
  5300. "operationId": "session.message",
  5301. "parameters": [
  5302. {
  5303. "name": "directory",
  5304. "in": "query",
  5305. "required": false,
  5306. "schema": {
  5307. "type": "string"
  5308. }
  5309. },
  5310. {
  5311. "name": "workspace",
  5312. "in": "query",
  5313. "required": false,
  5314. "schema": {
  5315. "type": "string"
  5316. }
  5317. },
  5318. {
  5319. "name": "sessionID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string",
  5323. "pattern": "^ses.*"
  5324. },
  5325. "required": true
  5326. },
  5327. {
  5328. "name": "messageID",
  5329. "in": "path",
  5330. "schema": {
  5331. "type": "string",
  5332. "pattern": "^msg.*"
  5333. },
  5334. "required": true
  5335. }
  5336. ],
  5337. "responses": {
  5338. "200": {
  5339. "description": "Message",
  5340. "content": {
  5341. "application/json": {
  5342. "schema": {
  5343. "type": "object",
  5344. "properties": {
  5345. "info": {
  5346. "$ref": "#/components/schemas/Message"
  5347. },
  5348. "parts": {
  5349. "type": "array",
  5350. "items": {
  5351. "$ref": "#/components/schemas/Part"
  5352. }
  5353. }
  5354. },
  5355. "required": ["info", "parts"],
  5356. "additionalProperties": false,
  5357. "description": "Message"
  5358. }
  5359. }
  5360. }
  5361. },
  5362. "400": {
  5363. "description": "Bad request",
  5364. "content": {
  5365. "application/json": {
  5366. "schema": {
  5367. "$ref": "#/components/schemas/BadRequestError"
  5368. }
  5369. }
  5370. }
  5371. },
  5372. "404": {
  5373. "description": "NotFoundError",
  5374. "content": {
  5375. "application/json": {
  5376. "schema": {
  5377. "$ref": "#/components/schemas/NotFoundError"
  5378. }
  5379. }
  5380. }
  5381. }
  5382. },
  5383. "description": "Retrieve a specific message from a session by its message ID.",
  5384. "summary": "Get message",
  5385. "x-codeSamples": [
  5386. {
  5387. "lang": "js",
  5388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5389. }
  5390. ]
  5391. },
  5392. "delete": {
  5393. "tags": ["session"],
  5394. "operationId": "session.deleteMessage",
  5395. "parameters": [
  5396. {
  5397. "name": "directory",
  5398. "in": "query",
  5399. "required": false,
  5400. "schema": {
  5401. "type": "string"
  5402. }
  5403. },
  5404. {
  5405. "name": "workspace",
  5406. "in": "query",
  5407. "required": false,
  5408. "schema": {
  5409. "type": "string"
  5410. }
  5411. },
  5412. {
  5413. "name": "sessionID",
  5414. "in": "path",
  5415. "schema": {
  5416. "type": "string",
  5417. "pattern": "^ses.*"
  5418. },
  5419. "required": true
  5420. },
  5421. {
  5422. "name": "messageID",
  5423. "in": "path",
  5424. "schema": {
  5425. "type": "string",
  5426. "pattern": "^msg.*"
  5427. },
  5428. "required": true
  5429. }
  5430. ],
  5431. "responses": {
  5432. "200": {
  5433. "description": "Successfully deleted message",
  5434. "content": {
  5435. "application/json": {
  5436. "schema": {
  5437. "type": "boolean",
  5438. "description": "Successfully deleted message"
  5439. }
  5440. }
  5441. }
  5442. },
  5443. "400": {
  5444. "description": "Bad request",
  5445. "content": {
  5446. "application/json": {
  5447. "schema": {
  5448. "$ref": "#/components/schemas/BadRequestError"
  5449. }
  5450. }
  5451. }
  5452. },
  5453. "404": {
  5454. "description": "Not found",
  5455. "content": {
  5456. "application/json": {
  5457. "schema": {
  5458. "$ref": "#/components/schemas/NotFoundError"
  5459. }
  5460. }
  5461. }
  5462. }
  5463. },
  5464. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5465. "summary": "Delete message",
  5466. "x-codeSamples": [
  5467. {
  5468. "lang": "js",
  5469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5470. }
  5471. ]
  5472. }
  5473. },
  5474. "/session/{sessionID}/fork": {
  5475. "post": {
  5476. "tags": ["session"],
  5477. "operationId": "session.fork",
  5478. "parameters": [
  5479. {
  5480. "name": "directory",
  5481. "in": "query",
  5482. "required": false,
  5483. "schema": {
  5484. "type": "string"
  5485. }
  5486. },
  5487. {
  5488. "name": "workspace",
  5489. "in": "query",
  5490. "required": false,
  5491. "schema": {
  5492. "type": "string"
  5493. }
  5494. },
  5495. {
  5496. "name": "sessionID",
  5497. "in": "path",
  5498. "schema": {
  5499. "type": "string",
  5500. "pattern": "^ses.*"
  5501. },
  5502. "required": true
  5503. }
  5504. ],
  5505. "responses": {
  5506. "200": {
  5507. "description": "200",
  5508. "content": {
  5509. "application/json": {
  5510. "schema": {
  5511. "$ref": "#/components/schemas/Session"
  5512. }
  5513. }
  5514. }
  5515. },
  5516. "404": {
  5517. "description": "NotFoundError",
  5518. "content": {
  5519. "application/json": {
  5520. "schema": {
  5521. "$ref": "#/components/schemas/NotFoundError"
  5522. }
  5523. }
  5524. }
  5525. }
  5526. },
  5527. "description": "Create a new session by forking an existing session at a specific message point.",
  5528. "summary": "Fork session",
  5529. "requestBody": {
  5530. "content": {
  5531. "application/json": {
  5532. "schema": {
  5533. "type": "object",
  5534. "properties": {
  5535. "messageID": {
  5536. "type": "string"
  5537. }
  5538. },
  5539. "additionalProperties": false
  5540. }
  5541. }
  5542. }
  5543. },
  5544. "x-codeSamples": [
  5545. {
  5546. "lang": "js",
  5547. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5548. }
  5549. ]
  5550. }
  5551. },
  5552. "/session/{sessionID}/abort": {
  5553. "post": {
  5554. "tags": ["session"],
  5555. "operationId": "session.abort",
  5556. "parameters": [
  5557. {
  5558. "name": "directory",
  5559. "in": "query",
  5560. "required": false,
  5561. "schema": {
  5562. "type": "string"
  5563. }
  5564. },
  5565. {
  5566. "name": "workspace",
  5567. "in": "query",
  5568. "required": false,
  5569. "schema": {
  5570. "type": "string"
  5571. }
  5572. },
  5573. {
  5574. "name": "sessionID",
  5575. "in": "path",
  5576. "schema": {
  5577. "type": "string",
  5578. "pattern": "^ses.*"
  5579. },
  5580. "required": true
  5581. }
  5582. ],
  5583. "responses": {
  5584. "200": {
  5585. "description": "Aborted session",
  5586. "content": {
  5587. "application/json": {
  5588. "schema": {
  5589. "type": "boolean",
  5590. "description": "Aborted session"
  5591. }
  5592. }
  5593. }
  5594. },
  5595. "400": {
  5596. "description": "Bad request",
  5597. "content": {
  5598. "application/json": {
  5599. "schema": {
  5600. "$ref": "#/components/schemas/BadRequestError"
  5601. }
  5602. }
  5603. }
  5604. },
  5605. "404": {
  5606. "description": "Not found",
  5607. "content": {
  5608. "application/json": {
  5609. "schema": {
  5610. "$ref": "#/components/schemas/NotFoundError"
  5611. }
  5612. }
  5613. }
  5614. }
  5615. },
  5616. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5617. "summary": "Abort session",
  5618. "x-codeSamples": [
  5619. {
  5620. "lang": "js",
  5621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5622. }
  5623. ]
  5624. }
  5625. },
  5626. "/session/{sessionID}/init": {
  5627. "post": {
  5628. "tags": ["session"],
  5629. "operationId": "session.init",
  5630. "parameters": [
  5631. {
  5632. "name": "directory",
  5633. "in": "query",
  5634. "required": false,
  5635. "schema": {
  5636. "type": "string"
  5637. }
  5638. },
  5639. {
  5640. "name": "workspace",
  5641. "in": "query",
  5642. "required": false,
  5643. "schema": {
  5644. "type": "string"
  5645. }
  5646. },
  5647. {
  5648. "name": "sessionID",
  5649. "in": "path",
  5650. "schema": {
  5651. "type": "string",
  5652. "pattern": "^ses.*"
  5653. },
  5654. "required": true
  5655. }
  5656. ],
  5657. "responses": {
  5658. "200": {
  5659. "description": "200",
  5660. "content": {
  5661. "application/json": {
  5662. "schema": {
  5663. "type": "boolean",
  5664. "description": "200"
  5665. }
  5666. }
  5667. }
  5668. },
  5669. "400": {
  5670. "description": "Bad request",
  5671. "content": {
  5672. "application/json": {
  5673. "schema": {
  5674. "$ref": "#/components/schemas/BadRequestError"
  5675. }
  5676. }
  5677. }
  5678. },
  5679. "404": {
  5680. "description": "Not found",
  5681. "content": {
  5682. "application/json": {
  5683. "schema": {
  5684. "$ref": "#/components/schemas/NotFoundError"
  5685. }
  5686. }
  5687. }
  5688. }
  5689. },
  5690. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5691. "summary": "Initialize session",
  5692. "requestBody": {
  5693. "content": {
  5694. "application/json": {
  5695. "schema": {
  5696. "type": "object",
  5697. "properties": {
  5698. "modelID": {
  5699. "type": "string"
  5700. },
  5701. "providerID": {
  5702. "type": "string"
  5703. },
  5704. "messageID": {
  5705. "type": "string"
  5706. }
  5707. },
  5708. "required": ["modelID", "providerID", "messageID"],
  5709. "additionalProperties": false
  5710. }
  5711. }
  5712. }
  5713. },
  5714. "x-codeSamples": [
  5715. {
  5716. "lang": "js",
  5717. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5718. }
  5719. ]
  5720. }
  5721. },
  5722. "/session/{sessionID}/share": {
  5723. "post": {
  5724. "tags": ["session"],
  5725. "operationId": "session.share",
  5726. "parameters": [
  5727. {
  5728. "name": "directory",
  5729. "in": "query",
  5730. "required": false,
  5731. "schema": {
  5732. "type": "string"
  5733. }
  5734. },
  5735. {
  5736. "name": "workspace",
  5737. "in": "query",
  5738. "required": false,
  5739. "schema": {
  5740. "type": "string"
  5741. }
  5742. },
  5743. {
  5744. "name": "sessionID",
  5745. "in": "path",
  5746. "schema": {
  5747. "type": "string",
  5748. "pattern": "^ses.*"
  5749. },
  5750. "required": true
  5751. }
  5752. ],
  5753. "responses": {
  5754. "200": {
  5755. "description": "Successfully shared session",
  5756. "content": {
  5757. "application/json": {
  5758. "schema": {
  5759. "$ref": "#/components/schemas/Session"
  5760. }
  5761. }
  5762. }
  5763. },
  5764. "400": {
  5765. "description": "Bad request",
  5766. "content": {
  5767. "application/json": {
  5768. "schema": {
  5769. "$ref": "#/components/schemas/BadRequestError"
  5770. }
  5771. }
  5772. }
  5773. },
  5774. "404": {
  5775. "description": "NotFoundError",
  5776. "content": {
  5777. "application/json": {
  5778. "schema": {
  5779. "$ref": "#/components/schemas/NotFoundError"
  5780. }
  5781. }
  5782. }
  5783. }
  5784. },
  5785. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5786. "summary": "Share session",
  5787. "x-codeSamples": [
  5788. {
  5789. "lang": "js",
  5790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5791. }
  5792. ]
  5793. },
  5794. "delete": {
  5795. "tags": ["session"],
  5796. "operationId": "session.unshare",
  5797. "parameters": [
  5798. {
  5799. "name": "directory",
  5800. "in": "query",
  5801. "required": false,
  5802. "schema": {
  5803. "type": "string"
  5804. }
  5805. },
  5806. {
  5807. "name": "workspace",
  5808. "in": "query",
  5809. "required": false,
  5810. "schema": {
  5811. "type": "string"
  5812. }
  5813. },
  5814. {
  5815. "name": "sessionID",
  5816. "in": "path",
  5817. "schema": {
  5818. "type": "string",
  5819. "pattern": "^ses.*"
  5820. },
  5821. "required": true
  5822. }
  5823. ],
  5824. "responses": {
  5825. "200": {
  5826. "description": "Successfully unshared session",
  5827. "content": {
  5828. "application/json": {
  5829. "schema": {
  5830. "$ref": "#/components/schemas/Session"
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "400": {
  5836. "description": "Bad request",
  5837. "content": {
  5838. "application/json": {
  5839. "schema": {
  5840. "$ref": "#/components/schemas/BadRequestError"
  5841. }
  5842. }
  5843. }
  5844. },
  5845. "404": {
  5846. "description": "NotFoundError",
  5847. "content": {
  5848. "application/json": {
  5849. "schema": {
  5850. "$ref": "#/components/schemas/NotFoundError"
  5851. }
  5852. }
  5853. }
  5854. }
  5855. },
  5856. "description": "Remove the shareable link for a session, making it private again.",
  5857. "summary": "Unshare session",
  5858. "x-codeSamples": [
  5859. {
  5860. "lang": "js",
  5861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5862. }
  5863. ]
  5864. }
  5865. },
  5866. "/session/{sessionID}/summarize": {
  5867. "post": {
  5868. "tags": ["session"],
  5869. "operationId": "session.summarize",
  5870. "parameters": [
  5871. {
  5872. "name": "directory",
  5873. "in": "query",
  5874. "required": false,
  5875. "schema": {
  5876. "type": "string"
  5877. }
  5878. },
  5879. {
  5880. "name": "workspace",
  5881. "in": "query",
  5882. "required": false,
  5883. "schema": {
  5884. "type": "string"
  5885. }
  5886. },
  5887. {
  5888. "name": "sessionID",
  5889. "in": "path",
  5890. "schema": {
  5891. "type": "string",
  5892. "pattern": "^ses.*"
  5893. },
  5894. "required": true
  5895. }
  5896. ],
  5897. "responses": {
  5898. "200": {
  5899. "description": "Summarized session",
  5900. "content": {
  5901. "application/json": {
  5902. "schema": {
  5903. "type": "boolean",
  5904. "description": "Summarized session"
  5905. }
  5906. }
  5907. }
  5908. },
  5909. "400": {
  5910. "description": "Bad request",
  5911. "content": {
  5912. "application/json": {
  5913. "schema": {
  5914. "$ref": "#/components/schemas/BadRequestError"
  5915. }
  5916. }
  5917. }
  5918. },
  5919. "404": {
  5920. "description": "NotFoundError",
  5921. "content": {
  5922. "application/json": {
  5923. "schema": {
  5924. "$ref": "#/components/schemas/NotFoundError"
  5925. }
  5926. }
  5927. }
  5928. }
  5929. },
  5930. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5931. "summary": "Summarize session",
  5932. "requestBody": {
  5933. "content": {
  5934. "application/json": {
  5935. "schema": {
  5936. "type": "object",
  5937. "properties": {
  5938. "providerID": {
  5939. "type": "string"
  5940. },
  5941. "modelID": {
  5942. "type": "string"
  5943. },
  5944. "auto": {
  5945. "type": "boolean"
  5946. }
  5947. },
  5948. "required": ["providerID", "modelID"],
  5949. "additionalProperties": false
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "x-codeSamples": [
  5955. {
  5956. "lang": "js",
  5957. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5958. }
  5959. ]
  5960. }
  5961. },
  5962. "/session/{sessionID}/prompt_async": {
  5963. "post": {
  5964. "tags": ["session"],
  5965. "operationId": "session.prompt_async",
  5966. "parameters": [
  5967. {
  5968. "name": "directory",
  5969. "in": "query",
  5970. "required": false,
  5971. "schema": {
  5972. "type": "string"
  5973. }
  5974. },
  5975. {
  5976. "name": "workspace",
  5977. "in": "query",
  5978. "required": false,
  5979. "schema": {
  5980. "type": "string"
  5981. }
  5982. },
  5983. {
  5984. "name": "sessionID",
  5985. "in": "path",
  5986. "schema": {
  5987. "type": "string",
  5988. "pattern": "^ses.*"
  5989. },
  5990. "required": true
  5991. }
  5992. ],
  5993. "responses": {
  5994. "204": {
  5995. "description": "Prompt accepted"
  5996. },
  5997. "400": {
  5998. "description": "Bad request",
  5999. "content": {
  6000. "application/json": {
  6001. "schema": {
  6002. "$ref": "#/components/schemas/BadRequestError"
  6003. }
  6004. }
  6005. }
  6006. },
  6007. "404": {
  6008. "description": "Not found",
  6009. "content": {
  6010. "application/json": {
  6011. "schema": {
  6012. "$ref": "#/components/schemas/NotFoundError"
  6013. }
  6014. }
  6015. }
  6016. }
  6017. },
  6018. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6019. "summary": "Send async message",
  6020. "requestBody": {
  6021. "content": {
  6022. "application/json": {
  6023. "schema": {
  6024. "type": "object",
  6025. "properties": {
  6026. "messageID": {
  6027. "type": "string"
  6028. },
  6029. "model": {
  6030. "type": "object",
  6031. "properties": {
  6032. "providerID": {
  6033. "type": "string"
  6034. },
  6035. "modelID": {
  6036. "type": "string"
  6037. }
  6038. },
  6039. "required": ["providerID", "modelID"],
  6040. "additionalProperties": false
  6041. },
  6042. "agent": {
  6043. "type": "string"
  6044. },
  6045. "noReply": {
  6046. "type": "boolean"
  6047. },
  6048. "tools": {
  6049. "type": "object",
  6050. "additionalProperties": {
  6051. "type": "boolean"
  6052. }
  6053. },
  6054. "format": {
  6055. "$ref": "#/components/schemas/OutputFormat"
  6056. },
  6057. "system": {
  6058. "type": "string"
  6059. },
  6060. "variant": {
  6061. "type": "string"
  6062. },
  6063. "parts": {
  6064. "type": "array",
  6065. "items": {
  6066. "anyOf": [
  6067. {
  6068. "$ref": "#/components/schemas/TextPartInput"
  6069. },
  6070. {
  6071. "$ref": "#/components/schemas/FilePartInput"
  6072. },
  6073. {
  6074. "$ref": "#/components/schemas/AgentPartInput"
  6075. },
  6076. {
  6077. "$ref": "#/components/schemas/SubtaskPartInput"
  6078. }
  6079. ]
  6080. }
  6081. }
  6082. },
  6083. "required": ["parts"],
  6084. "additionalProperties": false
  6085. }
  6086. }
  6087. }
  6088. },
  6089. "x-codeSamples": [
  6090. {
  6091. "lang": "js",
  6092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6093. }
  6094. ]
  6095. }
  6096. },
  6097. "/session/{sessionID}/command": {
  6098. "post": {
  6099. "tags": ["session"],
  6100. "operationId": "session.command",
  6101. "parameters": [
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "required": false,
  6106. "schema": {
  6107. "type": "string"
  6108. }
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "required": false,
  6114. "schema": {
  6115. "type": "string"
  6116. }
  6117. },
  6118. {
  6119. "name": "sessionID",
  6120. "in": "path",
  6121. "schema": {
  6122. "type": "string",
  6123. "pattern": "^ses.*"
  6124. },
  6125. "required": true
  6126. }
  6127. ],
  6128. "responses": {
  6129. "200": {
  6130. "description": "Created message",
  6131. "content": {
  6132. "application/json": {
  6133. "schema": {
  6134. "type": "object",
  6135. "required": ["info", "parts"],
  6136. "properties": {
  6137. "info": {
  6138. "$ref": "#/components/schemas/AssistantMessage"
  6139. },
  6140. "parts": {
  6141. "type": "array",
  6142. "items": {
  6143. "$ref": "#/components/schemas/Part"
  6144. }
  6145. }
  6146. }
  6147. }
  6148. }
  6149. }
  6150. },
  6151. "400": {
  6152. "description": "Bad request",
  6153. "content": {
  6154. "application/json": {
  6155. "schema": {
  6156. "$ref": "#/components/schemas/BadRequestError"
  6157. }
  6158. }
  6159. }
  6160. },
  6161. "404": {
  6162. "description": "Not found",
  6163. "content": {
  6164. "application/json": {
  6165. "schema": {
  6166. "$ref": "#/components/schemas/NotFoundError"
  6167. }
  6168. }
  6169. }
  6170. }
  6171. },
  6172. "description": "Send a new command to a session for execution by the AI assistant.",
  6173. "summary": "Send command",
  6174. "requestBody": {
  6175. "content": {
  6176. "application/json": {
  6177. "schema": {
  6178. "type": "object",
  6179. "properties": {
  6180. "messageID": {
  6181. "type": "string"
  6182. },
  6183. "agent": {
  6184. "type": "string"
  6185. },
  6186. "model": {
  6187. "type": "string"
  6188. },
  6189. "arguments": {
  6190. "type": "string"
  6191. },
  6192. "command": {
  6193. "type": "string"
  6194. },
  6195. "variant": {
  6196. "type": "string"
  6197. },
  6198. "parts": {
  6199. "type": "array",
  6200. "items": {
  6201. "type": "object",
  6202. "properties": {
  6203. "id": {
  6204. "type": "string"
  6205. },
  6206. "type": {
  6207. "type": "string",
  6208. "enum": ["file"]
  6209. },
  6210. "mime": {
  6211. "type": "string"
  6212. },
  6213. "filename": {
  6214. "type": "string"
  6215. },
  6216. "url": {
  6217. "type": "string"
  6218. },
  6219. "source": {
  6220. "$ref": "#/components/schemas/FilePartSource"
  6221. }
  6222. },
  6223. "required": ["type", "mime", "url"],
  6224. "additionalProperties": false
  6225. }
  6226. }
  6227. },
  6228. "required": ["arguments", "command"],
  6229. "additionalProperties": false
  6230. }
  6231. }
  6232. }
  6233. },
  6234. "x-codeSamples": [
  6235. {
  6236. "lang": "js",
  6237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6238. }
  6239. ]
  6240. }
  6241. },
  6242. "/session/{sessionID}/shell": {
  6243. "post": {
  6244. "tags": ["session"],
  6245. "operationId": "session.shell",
  6246. "parameters": [
  6247. {
  6248. "name": "directory",
  6249. "in": "query",
  6250. "required": false,
  6251. "schema": {
  6252. "type": "string"
  6253. }
  6254. },
  6255. {
  6256. "name": "workspace",
  6257. "in": "query",
  6258. "required": false,
  6259. "schema": {
  6260. "type": "string"
  6261. }
  6262. },
  6263. {
  6264. "name": "sessionID",
  6265. "in": "path",
  6266. "schema": {
  6267. "type": "string",
  6268. "pattern": "^ses.*"
  6269. },
  6270. "required": true
  6271. }
  6272. ],
  6273. "responses": {
  6274. "200": {
  6275. "description": "Created message",
  6276. "content": {
  6277. "application/json": {
  6278. "schema": {
  6279. "type": "object",
  6280. "properties": {
  6281. "info": {
  6282. "$ref": "#/components/schemas/Message"
  6283. },
  6284. "parts": {
  6285. "type": "array",
  6286. "items": {
  6287. "$ref": "#/components/schemas/Part"
  6288. }
  6289. }
  6290. },
  6291. "required": ["info", "parts"],
  6292. "additionalProperties": false,
  6293. "description": "Created message"
  6294. }
  6295. }
  6296. }
  6297. },
  6298. "400": {
  6299. "description": "Bad request",
  6300. "content": {
  6301. "application/json": {
  6302. "schema": {
  6303. "$ref": "#/components/schemas/BadRequestError"
  6304. }
  6305. }
  6306. }
  6307. },
  6308. "404": {
  6309. "description": "Not found",
  6310. "content": {
  6311. "application/json": {
  6312. "schema": {
  6313. "$ref": "#/components/schemas/NotFoundError"
  6314. }
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "description": "Execute a shell command within the session context and return the AI's response.",
  6320. "summary": "Run shell command",
  6321. "requestBody": {
  6322. "content": {
  6323. "application/json": {
  6324. "schema": {
  6325. "type": "object",
  6326. "properties": {
  6327. "messageID": {
  6328. "type": "string"
  6329. },
  6330. "agent": {
  6331. "type": "string"
  6332. },
  6333. "model": {
  6334. "type": "object",
  6335. "properties": {
  6336. "providerID": {
  6337. "type": "string"
  6338. },
  6339. "modelID": {
  6340. "type": "string"
  6341. }
  6342. },
  6343. "required": ["providerID", "modelID"],
  6344. "additionalProperties": false
  6345. },
  6346. "command": {
  6347. "type": "string"
  6348. }
  6349. },
  6350. "required": ["agent", "command"],
  6351. "additionalProperties": false
  6352. }
  6353. }
  6354. }
  6355. },
  6356. "x-codeSamples": [
  6357. {
  6358. "lang": "js",
  6359. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6360. }
  6361. ]
  6362. }
  6363. },
  6364. "/session/{sessionID}/revert": {
  6365. "post": {
  6366. "tags": ["session"],
  6367. "operationId": "session.revert",
  6368. "parameters": [
  6369. {
  6370. "name": "directory",
  6371. "in": "query",
  6372. "required": false,
  6373. "schema": {
  6374. "type": "string"
  6375. }
  6376. },
  6377. {
  6378. "name": "workspace",
  6379. "in": "query",
  6380. "required": false,
  6381. "schema": {
  6382. "type": "string"
  6383. }
  6384. },
  6385. {
  6386. "name": "sessionID",
  6387. "in": "path",
  6388. "schema": {
  6389. "type": "string",
  6390. "pattern": "^ses.*"
  6391. },
  6392. "required": true
  6393. }
  6394. ],
  6395. "responses": {
  6396. "200": {
  6397. "description": "Updated session",
  6398. "content": {
  6399. "application/json": {
  6400. "schema": {
  6401. "$ref": "#/components/schemas/Session"
  6402. }
  6403. }
  6404. }
  6405. },
  6406. "400": {
  6407. "description": "Bad request",
  6408. "content": {
  6409. "application/json": {
  6410. "schema": {
  6411. "$ref": "#/components/schemas/BadRequestError"
  6412. }
  6413. }
  6414. }
  6415. },
  6416. "404": {
  6417. "description": "Not found",
  6418. "content": {
  6419. "application/json": {
  6420. "schema": {
  6421. "$ref": "#/components/schemas/NotFoundError"
  6422. }
  6423. }
  6424. }
  6425. }
  6426. },
  6427. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6428. "summary": "Revert message",
  6429. "requestBody": {
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "type": "object",
  6434. "properties": {
  6435. "messageID": {
  6436. "type": "string"
  6437. },
  6438. "partID": {
  6439. "type": "string"
  6440. }
  6441. },
  6442. "required": ["messageID"],
  6443. "additionalProperties": false
  6444. }
  6445. }
  6446. }
  6447. },
  6448. "x-codeSamples": [
  6449. {
  6450. "lang": "js",
  6451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6452. }
  6453. ]
  6454. }
  6455. },
  6456. "/session/{sessionID}/unrevert": {
  6457. "post": {
  6458. "tags": ["session"],
  6459. "operationId": "session.unrevert",
  6460. "parameters": [
  6461. {
  6462. "name": "directory",
  6463. "in": "query",
  6464. "required": false,
  6465. "schema": {
  6466. "type": "string"
  6467. }
  6468. },
  6469. {
  6470. "name": "workspace",
  6471. "in": "query",
  6472. "required": false,
  6473. "schema": {
  6474. "type": "string"
  6475. }
  6476. },
  6477. {
  6478. "name": "sessionID",
  6479. "in": "path",
  6480. "schema": {
  6481. "type": "string",
  6482. "pattern": "^ses.*"
  6483. },
  6484. "required": true
  6485. }
  6486. ],
  6487. "responses": {
  6488. "200": {
  6489. "description": "Updated session",
  6490. "content": {
  6491. "application/json": {
  6492. "schema": {
  6493. "$ref": "#/components/schemas/Session"
  6494. }
  6495. }
  6496. }
  6497. },
  6498. "400": {
  6499. "description": "Bad request",
  6500. "content": {
  6501. "application/json": {
  6502. "schema": {
  6503. "$ref": "#/components/schemas/BadRequestError"
  6504. }
  6505. }
  6506. }
  6507. },
  6508. "404": {
  6509. "description": "Not found",
  6510. "content": {
  6511. "application/json": {
  6512. "schema": {
  6513. "$ref": "#/components/schemas/NotFoundError"
  6514. }
  6515. }
  6516. }
  6517. }
  6518. },
  6519. "description": "Restore all previously reverted messages in a session.",
  6520. "summary": "Restore reverted messages",
  6521. "x-codeSamples": [
  6522. {
  6523. "lang": "js",
  6524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6525. }
  6526. ]
  6527. }
  6528. },
  6529. "/session/{sessionID}/permissions/{permissionID}": {
  6530. "post": {
  6531. "tags": ["session"],
  6532. "operationId": "permission.respond",
  6533. "parameters": [
  6534. {
  6535. "name": "directory",
  6536. "in": "query",
  6537. "required": false,
  6538. "schema": {
  6539. "type": "string"
  6540. }
  6541. },
  6542. {
  6543. "name": "workspace",
  6544. "in": "query",
  6545. "required": false,
  6546. "schema": {
  6547. "type": "string"
  6548. }
  6549. },
  6550. {
  6551. "name": "sessionID",
  6552. "in": "path",
  6553. "schema": {
  6554. "type": "string",
  6555. "pattern": "^ses.*"
  6556. },
  6557. "required": true
  6558. },
  6559. {
  6560. "name": "permissionID",
  6561. "in": "path",
  6562. "schema": {
  6563. "type": "string",
  6564. "pattern": "^per.*"
  6565. },
  6566. "required": true
  6567. }
  6568. ],
  6569. "responses": {
  6570. "200": {
  6571. "description": "Permission processed successfully",
  6572. "content": {
  6573. "application/json": {
  6574. "schema": {
  6575. "type": "boolean",
  6576. "description": "Permission processed successfully"
  6577. }
  6578. }
  6579. }
  6580. },
  6581. "400": {
  6582. "description": "Bad request",
  6583. "content": {
  6584. "application/json": {
  6585. "schema": {
  6586. "$ref": "#/components/schemas/BadRequestError"
  6587. }
  6588. }
  6589. }
  6590. },
  6591. "404": {
  6592. "description": "Not found",
  6593. "content": {
  6594. "application/json": {
  6595. "schema": {
  6596. "$ref": "#/components/schemas/NotFoundError"
  6597. }
  6598. }
  6599. }
  6600. }
  6601. },
  6602. "description": "Approve or deny a permission request from the AI assistant.",
  6603. "summary": "Respond to permission",
  6604. "deprecated": true,
  6605. "requestBody": {
  6606. "content": {
  6607. "application/json": {
  6608. "schema": {
  6609. "type": "object",
  6610. "properties": {
  6611. "response": {
  6612. "type": "string",
  6613. "enum": ["once", "always", "reject"]
  6614. }
  6615. },
  6616. "required": ["response"],
  6617. "additionalProperties": false
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "x-codeSamples": [
  6623. {
  6624. "lang": "js",
  6625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6626. }
  6627. ]
  6628. }
  6629. },
  6630. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6631. "delete": {
  6632. "tags": ["session"],
  6633. "operationId": "part.delete",
  6634. "parameters": [
  6635. {
  6636. "name": "directory",
  6637. "in": "query",
  6638. "required": false,
  6639. "schema": {
  6640. "type": "string"
  6641. }
  6642. },
  6643. {
  6644. "name": "workspace",
  6645. "in": "query",
  6646. "required": false,
  6647. "schema": {
  6648. "type": "string"
  6649. }
  6650. },
  6651. {
  6652. "name": "sessionID",
  6653. "in": "path",
  6654. "schema": {
  6655. "type": "string",
  6656. "pattern": "^ses.*"
  6657. },
  6658. "required": true
  6659. },
  6660. {
  6661. "name": "messageID",
  6662. "in": "path",
  6663. "schema": {
  6664. "type": "string",
  6665. "pattern": "^msg.*"
  6666. },
  6667. "required": true
  6668. },
  6669. {
  6670. "name": "partID",
  6671. "in": "path",
  6672. "schema": {
  6673. "type": "string",
  6674. "pattern": "^prt.*"
  6675. },
  6676. "required": true
  6677. }
  6678. ],
  6679. "responses": {
  6680. "200": {
  6681. "description": "Successfully deleted part",
  6682. "content": {
  6683. "application/json": {
  6684. "schema": {
  6685. "type": "boolean",
  6686. "description": "Successfully deleted part"
  6687. }
  6688. }
  6689. }
  6690. },
  6691. "400": {
  6692. "description": "Bad request",
  6693. "content": {
  6694. "application/json": {
  6695. "schema": {
  6696. "$ref": "#/components/schemas/BadRequestError"
  6697. }
  6698. }
  6699. }
  6700. },
  6701. "404": {
  6702. "description": "Not found",
  6703. "content": {
  6704. "application/json": {
  6705. "schema": {
  6706. "$ref": "#/components/schemas/NotFoundError"
  6707. }
  6708. }
  6709. }
  6710. }
  6711. },
  6712. "description": "Delete a part from a message.",
  6713. "x-codeSamples": [
  6714. {
  6715. "lang": "js",
  6716. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6717. }
  6718. ]
  6719. },
  6720. "patch": {
  6721. "tags": ["session"],
  6722. "operationId": "part.update",
  6723. "parameters": [
  6724. {
  6725. "name": "directory",
  6726. "in": "query",
  6727. "required": false,
  6728. "schema": {
  6729. "type": "string"
  6730. }
  6731. },
  6732. {
  6733. "name": "workspace",
  6734. "in": "query",
  6735. "required": false,
  6736. "schema": {
  6737. "type": "string"
  6738. }
  6739. },
  6740. {
  6741. "name": "sessionID",
  6742. "in": "path",
  6743. "schema": {
  6744. "type": "string",
  6745. "pattern": "^ses.*"
  6746. },
  6747. "required": true
  6748. },
  6749. {
  6750. "name": "messageID",
  6751. "in": "path",
  6752. "schema": {
  6753. "type": "string",
  6754. "pattern": "^msg.*"
  6755. },
  6756. "required": true
  6757. },
  6758. {
  6759. "name": "partID",
  6760. "in": "path",
  6761. "schema": {
  6762. "type": "string",
  6763. "pattern": "^prt.*"
  6764. },
  6765. "required": true
  6766. }
  6767. ],
  6768. "responses": {
  6769. "200": {
  6770. "description": "Successfully updated part",
  6771. "content": {
  6772. "application/json": {
  6773. "schema": {
  6774. "$ref": "#/components/schemas/Part"
  6775. }
  6776. }
  6777. }
  6778. },
  6779. "400": {
  6780. "description": "Bad request",
  6781. "content": {
  6782. "application/json": {
  6783. "schema": {
  6784. "$ref": "#/components/schemas/BadRequestError"
  6785. }
  6786. }
  6787. }
  6788. },
  6789. "404": {
  6790. "description": "Not found",
  6791. "content": {
  6792. "application/json": {
  6793. "schema": {
  6794. "$ref": "#/components/schemas/NotFoundError"
  6795. }
  6796. }
  6797. }
  6798. }
  6799. },
  6800. "description": "Update a part in a message.",
  6801. "requestBody": {
  6802. "content": {
  6803. "application/json": {
  6804. "schema": {
  6805. "$ref": "#/components/schemas/Part"
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "x-codeSamples": [
  6811. {
  6812. "lang": "js",
  6813. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6814. }
  6815. ]
  6816. }
  6817. },
  6818. "/sync/start": {
  6819. "post": {
  6820. "tags": ["sync"],
  6821. "operationId": "sync.start",
  6822. "parameters": [
  6823. {
  6824. "name": "directory",
  6825. "in": "query",
  6826. "required": false,
  6827. "schema": {
  6828. "type": "string"
  6829. }
  6830. },
  6831. {
  6832. "name": "workspace",
  6833. "in": "query",
  6834. "required": false,
  6835. "schema": {
  6836. "type": "string"
  6837. }
  6838. }
  6839. ],
  6840. "responses": {
  6841. "200": {
  6842. "description": "Workspace sync started",
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "type": "boolean",
  6847. "description": "Workspace sync started"
  6848. }
  6849. }
  6850. }
  6851. }
  6852. },
  6853. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6854. "summary": "Start workspace sync",
  6855. "x-codeSamples": [
  6856. {
  6857. "lang": "js",
  6858. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6859. }
  6860. ]
  6861. }
  6862. },
  6863. "/sync/replay": {
  6864. "post": {
  6865. "tags": ["sync"],
  6866. "operationId": "sync.replay",
  6867. "parameters": [
  6868. {
  6869. "name": "directory",
  6870. "in": "query",
  6871. "required": false,
  6872. "schema": {
  6873. "type": "string"
  6874. }
  6875. },
  6876. {
  6877. "name": "workspace",
  6878. "in": "query",
  6879. "required": false,
  6880. "schema": {
  6881. "type": "string"
  6882. }
  6883. }
  6884. ],
  6885. "responses": {
  6886. "200": {
  6887. "description": "Replayed sync events",
  6888. "content": {
  6889. "application/json": {
  6890. "schema": {
  6891. "type": "object",
  6892. "properties": {
  6893. "sessionID": {
  6894. "type": "string"
  6895. }
  6896. },
  6897. "required": ["sessionID"],
  6898. "additionalProperties": false,
  6899. "description": "Replayed sync events"
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "400": {
  6905. "description": "Bad request",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/BadRequestError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Validate and replay a complete sync event history.",
  6916. "summary": "Replay sync events",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "directory": {
  6924. "type": "string"
  6925. },
  6926. "events": {
  6927. "type": "array",
  6928. "minItems": 1,
  6929. "items": {
  6930. "type": "object",
  6931. "properties": {
  6932. "id": {
  6933. "type": "string"
  6934. },
  6935. "aggregateID": {
  6936. "type": "string"
  6937. },
  6938. "seq": {
  6939. "type": "integer",
  6940. "minimum": 0
  6941. },
  6942. "type": {
  6943. "type": "string"
  6944. },
  6945. "data": {
  6946. "type": "object"
  6947. }
  6948. },
  6949. "required": ["id", "aggregateID", "seq", "type", "data"],
  6950. "additionalProperties": false
  6951. }
  6952. }
  6953. },
  6954. "required": ["directory", "events"],
  6955. "additionalProperties": false
  6956. }
  6957. }
  6958. }
  6959. },
  6960. "x-codeSamples": [
  6961. {
  6962. "lang": "js",
  6963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  6964. }
  6965. ]
  6966. }
  6967. },
  6968. "/sync/steal": {
  6969. "post": {
  6970. "tags": ["sync"],
  6971. "operationId": "sync.steal",
  6972. "parameters": [
  6973. {
  6974. "name": "directory",
  6975. "in": "query",
  6976. "required": false,
  6977. "schema": {
  6978. "type": "string"
  6979. }
  6980. },
  6981. {
  6982. "name": "workspace",
  6983. "in": "query",
  6984. "required": false,
  6985. "schema": {
  6986. "type": "string"
  6987. }
  6988. }
  6989. ],
  6990. "responses": {
  6991. "200": {
  6992. "description": "Session stolen into workspace",
  6993. "content": {
  6994. "application/json": {
  6995. "schema": {
  6996. "type": "object",
  6997. "properties": {
  6998. "sessionID": {
  6999. "type": "string"
  7000. }
  7001. },
  7002. "required": ["sessionID"],
  7003. "additionalProperties": false,
  7004. "description": "Session stolen into workspace"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "400": {
  7010. "description": "Bad request",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/BadRequestError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Update a session to belong to the current workspace through the sync event system.",
  7021. "summary": "Steal session into workspace",
  7022. "requestBody": {
  7023. "content": {
  7024. "application/json": {
  7025. "schema": {
  7026. "type": "object",
  7027. "properties": {
  7028. "sessionID": {
  7029. "type": "string"
  7030. }
  7031. },
  7032. "required": ["sessionID"],
  7033. "additionalProperties": false
  7034. }
  7035. }
  7036. }
  7037. },
  7038. "x-codeSamples": [
  7039. {
  7040. "lang": "js",
  7041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7042. }
  7043. ]
  7044. }
  7045. },
  7046. "/sync/history": {
  7047. "post": {
  7048. "tags": ["sync"],
  7049. "operationId": "sync.history.list",
  7050. "parameters": [
  7051. {
  7052. "name": "directory",
  7053. "in": "query",
  7054. "required": false,
  7055. "schema": {
  7056. "type": "string"
  7057. }
  7058. },
  7059. {
  7060. "name": "workspace",
  7061. "in": "query",
  7062. "required": false,
  7063. "schema": {
  7064. "type": "string"
  7065. }
  7066. }
  7067. ],
  7068. "responses": {
  7069. "200": {
  7070. "description": "Sync events",
  7071. "content": {
  7072. "application/json": {
  7073. "schema": {
  7074. "type": "array",
  7075. "items": {
  7076. "type": "object",
  7077. "properties": {
  7078. "id": {
  7079. "type": "string"
  7080. },
  7081. "aggregate_id": {
  7082. "type": "string"
  7083. },
  7084. "seq": {
  7085. "type": "integer",
  7086. "minimum": 0
  7087. },
  7088. "type": {
  7089. "type": "string"
  7090. },
  7091. "data": {
  7092. "type": "object"
  7093. }
  7094. },
  7095. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7096. "additionalProperties": false
  7097. },
  7098. "description": "Sync events"
  7099. }
  7100. }
  7101. }
  7102. },
  7103. "400": {
  7104. "description": "Bad request",
  7105. "content": {
  7106. "application/json": {
  7107. "schema": {
  7108. "$ref": "#/components/schemas/BadRequestError"
  7109. }
  7110. }
  7111. }
  7112. }
  7113. },
  7114. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  7115. "summary": "List sync events",
  7116. "requestBody": {
  7117. "content": {
  7118. "application/json": {
  7119. "schema": {
  7120. "type": "object",
  7121. "additionalProperties": {
  7122. "type": "integer",
  7123. "minimum": 0
  7124. }
  7125. }
  7126. }
  7127. }
  7128. },
  7129. "x-codeSamples": [
  7130. {
  7131. "lang": "js",
  7132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7133. }
  7134. ]
  7135. }
  7136. },
  7137. "/api/session": {
  7138. "get": {
  7139. "tags": ["v2"],
  7140. "operationId": "v2.session.list",
  7141. "parameters": [
  7142. {
  7143. "name": "directory",
  7144. "in": "query",
  7145. "required": false,
  7146. "schema": {
  7147. "type": "string"
  7148. }
  7149. },
  7150. {
  7151. "name": "workspace",
  7152. "in": "query",
  7153. "required": false,
  7154. "schema": {
  7155. "type": "string"
  7156. }
  7157. }
  7158. ],
  7159. "responses": {
  7160. "200": {
  7161. "description": "V2SessionsResponse",
  7162. "content": {
  7163. "application/json": {
  7164. "schema": {
  7165. "$ref": "#/components/schemas/V2SessionsResponse"
  7166. }
  7167. }
  7168. }
  7169. },
  7170. "400": {
  7171. "description": "Bad request",
  7172. "content": {
  7173. "application/json": {
  7174. "schema": {
  7175. "$ref": "#/components/schemas/BadRequestError"
  7176. }
  7177. }
  7178. }
  7179. }
  7180. },
  7181. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  7182. "summary": "List v2 sessions",
  7183. "x-codeSamples": [
  7184. {
  7185. "lang": "js",
  7186. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7187. }
  7188. ]
  7189. }
  7190. },
  7191. "/api/session/{sessionID}/prompt": {
  7192. "post": {
  7193. "tags": ["v2"],
  7194. "operationId": "v2.session.prompt",
  7195. "parameters": [
  7196. {
  7197. "name": "directory",
  7198. "in": "query",
  7199. "required": false,
  7200. "schema": {
  7201. "type": "string"
  7202. }
  7203. },
  7204. {
  7205. "name": "workspace",
  7206. "in": "query",
  7207. "required": false,
  7208. "schema": {
  7209. "type": "string"
  7210. }
  7211. },
  7212. {
  7213. "name": "sessionID",
  7214. "in": "path",
  7215. "schema": {
  7216. "type": "string",
  7217. "pattern": "^ses.*"
  7218. },
  7219. "required": true
  7220. }
  7221. ],
  7222. "responses": {
  7223. "200": {
  7224. "description": "Session.Message",
  7225. "content": {
  7226. "application/json": {
  7227. "schema": {
  7228. "$ref": "#/components/schemas/SessionMessage"
  7229. }
  7230. }
  7231. }
  7232. }
  7233. },
  7234. "description": "Create a v2 session message and queue it for the agent loop.",
  7235. "summary": "Send v2 message",
  7236. "requestBody": {
  7237. "content": {
  7238. "application/json": {
  7239. "schema": {
  7240. "type": "object",
  7241. "properties": {
  7242. "prompt": {
  7243. "$ref": "#/components/schemas/Prompt"
  7244. },
  7245. "delivery": {
  7246. "$ref": "#/components/schemas/SessionDelivery"
  7247. }
  7248. },
  7249. "required": ["prompt"],
  7250. "additionalProperties": false
  7251. }
  7252. }
  7253. }
  7254. },
  7255. "x-codeSamples": [
  7256. {
  7257. "lang": "js",
  7258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7259. }
  7260. ]
  7261. }
  7262. },
  7263. "/api/session/{sessionID}/compact": {
  7264. "post": {
  7265. "tags": ["v2"],
  7266. "operationId": "v2.session.compact",
  7267. "parameters": [
  7268. {
  7269. "name": "directory",
  7270. "in": "query",
  7271. "required": false,
  7272. "schema": {
  7273. "type": "string"
  7274. }
  7275. },
  7276. {
  7277. "name": "workspace",
  7278. "in": "query",
  7279. "required": false,
  7280. "schema": {
  7281. "type": "string"
  7282. }
  7283. },
  7284. {
  7285. "name": "sessionID",
  7286. "in": "path",
  7287. "schema": {
  7288. "type": "string",
  7289. "pattern": "^ses.*"
  7290. },
  7291. "required": true
  7292. }
  7293. ],
  7294. "responses": {
  7295. "204": {
  7296. "description": "<No Content>"
  7297. }
  7298. },
  7299. "description": "Compact a v2 session conversation.",
  7300. "summary": "Compact v2 session",
  7301. "x-codeSamples": [
  7302. {
  7303. "lang": "js",
  7304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7305. }
  7306. ]
  7307. }
  7308. },
  7309. "/api/session/{sessionID}/wait": {
  7310. "post": {
  7311. "tags": ["v2"],
  7312. "operationId": "v2.session.wait",
  7313. "parameters": [
  7314. {
  7315. "name": "directory",
  7316. "in": "query",
  7317. "required": false,
  7318. "schema": {
  7319. "type": "string"
  7320. }
  7321. },
  7322. {
  7323. "name": "workspace",
  7324. "in": "query",
  7325. "required": false,
  7326. "schema": {
  7327. "type": "string"
  7328. }
  7329. },
  7330. {
  7331. "name": "sessionID",
  7332. "in": "path",
  7333. "schema": {
  7334. "type": "string",
  7335. "pattern": "^ses.*"
  7336. },
  7337. "required": true
  7338. }
  7339. ],
  7340. "responses": {
  7341. "204": {
  7342. "description": "<No Content>"
  7343. }
  7344. },
  7345. "description": "Wait for a v2 session agent loop to become idle.",
  7346. "summary": "Wait for v2 session",
  7347. "x-codeSamples": [
  7348. {
  7349. "lang": "js",
  7350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7351. }
  7352. ]
  7353. }
  7354. },
  7355. "/api/session/{sessionID}/context": {
  7356. "get": {
  7357. "tags": ["v2"],
  7358. "operationId": "v2.session.context",
  7359. "parameters": [
  7360. {
  7361. "name": "directory",
  7362. "in": "query",
  7363. "required": false,
  7364. "schema": {
  7365. "type": "string"
  7366. }
  7367. },
  7368. {
  7369. "name": "workspace",
  7370. "in": "query",
  7371. "required": false,
  7372. "schema": {
  7373. "type": "string"
  7374. }
  7375. },
  7376. {
  7377. "name": "sessionID",
  7378. "in": "path",
  7379. "schema": {
  7380. "type": "string",
  7381. "pattern": "^ses.*"
  7382. },
  7383. "required": true
  7384. }
  7385. ],
  7386. "responses": {
  7387. "200": {
  7388. "description": "Success",
  7389. "content": {
  7390. "application/json": {
  7391. "schema": {
  7392. "type": "array",
  7393. "items": {
  7394. "$ref": "#/components/schemas/SessionMessage"
  7395. }
  7396. }
  7397. }
  7398. }
  7399. }
  7400. },
  7401. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7402. "summary": "Get v2 session context",
  7403. "x-codeSamples": [
  7404. {
  7405. "lang": "js",
  7406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7407. }
  7408. ]
  7409. }
  7410. },
  7411. "/api/session/{sessionID}/message": {
  7412. "get": {
  7413. "tags": ["v2 messages"],
  7414. "operationId": "v2.session.messages",
  7415. "parameters": [
  7416. {
  7417. "name": "directory",
  7418. "in": "query",
  7419. "required": false,
  7420. "schema": {
  7421. "type": "string"
  7422. }
  7423. },
  7424. {
  7425. "name": "workspace",
  7426. "in": "query",
  7427. "required": false,
  7428. "schema": {
  7429. "type": "string"
  7430. }
  7431. },
  7432. {
  7433. "name": "sessionID",
  7434. "in": "path",
  7435. "schema": {
  7436. "type": "string",
  7437. "pattern": "^ses.*"
  7438. },
  7439. "required": true
  7440. }
  7441. ],
  7442. "responses": {
  7443. "200": {
  7444. "description": "V2SessionMessagesResponse",
  7445. "content": {
  7446. "application/json": {
  7447. "schema": {
  7448. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7449. }
  7450. }
  7451. }
  7452. },
  7453. "400": {
  7454. "description": "Bad request",
  7455. "content": {
  7456. "application/json": {
  7457. "schema": {
  7458. "$ref": "#/components/schemas/BadRequestError"
  7459. }
  7460. }
  7461. }
  7462. }
  7463. },
  7464. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  7465. "summary": "Get v2 session messages",
  7466. "x-codeSamples": [
  7467. {
  7468. "lang": "js",
  7469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7470. }
  7471. ]
  7472. }
  7473. },
  7474. "/tui/append-prompt": {
  7475. "post": {
  7476. "tags": ["tui"],
  7477. "operationId": "tui.appendPrompt",
  7478. "parameters": [
  7479. {
  7480. "name": "directory",
  7481. "in": "query",
  7482. "required": false,
  7483. "schema": {
  7484. "type": "string"
  7485. }
  7486. },
  7487. {
  7488. "name": "workspace",
  7489. "in": "query",
  7490. "required": false,
  7491. "schema": {
  7492. "type": "string"
  7493. }
  7494. }
  7495. ],
  7496. "responses": {
  7497. "200": {
  7498. "description": "Prompt processed successfully",
  7499. "content": {
  7500. "application/json": {
  7501. "schema": {
  7502. "type": "boolean",
  7503. "description": "Prompt processed successfully"
  7504. }
  7505. }
  7506. }
  7507. },
  7508. "400": {
  7509. "description": "Bad request",
  7510. "content": {
  7511. "application/json": {
  7512. "schema": {
  7513. "$ref": "#/components/schemas/BadRequestError"
  7514. }
  7515. }
  7516. }
  7517. }
  7518. },
  7519. "description": "Append prompt to the TUI.",
  7520. "summary": "Append TUI prompt",
  7521. "requestBody": {
  7522. "content": {
  7523. "application/json": {
  7524. "schema": {
  7525. "type": "object",
  7526. "properties": {
  7527. "text": {
  7528. "type": "string"
  7529. }
  7530. },
  7531. "required": ["text"],
  7532. "additionalProperties": false
  7533. }
  7534. }
  7535. }
  7536. },
  7537. "x-codeSamples": [
  7538. {
  7539. "lang": "js",
  7540. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7541. }
  7542. ]
  7543. }
  7544. },
  7545. "/tui/open-help": {
  7546. "post": {
  7547. "tags": ["tui"],
  7548. "operationId": "tui.openHelp",
  7549. "parameters": [
  7550. {
  7551. "name": "directory",
  7552. "in": "query",
  7553. "required": false,
  7554. "schema": {
  7555. "type": "string"
  7556. }
  7557. },
  7558. {
  7559. "name": "workspace",
  7560. "in": "query",
  7561. "required": false,
  7562. "schema": {
  7563. "type": "string"
  7564. }
  7565. }
  7566. ],
  7567. "responses": {
  7568. "200": {
  7569. "description": "Help dialog opened successfully",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "type": "boolean",
  7574. "description": "Help dialog opened successfully"
  7575. }
  7576. }
  7577. }
  7578. }
  7579. },
  7580. "description": "Open the help dialog in the TUI to display user assistance information.",
  7581. "summary": "Open help dialog",
  7582. "x-codeSamples": [
  7583. {
  7584. "lang": "js",
  7585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7586. }
  7587. ]
  7588. }
  7589. },
  7590. "/tui/open-sessions": {
  7591. "post": {
  7592. "tags": ["tui"],
  7593. "operationId": "tui.openSessions",
  7594. "parameters": [
  7595. {
  7596. "name": "directory",
  7597. "in": "query",
  7598. "required": false,
  7599. "schema": {
  7600. "type": "string"
  7601. }
  7602. },
  7603. {
  7604. "name": "workspace",
  7605. "in": "query",
  7606. "required": false,
  7607. "schema": {
  7608. "type": "string"
  7609. }
  7610. }
  7611. ],
  7612. "responses": {
  7613. "200": {
  7614. "description": "Session dialog opened successfully",
  7615. "content": {
  7616. "application/json": {
  7617. "schema": {
  7618. "type": "boolean",
  7619. "description": "Session dialog opened successfully"
  7620. }
  7621. }
  7622. }
  7623. }
  7624. },
  7625. "description": "Open the session dialog.",
  7626. "summary": "Open sessions dialog",
  7627. "x-codeSamples": [
  7628. {
  7629. "lang": "js",
  7630. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7631. }
  7632. ]
  7633. }
  7634. },
  7635. "/tui/open-themes": {
  7636. "post": {
  7637. "tags": ["tui"],
  7638. "operationId": "tui.openThemes",
  7639. "parameters": [
  7640. {
  7641. "name": "directory",
  7642. "in": "query",
  7643. "required": false,
  7644. "schema": {
  7645. "type": "string"
  7646. }
  7647. },
  7648. {
  7649. "name": "workspace",
  7650. "in": "query",
  7651. "required": false,
  7652. "schema": {
  7653. "type": "string"
  7654. }
  7655. }
  7656. ],
  7657. "responses": {
  7658. "200": {
  7659. "description": "Theme dialog opened successfully",
  7660. "content": {
  7661. "application/json": {
  7662. "schema": {
  7663. "type": "boolean",
  7664. "description": "Theme dialog opened successfully"
  7665. }
  7666. }
  7667. }
  7668. }
  7669. },
  7670. "description": "Open the theme dialog.",
  7671. "summary": "Open themes dialog",
  7672. "x-codeSamples": [
  7673. {
  7674. "lang": "js",
  7675. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7676. }
  7677. ]
  7678. }
  7679. },
  7680. "/tui/open-models": {
  7681. "post": {
  7682. "tags": ["tui"],
  7683. "operationId": "tui.openModels",
  7684. "parameters": [
  7685. {
  7686. "name": "directory",
  7687. "in": "query",
  7688. "required": false,
  7689. "schema": {
  7690. "type": "string"
  7691. }
  7692. },
  7693. {
  7694. "name": "workspace",
  7695. "in": "query",
  7696. "required": false,
  7697. "schema": {
  7698. "type": "string"
  7699. }
  7700. }
  7701. ],
  7702. "responses": {
  7703. "200": {
  7704. "description": "Model dialog opened successfully",
  7705. "content": {
  7706. "application/json": {
  7707. "schema": {
  7708. "type": "boolean",
  7709. "description": "Model dialog opened successfully"
  7710. }
  7711. }
  7712. }
  7713. }
  7714. },
  7715. "description": "Open the model dialog.",
  7716. "summary": "Open models dialog",
  7717. "x-codeSamples": [
  7718. {
  7719. "lang": "js",
  7720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7721. }
  7722. ]
  7723. }
  7724. },
  7725. "/tui/submit-prompt": {
  7726. "post": {
  7727. "tags": ["tui"],
  7728. "operationId": "tui.submitPrompt",
  7729. "parameters": [
  7730. {
  7731. "name": "directory",
  7732. "in": "query",
  7733. "required": false,
  7734. "schema": {
  7735. "type": "string"
  7736. }
  7737. },
  7738. {
  7739. "name": "workspace",
  7740. "in": "query",
  7741. "required": false,
  7742. "schema": {
  7743. "type": "string"
  7744. }
  7745. }
  7746. ],
  7747. "responses": {
  7748. "200": {
  7749. "description": "Prompt submitted successfully",
  7750. "content": {
  7751. "application/json": {
  7752. "schema": {
  7753. "type": "boolean",
  7754. "description": "Prompt submitted successfully"
  7755. }
  7756. }
  7757. }
  7758. }
  7759. },
  7760. "description": "Submit the prompt.",
  7761. "summary": "Submit TUI prompt",
  7762. "x-codeSamples": [
  7763. {
  7764. "lang": "js",
  7765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7766. }
  7767. ]
  7768. }
  7769. },
  7770. "/tui/clear-prompt": {
  7771. "post": {
  7772. "tags": ["tui"],
  7773. "operationId": "tui.clearPrompt",
  7774. "parameters": [
  7775. {
  7776. "name": "directory",
  7777. "in": "query",
  7778. "required": false,
  7779. "schema": {
  7780. "type": "string"
  7781. }
  7782. },
  7783. {
  7784. "name": "workspace",
  7785. "in": "query",
  7786. "required": false,
  7787. "schema": {
  7788. "type": "string"
  7789. }
  7790. }
  7791. ],
  7792. "responses": {
  7793. "200": {
  7794. "description": "Prompt cleared successfully",
  7795. "content": {
  7796. "application/json": {
  7797. "schema": {
  7798. "type": "boolean",
  7799. "description": "Prompt cleared successfully"
  7800. }
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "description": "Clear the prompt.",
  7806. "summary": "Clear TUI prompt",
  7807. "x-codeSamples": [
  7808. {
  7809. "lang": "js",
  7810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7811. }
  7812. ]
  7813. }
  7814. },
  7815. "/tui/execute-command": {
  7816. "post": {
  7817. "tags": ["tui"],
  7818. "operationId": "tui.executeCommand",
  7819. "parameters": [
  7820. {
  7821. "name": "directory",
  7822. "in": "query",
  7823. "required": false,
  7824. "schema": {
  7825. "type": "string"
  7826. }
  7827. },
  7828. {
  7829. "name": "workspace",
  7830. "in": "query",
  7831. "required": false,
  7832. "schema": {
  7833. "type": "string"
  7834. }
  7835. }
  7836. ],
  7837. "responses": {
  7838. "200": {
  7839. "description": "Command executed successfully",
  7840. "content": {
  7841. "application/json": {
  7842. "schema": {
  7843. "type": "boolean",
  7844. "description": "Command executed successfully"
  7845. }
  7846. }
  7847. }
  7848. },
  7849. "400": {
  7850. "description": "Bad request",
  7851. "content": {
  7852. "application/json": {
  7853. "schema": {
  7854. "$ref": "#/components/schemas/BadRequestError"
  7855. }
  7856. }
  7857. }
  7858. }
  7859. },
  7860. "description": "Execute a TUI command.",
  7861. "summary": "Execute TUI command",
  7862. "requestBody": {
  7863. "content": {
  7864. "application/json": {
  7865. "schema": {
  7866. "type": "object",
  7867. "properties": {
  7868. "command": {
  7869. "type": "string"
  7870. }
  7871. },
  7872. "required": ["command"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/tui/show-toast": {
  7887. "post": {
  7888. "tags": ["tui"],
  7889. "operationId": "tui.showToast",
  7890. "parameters": [
  7891. {
  7892. "name": "directory",
  7893. "in": "query",
  7894. "required": false,
  7895. "schema": {
  7896. "type": "string"
  7897. }
  7898. },
  7899. {
  7900. "name": "workspace",
  7901. "in": "query",
  7902. "required": false,
  7903. "schema": {
  7904. "type": "string"
  7905. }
  7906. }
  7907. ],
  7908. "responses": {
  7909. "200": {
  7910. "description": "Toast notification shown successfully",
  7911. "content": {
  7912. "application/json": {
  7913. "schema": {
  7914. "type": "boolean",
  7915. "description": "Toast notification shown successfully"
  7916. }
  7917. }
  7918. }
  7919. }
  7920. },
  7921. "description": "Show a toast notification in the TUI.",
  7922. "summary": "Show TUI toast",
  7923. "requestBody": {
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "type": "object",
  7928. "properties": {
  7929. "title": {
  7930. "type": "string"
  7931. },
  7932. "message": {
  7933. "type": "string"
  7934. },
  7935. "variant": {
  7936. "type": "string",
  7937. "enum": ["info", "success", "warning", "error"]
  7938. },
  7939. "duration": {
  7940. "type": "integer",
  7941. "exclusiveMinimum": 0
  7942. }
  7943. },
  7944. "required": ["message", "variant"],
  7945. "additionalProperties": false
  7946. }
  7947. }
  7948. }
  7949. },
  7950. "x-codeSamples": [
  7951. {
  7952. "lang": "js",
  7953. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  7954. }
  7955. ]
  7956. }
  7957. },
  7958. "/tui/publish": {
  7959. "post": {
  7960. "tags": ["tui"],
  7961. "operationId": "tui.publish",
  7962. "parameters": [
  7963. {
  7964. "name": "directory",
  7965. "in": "query",
  7966. "required": false,
  7967. "schema": {
  7968. "type": "string"
  7969. }
  7970. },
  7971. {
  7972. "name": "workspace",
  7973. "in": "query",
  7974. "required": false,
  7975. "schema": {
  7976. "type": "string"
  7977. }
  7978. }
  7979. ],
  7980. "responses": {
  7981. "200": {
  7982. "description": "Event published successfully",
  7983. "content": {
  7984. "application/json": {
  7985. "schema": {
  7986. "type": "boolean",
  7987. "description": "Event published successfully"
  7988. }
  7989. }
  7990. }
  7991. },
  7992. "400": {
  7993. "description": "Bad request",
  7994. "content": {
  7995. "application/json": {
  7996. "schema": {
  7997. "$ref": "#/components/schemas/BadRequestError"
  7998. }
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "description": "Publish a TUI event.",
  8004. "summary": "Publish TUI event",
  8005. "requestBody": {
  8006. "content": {
  8007. "application/json": {
  8008. "schema": {
  8009. "anyOf": [
  8010. {
  8011. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8012. },
  8013. {
  8014. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8015. },
  8016. {
  8017. "$ref": "#/components/schemas/EventTuiToastShow"
  8018. },
  8019. {
  8020. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8021. }
  8022. ]
  8023. }
  8024. }
  8025. }
  8026. },
  8027. "x-codeSamples": [
  8028. {
  8029. "lang": "js",
  8030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8031. }
  8032. ]
  8033. }
  8034. },
  8035. "/tui/select-session": {
  8036. "post": {
  8037. "tags": ["tui"],
  8038. "operationId": "tui.selectSession",
  8039. "parameters": [
  8040. {
  8041. "name": "directory",
  8042. "in": "query",
  8043. "required": false,
  8044. "schema": {
  8045. "type": "string"
  8046. }
  8047. },
  8048. {
  8049. "name": "workspace",
  8050. "in": "query",
  8051. "required": false,
  8052. "schema": {
  8053. "type": "string"
  8054. }
  8055. }
  8056. ],
  8057. "responses": {
  8058. "200": {
  8059. "description": "Session selected successfully",
  8060. "content": {
  8061. "application/json": {
  8062. "schema": {
  8063. "type": "boolean",
  8064. "description": "Session selected successfully"
  8065. }
  8066. }
  8067. }
  8068. },
  8069. "400": {
  8070. "description": "Bad request",
  8071. "content": {
  8072. "application/json": {
  8073. "schema": {
  8074. "$ref": "#/components/schemas/BadRequestError"
  8075. }
  8076. }
  8077. }
  8078. },
  8079. "404": {
  8080. "description": "NotFoundError",
  8081. "content": {
  8082. "application/json": {
  8083. "schema": {
  8084. "$ref": "#/components/schemas/NotFoundError"
  8085. }
  8086. }
  8087. }
  8088. }
  8089. },
  8090. "description": "Navigate the TUI to display the specified session.",
  8091. "summary": "Select session",
  8092. "requestBody": {
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "type": "object",
  8097. "properties": {
  8098. "sessionID": {
  8099. "type": "string",
  8100. "description": "Session ID to navigate to"
  8101. }
  8102. },
  8103. "required": ["sessionID"],
  8104. "additionalProperties": false
  8105. }
  8106. }
  8107. }
  8108. },
  8109. "x-codeSamples": [
  8110. {
  8111. "lang": "js",
  8112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8113. }
  8114. ]
  8115. }
  8116. },
  8117. "/tui/control/next": {
  8118. "get": {
  8119. "tags": ["tui"],
  8120. "operationId": "tui.control.next",
  8121. "parameters": [
  8122. {
  8123. "name": "directory",
  8124. "in": "query",
  8125. "required": false,
  8126. "schema": {
  8127. "type": "string"
  8128. }
  8129. },
  8130. {
  8131. "name": "workspace",
  8132. "in": "query",
  8133. "required": false,
  8134. "schema": {
  8135. "type": "string"
  8136. }
  8137. }
  8138. ],
  8139. "responses": {
  8140. "200": {
  8141. "description": "Next TUI request",
  8142. "content": {
  8143. "application/json": {
  8144. "schema": {
  8145. "type": "object",
  8146. "properties": {
  8147. "path": {
  8148. "type": "string"
  8149. },
  8150. "body": {}
  8151. },
  8152. "required": ["path", "body"],
  8153. "additionalProperties": false,
  8154. "description": "Next TUI request"
  8155. }
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "description": "Retrieve the next TUI request from the queue for processing.",
  8161. "summary": "Get next TUI request",
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/tui/control/response": {
  8171. "post": {
  8172. "tags": ["tui"],
  8173. "operationId": "tui.control.response",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "required": false,
  8179. "schema": {
  8180. "type": "string"
  8181. }
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "required": false,
  8187. "schema": {
  8188. "type": "string"
  8189. }
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Response submitted successfully",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Response submitted successfully"
  8200. }
  8201. }
  8202. }
  8203. }
  8204. },
  8205. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8206. "summary": "Submit TUI response",
  8207. "requestBody": {
  8208. "content": {
  8209. "application/json": {
  8210. "schema": {}
  8211. }
  8212. }
  8213. },
  8214. "x-codeSamples": [
  8215. {
  8216. "lang": "js",
  8217. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8218. }
  8219. ]
  8220. }
  8221. },
  8222. "/experimental/workspace/adapter": {
  8223. "get": {
  8224. "tags": ["workspace"],
  8225. "operationId": "experimental.workspace.adapter.list",
  8226. "parameters": [
  8227. {
  8228. "name": "directory",
  8229. "in": "query",
  8230. "required": false,
  8231. "schema": {
  8232. "type": "string"
  8233. }
  8234. },
  8235. {
  8236. "name": "workspace",
  8237. "in": "query",
  8238. "required": false,
  8239. "schema": {
  8240. "type": "string"
  8241. }
  8242. }
  8243. ],
  8244. "responses": {
  8245. "200": {
  8246. "description": "Workspace adapters",
  8247. "content": {
  8248. "application/json": {
  8249. "schema": {
  8250. "type": "array",
  8251. "items": {
  8252. "type": "object",
  8253. "properties": {
  8254. "type": {
  8255. "type": "string"
  8256. },
  8257. "name": {
  8258. "type": "string"
  8259. },
  8260. "description": {
  8261. "type": "string"
  8262. }
  8263. },
  8264. "required": ["type", "name", "description"],
  8265. "additionalProperties": false
  8266. },
  8267. "description": "Workspace adapters"
  8268. }
  8269. }
  8270. }
  8271. }
  8272. },
  8273. "description": "List all available workspace adapters for the current project.",
  8274. "summary": "List workspace adapters",
  8275. "x-codeSamples": [
  8276. {
  8277. "lang": "js",
  8278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8279. }
  8280. ]
  8281. }
  8282. },
  8283. "/experimental/workspace": {
  8284. "get": {
  8285. "tags": ["workspace"],
  8286. "operationId": "experimental.workspace.list",
  8287. "parameters": [
  8288. {
  8289. "name": "directory",
  8290. "in": "query",
  8291. "required": false,
  8292. "schema": {
  8293. "type": "string"
  8294. }
  8295. },
  8296. {
  8297. "name": "workspace",
  8298. "in": "query",
  8299. "required": false,
  8300. "schema": {
  8301. "type": "string"
  8302. }
  8303. }
  8304. ],
  8305. "responses": {
  8306. "200": {
  8307. "description": "Workspaces",
  8308. "content": {
  8309. "application/json": {
  8310. "schema": {
  8311. "type": "array",
  8312. "items": {
  8313. "$ref": "#/components/schemas/Workspace"
  8314. },
  8315. "description": "Workspaces"
  8316. }
  8317. }
  8318. }
  8319. }
  8320. },
  8321. "description": "List all workspaces.",
  8322. "summary": "List workspaces",
  8323. "x-codeSamples": [
  8324. {
  8325. "lang": "js",
  8326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8327. }
  8328. ]
  8329. },
  8330. "post": {
  8331. "tags": ["workspace"],
  8332. "operationId": "experimental.workspace.create",
  8333. "parameters": [
  8334. {
  8335. "name": "directory",
  8336. "in": "query",
  8337. "required": false,
  8338. "schema": {
  8339. "type": "string"
  8340. }
  8341. },
  8342. {
  8343. "name": "workspace",
  8344. "in": "query",
  8345. "required": false,
  8346. "schema": {
  8347. "type": "string"
  8348. }
  8349. }
  8350. ],
  8351. "responses": {
  8352. "200": {
  8353. "description": "Workspace created",
  8354. "content": {
  8355. "application/json": {
  8356. "schema": {
  8357. "$ref": "#/components/schemas/Workspace"
  8358. }
  8359. }
  8360. }
  8361. },
  8362. "400": {
  8363. "description": "Bad request",
  8364. "content": {
  8365. "application/json": {
  8366. "schema": {
  8367. "$ref": "#/components/schemas/BadRequestError"
  8368. }
  8369. }
  8370. }
  8371. }
  8372. },
  8373. "description": "Create a workspace for the current project.",
  8374. "summary": "Create workspace",
  8375. "requestBody": {
  8376. "content": {
  8377. "application/json": {
  8378. "schema": {
  8379. "type": "object",
  8380. "properties": {
  8381. "id": {
  8382. "type": "string"
  8383. },
  8384. "type": {
  8385. "type": "string"
  8386. },
  8387. "branch": {
  8388. "anyOf": [
  8389. {
  8390. "type": "string"
  8391. },
  8392. {
  8393. "type": "null"
  8394. }
  8395. ]
  8396. },
  8397. "extra": {
  8398. "anyOf": [
  8399. {},
  8400. {
  8401. "type": "null"
  8402. }
  8403. ]
  8404. }
  8405. },
  8406. "required": ["type", "branch"],
  8407. "additionalProperties": false
  8408. }
  8409. }
  8410. }
  8411. },
  8412. "x-codeSamples": [
  8413. {
  8414. "lang": "js",
  8415. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8416. }
  8417. ]
  8418. }
  8419. },
  8420. "/experimental/workspace/status": {
  8421. "get": {
  8422. "tags": ["workspace"],
  8423. "operationId": "experimental.workspace.status",
  8424. "parameters": [
  8425. {
  8426. "name": "directory",
  8427. "in": "query",
  8428. "required": false,
  8429. "schema": {
  8430. "type": "string"
  8431. }
  8432. },
  8433. {
  8434. "name": "workspace",
  8435. "in": "query",
  8436. "required": false,
  8437. "schema": {
  8438. "type": "string"
  8439. }
  8440. }
  8441. ],
  8442. "responses": {
  8443. "200": {
  8444. "description": "Workspace status",
  8445. "content": {
  8446. "application/json": {
  8447. "schema": {
  8448. "type": "array",
  8449. "items": {
  8450. "type": "object",
  8451. "properties": {
  8452. "workspaceID": {
  8453. "type": "string"
  8454. },
  8455. "status": {
  8456. "type": "string",
  8457. "enum": ["connected", "connecting", "disconnected", "error"]
  8458. }
  8459. },
  8460. "required": ["workspaceID", "status"],
  8461. "additionalProperties": false
  8462. },
  8463. "description": "Workspace status"
  8464. }
  8465. }
  8466. }
  8467. }
  8468. },
  8469. "description": "Get connection status for workspaces in the current project.",
  8470. "summary": "Workspace status",
  8471. "x-codeSamples": [
  8472. {
  8473. "lang": "js",
  8474. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8475. }
  8476. ]
  8477. }
  8478. },
  8479. "/experimental/workspace/{id}": {
  8480. "delete": {
  8481. "tags": ["workspace"],
  8482. "operationId": "experimental.workspace.remove",
  8483. "parameters": [
  8484. {
  8485. "name": "directory",
  8486. "in": "query",
  8487. "required": false,
  8488. "schema": {
  8489. "type": "string"
  8490. }
  8491. },
  8492. {
  8493. "name": "workspace",
  8494. "in": "query",
  8495. "required": false,
  8496. "schema": {
  8497. "type": "string"
  8498. }
  8499. },
  8500. {
  8501. "name": "id",
  8502. "in": "path",
  8503. "schema": {
  8504. "type": "string",
  8505. "pattern": "^wrk.*"
  8506. },
  8507. "required": true
  8508. }
  8509. ],
  8510. "responses": {
  8511. "200": {
  8512. "description": "Workspace removed",
  8513. "content": {
  8514. "application/json": {
  8515. "schema": {
  8516. "$ref": "#/components/schemas/Workspace"
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "400": {
  8522. "description": "Bad request",
  8523. "content": {
  8524. "application/json": {
  8525. "schema": {
  8526. "$ref": "#/components/schemas/BadRequestError"
  8527. }
  8528. }
  8529. }
  8530. }
  8531. },
  8532. "description": "Remove an existing workspace.",
  8533. "summary": "Remove workspace",
  8534. "x-codeSamples": [
  8535. {
  8536. "lang": "js",
  8537. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8538. }
  8539. ]
  8540. }
  8541. },
  8542. "/experimental/workspace/warp": {
  8543. "post": {
  8544. "tags": ["workspace"],
  8545. "operationId": "experimental.workspace.warp",
  8546. "parameters": [
  8547. {
  8548. "name": "directory",
  8549. "in": "query",
  8550. "required": false,
  8551. "schema": {
  8552. "type": "string"
  8553. }
  8554. },
  8555. {
  8556. "name": "workspace",
  8557. "in": "query",
  8558. "required": false,
  8559. "schema": {
  8560. "type": "string"
  8561. }
  8562. }
  8563. ],
  8564. "responses": {
  8565. "204": {
  8566. "description": "Session warped"
  8567. },
  8568. "400": {
  8569. "description": "WorkspaceWarpError | VcsApplyError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "anyOf": [
  8574. {
  8575. "$ref": "#/components/schemas/WorkspaceWarpError"
  8576. },
  8577. {
  8578. "$ref": "#/components/schemas/VcsApplyError"
  8579. }
  8580. ]
  8581. }
  8582. }
  8583. }
  8584. }
  8585. },
  8586. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8587. "summary": "Warp session into workspace",
  8588. "requestBody": {
  8589. "content": {
  8590. "application/json": {
  8591. "schema": {
  8592. "type": "object",
  8593. "properties": {
  8594. "id": {
  8595. "anyOf": [
  8596. {
  8597. "type": "string"
  8598. },
  8599. {
  8600. "type": "null"
  8601. }
  8602. ]
  8603. },
  8604. "sessionID": {
  8605. "type": "string"
  8606. },
  8607. "copyChanges": {
  8608. "type": "boolean"
  8609. }
  8610. },
  8611. "required": ["id", "sessionID"],
  8612. "additionalProperties": false
  8613. }
  8614. }
  8615. }
  8616. },
  8617. "x-codeSamples": [
  8618. {
  8619. "lang": "js",
  8620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8621. }
  8622. ]
  8623. }
  8624. },
  8625. "/pty/{ptyID}/connect": {
  8626. "get": {
  8627. "tags": ["pty"],
  8628. "operationId": "pty.connect",
  8629. "parameters": [
  8630. {
  8631. "name": "directory",
  8632. "in": "query",
  8633. "required": false,
  8634. "schema": {
  8635. "type": "string"
  8636. }
  8637. },
  8638. {
  8639. "name": "workspace",
  8640. "in": "query",
  8641. "required": false,
  8642. "schema": {
  8643. "type": "string"
  8644. }
  8645. },
  8646. {
  8647. "name": "ptyID",
  8648. "in": "path",
  8649. "schema": {
  8650. "type": "string",
  8651. "pattern": "^pty.*"
  8652. },
  8653. "required": true
  8654. }
  8655. ],
  8656. "responses": {
  8657. "200": {
  8658. "description": "Connected session",
  8659. "content": {
  8660. "application/json": {
  8661. "schema": {
  8662. "type": "boolean",
  8663. "description": "Connected session"
  8664. }
  8665. }
  8666. }
  8667. },
  8668. "403": {
  8669. "description": "Forbidden",
  8670. "content": {
  8671. "application/json": {
  8672. "schema": {
  8673. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "404": {
  8679. "description": "Not found",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/NotFoundError"
  8684. }
  8685. }
  8686. }
  8687. }
  8688. },
  8689. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8690. "summary": "Connect to PTY session",
  8691. "x-codeSamples": [
  8692. {
  8693. "lang": "js",
  8694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8695. }
  8696. ]
  8697. }
  8698. }
  8699. },
  8700. "components": {
  8701. "schemas": {
  8702. "Event": {
  8703. "anyOf": [
  8704. {
  8705. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8706. },
  8707. {
  8708. "$ref": "#/components/schemas/EventFileEdited"
  8709. },
  8710. {
  8711. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8712. },
  8713. {
  8714. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8715. },
  8716. {
  8717. "$ref": "#/components/schemas/EventLspUpdated"
  8718. },
  8719. {
  8720. "$ref": "#/components/schemas/EventMessagePartDelta"
  8721. },
  8722. {
  8723. "$ref": "#/components/schemas/EventPermissionAsked"
  8724. },
  8725. {
  8726. "$ref": "#/components/schemas/EventPermissionReplied"
  8727. },
  8728. {
  8729. "$ref": "#/components/schemas/EventSessionDiff"
  8730. },
  8731. {
  8732. "$ref": "#/components/schemas/EventSessionError"
  8733. },
  8734. {
  8735. "$ref": "#/components/schemas/EventInstallationUpdated"
  8736. },
  8737. {
  8738. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8739. },
  8740. {
  8741. "$ref": "#/components/schemas/EventQuestionAsked"
  8742. },
  8743. {
  8744. "$ref": "#/components/schemas/EventQuestionReplied"
  8745. },
  8746. {
  8747. "$ref": "#/components/schemas/EventQuestionRejected"
  8748. },
  8749. {
  8750. "$ref": "#/components/schemas/EventTodoUpdated"
  8751. },
  8752. {
  8753. "$ref": "#/components/schemas/EventSessionStatus"
  8754. },
  8755. {
  8756. "$ref": "#/components/schemas/EventSessionIdle"
  8757. },
  8758. {
  8759. "$ref": "#/components/schemas/EventSessionCompacted"
  8760. },
  8761. {
  8762. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8763. },
  8764. {
  8765. "$ref": "#/components/schemas/Event.tui.command.execute"
  8766. },
  8767. {
  8768. "$ref": "#/components/schemas/EventTuiToastShow1"
  8769. },
  8770. {
  8771. "$ref": "#/components/schemas/Event.tui.session.select"
  8772. },
  8773. {
  8774. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8775. },
  8776. {
  8777. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8778. },
  8779. {
  8780. "$ref": "#/components/schemas/EventCommandExecuted"
  8781. },
  8782. {
  8783. "$ref": "#/components/schemas/EventProjectUpdated"
  8784. },
  8785. {
  8786. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8787. },
  8788. {
  8789. "$ref": "#/components/schemas/EventWorkspaceReady"
  8790. },
  8791. {
  8792. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8793. },
  8794. {
  8795. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8796. },
  8797. {
  8798. "$ref": "#/components/schemas/EventWorktreeReady"
  8799. },
  8800. {
  8801. "$ref": "#/components/schemas/EventWorktreeFailed"
  8802. },
  8803. {
  8804. "$ref": "#/components/schemas/EventPtyCreated"
  8805. },
  8806. {
  8807. "$ref": "#/components/schemas/EventPtyUpdated"
  8808. },
  8809. {
  8810. "$ref": "#/components/schemas/EventPtyExited"
  8811. },
  8812. {
  8813. "$ref": "#/components/schemas/EventPtyDeleted"
  8814. },
  8815. {
  8816. "$ref": "#/components/schemas/EventMessageUpdated"
  8817. },
  8818. {
  8819. "$ref": "#/components/schemas/EventMessageRemoved"
  8820. },
  8821. {
  8822. "$ref": "#/components/schemas/EventMessagePartUpdated"
  8823. },
  8824. {
  8825. "$ref": "#/components/schemas/EventMessagePartRemoved"
  8826. },
  8827. {
  8828. "$ref": "#/components/schemas/EventSessionCreated"
  8829. },
  8830. {
  8831. "$ref": "#/components/schemas/EventSessionUpdated"
  8832. },
  8833. {
  8834. "$ref": "#/components/schemas/EventSessionDeleted"
  8835. },
  8836. {
  8837. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  8838. },
  8839. {
  8840. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  8841. },
  8842. {
  8843. "$ref": "#/components/schemas/EventSessionNextPrompted"
  8844. },
  8845. {
  8846. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  8847. },
  8848. {
  8849. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  8850. },
  8851. {
  8852. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  8853. },
  8854. {
  8855. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  8856. },
  8857. {
  8858. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  8859. },
  8860. {
  8861. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  8862. },
  8863. {
  8864. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  8865. },
  8866. {
  8867. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  8868. },
  8869. {
  8870. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  8871. },
  8872. {
  8873. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  8874. },
  8875. {
  8876. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  8877. },
  8878. {
  8879. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  8880. },
  8881. {
  8882. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  8883. },
  8884. {
  8885. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  8886. },
  8887. {
  8888. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  8889. },
  8890. {
  8891. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  8895. },
  8896. {
  8897. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  8898. },
  8899. {
  8900. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  8901. },
  8902. {
  8903. "$ref": "#/components/schemas/EventSessionNextRetried"
  8904. },
  8905. {
  8906. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  8907. },
  8908. {
  8909. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  8910. },
  8911. {
  8912. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  8913. },
  8914. {
  8915. "$ref": "#/components/schemas/EventServerConnected"
  8916. },
  8917. {
  8918. "$ref": "#/components/schemas/EventGlobalDisposed"
  8919. }
  8920. ]
  8921. },
  8922. "OAuth": {
  8923. "type": "object",
  8924. "properties": {
  8925. "type": {
  8926. "type": "string",
  8927. "enum": ["oauth"]
  8928. },
  8929. "refresh": {
  8930. "type": "string"
  8931. },
  8932. "access": {
  8933. "type": "string"
  8934. },
  8935. "expires": {
  8936. "type": "integer",
  8937. "minimum": 0
  8938. },
  8939. "accountId": {
  8940. "type": "string"
  8941. },
  8942. "enterpriseUrl": {
  8943. "type": "string"
  8944. }
  8945. },
  8946. "required": ["type", "refresh", "access", "expires"],
  8947. "additionalProperties": false
  8948. },
  8949. "ApiAuth": {
  8950. "type": "object",
  8951. "properties": {
  8952. "type": {
  8953. "type": "string",
  8954. "enum": ["api"]
  8955. },
  8956. "key": {
  8957. "type": "string"
  8958. },
  8959. "metadata": {
  8960. "type": "object",
  8961. "additionalProperties": {
  8962. "type": "string"
  8963. }
  8964. }
  8965. },
  8966. "required": ["type", "key"],
  8967. "additionalProperties": false
  8968. },
  8969. "WellKnownAuth": {
  8970. "type": "object",
  8971. "properties": {
  8972. "type": {
  8973. "type": "string",
  8974. "enum": ["wellknown"]
  8975. },
  8976. "key": {
  8977. "type": "string"
  8978. },
  8979. "token": {
  8980. "type": "string"
  8981. }
  8982. },
  8983. "required": ["type", "key", "token"],
  8984. "additionalProperties": false
  8985. },
  8986. "Auth": {
  8987. "anyOf": [
  8988. {
  8989. "$ref": "#/components/schemas/OAuth"
  8990. },
  8991. {
  8992. "$ref": "#/components/schemas/ApiAuth"
  8993. },
  8994. {
  8995. "$ref": "#/components/schemas/WellKnownAuth"
  8996. }
  8997. ]
  8998. },
  8999. "PermissionRequest": {
  9000. "type": "object",
  9001. "properties": {
  9002. "id": {
  9003. "type": "string"
  9004. },
  9005. "sessionID": {
  9006. "type": "string"
  9007. },
  9008. "permission": {
  9009. "type": "string"
  9010. },
  9011. "patterns": {
  9012. "type": "array",
  9013. "items": {
  9014. "type": "string"
  9015. }
  9016. },
  9017. "metadata": {
  9018. "type": "object"
  9019. },
  9020. "always": {
  9021. "type": "array",
  9022. "items": {
  9023. "type": "string"
  9024. }
  9025. },
  9026. "tool": {
  9027. "type": "object",
  9028. "properties": {
  9029. "messageID": {
  9030. "type": "string"
  9031. },
  9032. "callID": {
  9033. "type": "string"
  9034. }
  9035. },
  9036. "required": ["messageID", "callID"],
  9037. "additionalProperties": false
  9038. }
  9039. },
  9040. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9041. "additionalProperties": false
  9042. },
  9043. "SnapshotFileDiff": {
  9044. "type": "object",
  9045. "properties": {
  9046. "file": {
  9047. "type": "string"
  9048. },
  9049. "patch": {
  9050. "type": "string"
  9051. },
  9052. "additions": {
  9053. "type": "integer",
  9054. "minimum": 0
  9055. },
  9056. "deletions": {
  9057. "type": "integer",
  9058. "minimum": 0
  9059. },
  9060. "status": {
  9061. "type": "string",
  9062. "enum": ["added", "deleted", "modified"]
  9063. }
  9064. },
  9065. "required": ["file", "patch", "additions", "deletions"],
  9066. "additionalProperties": false
  9067. },
  9068. "ProviderAuthError": {
  9069. "type": "object",
  9070. "properties": {
  9071. "name": {
  9072. "type": "string",
  9073. "enum": ["ProviderAuthError"]
  9074. },
  9075. "data": {
  9076. "type": "object",
  9077. "properties": {
  9078. "providerID": {
  9079. "type": "string"
  9080. },
  9081. "message": {
  9082. "type": "string"
  9083. }
  9084. },
  9085. "required": ["providerID", "message"],
  9086. "additionalProperties": false
  9087. }
  9088. },
  9089. "required": ["name", "data"],
  9090. "additionalProperties": false
  9091. },
  9092. "UnknownError": {
  9093. "type": "object",
  9094. "properties": {
  9095. "name": {
  9096. "type": "string",
  9097. "enum": ["UnknownError"]
  9098. },
  9099. "data": {
  9100. "type": "object",
  9101. "properties": {
  9102. "message": {
  9103. "type": "string"
  9104. }
  9105. },
  9106. "required": ["message"],
  9107. "additionalProperties": false
  9108. }
  9109. },
  9110. "required": ["name", "data"],
  9111. "additionalProperties": false
  9112. },
  9113. "MessageOutputLengthError": {
  9114. "type": "object",
  9115. "properties": {
  9116. "name": {
  9117. "type": "string",
  9118. "enum": ["MessageOutputLengthError"]
  9119. },
  9120. "data": {
  9121. "type": "object",
  9122. "properties": {}
  9123. }
  9124. },
  9125. "required": ["name", "data"],
  9126. "additionalProperties": false
  9127. },
  9128. "MessageAbortedError": {
  9129. "type": "object",
  9130. "properties": {
  9131. "name": {
  9132. "type": "string",
  9133. "enum": ["MessageAbortedError"]
  9134. },
  9135. "data": {
  9136. "type": "object",
  9137. "properties": {
  9138. "message": {
  9139. "type": "string"
  9140. }
  9141. },
  9142. "required": ["message"],
  9143. "additionalProperties": false
  9144. }
  9145. },
  9146. "required": ["name", "data"],
  9147. "additionalProperties": false
  9148. },
  9149. "StructuredOutputError": {
  9150. "type": "object",
  9151. "properties": {
  9152. "name": {
  9153. "type": "string",
  9154. "enum": ["StructuredOutputError"]
  9155. },
  9156. "data": {
  9157. "type": "object",
  9158. "properties": {
  9159. "message": {
  9160. "type": "string"
  9161. },
  9162. "retries": {
  9163. "type": "integer",
  9164. "minimum": 0
  9165. }
  9166. },
  9167. "required": ["message", "retries"],
  9168. "additionalProperties": false
  9169. }
  9170. },
  9171. "required": ["name", "data"],
  9172. "additionalProperties": false
  9173. },
  9174. "ContextOverflowError": {
  9175. "type": "object",
  9176. "properties": {
  9177. "name": {
  9178. "type": "string",
  9179. "enum": ["ContextOverflowError"]
  9180. },
  9181. "data": {
  9182. "type": "object",
  9183. "properties": {
  9184. "message": {
  9185. "type": "string"
  9186. },
  9187. "responseBody": {
  9188. "type": "string"
  9189. }
  9190. },
  9191. "required": ["message"],
  9192. "additionalProperties": false
  9193. }
  9194. },
  9195. "required": ["name", "data"],
  9196. "additionalProperties": false
  9197. },
  9198. "APIError": {
  9199. "type": "object",
  9200. "properties": {
  9201. "name": {
  9202. "type": "string",
  9203. "enum": ["APIError"]
  9204. },
  9205. "data": {
  9206. "type": "object",
  9207. "properties": {
  9208. "message": {
  9209. "type": "string"
  9210. },
  9211. "statusCode": {
  9212. "type": "integer",
  9213. "minimum": 0
  9214. },
  9215. "isRetryable": {
  9216. "type": "boolean"
  9217. },
  9218. "responseHeaders": {
  9219. "type": "object",
  9220. "additionalProperties": {
  9221. "type": "string"
  9222. }
  9223. },
  9224. "responseBody": {
  9225. "type": "string"
  9226. },
  9227. "metadata": {
  9228. "type": "object",
  9229. "additionalProperties": {
  9230. "type": "string"
  9231. }
  9232. }
  9233. },
  9234. "required": ["message", "isRetryable"],
  9235. "additionalProperties": false
  9236. }
  9237. },
  9238. "required": ["name", "data"],
  9239. "additionalProperties": false
  9240. },
  9241. "QuestionOption": {
  9242. "type": "object",
  9243. "properties": {
  9244. "label": {
  9245. "type": "string",
  9246. "description": "Display text (1-5 words, concise)"
  9247. },
  9248. "description": {
  9249. "type": "string",
  9250. "description": "Explanation of choice"
  9251. }
  9252. },
  9253. "required": ["label", "description"],
  9254. "additionalProperties": false
  9255. },
  9256. "QuestionInfo": {
  9257. "type": "object",
  9258. "properties": {
  9259. "question": {
  9260. "type": "string",
  9261. "description": "Complete question"
  9262. },
  9263. "header": {
  9264. "type": "string",
  9265. "description": "Very short label (max 30 chars)"
  9266. },
  9267. "options": {
  9268. "type": "array",
  9269. "items": {
  9270. "$ref": "#/components/schemas/QuestionOption"
  9271. },
  9272. "description": "Available choices"
  9273. },
  9274. "multiple": {
  9275. "type": "boolean"
  9276. },
  9277. "custom": {
  9278. "type": "boolean"
  9279. }
  9280. },
  9281. "required": ["question", "header", "options"],
  9282. "additionalProperties": false
  9283. },
  9284. "QuestionTool": {
  9285. "type": "object",
  9286. "properties": {
  9287. "messageID": {
  9288. "type": "string"
  9289. },
  9290. "callID": {
  9291. "type": "string"
  9292. }
  9293. },
  9294. "required": ["messageID", "callID"],
  9295. "additionalProperties": false
  9296. },
  9297. "QuestionRequest": {
  9298. "type": "object",
  9299. "properties": {
  9300. "id": {
  9301. "type": "string"
  9302. },
  9303. "sessionID": {
  9304. "type": "string"
  9305. },
  9306. "questions": {
  9307. "type": "array",
  9308. "items": {
  9309. "$ref": "#/components/schemas/QuestionInfo"
  9310. },
  9311. "description": "Questions to ask"
  9312. },
  9313. "tool": {
  9314. "$ref": "#/components/schemas/QuestionTool"
  9315. }
  9316. },
  9317. "required": ["id", "sessionID", "questions"],
  9318. "additionalProperties": false
  9319. },
  9320. "QuestionAnswer": {
  9321. "type": "array",
  9322. "items": {
  9323. "type": "string"
  9324. }
  9325. },
  9326. "QuestionReplied": {
  9327. "type": "object",
  9328. "properties": {
  9329. "sessionID": {
  9330. "type": "string"
  9331. },
  9332. "requestID": {
  9333. "type": "string"
  9334. },
  9335. "answers": {
  9336. "type": "array",
  9337. "items": {
  9338. "$ref": "#/components/schemas/QuestionAnswer"
  9339. }
  9340. }
  9341. },
  9342. "required": ["sessionID", "requestID", "answers"],
  9343. "additionalProperties": false
  9344. },
  9345. "QuestionRejected": {
  9346. "type": "object",
  9347. "properties": {
  9348. "sessionID": {
  9349. "type": "string"
  9350. },
  9351. "requestID": {
  9352. "type": "string"
  9353. }
  9354. },
  9355. "required": ["sessionID", "requestID"],
  9356. "additionalProperties": false
  9357. },
  9358. "Todo": {
  9359. "type": "object",
  9360. "properties": {
  9361. "content": {
  9362. "type": "string",
  9363. "description": "Brief description of the task"
  9364. },
  9365. "status": {
  9366. "type": "string",
  9367. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9368. },
  9369. "priority": {
  9370. "type": "string",
  9371. "description": "Priority level of the task: high, medium, low"
  9372. }
  9373. },
  9374. "required": ["content", "status", "priority"],
  9375. "additionalProperties": false
  9376. },
  9377. "SessionStatus": {
  9378. "anyOf": [
  9379. {
  9380. "type": "object",
  9381. "properties": {
  9382. "type": {
  9383. "type": "string",
  9384. "enum": ["idle"]
  9385. }
  9386. },
  9387. "required": ["type"],
  9388. "additionalProperties": false
  9389. },
  9390. {
  9391. "type": "object",
  9392. "properties": {
  9393. "type": {
  9394. "type": "string",
  9395. "enum": ["retry"]
  9396. },
  9397. "attempt": {
  9398. "type": "integer",
  9399. "minimum": 0
  9400. },
  9401. "message": {
  9402. "type": "string"
  9403. },
  9404. "next": {
  9405. "type": "integer",
  9406. "minimum": 0
  9407. }
  9408. },
  9409. "required": ["type", "attempt", "message", "next"],
  9410. "additionalProperties": false
  9411. },
  9412. {
  9413. "type": "object",
  9414. "properties": {
  9415. "type": {
  9416. "type": "string",
  9417. "enum": ["busy"]
  9418. }
  9419. },
  9420. "required": ["type"],
  9421. "additionalProperties": false
  9422. }
  9423. ]
  9424. },
  9425. "Event.tui.prompt.append": {
  9426. "type": "object",
  9427. "properties": {
  9428. "id": {
  9429. "type": "string"
  9430. },
  9431. "type": {
  9432. "type": "string",
  9433. "enum": ["tui.prompt.append"]
  9434. },
  9435. "properties": {
  9436. "type": "object",
  9437. "properties": {
  9438. "text": {
  9439. "type": "string"
  9440. }
  9441. },
  9442. "required": ["text"],
  9443. "additionalProperties": false
  9444. }
  9445. },
  9446. "required": ["id", "type", "properties"],
  9447. "additionalProperties": false
  9448. },
  9449. "Event.tui.command.execute": {
  9450. "type": "object",
  9451. "properties": {
  9452. "id": {
  9453. "type": "string"
  9454. },
  9455. "type": {
  9456. "type": "string",
  9457. "enum": ["tui.command.execute"]
  9458. },
  9459. "properties": {
  9460. "type": "object",
  9461. "properties": {
  9462. "command": {
  9463. "anyOf": [
  9464. {
  9465. "type": "string",
  9466. "enum": [
  9467. "session.list",
  9468. "session.new",
  9469. "session.share",
  9470. "session.interrupt",
  9471. "session.compact",
  9472. "session.page.up",
  9473. "session.page.down",
  9474. "session.line.up",
  9475. "session.line.down",
  9476. "session.half.page.up",
  9477. "session.half.page.down",
  9478. "session.first",
  9479. "session.last",
  9480. "prompt.clear",
  9481. "prompt.submit",
  9482. "agent.cycle"
  9483. ]
  9484. },
  9485. {
  9486. "type": "string"
  9487. }
  9488. ]
  9489. }
  9490. },
  9491. "required": ["command"],
  9492. "additionalProperties": false
  9493. }
  9494. },
  9495. "required": ["id", "type", "properties"],
  9496. "additionalProperties": false
  9497. },
  9498. "Event.tui.toast.show": {
  9499. "type": "object",
  9500. "properties": {
  9501. "id": {
  9502. "type": "string"
  9503. },
  9504. "type": {
  9505. "type": "string",
  9506. "enum": ["tui.toast.show"]
  9507. },
  9508. "properties": {
  9509. "type": "object",
  9510. "properties": {
  9511. "title": {
  9512. "type": "string"
  9513. },
  9514. "message": {
  9515. "type": "string"
  9516. },
  9517. "variant": {
  9518. "type": "string",
  9519. "enum": ["info", "success", "warning", "error"]
  9520. },
  9521. "duration": {
  9522. "type": "integer",
  9523. "exclusiveMinimum": 0
  9524. }
  9525. },
  9526. "required": ["message", "variant"],
  9527. "additionalProperties": false
  9528. }
  9529. },
  9530. "required": ["id", "type", "properties"],
  9531. "additionalProperties": false
  9532. },
  9533. "Event.tui.session.select": {
  9534. "type": "object",
  9535. "properties": {
  9536. "id": {
  9537. "type": "string"
  9538. },
  9539. "type": {
  9540. "type": "string",
  9541. "enum": ["tui.session.select"]
  9542. },
  9543. "properties": {
  9544. "type": "object",
  9545. "properties": {
  9546. "sessionID": {
  9547. "type": "string",
  9548. "description": "Session ID to navigate to"
  9549. }
  9550. },
  9551. "required": ["sessionID"],
  9552. "additionalProperties": false
  9553. }
  9554. },
  9555. "required": ["id", "type", "properties"],
  9556. "additionalProperties": false
  9557. },
  9558. "Project": {
  9559. "type": "object",
  9560. "properties": {
  9561. "id": {
  9562. "type": "string"
  9563. },
  9564. "worktree": {
  9565. "type": "string"
  9566. },
  9567. "vcs": {
  9568. "type": "string",
  9569. "enum": ["git"]
  9570. },
  9571. "name": {
  9572. "type": "string"
  9573. },
  9574. "icon": {
  9575. "type": "object",
  9576. "properties": {
  9577. "url": {
  9578. "type": "string"
  9579. },
  9580. "override": {
  9581. "type": "string"
  9582. },
  9583. "color": {
  9584. "type": "string"
  9585. }
  9586. },
  9587. "additionalProperties": false
  9588. },
  9589. "commands": {
  9590. "type": "object",
  9591. "properties": {
  9592. "start": {
  9593. "type": "string",
  9594. "description": "Startup script to run when creating a new workspace (worktree)"
  9595. }
  9596. },
  9597. "additionalProperties": false
  9598. },
  9599. "time": {
  9600. "type": "object",
  9601. "properties": {
  9602. "created": {
  9603. "type": "integer",
  9604. "minimum": 0
  9605. },
  9606. "updated": {
  9607. "type": "integer",
  9608. "minimum": 0
  9609. },
  9610. "initialized": {
  9611. "type": "integer",
  9612. "minimum": 0
  9613. }
  9614. },
  9615. "required": ["created", "updated"],
  9616. "additionalProperties": false
  9617. },
  9618. "sandboxes": {
  9619. "type": "array",
  9620. "items": {
  9621. "type": "string"
  9622. }
  9623. }
  9624. },
  9625. "required": ["id", "worktree", "time", "sandboxes"],
  9626. "additionalProperties": false
  9627. },
  9628. "Pty": {
  9629. "type": "object",
  9630. "properties": {
  9631. "id": {
  9632. "type": "string"
  9633. },
  9634. "title": {
  9635. "type": "string"
  9636. },
  9637. "command": {
  9638. "type": "string"
  9639. },
  9640. "args": {
  9641. "type": "array",
  9642. "items": {
  9643. "type": "string"
  9644. }
  9645. },
  9646. "cwd": {
  9647. "type": "string"
  9648. },
  9649. "status": {
  9650. "type": "string",
  9651. "enum": ["running", "exited"]
  9652. },
  9653. "pid": {
  9654. "type": "integer",
  9655. "exclusiveMinimum": 0
  9656. }
  9657. },
  9658. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9659. "additionalProperties": false
  9660. },
  9661. "OutputFormatText": {
  9662. "type": "object",
  9663. "properties": {
  9664. "type": {
  9665. "type": "string",
  9666. "enum": ["text"]
  9667. }
  9668. },
  9669. "required": ["type"],
  9670. "additionalProperties": false
  9671. },
  9672. "JSONSchema": {
  9673. "type": "object"
  9674. },
  9675. "OutputFormatJsonSchema": {
  9676. "type": "object",
  9677. "properties": {
  9678. "type": {
  9679. "type": "string",
  9680. "enum": ["json_schema"]
  9681. },
  9682. "schema": {
  9683. "$ref": "#/components/schemas/JSONSchema"
  9684. },
  9685. "retryCount": {
  9686. "type": "integer",
  9687. "minimum": 0
  9688. }
  9689. },
  9690. "required": ["type", "schema"],
  9691. "additionalProperties": false
  9692. },
  9693. "OutputFormat": {
  9694. "anyOf": [
  9695. {
  9696. "$ref": "#/components/schemas/OutputFormatText"
  9697. },
  9698. {
  9699. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9700. }
  9701. ]
  9702. },
  9703. "UserMessage": {
  9704. "type": "object",
  9705. "properties": {
  9706. "id": {
  9707. "type": "string"
  9708. },
  9709. "sessionID": {
  9710. "type": "string"
  9711. },
  9712. "role": {
  9713. "type": "string",
  9714. "enum": ["user"]
  9715. },
  9716. "time": {
  9717. "type": "object",
  9718. "properties": {
  9719. "created": {
  9720. "type": "integer",
  9721. "minimum": 0
  9722. }
  9723. },
  9724. "required": ["created"],
  9725. "additionalProperties": false
  9726. },
  9727. "format": {
  9728. "$ref": "#/components/schemas/OutputFormat"
  9729. },
  9730. "summary": {
  9731. "type": "object",
  9732. "properties": {
  9733. "title": {
  9734. "type": "string"
  9735. },
  9736. "body": {
  9737. "type": "string"
  9738. },
  9739. "diffs": {
  9740. "type": "array",
  9741. "items": {
  9742. "$ref": "#/components/schemas/SnapshotFileDiff"
  9743. }
  9744. }
  9745. },
  9746. "required": ["diffs"],
  9747. "additionalProperties": false
  9748. },
  9749. "agent": {
  9750. "type": "string"
  9751. },
  9752. "model": {
  9753. "type": "object",
  9754. "properties": {
  9755. "providerID": {
  9756. "type": "string"
  9757. },
  9758. "modelID": {
  9759. "type": "string"
  9760. },
  9761. "variant": {
  9762. "type": "string"
  9763. }
  9764. },
  9765. "required": ["providerID", "modelID"],
  9766. "additionalProperties": false
  9767. },
  9768. "system": {
  9769. "type": "string"
  9770. },
  9771. "tools": {
  9772. "type": "object",
  9773. "additionalProperties": {
  9774. "type": "boolean"
  9775. }
  9776. }
  9777. },
  9778. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9779. "additionalProperties": false
  9780. },
  9781. "AssistantMessage": {
  9782. "type": "object",
  9783. "properties": {
  9784. "id": {
  9785. "type": "string"
  9786. },
  9787. "sessionID": {
  9788. "type": "string"
  9789. },
  9790. "role": {
  9791. "type": "string",
  9792. "enum": ["assistant"]
  9793. },
  9794. "time": {
  9795. "type": "object",
  9796. "properties": {
  9797. "created": {
  9798. "type": "integer",
  9799. "minimum": 0
  9800. },
  9801. "completed": {
  9802. "type": "integer",
  9803. "minimum": 0
  9804. }
  9805. },
  9806. "required": ["created"],
  9807. "additionalProperties": false
  9808. },
  9809. "error": {
  9810. "anyOf": [
  9811. {
  9812. "$ref": "#/components/schemas/ProviderAuthError"
  9813. },
  9814. {
  9815. "$ref": "#/components/schemas/UnknownError"
  9816. },
  9817. {
  9818. "$ref": "#/components/schemas/MessageOutputLengthError"
  9819. },
  9820. {
  9821. "$ref": "#/components/schemas/MessageAbortedError"
  9822. },
  9823. {
  9824. "$ref": "#/components/schemas/StructuredOutputError"
  9825. },
  9826. {
  9827. "$ref": "#/components/schemas/ContextOverflowError"
  9828. },
  9829. {
  9830. "$ref": "#/components/schemas/APIError"
  9831. }
  9832. ]
  9833. },
  9834. "parentID": {
  9835. "type": "string"
  9836. },
  9837. "modelID": {
  9838. "type": "string"
  9839. },
  9840. "providerID": {
  9841. "type": "string"
  9842. },
  9843. "mode": {
  9844. "type": "string"
  9845. },
  9846. "agent": {
  9847. "type": "string"
  9848. },
  9849. "path": {
  9850. "type": "object",
  9851. "properties": {
  9852. "cwd": {
  9853. "type": "string"
  9854. },
  9855. "root": {
  9856. "type": "string"
  9857. }
  9858. },
  9859. "required": ["cwd", "root"],
  9860. "additionalProperties": false
  9861. },
  9862. "summary": {
  9863. "type": "boolean"
  9864. },
  9865. "cost": {
  9866. "type": "number"
  9867. },
  9868. "tokens": {
  9869. "type": "object",
  9870. "properties": {
  9871. "total": {
  9872. "type": "integer",
  9873. "minimum": 0
  9874. },
  9875. "input": {
  9876. "type": "integer",
  9877. "minimum": 0
  9878. },
  9879. "output": {
  9880. "type": "integer",
  9881. "minimum": 0
  9882. },
  9883. "reasoning": {
  9884. "type": "integer",
  9885. "minimum": 0
  9886. },
  9887. "cache": {
  9888. "type": "object",
  9889. "properties": {
  9890. "read": {
  9891. "type": "integer",
  9892. "minimum": 0
  9893. },
  9894. "write": {
  9895. "type": "integer",
  9896. "minimum": 0
  9897. }
  9898. },
  9899. "required": ["read", "write"],
  9900. "additionalProperties": false
  9901. }
  9902. },
  9903. "required": ["input", "output", "reasoning", "cache"],
  9904. "additionalProperties": false
  9905. },
  9906. "structured": {},
  9907. "variant": {
  9908. "type": "string"
  9909. },
  9910. "finish": {
  9911. "type": "string"
  9912. }
  9913. },
  9914. "required": [
  9915. "id",
  9916. "sessionID",
  9917. "role",
  9918. "time",
  9919. "parentID",
  9920. "modelID",
  9921. "providerID",
  9922. "mode",
  9923. "agent",
  9924. "path",
  9925. "cost",
  9926. "tokens"
  9927. ],
  9928. "additionalProperties": false
  9929. },
  9930. "Message": {
  9931. "anyOf": [
  9932. {
  9933. "$ref": "#/components/schemas/UserMessage"
  9934. },
  9935. {
  9936. "$ref": "#/components/schemas/AssistantMessage"
  9937. }
  9938. ]
  9939. },
  9940. "TextPart": {
  9941. "type": "object",
  9942. "properties": {
  9943. "id": {
  9944. "type": "string"
  9945. },
  9946. "sessionID": {
  9947. "type": "string"
  9948. },
  9949. "messageID": {
  9950. "type": "string"
  9951. },
  9952. "type": {
  9953. "type": "string",
  9954. "enum": ["text"]
  9955. },
  9956. "text": {
  9957. "type": "string"
  9958. },
  9959. "synthetic": {
  9960. "type": "boolean"
  9961. },
  9962. "ignored": {
  9963. "type": "boolean"
  9964. },
  9965. "time": {
  9966. "type": "object",
  9967. "properties": {
  9968. "start": {
  9969. "type": "integer",
  9970. "minimum": 0
  9971. },
  9972. "end": {
  9973. "type": "integer",
  9974. "minimum": 0
  9975. }
  9976. },
  9977. "required": ["start"],
  9978. "additionalProperties": false
  9979. },
  9980. "metadata": {
  9981. "type": "object"
  9982. }
  9983. },
  9984. "required": ["id", "sessionID", "messageID", "type", "text"],
  9985. "additionalProperties": false
  9986. },
  9987. "SubtaskPart": {
  9988. "type": "object",
  9989. "properties": {
  9990. "id": {
  9991. "type": "string"
  9992. },
  9993. "sessionID": {
  9994. "type": "string"
  9995. },
  9996. "messageID": {
  9997. "type": "string"
  9998. },
  9999. "type": {
  10000. "type": "string",
  10001. "enum": ["subtask"]
  10002. },
  10003. "prompt": {
  10004. "type": "string"
  10005. },
  10006. "description": {
  10007. "type": "string"
  10008. },
  10009. "agent": {
  10010. "type": "string"
  10011. },
  10012. "model": {
  10013. "type": "object",
  10014. "properties": {
  10015. "providerID": {
  10016. "type": "string"
  10017. },
  10018. "modelID": {
  10019. "type": "string"
  10020. }
  10021. },
  10022. "required": ["providerID", "modelID"],
  10023. "additionalProperties": false
  10024. },
  10025. "command": {
  10026. "type": "string"
  10027. }
  10028. },
  10029. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10030. "additionalProperties": false
  10031. },
  10032. "ReasoningPart": {
  10033. "type": "object",
  10034. "properties": {
  10035. "id": {
  10036. "type": "string"
  10037. },
  10038. "sessionID": {
  10039. "type": "string"
  10040. },
  10041. "messageID": {
  10042. "type": "string"
  10043. },
  10044. "type": {
  10045. "type": "string",
  10046. "enum": ["reasoning"]
  10047. },
  10048. "text": {
  10049. "type": "string"
  10050. },
  10051. "metadata": {
  10052. "type": "object"
  10053. },
  10054. "time": {
  10055. "type": "object",
  10056. "properties": {
  10057. "start": {
  10058. "type": "integer",
  10059. "minimum": 0
  10060. },
  10061. "end": {
  10062. "type": "integer",
  10063. "minimum": 0
  10064. }
  10065. },
  10066. "required": ["start"],
  10067. "additionalProperties": false
  10068. }
  10069. },
  10070. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10071. "additionalProperties": false
  10072. },
  10073. "FilePartSourceText": {
  10074. "type": "object",
  10075. "properties": {
  10076. "value": {
  10077. "type": "string"
  10078. },
  10079. "start": {
  10080. "type": "integer",
  10081. "minimum": 0
  10082. },
  10083. "end": {
  10084. "type": "integer",
  10085. "minimum": 0
  10086. }
  10087. },
  10088. "required": ["value", "start", "end"],
  10089. "additionalProperties": false
  10090. },
  10091. "FileSource": {
  10092. "type": "object",
  10093. "properties": {
  10094. "text": {
  10095. "$ref": "#/components/schemas/FilePartSourceText"
  10096. },
  10097. "type": {
  10098. "type": "string",
  10099. "enum": ["file"]
  10100. },
  10101. "path": {
  10102. "type": "string"
  10103. }
  10104. },
  10105. "required": ["text", "type", "path"],
  10106. "additionalProperties": false
  10107. },
  10108. "Range": {
  10109. "type": "object",
  10110. "properties": {
  10111. "start": {
  10112. "type": "object",
  10113. "properties": {
  10114. "line": {
  10115. "type": "integer",
  10116. "minimum": 0
  10117. },
  10118. "character": {
  10119. "type": "integer",
  10120. "minimum": 0
  10121. }
  10122. },
  10123. "required": ["line", "character"],
  10124. "additionalProperties": false
  10125. },
  10126. "end": {
  10127. "type": "object",
  10128. "properties": {
  10129. "line": {
  10130. "type": "integer",
  10131. "minimum": 0
  10132. },
  10133. "character": {
  10134. "type": "integer",
  10135. "minimum": 0
  10136. }
  10137. },
  10138. "required": ["line", "character"],
  10139. "additionalProperties": false
  10140. }
  10141. },
  10142. "required": ["start", "end"],
  10143. "additionalProperties": false
  10144. },
  10145. "SymbolSource": {
  10146. "type": "object",
  10147. "properties": {
  10148. "text": {
  10149. "$ref": "#/components/schemas/FilePartSourceText"
  10150. },
  10151. "type": {
  10152. "type": "string",
  10153. "enum": ["symbol"]
  10154. },
  10155. "path": {
  10156. "type": "string"
  10157. },
  10158. "range": {
  10159. "$ref": "#/components/schemas/Range"
  10160. },
  10161. "name": {
  10162. "type": "string"
  10163. },
  10164. "kind": {
  10165. "type": "integer",
  10166. "minimum": 0
  10167. }
  10168. },
  10169. "required": ["text", "type", "path", "range", "name", "kind"],
  10170. "additionalProperties": false
  10171. },
  10172. "ResourceSource": {
  10173. "type": "object",
  10174. "properties": {
  10175. "text": {
  10176. "$ref": "#/components/schemas/FilePartSourceText"
  10177. },
  10178. "type": {
  10179. "type": "string",
  10180. "enum": ["resource"]
  10181. },
  10182. "clientName": {
  10183. "type": "string"
  10184. },
  10185. "uri": {
  10186. "type": "string"
  10187. }
  10188. },
  10189. "required": ["text", "type", "clientName", "uri"],
  10190. "additionalProperties": false
  10191. },
  10192. "FilePartSource": {
  10193. "anyOf": [
  10194. {
  10195. "$ref": "#/components/schemas/FileSource"
  10196. },
  10197. {
  10198. "$ref": "#/components/schemas/SymbolSource"
  10199. },
  10200. {
  10201. "$ref": "#/components/schemas/ResourceSource"
  10202. }
  10203. ]
  10204. },
  10205. "FilePart": {
  10206. "type": "object",
  10207. "properties": {
  10208. "id": {
  10209. "type": "string"
  10210. },
  10211. "sessionID": {
  10212. "type": "string"
  10213. },
  10214. "messageID": {
  10215. "type": "string"
  10216. },
  10217. "type": {
  10218. "type": "string",
  10219. "enum": ["file"]
  10220. },
  10221. "mime": {
  10222. "type": "string"
  10223. },
  10224. "filename": {
  10225. "type": "string"
  10226. },
  10227. "url": {
  10228. "type": "string"
  10229. },
  10230. "source": {
  10231. "$ref": "#/components/schemas/FilePartSource"
  10232. }
  10233. },
  10234. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10235. "additionalProperties": false
  10236. },
  10237. "ToolStatePending": {
  10238. "type": "object",
  10239. "properties": {
  10240. "status": {
  10241. "type": "string",
  10242. "enum": ["pending"]
  10243. },
  10244. "input": {
  10245. "type": "object"
  10246. },
  10247. "raw": {
  10248. "type": "string"
  10249. }
  10250. },
  10251. "required": ["status", "input", "raw"],
  10252. "additionalProperties": false
  10253. },
  10254. "ToolStateRunning": {
  10255. "type": "object",
  10256. "properties": {
  10257. "status": {
  10258. "type": "string",
  10259. "enum": ["running"]
  10260. },
  10261. "input": {
  10262. "type": "object"
  10263. },
  10264. "title": {
  10265. "type": "string"
  10266. },
  10267. "metadata": {
  10268. "type": "object"
  10269. },
  10270. "time": {
  10271. "type": "object",
  10272. "properties": {
  10273. "start": {
  10274. "type": "integer",
  10275. "minimum": 0
  10276. }
  10277. },
  10278. "required": ["start"],
  10279. "additionalProperties": false
  10280. }
  10281. },
  10282. "required": ["status", "input", "time"],
  10283. "additionalProperties": false
  10284. },
  10285. "ToolStateCompleted": {
  10286. "type": "object",
  10287. "properties": {
  10288. "status": {
  10289. "type": "string",
  10290. "enum": ["completed"]
  10291. },
  10292. "input": {
  10293. "type": "object"
  10294. },
  10295. "output": {
  10296. "type": "string"
  10297. },
  10298. "title": {
  10299. "type": "string"
  10300. },
  10301. "metadata": {
  10302. "type": "object"
  10303. },
  10304. "time": {
  10305. "type": "object",
  10306. "properties": {
  10307. "start": {
  10308. "type": "integer",
  10309. "minimum": 0
  10310. },
  10311. "end": {
  10312. "type": "integer",
  10313. "minimum": 0
  10314. },
  10315. "compacted": {
  10316. "type": "integer",
  10317. "minimum": 0
  10318. }
  10319. },
  10320. "required": ["start", "end"],
  10321. "additionalProperties": false
  10322. },
  10323. "attachments": {
  10324. "type": "array",
  10325. "items": {
  10326. "$ref": "#/components/schemas/FilePart"
  10327. }
  10328. }
  10329. },
  10330. "required": ["status", "input", "output", "title", "metadata", "time"],
  10331. "additionalProperties": false
  10332. },
  10333. "ToolStateError": {
  10334. "type": "object",
  10335. "properties": {
  10336. "status": {
  10337. "type": "string",
  10338. "enum": ["error"]
  10339. },
  10340. "input": {
  10341. "type": "object"
  10342. },
  10343. "error": {
  10344. "type": "string"
  10345. },
  10346. "metadata": {
  10347. "type": "object"
  10348. },
  10349. "time": {
  10350. "type": "object",
  10351. "properties": {
  10352. "start": {
  10353. "type": "integer",
  10354. "minimum": 0
  10355. },
  10356. "end": {
  10357. "type": "integer",
  10358. "minimum": 0
  10359. }
  10360. },
  10361. "required": ["start", "end"],
  10362. "additionalProperties": false
  10363. }
  10364. },
  10365. "required": ["status", "input", "error", "time"],
  10366. "additionalProperties": false
  10367. },
  10368. "ToolState": {
  10369. "anyOf": [
  10370. {
  10371. "$ref": "#/components/schemas/ToolStatePending"
  10372. },
  10373. {
  10374. "$ref": "#/components/schemas/ToolStateRunning"
  10375. },
  10376. {
  10377. "$ref": "#/components/schemas/ToolStateCompleted"
  10378. },
  10379. {
  10380. "$ref": "#/components/schemas/ToolStateError"
  10381. }
  10382. ]
  10383. },
  10384. "ToolPart": {
  10385. "type": "object",
  10386. "properties": {
  10387. "id": {
  10388. "type": "string"
  10389. },
  10390. "sessionID": {
  10391. "type": "string"
  10392. },
  10393. "messageID": {
  10394. "type": "string"
  10395. },
  10396. "type": {
  10397. "type": "string",
  10398. "enum": ["tool"]
  10399. },
  10400. "callID": {
  10401. "type": "string"
  10402. },
  10403. "tool": {
  10404. "type": "string"
  10405. },
  10406. "state": {
  10407. "$ref": "#/components/schemas/ToolState"
  10408. },
  10409. "metadata": {
  10410. "type": "object"
  10411. }
  10412. },
  10413. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10414. "additionalProperties": false
  10415. },
  10416. "StepStartPart": {
  10417. "type": "object",
  10418. "properties": {
  10419. "id": {
  10420. "type": "string"
  10421. },
  10422. "sessionID": {
  10423. "type": "string"
  10424. },
  10425. "messageID": {
  10426. "type": "string"
  10427. },
  10428. "type": {
  10429. "type": "string",
  10430. "enum": ["step-start"]
  10431. },
  10432. "snapshot": {
  10433. "type": "string"
  10434. }
  10435. },
  10436. "required": ["id", "sessionID", "messageID", "type"],
  10437. "additionalProperties": false
  10438. },
  10439. "StepFinishPart": {
  10440. "type": "object",
  10441. "properties": {
  10442. "id": {
  10443. "type": "string"
  10444. },
  10445. "sessionID": {
  10446. "type": "string"
  10447. },
  10448. "messageID": {
  10449. "type": "string"
  10450. },
  10451. "type": {
  10452. "type": "string",
  10453. "enum": ["step-finish"]
  10454. },
  10455. "reason": {
  10456. "type": "string"
  10457. },
  10458. "snapshot": {
  10459. "type": "string"
  10460. },
  10461. "cost": {
  10462. "type": "number"
  10463. },
  10464. "tokens": {
  10465. "type": "object",
  10466. "properties": {
  10467. "total": {
  10468. "type": "integer",
  10469. "minimum": 0
  10470. },
  10471. "input": {
  10472. "type": "integer",
  10473. "minimum": 0
  10474. },
  10475. "output": {
  10476. "type": "integer",
  10477. "minimum": 0
  10478. },
  10479. "reasoning": {
  10480. "type": "integer",
  10481. "minimum": 0
  10482. },
  10483. "cache": {
  10484. "type": "object",
  10485. "properties": {
  10486. "read": {
  10487. "type": "integer",
  10488. "minimum": 0
  10489. },
  10490. "write": {
  10491. "type": "integer",
  10492. "minimum": 0
  10493. }
  10494. },
  10495. "required": ["read", "write"],
  10496. "additionalProperties": false
  10497. }
  10498. },
  10499. "required": ["input", "output", "reasoning", "cache"],
  10500. "additionalProperties": false
  10501. }
  10502. },
  10503. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10504. "additionalProperties": false
  10505. },
  10506. "SnapshotPart": {
  10507. "type": "object",
  10508. "properties": {
  10509. "id": {
  10510. "type": "string"
  10511. },
  10512. "sessionID": {
  10513. "type": "string"
  10514. },
  10515. "messageID": {
  10516. "type": "string"
  10517. },
  10518. "type": {
  10519. "type": "string",
  10520. "enum": ["snapshot"]
  10521. },
  10522. "snapshot": {
  10523. "type": "string"
  10524. }
  10525. },
  10526. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10527. "additionalProperties": false
  10528. },
  10529. "PatchPart": {
  10530. "type": "object",
  10531. "properties": {
  10532. "id": {
  10533. "type": "string"
  10534. },
  10535. "sessionID": {
  10536. "type": "string"
  10537. },
  10538. "messageID": {
  10539. "type": "string"
  10540. },
  10541. "type": {
  10542. "type": "string",
  10543. "enum": ["patch"]
  10544. },
  10545. "hash": {
  10546. "type": "string"
  10547. },
  10548. "files": {
  10549. "type": "array",
  10550. "items": {
  10551. "type": "string"
  10552. }
  10553. }
  10554. },
  10555. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10556. "additionalProperties": false
  10557. },
  10558. "AgentPart": {
  10559. "type": "object",
  10560. "properties": {
  10561. "id": {
  10562. "type": "string"
  10563. },
  10564. "sessionID": {
  10565. "type": "string"
  10566. },
  10567. "messageID": {
  10568. "type": "string"
  10569. },
  10570. "type": {
  10571. "type": "string",
  10572. "enum": ["agent"]
  10573. },
  10574. "name": {
  10575. "type": "string"
  10576. },
  10577. "source": {
  10578. "type": "object",
  10579. "properties": {
  10580. "value": {
  10581. "type": "string"
  10582. },
  10583. "start": {
  10584. "type": "integer",
  10585. "minimum": 0
  10586. },
  10587. "end": {
  10588. "type": "integer",
  10589. "minimum": 0
  10590. }
  10591. },
  10592. "required": ["value", "start", "end"],
  10593. "additionalProperties": false
  10594. }
  10595. },
  10596. "required": ["id", "sessionID", "messageID", "type", "name"],
  10597. "additionalProperties": false
  10598. },
  10599. "RetryPart": {
  10600. "type": "object",
  10601. "properties": {
  10602. "id": {
  10603. "type": "string"
  10604. },
  10605. "sessionID": {
  10606. "type": "string"
  10607. },
  10608. "messageID": {
  10609. "type": "string"
  10610. },
  10611. "type": {
  10612. "type": "string",
  10613. "enum": ["retry"]
  10614. },
  10615. "attempt": {
  10616. "type": "integer",
  10617. "minimum": 0
  10618. },
  10619. "error": {
  10620. "$ref": "#/components/schemas/APIError"
  10621. },
  10622. "time": {
  10623. "type": "object",
  10624. "properties": {
  10625. "created": {
  10626. "type": "integer",
  10627. "minimum": 0
  10628. }
  10629. },
  10630. "required": ["created"],
  10631. "additionalProperties": false
  10632. }
  10633. },
  10634. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10635. "additionalProperties": false
  10636. },
  10637. "CompactionPart": {
  10638. "type": "object",
  10639. "properties": {
  10640. "id": {
  10641. "type": "string"
  10642. },
  10643. "sessionID": {
  10644. "type": "string"
  10645. },
  10646. "messageID": {
  10647. "type": "string"
  10648. },
  10649. "type": {
  10650. "type": "string",
  10651. "enum": ["compaction"]
  10652. },
  10653. "auto": {
  10654. "type": "boolean"
  10655. },
  10656. "overflow": {
  10657. "type": "boolean"
  10658. },
  10659. "tail_start_id": {
  10660. "type": "string"
  10661. }
  10662. },
  10663. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10664. "additionalProperties": false
  10665. },
  10666. "Part": {
  10667. "anyOf": [
  10668. {
  10669. "$ref": "#/components/schemas/TextPart"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/SubtaskPart"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/ReasoningPart"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/FilePart"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/ToolPart"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/StepStartPart"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/StepFinishPart"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/SnapshotPart"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/PatchPart"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/AgentPart"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/RetryPart"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/CompactionPart"
  10703. }
  10704. ]
  10705. },
  10706. "PermissionAction": {
  10707. "type": "string",
  10708. "enum": ["allow", "deny", "ask"]
  10709. },
  10710. "PermissionRule": {
  10711. "type": "object",
  10712. "properties": {
  10713. "permission": {
  10714. "type": "string"
  10715. },
  10716. "pattern": {
  10717. "type": "string"
  10718. },
  10719. "action": {
  10720. "$ref": "#/components/schemas/PermissionAction"
  10721. }
  10722. },
  10723. "required": ["permission", "pattern", "action"],
  10724. "additionalProperties": false
  10725. },
  10726. "PermissionRuleset": {
  10727. "type": "array",
  10728. "items": {
  10729. "$ref": "#/components/schemas/PermissionRule"
  10730. }
  10731. },
  10732. "Session": {
  10733. "type": "object",
  10734. "properties": {
  10735. "id": {
  10736. "type": "string"
  10737. },
  10738. "slug": {
  10739. "type": "string"
  10740. },
  10741. "projectID": {
  10742. "type": "string"
  10743. },
  10744. "workspaceID": {
  10745. "type": "string"
  10746. },
  10747. "directory": {
  10748. "type": "string"
  10749. },
  10750. "path": {
  10751. "type": "string"
  10752. },
  10753. "parentID": {
  10754. "type": "string"
  10755. },
  10756. "summary": {
  10757. "type": "object",
  10758. "properties": {
  10759. "additions": {
  10760. "type": "integer",
  10761. "minimum": 0
  10762. },
  10763. "deletions": {
  10764. "type": "integer",
  10765. "minimum": 0
  10766. },
  10767. "files": {
  10768. "type": "integer",
  10769. "minimum": 0
  10770. },
  10771. "diffs": {
  10772. "type": "array",
  10773. "items": {
  10774. "$ref": "#/components/schemas/SnapshotFileDiff"
  10775. }
  10776. }
  10777. },
  10778. "required": ["additions", "deletions", "files"],
  10779. "additionalProperties": false
  10780. },
  10781. "share": {
  10782. "type": "object",
  10783. "properties": {
  10784. "url": {
  10785. "type": "string"
  10786. }
  10787. },
  10788. "required": ["url"],
  10789. "additionalProperties": false
  10790. },
  10791. "title": {
  10792. "type": "string"
  10793. },
  10794. "agent": {
  10795. "type": "string"
  10796. },
  10797. "model": {
  10798. "type": "object",
  10799. "properties": {
  10800. "id": {
  10801. "type": "string"
  10802. },
  10803. "providerID": {
  10804. "type": "string"
  10805. },
  10806. "variant": {
  10807. "type": "string"
  10808. }
  10809. },
  10810. "required": ["id", "providerID"],
  10811. "additionalProperties": false
  10812. },
  10813. "version": {
  10814. "type": "string"
  10815. },
  10816. "time": {
  10817. "type": "object",
  10818. "properties": {
  10819. "created": {
  10820. "type": "integer",
  10821. "minimum": 0
  10822. },
  10823. "updated": {
  10824. "type": "integer",
  10825. "minimum": 0
  10826. },
  10827. "compacting": {
  10828. "type": "integer",
  10829. "minimum": 0
  10830. },
  10831. "archived": {
  10832. "type": "number"
  10833. }
  10834. },
  10835. "required": ["created", "updated"],
  10836. "additionalProperties": false
  10837. },
  10838. "permission": {
  10839. "$ref": "#/components/schemas/PermissionRuleset"
  10840. },
  10841. "revert": {
  10842. "type": "object",
  10843. "properties": {
  10844. "messageID": {
  10845. "type": "string"
  10846. },
  10847. "partID": {
  10848. "type": "string"
  10849. },
  10850. "snapshot": {
  10851. "type": "string"
  10852. },
  10853. "diff": {
  10854. "type": "string"
  10855. }
  10856. },
  10857. "required": ["messageID"],
  10858. "additionalProperties": false
  10859. }
  10860. },
  10861. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  10862. "additionalProperties": false
  10863. },
  10864. "Prompt": {
  10865. "type": "object",
  10866. "properties": {
  10867. "text": {
  10868. "type": "string"
  10869. },
  10870. "files": {
  10871. "type": "array",
  10872. "items": {
  10873. "$ref": "#/components/schemas/PromptFileAttachment"
  10874. }
  10875. },
  10876. "agents": {
  10877. "type": "array",
  10878. "items": {
  10879. "$ref": "#/components/schemas/PromptAgentAttachment"
  10880. }
  10881. }
  10882. },
  10883. "required": ["text"],
  10884. "additionalProperties": false
  10885. },
  10886. "GlobalEvent": {
  10887. "type": "object",
  10888. "properties": {
  10889. "directory": {
  10890. "type": "string"
  10891. },
  10892. "project": {
  10893. "type": "string"
  10894. },
  10895. "workspace": {
  10896. "type": "string"
  10897. },
  10898. "payload": {
  10899. "anyOf": [
  10900. {
  10901. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10902. },
  10903. {
  10904. "$ref": "#/components/schemas/EventFileEdited"
  10905. },
  10906. {
  10907. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10908. },
  10909. {
  10910. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10911. },
  10912. {
  10913. "$ref": "#/components/schemas/EventLspUpdated"
  10914. },
  10915. {
  10916. "$ref": "#/components/schemas/EventMessagePartDelta"
  10917. },
  10918. {
  10919. "$ref": "#/components/schemas/EventPermissionAsked"
  10920. },
  10921. {
  10922. "$ref": "#/components/schemas/EventPermissionReplied"
  10923. },
  10924. {
  10925. "$ref": "#/components/schemas/EventSessionDiff"
  10926. },
  10927. {
  10928. "$ref": "#/components/schemas/EventSessionError"
  10929. },
  10930. {
  10931. "$ref": "#/components/schemas/EventInstallationUpdated"
  10932. },
  10933. {
  10934. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10935. },
  10936. {
  10937. "$ref": "#/components/schemas/EventQuestionAsked"
  10938. },
  10939. {
  10940. "$ref": "#/components/schemas/EventQuestionReplied"
  10941. },
  10942. {
  10943. "$ref": "#/components/schemas/EventQuestionRejected"
  10944. },
  10945. {
  10946. "$ref": "#/components/schemas/EventTodoUpdated"
  10947. },
  10948. {
  10949. "$ref": "#/components/schemas/EventSessionStatus"
  10950. },
  10951. {
  10952. "$ref": "#/components/schemas/EventSessionIdle"
  10953. },
  10954. {
  10955. "$ref": "#/components/schemas/EventSessionCompacted"
  10956. },
  10957. {
  10958. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10959. },
  10960. {
  10961. "$ref": "#/components/schemas/Event.tui.command.execute"
  10962. },
  10963. {
  10964. "$ref": "#/components/schemas/Event.tui.toast.show"
  10965. },
  10966. {
  10967. "$ref": "#/components/schemas/Event.tui.session.select"
  10968. },
  10969. {
  10970. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10971. },
  10972. {
  10973. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10974. },
  10975. {
  10976. "$ref": "#/components/schemas/EventCommandExecuted"
  10977. },
  10978. {
  10979. "$ref": "#/components/schemas/EventProjectUpdated"
  10980. },
  10981. {
  10982. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10983. },
  10984. {
  10985. "$ref": "#/components/schemas/EventWorkspaceReady"
  10986. },
  10987. {
  10988. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10989. },
  10990. {
  10991. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10992. },
  10993. {
  10994. "$ref": "#/components/schemas/EventWorktreeReady"
  10995. },
  10996. {
  10997. "$ref": "#/components/schemas/EventWorktreeFailed"
  10998. },
  10999. {
  11000. "$ref": "#/components/schemas/EventPtyCreated"
  11001. },
  11002. {
  11003. "$ref": "#/components/schemas/EventPtyUpdated"
  11004. },
  11005. {
  11006. "$ref": "#/components/schemas/EventPtyExited"
  11007. },
  11008. {
  11009. "$ref": "#/components/schemas/EventPtyDeleted"
  11010. },
  11011. {
  11012. "$ref": "#/components/schemas/EventMessageUpdated"
  11013. },
  11014. {
  11015. "$ref": "#/components/schemas/EventMessageRemoved"
  11016. },
  11017. {
  11018. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11022. },
  11023. {
  11024. "$ref": "#/components/schemas/EventSessionCreated"
  11025. },
  11026. {
  11027. "$ref": "#/components/schemas/EventSessionUpdated"
  11028. },
  11029. {
  11030. "$ref": "#/components/schemas/EventSessionDeleted"
  11031. },
  11032. {
  11033. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11034. },
  11035. {
  11036. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11037. },
  11038. {
  11039. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11040. },
  11041. {
  11042. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11043. },
  11044. {
  11045. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11046. },
  11047. {
  11048. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11049. },
  11050. {
  11051. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11052. },
  11053. {
  11054. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11055. },
  11056. {
  11057. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11058. },
  11059. {
  11060. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11061. },
  11062. {
  11063. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11064. },
  11065. {
  11066. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11067. },
  11068. {
  11069. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11070. },
  11071. {
  11072. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11073. },
  11074. {
  11075. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11076. },
  11077. {
  11078. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11079. },
  11080. {
  11081. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11082. },
  11083. {
  11084. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11085. },
  11086. {
  11087. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11088. },
  11089. {
  11090. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11091. },
  11092. {
  11093. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11094. },
  11095. {
  11096. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11097. },
  11098. {
  11099. "$ref": "#/components/schemas/EventSessionNextRetried"
  11100. },
  11101. {
  11102. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11106. },
  11107. {
  11108. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11109. },
  11110. {
  11111. "$ref": "#/components/schemas/EventServerConnected"
  11112. },
  11113. {
  11114. "$ref": "#/components/schemas/EventGlobalDisposed"
  11115. },
  11116. {
  11117. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11118. },
  11119. {
  11120. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11121. },
  11122. {
  11123. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11124. },
  11125. {
  11126. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11127. },
  11128. {
  11129. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11130. },
  11131. {
  11132. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11133. },
  11134. {
  11135. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11136. },
  11137. {
  11138. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11139. },
  11140. {
  11141. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11142. },
  11143. {
  11144. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11145. },
  11146. {
  11147. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11148. },
  11149. {
  11150. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11151. },
  11152. {
  11153. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11154. },
  11155. {
  11156. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11157. },
  11158. {
  11159. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11160. },
  11161. {
  11162. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11163. },
  11164. {
  11165. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11166. },
  11167. {
  11168. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11169. },
  11170. {
  11171. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11172. },
  11173. {
  11174. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11175. },
  11176. {
  11177. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11178. },
  11179. {
  11180. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11181. },
  11182. {
  11183. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11184. },
  11185. {
  11186. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11187. },
  11188. {
  11189. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11190. },
  11191. {
  11192. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11193. },
  11194. {
  11195. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11196. },
  11197. {
  11198. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11199. },
  11200. {
  11201. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11202. },
  11203. {
  11204. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11205. },
  11206. {
  11207. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11208. },
  11209. {
  11210. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11211. },
  11212. {
  11213. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11214. }
  11215. ]
  11216. }
  11217. },
  11218. "required": ["directory", "payload"],
  11219. "additionalProperties": false
  11220. },
  11221. "LogLevel": {
  11222. "type": "string",
  11223. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11224. "description": "Log level"
  11225. },
  11226. "ServerConfig": {
  11227. "type": "object",
  11228. "properties": {
  11229. "port": {
  11230. "type": "integer",
  11231. "exclusiveMinimum": 0
  11232. },
  11233. "hostname": {
  11234. "type": "string"
  11235. },
  11236. "mdns": {
  11237. "type": "boolean"
  11238. },
  11239. "mdnsDomain": {
  11240. "type": "string"
  11241. },
  11242. "cors": {
  11243. "type": "array",
  11244. "items": {
  11245. "type": "string"
  11246. }
  11247. }
  11248. },
  11249. "additionalProperties": false,
  11250. "description": "Server configuration for opencode serve and web commands"
  11251. },
  11252. "PermissionActionConfig": {
  11253. "type": "string",
  11254. "enum": ["ask", "allow", "deny"]
  11255. },
  11256. "PermissionObjectConfig": {
  11257. "type": "object",
  11258. "additionalProperties": {
  11259. "$ref": "#/components/schemas/PermissionActionConfig"
  11260. }
  11261. },
  11262. "PermissionRuleConfig": {
  11263. "anyOf": [
  11264. {
  11265. "$ref": "#/components/schemas/PermissionActionConfig"
  11266. },
  11267. {
  11268. "$ref": "#/components/schemas/PermissionObjectConfig"
  11269. }
  11270. ]
  11271. },
  11272. "PermissionConfig": {
  11273. "anyOf": [
  11274. {
  11275. "$ref": "#/components/schemas/PermissionActionConfig"
  11276. },
  11277. {
  11278. "type": "object",
  11279. "properties": {
  11280. "read": {
  11281. "$ref": "#/components/schemas/PermissionRuleConfig"
  11282. },
  11283. "edit": {
  11284. "$ref": "#/components/schemas/PermissionRuleConfig"
  11285. },
  11286. "glob": {
  11287. "$ref": "#/components/schemas/PermissionRuleConfig"
  11288. },
  11289. "grep": {
  11290. "$ref": "#/components/schemas/PermissionRuleConfig"
  11291. },
  11292. "list": {
  11293. "$ref": "#/components/schemas/PermissionRuleConfig"
  11294. },
  11295. "bash": {
  11296. "$ref": "#/components/schemas/PermissionRuleConfig"
  11297. },
  11298. "task": {
  11299. "$ref": "#/components/schemas/PermissionRuleConfig"
  11300. },
  11301. "external_directory": {
  11302. "$ref": "#/components/schemas/PermissionRuleConfig"
  11303. },
  11304. "todowrite": {
  11305. "$ref": "#/components/schemas/PermissionActionConfig"
  11306. },
  11307. "question": {
  11308. "$ref": "#/components/schemas/PermissionActionConfig"
  11309. },
  11310. "webfetch": {
  11311. "$ref": "#/components/schemas/PermissionActionConfig"
  11312. },
  11313. "websearch": {
  11314. "$ref": "#/components/schemas/PermissionActionConfig"
  11315. },
  11316. "lsp": {
  11317. "$ref": "#/components/schemas/PermissionRuleConfig"
  11318. },
  11319. "doom_loop": {
  11320. "$ref": "#/components/schemas/PermissionActionConfig"
  11321. },
  11322. "skill": {
  11323. "$ref": "#/components/schemas/PermissionRuleConfig"
  11324. }
  11325. },
  11326. "additionalProperties": {
  11327. "$ref": "#/components/schemas/PermissionRuleConfig"
  11328. }
  11329. }
  11330. ]
  11331. },
  11332. "AgentConfig": {
  11333. "type": "object",
  11334. "properties": {
  11335. "model": {
  11336. "type": "string"
  11337. },
  11338. "variant": {
  11339. "type": "string"
  11340. },
  11341. "temperature": {
  11342. "type": "number"
  11343. },
  11344. "top_p": {
  11345. "type": "number"
  11346. },
  11347. "prompt": {
  11348. "type": "string"
  11349. },
  11350. "tools": {
  11351. "type": "object",
  11352. "additionalProperties": {
  11353. "type": "boolean"
  11354. }
  11355. },
  11356. "disable": {
  11357. "type": "boolean"
  11358. },
  11359. "description": {
  11360. "type": "string"
  11361. },
  11362. "mode": {
  11363. "type": "string",
  11364. "enum": ["subagent", "primary", "all"]
  11365. },
  11366. "hidden": {
  11367. "type": "boolean"
  11368. },
  11369. "options": {
  11370. "type": "object"
  11371. },
  11372. "color": {
  11373. "anyOf": [
  11374. {
  11375. "type": "string",
  11376. "pattern": "^#[0-9a-fA-F]{6}$"
  11377. },
  11378. {
  11379. "type": "string",
  11380. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11381. }
  11382. ],
  11383. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11384. },
  11385. "steps": {
  11386. "type": "integer",
  11387. "exclusiveMinimum": 0
  11388. },
  11389. "maxSteps": {
  11390. "type": "integer",
  11391. "exclusiveMinimum": 0
  11392. },
  11393. "permission": {
  11394. "$ref": "#/components/schemas/PermissionConfig"
  11395. }
  11396. },
  11397. "additionalProperties": {}
  11398. },
  11399. "ProviderConfig": {
  11400. "type": "object",
  11401. "properties": {
  11402. "api": {
  11403. "type": "string"
  11404. },
  11405. "name": {
  11406. "type": "string"
  11407. },
  11408. "env": {
  11409. "type": "array",
  11410. "items": {
  11411. "type": "string"
  11412. }
  11413. },
  11414. "id": {
  11415. "type": "string"
  11416. },
  11417. "npm": {
  11418. "type": "string"
  11419. },
  11420. "whitelist": {
  11421. "type": "array",
  11422. "items": {
  11423. "type": "string"
  11424. }
  11425. },
  11426. "blacklist": {
  11427. "type": "array",
  11428. "items": {
  11429. "type": "string"
  11430. }
  11431. },
  11432. "options": {
  11433. "type": "object",
  11434. "properties": {
  11435. "apiKey": {
  11436. "type": "string"
  11437. },
  11438. "baseURL": {
  11439. "type": "string"
  11440. },
  11441. "enterpriseUrl": {
  11442. "type": "string"
  11443. },
  11444. "setCacheKey": {
  11445. "type": "boolean"
  11446. },
  11447. "timeout": {
  11448. "anyOf": [
  11449. {
  11450. "type": "integer",
  11451. "exclusiveMinimum": 0
  11452. },
  11453. {
  11454. "type": "boolean",
  11455. "enum": [false]
  11456. }
  11457. ],
  11458. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11459. },
  11460. "chunkTimeout": {
  11461. "type": "integer",
  11462. "exclusiveMinimum": 0
  11463. }
  11464. },
  11465. "additionalProperties": {}
  11466. },
  11467. "models": {
  11468. "type": "object",
  11469. "additionalProperties": {
  11470. "type": "object",
  11471. "properties": {
  11472. "id": {
  11473. "type": "string"
  11474. },
  11475. "name": {
  11476. "type": "string"
  11477. },
  11478. "family": {
  11479. "type": "string"
  11480. },
  11481. "release_date": {
  11482. "type": "string"
  11483. },
  11484. "attachment": {
  11485. "type": "boolean"
  11486. },
  11487. "reasoning": {
  11488. "type": "boolean"
  11489. },
  11490. "temperature": {
  11491. "type": "boolean"
  11492. },
  11493. "tool_call": {
  11494. "type": "boolean"
  11495. },
  11496. "interleaved": {
  11497. "anyOf": [
  11498. {
  11499. "type": "boolean",
  11500. "enum": [true]
  11501. },
  11502. {
  11503. "type": "object",
  11504. "properties": {
  11505. "field": {
  11506. "type": "string",
  11507. "enum": ["reasoning_content", "reasoning_details"]
  11508. }
  11509. },
  11510. "required": ["field"],
  11511. "additionalProperties": false
  11512. }
  11513. ]
  11514. },
  11515. "cost": {
  11516. "type": "object",
  11517. "properties": {
  11518. "input": {
  11519. "type": "number"
  11520. },
  11521. "output": {
  11522. "type": "number"
  11523. },
  11524. "cache_read": {
  11525. "type": "number"
  11526. },
  11527. "cache_write": {
  11528. "type": "number"
  11529. },
  11530. "context_over_200k": {
  11531. "type": "object",
  11532. "properties": {
  11533. "input": {
  11534. "type": "number"
  11535. },
  11536. "output": {
  11537. "type": "number"
  11538. },
  11539. "cache_read": {
  11540. "type": "number"
  11541. },
  11542. "cache_write": {
  11543. "type": "number"
  11544. }
  11545. },
  11546. "required": ["input", "output"],
  11547. "additionalProperties": false
  11548. }
  11549. },
  11550. "required": ["input", "output"],
  11551. "additionalProperties": false
  11552. },
  11553. "limit": {
  11554. "type": "object",
  11555. "properties": {
  11556. "context": {
  11557. "type": "number"
  11558. },
  11559. "input": {
  11560. "type": "number"
  11561. },
  11562. "output": {
  11563. "type": "number"
  11564. }
  11565. },
  11566. "required": ["context", "output"],
  11567. "additionalProperties": false
  11568. },
  11569. "modalities": {
  11570. "type": "object",
  11571. "properties": {
  11572. "input": {
  11573. "type": "array",
  11574. "items": {
  11575. "type": "string",
  11576. "enum": ["text", "audio", "image", "video", "pdf"]
  11577. }
  11578. },
  11579. "output": {
  11580. "type": "array",
  11581. "items": {
  11582. "type": "string",
  11583. "enum": ["text", "audio", "image", "video", "pdf"]
  11584. }
  11585. }
  11586. },
  11587. "required": ["input", "output"],
  11588. "additionalProperties": false
  11589. },
  11590. "experimental": {
  11591. "type": "boolean"
  11592. },
  11593. "status": {
  11594. "type": "string",
  11595. "enum": ["alpha", "beta", "deprecated"]
  11596. },
  11597. "provider": {
  11598. "type": "object",
  11599. "properties": {
  11600. "npm": {
  11601. "type": "string"
  11602. },
  11603. "api": {
  11604. "type": "string"
  11605. }
  11606. },
  11607. "additionalProperties": false
  11608. },
  11609. "options": {
  11610. "type": "object"
  11611. },
  11612. "headers": {
  11613. "type": "object",
  11614. "additionalProperties": {
  11615. "type": "string"
  11616. }
  11617. },
  11618. "variants": {
  11619. "type": "object",
  11620. "additionalProperties": {
  11621. "type": "object",
  11622. "properties": {
  11623. "disabled": {
  11624. "type": "boolean"
  11625. }
  11626. },
  11627. "additionalProperties": {}
  11628. },
  11629. "description": "Variant-specific configuration"
  11630. }
  11631. },
  11632. "additionalProperties": false
  11633. }
  11634. }
  11635. },
  11636. "additionalProperties": false
  11637. },
  11638. "McpLocalConfig": {
  11639. "type": "object",
  11640. "properties": {
  11641. "type": {
  11642. "type": "string",
  11643. "enum": ["local"],
  11644. "description": "Type of MCP server connection"
  11645. },
  11646. "command": {
  11647. "type": "array",
  11648. "items": {
  11649. "type": "string"
  11650. },
  11651. "description": "Command and arguments to run the MCP server"
  11652. },
  11653. "environment": {
  11654. "type": "object",
  11655. "additionalProperties": {
  11656. "type": "string"
  11657. }
  11658. },
  11659. "enabled": {
  11660. "type": "boolean"
  11661. },
  11662. "timeout": {
  11663. "type": "integer",
  11664. "exclusiveMinimum": 0
  11665. }
  11666. },
  11667. "required": ["type", "command"],
  11668. "additionalProperties": false
  11669. },
  11670. "McpOAuthConfig": {
  11671. "type": "object",
  11672. "properties": {
  11673. "clientId": {
  11674. "type": "string"
  11675. },
  11676. "clientSecret": {
  11677. "type": "string"
  11678. },
  11679. "scope": {
  11680. "type": "string"
  11681. },
  11682. "redirectUri": {
  11683. "type": "string"
  11684. }
  11685. },
  11686. "additionalProperties": false
  11687. },
  11688. "McpRemoteConfig": {
  11689. "type": "object",
  11690. "properties": {
  11691. "type": {
  11692. "type": "string",
  11693. "enum": ["remote"],
  11694. "description": "Type of MCP server connection"
  11695. },
  11696. "url": {
  11697. "type": "string",
  11698. "description": "URL of the remote MCP server"
  11699. },
  11700. "enabled": {
  11701. "type": "boolean"
  11702. },
  11703. "headers": {
  11704. "type": "object",
  11705. "additionalProperties": {
  11706. "type": "string"
  11707. }
  11708. },
  11709. "oauth": {
  11710. "anyOf": [
  11711. {
  11712. "$ref": "#/components/schemas/McpOAuthConfig"
  11713. },
  11714. {
  11715. "type": "boolean",
  11716. "enum": [false]
  11717. }
  11718. ],
  11719. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  11720. },
  11721. "timeout": {
  11722. "type": "integer",
  11723. "exclusiveMinimum": 0
  11724. }
  11725. },
  11726. "required": ["type", "url"],
  11727. "additionalProperties": false
  11728. },
  11729. "LayoutConfig": {
  11730. "type": "string",
  11731. "enum": ["auto", "stretch"],
  11732. "description": "@deprecated Always uses stretch layout."
  11733. },
  11734. "Config": {
  11735. "type": "object",
  11736. "properties": {
  11737. "$schema": {
  11738. "type": "string"
  11739. },
  11740. "shell": {
  11741. "type": "string"
  11742. },
  11743. "logLevel": {
  11744. "$ref": "#/components/schemas/LogLevel"
  11745. },
  11746. "server": {
  11747. "$ref": "#/components/schemas/ServerConfig"
  11748. },
  11749. "command": {
  11750. "type": "object",
  11751. "additionalProperties": {
  11752. "type": "object",
  11753. "properties": {
  11754. "template": {
  11755. "type": "string"
  11756. },
  11757. "description": {
  11758. "type": "string"
  11759. },
  11760. "agent": {
  11761. "type": "string"
  11762. },
  11763. "model": {
  11764. "type": "string"
  11765. },
  11766. "subtask": {
  11767. "type": "boolean"
  11768. }
  11769. },
  11770. "required": ["template"],
  11771. "additionalProperties": false
  11772. }
  11773. },
  11774. "skills": {
  11775. "type": "object",
  11776. "properties": {
  11777. "paths": {
  11778. "type": "array",
  11779. "items": {
  11780. "type": "string"
  11781. }
  11782. },
  11783. "urls": {
  11784. "type": "array",
  11785. "items": {
  11786. "type": "string"
  11787. }
  11788. }
  11789. },
  11790. "additionalProperties": false
  11791. },
  11792. "watcher": {
  11793. "type": "object",
  11794. "properties": {
  11795. "ignore": {
  11796. "type": "array",
  11797. "items": {
  11798. "type": "string"
  11799. }
  11800. }
  11801. },
  11802. "additionalProperties": false
  11803. },
  11804. "snapshot": {
  11805. "type": "boolean"
  11806. },
  11807. "plugin": {
  11808. "type": "array",
  11809. "items": {
  11810. "anyOf": [
  11811. {
  11812. "type": "string"
  11813. },
  11814. {
  11815. "type": "array",
  11816. "prefixItems": [
  11817. {
  11818. "type": "string"
  11819. },
  11820. {
  11821. "type": "object"
  11822. }
  11823. ],
  11824. "maxItems": 2,
  11825. "minItems": 2
  11826. }
  11827. ]
  11828. }
  11829. },
  11830. "share": {
  11831. "type": "string",
  11832. "enum": ["manual", "auto", "disabled"]
  11833. },
  11834. "autoshare": {
  11835. "type": "boolean"
  11836. },
  11837. "autoupdate": {
  11838. "anyOf": [
  11839. {
  11840. "type": "boolean"
  11841. },
  11842. {
  11843. "type": "string",
  11844. "enum": ["notify"]
  11845. }
  11846. ],
  11847. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  11848. },
  11849. "disabled_providers": {
  11850. "type": "array",
  11851. "items": {
  11852. "type": "string"
  11853. }
  11854. },
  11855. "enabled_providers": {
  11856. "type": "array",
  11857. "items": {
  11858. "type": "string"
  11859. }
  11860. },
  11861. "model": {
  11862. "type": "string"
  11863. },
  11864. "small_model": {
  11865. "type": "string"
  11866. },
  11867. "default_agent": {
  11868. "type": "string"
  11869. },
  11870. "username": {
  11871. "type": "string"
  11872. },
  11873. "mode": {
  11874. "type": "object",
  11875. "properties": {
  11876. "build": {
  11877. "$ref": "#/components/schemas/AgentConfig"
  11878. },
  11879. "plan": {
  11880. "$ref": "#/components/schemas/AgentConfig"
  11881. }
  11882. },
  11883. "additionalProperties": {
  11884. "$ref": "#/components/schemas/AgentConfig"
  11885. }
  11886. },
  11887. "agent": {
  11888. "type": "object",
  11889. "properties": {
  11890. "plan": {
  11891. "$ref": "#/components/schemas/AgentConfig"
  11892. },
  11893. "build": {
  11894. "$ref": "#/components/schemas/AgentConfig"
  11895. },
  11896. "general": {
  11897. "$ref": "#/components/schemas/AgentConfig"
  11898. },
  11899. "explore": {
  11900. "$ref": "#/components/schemas/AgentConfig"
  11901. },
  11902. "title": {
  11903. "$ref": "#/components/schemas/AgentConfig"
  11904. },
  11905. "summary": {
  11906. "$ref": "#/components/schemas/AgentConfig"
  11907. },
  11908. "compaction": {
  11909. "$ref": "#/components/schemas/AgentConfig"
  11910. }
  11911. },
  11912. "additionalProperties": {
  11913. "$ref": "#/components/schemas/AgentConfig"
  11914. }
  11915. },
  11916. "provider": {
  11917. "type": "object",
  11918. "additionalProperties": {
  11919. "$ref": "#/components/schemas/ProviderConfig"
  11920. }
  11921. },
  11922. "mcp": {
  11923. "type": "object",
  11924. "additionalProperties": {
  11925. "anyOf": [
  11926. {
  11927. "$ref": "#/components/schemas/McpLocalConfig"
  11928. },
  11929. {
  11930. "$ref": "#/components/schemas/McpRemoteConfig"
  11931. },
  11932. {
  11933. "type": "object",
  11934. "properties": {
  11935. "enabled": {
  11936. "type": "boolean"
  11937. }
  11938. },
  11939. "required": ["enabled"],
  11940. "additionalProperties": false
  11941. }
  11942. ]
  11943. }
  11944. },
  11945. "formatter": {
  11946. "anyOf": [
  11947. {
  11948. "type": "boolean"
  11949. },
  11950. {
  11951. "type": "object",
  11952. "additionalProperties": {
  11953. "type": "object",
  11954. "properties": {
  11955. "disabled": {
  11956. "type": "boolean"
  11957. },
  11958. "command": {
  11959. "type": "array",
  11960. "items": {
  11961. "type": "string"
  11962. }
  11963. },
  11964. "environment": {
  11965. "type": "object",
  11966. "additionalProperties": {
  11967. "type": "string"
  11968. }
  11969. },
  11970. "extensions": {
  11971. "type": "array",
  11972. "items": {
  11973. "type": "string"
  11974. }
  11975. }
  11976. },
  11977. "additionalProperties": false
  11978. }
  11979. }
  11980. ],
  11981. "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."
  11982. },
  11983. "lsp": {
  11984. "anyOf": [
  11985. {
  11986. "type": "boolean"
  11987. },
  11988. {
  11989. "type": "object",
  11990. "additionalProperties": {
  11991. "anyOf": [
  11992. {
  11993. "type": "object",
  11994. "properties": {
  11995. "disabled": {
  11996. "type": "boolean",
  11997. "enum": [true]
  11998. }
  11999. },
  12000. "required": ["disabled"],
  12001. "additionalProperties": false
  12002. },
  12003. {
  12004. "type": "object",
  12005. "properties": {
  12006. "command": {
  12007. "type": "array",
  12008. "items": {
  12009. "type": "string"
  12010. }
  12011. },
  12012. "extensions": {
  12013. "type": "array",
  12014. "items": {
  12015. "type": "string"
  12016. }
  12017. },
  12018. "disabled": {
  12019. "type": "boolean"
  12020. },
  12021. "env": {
  12022. "type": "object",
  12023. "additionalProperties": {
  12024. "type": "string"
  12025. }
  12026. },
  12027. "initialization": {
  12028. "type": "object"
  12029. }
  12030. },
  12031. "required": ["command"],
  12032. "additionalProperties": false
  12033. }
  12034. ]
  12035. }
  12036. }
  12037. ],
  12038. "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."
  12039. },
  12040. "instructions": {
  12041. "type": "array",
  12042. "items": {
  12043. "type": "string"
  12044. }
  12045. },
  12046. "layout": {
  12047. "$ref": "#/components/schemas/LayoutConfig"
  12048. },
  12049. "permission": {
  12050. "$ref": "#/components/schemas/PermissionConfig"
  12051. },
  12052. "tools": {
  12053. "type": "object",
  12054. "additionalProperties": {
  12055. "type": "boolean"
  12056. }
  12057. },
  12058. "enterprise": {
  12059. "type": "object",
  12060. "properties": {
  12061. "url": {
  12062. "type": "string"
  12063. }
  12064. },
  12065. "additionalProperties": false
  12066. },
  12067. "tool_output": {
  12068. "type": "object",
  12069. "properties": {
  12070. "max_lines": {
  12071. "type": "integer",
  12072. "exclusiveMinimum": 0
  12073. },
  12074. "max_bytes": {
  12075. "type": "integer",
  12076. "exclusiveMinimum": 0
  12077. }
  12078. },
  12079. "additionalProperties": false
  12080. },
  12081. "compaction": {
  12082. "type": "object",
  12083. "properties": {
  12084. "auto": {
  12085. "type": "boolean"
  12086. },
  12087. "prune": {
  12088. "type": "boolean"
  12089. },
  12090. "tail_turns": {
  12091. "type": "integer",
  12092. "minimum": 0
  12093. },
  12094. "preserve_recent_tokens": {
  12095. "type": "integer",
  12096. "minimum": 0
  12097. },
  12098. "reserved": {
  12099. "type": "integer",
  12100. "minimum": 0
  12101. }
  12102. },
  12103. "additionalProperties": false
  12104. },
  12105. "experimental": {
  12106. "type": "object",
  12107. "properties": {
  12108. "disable_paste_summary": {
  12109. "type": "boolean"
  12110. },
  12111. "batch_tool": {
  12112. "type": "boolean"
  12113. },
  12114. "openTelemetry": {
  12115. "type": "boolean"
  12116. },
  12117. "primary_tools": {
  12118. "type": "array",
  12119. "items": {
  12120. "type": "string"
  12121. }
  12122. },
  12123. "continue_loop_on_deny": {
  12124. "type": "boolean"
  12125. },
  12126. "mcp_timeout": {
  12127. "type": "integer",
  12128. "exclusiveMinimum": 0
  12129. }
  12130. },
  12131. "additionalProperties": false
  12132. }
  12133. },
  12134. "additionalProperties": false
  12135. },
  12136. "Model": {
  12137. "type": "object",
  12138. "properties": {
  12139. "id": {
  12140. "type": "string"
  12141. },
  12142. "providerID": {
  12143. "type": "string"
  12144. },
  12145. "api": {
  12146. "type": "object",
  12147. "properties": {
  12148. "id": {
  12149. "type": "string"
  12150. },
  12151. "url": {
  12152. "type": "string"
  12153. },
  12154. "npm": {
  12155. "type": "string"
  12156. }
  12157. },
  12158. "required": ["id", "url", "npm"],
  12159. "additionalProperties": false
  12160. },
  12161. "name": {
  12162. "type": "string"
  12163. },
  12164. "family": {
  12165. "type": "string"
  12166. },
  12167. "capabilities": {
  12168. "type": "object",
  12169. "properties": {
  12170. "temperature": {
  12171. "type": "boolean"
  12172. },
  12173. "reasoning": {
  12174. "type": "boolean"
  12175. },
  12176. "attachment": {
  12177. "type": "boolean"
  12178. },
  12179. "toolcall": {
  12180. "type": "boolean"
  12181. },
  12182. "input": {
  12183. "type": "object",
  12184. "properties": {
  12185. "text": {
  12186. "type": "boolean"
  12187. },
  12188. "audio": {
  12189. "type": "boolean"
  12190. },
  12191. "image": {
  12192. "type": "boolean"
  12193. },
  12194. "video": {
  12195. "type": "boolean"
  12196. },
  12197. "pdf": {
  12198. "type": "boolean"
  12199. }
  12200. },
  12201. "required": ["text", "audio", "image", "video", "pdf"],
  12202. "additionalProperties": false
  12203. },
  12204. "output": {
  12205. "type": "object",
  12206. "properties": {
  12207. "text": {
  12208. "type": "boolean"
  12209. },
  12210. "audio": {
  12211. "type": "boolean"
  12212. },
  12213. "image": {
  12214. "type": "boolean"
  12215. },
  12216. "video": {
  12217. "type": "boolean"
  12218. },
  12219. "pdf": {
  12220. "type": "boolean"
  12221. }
  12222. },
  12223. "required": ["text", "audio", "image", "video", "pdf"],
  12224. "additionalProperties": false
  12225. },
  12226. "interleaved": {
  12227. "anyOf": [
  12228. {
  12229. "type": "boolean"
  12230. },
  12231. {
  12232. "type": "object",
  12233. "properties": {
  12234. "field": {
  12235. "type": "string",
  12236. "enum": ["reasoning_content", "reasoning_details"]
  12237. }
  12238. },
  12239. "required": ["field"],
  12240. "additionalProperties": false
  12241. }
  12242. ]
  12243. }
  12244. },
  12245. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12246. "additionalProperties": false
  12247. },
  12248. "cost": {
  12249. "type": "object",
  12250. "properties": {
  12251. "input": {
  12252. "type": "number"
  12253. },
  12254. "output": {
  12255. "type": "number"
  12256. },
  12257. "cache": {
  12258. "type": "object",
  12259. "properties": {
  12260. "read": {
  12261. "type": "number"
  12262. },
  12263. "write": {
  12264. "type": "number"
  12265. }
  12266. },
  12267. "required": ["read", "write"],
  12268. "additionalProperties": false
  12269. },
  12270. "experimentalOver200K": {
  12271. "type": "object",
  12272. "properties": {
  12273. "input": {
  12274. "type": "number"
  12275. },
  12276. "output": {
  12277. "type": "number"
  12278. },
  12279. "cache": {
  12280. "type": "object",
  12281. "properties": {
  12282. "read": {
  12283. "type": "number"
  12284. },
  12285. "write": {
  12286. "type": "number"
  12287. }
  12288. },
  12289. "required": ["read", "write"],
  12290. "additionalProperties": false
  12291. }
  12292. },
  12293. "required": ["input", "output", "cache"],
  12294. "additionalProperties": false
  12295. }
  12296. },
  12297. "required": ["input", "output", "cache"],
  12298. "additionalProperties": false
  12299. },
  12300. "limit": {
  12301. "type": "object",
  12302. "properties": {
  12303. "context": {
  12304. "type": "number"
  12305. },
  12306. "input": {
  12307. "type": "number"
  12308. },
  12309. "output": {
  12310. "type": "number"
  12311. }
  12312. },
  12313. "required": ["context", "output"],
  12314. "additionalProperties": false
  12315. },
  12316. "status": {
  12317. "type": "string",
  12318. "enum": ["alpha", "beta", "deprecated", "active"]
  12319. },
  12320. "options": {
  12321. "type": "object"
  12322. },
  12323. "headers": {
  12324. "type": "object",
  12325. "additionalProperties": {
  12326. "type": "string"
  12327. }
  12328. },
  12329. "release_date": {
  12330. "type": "string"
  12331. },
  12332. "variants": {
  12333. "type": "object",
  12334. "additionalProperties": {
  12335. "type": "object"
  12336. }
  12337. }
  12338. },
  12339. "required": [
  12340. "id",
  12341. "providerID",
  12342. "api",
  12343. "name",
  12344. "capabilities",
  12345. "cost",
  12346. "limit",
  12347. "status",
  12348. "options",
  12349. "headers",
  12350. "release_date"
  12351. ],
  12352. "additionalProperties": false
  12353. },
  12354. "Provider": {
  12355. "type": "object",
  12356. "properties": {
  12357. "id": {
  12358. "type": "string"
  12359. },
  12360. "name": {
  12361. "type": "string"
  12362. },
  12363. "source": {
  12364. "type": "string",
  12365. "enum": ["env", "config", "custom", "api"]
  12366. },
  12367. "env": {
  12368. "type": "array",
  12369. "items": {
  12370. "type": "string"
  12371. }
  12372. },
  12373. "key": {
  12374. "type": "string"
  12375. },
  12376. "options": {
  12377. "type": "object"
  12378. },
  12379. "models": {
  12380. "type": "object",
  12381. "additionalProperties": {
  12382. "$ref": "#/components/schemas/Model"
  12383. }
  12384. }
  12385. },
  12386. "required": ["id", "name", "source", "env", "options", "models"],
  12387. "additionalProperties": false
  12388. },
  12389. "ConsoleState": {
  12390. "type": "object",
  12391. "properties": {
  12392. "consoleManagedProviders": {
  12393. "type": "array",
  12394. "items": {
  12395. "type": "string"
  12396. }
  12397. },
  12398. "activeOrgName": {
  12399. "type": "string"
  12400. },
  12401. "switchableOrgCount": {
  12402. "type": "integer",
  12403. "minimum": 0
  12404. }
  12405. },
  12406. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12407. "additionalProperties": false
  12408. },
  12409. "ToolListItem": {
  12410. "type": "object",
  12411. "properties": {
  12412. "id": {
  12413. "type": "string"
  12414. },
  12415. "description": {
  12416. "type": "string"
  12417. },
  12418. "parameters": {}
  12419. },
  12420. "required": ["id", "description", "parameters"],
  12421. "additionalProperties": false
  12422. },
  12423. "ToolList": {
  12424. "type": "array",
  12425. "items": {
  12426. "$ref": "#/components/schemas/ToolListItem"
  12427. }
  12428. },
  12429. "ToolIDs": {
  12430. "type": "array",
  12431. "items": {
  12432. "type": "string"
  12433. }
  12434. },
  12435. "WorktreeCreateInput": {
  12436. "type": "object",
  12437. "properties": {
  12438. "name": {
  12439. "type": "string"
  12440. },
  12441. "startCommand": {
  12442. "type": "string",
  12443. "description": "Additional startup script to run after the project's start command"
  12444. }
  12445. },
  12446. "additionalProperties": false
  12447. },
  12448. "Worktree": {
  12449. "type": "object",
  12450. "properties": {
  12451. "name": {
  12452. "type": "string"
  12453. },
  12454. "branch": {
  12455. "type": "string"
  12456. },
  12457. "directory": {
  12458. "type": "string"
  12459. }
  12460. },
  12461. "required": ["name", "branch", "directory"],
  12462. "additionalProperties": false
  12463. },
  12464. "WorktreeRemoveInput": {
  12465. "type": "object",
  12466. "properties": {
  12467. "directory": {
  12468. "type": "string"
  12469. }
  12470. },
  12471. "required": ["directory"],
  12472. "additionalProperties": false
  12473. },
  12474. "WorktreeResetInput": {
  12475. "type": "object",
  12476. "properties": {
  12477. "directory": {
  12478. "type": "string"
  12479. }
  12480. },
  12481. "required": ["directory"],
  12482. "additionalProperties": false
  12483. },
  12484. "ProjectSummary": {
  12485. "type": "object",
  12486. "properties": {
  12487. "id": {
  12488. "type": "string"
  12489. },
  12490. "name": {
  12491. "type": "string"
  12492. },
  12493. "worktree": {
  12494. "type": "string"
  12495. }
  12496. },
  12497. "required": ["id", "worktree"],
  12498. "additionalProperties": false
  12499. },
  12500. "GlobalSession": {
  12501. "type": "object",
  12502. "properties": {
  12503. "id": {
  12504. "type": "string"
  12505. },
  12506. "slug": {
  12507. "type": "string"
  12508. },
  12509. "projectID": {
  12510. "type": "string"
  12511. },
  12512. "workspaceID": {
  12513. "type": "string"
  12514. },
  12515. "directory": {
  12516. "type": "string"
  12517. },
  12518. "path": {
  12519. "type": "string"
  12520. },
  12521. "parentID": {
  12522. "type": "string"
  12523. },
  12524. "summary": {
  12525. "type": "object",
  12526. "properties": {
  12527. "additions": {
  12528. "type": "integer",
  12529. "minimum": 0
  12530. },
  12531. "deletions": {
  12532. "type": "integer",
  12533. "minimum": 0
  12534. },
  12535. "files": {
  12536. "type": "integer",
  12537. "minimum": 0
  12538. },
  12539. "diffs": {
  12540. "type": "array",
  12541. "items": {
  12542. "$ref": "#/components/schemas/SnapshotFileDiff"
  12543. }
  12544. }
  12545. },
  12546. "required": ["additions", "deletions", "files"],
  12547. "additionalProperties": false
  12548. },
  12549. "share": {
  12550. "type": "object",
  12551. "properties": {
  12552. "url": {
  12553. "type": "string"
  12554. }
  12555. },
  12556. "required": ["url"],
  12557. "additionalProperties": false
  12558. },
  12559. "title": {
  12560. "type": "string"
  12561. },
  12562. "agent": {
  12563. "type": "string"
  12564. },
  12565. "model": {
  12566. "type": "object",
  12567. "properties": {
  12568. "id": {
  12569. "type": "string"
  12570. },
  12571. "providerID": {
  12572. "type": "string"
  12573. },
  12574. "variant": {
  12575. "type": "string"
  12576. }
  12577. },
  12578. "required": ["id", "providerID"],
  12579. "additionalProperties": false
  12580. },
  12581. "version": {
  12582. "type": "string"
  12583. },
  12584. "time": {
  12585. "type": "object",
  12586. "properties": {
  12587. "created": {
  12588. "type": "integer",
  12589. "minimum": 0
  12590. },
  12591. "updated": {
  12592. "type": "integer",
  12593. "minimum": 0
  12594. },
  12595. "compacting": {
  12596. "type": "integer",
  12597. "minimum": 0
  12598. },
  12599. "archived": {
  12600. "type": "number"
  12601. }
  12602. },
  12603. "required": ["created", "updated"],
  12604. "additionalProperties": false
  12605. },
  12606. "permission": {
  12607. "$ref": "#/components/schemas/PermissionRuleset"
  12608. },
  12609. "revert": {
  12610. "type": "object",
  12611. "properties": {
  12612. "messageID": {
  12613. "type": "string"
  12614. },
  12615. "partID": {
  12616. "type": "string"
  12617. },
  12618. "snapshot": {
  12619. "type": "string"
  12620. },
  12621. "diff": {
  12622. "type": "string"
  12623. }
  12624. },
  12625. "required": ["messageID"],
  12626. "additionalProperties": false
  12627. },
  12628. "project": {
  12629. "anyOf": [
  12630. {
  12631. "$ref": "#/components/schemas/ProjectSummary"
  12632. },
  12633. {
  12634. "type": "null"
  12635. }
  12636. ]
  12637. }
  12638. },
  12639. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  12640. "additionalProperties": false
  12641. },
  12642. "McpResource": {
  12643. "type": "object",
  12644. "properties": {
  12645. "name": {
  12646. "type": "string"
  12647. },
  12648. "uri": {
  12649. "type": "string"
  12650. },
  12651. "description": {
  12652. "type": "string"
  12653. },
  12654. "mimeType": {
  12655. "type": "string"
  12656. },
  12657. "client": {
  12658. "type": "string"
  12659. }
  12660. },
  12661. "required": ["name", "uri", "client"],
  12662. "additionalProperties": false
  12663. },
  12664. "Symbol": {
  12665. "type": "object",
  12666. "properties": {
  12667. "name": {
  12668. "type": "string"
  12669. },
  12670. "kind": {
  12671. "type": "integer",
  12672. "minimum": 0
  12673. },
  12674. "location": {
  12675. "type": "object",
  12676. "properties": {
  12677. "uri": {
  12678. "type": "string"
  12679. },
  12680. "range": {
  12681. "$ref": "#/components/schemas/Range"
  12682. }
  12683. },
  12684. "required": ["uri", "range"],
  12685. "additionalProperties": false
  12686. }
  12687. },
  12688. "required": ["name", "kind", "location"],
  12689. "additionalProperties": false
  12690. },
  12691. "FileNode": {
  12692. "type": "object",
  12693. "properties": {
  12694. "name": {
  12695. "type": "string"
  12696. },
  12697. "path": {
  12698. "type": "string"
  12699. },
  12700. "absolute": {
  12701. "type": "string"
  12702. },
  12703. "type": {
  12704. "type": "string",
  12705. "enum": ["file", "directory"]
  12706. },
  12707. "ignored": {
  12708. "type": "boolean"
  12709. }
  12710. },
  12711. "required": ["name", "path", "absolute", "type", "ignored"],
  12712. "additionalProperties": false
  12713. },
  12714. "FileContent": {
  12715. "type": "object",
  12716. "properties": {
  12717. "type": {
  12718. "type": "string",
  12719. "enum": ["text", "binary"]
  12720. },
  12721. "content": {
  12722. "type": "string"
  12723. },
  12724. "diff": {
  12725. "type": "string"
  12726. },
  12727. "patch": {
  12728. "type": "object",
  12729. "properties": {
  12730. "oldFileName": {
  12731. "type": "string"
  12732. },
  12733. "newFileName": {
  12734. "type": "string"
  12735. },
  12736. "oldHeader": {
  12737. "type": "string"
  12738. },
  12739. "newHeader": {
  12740. "type": "string"
  12741. },
  12742. "hunks": {
  12743. "type": "array",
  12744. "items": {
  12745. "type": "object",
  12746. "properties": {
  12747. "oldStart": {
  12748. "type": "integer",
  12749. "minimum": 0
  12750. },
  12751. "oldLines": {
  12752. "type": "integer",
  12753. "minimum": 0
  12754. },
  12755. "newStart": {
  12756. "type": "integer",
  12757. "minimum": 0
  12758. },
  12759. "newLines": {
  12760. "type": "integer",
  12761. "minimum": 0
  12762. },
  12763. "lines": {
  12764. "type": "array",
  12765. "items": {
  12766. "type": "string"
  12767. }
  12768. }
  12769. },
  12770. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  12771. "additionalProperties": false
  12772. }
  12773. },
  12774. "index": {
  12775. "type": "string"
  12776. }
  12777. },
  12778. "required": ["oldFileName", "newFileName", "hunks"],
  12779. "additionalProperties": false
  12780. },
  12781. "encoding": {
  12782. "type": "string",
  12783. "enum": ["base64"]
  12784. },
  12785. "mimeType": {
  12786. "type": "string"
  12787. }
  12788. },
  12789. "required": ["type", "content"],
  12790. "additionalProperties": false
  12791. },
  12792. "File": {
  12793. "type": "object",
  12794. "properties": {
  12795. "path": {
  12796. "type": "string"
  12797. },
  12798. "added": {
  12799. "type": "integer",
  12800. "minimum": 0
  12801. },
  12802. "removed": {
  12803. "type": "integer",
  12804. "minimum": 0
  12805. },
  12806. "status": {
  12807. "type": "string",
  12808. "enum": ["added", "deleted", "modified"]
  12809. }
  12810. },
  12811. "required": ["path", "added", "removed", "status"],
  12812. "additionalProperties": false
  12813. },
  12814. "Path": {
  12815. "type": "object",
  12816. "properties": {
  12817. "home": {
  12818. "type": "string"
  12819. },
  12820. "state": {
  12821. "type": "string"
  12822. },
  12823. "config": {
  12824. "type": "string"
  12825. },
  12826. "worktree": {
  12827. "type": "string"
  12828. },
  12829. "directory": {
  12830. "type": "string"
  12831. }
  12832. },
  12833. "required": ["home", "state", "config", "worktree", "directory"],
  12834. "additionalProperties": false
  12835. },
  12836. "VcsInfo": {
  12837. "type": "object",
  12838. "properties": {
  12839. "branch": {
  12840. "type": "string"
  12841. },
  12842. "default_branch": {
  12843. "type": "string"
  12844. }
  12845. },
  12846. "additionalProperties": false
  12847. },
  12848. "VcsFileStatus": {
  12849. "type": "object",
  12850. "properties": {
  12851. "file": {
  12852. "type": "string"
  12853. },
  12854. "additions": {
  12855. "type": "integer",
  12856. "minimum": 0
  12857. },
  12858. "deletions": {
  12859. "type": "integer",
  12860. "minimum": 0
  12861. },
  12862. "status": {
  12863. "type": "string",
  12864. "enum": ["added", "deleted", "modified"]
  12865. }
  12866. },
  12867. "required": ["file", "additions", "deletions", "status"],
  12868. "additionalProperties": false
  12869. },
  12870. "VcsFileDiff": {
  12871. "type": "object",
  12872. "properties": {
  12873. "file": {
  12874. "type": "string"
  12875. },
  12876. "patch": {
  12877. "type": "string"
  12878. },
  12879. "additions": {
  12880. "type": "integer",
  12881. "minimum": 0
  12882. },
  12883. "deletions": {
  12884. "type": "integer",
  12885. "minimum": 0
  12886. },
  12887. "status": {
  12888. "type": "string",
  12889. "enum": ["added", "deleted", "modified"]
  12890. }
  12891. },
  12892. "required": ["file", "patch", "additions", "deletions"],
  12893. "additionalProperties": false
  12894. },
  12895. "VcsApplyError": {
  12896. "type": "object",
  12897. "properties": {
  12898. "name": {
  12899. "type": "string",
  12900. "enum": ["VcsApplyError"]
  12901. },
  12902. "data": {
  12903. "type": "object",
  12904. "properties": {
  12905. "message": {
  12906. "type": "string"
  12907. },
  12908. "reason": {
  12909. "type": "string",
  12910. "enum": ["non-git", "not-clean"]
  12911. }
  12912. },
  12913. "required": ["message", "reason"],
  12914. "additionalProperties": false
  12915. }
  12916. },
  12917. "required": ["name", "data"],
  12918. "additionalProperties": false
  12919. },
  12920. "Command": {
  12921. "type": "object",
  12922. "properties": {
  12923. "name": {
  12924. "type": "string"
  12925. },
  12926. "description": {
  12927. "type": "string"
  12928. },
  12929. "agent": {
  12930. "type": "string"
  12931. },
  12932. "model": {
  12933. "type": "string"
  12934. },
  12935. "source": {
  12936. "type": "string",
  12937. "enum": ["command", "mcp", "skill"]
  12938. },
  12939. "template": {
  12940. "type": "string"
  12941. },
  12942. "subtask": {
  12943. "type": "boolean"
  12944. },
  12945. "hints": {
  12946. "type": "array",
  12947. "items": {
  12948. "type": "string"
  12949. }
  12950. }
  12951. },
  12952. "required": ["name", "template", "hints"],
  12953. "additionalProperties": false
  12954. },
  12955. "Agent": {
  12956. "type": "object",
  12957. "properties": {
  12958. "name": {
  12959. "type": "string"
  12960. },
  12961. "description": {
  12962. "type": "string"
  12963. },
  12964. "mode": {
  12965. "type": "string",
  12966. "enum": ["subagent", "primary", "all"]
  12967. },
  12968. "native": {
  12969. "type": "boolean"
  12970. },
  12971. "hidden": {
  12972. "type": "boolean"
  12973. },
  12974. "topP": {
  12975. "type": "number"
  12976. },
  12977. "temperature": {
  12978. "type": "number"
  12979. },
  12980. "color": {
  12981. "type": "string"
  12982. },
  12983. "permission": {
  12984. "$ref": "#/components/schemas/PermissionRuleset"
  12985. },
  12986. "model": {
  12987. "type": "object",
  12988. "properties": {
  12989. "modelID": {
  12990. "type": "string"
  12991. },
  12992. "providerID": {
  12993. "type": "string"
  12994. }
  12995. },
  12996. "required": ["modelID", "providerID"],
  12997. "additionalProperties": false
  12998. },
  12999. "variant": {
  13000. "type": "string"
  13001. },
  13002. "prompt": {
  13003. "type": "string"
  13004. },
  13005. "options": {
  13006. "type": "object"
  13007. },
  13008. "steps": {
  13009. "type": "number"
  13010. }
  13011. },
  13012. "required": ["name", "mode", "permission", "options"],
  13013. "additionalProperties": false
  13014. },
  13015. "LSPStatus": {
  13016. "type": "object",
  13017. "properties": {
  13018. "id": {
  13019. "type": "string"
  13020. },
  13021. "name": {
  13022. "type": "string"
  13023. },
  13024. "root": {
  13025. "type": "string"
  13026. },
  13027. "status": {
  13028. "type": "string",
  13029. "enum": ["connected", "error"]
  13030. }
  13031. },
  13032. "required": ["id", "name", "root", "status"],
  13033. "additionalProperties": false
  13034. },
  13035. "FormatterStatus": {
  13036. "type": "object",
  13037. "properties": {
  13038. "name": {
  13039. "type": "string"
  13040. },
  13041. "extensions": {
  13042. "type": "array",
  13043. "items": {
  13044. "type": "string"
  13045. }
  13046. },
  13047. "enabled": {
  13048. "type": "boolean"
  13049. }
  13050. },
  13051. "required": ["name", "extensions", "enabled"],
  13052. "additionalProperties": false
  13053. },
  13054. "MCPStatusConnected": {
  13055. "type": "object",
  13056. "properties": {
  13057. "status": {
  13058. "type": "string",
  13059. "enum": ["connected"]
  13060. }
  13061. },
  13062. "required": ["status"],
  13063. "additionalProperties": false
  13064. },
  13065. "MCPStatusDisabled": {
  13066. "type": "object",
  13067. "properties": {
  13068. "status": {
  13069. "type": "string",
  13070. "enum": ["disabled"]
  13071. }
  13072. },
  13073. "required": ["status"],
  13074. "additionalProperties": false
  13075. },
  13076. "MCPStatusFailed": {
  13077. "type": "object",
  13078. "properties": {
  13079. "status": {
  13080. "type": "string",
  13081. "enum": ["failed"]
  13082. },
  13083. "error": {
  13084. "type": "string"
  13085. }
  13086. },
  13087. "required": ["status", "error"],
  13088. "additionalProperties": false
  13089. },
  13090. "MCPStatusNeedsAuth": {
  13091. "type": "object",
  13092. "properties": {
  13093. "status": {
  13094. "type": "string",
  13095. "enum": ["needs_auth"]
  13096. }
  13097. },
  13098. "required": ["status"],
  13099. "additionalProperties": false
  13100. },
  13101. "MCPStatusNeedsClientRegistration": {
  13102. "type": "object",
  13103. "properties": {
  13104. "status": {
  13105. "type": "string",
  13106. "enum": ["needs_client_registration"]
  13107. },
  13108. "error": {
  13109. "type": "string"
  13110. }
  13111. },
  13112. "required": ["status", "error"],
  13113. "additionalProperties": false
  13114. },
  13115. "MCPStatus": {
  13116. "anyOf": [
  13117. {
  13118. "$ref": "#/components/schemas/MCPStatusConnected"
  13119. },
  13120. {
  13121. "$ref": "#/components/schemas/MCPStatusDisabled"
  13122. },
  13123. {
  13124. "$ref": "#/components/schemas/MCPStatusFailed"
  13125. },
  13126. {
  13127. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13128. },
  13129. {
  13130. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13131. }
  13132. ]
  13133. },
  13134. "McpUnsupportedOAuthError": {
  13135. "type": "object",
  13136. "properties": {
  13137. "error": {
  13138. "type": "string"
  13139. }
  13140. },
  13141. "required": ["error"],
  13142. "additionalProperties": false
  13143. },
  13144. "NotFoundError": {
  13145. "type": "object",
  13146. "required": ["name", "data"],
  13147. "properties": {
  13148. "name": {
  13149. "type": "string",
  13150. "enum": ["NotFoundError"]
  13151. },
  13152. "data": {
  13153. "type": "object",
  13154. "required": ["message"],
  13155. "properties": {
  13156. "message": {
  13157. "type": "string"
  13158. }
  13159. }
  13160. }
  13161. }
  13162. },
  13163. "effect_HttpApiError_Forbidden": {
  13164. "type": "object",
  13165. "properties": {
  13166. "_tag": {
  13167. "type": "string",
  13168. "enum": ["Forbidden"]
  13169. }
  13170. },
  13171. "required": ["_tag"],
  13172. "additionalProperties": false
  13173. },
  13174. "ProviderAuthMethod": {
  13175. "type": "object",
  13176. "properties": {
  13177. "type": {
  13178. "type": "string",
  13179. "enum": ["oauth", "api"]
  13180. },
  13181. "label": {
  13182. "type": "string"
  13183. },
  13184. "prompts": {
  13185. "type": "array",
  13186. "items": {
  13187. "anyOf": [
  13188. {
  13189. "type": "object",
  13190. "properties": {
  13191. "type": {
  13192. "type": "string",
  13193. "enum": ["text"]
  13194. },
  13195. "key": {
  13196. "type": "string"
  13197. },
  13198. "message": {
  13199. "type": "string"
  13200. },
  13201. "placeholder": {
  13202. "type": "string"
  13203. },
  13204. "when": {
  13205. "type": "object",
  13206. "properties": {
  13207. "key": {
  13208. "type": "string"
  13209. },
  13210. "op": {
  13211. "type": "string",
  13212. "enum": ["eq", "neq"]
  13213. },
  13214. "value": {
  13215. "type": "string"
  13216. }
  13217. },
  13218. "required": ["key", "op", "value"],
  13219. "additionalProperties": false
  13220. }
  13221. },
  13222. "required": ["type", "key", "message"],
  13223. "additionalProperties": false
  13224. },
  13225. {
  13226. "type": "object",
  13227. "properties": {
  13228. "type": {
  13229. "type": "string",
  13230. "enum": ["select"]
  13231. },
  13232. "key": {
  13233. "type": "string"
  13234. },
  13235. "message": {
  13236. "type": "string"
  13237. },
  13238. "options": {
  13239. "type": "array",
  13240. "items": {
  13241. "type": "object",
  13242. "properties": {
  13243. "label": {
  13244. "type": "string"
  13245. },
  13246. "value": {
  13247. "type": "string"
  13248. },
  13249. "hint": {
  13250. "type": "string"
  13251. }
  13252. },
  13253. "required": ["label", "value"],
  13254. "additionalProperties": false
  13255. }
  13256. },
  13257. "when": {
  13258. "type": "object",
  13259. "properties": {
  13260. "key": {
  13261. "type": "string"
  13262. },
  13263. "op": {
  13264. "type": "string",
  13265. "enum": ["eq", "neq"]
  13266. },
  13267. "value": {
  13268. "type": "string"
  13269. }
  13270. },
  13271. "required": ["key", "op", "value"],
  13272. "additionalProperties": false
  13273. }
  13274. },
  13275. "required": ["type", "key", "message", "options"],
  13276. "additionalProperties": false
  13277. }
  13278. ]
  13279. }
  13280. }
  13281. },
  13282. "required": ["type", "label"],
  13283. "additionalProperties": false
  13284. },
  13285. "ProviderAuthAuthorization": {
  13286. "type": "object",
  13287. "properties": {
  13288. "url": {
  13289. "type": "string"
  13290. },
  13291. "method": {
  13292. "type": "string",
  13293. "enum": ["auto", "code"]
  13294. },
  13295. "instructions": {
  13296. "type": "string"
  13297. }
  13298. },
  13299. "required": ["url", "method", "instructions"],
  13300. "additionalProperties": false
  13301. },
  13302. "TextPartInput": {
  13303. "type": "object",
  13304. "properties": {
  13305. "id": {
  13306. "type": "string"
  13307. },
  13308. "type": {
  13309. "type": "string",
  13310. "enum": ["text"]
  13311. },
  13312. "text": {
  13313. "type": "string"
  13314. },
  13315. "synthetic": {
  13316. "type": "boolean"
  13317. },
  13318. "ignored": {
  13319. "type": "boolean"
  13320. },
  13321. "time": {
  13322. "type": "object",
  13323. "properties": {
  13324. "start": {
  13325. "type": "integer",
  13326. "minimum": 0
  13327. },
  13328. "end": {
  13329. "type": "integer",
  13330. "minimum": 0
  13331. }
  13332. },
  13333. "required": ["start"],
  13334. "additionalProperties": false
  13335. },
  13336. "metadata": {
  13337. "type": "object"
  13338. }
  13339. },
  13340. "required": ["type", "text"],
  13341. "additionalProperties": false
  13342. },
  13343. "FilePartInput": {
  13344. "type": "object",
  13345. "properties": {
  13346. "id": {
  13347. "type": "string"
  13348. },
  13349. "type": {
  13350. "type": "string",
  13351. "enum": ["file"]
  13352. },
  13353. "mime": {
  13354. "type": "string"
  13355. },
  13356. "filename": {
  13357. "type": "string"
  13358. },
  13359. "url": {
  13360. "type": "string"
  13361. },
  13362. "source": {
  13363. "$ref": "#/components/schemas/FilePartSource"
  13364. }
  13365. },
  13366. "required": ["type", "mime", "url"],
  13367. "additionalProperties": false
  13368. },
  13369. "AgentPartInput": {
  13370. "type": "object",
  13371. "properties": {
  13372. "id": {
  13373. "type": "string"
  13374. },
  13375. "type": {
  13376. "type": "string",
  13377. "enum": ["agent"]
  13378. },
  13379. "name": {
  13380. "type": "string"
  13381. },
  13382. "source": {
  13383. "type": "object",
  13384. "properties": {
  13385. "value": {
  13386. "type": "string"
  13387. },
  13388. "start": {
  13389. "type": "integer",
  13390. "minimum": 0
  13391. },
  13392. "end": {
  13393. "type": "integer",
  13394. "minimum": 0
  13395. }
  13396. },
  13397. "required": ["value", "start", "end"],
  13398. "additionalProperties": false
  13399. }
  13400. },
  13401. "required": ["type", "name"],
  13402. "additionalProperties": false
  13403. },
  13404. "SubtaskPartInput": {
  13405. "type": "object",
  13406. "properties": {
  13407. "id": {
  13408. "type": "string"
  13409. },
  13410. "type": {
  13411. "type": "string",
  13412. "enum": ["subtask"]
  13413. },
  13414. "prompt": {
  13415. "type": "string"
  13416. },
  13417. "description": {
  13418. "type": "string"
  13419. },
  13420. "agent": {
  13421. "type": "string"
  13422. },
  13423. "model": {
  13424. "type": "object",
  13425. "properties": {
  13426. "providerID": {
  13427. "type": "string"
  13428. },
  13429. "modelID": {
  13430. "type": "string"
  13431. }
  13432. },
  13433. "required": ["providerID", "modelID"],
  13434. "additionalProperties": false
  13435. },
  13436. "command": {
  13437. "type": "string"
  13438. }
  13439. },
  13440. "required": ["type", "prompt", "description", "agent"],
  13441. "additionalProperties": false
  13442. },
  13443. "V2SessionsResponse": {
  13444. "type": "object",
  13445. "properties": {
  13446. "items": {
  13447. "type": "array",
  13448. "items": {
  13449. "$ref": "#/components/schemas/SessionInfo"
  13450. }
  13451. },
  13452. "cursor": {
  13453. "type": "object",
  13454. "properties": {
  13455. "previous": {
  13456. "type": "string"
  13457. },
  13458. "next": {
  13459. "type": "string"
  13460. }
  13461. },
  13462. "additionalProperties": false
  13463. }
  13464. },
  13465. "required": ["items", "cursor"],
  13466. "additionalProperties": false
  13467. },
  13468. "V2SessionMessagesResponse": {
  13469. "type": "object",
  13470. "properties": {
  13471. "items": {
  13472. "type": "array",
  13473. "items": {
  13474. "$ref": "#/components/schemas/SessionMessage"
  13475. }
  13476. },
  13477. "cursor": {
  13478. "type": "object",
  13479. "properties": {
  13480. "previous": {
  13481. "type": "string"
  13482. },
  13483. "next": {
  13484. "type": "string"
  13485. }
  13486. },
  13487. "additionalProperties": false
  13488. }
  13489. },
  13490. "required": ["items", "cursor"],
  13491. "additionalProperties": false
  13492. },
  13493. "EventTuiPromptAppend": {
  13494. "type": "object",
  13495. "properties": {
  13496. "type": {
  13497. "type": "string",
  13498. "enum": ["tui.prompt.append"]
  13499. },
  13500. "properties": {
  13501. "type": "object",
  13502. "properties": {
  13503. "text": {
  13504. "type": "string"
  13505. }
  13506. },
  13507. "required": ["text"],
  13508. "additionalProperties": false
  13509. }
  13510. },
  13511. "required": ["type", "properties"],
  13512. "additionalProperties": false
  13513. },
  13514. "EventTuiCommandExecute": {
  13515. "type": "object",
  13516. "properties": {
  13517. "type": {
  13518. "type": "string",
  13519. "enum": ["tui.command.execute"]
  13520. },
  13521. "properties": {
  13522. "type": "object",
  13523. "properties": {
  13524. "command": {
  13525. "anyOf": [
  13526. {
  13527. "type": "string",
  13528. "enum": [
  13529. "session.list",
  13530. "session.new",
  13531. "session.share",
  13532. "session.interrupt",
  13533. "session.compact",
  13534. "session.page.up",
  13535. "session.page.down",
  13536. "session.line.up",
  13537. "session.line.down",
  13538. "session.half.page.up",
  13539. "session.half.page.down",
  13540. "session.first",
  13541. "session.last",
  13542. "prompt.clear",
  13543. "prompt.submit",
  13544. "agent.cycle"
  13545. ]
  13546. },
  13547. {
  13548. "type": "string"
  13549. }
  13550. ]
  13551. }
  13552. },
  13553. "required": ["command"],
  13554. "additionalProperties": false
  13555. }
  13556. },
  13557. "required": ["type", "properties"],
  13558. "additionalProperties": false
  13559. },
  13560. "EventTuiToastShow": {
  13561. "type": "object",
  13562. "properties": {
  13563. "type": {
  13564. "type": "string",
  13565. "enum": ["tui.toast.show"]
  13566. },
  13567. "properties": {
  13568. "type": "object",
  13569. "properties": {
  13570. "title": {
  13571. "type": "string"
  13572. },
  13573. "message": {
  13574. "type": "string"
  13575. },
  13576. "variant": {
  13577. "type": "string",
  13578. "enum": ["info", "success", "warning", "error"]
  13579. },
  13580. "duration": {
  13581. "type": "integer",
  13582. "exclusiveMinimum": 0
  13583. }
  13584. },
  13585. "required": ["message", "variant"],
  13586. "additionalProperties": false
  13587. }
  13588. },
  13589. "required": ["type", "properties"],
  13590. "additionalProperties": false
  13591. },
  13592. "EventTuiSessionSelect": {
  13593. "type": "object",
  13594. "properties": {
  13595. "type": {
  13596. "type": "string",
  13597. "enum": ["tui.session.select"]
  13598. },
  13599. "properties": {
  13600. "type": "object",
  13601. "properties": {
  13602. "sessionID": {
  13603. "type": "string",
  13604. "description": "Session ID to navigate to"
  13605. }
  13606. },
  13607. "required": ["sessionID"],
  13608. "additionalProperties": false
  13609. }
  13610. },
  13611. "required": ["type", "properties"],
  13612. "additionalProperties": false
  13613. },
  13614. "Workspace": {
  13615. "type": "object",
  13616. "properties": {
  13617. "id": {
  13618. "type": "string"
  13619. },
  13620. "type": {
  13621. "type": "string"
  13622. },
  13623. "name": {
  13624. "type": "string"
  13625. },
  13626. "branch": {
  13627. "anyOf": [
  13628. {
  13629. "type": "string"
  13630. },
  13631. {
  13632. "type": "null"
  13633. }
  13634. ]
  13635. },
  13636. "directory": {
  13637. "anyOf": [
  13638. {
  13639. "type": "string"
  13640. },
  13641. {
  13642. "type": "null"
  13643. }
  13644. ]
  13645. },
  13646. "extra": {
  13647. "anyOf": [
  13648. {},
  13649. {
  13650. "type": "null"
  13651. }
  13652. ]
  13653. },
  13654. "projectID": {
  13655. "type": "string"
  13656. }
  13657. },
  13658. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"],
  13659. "additionalProperties": false
  13660. },
  13661. "WorkspaceWarpError": {
  13662. "type": "object",
  13663. "properties": {
  13664. "name": {
  13665. "type": "string",
  13666. "enum": ["WorkspaceWarpError"]
  13667. },
  13668. "data": {
  13669. "type": "object",
  13670. "properties": {
  13671. "message": {
  13672. "type": "string"
  13673. }
  13674. },
  13675. "required": ["message"],
  13676. "additionalProperties": false
  13677. }
  13678. },
  13679. "required": ["name", "data"],
  13680. "additionalProperties": false
  13681. },
  13682. "SyncEventMessageUpdated": {
  13683. "type": "object",
  13684. "properties": {
  13685. "type": {
  13686. "type": "string",
  13687. "enum": ["sync"]
  13688. },
  13689. "name": {
  13690. "type": "string",
  13691. "enum": ["message.updated.1"]
  13692. },
  13693. "id": {
  13694. "type": "string"
  13695. },
  13696. "seq": {
  13697. "type": "number"
  13698. },
  13699. "aggregateID": {
  13700. "type": "string",
  13701. "enum": ["sessionID"]
  13702. },
  13703. "data": {
  13704. "type": "object",
  13705. "properties": {
  13706. "sessionID": {
  13707. "type": "string"
  13708. },
  13709. "info": {
  13710. "$ref": "#/components/schemas/Message"
  13711. }
  13712. },
  13713. "required": ["sessionID", "info"],
  13714. "additionalProperties": false
  13715. }
  13716. },
  13717. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13718. "additionalProperties": false
  13719. },
  13720. "SyncEventMessageRemoved": {
  13721. "type": "object",
  13722. "properties": {
  13723. "type": {
  13724. "type": "string",
  13725. "enum": ["sync"]
  13726. },
  13727. "name": {
  13728. "type": "string",
  13729. "enum": ["message.removed.1"]
  13730. },
  13731. "id": {
  13732. "type": "string"
  13733. },
  13734. "seq": {
  13735. "type": "number"
  13736. },
  13737. "aggregateID": {
  13738. "type": "string",
  13739. "enum": ["sessionID"]
  13740. },
  13741. "data": {
  13742. "type": "object",
  13743. "properties": {
  13744. "sessionID": {
  13745. "type": "string"
  13746. },
  13747. "messageID": {
  13748. "type": "string"
  13749. }
  13750. },
  13751. "required": ["sessionID", "messageID"],
  13752. "additionalProperties": false
  13753. }
  13754. },
  13755. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13756. "additionalProperties": false
  13757. },
  13758. "SyncEventMessagePartUpdated": {
  13759. "type": "object",
  13760. "properties": {
  13761. "type": {
  13762. "type": "string",
  13763. "enum": ["sync"]
  13764. },
  13765. "name": {
  13766. "type": "string",
  13767. "enum": ["message.part.updated.1"]
  13768. },
  13769. "id": {
  13770. "type": "string"
  13771. },
  13772. "seq": {
  13773. "type": "number"
  13774. },
  13775. "aggregateID": {
  13776. "type": "string",
  13777. "enum": ["sessionID"]
  13778. },
  13779. "data": {
  13780. "type": "object",
  13781. "properties": {
  13782. "sessionID": {
  13783. "type": "string"
  13784. },
  13785. "part": {
  13786. "$ref": "#/components/schemas/Part"
  13787. },
  13788. "time": {
  13789. "type": "integer",
  13790. "minimum": 0
  13791. }
  13792. },
  13793. "required": ["sessionID", "part", "time"],
  13794. "additionalProperties": false
  13795. }
  13796. },
  13797. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13798. "additionalProperties": false
  13799. },
  13800. "SyncEventMessagePartRemoved": {
  13801. "type": "object",
  13802. "properties": {
  13803. "type": {
  13804. "type": "string",
  13805. "enum": ["sync"]
  13806. },
  13807. "name": {
  13808. "type": "string",
  13809. "enum": ["message.part.removed.1"]
  13810. },
  13811. "id": {
  13812. "type": "string"
  13813. },
  13814. "seq": {
  13815. "type": "number"
  13816. },
  13817. "aggregateID": {
  13818. "type": "string",
  13819. "enum": ["sessionID"]
  13820. },
  13821. "data": {
  13822. "type": "object",
  13823. "properties": {
  13824. "sessionID": {
  13825. "type": "string"
  13826. },
  13827. "messageID": {
  13828. "type": "string"
  13829. },
  13830. "partID": {
  13831. "type": "string"
  13832. }
  13833. },
  13834. "required": ["sessionID", "messageID", "partID"],
  13835. "additionalProperties": false
  13836. }
  13837. },
  13838. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13839. "additionalProperties": false
  13840. },
  13841. "SyncEventSessionCreated": {
  13842. "type": "object",
  13843. "properties": {
  13844. "type": {
  13845. "type": "string",
  13846. "enum": ["sync"]
  13847. },
  13848. "name": {
  13849. "type": "string",
  13850. "enum": ["session.created.1"]
  13851. },
  13852. "id": {
  13853. "type": "string"
  13854. },
  13855. "seq": {
  13856. "type": "number"
  13857. },
  13858. "aggregateID": {
  13859. "type": "string",
  13860. "enum": ["sessionID"]
  13861. },
  13862. "data": {
  13863. "type": "object",
  13864. "properties": {
  13865. "sessionID": {
  13866. "type": "string"
  13867. },
  13868. "info": {
  13869. "$ref": "#/components/schemas/Session"
  13870. }
  13871. },
  13872. "required": ["sessionID", "info"],
  13873. "additionalProperties": false
  13874. }
  13875. },
  13876. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13877. "additionalProperties": false
  13878. },
  13879. "SyncEventSessionUpdated": {
  13880. "type": "object",
  13881. "properties": {
  13882. "type": {
  13883. "type": "string",
  13884. "enum": ["sync"]
  13885. },
  13886. "name": {
  13887. "type": "string",
  13888. "enum": ["session.updated.1"]
  13889. },
  13890. "id": {
  13891. "type": "string"
  13892. },
  13893. "seq": {
  13894. "type": "number"
  13895. },
  13896. "aggregateID": {
  13897. "type": "string",
  13898. "enum": ["sessionID"]
  13899. },
  13900. "data": {
  13901. "type": "object",
  13902. "properties": {
  13903. "sessionID": {
  13904. "type": "string"
  13905. },
  13906. "info": {
  13907. "type": "object",
  13908. "properties": {
  13909. "id": {
  13910. "anyOf": [
  13911. {
  13912. "type": "string"
  13913. },
  13914. {
  13915. "type": "null"
  13916. }
  13917. ]
  13918. },
  13919. "slug": {
  13920. "anyOf": [
  13921. {
  13922. "type": "string"
  13923. },
  13924. {
  13925. "type": "null"
  13926. }
  13927. ]
  13928. },
  13929. "projectID": {
  13930. "anyOf": [
  13931. {
  13932. "type": "string"
  13933. },
  13934. {
  13935. "type": "null"
  13936. }
  13937. ]
  13938. },
  13939. "workspaceID": {
  13940. "anyOf": [
  13941. {
  13942. "type": "string"
  13943. },
  13944. {
  13945. "type": "null"
  13946. }
  13947. ]
  13948. },
  13949. "directory": {
  13950. "anyOf": [
  13951. {
  13952. "type": "string"
  13953. },
  13954. {
  13955. "type": "null"
  13956. }
  13957. ]
  13958. },
  13959. "path": {
  13960. "anyOf": [
  13961. {
  13962. "type": "string"
  13963. },
  13964. {
  13965. "type": "null"
  13966. }
  13967. ]
  13968. },
  13969. "parentID": {
  13970. "anyOf": [
  13971. {
  13972. "type": "string"
  13973. },
  13974. {
  13975. "type": "null"
  13976. }
  13977. ]
  13978. },
  13979. "summary": {
  13980. "anyOf": [
  13981. {
  13982. "type": "object",
  13983. "properties": {
  13984. "additions": {
  13985. "type": "integer",
  13986. "minimum": 0
  13987. },
  13988. "deletions": {
  13989. "type": "integer",
  13990. "minimum": 0
  13991. },
  13992. "files": {
  13993. "type": "integer",
  13994. "minimum": 0
  13995. },
  13996. "diffs": {
  13997. "type": "array",
  13998. "items": {
  13999. "$ref": "#/components/schemas/SnapshotFileDiff"
  14000. }
  14001. }
  14002. },
  14003. "required": ["additions", "deletions", "files"],
  14004. "additionalProperties": false
  14005. },
  14006. {
  14007. "type": "null"
  14008. }
  14009. ]
  14010. },
  14011. "share": {
  14012. "type": "object",
  14013. "properties": {
  14014. "url": {
  14015. "anyOf": [
  14016. {
  14017. "type": "string"
  14018. },
  14019. {
  14020. "type": "null"
  14021. }
  14022. ]
  14023. }
  14024. },
  14025. "additionalProperties": false
  14026. },
  14027. "title": {
  14028. "anyOf": [
  14029. {
  14030. "type": "string"
  14031. },
  14032. {
  14033. "type": "null"
  14034. }
  14035. ]
  14036. },
  14037. "agent": {
  14038. "anyOf": [
  14039. {
  14040. "type": "string"
  14041. },
  14042. {
  14043. "type": "null"
  14044. }
  14045. ]
  14046. },
  14047. "model": {
  14048. "anyOf": [
  14049. {
  14050. "type": "object",
  14051. "properties": {
  14052. "id": {
  14053. "type": "string"
  14054. },
  14055. "providerID": {
  14056. "type": "string"
  14057. },
  14058. "variant": {
  14059. "type": "string"
  14060. }
  14061. },
  14062. "required": ["id", "providerID"],
  14063. "additionalProperties": false
  14064. },
  14065. {
  14066. "type": "null"
  14067. }
  14068. ]
  14069. },
  14070. "version": {
  14071. "anyOf": [
  14072. {
  14073. "type": "string"
  14074. },
  14075. {
  14076. "type": "null"
  14077. }
  14078. ]
  14079. },
  14080. "time": {
  14081. "type": "object",
  14082. "properties": {
  14083. "created": {
  14084. "anyOf": [
  14085. {
  14086. "type": "integer",
  14087. "minimum": 0
  14088. },
  14089. {
  14090. "type": "null"
  14091. }
  14092. ]
  14093. },
  14094. "updated": {
  14095. "anyOf": [
  14096. {
  14097. "type": "integer",
  14098. "minimum": 0
  14099. },
  14100. {
  14101. "type": "null"
  14102. }
  14103. ]
  14104. },
  14105. "compacting": {
  14106. "anyOf": [
  14107. {
  14108. "type": "integer",
  14109. "minimum": 0
  14110. },
  14111. {
  14112. "type": "null"
  14113. }
  14114. ]
  14115. },
  14116. "archived": {
  14117. "anyOf": [
  14118. {
  14119. "type": "number"
  14120. },
  14121. {
  14122. "type": "null"
  14123. }
  14124. ]
  14125. }
  14126. },
  14127. "additionalProperties": false
  14128. },
  14129. "permission": {
  14130. "anyOf": [
  14131. {
  14132. "$ref": "#/components/schemas/PermissionRuleset"
  14133. },
  14134. {
  14135. "type": "null"
  14136. }
  14137. ]
  14138. },
  14139. "revert": {
  14140. "anyOf": [
  14141. {
  14142. "type": "object",
  14143. "properties": {
  14144. "messageID": {
  14145. "type": "string"
  14146. },
  14147. "partID": {
  14148. "type": "string"
  14149. },
  14150. "snapshot": {
  14151. "type": "string"
  14152. },
  14153. "diff": {
  14154. "type": "string"
  14155. }
  14156. },
  14157. "required": ["messageID"],
  14158. "additionalProperties": false
  14159. },
  14160. {
  14161. "type": "null"
  14162. }
  14163. ]
  14164. }
  14165. },
  14166. "additionalProperties": false
  14167. }
  14168. },
  14169. "required": ["sessionID", "info"],
  14170. "additionalProperties": false
  14171. }
  14172. },
  14173. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14174. "additionalProperties": false
  14175. },
  14176. "SyncEventSessionDeleted": {
  14177. "type": "object",
  14178. "properties": {
  14179. "type": {
  14180. "type": "string",
  14181. "enum": ["sync"]
  14182. },
  14183. "name": {
  14184. "type": "string",
  14185. "enum": ["session.deleted.1"]
  14186. },
  14187. "id": {
  14188. "type": "string"
  14189. },
  14190. "seq": {
  14191. "type": "number"
  14192. },
  14193. "aggregateID": {
  14194. "type": "string",
  14195. "enum": ["sessionID"]
  14196. },
  14197. "data": {
  14198. "type": "object",
  14199. "properties": {
  14200. "sessionID": {
  14201. "type": "string"
  14202. },
  14203. "info": {
  14204. "$ref": "#/components/schemas/Session"
  14205. }
  14206. },
  14207. "required": ["sessionID", "info"],
  14208. "additionalProperties": false
  14209. }
  14210. },
  14211. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14212. "additionalProperties": false
  14213. },
  14214. "SyncEventSessionNextAgentSwitched": {
  14215. "type": "object",
  14216. "properties": {
  14217. "type": {
  14218. "type": "string",
  14219. "enum": ["sync"]
  14220. },
  14221. "name": {
  14222. "type": "string",
  14223. "enum": ["session.next.agent.switched.1"]
  14224. },
  14225. "id": {
  14226. "type": "string"
  14227. },
  14228. "seq": {
  14229. "type": "number"
  14230. },
  14231. "aggregateID": {
  14232. "type": "string",
  14233. "enum": ["sessionID"]
  14234. },
  14235. "data": {
  14236. "type": "object",
  14237. "properties": {
  14238. "timestamp": {
  14239. "type": "number"
  14240. },
  14241. "sessionID": {
  14242. "type": "string"
  14243. },
  14244. "agent": {
  14245. "type": "string"
  14246. }
  14247. },
  14248. "required": ["timestamp", "sessionID", "agent"],
  14249. "additionalProperties": false
  14250. }
  14251. },
  14252. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14253. "additionalProperties": false
  14254. },
  14255. "SyncEventSessionNextModelSwitched": {
  14256. "type": "object",
  14257. "properties": {
  14258. "type": {
  14259. "type": "string",
  14260. "enum": ["sync"]
  14261. },
  14262. "name": {
  14263. "type": "string",
  14264. "enum": ["session.next.model.switched.1"]
  14265. },
  14266. "id": {
  14267. "type": "string"
  14268. },
  14269. "seq": {
  14270. "type": "number"
  14271. },
  14272. "aggregateID": {
  14273. "type": "string",
  14274. "enum": ["sessionID"]
  14275. },
  14276. "data": {
  14277. "type": "object",
  14278. "properties": {
  14279. "timestamp": {
  14280. "type": "number"
  14281. },
  14282. "sessionID": {
  14283. "type": "string"
  14284. },
  14285. "model": {
  14286. "type": "object",
  14287. "properties": {
  14288. "id": {
  14289. "type": "string"
  14290. },
  14291. "providerID": {
  14292. "type": "string"
  14293. },
  14294. "variant": {
  14295. "type": "string"
  14296. }
  14297. },
  14298. "required": ["id", "providerID", "variant"],
  14299. "additionalProperties": false
  14300. }
  14301. },
  14302. "required": ["timestamp", "sessionID", "model"],
  14303. "additionalProperties": false
  14304. }
  14305. },
  14306. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14307. "additionalProperties": false
  14308. },
  14309. "SyncEventSessionNextPrompted": {
  14310. "type": "object",
  14311. "properties": {
  14312. "type": {
  14313. "type": "string",
  14314. "enum": ["sync"]
  14315. },
  14316. "name": {
  14317. "type": "string",
  14318. "enum": ["session.next.prompted.1"]
  14319. },
  14320. "id": {
  14321. "type": "string"
  14322. },
  14323. "seq": {
  14324. "type": "number"
  14325. },
  14326. "aggregateID": {
  14327. "type": "string",
  14328. "enum": ["sessionID"]
  14329. },
  14330. "data": {
  14331. "type": "object",
  14332. "properties": {
  14333. "timestamp": {
  14334. "type": "number"
  14335. },
  14336. "sessionID": {
  14337. "type": "string"
  14338. },
  14339. "prompt": {
  14340. "$ref": "#/components/schemas/Prompt"
  14341. }
  14342. },
  14343. "required": ["timestamp", "sessionID", "prompt"],
  14344. "additionalProperties": false
  14345. }
  14346. },
  14347. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14348. "additionalProperties": false
  14349. },
  14350. "SyncEventSessionNextSynthetic": {
  14351. "type": "object",
  14352. "properties": {
  14353. "type": {
  14354. "type": "string",
  14355. "enum": ["sync"]
  14356. },
  14357. "name": {
  14358. "type": "string",
  14359. "enum": ["session.next.synthetic.1"]
  14360. },
  14361. "id": {
  14362. "type": "string"
  14363. },
  14364. "seq": {
  14365. "type": "number"
  14366. },
  14367. "aggregateID": {
  14368. "type": "string",
  14369. "enum": ["sessionID"]
  14370. },
  14371. "data": {
  14372. "type": "object",
  14373. "properties": {
  14374. "timestamp": {
  14375. "type": "number"
  14376. },
  14377. "sessionID": {
  14378. "type": "string"
  14379. },
  14380. "text": {
  14381. "type": "string"
  14382. }
  14383. },
  14384. "required": ["timestamp", "sessionID", "text"],
  14385. "additionalProperties": false
  14386. }
  14387. },
  14388. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14389. "additionalProperties": false
  14390. },
  14391. "SyncEventSessionNextShellStarted": {
  14392. "type": "object",
  14393. "properties": {
  14394. "type": {
  14395. "type": "string",
  14396. "enum": ["sync"]
  14397. },
  14398. "name": {
  14399. "type": "string",
  14400. "enum": ["session.next.shell.started.1"]
  14401. },
  14402. "id": {
  14403. "type": "string"
  14404. },
  14405. "seq": {
  14406. "type": "number"
  14407. },
  14408. "aggregateID": {
  14409. "type": "string",
  14410. "enum": ["sessionID"]
  14411. },
  14412. "data": {
  14413. "type": "object",
  14414. "properties": {
  14415. "timestamp": {
  14416. "type": "number"
  14417. },
  14418. "sessionID": {
  14419. "type": "string"
  14420. },
  14421. "callID": {
  14422. "type": "string"
  14423. },
  14424. "command": {
  14425. "type": "string"
  14426. }
  14427. },
  14428. "required": ["timestamp", "sessionID", "callID", "command"],
  14429. "additionalProperties": false
  14430. }
  14431. },
  14432. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14433. "additionalProperties": false
  14434. },
  14435. "SyncEventSessionNextShellEnded": {
  14436. "type": "object",
  14437. "properties": {
  14438. "type": {
  14439. "type": "string",
  14440. "enum": ["sync"]
  14441. },
  14442. "name": {
  14443. "type": "string",
  14444. "enum": ["session.next.shell.ended.1"]
  14445. },
  14446. "id": {
  14447. "type": "string"
  14448. },
  14449. "seq": {
  14450. "type": "number"
  14451. },
  14452. "aggregateID": {
  14453. "type": "string",
  14454. "enum": ["sessionID"]
  14455. },
  14456. "data": {
  14457. "type": "object",
  14458. "properties": {
  14459. "timestamp": {
  14460. "type": "number"
  14461. },
  14462. "sessionID": {
  14463. "type": "string"
  14464. },
  14465. "callID": {
  14466. "type": "string"
  14467. },
  14468. "output": {
  14469. "type": "string"
  14470. }
  14471. },
  14472. "required": ["timestamp", "sessionID", "callID", "output"],
  14473. "additionalProperties": false
  14474. }
  14475. },
  14476. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14477. "additionalProperties": false
  14478. },
  14479. "SyncEventSessionNextStepStarted": {
  14480. "type": "object",
  14481. "properties": {
  14482. "type": {
  14483. "type": "string",
  14484. "enum": ["sync"]
  14485. },
  14486. "name": {
  14487. "type": "string",
  14488. "enum": ["session.next.step.started.1"]
  14489. },
  14490. "id": {
  14491. "type": "string"
  14492. },
  14493. "seq": {
  14494. "type": "number"
  14495. },
  14496. "aggregateID": {
  14497. "type": "string",
  14498. "enum": ["sessionID"]
  14499. },
  14500. "data": {
  14501. "type": "object",
  14502. "properties": {
  14503. "timestamp": {
  14504. "type": "number"
  14505. },
  14506. "sessionID": {
  14507. "type": "string"
  14508. },
  14509. "agent": {
  14510. "type": "string"
  14511. },
  14512. "model": {
  14513. "type": "object",
  14514. "properties": {
  14515. "id": {
  14516. "type": "string"
  14517. },
  14518. "providerID": {
  14519. "type": "string"
  14520. },
  14521. "variant": {
  14522. "type": "string"
  14523. }
  14524. },
  14525. "required": ["id", "providerID", "variant"],
  14526. "additionalProperties": false
  14527. },
  14528. "snapshot": {
  14529. "type": "string"
  14530. }
  14531. },
  14532. "required": ["timestamp", "sessionID", "agent", "model"],
  14533. "additionalProperties": false
  14534. }
  14535. },
  14536. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14537. "additionalProperties": false
  14538. },
  14539. "SyncEventSessionNextStepEnded": {
  14540. "type": "object",
  14541. "properties": {
  14542. "type": {
  14543. "type": "string",
  14544. "enum": ["sync"]
  14545. },
  14546. "name": {
  14547. "type": "string",
  14548. "enum": ["session.next.step.ended.1"]
  14549. },
  14550. "id": {
  14551. "type": "string"
  14552. },
  14553. "seq": {
  14554. "type": "number"
  14555. },
  14556. "aggregateID": {
  14557. "type": "string",
  14558. "enum": ["sessionID"]
  14559. },
  14560. "data": {
  14561. "type": "object",
  14562. "properties": {
  14563. "timestamp": {
  14564. "type": "number"
  14565. },
  14566. "sessionID": {
  14567. "type": "string"
  14568. },
  14569. "finish": {
  14570. "type": "string"
  14571. },
  14572. "cost": {
  14573. "type": "number"
  14574. },
  14575. "tokens": {
  14576. "type": "object",
  14577. "properties": {
  14578. "input": {
  14579. "type": "integer",
  14580. "minimum": 0
  14581. },
  14582. "output": {
  14583. "type": "integer",
  14584. "minimum": 0
  14585. },
  14586. "reasoning": {
  14587. "type": "integer",
  14588. "minimum": 0
  14589. },
  14590. "cache": {
  14591. "type": "object",
  14592. "properties": {
  14593. "read": {
  14594. "type": "integer",
  14595. "minimum": 0
  14596. },
  14597. "write": {
  14598. "type": "integer",
  14599. "minimum": 0
  14600. }
  14601. },
  14602. "required": ["read", "write"],
  14603. "additionalProperties": false
  14604. }
  14605. },
  14606. "required": ["input", "output", "reasoning", "cache"],
  14607. "additionalProperties": false
  14608. },
  14609. "snapshot": {
  14610. "type": "string"
  14611. }
  14612. },
  14613. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  14614. "additionalProperties": false
  14615. }
  14616. },
  14617. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14618. "additionalProperties": false
  14619. },
  14620. "SyncEventSessionNextStepFailed": {
  14621. "type": "object",
  14622. "properties": {
  14623. "type": {
  14624. "type": "string",
  14625. "enum": ["sync"]
  14626. },
  14627. "name": {
  14628. "type": "string",
  14629. "enum": ["session.next.step.failed.1"]
  14630. },
  14631. "id": {
  14632. "type": "string"
  14633. },
  14634. "seq": {
  14635. "type": "number"
  14636. },
  14637. "aggregateID": {
  14638. "type": "string",
  14639. "enum": ["sessionID"]
  14640. },
  14641. "data": {
  14642. "type": "object",
  14643. "properties": {
  14644. "timestamp": {
  14645. "type": "number"
  14646. },
  14647. "sessionID": {
  14648. "type": "string"
  14649. },
  14650. "error": {
  14651. "$ref": "#/components/schemas/SessionErrorUnknown"
  14652. }
  14653. },
  14654. "required": ["timestamp", "sessionID", "error"],
  14655. "additionalProperties": false
  14656. }
  14657. },
  14658. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14659. "additionalProperties": false
  14660. },
  14661. "SyncEventSessionNextTextStarted": {
  14662. "type": "object",
  14663. "properties": {
  14664. "type": {
  14665. "type": "string",
  14666. "enum": ["sync"]
  14667. },
  14668. "name": {
  14669. "type": "string",
  14670. "enum": ["session.next.text.started.1"]
  14671. },
  14672. "id": {
  14673. "type": "string"
  14674. },
  14675. "seq": {
  14676. "type": "number"
  14677. },
  14678. "aggregateID": {
  14679. "type": "string",
  14680. "enum": ["sessionID"]
  14681. },
  14682. "data": {
  14683. "type": "object",
  14684. "properties": {
  14685. "timestamp": {
  14686. "type": "number"
  14687. },
  14688. "sessionID": {
  14689. "type": "string"
  14690. }
  14691. },
  14692. "required": ["timestamp", "sessionID"],
  14693. "additionalProperties": false
  14694. }
  14695. },
  14696. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14697. "additionalProperties": false
  14698. },
  14699. "SyncEventSessionNextTextDelta": {
  14700. "type": "object",
  14701. "properties": {
  14702. "type": {
  14703. "type": "string",
  14704. "enum": ["sync"]
  14705. },
  14706. "name": {
  14707. "type": "string",
  14708. "enum": ["session.next.text.delta.1"]
  14709. },
  14710. "id": {
  14711. "type": "string"
  14712. },
  14713. "seq": {
  14714. "type": "number"
  14715. },
  14716. "aggregateID": {
  14717. "type": "string",
  14718. "enum": ["sessionID"]
  14719. },
  14720. "data": {
  14721. "type": "object",
  14722. "properties": {
  14723. "timestamp": {
  14724. "type": "number"
  14725. },
  14726. "sessionID": {
  14727. "type": "string"
  14728. },
  14729. "delta": {
  14730. "type": "string"
  14731. }
  14732. },
  14733. "required": ["timestamp", "sessionID", "delta"],
  14734. "additionalProperties": false
  14735. }
  14736. },
  14737. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14738. "additionalProperties": false
  14739. },
  14740. "SyncEventSessionNextTextEnded": {
  14741. "type": "object",
  14742. "properties": {
  14743. "type": {
  14744. "type": "string",
  14745. "enum": ["sync"]
  14746. },
  14747. "name": {
  14748. "type": "string",
  14749. "enum": ["session.next.text.ended.1"]
  14750. },
  14751. "id": {
  14752. "type": "string"
  14753. },
  14754. "seq": {
  14755. "type": "number"
  14756. },
  14757. "aggregateID": {
  14758. "type": "string",
  14759. "enum": ["sessionID"]
  14760. },
  14761. "data": {
  14762. "type": "object",
  14763. "properties": {
  14764. "timestamp": {
  14765. "type": "number"
  14766. },
  14767. "sessionID": {
  14768. "type": "string"
  14769. },
  14770. "text": {
  14771. "type": "string"
  14772. }
  14773. },
  14774. "required": ["timestamp", "sessionID", "text"],
  14775. "additionalProperties": false
  14776. }
  14777. },
  14778. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14779. "additionalProperties": false
  14780. },
  14781. "SyncEventSessionNextReasoningStarted": {
  14782. "type": "object",
  14783. "properties": {
  14784. "type": {
  14785. "type": "string",
  14786. "enum": ["sync"]
  14787. },
  14788. "name": {
  14789. "type": "string",
  14790. "enum": ["session.next.reasoning.started.1"]
  14791. },
  14792. "id": {
  14793. "type": "string"
  14794. },
  14795. "seq": {
  14796. "type": "number"
  14797. },
  14798. "aggregateID": {
  14799. "type": "string",
  14800. "enum": ["sessionID"]
  14801. },
  14802. "data": {
  14803. "type": "object",
  14804. "properties": {
  14805. "timestamp": {
  14806. "type": "number"
  14807. },
  14808. "sessionID": {
  14809. "type": "string"
  14810. },
  14811. "reasoningID": {
  14812. "type": "string"
  14813. }
  14814. },
  14815. "required": ["timestamp", "sessionID", "reasoningID"],
  14816. "additionalProperties": false
  14817. }
  14818. },
  14819. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14820. "additionalProperties": false
  14821. },
  14822. "SyncEventSessionNextReasoningDelta": {
  14823. "type": "object",
  14824. "properties": {
  14825. "type": {
  14826. "type": "string",
  14827. "enum": ["sync"]
  14828. },
  14829. "name": {
  14830. "type": "string",
  14831. "enum": ["session.next.reasoning.delta.1"]
  14832. },
  14833. "id": {
  14834. "type": "string"
  14835. },
  14836. "seq": {
  14837. "type": "number"
  14838. },
  14839. "aggregateID": {
  14840. "type": "string",
  14841. "enum": ["sessionID"]
  14842. },
  14843. "data": {
  14844. "type": "object",
  14845. "properties": {
  14846. "timestamp": {
  14847. "type": "number"
  14848. },
  14849. "sessionID": {
  14850. "type": "string"
  14851. },
  14852. "reasoningID": {
  14853. "type": "string"
  14854. },
  14855. "delta": {
  14856. "type": "string"
  14857. }
  14858. },
  14859. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  14860. "additionalProperties": false
  14861. }
  14862. },
  14863. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14864. "additionalProperties": false
  14865. },
  14866. "SyncEventSessionNextReasoningEnded": {
  14867. "type": "object",
  14868. "properties": {
  14869. "type": {
  14870. "type": "string",
  14871. "enum": ["sync"]
  14872. },
  14873. "name": {
  14874. "type": "string",
  14875. "enum": ["session.next.reasoning.ended.1"]
  14876. },
  14877. "id": {
  14878. "type": "string"
  14879. },
  14880. "seq": {
  14881. "type": "number"
  14882. },
  14883. "aggregateID": {
  14884. "type": "string",
  14885. "enum": ["sessionID"]
  14886. },
  14887. "data": {
  14888. "type": "object",
  14889. "properties": {
  14890. "timestamp": {
  14891. "type": "number"
  14892. },
  14893. "sessionID": {
  14894. "type": "string"
  14895. },
  14896. "reasoningID": {
  14897. "type": "string"
  14898. },
  14899. "text": {
  14900. "type": "string"
  14901. }
  14902. },
  14903. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  14904. "additionalProperties": false
  14905. }
  14906. },
  14907. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14908. "additionalProperties": false
  14909. },
  14910. "SyncEventSessionNextToolInputStarted": {
  14911. "type": "object",
  14912. "properties": {
  14913. "type": {
  14914. "type": "string",
  14915. "enum": ["sync"]
  14916. },
  14917. "name": {
  14918. "type": "string",
  14919. "enum": ["session.next.tool.input.started.1"]
  14920. },
  14921. "id": {
  14922. "type": "string"
  14923. },
  14924. "seq": {
  14925. "type": "number"
  14926. },
  14927. "aggregateID": {
  14928. "type": "string",
  14929. "enum": ["sessionID"]
  14930. },
  14931. "data": {
  14932. "type": "object",
  14933. "properties": {
  14934. "timestamp": {
  14935. "type": "number"
  14936. },
  14937. "sessionID": {
  14938. "type": "string"
  14939. },
  14940. "callID": {
  14941. "type": "string"
  14942. },
  14943. "name": {
  14944. "type": "string"
  14945. }
  14946. },
  14947. "required": ["timestamp", "sessionID", "callID", "name"],
  14948. "additionalProperties": false
  14949. }
  14950. },
  14951. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14952. "additionalProperties": false
  14953. },
  14954. "SyncEventSessionNextToolInputDelta": {
  14955. "type": "object",
  14956. "properties": {
  14957. "type": {
  14958. "type": "string",
  14959. "enum": ["sync"]
  14960. },
  14961. "name": {
  14962. "type": "string",
  14963. "enum": ["session.next.tool.input.delta.1"]
  14964. },
  14965. "id": {
  14966. "type": "string"
  14967. },
  14968. "seq": {
  14969. "type": "number"
  14970. },
  14971. "aggregateID": {
  14972. "type": "string",
  14973. "enum": ["sessionID"]
  14974. },
  14975. "data": {
  14976. "type": "object",
  14977. "properties": {
  14978. "timestamp": {
  14979. "type": "number"
  14980. },
  14981. "sessionID": {
  14982. "type": "string"
  14983. },
  14984. "callID": {
  14985. "type": "string"
  14986. },
  14987. "delta": {
  14988. "type": "string"
  14989. }
  14990. },
  14991. "required": ["timestamp", "sessionID", "callID", "delta"],
  14992. "additionalProperties": false
  14993. }
  14994. },
  14995. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14996. "additionalProperties": false
  14997. },
  14998. "SyncEventSessionNextToolInputEnded": {
  14999. "type": "object",
  15000. "properties": {
  15001. "type": {
  15002. "type": "string",
  15003. "enum": ["sync"]
  15004. },
  15005. "name": {
  15006. "type": "string",
  15007. "enum": ["session.next.tool.input.ended.1"]
  15008. },
  15009. "id": {
  15010. "type": "string"
  15011. },
  15012. "seq": {
  15013. "type": "number"
  15014. },
  15015. "aggregateID": {
  15016. "type": "string",
  15017. "enum": ["sessionID"]
  15018. },
  15019. "data": {
  15020. "type": "object",
  15021. "properties": {
  15022. "timestamp": {
  15023. "type": "number"
  15024. },
  15025. "sessionID": {
  15026. "type": "string"
  15027. },
  15028. "callID": {
  15029. "type": "string"
  15030. },
  15031. "text": {
  15032. "type": "string"
  15033. }
  15034. },
  15035. "required": ["timestamp", "sessionID", "callID", "text"],
  15036. "additionalProperties": false
  15037. }
  15038. },
  15039. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15040. "additionalProperties": false
  15041. },
  15042. "SyncEventSessionNextToolCalled": {
  15043. "type": "object",
  15044. "properties": {
  15045. "type": {
  15046. "type": "string",
  15047. "enum": ["sync"]
  15048. },
  15049. "name": {
  15050. "type": "string",
  15051. "enum": ["session.next.tool.called.1"]
  15052. },
  15053. "id": {
  15054. "type": "string"
  15055. },
  15056. "seq": {
  15057. "type": "number"
  15058. },
  15059. "aggregateID": {
  15060. "type": "string",
  15061. "enum": ["sessionID"]
  15062. },
  15063. "data": {
  15064. "type": "object",
  15065. "properties": {
  15066. "timestamp": {
  15067. "type": "number"
  15068. },
  15069. "sessionID": {
  15070. "type": "string"
  15071. },
  15072. "callID": {
  15073. "type": "string"
  15074. },
  15075. "tool": {
  15076. "type": "string"
  15077. },
  15078. "input": {
  15079. "type": "object"
  15080. },
  15081. "provider": {
  15082. "type": "object",
  15083. "properties": {
  15084. "executed": {
  15085. "type": "boolean"
  15086. },
  15087. "metadata": {
  15088. "type": "object"
  15089. }
  15090. },
  15091. "required": ["executed"],
  15092. "additionalProperties": false
  15093. }
  15094. },
  15095. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15096. "additionalProperties": false
  15097. }
  15098. },
  15099. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15100. "additionalProperties": false
  15101. },
  15102. "SyncEventSessionNextToolProgress": {
  15103. "type": "object",
  15104. "properties": {
  15105. "type": {
  15106. "type": "string",
  15107. "enum": ["sync"]
  15108. },
  15109. "name": {
  15110. "type": "string",
  15111. "enum": ["session.next.tool.progress.1"]
  15112. },
  15113. "id": {
  15114. "type": "string"
  15115. },
  15116. "seq": {
  15117. "type": "number"
  15118. },
  15119. "aggregateID": {
  15120. "type": "string",
  15121. "enum": ["sessionID"]
  15122. },
  15123. "data": {
  15124. "type": "object",
  15125. "properties": {
  15126. "timestamp": {
  15127. "type": "number"
  15128. },
  15129. "sessionID": {
  15130. "type": "string"
  15131. },
  15132. "callID": {
  15133. "type": "string"
  15134. },
  15135. "structured": {
  15136. "type": "object"
  15137. },
  15138. "content": {
  15139. "type": "array",
  15140. "items": {
  15141. "anyOf": [
  15142. {
  15143. "$ref": "#/components/schemas/ToolTextContent"
  15144. },
  15145. {
  15146. "$ref": "#/components/schemas/ToolFileContent"
  15147. }
  15148. ]
  15149. }
  15150. }
  15151. },
  15152. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15153. "additionalProperties": false
  15154. }
  15155. },
  15156. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15157. "additionalProperties": false
  15158. },
  15159. "SyncEventSessionNextToolSuccess": {
  15160. "type": "object",
  15161. "properties": {
  15162. "type": {
  15163. "type": "string",
  15164. "enum": ["sync"]
  15165. },
  15166. "name": {
  15167. "type": "string",
  15168. "enum": ["session.next.tool.success.1"]
  15169. },
  15170. "id": {
  15171. "type": "string"
  15172. },
  15173. "seq": {
  15174. "type": "number"
  15175. },
  15176. "aggregateID": {
  15177. "type": "string",
  15178. "enum": ["sessionID"]
  15179. },
  15180. "data": {
  15181. "type": "object",
  15182. "properties": {
  15183. "timestamp": {
  15184. "type": "number"
  15185. },
  15186. "sessionID": {
  15187. "type": "string"
  15188. },
  15189. "callID": {
  15190. "type": "string"
  15191. },
  15192. "structured": {
  15193. "type": "object"
  15194. },
  15195. "content": {
  15196. "type": "array",
  15197. "items": {
  15198. "anyOf": [
  15199. {
  15200. "$ref": "#/components/schemas/ToolTextContent"
  15201. },
  15202. {
  15203. "$ref": "#/components/schemas/ToolFileContent"
  15204. }
  15205. ]
  15206. }
  15207. },
  15208. "provider": {
  15209. "type": "object",
  15210. "properties": {
  15211. "executed": {
  15212. "type": "boolean"
  15213. },
  15214. "metadata": {
  15215. "type": "object"
  15216. }
  15217. },
  15218. "required": ["executed"],
  15219. "additionalProperties": false
  15220. }
  15221. },
  15222. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15223. "additionalProperties": false
  15224. }
  15225. },
  15226. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15227. "additionalProperties": false
  15228. },
  15229. "SyncEventSessionNextToolFailed": {
  15230. "type": "object",
  15231. "properties": {
  15232. "type": {
  15233. "type": "string",
  15234. "enum": ["sync"]
  15235. },
  15236. "name": {
  15237. "type": "string",
  15238. "enum": ["session.next.tool.failed.1"]
  15239. },
  15240. "id": {
  15241. "type": "string"
  15242. },
  15243. "seq": {
  15244. "type": "number"
  15245. },
  15246. "aggregateID": {
  15247. "type": "string",
  15248. "enum": ["sessionID"]
  15249. },
  15250. "data": {
  15251. "type": "object",
  15252. "properties": {
  15253. "timestamp": {
  15254. "type": "number"
  15255. },
  15256. "sessionID": {
  15257. "type": "string"
  15258. },
  15259. "callID": {
  15260. "type": "string"
  15261. },
  15262. "error": {
  15263. "$ref": "#/components/schemas/SessionErrorUnknown"
  15264. },
  15265. "provider": {
  15266. "type": "object",
  15267. "properties": {
  15268. "executed": {
  15269. "type": "boolean"
  15270. },
  15271. "metadata": {
  15272. "type": "object"
  15273. }
  15274. },
  15275. "required": ["executed"],
  15276. "additionalProperties": false
  15277. }
  15278. },
  15279. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15280. "additionalProperties": false
  15281. }
  15282. },
  15283. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15284. "additionalProperties": false
  15285. },
  15286. "SyncEventSessionNextRetried": {
  15287. "type": "object",
  15288. "properties": {
  15289. "type": {
  15290. "type": "string",
  15291. "enum": ["sync"]
  15292. },
  15293. "name": {
  15294. "type": "string",
  15295. "enum": ["session.next.retried.1"]
  15296. },
  15297. "id": {
  15298. "type": "string"
  15299. },
  15300. "seq": {
  15301. "type": "number"
  15302. },
  15303. "aggregateID": {
  15304. "type": "string",
  15305. "enum": ["sessionID"]
  15306. },
  15307. "data": {
  15308. "type": "object",
  15309. "properties": {
  15310. "timestamp": {
  15311. "type": "number"
  15312. },
  15313. "sessionID": {
  15314. "type": "string"
  15315. },
  15316. "attempt": {
  15317. "type": "integer",
  15318. "minimum": 0
  15319. },
  15320. "error": {
  15321. "$ref": "#/components/schemas/SessionNextRetry_error"
  15322. }
  15323. },
  15324. "required": ["timestamp", "sessionID", "attempt", "error"],
  15325. "additionalProperties": false
  15326. }
  15327. },
  15328. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15329. "additionalProperties": false
  15330. },
  15331. "SyncEventSessionNextCompactionStarted": {
  15332. "type": "object",
  15333. "properties": {
  15334. "type": {
  15335. "type": "string",
  15336. "enum": ["sync"]
  15337. },
  15338. "name": {
  15339. "type": "string",
  15340. "enum": ["session.next.compaction.started.1"]
  15341. },
  15342. "id": {
  15343. "type": "string"
  15344. },
  15345. "seq": {
  15346. "type": "number"
  15347. },
  15348. "aggregateID": {
  15349. "type": "string",
  15350. "enum": ["sessionID"]
  15351. },
  15352. "data": {
  15353. "type": "object",
  15354. "properties": {
  15355. "timestamp": {
  15356. "type": "number"
  15357. },
  15358. "sessionID": {
  15359. "type": "string"
  15360. },
  15361. "reason": {
  15362. "type": "string",
  15363. "enum": ["auto", "manual"]
  15364. }
  15365. },
  15366. "required": ["timestamp", "sessionID", "reason"],
  15367. "additionalProperties": false
  15368. }
  15369. },
  15370. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15371. "additionalProperties": false
  15372. },
  15373. "SyncEventSessionNextCompactionDelta": {
  15374. "type": "object",
  15375. "properties": {
  15376. "type": {
  15377. "type": "string",
  15378. "enum": ["sync"]
  15379. },
  15380. "name": {
  15381. "type": "string",
  15382. "enum": ["session.next.compaction.delta.1"]
  15383. },
  15384. "id": {
  15385. "type": "string"
  15386. },
  15387. "seq": {
  15388. "type": "number"
  15389. },
  15390. "aggregateID": {
  15391. "type": "string",
  15392. "enum": ["sessionID"]
  15393. },
  15394. "data": {
  15395. "type": "object",
  15396. "properties": {
  15397. "timestamp": {
  15398. "type": "number"
  15399. },
  15400. "sessionID": {
  15401. "type": "string"
  15402. },
  15403. "text": {
  15404. "type": "string"
  15405. }
  15406. },
  15407. "required": ["timestamp", "sessionID", "text"],
  15408. "additionalProperties": false
  15409. }
  15410. },
  15411. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15412. "additionalProperties": false
  15413. },
  15414. "SyncEventSessionNextCompactionEnded": {
  15415. "type": "object",
  15416. "properties": {
  15417. "type": {
  15418. "type": "string",
  15419. "enum": ["sync"]
  15420. },
  15421. "name": {
  15422. "type": "string",
  15423. "enum": ["session.next.compaction.ended.1"]
  15424. },
  15425. "id": {
  15426. "type": "string"
  15427. },
  15428. "seq": {
  15429. "type": "number"
  15430. },
  15431. "aggregateID": {
  15432. "type": "string",
  15433. "enum": ["sessionID"]
  15434. },
  15435. "data": {
  15436. "type": "object",
  15437. "properties": {
  15438. "timestamp": {
  15439. "type": "number"
  15440. },
  15441. "sessionID": {
  15442. "type": "string"
  15443. },
  15444. "text": {
  15445. "type": "string"
  15446. },
  15447. "include": {
  15448. "type": "string"
  15449. }
  15450. },
  15451. "required": ["timestamp", "sessionID", "text"],
  15452. "additionalProperties": false
  15453. }
  15454. },
  15455. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15456. "additionalProperties": false
  15457. },
  15458. "EventServerInstanceDisposed": {
  15459. "type": "object",
  15460. "properties": {
  15461. "id": {
  15462. "type": "string"
  15463. },
  15464. "type": {
  15465. "type": "string",
  15466. "enum": ["server.instance.disposed"]
  15467. },
  15468. "properties": {
  15469. "type": "object",
  15470. "properties": {
  15471. "directory": {
  15472. "type": "string"
  15473. }
  15474. },
  15475. "required": ["directory"],
  15476. "additionalProperties": false
  15477. }
  15478. },
  15479. "required": ["id", "type", "properties"],
  15480. "additionalProperties": false
  15481. },
  15482. "EventFileEdited": {
  15483. "type": "object",
  15484. "properties": {
  15485. "id": {
  15486. "type": "string"
  15487. },
  15488. "type": {
  15489. "type": "string",
  15490. "enum": ["file.edited"]
  15491. },
  15492. "properties": {
  15493. "type": "object",
  15494. "properties": {
  15495. "file": {
  15496. "type": "string"
  15497. }
  15498. },
  15499. "required": ["file"],
  15500. "additionalProperties": false
  15501. }
  15502. },
  15503. "required": ["id", "type", "properties"],
  15504. "additionalProperties": false
  15505. },
  15506. "EventFileWatcherUpdated": {
  15507. "type": "object",
  15508. "properties": {
  15509. "id": {
  15510. "type": "string"
  15511. },
  15512. "type": {
  15513. "type": "string",
  15514. "enum": ["file.watcher.updated"]
  15515. },
  15516. "properties": {
  15517. "type": "object",
  15518. "properties": {
  15519. "file": {
  15520. "type": "string"
  15521. },
  15522. "event": {
  15523. "type": "string",
  15524. "enum": ["add", "change", "unlink"]
  15525. }
  15526. },
  15527. "required": ["file", "event"],
  15528. "additionalProperties": false
  15529. }
  15530. },
  15531. "required": ["id", "type", "properties"],
  15532. "additionalProperties": false
  15533. },
  15534. "EventLspClientDiagnostics": {
  15535. "type": "object",
  15536. "properties": {
  15537. "id": {
  15538. "type": "string"
  15539. },
  15540. "type": {
  15541. "type": "string",
  15542. "enum": ["lsp.client.diagnostics"]
  15543. },
  15544. "properties": {
  15545. "type": "object",
  15546. "properties": {
  15547. "serverID": {
  15548. "type": "string"
  15549. },
  15550. "path": {
  15551. "type": "string"
  15552. }
  15553. },
  15554. "required": ["serverID", "path"],
  15555. "additionalProperties": false
  15556. }
  15557. },
  15558. "required": ["id", "type", "properties"],
  15559. "additionalProperties": false
  15560. },
  15561. "EventLspUpdated": {
  15562. "type": "object",
  15563. "properties": {
  15564. "id": {
  15565. "type": "string"
  15566. },
  15567. "type": {
  15568. "type": "string",
  15569. "enum": ["lsp.updated"]
  15570. },
  15571. "properties": {
  15572. "type": "object",
  15573. "properties": {}
  15574. }
  15575. },
  15576. "required": ["id", "type", "properties"],
  15577. "additionalProperties": false
  15578. },
  15579. "EventMessagePartDelta": {
  15580. "type": "object",
  15581. "properties": {
  15582. "id": {
  15583. "type": "string"
  15584. },
  15585. "type": {
  15586. "type": "string",
  15587. "enum": ["message.part.delta"]
  15588. },
  15589. "properties": {
  15590. "type": "object",
  15591. "properties": {
  15592. "sessionID": {
  15593. "type": "string"
  15594. },
  15595. "messageID": {
  15596. "type": "string"
  15597. },
  15598. "partID": {
  15599. "type": "string"
  15600. },
  15601. "field": {
  15602. "type": "string"
  15603. },
  15604. "delta": {
  15605. "type": "string"
  15606. }
  15607. },
  15608. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15609. "additionalProperties": false
  15610. }
  15611. },
  15612. "required": ["id", "type", "properties"],
  15613. "additionalProperties": false
  15614. },
  15615. "EventPermissionAsked": {
  15616. "type": "object",
  15617. "properties": {
  15618. "id": {
  15619. "type": "string"
  15620. },
  15621. "type": {
  15622. "type": "string",
  15623. "enum": ["permission.asked"]
  15624. },
  15625. "properties": {
  15626. "$ref": "#/components/schemas/PermissionRequest"
  15627. }
  15628. },
  15629. "required": ["id", "type", "properties"],
  15630. "additionalProperties": false
  15631. },
  15632. "EventPermissionReplied": {
  15633. "type": "object",
  15634. "properties": {
  15635. "id": {
  15636. "type": "string"
  15637. },
  15638. "type": {
  15639. "type": "string",
  15640. "enum": ["permission.replied"]
  15641. },
  15642. "properties": {
  15643. "type": "object",
  15644. "properties": {
  15645. "sessionID": {
  15646. "type": "string"
  15647. },
  15648. "requestID": {
  15649. "type": "string"
  15650. },
  15651. "reply": {
  15652. "type": "string",
  15653. "enum": ["once", "always", "reject"]
  15654. }
  15655. },
  15656. "required": ["sessionID", "requestID", "reply"],
  15657. "additionalProperties": false
  15658. }
  15659. },
  15660. "required": ["id", "type", "properties"],
  15661. "additionalProperties": false
  15662. },
  15663. "EventSessionDiff": {
  15664. "type": "object",
  15665. "properties": {
  15666. "id": {
  15667. "type": "string"
  15668. },
  15669. "type": {
  15670. "type": "string",
  15671. "enum": ["session.diff"]
  15672. },
  15673. "properties": {
  15674. "type": "object",
  15675. "properties": {
  15676. "sessionID": {
  15677. "type": "string"
  15678. },
  15679. "diff": {
  15680. "type": "array",
  15681. "items": {
  15682. "$ref": "#/components/schemas/SnapshotFileDiff"
  15683. }
  15684. }
  15685. },
  15686. "required": ["sessionID", "diff"],
  15687. "additionalProperties": false
  15688. }
  15689. },
  15690. "required": ["id", "type", "properties"],
  15691. "additionalProperties": false
  15692. },
  15693. "EventSessionError": {
  15694. "type": "object",
  15695. "properties": {
  15696. "id": {
  15697. "type": "string"
  15698. },
  15699. "type": {
  15700. "type": "string",
  15701. "enum": ["session.error"]
  15702. },
  15703. "properties": {
  15704. "type": "object",
  15705. "properties": {
  15706. "sessionID": {
  15707. "type": "string"
  15708. },
  15709. "error": {
  15710. "anyOf": [
  15711. {
  15712. "$ref": "#/components/schemas/ProviderAuthError"
  15713. },
  15714. {
  15715. "$ref": "#/components/schemas/UnknownError"
  15716. },
  15717. {
  15718. "$ref": "#/components/schemas/MessageOutputLengthError"
  15719. },
  15720. {
  15721. "$ref": "#/components/schemas/MessageAbortedError"
  15722. },
  15723. {
  15724. "$ref": "#/components/schemas/StructuredOutputError"
  15725. },
  15726. {
  15727. "$ref": "#/components/schemas/ContextOverflowError"
  15728. },
  15729. {
  15730. "$ref": "#/components/schemas/APIError"
  15731. }
  15732. ]
  15733. }
  15734. },
  15735. "additionalProperties": false
  15736. }
  15737. },
  15738. "required": ["id", "type", "properties"],
  15739. "additionalProperties": false
  15740. },
  15741. "EventInstallationUpdated": {
  15742. "type": "object",
  15743. "properties": {
  15744. "id": {
  15745. "type": "string"
  15746. },
  15747. "type": {
  15748. "type": "string",
  15749. "enum": ["installation.updated"]
  15750. },
  15751. "properties": {
  15752. "type": "object",
  15753. "properties": {
  15754. "version": {
  15755. "type": "string"
  15756. }
  15757. },
  15758. "required": ["version"],
  15759. "additionalProperties": false
  15760. }
  15761. },
  15762. "required": ["id", "type", "properties"],
  15763. "additionalProperties": false
  15764. },
  15765. "EventInstallationUpdate-available": {
  15766. "type": "object",
  15767. "properties": {
  15768. "id": {
  15769. "type": "string"
  15770. },
  15771. "type": {
  15772. "type": "string",
  15773. "enum": ["installation.update-available"]
  15774. },
  15775. "properties": {
  15776. "type": "object",
  15777. "properties": {
  15778. "version": {
  15779. "type": "string"
  15780. }
  15781. },
  15782. "required": ["version"],
  15783. "additionalProperties": false
  15784. }
  15785. },
  15786. "required": ["id", "type", "properties"],
  15787. "additionalProperties": false
  15788. },
  15789. "EventQuestionAsked": {
  15790. "type": "object",
  15791. "properties": {
  15792. "id": {
  15793. "type": "string"
  15794. },
  15795. "type": {
  15796. "type": "string",
  15797. "enum": ["question.asked"]
  15798. },
  15799. "properties": {
  15800. "$ref": "#/components/schemas/QuestionRequest"
  15801. }
  15802. },
  15803. "required": ["id", "type", "properties"],
  15804. "additionalProperties": false
  15805. },
  15806. "EventQuestionReplied": {
  15807. "type": "object",
  15808. "properties": {
  15809. "id": {
  15810. "type": "string"
  15811. },
  15812. "type": {
  15813. "type": "string",
  15814. "enum": ["question.replied"]
  15815. },
  15816. "properties": {
  15817. "$ref": "#/components/schemas/QuestionReplied"
  15818. }
  15819. },
  15820. "required": ["id", "type", "properties"],
  15821. "additionalProperties": false
  15822. },
  15823. "EventQuestionRejected": {
  15824. "type": "object",
  15825. "properties": {
  15826. "id": {
  15827. "type": "string"
  15828. },
  15829. "type": {
  15830. "type": "string",
  15831. "enum": ["question.rejected"]
  15832. },
  15833. "properties": {
  15834. "$ref": "#/components/schemas/QuestionRejected"
  15835. }
  15836. },
  15837. "required": ["id", "type", "properties"],
  15838. "additionalProperties": false
  15839. },
  15840. "EventTodoUpdated": {
  15841. "type": "object",
  15842. "properties": {
  15843. "id": {
  15844. "type": "string"
  15845. },
  15846. "type": {
  15847. "type": "string",
  15848. "enum": ["todo.updated"]
  15849. },
  15850. "properties": {
  15851. "type": "object",
  15852. "properties": {
  15853. "sessionID": {
  15854. "type": "string"
  15855. },
  15856. "todos": {
  15857. "type": "array",
  15858. "items": {
  15859. "$ref": "#/components/schemas/Todo"
  15860. }
  15861. }
  15862. },
  15863. "required": ["sessionID", "todos"],
  15864. "additionalProperties": false
  15865. }
  15866. },
  15867. "required": ["id", "type", "properties"],
  15868. "additionalProperties": false
  15869. },
  15870. "EventSessionStatus": {
  15871. "type": "object",
  15872. "properties": {
  15873. "id": {
  15874. "type": "string"
  15875. },
  15876. "type": {
  15877. "type": "string",
  15878. "enum": ["session.status"]
  15879. },
  15880. "properties": {
  15881. "type": "object",
  15882. "properties": {
  15883. "sessionID": {
  15884. "type": "string"
  15885. },
  15886. "status": {
  15887. "$ref": "#/components/schemas/SessionStatus"
  15888. }
  15889. },
  15890. "required": ["sessionID", "status"],
  15891. "additionalProperties": false
  15892. }
  15893. },
  15894. "required": ["id", "type", "properties"],
  15895. "additionalProperties": false
  15896. },
  15897. "EventSessionIdle": {
  15898. "type": "object",
  15899. "properties": {
  15900. "id": {
  15901. "type": "string"
  15902. },
  15903. "type": {
  15904. "type": "string",
  15905. "enum": ["session.idle"]
  15906. },
  15907. "properties": {
  15908. "type": "object",
  15909. "properties": {
  15910. "sessionID": {
  15911. "type": "string"
  15912. }
  15913. },
  15914. "required": ["sessionID"],
  15915. "additionalProperties": false
  15916. }
  15917. },
  15918. "required": ["id", "type", "properties"],
  15919. "additionalProperties": false
  15920. },
  15921. "EventSessionCompacted": {
  15922. "type": "object",
  15923. "properties": {
  15924. "id": {
  15925. "type": "string"
  15926. },
  15927. "type": {
  15928. "type": "string",
  15929. "enum": ["session.compacted"]
  15930. },
  15931. "properties": {
  15932. "type": "object",
  15933. "properties": {
  15934. "sessionID": {
  15935. "type": "string"
  15936. }
  15937. },
  15938. "required": ["sessionID"],
  15939. "additionalProperties": false
  15940. }
  15941. },
  15942. "required": ["id", "type", "properties"],
  15943. "additionalProperties": false
  15944. },
  15945. "EventMcpToolsChanged": {
  15946. "type": "object",
  15947. "properties": {
  15948. "id": {
  15949. "type": "string"
  15950. },
  15951. "type": {
  15952. "type": "string",
  15953. "enum": ["mcp.tools.changed"]
  15954. },
  15955. "properties": {
  15956. "type": "object",
  15957. "properties": {
  15958. "server": {
  15959. "type": "string"
  15960. }
  15961. },
  15962. "required": ["server"],
  15963. "additionalProperties": false
  15964. }
  15965. },
  15966. "required": ["id", "type", "properties"],
  15967. "additionalProperties": false
  15968. },
  15969. "EventMcpBrowserOpenFailed": {
  15970. "type": "object",
  15971. "properties": {
  15972. "id": {
  15973. "type": "string"
  15974. },
  15975. "type": {
  15976. "type": "string",
  15977. "enum": ["mcp.browser.open.failed"]
  15978. },
  15979. "properties": {
  15980. "type": "object",
  15981. "properties": {
  15982. "mcpName": {
  15983. "type": "string"
  15984. },
  15985. "url": {
  15986. "type": "string"
  15987. }
  15988. },
  15989. "required": ["mcpName", "url"],
  15990. "additionalProperties": false
  15991. }
  15992. },
  15993. "required": ["id", "type", "properties"],
  15994. "additionalProperties": false
  15995. },
  15996. "EventCommandExecuted": {
  15997. "type": "object",
  15998. "properties": {
  15999. "id": {
  16000. "type": "string"
  16001. },
  16002. "type": {
  16003. "type": "string",
  16004. "enum": ["command.executed"]
  16005. },
  16006. "properties": {
  16007. "type": "object",
  16008. "properties": {
  16009. "name": {
  16010. "type": "string"
  16011. },
  16012. "sessionID": {
  16013. "type": "string"
  16014. },
  16015. "arguments": {
  16016. "type": "string"
  16017. },
  16018. "messageID": {
  16019. "type": "string"
  16020. }
  16021. },
  16022. "required": ["name", "sessionID", "arguments", "messageID"],
  16023. "additionalProperties": false
  16024. }
  16025. },
  16026. "required": ["id", "type", "properties"],
  16027. "additionalProperties": false
  16028. },
  16029. "EventProjectUpdated": {
  16030. "type": "object",
  16031. "properties": {
  16032. "id": {
  16033. "type": "string"
  16034. },
  16035. "type": {
  16036. "type": "string",
  16037. "enum": ["project.updated"]
  16038. },
  16039. "properties": {
  16040. "$ref": "#/components/schemas/Project"
  16041. }
  16042. },
  16043. "required": ["id", "type", "properties"],
  16044. "additionalProperties": false
  16045. },
  16046. "EventVcsBranchUpdated": {
  16047. "type": "object",
  16048. "properties": {
  16049. "id": {
  16050. "type": "string"
  16051. },
  16052. "type": {
  16053. "type": "string",
  16054. "enum": ["vcs.branch.updated"]
  16055. },
  16056. "properties": {
  16057. "type": "object",
  16058. "properties": {
  16059. "branch": {
  16060. "type": "string"
  16061. }
  16062. },
  16063. "additionalProperties": false
  16064. }
  16065. },
  16066. "required": ["id", "type", "properties"],
  16067. "additionalProperties": false
  16068. },
  16069. "EventWorkspaceReady": {
  16070. "type": "object",
  16071. "properties": {
  16072. "id": {
  16073. "type": "string"
  16074. },
  16075. "type": {
  16076. "type": "string",
  16077. "enum": ["workspace.ready"]
  16078. },
  16079. "properties": {
  16080. "type": "object",
  16081. "properties": {
  16082. "name": {
  16083. "type": "string"
  16084. }
  16085. },
  16086. "required": ["name"],
  16087. "additionalProperties": false
  16088. }
  16089. },
  16090. "required": ["id", "type", "properties"],
  16091. "additionalProperties": false
  16092. },
  16093. "EventWorkspaceFailed": {
  16094. "type": "object",
  16095. "properties": {
  16096. "id": {
  16097. "type": "string"
  16098. },
  16099. "type": {
  16100. "type": "string",
  16101. "enum": ["workspace.failed"]
  16102. },
  16103. "properties": {
  16104. "type": "object",
  16105. "properties": {
  16106. "message": {
  16107. "type": "string"
  16108. }
  16109. },
  16110. "required": ["message"],
  16111. "additionalProperties": false
  16112. }
  16113. },
  16114. "required": ["id", "type", "properties"],
  16115. "additionalProperties": false
  16116. },
  16117. "EventWorkspaceStatus": {
  16118. "type": "object",
  16119. "properties": {
  16120. "id": {
  16121. "type": "string"
  16122. },
  16123. "type": {
  16124. "type": "string",
  16125. "enum": ["workspace.status"]
  16126. },
  16127. "properties": {
  16128. "type": "object",
  16129. "properties": {
  16130. "workspaceID": {
  16131. "type": "string"
  16132. },
  16133. "status": {
  16134. "type": "string",
  16135. "enum": ["connected", "connecting", "disconnected", "error"]
  16136. }
  16137. },
  16138. "required": ["workspaceID", "status"],
  16139. "additionalProperties": false
  16140. }
  16141. },
  16142. "required": ["id", "type", "properties"],
  16143. "additionalProperties": false
  16144. },
  16145. "EventWorktreeReady": {
  16146. "type": "object",
  16147. "properties": {
  16148. "id": {
  16149. "type": "string"
  16150. },
  16151. "type": {
  16152. "type": "string",
  16153. "enum": ["worktree.ready"]
  16154. },
  16155. "properties": {
  16156. "type": "object",
  16157. "properties": {
  16158. "name": {
  16159. "type": "string"
  16160. },
  16161. "branch": {
  16162. "type": "string"
  16163. }
  16164. },
  16165. "required": ["name", "branch"],
  16166. "additionalProperties": false
  16167. }
  16168. },
  16169. "required": ["id", "type", "properties"],
  16170. "additionalProperties": false
  16171. },
  16172. "EventWorktreeFailed": {
  16173. "type": "object",
  16174. "properties": {
  16175. "id": {
  16176. "type": "string"
  16177. },
  16178. "type": {
  16179. "type": "string",
  16180. "enum": ["worktree.failed"]
  16181. },
  16182. "properties": {
  16183. "type": "object",
  16184. "properties": {
  16185. "message": {
  16186. "type": "string"
  16187. }
  16188. },
  16189. "required": ["message"],
  16190. "additionalProperties": false
  16191. }
  16192. },
  16193. "required": ["id", "type", "properties"],
  16194. "additionalProperties": false
  16195. },
  16196. "EventPtyCreated": {
  16197. "type": "object",
  16198. "properties": {
  16199. "id": {
  16200. "type": "string"
  16201. },
  16202. "type": {
  16203. "type": "string",
  16204. "enum": ["pty.created"]
  16205. },
  16206. "properties": {
  16207. "type": "object",
  16208. "properties": {
  16209. "info": {
  16210. "$ref": "#/components/schemas/Pty"
  16211. }
  16212. },
  16213. "required": ["info"],
  16214. "additionalProperties": false
  16215. }
  16216. },
  16217. "required": ["id", "type", "properties"],
  16218. "additionalProperties": false
  16219. },
  16220. "EventPtyUpdated": {
  16221. "type": "object",
  16222. "properties": {
  16223. "id": {
  16224. "type": "string"
  16225. },
  16226. "type": {
  16227. "type": "string",
  16228. "enum": ["pty.updated"]
  16229. },
  16230. "properties": {
  16231. "type": "object",
  16232. "properties": {
  16233. "info": {
  16234. "$ref": "#/components/schemas/Pty"
  16235. }
  16236. },
  16237. "required": ["info"],
  16238. "additionalProperties": false
  16239. }
  16240. },
  16241. "required": ["id", "type", "properties"],
  16242. "additionalProperties": false
  16243. },
  16244. "EventPtyExited": {
  16245. "type": "object",
  16246. "properties": {
  16247. "id": {
  16248. "type": "string"
  16249. },
  16250. "type": {
  16251. "type": "string",
  16252. "enum": ["pty.exited"]
  16253. },
  16254. "properties": {
  16255. "type": "object",
  16256. "properties": {
  16257. "id": {
  16258. "type": "string"
  16259. },
  16260. "exitCode": {
  16261. "type": "integer",
  16262. "minimum": 0
  16263. }
  16264. },
  16265. "required": ["id", "exitCode"],
  16266. "additionalProperties": false
  16267. }
  16268. },
  16269. "required": ["id", "type", "properties"],
  16270. "additionalProperties": false
  16271. },
  16272. "EventPtyDeleted": {
  16273. "type": "object",
  16274. "properties": {
  16275. "id": {
  16276. "type": "string"
  16277. },
  16278. "type": {
  16279. "type": "string",
  16280. "enum": ["pty.deleted"]
  16281. },
  16282. "properties": {
  16283. "type": "object",
  16284. "properties": {
  16285. "id": {
  16286. "type": "string"
  16287. }
  16288. },
  16289. "required": ["id"],
  16290. "additionalProperties": false
  16291. }
  16292. },
  16293. "required": ["id", "type", "properties"],
  16294. "additionalProperties": false
  16295. },
  16296. "EventMessageUpdated": {
  16297. "type": "object",
  16298. "properties": {
  16299. "id": {
  16300. "type": "string"
  16301. },
  16302. "type": {
  16303. "type": "string",
  16304. "enum": ["message.updated"]
  16305. },
  16306. "properties": {
  16307. "type": "object",
  16308. "properties": {
  16309. "sessionID": {
  16310. "type": "string"
  16311. },
  16312. "info": {
  16313. "$ref": "#/components/schemas/Message"
  16314. }
  16315. },
  16316. "required": ["sessionID", "info"],
  16317. "additionalProperties": false
  16318. }
  16319. },
  16320. "required": ["id", "type", "properties"],
  16321. "additionalProperties": false
  16322. },
  16323. "EventMessageRemoved": {
  16324. "type": "object",
  16325. "properties": {
  16326. "id": {
  16327. "type": "string"
  16328. },
  16329. "type": {
  16330. "type": "string",
  16331. "enum": ["message.removed"]
  16332. },
  16333. "properties": {
  16334. "type": "object",
  16335. "properties": {
  16336. "sessionID": {
  16337. "type": "string"
  16338. },
  16339. "messageID": {
  16340. "type": "string"
  16341. }
  16342. },
  16343. "required": ["sessionID", "messageID"],
  16344. "additionalProperties": false
  16345. }
  16346. },
  16347. "required": ["id", "type", "properties"],
  16348. "additionalProperties": false
  16349. },
  16350. "EventMessagePartUpdated": {
  16351. "type": "object",
  16352. "properties": {
  16353. "id": {
  16354. "type": "string"
  16355. },
  16356. "type": {
  16357. "type": "string",
  16358. "enum": ["message.part.updated"]
  16359. },
  16360. "properties": {
  16361. "type": "object",
  16362. "properties": {
  16363. "sessionID": {
  16364. "type": "string"
  16365. },
  16366. "part": {
  16367. "$ref": "#/components/schemas/Part"
  16368. },
  16369. "time": {
  16370. "type": "integer",
  16371. "minimum": 0
  16372. }
  16373. },
  16374. "required": ["sessionID", "part", "time"],
  16375. "additionalProperties": false
  16376. }
  16377. },
  16378. "required": ["id", "type", "properties"],
  16379. "additionalProperties": false
  16380. },
  16381. "EventMessagePartRemoved": {
  16382. "type": "object",
  16383. "properties": {
  16384. "id": {
  16385. "type": "string"
  16386. },
  16387. "type": {
  16388. "type": "string",
  16389. "enum": ["message.part.removed"]
  16390. },
  16391. "properties": {
  16392. "type": "object",
  16393. "properties": {
  16394. "sessionID": {
  16395. "type": "string"
  16396. },
  16397. "messageID": {
  16398. "type": "string"
  16399. },
  16400. "partID": {
  16401. "type": "string"
  16402. }
  16403. },
  16404. "required": ["sessionID", "messageID", "partID"],
  16405. "additionalProperties": false
  16406. }
  16407. },
  16408. "required": ["id", "type", "properties"],
  16409. "additionalProperties": false
  16410. },
  16411. "EventSessionCreated": {
  16412. "type": "object",
  16413. "properties": {
  16414. "id": {
  16415. "type": "string"
  16416. },
  16417. "type": {
  16418. "type": "string",
  16419. "enum": ["session.created"]
  16420. },
  16421. "properties": {
  16422. "type": "object",
  16423. "properties": {
  16424. "sessionID": {
  16425. "type": "string"
  16426. },
  16427. "info": {
  16428. "$ref": "#/components/schemas/Session"
  16429. }
  16430. },
  16431. "required": ["sessionID", "info"],
  16432. "additionalProperties": false
  16433. }
  16434. },
  16435. "required": ["id", "type", "properties"],
  16436. "additionalProperties": false
  16437. },
  16438. "EventSessionUpdated": {
  16439. "type": "object",
  16440. "properties": {
  16441. "id": {
  16442. "type": "string"
  16443. },
  16444. "type": {
  16445. "type": "string",
  16446. "enum": ["session.updated"]
  16447. },
  16448. "properties": {
  16449. "type": "object",
  16450. "properties": {
  16451. "sessionID": {
  16452. "type": "string"
  16453. },
  16454. "info": {
  16455. "$ref": "#/components/schemas/Session"
  16456. }
  16457. },
  16458. "required": ["sessionID", "info"],
  16459. "additionalProperties": false
  16460. }
  16461. },
  16462. "required": ["id", "type", "properties"],
  16463. "additionalProperties": false
  16464. },
  16465. "EventSessionDeleted": {
  16466. "type": "object",
  16467. "properties": {
  16468. "id": {
  16469. "type": "string"
  16470. },
  16471. "type": {
  16472. "type": "string",
  16473. "enum": ["session.deleted"]
  16474. },
  16475. "properties": {
  16476. "type": "object",
  16477. "properties": {
  16478. "sessionID": {
  16479. "type": "string"
  16480. },
  16481. "info": {
  16482. "$ref": "#/components/schemas/Session"
  16483. }
  16484. },
  16485. "required": ["sessionID", "info"],
  16486. "additionalProperties": false
  16487. }
  16488. },
  16489. "required": ["id", "type", "properties"],
  16490. "additionalProperties": false
  16491. },
  16492. "EventSessionNextAgentSwitched": {
  16493. "type": "object",
  16494. "properties": {
  16495. "id": {
  16496. "type": "string"
  16497. },
  16498. "type": {
  16499. "type": "string",
  16500. "enum": ["session.next.agent.switched"]
  16501. },
  16502. "properties": {
  16503. "type": "object",
  16504. "properties": {
  16505. "timestamp": {
  16506. "type": "number"
  16507. },
  16508. "sessionID": {
  16509. "type": "string"
  16510. },
  16511. "agent": {
  16512. "type": "string"
  16513. }
  16514. },
  16515. "required": ["timestamp", "sessionID", "agent"],
  16516. "additionalProperties": false
  16517. }
  16518. },
  16519. "required": ["id", "type", "properties"],
  16520. "additionalProperties": false
  16521. },
  16522. "EventSessionNextModelSwitched": {
  16523. "type": "object",
  16524. "properties": {
  16525. "id": {
  16526. "type": "string"
  16527. },
  16528. "type": {
  16529. "type": "string",
  16530. "enum": ["session.next.model.switched"]
  16531. },
  16532. "properties": {
  16533. "type": "object",
  16534. "properties": {
  16535. "timestamp": {
  16536. "type": "number"
  16537. },
  16538. "sessionID": {
  16539. "type": "string"
  16540. },
  16541. "model": {
  16542. "type": "object",
  16543. "properties": {
  16544. "id": {
  16545. "type": "string"
  16546. },
  16547. "providerID": {
  16548. "type": "string"
  16549. },
  16550. "variant": {
  16551. "type": "string"
  16552. }
  16553. },
  16554. "required": ["id", "providerID", "variant"],
  16555. "additionalProperties": false
  16556. }
  16557. },
  16558. "required": ["timestamp", "sessionID", "model"],
  16559. "additionalProperties": false
  16560. }
  16561. },
  16562. "required": ["id", "type", "properties"],
  16563. "additionalProperties": false
  16564. },
  16565. "PromptSource": {
  16566. "type": "object",
  16567. "properties": {
  16568. "start": {
  16569. "type": "number"
  16570. },
  16571. "end": {
  16572. "type": "number"
  16573. },
  16574. "text": {
  16575. "type": "string"
  16576. }
  16577. },
  16578. "required": ["start", "end", "text"],
  16579. "additionalProperties": false
  16580. },
  16581. "PromptFileAttachment": {
  16582. "type": "object",
  16583. "properties": {
  16584. "uri": {
  16585. "type": "string"
  16586. },
  16587. "mime": {
  16588. "type": "string"
  16589. },
  16590. "name": {
  16591. "type": "string"
  16592. },
  16593. "description": {
  16594. "type": "string"
  16595. },
  16596. "source": {
  16597. "$ref": "#/components/schemas/PromptSource"
  16598. }
  16599. },
  16600. "required": ["uri", "mime"],
  16601. "additionalProperties": false
  16602. },
  16603. "PromptAgentAttachment": {
  16604. "type": "object",
  16605. "properties": {
  16606. "name": {
  16607. "type": "string"
  16608. },
  16609. "source": {
  16610. "$ref": "#/components/schemas/PromptSource"
  16611. }
  16612. },
  16613. "required": ["name"],
  16614. "additionalProperties": false
  16615. },
  16616. "EventSessionNextPrompted": {
  16617. "type": "object",
  16618. "properties": {
  16619. "id": {
  16620. "type": "string"
  16621. },
  16622. "type": {
  16623. "type": "string",
  16624. "enum": ["session.next.prompted"]
  16625. },
  16626. "properties": {
  16627. "type": "object",
  16628. "properties": {
  16629. "timestamp": {
  16630. "type": "number"
  16631. },
  16632. "sessionID": {
  16633. "type": "string"
  16634. },
  16635. "prompt": {
  16636. "$ref": "#/components/schemas/Prompt"
  16637. }
  16638. },
  16639. "required": ["timestamp", "sessionID", "prompt"],
  16640. "additionalProperties": false
  16641. }
  16642. },
  16643. "required": ["id", "type", "properties"],
  16644. "additionalProperties": false
  16645. },
  16646. "EventSessionNextSynthetic": {
  16647. "type": "object",
  16648. "properties": {
  16649. "id": {
  16650. "type": "string"
  16651. },
  16652. "type": {
  16653. "type": "string",
  16654. "enum": ["session.next.synthetic"]
  16655. },
  16656. "properties": {
  16657. "type": "object",
  16658. "properties": {
  16659. "timestamp": {
  16660. "type": "number"
  16661. },
  16662. "sessionID": {
  16663. "type": "string"
  16664. },
  16665. "text": {
  16666. "type": "string"
  16667. }
  16668. },
  16669. "required": ["timestamp", "sessionID", "text"],
  16670. "additionalProperties": false
  16671. }
  16672. },
  16673. "required": ["id", "type", "properties"],
  16674. "additionalProperties": false
  16675. },
  16676. "EventSessionNextShellStarted": {
  16677. "type": "object",
  16678. "properties": {
  16679. "id": {
  16680. "type": "string"
  16681. },
  16682. "type": {
  16683. "type": "string",
  16684. "enum": ["session.next.shell.started"]
  16685. },
  16686. "properties": {
  16687. "type": "object",
  16688. "properties": {
  16689. "timestamp": {
  16690. "type": "number"
  16691. },
  16692. "sessionID": {
  16693. "type": "string"
  16694. },
  16695. "callID": {
  16696. "type": "string"
  16697. },
  16698. "command": {
  16699. "type": "string"
  16700. }
  16701. },
  16702. "required": ["timestamp", "sessionID", "callID", "command"],
  16703. "additionalProperties": false
  16704. }
  16705. },
  16706. "required": ["id", "type", "properties"],
  16707. "additionalProperties": false
  16708. },
  16709. "EventSessionNextShellEnded": {
  16710. "type": "object",
  16711. "properties": {
  16712. "id": {
  16713. "type": "string"
  16714. },
  16715. "type": {
  16716. "type": "string",
  16717. "enum": ["session.next.shell.ended"]
  16718. },
  16719. "properties": {
  16720. "type": "object",
  16721. "properties": {
  16722. "timestamp": {
  16723. "type": "number"
  16724. },
  16725. "sessionID": {
  16726. "type": "string"
  16727. },
  16728. "callID": {
  16729. "type": "string"
  16730. },
  16731. "output": {
  16732. "type": "string"
  16733. }
  16734. },
  16735. "required": ["timestamp", "sessionID", "callID", "output"],
  16736. "additionalProperties": false
  16737. }
  16738. },
  16739. "required": ["id", "type", "properties"],
  16740. "additionalProperties": false
  16741. },
  16742. "EventSessionNextStepStarted": {
  16743. "type": "object",
  16744. "properties": {
  16745. "id": {
  16746. "type": "string"
  16747. },
  16748. "type": {
  16749. "type": "string",
  16750. "enum": ["session.next.step.started"]
  16751. },
  16752. "properties": {
  16753. "type": "object",
  16754. "properties": {
  16755. "timestamp": {
  16756. "type": "number"
  16757. },
  16758. "sessionID": {
  16759. "type": "string"
  16760. },
  16761. "agent": {
  16762. "type": "string"
  16763. },
  16764. "model": {
  16765. "type": "object",
  16766. "properties": {
  16767. "id": {
  16768. "type": "string"
  16769. },
  16770. "providerID": {
  16771. "type": "string"
  16772. },
  16773. "variant": {
  16774. "type": "string"
  16775. }
  16776. },
  16777. "required": ["id", "providerID", "variant"],
  16778. "additionalProperties": false
  16779. },
  16780. "snapshot": {
  16781. "type": "string"
  16782. }
  16783. },
  16784. "required": ["timestamp", "sessionID", "agent", "model"],
  16785. "additionalProperties": false
  16786. }
  16787. },
  16788. "required": ["id", "type", "properties"],
  16789. "additionalProperties": false
  16790. },
  16791. "EventSessionNextStepEnded": {
  16792. "type": "object",
  16793. "properties": {
  16794. "id": {
  16795. "type": "string"
  16796. },
  16797. "type": {
  16798. "type": "string",
  16799. "enum": ["session.next.step.ended"]
  16800. },
  16801. "properties": {
  16802. "type": "object",
  16803. "properties": {
  16804. "timestamp": {
  16805. "type": "number"
  16806. },
  16807. "sessionID": {
  16808. "type": "string"
  16809. },
  16810. "finish": {
  16811. "type": "string"
  16812. },
  16813. "cost": {
  16814. "type": "number"
  16815. },
  16816. "tokens": {
  16817. "type": "object",
  16818. "properties": {
  16819. "input": {
  16820. "type": "integer",
  16821. "minimum": 0
  16822. },
  16823. "output": {
  16824. "type": "integer",
  16825. "minimum": 0
  16826. },
  16827. "reasoning": {
  16828. "type": "integer",
  16829. "minimum": 0
  16830. },
  16831. "cache": {
  16832. "type": "object",
  16833. "properties": {
  16834. "read": {
  16835. "type": "integer",
  16836. "minimum": 0
  16837. },
  16838. "write": {
  16839. "type": "integer",
  16840. "minimum": 0
  16841. }
  16842. },
  16843. "required": ["read", "write"],
  16844. "additionalProperties": false
  16845. }
  16846. },
  16847. "required": ["input", "output", "reasoning", "cache"],
  16848. "additionalProperties": false
  16849. },
  16850. "snapshot": {
  16851. "type": "string"
  16852. }
  16853. },
  16854. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  16855. "additionalProperties": false
  16856. }
  16857. },
  16858. "required": ["id", "type", "properties"],
  16859. "additionalProperties": false
  16860. },
  16861. "SessionErrorUnknown": {
  16862. "type": "object",
  16863. "properties": {
  16864. "type": {
  16865. "type": "string",
  16866. "enum": ["unknown"]
  16867. },
  16868. "message": {
  16869. "type": "string"
  16870. }
  16871. },
  16872. "required": ["type", "message"],
  16873. "additionalProperties": false
  16874. },
  16875. "EventSessionNextStepFailed": {
  16876. "type": "object",
  16877. "properties": {
  16878. "id": {
  16879. "type": "string"
  16880. },
  16881. "type": {
  16882. "type": "string",
  16883. "enum": ["session.next.step.failed"]
  16884. },
  16885. "properties": {
  16886. "type": "object",
  16887. "properties": {
  16888. "timestamp": {
  16889. "type": "number"
  16890. },
  16891. "sessionID": {
  16892. "type": "string"
  16893. },
  16894. "error": {
  16895. "$ref": "#/components/schemas/SessionErrorUnknown"
  16896. }
  16897. },
  16898. "required": ["timestamp", "sessionID", "error"],
  16899. "additionalProperties": false
  16900. }
  16901. },
  16902. "required": ["id", "type", "properties"],
  16903. "additionalProperties": false
  16904. },
  16905. "EventSessionNextTextStarted": {
  16906. "type": "object",
  16907. "properties": {
  16908. "id": {
  16909. "type": "string"
  16910. },
  16911. "type": {
  16912. "type": "string",
  16913. "enum": ["session.next.text.started"]
  16914. },
  16915. "properties": {
  16916. "type": "object",
  16917. "properties": {
  16918. "timestamp": {
  16919. "type": "number"
  16920. },
  16921. "sessionID": {
  16922. "type": "string"
  16923. }
  16924. },
  16925. "required": ["timestamp", "sessionID"],
  16926. "additionalProperties": false
  16927. }
  16928. },
  16929. "required": ["id", "type", "properties"],
  16930. "additionalProperties": false
  16931. },
  16932. "EventSessionNextTextDelta": {
  16933. "type": "object",
  16934. "properties": {
  16935. "id": {
  16936. "type": "string"
  16937. },
  16938. "type": {
  16939. "type": "string",
  16940. "enum": ["session.next.text.delta"]
  16941. },
  16942. "properties": {
  16943. "type": "object",
  16944. "properties": {
  16945. "timestamp": {
  16946. "type": "number"
  16947. },
  16948. "sessionID": {
  16949. "type": "string"
  16950. },
  16951. "delta": {
  16952. "type": "string"
  16953. }
  16954. },
  16955. "required": ["timestamp", "sessionID", "delta"],
  16956. "additionalProperties": false
  16957. }
  16958. },
  16959. "required": ["id", "type", "properties"],
  16960. "additionalProperties": false
  16961. },
  16962. "EventSessionNextTextEnded": {
  16963. "type": "object",
  16964. "properties": {
  16965. "id": {
  16966. "type": "string"
  16967. },
  16968. "type": {
  16969. "type": "string",
  16970. "enum": ["session.next.text.ended"]
  16971. },
  16972. "properties": {
  16973. "type": "object",
  16974. "properties": {
  16975. "timestamp": {
  16976. "type": "number"
  16977. },
  16978. "sessionID": {
  16979. "type": "string"
  16980. },
  16981. "text": {
  16982. "type": "string"
  16983. }
  16984. },
  16985. "required": ["timestamp", "sessionID", "text"],
  16986. "additionalProperties": false
  16987. }
  16988. },
  16989. "required": ["id", "type", "properties"],
  16990. "additionalProperties": false
  16991. },
  16992. "EventSessionNextReasoningStarted": {
  16993. "type": "object",
  16994. "properties": {
  16995. "id": {
  16996. "type": "string"
  16997. },
  16998. "type": {
  16999. "type": "string",
  17000. "enum": ["session.next.reasoning.started"]
  17001. },
  17002. "properties": {
  17003. "type": "object",
  17004. "properties": {
  17005. "timestamp": {
  17006. "type": "number"
  17007. },
  17008. "sessionID": {
  17009. "type": "string"
  17010. },
  17011. "reasoningID": {
  17012. "type": "string"
  17013. }
  17014. },
  17015. "required": ["timestamp", "sessionID", "reasoningID"],
  17016. "additionalProperties": false
  17017. }
  17018. },
  17019. "required": ["id", "type", "properties"],
  17020. "additionalProperties": false
  17021. },
  17022. "EventSessionNextReasoningDelta": {
  17023. "type": "object",
  17024. "properties": {
  17025. "id": {
  17026. "type": "string"
  17027. },
  17028. "type": {
  17029. "type": "string",
  17030. "enum": ["session.next.reasoning.delta"]
  17031. },
  17032. "properties": {
  17033. "type": "object",
  17034. "properties": {
  17035. "timestamp": {
  17036. "type": "number"
  17037. },
  17038. "sessionID": {
  17039. "type": "string"
  17040. },
  17041. "reasoningID": {
  17042. "type": "string"
  17043. },
  17044. "delta": {
  17045. "type": "string"
  17046. }
  17047. },
  17048. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17049. "additionalProperties": false
  17050. }
  17051. },
  17052. "required": ["id", "type", "properties"],
  17053. "additionalProperties": false
  17054. },
  17055. "EventSessionNextReasoningEnded": {
  17056. "type": "object",
  17057. "properties": {
  17058. "id": {
  17059. "type": "string"
  17060. },
  17061. "type": {
  17062. "type": "string",
  17063. "enum": ["session.next.reasoning.ended"]
  17064. },
  17065. "properties": {
  17066. "type": "object",
  17067. "properties": {
  17068. "timestamp": {
  17069. "type": "number"
  17070. },
  17071. "sessionID": {
  17072. "type": "string"
  17073. },
  17074. "reasoningID": {
  17075. "type": "string"
  17076. },
  17077. "text": {
  17078. "type": "string"
  17079. }
  17080. },
  17081. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17082. "additionalProperties": false
  17083. }
  17084. },
  17085. "required": ["id", "type", "properties"],
  17086. "additionalProperties": false
  17087. },
  17088. "EventSessionNextToolInputStarted": {
  17089. "type": "object",
  17090. "properties": {
  17091. "id": {
  17092. "type": "string"
  17093. },
  17094. "type": {
  17095. "type": "string",
  17096. "enum": ["session.next.tool.input.started"]
  17097. },
  17098. "properties": {
  17099. "type": "object",
  17100. "properties": {
  17101. "timestamp": {
  17102. "type": "number"
  17103. },
  17104. "sessionID": {
  17105. "type": "string"
  17106. },
  17107. "callID": {
  17108. "type": "string"
  17109. },
  17110. "name": {
  17111. "type": "string"
  17112. }
  17113. },
  17114. "required": ["timestamp", "sessionID", "callID", "name"],
  17115. "additionalProperties": false
  17116. }
  17117. },
  17118. "required": ["id", "type", "properties"],
  17119. "additionalProperties": false
  17120. },
  17121. "EventSessionNextToolInputDelta": {
  17122. "type": "object",
  17123. "properties": {
  17124. "id": {
  17125. "type": "string"
  17126. },
  17127. "type": {
  17128. "type": "string",
  17129. "enum": ["session.next.tool.input.delta"]
  17130. },
  17131. "properties": {
  17132. "type": "object",
  17133. "properties": {
  17134. "timestamp": {
  17135. "type": "number"
  17136. },
  17137. "sessionID": {
  17138. "type": "string"
  17139. },
  17140. "callID": {
  17141. "type": "string"
  17142. },
  17143. "delta": {
  17144. "type": "string"
  17145. }
  17146. },
  17147. "required": ["timestamp", "sessionID", "callID", "delta"],
  17148. "additionalProperties": false
  17149. }
  17150. },
  17151. "required": ["id", "type", "properties"],
  17152. "additionalProperties": false
  17153. },
  17154. "EventSessionNextToolInputEnded": {
  17155. "type": "object",
  17156. "properties": {
  17157. "id": {
  17158. "type": "string"
  17159. },
  17160. "type": {
  17161. "type": "string",
  17162. "enum": ["session.next.tool.input.ended"]
  17163. },
  17164. "properties": {
  17165. "type": "object",
  17166. "properties": {
  17167. "timestamp": {
  17168. "type": "number"
  17169. },
  17170. "sessionID": {
  17171. "type": "string"
  17172. },
  17173. "callID": {
  17174. "type": "string"
  17175. },
  17176. "text": {
  17177. "type": "string"
  17178. }
  17179. },
  17180. "required": ["timestamp", "sessionID", "callID", "text"],
  17181. "additionalProperties": false
  17182. }
  17183. },
  17184. "required": ["id", "type", "properties"],
  17185. "additionalProperties": false
  17186. },
  17187. "EventSessionNextToolCalled": {
  17188. "type": "object",
  17189. "properties": {
  17190. "id": {
  17191. "type": "string"
  17192. },
  17193. "type": {
  17194. "type": "string",
  17195. "enum": ["session.next.tool.called"]
  17196. },
  17197. "properties": {
  17198. "type": "object",
  17199. "properties": {
  17200. "timestamp": {
  17201. "type": "number"
  17202. },
  17203. "sessionID": {
  17204. "type": "string"
  17205. },
  17206. "callID": {
  17207. "type": "string"
  17208. },
  17209. "tool": {
  17210. "type": "string"
  17211. },
  17212. "input": {
  17213. "type": "object"
  17214. },
  17215. "provider": {
  17216. "type": "object",
  17217. "properties": {
  17218. "executed": {
  17219. "type": "boolean"
  17220. },
  17221. "metadata": {
  17222. "type": "object"
  17223. }
  17224. },
  17225. "required": ["executed"],
  17226. "additionalProperties": false
  17227. }
  17228. },
  17229. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17230. "additionalProperties": false
  17231. }
  17232. },
  17233. "required": ["id", "type", "properties"],
  17234. "additionalProperties": false
  17235. },
  17236. "ToolTextContent": {
  17237. "type": "object",
  17238. "properties": {
  17239. "type": {
  17240. "type": "string",
  17241. "enum": ["text"]
  17242. },
  17243. "text": {
  17244. "type": "string"
  17245. }
  17246. },
  17247. "required": ["type", "text"],
  17248. "additionalProperties": false
  17249. },
  17250. "ToolFileContent": {
  17251. "type": "object",
  17252. "properties": {
  17253. "type": {
  17254. "type": "string",
  17255. "enum": ["file"]
  17256. },
  17257. "uri": {
  17258. "type": "string"
  17259. },
  17260. "mime": {
  17261. "type": "string"
  17262. },
  17263. "name": {
  17264. "type": "string"
  17265. }
  17266. },
  17267. "required": ["type", "uri", "mime"],
  17268. "additionalProperties": false
  17269. },
  17270. "EventSessionNextToolProgress": {
  17271. "type": "object",
  17272. "properties": {
  17273. "id": {
  17274. "type": "string"
  17275. },
  17276. "type": {
  17277. "type": "string",
  17278. "enum": ["session.next.tool.progress"]
  17279. },
  17280. "properties": {
  17281. "type": "object",
  17282. "properties": {
  17283. "timestamp": {
  17284. "type": "number"
  17285. },
  17286. "sessionID": {
  17287. "type": "string"
  17288. },
  17289. "callID": {
  17290. "type": "string"
  17291. },
  17292. "structured": {
  17293. "type": "object"
  17294. },
  17295. "content": {
  17296. "type": "array",
  17297. "items": {
  17298. "anyOf": [
  17299. {
  17300. "$ref": "#/components/schemas/ToolTextContent"
  17301. },
  17302. {
  17303. "$ref": "#/components/schemas/ToolFileContent"
  17304. }
  17305. ]
  17306. }
  17307. }
  17308. },
  17309. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17310. "additionalProperties": false
  17311. }
  17312. },
  17313. "required": ["id", "type", "properties"],
  17314. "additionalProperties": false
  17315. },
  17316. "EventSessionNextToolSuccess": {
  17317. "type": "object",
  17318. "properties": {
  17319. "id": {
  17320. "type": "string"
  17321. },
  17322. "type": {
  17323. "type": "string",
  17324. "enum": ["session.next.tool.success"]
  17325. },
  17326. "properties": {
  17327. "type": "object",
  17328. "properties": {
  17329. "timestamp": {
  17330. "type": "number"
  17331. },
  17332. "sessionID": {
  17333. "type": "string"
  17334. },
  17335. "callID": {
  17336. "type": "string"
  17337. },
  17338. "structured": {
  17339. "type": "object"
  17340. },
  17341. "content": {
  17342. "type": "array",
  17343. "items": {
  17344. "anyOf": [
  17345. {
  17346. "$ref": "#/components/schemas/ToolTextContent"
  17347. },
  17348. {
  17349. "$ref": "#/components/schemas/ToolFileContent"
  17350. }
  17351. ]
  17352. }
  17353. },
  17354. "provider": {
  17355. "type": "object",
  17356. "properties": {
  17357. "executed": {
  17358. "type": "boolean"
  17359. },
  17360. "metadata": {
  17361. "type": "object"
  17362. }
  17363. },
  17364. "required": ["executed"],
  17365. "additionalProperties": false
  17366. }
  17367. },
  17368. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17369. "additionalProperties": false
  17370. }
  17371. },
  17372. "required": ["id", "type", "properties"],
  17373. "additionalProperties": false
  17374. },
  17375. "EventSessionNextToolFailed": {
  17376. "type": "object",
  17377. "properties": {
  17378. "id": {
  17379. "type": "string"
  17380. },
  17381. "type": {
  17382. "type": "string",
  17383. "enum": ["session.next.tool.failed"]
  17384. },
  17385. "properties": {
  17386. "type": "object",
  17387. "properties": {
  17388. "timestamp": {
  17389. "type": "number"
  17390. },
  17391. "sessionID": {
  17392. "type": "string"
  17393. },
  17394. "callID": {
  17395. "type": "string"
  17396. },
  17397. "error": {
  17398. "$ref": "#/components/schemas/SessionErrorUnknown"
  17399. },
  17400. "provider": {
  17401. "type": "object",
  17402. "properties": {
  17403. "executed": {
  17404. "type": "boolean"
  17405. },
  17406. "metadata": {
  17407. "type": "object"
  17408. }
  17409. },
  17410. "required": ["executed"],
  17411. "additionalProperties": false
  17412. }
  17413. },
  17414. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17415. "additionalProperties": false
  17416. }
  17417. },
  17418. "required": ["id", "type", "properties"],
  17419. "additionalProperties": false
  17420. },
  17421. "SessionNextRetry_error": {
  17422. "type": "object",
  17423. "properties": {
  17424. "message": {
  17425. "type": "string"
  17426. },
  17427. "statusCode": {
  17428. "type": "integer",
  17429. "minimum": 0
  17430. },
  17431. "isRetryable": {
  17432. "type": "boolean"
  17433. },
  17434. "responseHeaders": {
  17435. "type": "object",
  17436. "additionalProperties": {
  17437. "type": "string"
  17438. }
  17439. },
  17440. "responseBody": {
  17441. "type": "string"
  17442. },
  17443. "metadata": {
  17444. "type": "object",
  17445. "additionalProperties": {
  17446. "type": "string"
  17447. }
  17448. }
  17449. },
  17450. "required": ["message", "isRetryable"],
  17451. "additionalProperties": false
  17452. },
  17453. "EventSessionNextRetried": {
  17454. "type": "object",
  17455. "properties": {
  17456. "id": {
  17457. "type": "string"
  17458. },
  17459. "type": {
  17460. "type": "string",
  17461. "enum": ["session.next.retried"]
  17462. },
  17463. "properties": {
  17464. "type": "object",
  17465. "properties": {
  17466. "timestamp": {
  17467. "type": "number"
  17468. },
  17469. "sessionID": {
  17470. "type": "string"
  17471. },
  17472. "attempt": {
  17473. "type": "integer",
  17474. "minimum": 0
  17475. },
  17476. "error": {
  17477. "$ref": "#/components/schemas/SessionNextRetry_error"
  17478. }
  17479. },
  17480. "required": ["timestamp", "sessionID", "attempt", "error"],
  17481. "additionalProperties": false
  17482. }
  17483. },
  17484. "required": ["id", "type", "properties"],
  17485. "additionalProperties": false
  17486. },
  17487. "EventSessionNextCompactionStarted": {
  17488. "type": "object",
  17489. "properties": {
  17490. "id": {
  17491. "type": "string"
  17492. },
  17493. "type": {
  17494. "type": "string",
  17495. "enum": ["session.next.compaction.started"]
  17496. },
  17497. "properties": {
  17498. "type": "object",
  17499. "properties": {
  17500. "timestamp": {
  17501. "type": "number"
  17502. },
  17503. "sessionID": {
  17504. "type": "string"
  17505. },
  17506. "reason": {
  17507. "type": "string",
  17508. "enum": ["auto", "manual"]
  17509. }
  17510. },
  17511. "required": ["timestamp", "sessionID", "reason"],
  17512. "additionalProperties": false
  17513. }
  17514. },
  17515. "required": ["id", "type", "properties"],
  17516. "additionalProperties": false
  17517. },
  17518. "EventSessionNextCompactionDelta": {
  17519. "type": "object",
  17520. "properties": {
  17521. "id": {
  17522. "type": "string"
  17523. },
  17524. "type": {
  17525. "type": "string",
  17526. "enum": ["session.next.compaction.delta"]
  17527. },
  17528. "properties": {
  17529. "type": "object",
  17530. "properties": {
  17531. "timestamp": {
  17532. "type": "number"
  17533. },
  17534. "sessionID": {
  17535. "type": "string"
  17536. },
  17537. "text": {
  17538. "type": "string"
  17539. }
  17540. },
  17541. "required": ["timestamp", "sessionID", "text"],
  17542. "additionalProperties": false
  17543. }
  17544. },
  17545. "required": ["id", "type", "properties"],
  17546. "additionalProperties": false
  17547. },
  17548. "EventSessionNextCompactionEnded": {
  17549. "type": "object",
  17550. "properties": {
  17551. "id": {
  17552. "type": "string"
  17553. },
  17554. "type": {
  17555. "type": "string",
  17556. "enum": ["session.next.compaction.ended"]
  17557. },
  17558. "properties": {
  17559. "type": "object",
  17560. "properties": {
  17561. "timestamp": {
  17562. "type": "number"
  17563. },
  17564. "sessionID": {
  17565. "type": "string"
  17566. },
  17567. "text": {
  17568. "type": "string"
  17569. },
  17570. "include": {
  17571. "type": "string"
  17572. }
  17573. },
  17574. "required": ["timestamp", "sessionID", "text"],
  17575. "additionalProperties": false
  17576. }
  17577. },
  17578. "required": ["id", "type", "properties"],
  17579. "additionalProperties": false
  17580. },
  17581. "EventServerConnected": {
  17582. "type": "object",
  17583. "properties": {
  17584. "id": {
  17585. "type": "string"
  17586. },
  17587. "type": {
  17588. "type": "string",
  17589. "enum": ["server.connected"]
  17590. },
  17591. "properties": {
  17592. "type": "object",
  17593. "properties": {}
  17594. }
  17595. },
  17596. "required": ["id", "type", "properties"],
  17597. "additionalProperties": false
  17598. },
  17599. "EventGlobalDisposed": {
  17600. "type": "object",
  17601. "properties": {
  17602. "id": {
  17603. "type": "string"
  17604. },
  17605. "type": {
  17606. "type": "string",
  17607. "enum": ["global.disposed"]
  17608. },
  17609. "properties": {
  17610. "type": "object",
  17611. "properties": {}
  17612. }
  17613. },
  17614. "required": ["id", "type", "properties"],
  17615. "additionalProperties": false
  17616. },
  17617. "SessionInfo": {
  17618. "type": "object",
  17619. "properties": {
  17620. "id": {
  17621. "type": "string"
  17622. },
  17623. "parentID": {
  17624. "type": "string"
  17625. },
  17626. "projectID": {
  17627. "type": "string"
  17628. },
  17629. "workspaceID": {
  17630. "type": "string"
  17631. },
  17632. "path": {
  17633. "type": "string"
  17634. },
  17635. "agent": {
  17636. "type": "string"
  17637. },
  17638. "model": {
  17639. "type": "object",
  17640. "properties": {
  17641. "id": {
  17642. "type": "string"
  17643. },
  17644. "providerID": {
  17645. "type": "string"
  17646. },
  17647. "variant": {
  17648. "type": "string"
  17649. }
  17650. },
  17651. "required": ["id", "providerID", "variant"],
  17652. "additionalProperties": false
  17653. },
  17654. "time": {
  17655. "type": "object",
  17656. "properties": {
  17657. "created": {
  17658. "type": "number"
  17659. },
  17660. "updated": {
  17661. "type": "number"
  17662. },
  17663. "archived": {
  17664. "type": "number"
  17665. }
  17666. },
  17667. "required": ["created", "updated"],
  17668. "additionalProperties": false
  17669. },
  17670. "title": {
  17671. "type": "string"
  17672. }
  17673. },
  17674. "required": ["id", "projectID", "time", "title"],
  17675. "additionalProperties": false
  17676. },
  17677. "SessionDelivery": {
  17678. "type": "string",
  17679. "enum": ["immediate", "deferred"]
  17680. },
  17681. "SessionMessageAgentSwitched": {
  17682. "type": "object",
  17683. "properties": {
  17684. "id": {
  17685. "type": "string"
  17686. },
  17687. "metadata": {
  17688. "type": "object"
  17689. },
  17690. "time": {
  17691. "type": "object",
  17692. "properties": {
  17693. "created": {
  17694. "type": "number"
  17695. }
  17696. },
  17697. "required": ["created"],
  17698. "additionalProperties": false
  17699. },
  17700. "type": {
  17701. "type": "string",
  17702. "enum": ["agent-switched"]
  17703. },
  17704. "agent": {
  17705. "type": "string"
  17706. }
  17707. },
  17708. "required": ["id", "time", "type", "agent"],
  17709. "additionalProperties": false
  17710. },
  17711. "SessionMessageModelSwitched": {
  17712. "type": "object",
  17713. "properties": {
  17714. "id": {
  17715. "type": "string"
  17716. },
  17717. "metadata": {
  17718. "type": "object"
  17719. },
  17720. "time": {
  17721. "type": "object",
  17722. "properties": {
  17723. "created": {
  17724. "type": "number"
  17725. }
  17726. },
  17727. "required": ["created"],
  17728. "additionalProperties": false
  17729. },
  17730. "type": {
  17731. "type": "string",
  17732. "enum": ["model-switched"]
  17733. },
  17734. "model": {
  17735. "type": "object",
  17736. "properties": {
  17737. "id": {
  17738. "type": "string"
  17739. },
  17740. "providerID": {
  17741. "type": "string"
  17742. },
  17743. "variant": {
  17744. "type": "string"
  17745. }
  17746. },
  17747. "required": ["id", "providerID", "variant"],
  17748. "additionalProperties": false
  17749. }
  17750. },
  17751. "required": ["id", "time", "type", "model"],
  17752. "additionalProperties": false
  17753. },
  17754. "SessionMessageUser": {
  17755. "type": "object",
  17756. "properties": {
  17757. "id": {
  17758. "type": "string"
  17759. },
  17760. "metadata": {
  17761. "type": "object"
  17762. },
  17763. "time": {
  17764. "type": "object",
  17765. "properties": {
  17766. "created": {
  17767. "type": "number"
  17768. }
  17769. },
  17770. "required": ["created"],
  17771. "additionalProperties": false
  17772. },
  17773. "text": {
  17774. "type": "string"
  17775. },
  17776. "files": {
  17777. "type": "array",
  17778. "items": {
  17779. "$ref": "#/components/schemas/PromptFileAttachment"
  17780. }
  17781. },
  17782. "agents": {
  17783. "type": "array",
  17784. "items": {
  17785. "$ref": "#/components/schemas/PromptAgentAttachment"
  17786. }
  17787. },
  17788. "type": {
  17789. "type": "string",
  17790. "enum": ["user"]
  17791. }
  17792. },
  17793. "required": ["id", "time", "text", "type"],
  17794. "additionalProperties": false
  17795. },
  17796. "SessionMessageSynthetic": {
  17797. "type": "object",
  17798. "properties": {
  17799. "id": {
  17800. "type": "string"
  17801. },
  17802. "metadata": {
  17803. "type": "object"
  17804. },
  17805. "time": {
  17806. "type": "object",
  17807. "properties": {
  17808. "created": {
  17809. "type": "number"
  17810. }
  17811. },
  17812. "required": ["created"],
  17813. "additionalProperties": false
  17814. },
  17815. "sessionID": {
  17816. "type": "string"
  17817. },
  17818. "text": {
  17819. "type": "string"
  17820. },
  17821. "type": {
  17822. "type": "string",
  17823. "enum": ["synthetic"]
  17824. }
  17825. },
  17826. "required": ["id", "time", "sessionID", "text", "type"],
  17827. "additionalProperties": false
  17828. },
  17829. "SessionMessageShell": {
  17830. "type": "object",
  17831. "properties": {
  17832. "id": {
  17833. "type": "string"
  17834. },
  17835. "metadata": {
  17836. "type": "object"
  17837. },
  17838. "time": {
  17839. "type": "object",
  17840. "properties": {
  17841. "created": {
  17842. "type": "number"
  17843. },
  17844. "completed": {
  17845. "type": "number"
  17846. }
  17847. },
  17848. "required": ["created"],
  17849. "additionalProperties": false
  17850. },
  17851. "type": {
  17852. "type": "string",
  17853. "enum": ["shell"]
  17854. },
  17855. "callID": {
  17856. "type": "string"
  17857. },
  17858. "command": {
  17859. "type": "string"
  17860. },
  17861. "output": {
  17862. "type": "string"
  17863. }
  17864. },
  17865. "required": ["id", "time", "type", "callID", "command", "output"],
  17866. "additionalProperties": false
  17867. },
  17868. "SessionMessageAssistantText": {
  17869. "type": "object",
  17870. "properties": {
  17871. "type": {
  17872. "type": "string",
  17873. "enum": ["text"]
  17874. },
  17875. "text": {
  17876. "type": "string"
  17877. }
  17878. },
  17879. "required": ["type", "text"],
  17880. "additionalProperties": false
  17881. },
  17882. "SessionMessageAssistantReasoning": {
  17883. "type": "object",
  17884. "properties": {
  17885. "type": {
  17886. "type": "string",
  17887. "enum": ["reasoning"]
  17888. },
  17889. "id": {
  17890. "type": "string"
  17891. },
  17892. "text": {
  17893. "type": "string"
  17894. }
  17895. },
  17896. "required": ["type", "id", "text"],
  17897. "additionalProperties": false
  17898. },
  17899. "SessionMessageToolStatePending": {
  17900. "type": "object",
  17901. "properties": {
  17902. "status": {
  17903. "type": "string",
  17904. "enum": ["pending"]
  17905. },
  17906. "input": {
  17907. "type": "string"
  17908. }
  17909. },
  17910. "required": ["status", "input"],
  17911. "additionalProperties": false
  17912. },
  17913. "SessionMessageToolStateRunning": {
  17914. "type": "object",
  17915. "properties": {
  17916. "status": {
  17917. "type": "string",
  17918. "enum": ["running"]
  17919. },
  17920. "input": {
  17921. "type": "object"
  17922. },
  17923. "structured": {
  17924. "type": "object"
  17925. },
  17926. "content": {
  17927. "type": "array",
  17928. "items": {
  17929. "anyOf": [
  17930. {
  17931. "$ref": "#/components/schemas/ToolTextContent"
  17932. },
  17933. {
  17934. "$ref": "#/components/schemas/ToolFileContent"
  17935. }
  17936. ]
  17937. }
  17938. }
  17939. },
  17940. "required": ["status", "input", "structured", "content"],
  17941. "additionalProperties": false
  17942. },
  17943. "SessionMessageToolStateCompleted": {
  17944. "type": "object",
  17945. "properties": {
  17946. "status": {
  17947. "type": "string",
  17948. "enum": ["completed"]
  17949. },
  17950. "input": {
  17951. "type": "object"
  17952. },
  17953. "attachments": {
  17954. "type": "array",
  17955. "items": {
  17956. "$ref": "#/components/schemas/PromptFileAttachment"
  17957. }
  17958. },
  17959. "content": {
  17960. "type": "array",
  17961. "items": {
  17962. "anyOf": [
  17963. {
  17964. "$ref": "#/components/schemas/ToolTextContent"
  17965. },
  17966. {
  17967. "$ref": "#/components/schemas/ToolFileContent"
  17968. }
  17969. ]
  17970. }
  17971. },
  17972. "structured": {
  17973. "type": "object"
  17974. }
  17975. },
  17976. "required": ["status", "input", "content", "structured"],
  17977. "additionalProperties": false
  17978. },
  17979. "SessionMessageToolStateError": {
  17980. "type": "object",
  17981. "properties": {
  17982. "status": {
  17983. "type": "string",
  17984. "enum": ["error"]
  17985. },
  17986. "input": {
  17987. "type": "object"
  17988. },
  17989. "content": {
  17990. "type": "array",
  17991. "items": {
  17992. "anyOf": [
  17993. {
  17994. "$ref": "#/components/schemas/ToolTextContent"
  17995. },
  17996. {
  17997. "$ref": "#/components/schemas/ToolFileContent"
  17998. }
  17999. ]
  18000. }
  18001. },
  18002. "structured": {
  18003. "type": "object"
  18004. },
  18005. "error": {
  18006. "$ref": "#/components/schemas/SessionErrorUnknown"
  18007. }
  18008. },
  18009. "required": ["status", "input", "content", "structured", "error"],
  18010. "additionalProperties": false
  18011. },
  18012. "SessionMessageAssistantTool": {
  18013. "type": "object",
  18014. "properties": {
  18015. "type": {
  18016. "type": "string",
  18017. "enum": ["tool"]
  18018. },
  18019. "id": {
  18020. "type": "string"
  18021. },
  18022. "name": {
  18023. "type": "string"
  18024. },
  18025. "provider": {
  18026. "type": "object",
  18027. "properties": {
  18028. "executed": {
  18029. "type": "boolean"
  18030. },
  18031. "metadata": {
  18032. "type": "object"
  18033. }
  18034. },
  18035. "required": ["executed"],
  18036. "additionalProperties": false
  18037. },
  18038. "state": {
  18039. "anyOf": [
  18040. {
  18041. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18042. },
  18043. {
  18044. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18045. },
  18046. {
  18047. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18048. },
  18049. {
  18050. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18051. }
  18052. ]
  18053. },
  18054. "time": {
  18055. "type": "object",
  18056. "properties": {
  18057. "created": {
  18058. "type": "number"
  18059. },
  18060. "ran": {
  18061. "type": "number"
  18062. },
  18063. "completed": {
  18064. "type": "number"
  18065. },
  18066. "pruned": {
  18067. "type": "number"
  18068. }
  18069. },
  18070. "required": ["created"],
  18071. "additionalProperties": false
  18072. }
  18073. },
  18074. "required": ["type", "id", "name", "state", "time"],
  18075. "additionalProperties": false
  18076. },
  18077. "SessionMessageAssistant": {
  18078. "type": "object",
  18079. "properties": {
  18080. "id": {
  18081. "type": "string"
  18082. },
  18083. "metadata": {
  18084. "type": "object"
  18085. },
  18086. "time": {
  18087. "type": "object",
  18088. "properties": {
  18089. "created": {
  18090. "type": "number"
  18091. },
  18092. "completed": {
  18093. "type": "number"
  18094. }
  18095. },
  18096. "required": ["created"],
  18097. "additionalProperties": false
  18098. },
  18099. "type": {
  18100. "type": "string",
  18101. "enum": ["assistant"]
  18102. },
  18103. "agent": {
  18104. "type": "string"
  18105. },
  18106. "model": {
  18107. "type": "object",
  18108. "properties": {
  18109. "id": {
  18110. "type": "string"
  18111. },
  18112. "providerID": {
  18113. "type": "string"
  18114. },
  18115. "variant": {
  18116. "type": "string"
  18117. }
  18118. },
  18119. "required": ["id", "providerID", "variant"],
  18120. "additionalProperties": false
  18121. },
  18122. "content": {
  18123. "type": "array",
  18124. "items": {
  18125. "anyOf": [
  18126. {
  18127. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18128. },
  18129. {
  18130. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18131. },
  18132. {
  18133. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18134. }
  18135. ]
  18136. }
  18137. },
  18138. "snapshot": {
  18139. "type": "object",
  18140. "properties": {
  18141. "start": {
  18142. "type": "string"
  18143. },
  18144. "end": {
  18145. "type": "string"
  18146. }
  18147. },
  18148. "additionalProperties": false
  18149. },
  18150. "finish": {
  18151. "type": "string"
  18152. },
  18153. "cost": {
  18154. "type": "number"
  18155. },
  18156. "tokens": {
  18157. "type": "object",
  18158. "properties": {
  18159. "input": {
  18160. "type": "number"
  18161. },
  18162. "output": {
  18163. "type": "number"
  18164. },
  18165. "reasoning": {
  18166. "type": "number"
  18167. },
  18168. "cache": {
  18169. "type": "object",
  18170. "properties": {
  18171. "read": {
  18172. "type": "number"
  18173. },
  18174. "write": {
  18175. "type": "number"
  18176. }
  18177. },
  18178. "required": ["read", "write"],
  18179. "additionalProperties": false
  18180. }
  18181. },
  18182. "required": ["input", "output", "reasoning", "cache"],
  18183. "additionalProperties": false
  18184. },
  18185. "error": {
  18186. "$ref": "#/components/schemas/SessionErrorUnknown"
  18187. }
  18188. },
  18189. "required": ["id", "time", "type", "agent", "model", "content"],
  18190. "additionalProperties": false
  18191. },
  18192. "SessionMessageCompaction": {
  18193. "type": "object",
  18194. "properties": {
  18195. "type": {
  18196. "type": "string",
  18197. "enum": ["compaction"]
  18198. },
  18199. "reason": {
  18200. "type": "string",
  18201. "enum": ["auto", "manual"]
  18202. },
  18203. "summary": {
  18204. "type": "string"
  18205. },
  18206. "include": {
  18207. "type": "string"
  18208. },
  18209. "id": {
  18210. "type": "string"
  18211. },
  18212. "metadata": {
  18213. "type": "object"
  18214. },
  18215. "time": {
  18216. "type": "object",
  18217. "properties": {
  18218. "created": {
  18219. "type": "number"
  18220. }
  18221. },
  18222. "required": ["created"],
  18223. "additionalProperties": false
  18224. }
  18225. },
  18226. "required": ["type", "reason", "summary", "id", "time"],
  18227. "additionalProperties": false
  18228. },
  18229. "SessionMessage": {
  18230. "anyOf": [
  18231. {
  18232. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18233. },
  18234. {
  18235. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18236. },
  18237. {
  18238. "$ref": "#/components/schemas/SessionMessageUser"
  18239. },
  18240. {
  18241. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18242. },
  18243. {
  18244. "$ref": "#/components/schemas/SessionMessageShell"
  18245. },
  18246. {
  18247. "$ref": "#/components/schemas/SessionMessageAssistant"
  18248. },
  18249. {
  18250. "$ref": "#/components/schemas/SessionMessageCompaction"
  18251. }
  18252. ]
  18253. },
  18254. "EventTuiToastShow1": {
  18255. "type": "object",
  18256. "properties": {
  18257. "id": {
  18258. "type": "string"
  18259. },
  18260. "type": {
  18261. "type": "string",
  18262. "enum": ["tui.toast.show"]
  18263. },
  18264. "properties": {
  18265. "type": "object",
  18266. "properties": {
  18267. "title": {
  18268. "type": "string"
  18269. },
  18270. "message": {
  18271. "type": "string"
  18272. },
  18273. "variant": {
  18274. "type": "string",
  18275. "enum": ["info", "success", "warning", "error"]
  18276. },
  18277. "duration": {
  18278. "type": "integer",
  18279. "exclusiveMinimum": 0
  18280. }
  18281. },
  18282. "required": ["message", "variant"],
  18283. "additionalProperties": false
  18284. }
  18285. },
  18286. "required": ["id", "type", "properties"],
  18287. "additionalProperties": false
  18288. },
  18289. "BadRequestError": {
  18290. "type": "object",
  18291. "required": ["data", "errors", "success"],
  18292. "properties": {
  18293. "data": {},
  18294. "errors": {
  18295. "type": "array",
  18296. "items": {
  18297. "type": "object",
  18298. "additionalProperties": {}
  18299. }
  18300. },
  18301. "success": {
  18302. "type": "boolean",
  18303. "enum": [false]
  18304. }
  18305. }
  18306. }
  18307. }
  18308. },
  18309. "security": [],
  18310. "tags": [
  18311. {
  18312. "name": "control",
  18313. "description": "Control plane routes."
  18314. },
  18315. {
  18316. "name": "global",
  18317. "description": "Global server routes."
  18318. },
  18319. {
  18320. "name": "event",
  18321. "description": "Instance event stream route."
  18322. },
  18323. {
  18324. "name": "config",
  18325. "description": "Experimental HttpApi config routes."
  18326. },
  18327. {
  18328. "name": "experimental",
  18329. "description": "Experimental HttpApi read-only routes."
  18330. },
  18331. {
  18332. "name": "file",
  18333. "description": "Experimental HttpApi file routes."
  18334. },
  18335. {
  18336. "name": "instance",
  18337. "description": "Experimental HttpApi instance read routes."
  18338. },
  18339. {
  18340. "name": "mcp",
  18341. "description": "Experimental HttpApi MCP routes."
  18342. },
  18343. {
  18344. "name": "project",
  18345. "description": "Experimental HttpApi project routes."
  18346. },
  18347. {
  18348. "name": "pty",
  18349. "description": "Experimental HttpApi PTY routes."
  18350. },
  18351. {
  18352. "name": "question",
  18353. "description": "Question routes."
  18354. },
  18355. {
  18356. "name": "permission",
  18357. "description": "Experimental HttpApi permission routes."
  18358. },
  18359. {
  18360. "name": "provider",
  18361. "description": "Experimental HttpApi provider routes."
  18362. },
  18363. {
  18364. "name": "session",
  18365. "description": "Experimental HttpApi session routes."
  18366. },
  18367. {
  18368. "name": "sync",
  18369. "description": "Experimental HttpApi sync routes."
  18370. },
  18371. {
  18372. "name": "v2",
  18373. "description": "Experimental v2 routes."
  18374. },
  18375. {
  18376. "name": "v2 messages",
  18377. "description": "Experimental v2 message routes."
  18378. },
  18379. {
  18380. "name": "tui",
  18381. "description": "Experimental HttpApi TUI routes."
  18382. },
  18383. {
  18384. "name": "workspace",
  18385. "description": "Experimental HttpApi workspace routes."
  18386. },
  18387. {
  18388. "name": "pty",
  18389. "description": "PTY websocket route."
  18390. }
  18391. ]
  18392. }