openapi.json 603 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989
  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": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. }
  2292. ],
  2293. "responses": {
  2294. "200": {
  2295. "description": "VCS diff",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/VcsFileDiff"
  2302. },
  2303. "description": "VCS diff"
  2304. }
  2305. }
  2306. }
  2307. },
  2308. "400": {
  2309. "description": "Bad request",
  2310. "content": {
  2311. "application/json": {
  2312. "schema": {
  2313. "$ref": "#/components/schemas/BadRequestError"
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2320. "summary": "Get VCS diff",
  2321. "x-codeSamples": [
  2322. {
  2323. "lang": "js",
  2324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2325. }
  2326. ]
  2327. }
  2328. },
  2329. "/vcs/diff/raw": {
  2330. "get": {
  2331. "tags": ["instance"],
  2332. "operationId": "vcs.diff.raw",
  2333. "parameters": [
  2334. {
  2335. "name": "directory",
  2336. "in": "query",
  2337. "schema": {
  2338. "type": "string"
  2339. },
  2340. "required": false
  2341. },
  2342. {
  2343. "name": "workspace",
  2344. "in": "query",
  2345. "schema": {
  2346. "type": "string"
  2347. },
  2348. "required": false
  2349. }
  2350. ],
  2351. "responses": {
  2352. "200": {
  2353. "description": "Raw VCS diff",
  2354. "content": {
  2355. "text/x-diff; charset=utf-8": {
  2356. "schema": {
  2357. "type": "string"
  2358. }
  2359. }
  2360. }
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Retrieve a raw patch for current uncommitted changes.",
  2374. "summary": "Get raw VCS diff",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/vcs/apply": {
  2384. "post": {
  2385. "tags": ["instance"],
  2386. "operationId": "vcs.apply",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "schema": {
  2392. "type": "string"
  2393. },
  2394. "required": false
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "schema": {
  2400. "type": "string"
  2401. },
  2402. "required": false
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "VCS patch applied",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "properties": {
  2413. "applied": {
  2414. "type": "boolean"
  2415. }
  2416. },
  2417. "required": ["applied"],
  2418. "additionalProperties": false,
  2419. "description": "VCS patch applied"
  2420. }
  2421. }
  2422. }
  2423. },
  2424. "400": {
  2425. "description": "VcsApplyError | InvalidRequestError",
  2426. "content": {
  2427. "application/json": {
  2428. "schema": {
  2429. "anyOf": [
  2430. {
  2431. "$ref": "#/components/schemas/VcsApplyError"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/InvalidRequestError"
  2435. }
  2436. ]
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Apply a raw patch to the current working tree.",
  2443. "summary": "Apply VCS patch",
  2444. "requestBody": {
  2445. "content": {
  2446. "application/json": {
  2447. "schema": {
  2448. "type": "object",
  2449. "properties": {
  2450. "patch": {
  2451. "type": "string"
  2452. }
  2453. },
  2454. "required": ["patch"],
  2455. "additionalProperties": false
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/command": {
  2469. "get": {
  2470. "tags": ["instance"],
  2471. "operationId": "command.list",
  2472. "parameters": [
  2473. {
  2474. "name": "directory",
  2475. "in": "query",
  2476. "schema": {
  2477. "type": "string"
  2478. },
  2479. "required": false
  2480. },
  2481. {
  2482. "name": "workspace",
  2483. "in": "query",
  2484. "schema": {
  2485. "type": "string"
  2486. },
  2487. "required": false
  2488. }
  2489. ],
  2490. "responses": {
  2491. "200": {
  2492. "description": "List of commands",
  2493. "content": {
  2494. "application/json": {
  2495. "schema": {
  2496. "type": "array",
  2497. "items": {
  2498. "$ref": "#/components/schemas/Command"
  2499. },
  2500. "description": "List of commands"
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "400": {
  2506. "description": "Bad request",
  2507. "content": {
  2508. "application/json": {
  2509. "schema": {
  2510. "$ref": "#/components/schemas/BadRequestError"
  2511. }
  2512. }
  2513. }
  2514. }
  2515. },
  2516. "description": "Get a list of all available commands in the OpenCode system.",
  2517. "summary": "List commands",
  2518. "x-codeSamples": [
  2519. {
  2520. "lang": "js",
  2521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2522. }
  2523. ]
  2524. }
  2525. },
  2526. "/agent": {
  2527. "get": {
  2528. "tags": ["instance"],
  2529. "operationId": "app.agents",
  2530. "parameters": [
  2531. {
  2532. "name": "directory",
  2533. "in": "query",
  2534. "schema": {
  2535. "type": "string"
  2536. },
  2537. "required": false
  2538. },
  2539. {
  2540. "name": "workspace",
  2541. "in": "query",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": false
  2546. }
  2547. ],
  2548. "responses": {
  2549. "200": {
  2550. "description": "List of agents",
  2551. "content": {
  2552. "application/json": {
  2553. "schema": {
  2554. "type": "array",
  2555. "items": {
  2556. "$ref": "#/components/schemas/Agent"
  2557. },
  2558. "description": "List of agents"
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "400": {
  2564. "description": "Bad request",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "$ref": "#/components/schemas/BadRequestError"
  2569. }
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "description": "Get a list of all available AI agents in the OpenCode system.",
  2575. "summary": "List agents",
  2576. "x-codeSamples": [
  2577. {
  2578. "lang": "js",
  2579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2580. }
  2581. ]
  2582. }
  2583. },
  2584. "/skill": {
  2585. "get": {
  2586. "tags": ["instance"],
  2587. "operationId": "app.skills",
  2588. "parameters": [
  2589. {
  2590. "name": "directory",
  2591. "in": "query",
  2592. "schema": {
  2593. "type": "string"
  2594. },
  2595. "required": false
  2596. },
  2597. {
  2598. "name": "workspace",
  2599. "in": "query",
  2600. "schema": {
  2601. "type": "string"
  2602. },
  2603. "required": false
  2604. }
  2605. ],
  2606. "responses": {
  2607. "200": {
  2608. "description": "List of skills",
  2609. "content": {
  2610. "application/json": {
  2611. "schema": {
  2612. "type": "array",
  2613. "items": {
  2614. "type": "object",
  2615. "properties": {
  2616. "name": {
  2617. "type": "string"
  2618. },
  2619. "description": {
  2620. "type": "string"
  2621. },
  2622. "location": {
  2623. "type": "string"
  2624. },
  2625. "content": {
  2626. "type": "string"
  2627. }
  2628. },
  2629. "required": ["name", "location", "content"],
  2630. "additionalProperties": false
  2631. },
  2632. "description": "List of skills"
  2633. }
  2634. }
  2635. }
  2636. },
  2637. "400": {
  2638. "description": "Bad request",
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "$ref": "#/components/schemas/BadRequestError"
  2643. }
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "description": "Get a list of all available skills in the OpenCode system.",
  2649. "summary": "List skills",
  2650. "x-codeSamples": [
  2651. {
  2652. "lang": "js",
  2653. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2654. }
  2655. ]
  2656. }
  2657. },
  2658. "/lsp": {
  2659. "get": {
  2660. "tags": ["instance"],
  2661. "operationId": "lsp.status",
  2662. "parameters": [
  2663. {
  2664. "name": "directory",
  2665. "in": "query",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": false
  2670. },
  2671. {
  2672. "name": "workspace",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. }
  2679. ],
  2680. "responses": {
  2681. "200": {
  2682. "description": "LSP server status",
  2683. "content": {
  2684. "application/json": {
  2685. "schema": {
  2686. "type": "array",
  2687. "items": {
  2688. "$ref": "#/components/schemas/LSPStatus"
  2689. },
  2690. "description": "LSP server status"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "400": {
  2696. "description": "Bad request",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/BadRequestError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "description": "Get LSP server status",
  2707. "summary": "Get LSP status",
  2708. "x-codeSamples": [
  2709. {
  2710. "lang": "js",
  2711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2712. }
  2713. ]
  2714. }
  2715. },
  2716. "/formatter": {
  2717. "get": {
  2718. "tags": ["instance"],
  2719. "operationId": "formatter.status",
  2720. "parameters": [
  2721. {
  2722. "name": "directory",
  2723. "in": "query",
  2724. "schema": {
  2725. "type": "string"
  2726. },
  2727. "required": false
  2728. },
  2729. {
  2730. "name": "workspace",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. }
  2737. ],
  2738. "responses": {
  2739. "200": {
  2740. "description": "Formatter status",
  2741. "content": {
  2742. "application/json": {
  2743. "schema": {
  2744. "type": "array",
  2745. "items": {
  2746. "$ref": "#/components/schemas/FormatterStatus"
  2747. },
  2748. "description": "Formatter status"
  2749. }
  2750. }
  2751. }
  2752. },
  2753. "400": {
  2754. "description": "Bad request",
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "$ref": "#/components/schemas/BadRequestError"
  2759. }
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "description": "Get formatter status",
  2765. "summary": "Get formatter status",
  2766. "x-codeSamples": [
  2767. {
  2768. "lang": "js",
  2769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2770. }
  2771. ]
  2772. }
  2773. },
  2774. "/mcp": {
  2775. "get": {
  2776. "tags": ["mcp"],
  2777. "operationId": "mcp.status",
  2778. "parameters": [
  2779. {
  2780. "name": "directory",
  2781. "in": "query",
  2782. "schema": {
  2783. "type": "string"
  2784. },
  2785. "required": false
  2786. },
  2787. {
  2788. "name": "workspace",
  2789. "in": "query",
  2790. "schema": {
  2791. "type": "string"
  2792. },
  2793. "required": false
  2794. }
  2795. ],
  2796. "responses": {
  2797. "200": {
  2798. "description": "MCP server status",
  2799. "content": {
  2800. "application/json": {
  2801. "schema": {
  2802. "type": "object",
  2803. "additionalProperties": {
  2804. "$ref": "#/components/schemas/MCPStatus"
  2805. },
  2806. "description": "MCP server status"
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "400": {
  2812. "description": "Bad request",
  2813. "content": {
  2814. "application/json": {
  2815. "schema": {
  2816. "$ref": "#/components/schemas/BadRequestError"
  2817. }
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2823. "summary": "Get MCP status",
  2824. "x-codeSamples": [
  2825. {
  2826. "lang": "js",
  2827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2828. }
  2829. ]
  2830. },
  2831. "post": {
  2832. "tags": ["mcp"],
  2833. "operationId": "mcp.add",
  2834. "parameters": [
  2835. {
  2836. "name": "directory",
  2837. "in": "query",
  2838. "schema": {
  2839. "type": "string"
  2840. },
  2841. "required": false
  2842. },
  2843. {
  2844. "name": "workspace",
  2845. "in": "query",
  2846. "schema": {
  2847. "type": "string"
  2848. },
  2849. "required": false
  2850. }
  2851. ],
  2852. "responses": {
  2853. "200": {
  2854. "description": "MCP server added successfully",
  2855. "content": {
  2856. "application/json": {
  2857. "schema": {
  2858. "type": "object",
  2859. "additionalProperties": {
  2860. "$ref": "#/components/schemas/MCPStatus"
  2861. },
  2862. "description": "MCP server added successfully"
  2863. }
  2864. }
  2865. }
  2866. },
  2867. "400": {
  2868. "description": "BadRequest | InvalidRequestError",
  2869. "content": {
  2870. "application/json": {
  2871. "schema": {
  2872. "anyOf": [
  2873. {
  2874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2875. },
  2876. {
  2877. "$ref": "#/components/schemas/InvalidRequestError"
  2878. }
  2879. ]
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2886. "summary": "Add MCP server",
  2887. "requestBody": {
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "object",
  2892. "properties": {
  2893. "name": {
  2894. "type": "string"
  2895. },
  2896. "config": {
  2897. "anyOf": [
  2898. {
  2899. "$ref": "#/components/schemas/McpLocalConfig"
  2900. },
  2901. {
  2902. "$ref": "#/components/schemas/McpRemoteConfig"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "required": ["name", "config"],
  2908. "additionalProperties": false
  2909. }
  2910. }
  2911. }
  2912. },
  2913. "x-codeSamples": [
  2914. {
  2915. "lang": "js",
  2916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2917. }
  2918. ]
  2919. }
  2920. },
  2921. "/mcp/{name}/auth": {
  2922. "post": {
  2923. "tags": ["mcp"],
  2924. "operationId": "mcp.auth.start",
  2925. "parameters": [
  2926. {
  2927. "name": "name",
  2928. "in": "path",
  2929. "schema": {
  2930. "type": "string"
  2931. },
  2932. "required": true
  2933. },
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "schema": {
  2938. "type": "string"
  2939. },
  2940. "required": false
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "schema": {
  2946. "type": "string"
  2947. },
  2948. "required": false
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "OAuth flow started",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "authorizationUrl": {
  2960. "type": "string"
  2961. },
  2962. "oauthState": {
  2963. "type": "string"
  2964. }
  2965. },
  2966. "required": ["authorizationUrl", "oauthState"],
  2967. "additionalProperties": false,
  2968. "description": "OAuth flow started"
  2969. }
  2970. }
  2971. }
  2972. },
  2973. "400": {
  2974. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2975. "content": {
  2976. "application/json": {
  2977. "schema": {
  2978. "anyOf": [
  2979. {
  2980. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2981. },
  2982. {
  2983. "$ref": "#/components/schemas/InvalidRequestError"
  2984. }
  2985. ]
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "404": {
  2991. "description": "Not found",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/NotFoundError"
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3002. "summary": "Start MCP OAuth",
  3003. "x-codeSamples": [
  3004. {
  3005. "lang": "js",
  3006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3007. }
  3008. ]
  3009. },
  3010. "delete": {
  3011. "tags": ["mcp"],
  3012. "operationId": "mcp.auth.remove",
  3013. "parameters": [
  3014. {
  3015. "name": "name",
  3016. "in": "path",
  3017. "schema": {
  3018. "type": "string"
  3019. },
  3020. "required": true
  3021. },
  3022. {
  3023. "name": "directory",
  3024. "in": "query",
  3025. "schema": {
  3026. "type": "string"
  3027. },
  3028. "required": false
  3029. },
  3030. {
  3031. "name": "workspace",
  3032. "in": "query",
  3033. "schema": {
  3034. "type": "string"
  3035. },
  3036. "required": false
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "description": "OAuth credentials removed",
  3042. "content": {
  3043. "application/json": {
  3044. "schema": {
  3045. "type": "object",
  3046. "properties": {
  3047. "success": {
  3048. "type": "boolean",
  3049. "enum": [true]
  3050. }
  3051. },
  3052. "required": ["success"],
  3053. "additionalProperties": false,
  3054. "description": "OAuth credentials removed"
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "400": {
  3060. "description": "Bad request",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/BadRequestError"
  3065. }
  3066. }
  3067. }
  3068. },
  3069. "404": {
  3070. "description": "Not found",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/NotFoundError"
  3075. }
  3076. }
  3077. }
  3078. }
  3079. },
  3080. "description": "Remove OAuth credentials for an MCP server.",
  3081. "summary": "Remove MCP OAuth",
  3082. "x-codeSamples": [
  3083. {
  3084. "lang": "js",
  3085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3086. }
  3087. ]
  3088. }
  3089. },
  3090. "/mcp/{name}/auth/callback": {
  3091. "post": {
  3092. "tags": ["mcp"],
  3093. "operationId": "mcp.auth.callback",
  3094. "parameters": [
  3095. {
  3096. "name": "name",
  3097. "in": "path",
  3098. "schema": {
  3099. "type": "string"
  3100. },
  3101. "required": true
  3102. },
  3103. {
  3104. "name": "directory",
  3105. "in": "query",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": false
  3110. },
  3111. {
  3112. "name": "workspace",
  3113. "in": "query",
  3114. "schema": {
  3115. "type": "string"
  3116. },
  3117. "required": false
  3118. }
  3119. ],
  3120. "responses": {
  3121. "200": {
  3122. "description": "OAuth authentication completed",
  3123. "content": {
  3124. "application/json": {
  3125. "schema": {
  3126. "$ref": "#/components/schemas/MCPStatus"
  3127. }
  3128. }
  3129. }
  3130. },
  3131. "400": {
  3132. "description": "BadRequest | InvalidRequestError",
  3133. "content": {
  3134. "application/json": {
  3135. "schema": {
  3136. "anyOf": [
  3137. {
  3138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3139. },
  3140. {
  3141. "$ref": "#/components/schemas/InvalidRequestError"
  3142. }
  3143. ]
  3144. }
  3145. }
  3146. }
  3147. },
  3148. "404": {
  3149. "description": "Not found",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/NotFoundError"
  3154. }
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3160. "summary": "Complete MCP OAuth",
  3161. "requestBody": {
  3162. "content": {
  3163. "application/json": {
  3164. "schema": {
  3165. "type": "object",
  3166. "properties": {
  3167. "code": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "required": ["code"],
  3172. "additionalProperties": false
  3173. }
  3174. }
  3175. }
  3176. },
  3177. "x-codeSamples": [
  3178. {
  3179. "lang": "js",
  3180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3181. }
  3182. ]
  3183. }
  3184. },
  3185. "/mcp/{name}/auth/authenticate": {
  3186. "post": {
  3187. "tags": ["mcp"],
  3188. "operationId": "mcp.auth.authenticate",
  3189. "parameters": [
  3190. {
  3191. "name": "name",
  3192. "in": "path",
  3193. "schema": {
  3194. "type": "string"
  3195. },
  3196. "required": true
  3197. },
  3198. {
  3199. "name": "directory",
  3200. "in": "query",
  3201. "schema": {
  3202. "type": "string"
  3203. },
  3204. "required": false
  3205. },
  3206. {
  3207. "name": "workspace",
  3208. "in": "query",
  3209. "schema": {
  3210. "type": "string"
  3211. },
  3212. "required": false
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "description": "OAuth authentication completed",
  3218. "content": {
  3219. "application/json": {
  3220. "schema": {
  3221. "$ref": "#/components/schemas/MCPStatus"
  3222. }
  3223. }
  3224. }
  3225. },
  3226. "400": {
  3227. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3228. "content": {
  3229. "application/json": {
  3230. "schema": {
  3231. "anyOf": [
  3232. {
  3233. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3234. },
  3235. {
  3236. "$ref": "#/components/schemas/InvalidRequestError"
  3237. }
  3238. ]
  3239. }
  3240. }
  3241. }
  3242. },
  3243. "404": {
  3244. "description": "Not found",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/NotFoundError"
  3249. }
  3250. }
  3251. }
  3252. }
  3253. },
  3254. "description": "Start OAuth flow and wait for callback (opens browser).",
  3255. "summary": "Authenticate MCP OAuth",
  3256. "x-codeSamples": [
  3257. {
  3258. "lang": "js",
  3259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3260. }
  3261. ]
  3262. }
  3263. },
  3264. "/mcp/{name}/connect": {
  3265. "post": {
  3266. "tags": ["mcp"],
  3267. "operationId": "mcp.connect",
  3268. "parameters": [
  3269. {
  3270. "name": "name",
  3271. "in": "path",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true
  3276. },
  3277. {
  3278. "name": "directory",
  3279. "in": "query",
  3280. "schema": {
  3281. "type": "string"
  3282. },
  3283. "required": false
  3284. },
  3285. {
  3286. "name": "workspace",
  3287. "in": "query",
  3288. "schema": {
  3289. "type": "string"
  3290. },
  3291. "required": false
  3292. }
  3293. ],
  3294. "responses": {
  3295. "200": {
  3296. "description": "MCP server connected successfully",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "type": "boolean",
  3301. "description": "MCP server connected successfully"
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "400": {
  3307. "description": "Bad request",
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "$ref": "#/components/schemas/BadRequestError"
  3312. }
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "description": "Connect an MCP server.",
  3318. "x-codeSamples": [
  3319. {
  3320. "lang": "js",
  3321. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3322. }
  3323. ]
  3324. }
  3325. },
  3326. "/mcp/{name}/disconnect": {
  3327. "post": {
  3328. "tags": ["mcp"],
  3329. "operationId": "mcp.disconnect",
  3330. "parameters": [
  3331. {
  3332. "name": "name",
  3333. "in": "path",
  3334. "schema": {
  3335. "type": "string"
  3336. },
  3337. "required": true
  3338. },
  3339. {
  3340. "name": "directory",
  3341. "in": "query",
  3342. "schema": {
  3343. "type": "string"
  3344. },
  3345. "required": false
  3346. },
  3347. {
  3348. "name": "workspace",
  3349. "in": "query",
  3350. "schema": {
  3351. "type": "string"
  3352. },
  3353. "required": false
  3354. }
  3355. ],
  3356. "responses": {
  3357. "200": {
  3358. "description": "MCP server disconnected successfully",
  3359. "content": {
  3360. "application/json": {
  3361. "schema": {
  3362. "type": "boolean",
  3363. "description": "MCP server disconnected successfully"
  3364. }
  3365. }
  3366. }
  3367. },
  3368. "400": {
  3369. "description": "Bad request",
  3370. "content": {
  3371. "application/json": {
  3372. "schema": {
  3373. "$ref": "#/components/schemas/BadRequestError"
  3374. }
  3375. }
  3376. }
  3377. }
  3378. },
  3379. "description": "Disconnect an MCP server.",
  3380. "x-codeSamples": [
  3381. {
  3382. "lang": "js",
  3383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3384. }
  3385. ]
  3386. }
  3387. },
  3388. "/project": {
  3389. "get": {
  3390. "tags": ["project"],
  3391. "operationId": "project.list",
  3392. "parameters": [
  3393. {
  3394. "name": "directory",
  3395. "in": "query",
  3396. "schema": {
  3397. "type": "string"
  3398. },
  3399. "required": false
  3400. },
  3401. {
  3402. "name": "workspace",
  3403. "in": "query",
  3404. "schema": {
  3405. "type": "string"
  3406. },
  3407. "required": false
  3408. }
  3409. ],
  3410. "responses": {
  3411. "200": {
  3412. "description": "List of projects",
  3413. "content": {
  3414. "application/json": {
  3415. "schema": {
  3416. "type": "array",
  3417. "items": {
  3418. "$ref": "#/components/schemas/Project"
  3419. },
  3420. "description": "List of projects"
  3421. }
  3422. }
  3423. }
  3424. },
  3425. "400": {
  3426. "description": "Bad request",
  3427. "content": {
  3428. "application/json": {
  3429. "schema": {
  3430. "$ref": "#/components/schemas/BadRequestError"
  3431. }
  3432. }
  3433. }
  3434. }
  3435. },
  3436. "description": "Get a list of projects that have been opened with OpenCode.",
  3437. "summary": "List all projects",
  3438. "x-codeSamples": [
  3439. {
  3440. "lang": "js",
  3441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3442. }
  3443. ]
  3444. }
  3445. },
  3446. "/project/current": {
  3447. "get": {
  3448. "tags": ["project"],
  3449. "operationId": "project.current",
  3450. "parameters": [
  3451. {
  3452. "name": "directory",
  3453. "in": "query",
  3454. "schema": {
  3455. "type": "string"
  3456. },
  3457. "required": false
  3458. },
  3459. {
  3460. "name": "workspace",
  3461. "in": "query",
  3462. "schema": {
  3463. "type": "string"
  3464. },
  3465. "required": false
  3466. }
  3467. ],
  3468. "responses": {
  3469. "200": {
  3470. "description": "Current project information",
  3471. "content": {
  3472. "application/json": {
  3473. "schema": {
  3474. "$ref": "#/components/schemas/Project"
  3475. }
  3476. }
  3477. }
  3478. },
  3479. "400": {
  3480. "description": "Bad request",
  3481. "content": {
  3482. "application/json": {
  3483. "schema": {
  3484. "$ref": "#/components/schemas/BadRequestError"
  3485. }
  3486. }
  3487. }
  3488. }
  3489. },
  3490. "description": "Retrieve the currently active project that OpenCode is working with.",
  3491. "summary": "Get current project",
  3492. "x-codeSamples": [
  3493. {
  3494. "lang": "js",
  3495. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3496. }
  3497. ]
  3498. }
  3499. },
  3500. "/project/git/init": {
  3501. "post": {
  3502. "tags": ["project"],
  3503. "operationId": "project.initGit",
  3504. "parameters": [
  3505. {
  3506. "name": "directory",
  3507. "in": "query",
  3508. "schema": {
  3509. "type": "string"
  3510. },
  3511. "required": false
  3512. },
  3513. {
  3514. "name": "workspace",
  3515. "in": "query",
  3516. "schema": {
  3517. "type": "string"
  3518. },
  3519. "required": false
  3520. }
  3521. ],
  3522. "responses": {
  3523. "200": {
  3524. "description": "Project information after git initialization",
  3525. "content": {
  3526. "application/json": {
  3527. "schema": {
  3528. "$ref": "#/components/schemas/Project"
  3529. }
  3530. }
  3531. }
  3532. },
  3533. "400": {
  3534. "description": "Bad request",
  3535. "content": {
  3536. "application/json": {
  3537. "schema": {
  3538. "$ref": "#/components/schemas/BadRequestError"
  3539. }
  3540. }
  3541. }
  3542. }
  3543. },
  3544. "description": "Create a git repository for the current project and return the refreshed project info.",
  3545. "summary": "Initialize git repository",
  3546. "x-codeSamples": [
  3547. {
  3548. "lang": "js",
  3549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3550. }
  3551. ]
  3552. }
  3553. },
  3554. "/project/{projectID}": {
  3555. "patch": {
  3556. "tags": ["project"],
  3557. "operationId": "project.update",
  3558. "parameters": [
  3559. {
  3560. "name": "projectID",
  3561. "in": "path",
  3562. "schema": {
  3563. "type": "string"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Updated project information",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/Project"
  3591. }
  3592. }
  3593. }
  3594. },
  3595. "400": {
  3596. "description": "BadRequest | InvalidRequestError",
  3597. "content": {
  3598. "application/json": {
  3599. "schema": {
  3600. "anyOf": [
  3601. {
  3602. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3603. },
  3604. {
  3605. "$ref": "#/components/schemas/InvalidRequestError"
  3606. }
  3607. ]
  3608. }
  3609. }
  3610. }
  3611. },
  3612. "404": {
  3613. "description": "Not found",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/NotFoundError"
  3618. }
  3619. }
  3620. }
  3621. }
  3622. },
  3623. "description": "Update project properties such as name, icon, and commands.",
  3624. "summary": "Update project",
  3625. "requestBody": {
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "type": "object",
  3630. "properties": {
  3631. "name": {
  3632. "type": "string"
  3633. },
  3634. "icon": {
  3635. "type": "object",
  3636. "properties": {
  3637. "url": {
  3638. "type": "string"
  3639. },
  3640. "override": {
  3641. "type": "string"
  3642. },
  3643. "color": {
  3644. "type": "string"
  3645. }
  3646. },
  3647. "additionalProperties": false
  3648. },
  3649. "commands": {
  3650. "type": "object",
  3651. "properties": {
  3652. "start": {
  3653. "type": "string",
  3654. "description": "Startup script to run when creating a new workspace (worktree)"
  3655. }
  3656. },
  3657. "additionalProperties": false
  3658. }
  3659. },
  3660. "additionalProperties": false
  3661. }
  3662. }
  3663. }
  3664. },
  3665. "x-codeSamples": [
  3666. {
  3667. "lang": "js",
  3668. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3669. }
  3670. ]
  3671. }
  3672. },
  3673. "/pty/shells": {
  3674. "get": {
  3675. "tags": ["pty"],
  3676. "operationId": "pty.shells",
  3677. "parameters": [
  3678. {
  3679. "name": "directory",
  3680. "in": "query",
  3681. "schema": {
  3682. "type": "string"
  3683. },
  3684. "required": false
  3685. },
  3686. {
  3687. "name": "workspace",
  3688. "in": "query",
  3689. "schema": {
  3690. "type": "string"
  3691. },
  3692. "required": false
  3693. }
  3694. ],
  3695. "responses": {
  3696. "200": {
  3697. "description": "List of shells",
  3698. "content": {
  3699. "application/json": {
  3700. "schema": {
  3701. "type": "array",
  3702. "items": {
  3703. "type": "object",
  3704. "properties": {
  3705. "path": {
  3706. "type": "string"
  3707. },
  3708. "name": {
  3709. "type": "string"
  3710. },
  3711. "acceptable": {
  3712. "type": "boolean"
  3713. }
  3714. },
  3715. "required": ["path", "name", "acceptable"],
  3716. "additionalProperties": false
  3717. },
  3718. "description": "List of shells"
  3719. }
  3720. }
  3721. }
  3722. },
  3723. "400": {
  3724. "description": "Bad request",
  3725. "content": {
  3726. "application/json": {
  3727. "schema": {
  3728. "$ref": "#/components/schemas/BadRequestError"
  3729. }
  3730. }
  3731. }
  3732. }
  3733. },
  3734. "description": "Get a list of available shells on the system.",
  3735. "summary": "List available shells",
  3736. "x-codeSamples": [
  3737. {
  3738. "lang": "js",
  3739. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3740. }
  3741. ]
  3742. }
  3743. },
  3744. "/pty": {
  3745. "get": {
  3746. "tags": ["pty"],
  3747. "operationId": "pty.list",
  3748. "parameters": [
  3749. {
  3750. "name": "directory",
  3751. "in": "query",
  3752. "schema": {
  3753. "type": "string"
  3754. },
  3755. "required": false
  3756. },
  3757. {
  3758. "name": "workspace",
  3759. "in": "query",
  3760. "schema": {
  3761. "type": "string"
  3762. },
  3763. "required": false
  3764. }
  3765. ],
  3766. "responses": {
  3767. "200": {
  3768. "description": "List of sessions",
  3769. "content": {
  3770. "application/json": {
  3771. "schema": {
  3772. "type": "array",
  3773. "items": {
  3774. "$ref": "#/components/schemas/Pty"
  3775. },
  3776. "description": "List of sessions"
  3777. }
  3778. }
  3779. }
  3780. },
  3781. "400": {
  3782. "description": "Bad request",
  3783. "content": {
  3784. "application/json": {
  3785. "schema": {
  3786. "$ref": "#/components/schemas/BadRequestError"
  3787. }
  3788. }
  3789. }
  3790. }
  3791. },
  3792. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3793. "summary": "List PTY sessions",
  3794. "x-codeSamples": [
  3795. {
  3796. "lang": "js",
  3797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3798. }
  3799. ]
  3800. },
  3801. "post": {
  3802. "tags": ["pty"],
  3803. "operationId": "pty.create",
  3804. "parameters": [
  3805. {
  3806. "name": "directory",
  3807. "in": "query",
  3808. "schema": {
  3809. "type": "string"
  3810. },
  3811. "required": false
  3812. },
  3813. {
  3814. "name": "workspace",
  3815. "in": "query",
  3816. "schema": {
  3817. "type": "string"
  3818. },
  3819. "required": false
  3820. }
  3821. ],
  3822. "responses": {
  3823. "200": {
  3824. "description": "Created session",
  3825. "content": {
  3826. "application/json": {
  3827. "schema": {
  3828. "$ref": "#/components/schemas/Pty"
  3829. }
  3830. }
  3831. }
  3832. },
  3833. "400": {
  3834. "description": "BadRequest | InvalidRequestError",
  3835. "content": {
  3836. "application/json": {
  3837. "schema": {
  3838. "anyOf": [
  3839. {
  3840. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3841. },
  3842. {
  3843. "$ref": "#/components/schemas/InvalidRequestError"
  3844. }
  3845. ]
  3846. }
  3847. }
  3848. }
  3849. }
  3850. },
  3851. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3852. "summary": "Create PTY session",
  3853. "requestBody": {
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "type": "object",
  3858. "properties": {
  3859. "command": {
  3860. "type": "string"
  3861. },
  3862. "args": {
  3863. "type": "array",
  3864. "items": {
  3865. "type": "string"
  3866. }
  3867. },
  3868. "cwd": {
  3869. "type": "string"
  3870. },
  3871. "title": {
  3872. "type": "string"
  3873. },
  3874. "env": {
  3875. "type": "object",
  3876. "additionalProperties": {
  3877. "type": "string"
  3878. }
  3879. }
  3880. },
  3881. "additionalProperties": false
  3882. }
  3883. }
  3884. }
  3885. },
  3886. "x-codeSamples": [
  3887. {
  3888. "lang": "js",
  3889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3890. }
  3891. ]
  3892. }
  3893. },
  3894. "/pty/{ptyID}": {
  3895. "get": {
  3896. "tags": ["pty"],
  3897. "operationId": "pty.get",
  3898. "parameters": [
  3899. {
  3900. "name": "ptyID",
  3901. "in": "path",
  3902. "schema": {
  3903. "type": "string",
  3904. "pattern": "^pty"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "directory",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. },
  3916. {
  3917. "name": "workspace",
  3918. "in": "query",
  3919. "schema": {
  3920. "type": "string"
  3921. },
  3922. "required": false
  3923. }
  3924. ],
  3925. "responses": {
  3926. "200": {
  3927. "description": "Session info",
  3928. "content": {
  3929. "application/json": {
  3930. "schema": {
  3931. "$ref": "#/components/schemas/Pty"
  3932. }
  3933. }
  3934. }
  3935. },
  3936. "400": {
  3937. "description": "Bad request",
  3938. "content": {
  3939. "application/json": {
  3940. "schema": {
  3941. "$ref": "#/components/schemas/BadRequestError"
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "404": {
  3947. "description": "NotFoundError",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/NotFoundError"
  3952. }
  3953. }
  3954. }
  3955. }
  3956. },
  3957. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3958. "summary": "Get PTY session",
  3959. "x-codeSamples": [
  3960. {
  3961. "lang": "js",
  3962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3963. }
  3964. ]
  3965. },
  3966. "put": {
  3967. "tags": ["pty"],
  3968. "operationId": "pty.update",
  3969. "parameters": [
  3970. {
  3971. "name": "ptyID",
  3972. "in": "path",
  3973. "schema": {
  3974. "type": "string",
  3975. "pattern": "^pty"
  3976. },
  3977. "required": true
  3978. },
  3979. {
  3980. "name": "directory",
  3981. "in": "query",
  3982. "schema": {
  3983. "type": "string"
  3984. },
  3985. "required": false
  3986. },
  3987. {
  3988. "name": "workspace",
  3989. "in": "query",
  3990. "schema": {
  3991. "type": "string"
  3992. },
  3993. "required": false
  3994. }
  3995. ],
  3996. "responses": {
  3997. "200": {
  3998. "description": "Updated session",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/Pty"
  4003. }
  4004. }
  4005. }
  4006. },
  4007. "400": {
  4008. "description": "BadRequest | InvalidRequestError",
  4009. "content": {
  4010. "application/json": {
  4011. "schema": {
  4012. "anyOf": [
  4013. {
  4014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4015. },
  4016. {
  4017. "$ref": "#/components/schemas/InvalidRequestError"
  4018. }
  4019. ]
  4020. }
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4026. "summary": "Update PTY session",
  4027. "requestBody": {
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "type": "object",
  4032. "properties": {
  4033. "title": {
  4034. "type": "string"
  4035. },
  4036. "size": {
  4037. "type": "object",
  4038. "properties": {
  4039. "rows": {
  4040. "type": "integer",
  4041. "exclusiveMinimum": 0
  4042. },
  4043. "cols": {
  4044. "type": "integer",
  4045. "exclusiveMinimum": 0
  4046. }
  4047. },
  4048. "required": ["rows", "cols"],
  4049. "additionalProperties": false
  4050. }
  4051. },
  4052. "additionalProperties": false
  4053. }
  4054. }
  4055. }
  4056. },
  4057. "x-codeSamples": [
  4058. {
  4059. "lang": "js",
  4060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4061. }
  4062. ]
  4063. },
  4064. "delete": {
  4065. "tags": ["pty"],
  4066. "operationId": "pty.remove",
  4067. "parameters": [
  4068. {
  4069. "name": "ptyID",
  4070. "in": "path",
  4071. "schema": {
  4072. "type": "string",
  4073. "pattern": "^pty"
  4074. },
  4075. "required": true
  4076. },
  4077. {
  4078. "name": "directory",
  4079. "in": "query",
  4080. "schema": {
  4081. "type": "string"
  4082. },
  4083. "required": false
  4084. },
  4085. {
  4086. "name": "workspace",
  4087. "in": "query",
  4088. "schema": {
  4089. "type": "string"
  4090. },
  4091. "required": false
  4092. }
  4093. ],
  4094. "responses": {
  4095. "200": {
  4096. "description": "Session removed",
  4097. "content": {
  4098. "application/json": {
  4099. "schema": {
  4100. "type": "boolean",
  4101. "description": "Session removed"
  4102. }
  4103. }
  4104. }
  4105. },
  4106. "400": {
  4107. "description": "Bad request",
  4108. "content": {
  4109. "application/json": {
  4110. "schema": {
  4111. "$ref": "#/components/schemas/BadRequestError"
  4112. }
  4113. }
  4114. }
  4115. },
  4116. "404": {
  4117. "description": "NotFoundError",
  4118. "content": {
  4119. "application/json": {
  4120. "schema": {
  4121. "$ref": "#/components/schemas/NotFoundError"
  4122. }
  4123. }
  4124. }
  4125. }
  4126. },
  4127. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4128. "summary": "Remove PTY session",
  4129. "x-codeSamples": [
  4130. {
  4131. "lang": "js",
  4132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4133. }
  4134. ]
  4135. }
  4136. },
  4137. "/pty/{ptyID}/connect-token": {
  4138. "post": {
  4139. "tags": ["pty"],
  4140. "operationId": "pty.connectToken",
  4141. "parameters": [
  4142. {
  4143. "name": "ptyID",
  4144. "in": "path",
  4145. "schema": {
  4146. "type": "string",
  4147. "pattern": "^pty"
  4148. },
  4149. "required": true
  4150. },
  4151. {
  4152. "name": "directory",
  4153. "in": "query",
  4154. "schema": {
  4155. "type": "string"
  4156. },
  4157. "required": false
  4158. },
  4159. {
  4160. "name": "workspace",
  4161. "in": "query",
  4162. "schema": {
  4163. "type": "string"
  4164. },
  4165. "required": false
  4166. }
  4167. ],
  4168. "responses": {
  4169. "200": {
  4170. "description": "WebSocket connect token",
  4171. "content": {
  4172. "application/json": {
  4173. "schema": {
  4174. "type": "object",
  4175. "properties": {
  4176. "ticket": {
  4177. "type": "string"
  4178. },
  4179. "expires_in": {
  4180. "type": "integer",
  4181. "exclusiveMinimum": 0
  4182. }
  4183. },
  4184. "required": ["ticket", "expires_in"],
  4185. "additionalProperties": false,
  4186. "description": "WebSocket connect token"
  4187. }
  4188. }
  4189. }
  4190. },
  4191. "400": {
  4192. "description": "Bad request",
  4193. "content": {
  4194. "application/json": {
  4195. "schema": {
  4196. "$ref": "#/components/schemas/BadRequestError"
  4197. }
  4198. }
  4199. }
  4200. },
  4201. "403": {
  4202. "description": "Forbidden",
  4203. "content": {
  4204. "application/json": {
  4205. "schema": {
  4206. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "404": {
  4212. "description": "NotFoundError",
  4213. "content": {
  4214. "application/json": {
  4215. "schema": {
  4216. "$ref": "#/components/schemas/NotFoundError"
  4217. }
  4218. }
  4219. }
  4220. }
  4221. },
  4222. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4223. "summary": "Create PTY WebSocket token",
  4224. "x-codeSamples": [
  4225. {
  4226. "lang": "js",
  4227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4228. }
  4229. ]
  4230. }
  4231. },
  4232. "/question": {
  4233. "get": {
  4234. "tags": ["question"],
  4235. "operationId": "question.list",
  4236. "parameters": [
  4237. {
  4238. "name": "directory",
  4239. "in": "query",
  4240. "schema": {
  4241. "type": "string"
  4242. },
  4243. "required": false
  4244. },
  4245. {
  4246. "name": "workspace",
  4247. "in": "query",
  4248. "schema": {
  4249. "type": "string"
  4250. },
  4251. "required": false
  4252. }
  4253. ],
  4254. "responses": {
  4255. "200": {
  4256. "description": "List of pending questions",
  4257. "content": {
  4258. "application/json": {
  4259. "schema": {
  4260. "type": "array",
  4261. "items": {
  4262. "$ref": "#/components/schemas/QuestionRequest"
  4263. },
  4264. "description": "List of pending questions"
  4265. }
  4266. }
  4267. }
  4268. },
  4269. "400": {
  4270. "description": "Bad request",
  4271. "content": {
  4272. "application/json": {
  4273. "schema": {
  4274. "$ref": "#/components/schemas/BadRequestError"
  4275. }
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "description": "Get all pending question requests across all sessions.",
  4281. "summary": "List pending questions",
  4282. "x-codeSamples": [
  4283. {
  4284. "lang": "js",
  4285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4286. }
  4287. ]
  4288. }
  4289. },
  4290. "/question/{requestID}/reply": {
  4291. "post": {
  4292. "tags": ["question"],
  4293. "operationId": "question.reply",
  4294. "parameters": [
  4295. {
  4296. "name": "requestID",
  4297. "in": "path",
  4298. "schema": {
  4299. "type": "string",
  4300. "pattern": "^que"
  4301. },
  4302. "required": true
  4303. },
  4304. {
  4305. "name": "directory",
  4306. "in": "query",
  4307. "schema": {
  4308. "type": "string"
  4309. },
  4310. "required": false
  4311. },
  4312. {
  4313. "name": "workspace",
  4314. "in": "query",
  4315. "schema": {
  4316. "type": "string"
  4317. },
  4318. "required": false
  4319. }
  4320. ],
  4321. "responses": {
  4322. "200": {
  4323. "description": "Question answered successfully",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "type": "boolean",
  4328. "description": "Question answered successfully"
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "400": {
  4334. "description": "BadRequest | InvalidRequestError",
  4335. "content": {
  4336. "application/json": {
  4337. "schema": {
  4338. "anyOf": [
  4339. {
  4340. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4341. },
  4342. {
  4343. "$ref": "#/components/schemas/InvalidRequestError"
  4344. }
  4345. ]
  4346. }
  4347. }
  4348. }
  4349. },
  4350. "404": {
  4351. "description": "Not found",
  4352. "content": {
  4353. "application/json": {
  4354. "schema": {
  4355. "$ref": "#/components/schemas/NotFoundError"
  4356. }
  4357. }
  4358. }
  4359. }
  4360. },
  4361. "description": "Provide answers to a question request from the AI assistant.",
  4362. "summary": "Reply to question request",
  4363. "requestBody": {
  4364. "content": {
  4365. "application/json": {
  4366. "schema": {
  4367. "type": "object",
  4368. "properties": {
  4369. "answers": {
  4370. "type": "array",
  4371. "items": {
  4372. "$ref": "#/components/schemas/QuestionAnswer"
  4373. },
  4374. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4375. }
  4376. },
  4377. "required": ["answers"],
  4378. "additionalProperties": false
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "x-codeSamples": [
  4384. {
  4385. "lang": "js",
  4386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4387. }
  4388. ]
  4389. }
  4390. },
  4391. "/question/{requestID}/reject": {
  4392. "post": {
  4393. "tags": ["question"],
  4394. "operationId": "question.reject",
  4395. "parameters": [
  4396. {
  4397. "name": "requestID",
  4398. "in": "path",
  4399. "schema": {
  4400. "type": "string",
  4401. "pattern": "^que"
  4402. },
  4403. "required": true
  4404. },
  4405. {
  4406. "name": "directory",
  4407. "in": "query",
  4408. "schema": {
  4409. "type": "string"
  4410. },
  4411. "required": false
  4412. },
  4413. {
  4414. "name": "workspace",
  4415. "in": "query",
  4416. "schema": {
  4417. "type": "string"
  4418. },
  4419. "required": false
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "description": "Question rejected successfully",
  4425. "content": {
  4426. "application/json": {
  4427. "schema": {
  4428. "type": "boolean",
  4429. "description": "Question rejected successfully"
  4430. }
  4431. }
  4432. }
  4433. },
  4434. "400": {
  4435. "description": "BadRequest | InvalidRequestError",
  4436. "content": {
  4437. "application/json": {
  4438. "schema": {
  4439. "anyOf": [
  4440. {
  4441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4442. },
  4443. {
  4444. "$ref": "#/components/schemas/InvalidRequestError"
  4445. }
  4446. ]
  4447. }
  4448. }
  4449. }
  4450. },
  4451. "404": {
  4452. "description": "Not found",
  4453. "content": {
  4454. "application/json": {
  4455. "schema": {
  4456. "$ref": "#/components/schemas/NotFoundError"
  4457. }
  4458. }
  4459. }
  4460. }
  4461. },
  4462. "description": "Reject a question request from the AI assistant.",
  4463. "summary": "Reject question request",
  4464. "x-codeSamples": [
  4465. {
  4466. "lang": "js",
  4467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4468. }
  4469. ]
  4470. }
  4471. },
  4472. "/permission": {
  4473. "get": {
  4474. "tags": ["permission"],
  4475. "operationId": "permission.list",
  4476. "parameters": [
  4477. {
  4478. "name": "directory",
  4479. "in": "query",
  4480. "schema": {
  4481. "type": "string"
  4482. },
  4483. "required": false
  4484. },
  4485. {
  4486. "name": "workspace",
  4487. "in": "query",
  4488. "schema": {
  4489. "type": "string"
  4490. },
  4491. "required": false
  4492. }
  4493. ],
  4494. "responses": {
  4495. "200": {
  4496. "description": "List of pending permissions",
  4497. "content": {
  4498. "application/json": {
  4499. "schema": {
  4500. "type": "array",
  4501. "items": {
  4502. "$ref": "#/components/schemas/PermissionRequest"
  4503. },
  4504. "description": "List of pending permissions"
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "400": {
  4510. "description": "Bad request",
  4511. "content": {
  4512. "application/json": {
  4513. "schema": {
  4514. "$ref": "#/components/schemas/BadRequestError"
  4515. }
  4516. }
  4517. }
  4518. }
  4519. },
  4520. "description": "Get all pending permission requests across all sessions.",
  4521. "summary": "List pending permissions",
  4522. "x-codeSamples": [
  4523. {
  4524. "lang": "js",
  4525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4526. }
  4527. ]
  4528. }
  4529. },
  4530. "/permission/{requestID}/reply": {
  4531. "post": {
  4532. "tags": ["permission"],
  4533. "operationId": "permission.reply",
  4534. "parameters": [
  4535. {
  4536. "name": "requestID",
  4537. "in": "path",
  4538. "schema": {
  4539. "type": "string",
  4540. "pattern": "^per"
  4541. },
  4542. "required": true
  4543. },
  4544. {
  4545. "name": "directory",
  4546. "in": "query",
  4547. "schema": {
  4548. "type": "string"
  4549. },
  4550. "required": false
  4551. },
  4552. {
  4553. "name": "workspace",
  4554. "in": "query",
  4555. "schema": {
  4556. "type": "string"
  4557. },
  4558. "required": false
  4559. }
  4560. ],
  4561. "responses": {
  4562. "200": {
  4563. "description": "Permission processed successfully",
  4564. "content": {
  4565. "application/json": {
  4566. "schema": {
  4567. "type": "boolean",
  4568. "description": "Permission processed successfully"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "400": {
  4574. "description": "BadRequest | InvalidRequestError",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "anyOf": [
  4579. {
  4580. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4581. },
  4582. {
  4583. "$ref": "#/components/schemas/InvalidRequestError"
  4584. }
  4585. ]
  4586. }
  4587. }
  4588. }
  4589. },
  4590. "404": {
  4591. "description": "Not found",
  4592. "content": {
  4593. "application/json": {
  4594. "schema": {
  4595. "$ref": "#/components/schemas/NotFoundError"
  4596. }
  4597. }
  4598. }
  4599. }
  4600. },
  4601. "description": "Approve or deny a permission request from the AI assistant.",
  4602. "summary": "Respond to permission request",
  4603. "requestBody": {
  4604. "content": {
  4605. "application/json": {
  4606. "schema": {
  4607. "type": "object",
  4608. "properties": {
  4609. "reply": {
  4610. "type": "string",
  4611. "enum": ["once", "always", "reject"]
  4612. },
  4613. "message": {
  4614. "type": "string"
  4615. }
  4616. },
  4617. "required": ["reply"],
  4618. "additionalProperties": false
  4619. }
  4620. }
  4621. }
  4622. },
  4623. "x-codeSamples": [
  4624. {
  4625. "lang": "js",
  4626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4627. }
  4628. ]
  4629. }
  4630. },
  4631. "/provider": {
  4632. "get": {
  4633. "tags": ["provider"],
  4634. "operationId": "provider.list",
  4635. "parameters": [
  4636. {
  4637. "name": "directory",
  4638. "in": "query",
  4639. "schema": {
  4640. "type": "string"
  4641. },
  4642. "required": false
  4643. },
  4644. {
  4645. "name": "workspace",
  4646. "in": "query",
  4647. "schema": {
  4648. "type": "string"
  4649. },
  4650. "required": false
  4651. }
  4652. ],
  4653. "responses": {
  4654. "200": {
  4655. "description": "List of providers",
  4656. "content": {
  4657. "application/json": {
  4658. "schema": {
  4659. "type": "object",
  4660. "properties": {
  4661. "all": {
  4662. "type": "array",
  4663. "items": {
  4664. "$ref": "#/components/schemas/Provider"
  4665. }
  4666. },
  4667. "default": {
  4668. "type": "object",
  4669. "additionalProperties": {
  4670. "type": "string"
  4671. }
  4672. },
  4673. "connected": {
  4674. "type": "array",
  4675. "items": {
  4676. "type": "string"
  4677. }
  4678. }
  4679. },
  4680. "required": ["all", "default", "connected"],
  4681. "additionalProperties": false,
  4682. "description": "List of providers"
  4683. }
  4684. }
  4685. }
  4686. },
  4687. "400": {
  4688. "description": "Bad request",
  4689. "content": {
  4690. "application/json": {
  4691. "schema": {
  4692. "$ref": "#/components/schemas/BadRequestError"
  4693. }
  4694. }
  4695. }
  4696. }
  4697. },
  4698. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4699. "summary": "List providers",
  4700. "x-codeSamples": [
  4701. {
  4702. "lang": "js",
  4703. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4704. }
  4705. ]
  4706. }
  4707. },
  4708. "/provider/auth": {
  4709. "get": {
  4710. "tags": ["provider"],
  4711. "operationId": "provider.auth",
  4712. "parameters": [
  4713. {
  4714. "name": "directory",
  4715. "in": "query",
  4716. "schema": {
  4717. "type": "string"
  4718. },
  4719. "required": false
  4720. },
  4721. {
  4722. "name": "workspace",
  4723. "in": "query",
  4724. "schema": {
  4725. "type": "string"
  4726. },
  4727. "required": false
  4728. }
  4729. ],
  4730. "responses": {
  4731. "200": {
  4732. "description": "Provider auth methods",
  4733. "content": {
  4734. "application/json": {
  4735. "schema": {
  4736. "type": "object",
  4737. "additionalProperties": {
  4738. "type": "array",
  4739. "items": {
  4740. "$ref": "#/components/schemas/ProviderAuthMethod"
  4741. }
  4742. },
  4743. "description": "Provider auth methods"
  4744. }
  4745. }
  4746. }
  4747. },
  4748. "400": {
  4749. "description": "Bad request",
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "$ref": "#/components/schemas/BadRequestError"
  4754. }
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "description": "Retrieve available authentication methods for all AI providers.",
  4760. "summary": "Get provider auth methods",
  4761. "x-codeSamples": [
  4762. {
  4763. "lang": "js",
  4764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4765. }
  4766. ]
  4767. }
  4768. },
  4769. "/provider/{providerID}/oauth/authorize": {
  4770. "post": {
  4771. "tags": ["provider"],
  4772. "operationId": "provider.oauth.authorize",
  4773. "parameters": [
  4774. {
  4775. "name": "providerID",
  4776. "in": "path",
  4777. "schema": {
  4778. "type": "string"
  4779. },
  4780. "required": true
  4781. },
  4782. {
  4783. "name": "directory",
  4784. "in": "query",
  4785. "schema": {
  4786. "type": "string"
  4787. },
  4788. "required": false
  4789. },
  4790. {
  4791. "name": "workspace",
  4792. "in": "query",
  4793. "schema": {
  4794. "type": "string"
  4795. },
  4796. "required": false
  4797. }
  4798. ],
  4799. "responses": {
  4800. "200": {
  4801. "description": "Authorization URL and method",
  4802. "content": {
  4803. "application/json": {
  4804. "schema": {
  4805. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4806. }
  4807. }
  4808. }
  4809. },
  4810. "400": {
  4811. "description": "ProviderAuthError | InvalidRequestError",
  4812. "content": {
  4813. "application/json": {
  4814. "schema": {
  4815. "anyOf": [
  4816. {
  4817. "$ref": "#/components/schemas/ProviderAuthError1"
  4818. },
  4819. {
  4820. "$ref": "#/components/schemas/InvalidRequestError"
  4821. }
  4822. ]
  4823. }
  4824. }
  4825. }
  4826. }
  4827. },
  4828. "description": "Start the OAuth authorization flow for a provider.",
  4829. "summary": "Start OAuth authorization",
  4830. "requestBody": {
  4831. "content": {
  4832. "application/json": {
  4833. "schema": {
  4834. "type": "object",
  4835. "properties": {
  4836. "method": {
  4837. "type": "number",
  4838. "description": "Auth method index"
  4839. },
  4840. "inputs": {
  4841. "type": "object",
  4842. "additionalProperties": {
  4843. "type": "string"
  4844. }
  4845. }
  4846. },
  4847. "required": ["method"],
  4848. "additionalProperties": false
  4849. }
  4850. }
  4851. }
  4852. },
  4853. "x-codeSamples": [
  4854. {
  4855. "lang": "js",
  4856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4857. }
  4858. ]
  4859. }
  4860. },
  4861. "/provider/{providerID}/oauth/callback": {
  4862. "post": {
  4863. "tags": ["provider"],
  4864. "operationId": "provider.oauth.callback",
  4865. "parameters": [
  4866. {
  4867. "name": "providerID",
  4868. "in": "path",
  4869. "schema": {
  4870. "type": "string"
  4871. },
  4872. "required": true
  4873. },
  4874. {
  4875. "name": "directory",
  4876. "in": "query",
  4877. "schema": {
  4878. "type": "string"
  4879. },
  4880. "required": false
  4881. },
  4882. {
  4883. "name": "workspace",
  4884. "in": "query",
  4885. "schema": {
  4886. "type": "string"
  4887. },
  4888. "required": false
  4889. }
  4890. ],
  4891. "responses": {
  4892. "200": {
  4893. "description": "OAuth callback processed successfully",
  4894. "content": {
  4895. "application/json": {
  4896. "schema": {
  4897. "type": "boolean",
  4898. "description": "OAuth callback processed successfully"
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "400": {
  4904. "description": "ProviderAuthError | InvalidRequestError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "anyOf": [
  4909. {
  4910. "$ref": "#/components/schemas/ProviderAuthError1"
  4911. },
  4912. {
  4913. "$ref": "#/components/schemas/InvalidRequestError"
  4914. }
  4915. ]
  4916. }
  4917. }
  4918. }
  4919. }
  4920. },
  4921. "description": "Handle the OAuth callback from a provider after user authorization.",
  4922. "summary": "Handle OAuth callback",
  4923. "requestBody": {
  4924. "content": {
  4925. "application/json": {
  4926. "schema": {
  4927. "type": "object",
  4928. "properties": {
  4929. "method": {
  4930. "type": "number",
  4931. "description": "Auth method index"
  4932. },
  4933. "code": {
  4934. "type": "string"
  4935. }
  4936. },
  4937. "required": ["method"],
  4938. "additionalProperties": false
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "x-codeSamples": [
  4944. {
  4945. "lang": "js",
  4946. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4947. }
  4948. ]
  4949. }
  4950. },
  4951. "/session": {
  4952. "get": {
  4953. "tags": ["session"],
  4954. "operationId": "session.list",
  4955. "parameters": [
  4956. {
  4957. "name": "directory",
  4958. "in": "query",
  4959. "schema": {
  4960. "type": "string"
  4961. },
  4962. "required": false
  4963. },
  4964. {
  4965. "name": "workspace",
  4966. "in": "query",
  4967. "schema": {
  4968. "type": "string"
  4969. },
  4970. "required": false
  4971. },
  4972. {
  4973. "name": "scope",
  4974. "in": "query",
  4975. "schema": {
  4976. "type": "string",
  4977. "enum": ["project"]
  4978. },
  4979. "required": false
  4980. },
  4981. {
  4982. "name": "path",
  4983. "in": "query",
  4984. "schema": {
  4985. "type": "string"
  4986. },
  4987. "required": false
  4988. },
  4989. {
  4990. "name": "roots",
  4991. "in": "query",
  4992. "schema": {
  4993. "anyOf": [
  4994. {
  4995. "type": "boolean"
  4996. },
  4997. {
  4998. "type": "string",
  4999. "enum": ["true", "false"]
  5000. }
  5001. ]
  5002. },
  5003. "required": false
  5004. },
  5005. {
  5006. "name": "start",
  5007. "in": "query",
  5008. "schema": {
  5009. "type": "number"
  5010. },
  5011. "required": false
  5012. },
  5013. {
  5014. "name": "search",
  5015. "in": "query",
  5016. "schema": {
  5017. "type": "string"
  5018. },
  5019. "required": false
  5020. },
  5021. {
  5022. "name": "limit",
  5023. "in": "query",
  5024. "schema": {
  5025. "type": "number"
  5026. },
  5027. "required": false
  5028. }
  5029. ],
  5030. "responses": {
  5031. "200": {
  5032. "description": "List of sessions",
  5033. "content": {
  5034. "application/json": {
  5035. "schema": {
  5036. "type": "array",
  5037. "items": {
  5038. "$ref": "#/components/schemas/Session"
  5039. },
  5040. "description": "List of sessions"
  5041. }
  5042. }
  5043. }
  5044. },
  5045. "400": {
  5046. "description": "Bad request",
  5047. "content": {
  5048. "application/json": {
  5049. "schema": {
  5050. "$ref": "#/components/schemas/BadRequestError"
  5051. }
  5052. }
  5053. }
  5054. }
  5055. },
  5056. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5057. "summary": "List sessions",
  5058. "x-codeSamples": [
  5059. {
  5060. "lang": "js",
  5061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5062. }
  5063. ]
  5064. },
  5065. "post": {
  5066. "tags": ["session"],
  5067. "operationId": "session.create",
  5068. "parameters": [
  5069. {
  5070. "name": "directory",
  5071. "in": "query",
  5072. "schema": {
  5073. "type": "string"
  5074. },
  5075. "required": false
  5076. },
  5077. {
  5078. "name": "workspace",
  5079. "in": "query",
  5080. "schema": {
  5081. "type": "string"
  5082. },
  5083. "required": false
  5084. }
  5085. ],
  5086. "responses": {
  5087. "200": {
  5088. "description": "Successfully created session",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/Session"
  5093. }
  5094. }
  5095. }
  5096. },
  5097. "400": {
  5098. "description": "BadRequest | InvalidRequestError",
  5099. "content": {
  5100. "application/json": {
  5101. "schema": {
  5102. "anyOf": [
  5103. {
  5104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5105. },
  5106. {
  5107. "$ref": "#/components/schemas/InvalidRequestError"
  5108. }
  5109. ]
  5110. }
  5111. }
  5112. }
  5113. }
  5114. },
  5115. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5116. "summary": "Create session",
  5117. "requestBody": {
  5118. "content": {
  5119. "application/json": {
  5120. "schema": {
  5121. "type": "object",
  5122. "properties": {
  5123. "parentID": {
  5124. "type": "string",
  5125. "pattern": "^ses"
  5126. },
  5127. "title": {
  5128. "type": "string"
  5129. },
  5130. "agent": {
  5131. "type": "string"
  5132. },
  5133. "model": {
  5134. "type": "object",
  5135. "properties": {
  5136. "id": {
  5137. "type": "string"
  5138. },
  5139. "providerID": {
  5140. "type": "string"
  5141. },
  5142. "variant": {
  5143. "type": "string"
  5144. }
  5145. },
  5146. "required": ["id", "providerID"],
  5147. "additionalProperties": false
  5148. },
  5149. "permission": {
  5150. "$ref": "#/components/schemas/PermissionRuleset"
  5151. },
  5152. "workspaceID": {
  5153. "type": "string",
  5154. "pattern": "^wrk"
  5155. }
  5156. },
  5157. "additionalProperties": false
  5158. }
  5159. }
  5160. }
  5161. },
  5162. "x-codeSamples": [
  5163. {
  5164. "lang": "js",
  5165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5166. }
  5167. ]
  5168. }
  5169. },
  5170. "/session/status": {
  5171. "get": {
  5172. "tags": ["session"],
  5173. "operationId": "session.status",
  5174. "parameters": [
  5175. {
  5176. "name": "directory",
  5177. "in": "query",
  5178. "schema": {
  5179. "type": "string"
  5180. },
  5181. "required": false
  5182. },
  5183. {
  5184. "name": "workspace",
  5185. "in": "query",
  5186. "schema": {
  5187. "type": "string"
  5188. },
  5189. "required": false
  5190. }
  5191. ],
  5192. "responses": {
  5193. "200": {
  5194. "description": "Get session status",
  5195. "content": {
  5196. "application/json": {
  5197. "schema": {
  5198. "type": "object",
  5199. "additionalProperties": {
  5200. "$ref": "#/components/schemas/SessionStatus"
  5201. },
  5202. "description": "Get session status"
  5203. }
  5204. }
  5205. }
  5206. },
  5207. "400": {
  5208. "description": "BadRequest | InvalidRequestError",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "anyOf": [
  5213. {
  5214. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5215. },
  5216. {
  5217. "$ref": "#/components/schemas/InvalidRequestError"
  5218. }
  5219. ]
  5220. }
  5221. }
  5222. }
  5223. }
  5224. },
  5225. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5226. "summary": "Get session status",
  5227. "x-codeSamples": [
  5228. {
  5229. "lang": "js",
  5230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5231. }
  5232. ]
  5233. }
  5234. },
  5235. "/session/{sessionID}": {
  5236. "get": {
  5237. "tags": ["session"],
  5238. "operationId": "session.get",
  5239. "parameters": [
  5240. {
  5241. "name": "sessionID",
  5242. "in": "path",
  5243. "schema": {
  5244. "type": "string",
  5245. "pattern": "^ses"
  5246. },
  5247. "required": true
  5248. },
  5249. {
  5250. "name": "directory",
  5251. "in": "query",
  5252. "schema": {
  5253. "type": "string"
  5254. },
  5255. "required": false
  5256. },
  5257. {
  5258. "name": "workspace",
  5259. "in": "query",
  5260. "schema": {
  5261. "type": "string"
  5262. },
  5263. "required": false
  5264. }
  5265. ],
  5266. "responses": {
  5267. "200": {
  5268. "description": "Get session",
  5269. "content": {
  5270. "application/json": {
  5271. "schema": {
  5272. "$ref": "#/components/schemas/Session"
  5273. }
  5274. }
  5275. }
  5276. },
  5277. "400": {
  5278. "description": "BadRequest | InvalidRequestError",
  5279. "content": {
  5280. "application/json": {
  5281. "schema": {
  5282. "anyOf": [
  5283. {
  5284. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5285. },
  5286. {
  5287. "$ref": "#/components/schemas/InvalidRequestError"
  5288. }
  5289. ]
  5290. }
  5291. }
  5292. }
  5293. },
  5294. "404": {
  5295. "description": "NotFoundError",
  5296. "content": {
  5297. "application/json": {
  5298. "schema": {
  5299. "$ref": "#/components/schemas/NotFoundError"
  5300. }
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "description": "Retrieve detailed information about a specific OpenCode session.",
  5306. "summary": "Get session",
  5307. "x-codeSamples": [
  5308. {
  5309. "lang": "js",
  5310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5311. }
  5312. ]
  5313. },
  5314. "delete": {
  5315. "tags": ["session"],
  5316. "operationId": "session.delete",
  5317. "parameters": [
  5318. {
  5319. "name": "sessionID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string",
  5323. "pattern": "^ses"
  5324. },
  5325. "required": true
  5326. },
  5327. {
  5328. "name": "directory",
  5329. "in": "query",
  5330. "schema": {
  5331. "type": "string"
  5332. },
  5333. "required": false
  5334. },
  5335. {
  5336. "name": "workspace",
  5337. "in": "query",
  5338. "schema": {
  5339. "type": "string"
  5340. },
  5341. "required": false
  5342. }
  5343. ],
  5344. "responses": {
  5345. "200": {
  5346. "description": "Successfully deleted session",
  5347. "content": {
  5348. "application/json": {
  5349. "schema": {
  5350. "type": "boolean",
  5351. "description": "Successfully deleted session"
  5352. }
  5353. }
  5354. }
  5355. },
  5356. "400": {
  5357. "description": "BadRequest | InvalidRequestError",
  5358. "content": {
  5359. "application/json": {
  5360. "schema": {
  5361. "anyOf": [
  5362. {
  5363. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5364. },
  5365. {
  5366. "$ref": "#/components/schemas/InvalidRequestError"
  5367. }
  5368. ]
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "404": {
  5374. "description": "NotFoundError",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "$ref": "#/components/schemas/NotFoundError"
  5379. }
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5385. "summary": "Delete session",
  5386. "x-codeSamples": [
  5387. {
  5388. "lang": "js",
  5389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5390. }
  5391. ]
  5392. },
  5393. "patch": {
  5394. "tags": ["session"],
  5395. "operationId": "session.update",
  5396. "parameters": [
  5397. {
  5398. "name": "sessionID",
  5399. "in": "path",
  5400. "schema": {
  5401. "type": "string",
  5402. "pattern": "^ses"
  5403. },
  5404. "required": true
  5405. },
  5406. {
  5407. "name": "directory",
  5408. "in": "query",
  5409. "schema": {
  5410. "type": "string"
  5411. },
  5412. "required": false
  5413. },
  5414. {
  5415. "name": "workspace",
  5416. "in": "query",
  5417. "schema": {
  5418. "type": "string"
  5419. },
  5420. "required": false
  5421. }
  5422. ],
  5423. "responses": {
  5424. "200": {
  5425. "description": "Successfully updated session",
  5426. "content": {
  5427. "application/json": {
  5428. "schema": {
  5429. "$ref": "#/components/schemas/Session"
  5430. }
  5431. }
  5432. }
  5433. },
  5434. "400": {
  5435. "description": "BadRequest | InvalidRequestError",
  5436. "content": {
  5437. "application/json": {
  5438. "schema": {
  5439. "anyOf": [
  5440. {
  5441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5442. },
  5443. {
  5444. "$ref": "#/components/schemas/InvalidRequestError"
  5445. }
  5446. ]
  5447. }
  5448. }
  5449. }
  5450. },
  5451. "404": {
  5452. "description": "NotFoundError",
  5453. "content": {
  5454. "application/json": {
  5455. "schema": {
  5456. "$ref": "#/components/schemas/NotFoundError"
  5457. }
  5458. }
  5459. }
  5460. }
  5461. },
  5462. "description": "Update properties of an existing session, such as title or other metadata.",
  5463. "summary": "Update session",
  5464. "requestBody": {
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "type": "object",
  5469. "properties": {
  5470. "title": {
  5471. "type": "string"
  5472. },
  5473. "permission": {
  5474. "$ref": "#/components/schemas/PermissionRuleset"
  5475. },
  5476. "time": {
  5477. "type": "object",
  5478. "properties": {
  5479. "archived": {
  5480. "type": "number"
  5481. }
  5482. },
  5483. "additionalProperties": false
  5484. }
  5485. },
  5486. "additionalProperties": false
  5487. }
  5488. }
  5489. }
  5490. },
  5491. "x-codeSamples": [
  5492. {
  5493. "lang": "js",
  5494. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5495. }
  5496. ]
  5497. }
  5498. },
  5499. "/session/{sessionID}/children": {
  5500. "get": {
  5501. "tags": ["session"],
  5502. "operationId": "session.children",
  5503. "parameters": [
  5504. {
  5505. "name": "sessionID",
  5506. "in": "path",
  5507. "schema": {
  5508. "type": "string",
  5509. "pattern": "^ses"
  5510. },
  5511. "required": true
  5512. },
  5513. {
  5514. "name": "directory",
  5515. "in": "query",
  5516. "schema": {
  5517. "type": "string"
  5518. },
  5519. "required": false
  5520. },
  5521. {
  5522. "name": "workspace",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. }
  5529. ],
  5530. "responses": {
  5531. "200": {
  5532. "description": "List of children",
  5533. "content": {
  5534. "application/json": {
  5535. "schema": {
  5536. "type": "array",
  5537. "items": {
  5538. "$ref": "#/components/schemas/Session"
  5539. },
  5540. "description": "List of children"
  5541. }
  5542. }
  5543. }
  5544. },
  5545. "400": {
  5546. "description": "BadRequest | InvalidRequestError",
  5547. "content": {
  5548. "application/json": {
  5549. "schema": {
  5550. "anyOf": [
  5551. {
  5552. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5553. },
  5554. {
  5555. "$ref": "#/components/schemas/InvalidRequestError"
  5556. }
  5557. ]
  5558. }
  5559. }
  5560. }
  5561. },
  5562. "404": {
  5563. "description": "NotFoundError",
  5564. "content": {
  5565. "application/json": {
  5566. "schema": {
  5567. "$ref": "#/components/schemas/NotFoundError"
  5568. }
  5569. }
  5570. }
  5571. }
  5572. },
  5573. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5574. "summary": "Get session children",
  5575. "x-codeSamples": [
  5576. {
  5577. "lang": "js",
  5578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5579. }
  5580. ]
  5581. }
  5582. },
  5583. "/session/{sessionID}/todo": {
  5584. "get": {
  5585. "tags": ["session"],
  5586. "operationId": "session.todo",
  5587. "parameters": [
  5588. {
  5589. "name": "sessionID",
  5590. "in": "path",
  5591. "schema": {
  5592. "type": "string",
  5593. "pattern": "^ses"
  5594. },
  5595. "required": true
  5596. },
  5597. {
  5598. "name": "directory",
  5599. "in": "query",
  5600. "schema": {
  5601. "type": "string"
  5602. },
  5603. "required": false
  5604. },
  5605. {
  5606. "name": "workspace",
  5607. "in": "query",
  5608. "schema": {
  5609. "type": "string"
  5610. },
  5611. "required": false
  5612. }
  5613. ],
  5614. "responses": {
  5615. "200": {
  5616. "description": "Todo list",
  5617. "content": {
  5618. "application/json": {
  5619. "schema": {
  5620. "type": "array",
  5621. "items": {
  5622. "$ref": "#/components/schemas/Todo"
  5623. },
  5624. "description": "Todo list"
  5625. }
  5626. }
  5627. }
  5628. },
  5629. "400": {
  5630. "description": "BadRequest | InvalidRequestError",
  5631. "content": {
  5632. "application/json": {
  5633. "schema": {
  5634. "anyOf": [
  5635. {
  5636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5637. },
  5638. {
  5639. "$ref": "#/components/schemas/InvalidRequestError"
  5640. }
  5641. ]
  5642. }
  5643. }
  5644. }
  5645. },
  5646. "404": {
  5647. "description": "NotFoundError",
  5648. "content": {
  5649. "application/json": {
  5650. "schema": {
  5651. "$ref": "#/components/schemas/NotFoundError"
  5652. }
  5653. }
  5654. }
  5655. }
  5656. },
  5657. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5658. "summary": "Get session todos",
  5659. "x-codeSamples": [
  5660. {
  5661. "lang": "js",
  5662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5663. }
  5664. ]
  5665. }
  5666. },
  5667. "/session/{sessionID}/diff": {
  5668. "get": {
  5669. "tags": ["session"],
  5670. "operationId": "session.diff",
  5671. "parameters": [
  5672. {
  5673. "name": "sessionID",
  5674. "in": "path",
  5675. "schema": {
  5676. "type": "string",
  5677. "pattern": "^ses"
  5678. },
  5679. "required": true
  5680. },
  5681. {
  5682. "name": "directory",
  5683. "in": "query",
  5684. "schema": {
  5685. "type": "string"
  5686. },
  5687. "required": false
  5688. },
  5689. {
  5690. "name": "workspace",
  5691. "in": "query",
  5692. "schema": {
  5693. "type": "string"
  5694. },
  5695. "required": false
  5696. },
  5697. {
  5698. "name": "messageID",
  5699. "in": "query",
  5700. "schema": {
  5701. "type": "string",
  5702. "pattern": "^msg"
  5703. },
  5704. "required": false
  5705. }
  5706. ],
  5707. "responses": {
  5708. "200": {
  5709. "description": "Successfully retrieved diff",
  5710. "content": {
  5711. "application/json": {
  5712. "schema": {
  5713. "type": "array",
  5714. "items": {
  5715. "$ref": "#/components/schemas/SnapshotFileDiff"
  5716. },
  5717. "description": "Successfully retrieved diff"
  5718. }
  5719. }
  5720. }
  5721. },
  5722. "400": {
  5723. "description": "Bad request",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/BadRequestError"
  5728. }
  5729. }
  5730. }
  5731. }
  5732. },
  5733. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5734. "summary": "Get message diff",
  5735. "x-codeSamples": [
  5736. {
  5737. "lang": "js",
  5738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5739. }
  5740. ]
  5741. }
  5742. },
  5743. "/session/{sessionID}/message": {
  5744. "get": {
  5745. "tags": ["session"],
  5746. "operationId": "session.messages",
  5747. "parameters": [
  5748. {
  5749. "name": "sessionID",
  5750. "in": "path",
  5751. "schema": {
  5752. "type": "string",
  5753. "pattern": "^ses"
  5754. },
  5755. "required": true
  5756. },
  5757. {
  5758. "name": "directory",
  5759. "in": "query",
  5760. "schema": {
  5761. "type": "string"
  5762. },
  5763. "required": false
  5764. },
  5765. {
  5766. "name": "workspace",
  5767. "in": "query",
  5768. "schema": {
  5769. "type": "string"
  5770. },
  5771. "required": false
  5772. },
  5773. {
  5774. "name": "limit",
  5775. "in": "query",
  5776. "schema": {
  5777. "type": "integer",
  5778. "minimum": 0,
  5779. "maximum": 9007199254740991
  5780. },
  5781. "required": false
  5782. },
  5783. {
  5784. "name": "before",
  5785. "in": "query",
  5786. "schema": {
  5787. "type": "string"
  5788. },
  5789. "required": false
  5790. }
  5791. ],
  5792. "responses": {
  5793. "200": {
  5794. "description": "List of messages",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "type": "array",
  5799. "items": {
  5800. "type": "object",
  5801. "properties": {
  5802. "info": {
  5803. "$ref": "#/components/schemas/Message"
  5804. },
  5805. "parts": {
  5806. "type": "array",
  5807. "items": {
  5808. "$ref": "#/components/schemas/Part"
  5809. }
  5810. }
  5811. },
  5812. "required": ["info", "parts"],
  5813. "additionalProperties": false
  5814. },
  5815. "description": "List of messages"
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "400": {
  5821. "description": "BadRequest | InvalidRequestError",
  5822. "content": {
  5823. "application/json": {
  5824. "schema": {
  5825. "anyOf": [
  5826. {
  5827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5828. },
  5829. {
  5830. "$ref": "#/components/schemas/InvalidRequestError"
  5831. }
  5832. ]
  5833. }
  5834. }
  5835. }
  5836. },
  5837. "404": {
  5838. "description": "NotFoundError",
  5839. "content": {
  5840. "application/json": {
  5841. "schema": {
  5842. "$ref": "#/components/schemas/NotFoundError"
  5843. }
  5844. }
  5845. }
  5846. }
  5847. },
  5848. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5849. "summary": "Get session messages",
  5850. "x-codeSamples": [
  5851. {
  5852. "lang": "js",
  5853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5854. }
  5855. ]
  5856. },
  5857. "post": {
  5858. "tags": ["session"],
  5859. "operationId": "session.prompt",
  5860. "parameters": [
  5861. {
  5862. "name": "sessionID",
  5863. "in": "path",
  5864. "schema": {
  5865. "type": "string",
  5866. "pattern": "^ses"
  5867. },
  5868. "required": true
  5869. },
  5870. {
  5871. "name": "directory",
  5872. "in": "query",
  5873. "schema": {
  5874. "type": "string"
  5875. },
  5876. "required": false
  5877. },
  5878. {
  5879. "name": "workspace",
  5880. "in": "query",
  5881. "schema": {
  5882. "type": "string"
  5883. },
  5884. "required": false
  5885. }
  5886. ],
  5887. "responses": {
  5888. "200": {
  5889. "description": "Created message",
  5890. "content": {
  5891. "application/json": {
  5892. "schema": {
  5893. "type": "object",
  5894. "required": ["info", "parts"],
  5895. "properties": {
  5896. "info": {
  5897. "$ref": "#/components/schemas/AssistantMessage"
  5898. },
  5899. "parts": {
  5900. "type": "array",
  5901. "items": {
  5902. "$ref": "#/components/schemas/Part"
  5903. }
  5904. }
  5905. }
  5906. }
  5907. }
  5908. }
  5909. },
  5910. "400": {
  5911. "description": "BadRequest | InvalidRequestError",
  5912. "content": {
  5913. "application/json": {
  5914. "schema": {
  5915. "anyOf": [
  5916. {
  5917. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5918. },
  5919. {
  5920. "$ref": "#/components/schemas/InvalidRequestError"
  5921. }
  5922. ]
  5923. }
  5924. }
  5925. }
  5926. },
  5927. "404": {
  5928. "description": "NotFoundError",
  5929. "content": {
  5930. "application/json": {
  5931. "schema": {
  5932. "$ref": "#/components/schemas/NotFoundError"
  5933. }
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "description": "Create and send a new message to a session, streaming the AI response.",
  5939. "summary": "Send message",
  5940. "requestBody": {
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "type": "object",
  5945. "properties": {
  5946. "messageID": {
  5947. "type": "string",
  5948. "pattern": "^msg"
  5949. },
  5950. "model": {
  5951. "type": "object",
  5952. "properties": {
  5953. "providerID": {
  5954. "type": "string"
  5955. },
  5956. "modelID": {
  5957. "type": "string"
  5958. }
  5959. },
  5960. "required": ["providerID", "modelID"],
  5961. "additionalProperties": false
  5962. },
  5963. "agent": {
  5964. "type": "string"
  5965. },
  5966. "noReply": {
  5967. "type": "boolean"
  5968. },
  5969. "tools": {
  5970. "type": "object",
  5971. "additionalProperties": {
  5972. "type": "boolean"
  5973. }
  5974. },
  5975. "format": {
  5976. "$ref": "#/components/schemas/OutputFormat"
  5977. },
  5978. "system": {
  5979. "type": "string"
  5980. },
  5981. "variant": {
  5982. "type": "string"
  5983. },
  5984. "parts": {
  5985. "type": "array",
  5986. "items": {
  5987. "anyOf": [
  5988. {
  5989. "$ref": "#/components/schemas/TextPartInput"
  5990. },
  5991. {
  5992. "$ref": "#/components/schemas/FilePartInput"
  5993. },
  5994. {
  5995. "$ref": "#/components/schemas/AgentPartInput"
  5996. },
  5997. {
  5998. "$ref": "#/components/schemas/SubtaskPartInput"
  5999. }
  6000. ]
  6001. }
  6002. }
  6003. },
  6004. "required": ["parts"],
  6005. "additionalProperties": false
  6006. }
  6007. }
  6008. }
  6009. },
  6010. "x-codeSamples": [
  6011. {
  6012. "lang": "js",
  6013. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6014. }
  6015. ]
  6016. }
  6017. },
  6018. "/session/{sessionID}/message/{messageID}": {
  6019. "get": {
  6020. "tags": ["session"],
  6021. "operationId": "session.message",
  6022. "parameters": [
  6023. {
  6024. "name": "sessionID",
  6025. "in": "path",
  6026. "schema": {
  6027. "type": "string",
  6028. "pattern": "^ses"
  6029. },
  6030. "required": true
  6031. },
  6032. {
  6033. "name": "messageID",
  6034. "in": "path",
  6035. "schema": {
  6036. "type": "string",
  6037. "pattern": "^msg"
  6038. },
  6039. "required": true
  6040. },
  6041. {
  6042. "name": "directory",
  6043. "in": "query",
  6044. "schema": {
  6045. "type": "string"
  6046. },
  6047. "required": false
  6048. },
  6049. {
  6050. "name": "workspace",
  6051. "in": "query",
  6052. "schema": {
  6053. "type": "string"
  6054. },
  6055. "required": false
  6056. }
  6057. ],
  6058. "responses": {
  6059. "200": {
  6060. "description": "Message",
  6061. "content": {
  6062. "application/json": {
  6063. "schema": {
  6064. "type": "object",
  6065. "properties": {
  6066. "info": {
  6067. "$ref": "#/components/schemas/Message"
  6068. },
  6069. "parts": {
  6070. "type": "array",
  6071. "items": {
  6072. "$ref": "#/components/schemas/Part"
  6073. }
  6074. }
  6075. },
  6076. "required": ["info", "parts"],
  6077. "additionalProperties": false,
  6078. "description": "Message"
  6079. }
  6080. }
  6081. }
  6082. },
  6083. "400": {
  6084. "description": "BadRequest | InvalidRequestError",
  6085. "content": {
  6086. "application/json": {
  6087. "schema": {
  6088. "anyOf": [
  6089. {
  6090. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6091. },
  6092. {
  6093. "$ref": "#/components/schemas/InvalidRequestError"
  6094. }
  6095. ]
  6096. }
  6097. }
  6098. }
  6099. },
  6100. "404": {
  6101. "description": "NotFoundError",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "$ref": "#/components/schemas/NotFoundError"
  6106. }
  6107. }
  6108. }
  6109. }
  6110. },
  6111. "description": "Retrieve a specific message from a session by its message ID.",
  6112. "summary": "Get message",
  6113. "x-codeSamples": [
  6114. {
  6115. "lang": "js",
  6116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6117. }
  6118. ]
  6119. },
  6120. "delete": {
  6121. "tags": ["session"],
  6122. "operationId": "session.deleteMessage",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "messageID",
  6135. "in": "path",
  6136. "schema": {
  6137. "type": "string",
  6138. "pattern": "^msg"
  6139. },
  6140. "required": true
  6141. },
  6142. {
  6143. "name": "directory",
  6144. "in": "query",
  6145. "schema": {
  6146. "type": "string"
  6147. },
  6148. "required": false
  6149. },
  6150. {
  6151. "name": "workspace",
  6152. "in": "query",
  6153. "schema": {
  6154. "type": "string"
  6155. },
  6156. "required": false
  6157. }
  6158. ],
  6159. "responses": {
  6160. "200": {
  6161. "description": "Successfully deleted message",
  6162. "content": {
  6163. "application/json": {
  6164. "schema": {
  6165. "type": "boolean",
  6166. "description": "Successfully deleted message"
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "BadRequest | InvalidRequestError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "anyOf": [
  6177. {
  6178. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6179. },
  6180. {
  6181. "$ref": "#/components/schemas/InvalidRequestError"
  6182. }
  6183. ]
  6184. }
  6185. }
  6186. }
  6187. },
  6188. "404": {
  6189. "description": "NotFoundError",
  6190. "content": {
  6191. "application/json": {
  6192. "schema": {
  6193. "$ref": "#/components/schemas/NotFoundError"
  6194. }
  6195. }
  6196. }
  6197. }
  6198. },
  6199. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6200. "summary": "Delete message",
  6201. "x-codeSamples": [
  6202. {
  6203. "lang": "js",
  6204. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6205. }
  6206. ]
  6207. }
  6208. },
  6209. "/session/{sessionID}/fork": {
  6210. "post": {
  6211. "tags": ["session"],
  6212. "operationId": "session.fork",
  6213. "parameters": [
  6214. {
  6215. "name": "sessionID",
  6216. "in": "path",
  6217. "schema": {
  6218. "type": "string",
  6219. "pattern": "^ses"
  6220. },
  6221. "required": true
  6222. },
  6223. {
  6224. "name": "directory",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "workspace",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "string"
  6236. },
  6237. "required": false
  6238. }
  6239. ],
  6240. "responses": {
  6241. "200": {
  6242. "description": "200",
  6243. "content": {
  6244. "application/json": {
  6245. "schema": {
  6246. "$ref": "#/components/schemas/Session"
  6247. }
  6248. }
  6249. }
  6250. },
  6251. "400": {
  6252. "description": "BadRequest | InvalidRequestError",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "anyOf": [
  6257. {
  6258. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6259. },
  6260. {
  6261. "$ref": "#/components/schemas/InvalidRequestError"
  6262. }
  6263. ]
  6264. }
  6265. }
  6266. }
  6267. },
  6268. "404": {
  6269. "description": "NotFoundError",
  6270. "content": {
  6271. "application/json": {
  6272. "schema": {
  6273. "$ref": "#/components/schemas/NotFoundError"
  6274. }
  6275. }
  6276. }
  6277. }
  6278. },
  6279. "description": "Create a new session by forking an existing session at a specific message point.",
  6280. "summary": "Fork session",
  6281. "requestBody": {
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "properties": {
  6287. "messageID": {
  6288. "type": "string",
  6289. "pattern": "^msg"
  6290. }
  6291. },
  6292. "additionalProperties": false
  6293. }
  6294. }
  6295. }
  6296. },
  6297. "x-codeSamples": [
  6298. {
  6299. "lang": "js",
  6300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6301. }
  6302. ]
  6303. }
  6304. },
  6305. "/session/{sessionID}/abort": {
  6306. "post": {
  6307. "tags": ["session"],
  6308. "operationId": "session.abort",
  6309. "parameters": [
  6310. {
  6311. "name": "sessionID",
  6312. "in": "path",
  6313. "schema": {
  6314. "type": "string",
  6315. "pattern": "^ses"
  6316. },
  6317. "required": true
  6318. },
  6319. {
  6320. "name": "directory",
  6321. "in": "query",
  6322. "schema": {
  6323. "type": "string"
  6324. },
  6325. "required": false
  6326. },
  6327. {
  6328. "name": "workspace",
  6329. "in": "query",
  6330. "schema": {
  6331. "type": "string"
  6332. },
  6333. "required": false
  6334. }
  6335. ],
  6336. "responses": {
  6337. "200": {
  6338. "description": "Aborted session",
  6339. "content": {
  6340. "application/json": {
  6341. "schema": {
  6342. "type": "boolean",
  6343. "description": "Aborted session"
  6344. }
  6345. }
  6346. }
  6347. },
  6348. "400": {
  6349. "description": "BadRequest | InvalidRequestError",
  6350. "content": {
  6351. "application/json": {
  6352. "schema": {
  6353. "anyOf": [
  6354. {
  6355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6356. },
  6357. {
  6358. "$ref": "#/components/schemas/InvalidRequestError"
  6359. }
  6360. ]
  6361. }
  6362. }
  6363. }
  6364. }
  6365. },
  6366. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6367. "summary": "Abort session",
  6368. "x-codeSamples": [
  6369. {
  6370. "lang": "js",
  6371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6372. }
  6373. ]
  6374. }
  6375. },
  6376. "/session/{sessionID}/init": {
  6377. "post": {
  6378. "tags": ["session"],
  6379. "operationId": "session.init",
  6380. "parameters": [
  6381. {
  6382. "name": "sessionID",
  6383. "in": "path",
  6384. "schema": {
  6385. "type": "string",
  6386. "pattern": "^ses"
  6387. },
  6388. "required": true
  6389. },
  6390. {
  6391. "name": "directory",
  6392. "in": "query",
  6393. "schema": {
  6394. "type": "string"
  6395. },
  6396. "required": false
  6397. },
  6398. {
  6399. "name": "workspace",
  6400. "in": "query",
  6401. "schema": {
  6402. "type": "string"
  6403. },
  6404. "required": false
  6405. }
  6406. ],
  6407. "responses": {
  6408. "200": {
  6409. "description": "200",
  6410. "content": {
  6411. "application/json": {
  6412. "schema": {
  6413. "type": "boolean",
  6414. "description": "200"
  6415. }
  6416. }
  6417. }
  6418. },
  6419. "400": {
  6420. "description": "BadRequest | InvalidRequestError",
  6421. "content": {
  6422. "application/json": {
  6423. "schema": {
  6424. "anyOf": [
  6425. {
  6426. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6427. },
  6428. {
  6429. "$ref": "#/components/schemas/InvalidRequestError"
  6430. }
  6431. ]
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "404": {
  6437. "description": "NotFoundError",
  6438. "content": {
  6439. "application/json": {
  6440. "schema": {
  6441. "$ref": "#/components/schemas/NotFoundError"
  6442. }
  6443. }
  6444. }
  6445. }
  6446. },
  6447. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6448. "summary": "Initialize session",
  6449. "requestBody": {
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "object",
  6454. "properties": {
  6455. "modelID": {
  6456. "type": "string"
  6457. },
  6458. "providerID": {
  6459. "type": "string"
  6460. },
  6461. "messageID": {
  6462. "type": "string",
  6463. "pattern": "^msg"
  6464. }
  6465. },
  6466. "required": ["modelID", "providerID", "messageID"],
  6467. "additionalProperties": false
  6468. }
  6469. }
  6470. }
  6471. },
  6472. "x-codeSamples": [
  6473. {
  6474. "lang": "js",
  6475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6476. }
  6477. ]
  6478. }
  6479. },
  6480. "/session/{sessionID}/share": {
  6481. "post": {
  6482. "tags": ["session"],
  6483. "operationId": "session.share",
  6484. "parameters": [
  6485. {
  6486. "name": "sessionID",
  6487. "in": "path",
  6488. "schema": {
  6489. "type": "string",
  6490. "pattern": "^ses"
  6491. },
  6492. "required": true
  6493. },
  6494. {
  6495. "name": "directory",
  6496. "in": "query",
  6497. "schema": {
  6498. "type": "string"
  6499. },
  6500. "required": false
  6501. },
  6502. {
  6503. "name": "workspace",
  6504. "in": "query",
  6505. "schema": {
  6506. "type": "string"
  6507. },
  6508. "required": false
  6509. }
  6510. ],
  6511. "responses": {
  6512. "200": {
  6513. "description": "Successfully shared session",
  6514. "content": {
  6515. "application/json": {
  6516. "schema": {
  6517. "$ref": "#/components/schemas/Session"
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "400": {
  6523. "description": "Bad request",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/BadRequestError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "404": {
  6533. "description": "NotFoundError",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/NotFoundError"
  6538. }
  6539. }
  6540. }
  6541. },
  6542. "500": {
  6543. "description": "InternalServerError",
  6544. "content": {
  6545. "application/json": {
  6546. "schema": {
  6547. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6548. }
  6549. }
  6550. }
  6551. }
  6552. },
  6553. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6554. "summary": "Share session",
  6555. "x-codeSamples": [
  6556. {
  6557. "lang": "js",
  6558. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6559. }
  6560. ]
  6561. },
  6562. "delete": {
  6563. "tags": ["session"],
  6564. "operationId": "session.unshare",
  6565. "parameters": [
  6566. {
  6567. "name": "sessionID",
  6568. "in": "path",
  6569. "schema": {
  6570. "type": "string",
  6571. "pattern": "^ses"
  6572. },
  6573. "required": true
  6574. },
  6575. {
  6576. "name": "directory",
  6577. "in": "query",
  6578. "schema": {
  6579. "type": "string"
  6580. },
  6581. "required": false
  6582. },
  6583. {
  6584. "name": "workspace",
  6585. "in": "query",
  6586. "schema": {
  6587. "type": "string"
  6588. },
  6589. "required": false
  6590. }
  6591. ],
  6592. "responses": {
  6593. "200": {
  6594. "description": "Successfully unshared session",
  6595. "content": {
  6596. "application/json": {
  6597. "schema": {
  6598. "$ref": "#/components/schemas/Session"
  6599. }
  6600. }
  6601. }
  6602. },
  6603. "400": {
  6604. "description": "Bad request",
  6605. "content": {
  6606. "application/json": {
  6607. "schema": {
  6608. "$ref": "#/components/schemas/BadRequestError"
  6609. }
  6610. }
  6611. }
  6612. },
  6613. "404": {
  6614. "description": "NotFoundError",
  6615. "content": {
  6616. "application/json": {
  6617. "schema": {
  6618. "$ref": "#/components/schemas/NotFoundError"
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "500": {
  6624. "description": "InternalServerError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Remove the shareable link for a session, making it private again.",
  6635. "summary": "Unshare session",
  6636. "x-codeSamples": [
  6637. {
  6638. "lang": "js",
  6639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6640. }
  6641. ]
  6642. }
  6643. },
  6644. "/session/{sessionID}/summarize": {
  6645. "post": {
  6646. "tags": ["session"],
  6647. "operationId": "session.summarize",
  6648. "parameters": [
  6649. {
  6650. "name": "sessionID",
  6651. "in": "path",
  6652. "schema": {
  6653. "type": "string",
  6654. "pattern": "^ses"
  6655. },
  6656. "required": true
  6657. },
  6658. {
  6659. "name": "directory",
  6660. "in": "query",
  6661. "schema": {
  6662. "type": "string"
  6663. },
  6664. "required": false
  6665. },
  6666. {
  6667. "name": "workspace",
  6668. "in": "query",
  6669. "schema": {
  6670. "type": "string"
  6671. },
  6672. "required": false
  6673. }
  6674. ],
  6675. "responses": {
  6676. "200": {
  6677. "description": "Summarized session",
  6678. "content": {
  6679. "application/json": {
  6680. "schema": {
  6681. "type": "boolean",
  6682. "description": "Summarized session"
  6683. }
  6684. }
  6685. }
  6686. },
  6687. "400": {
  6688. "description": "BadRequest | InvalidRequestError",
  6689. "content": {
  6690. "application/json": {
  6691. "schema": {
  6692. "anyOf": [
  6693. {
  6694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6695. },
  6696. {
  6697. "$ref": "#/components/schemas/InvalidRequestError"
  6698. }
  6699. ]
  6700. }
  6701. }
  6702. }
  6703. },
  6704. "404": {
  6705. "description": "NotFoundError",
  6706. "content": {
  6707. "application/json": {
  6708. "schema": {
  6709. "$ref": "#/components/schemas/NotFoundError"
  6710. }
  6711. }
  6712. }
  6713. }
  6714. },
  6715. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6716. "summary": "Summarize session",
  6717. "requestBody": {
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "object",
  6722. "properties": {
  6723. "providerID": {
  6724. "type": "string"
  6725. },
  6726. "modelID": {
  6727. "type": "string"
  6728. },
  6729. "auto": {
  6730. "type": "boolean"
  6731. }
  6732. },
  6733. "required": ["providerID", "modelID"],
  6734. "additionalProperties": false
  6735. }
  6736. }
  6737. }
  6738. },
  6739. "x-codeSamples": [
  6740. {
  6741. "lang": "js",
  6742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6743. }
  6744. ]
  6745. }
  6746. },
  6747. "/session/{sessionID}/prompt_async": {
  6748. "post": {
  6749. "tags": ["session"],
  6750. "operationId": "session.prompt_async",
  6751. "parameters": [
  6752. {
  6753. "name": "sessionID",
  6754. "in": "path",
  6755. "schema": {
  6756. "type": "string",
  6757. "pattern": "^ses"
  6758. },
  6759. "required": true
  6760. },
  6761. {
  6762. "name": "directory",
  6763. "in": "query",
  6764. "schema": {
  6765. "type": "string"
  6766. },
  6767. "required": false
  6768. },
  6769. {
  6770. "name": "workspace",
  6771. "in": "query",
  6772. "schema": {
  6773. "type": "string"
  6774. },
  6775. "required": false
  6776. }
  6777. ],
  6778. "responses": {
  6779. "204": {
  6780. "description": "Prompt accepted"
  6781. },
  6782. "400": {
  6783. "description": "BadRequest | InvalidRequestError",
  6784. "content": {
  6785. "application/json": {
  6786. "schema": {
  6787. "anyOf": [
  6788. {
  6789. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6790. },
  6791. {
  6792. "$ref": "#/components/schemas/InvalidRequestError"
  6793. }
  6794. ]
  6795. }
  6796. }
  6797. }
  6798. },
  6799. "404": {
  6800. "description": "NotFoundError",
  6801. "content": {
  6802. "application/json": {
  6803. "schema": {
  6804. "$ref": "#/components/schemas/NotFoundError"
  6805. }
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6811. "summary": "Send async message",
  6812. "requestBody": {
  6813. "content": {
  6814. "application/json": {
  6815. "schema": {
  6816. "type": "object",
  6817. "properties": {
  6818. "messageID": {
  6819. "type": "string",
  6820. "pattern": "^msg"
  6821. },
  6822. "model": {
  6823. "type": "object",
  6824. "properties": {
  6825. "providerID": {
  6826. "type": "string"
  6827. },
  6828. "modelID": {
  6829. "type": "string"
  6830. }
  6831. },
  6832. "required": ["providerID", "modelID"],
  6833. "additionalProperties": false
  6834. },
  6835. "agent": {
  6836. "type": "string"
  6837. },
  6838. "noReply": {
  6839. "type": "boolean"
  6840. },
  6841. "tools": {
  6842. "type": "object",
  6843. "additionalProperties": {
  6844. "type": "boolean"
  6845. }
  6846. },
  6847. "format": {
  6848. "$ref": "#/components/schemas/OutputFormat"
  6849. },
  6850. "system": {
  6851. "type": "string"
  6852. },
  6853. "variant": {
  6854. "type": "string"
  6855. },
  6856. "parts": {
  6857. "type": "array",
  6858. "items": {
  6859. "anyOf": [
  6860. {
  6861. "$ref": "#/components/schemas/TextPartInput"
  6862. },
  6863. {
  6864. "$ref": "#/components/schemas/FilePartInput"
  6865. },
  6866. {
  6867. "$ref": "#/components/schemas/AgentPartInput"
  6868. },
  6869. {
  6870. "$ref": "#/components/schemas/SubtaskPartInput"
  6871. }
  6872. ]
  6873. }
  6874. }
  6875. },
  6876. "required": ["parts"],
  6877. "additionalProperties": false
  6878. }
  6879. }
  6880. }
  6881. },
  6882. "x-codeSamples": [
  6883. {
  6884. "lang": "js",
  6885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6886. }
  6887. ]
  6888. }
  6889. },
  6890. "/session/{sessionID}/command": {
  6891. "post": {
  6892. "tags": ["session"],
  6893. "operationId": "session.command",
  6894. "parameters": [
  6895. {
  6896. "name": "sessionID",
  6897. "in": "path",
  6898. "schema": {
  6899. "type": "string",
  6900. "pattern": "^ses"
  6901. },
  6902. "required": true
  6903. },
  6904. {
  6905. "name": "directory",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. },
  6912. {
  6913. "name": "workspace",
  6914. "in": "query",
  6915. "schema": {
  6916. "type": "string"
  6917. },
  6918. "required": false
  6919. }
  6920. ],
  6921. "responses": {
  6922. "200": {
  6923. "description": "Created message",
  6924. "content": {
  6925. "application/json": {
  6926. "schema": {
  6927. "type": "object",
  6928. "required": ["info", "parts"],
  6929. "properties": {
  6930. "info": {
  6931. "$ref": "#/components/schemas/AssistantMessage"
  6932. },
  6933. "parts": {
  6934. "type": "array",
  6935. "items": {
  6936. "$ref": "#/components/schemas/Part"
  6937. }
  6938. }
  6939. }
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "400": {
  6945. "description": "BadRequest | InvalidRequestError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "anyOf": [
  6950. {
  6951. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6952. },
  6953. {
  6954. "$ref": "#/components/schemas/InvalidRequestError"
  6955. }
  6956. ]
  6957. }
  6958. }
  6959. }
  6960. },
  6961. "404": {
  6962. "description": "NotFoundError",
  6963. "content": {
  6964. "application/json": {
  6965. "schema": {
  6966. "$ref": "#/components/schemas/NotFoundError"
  6967. }
  6968. }
  6969. }
  6970. }
  6971. },
  6972. "description": "Send a new command to a session for execution by the AI assistant.",
  6973. "summary": "Send command",
  6974. "requestBody": {
  6975. "content": {
  6976. "application/json": {
  6977. "schema": {
  6978. "type": "object",
  6979. "properties": {
  6980. "messageID": {
  6981. "type": "string",
  6982. "pattern": "^msg"
  6983. },
  6984. "agent": {
  6985. "type": "string"
  6986. },
  6987. "model": {
  6988. "type": "string"
  6989. },
  6990. "arguments": {
  6991. "type": "string"
  6992. },
  6993. "command": {
  6994. "type": "string"
  6995. },
  6996. "variant": {
  6997. "type": "string"
  6998. },
  6999. "parts": {
  7000. "type": "array",
  7001. "items": {
  7002. "type": "object",
  7003. "properties": {
  7004. "id": {
  7005. "type": "string",
  7006. "pattern": "^prt"
  7007. },
  7008. "type": {
  7009. "type": "string",
  7010. "enum": ["file"]
  7011. },
  7012. "mime": {
  7013. "type": "string"
  7014. },
  7015. "filename": {
  7016. "type": "string"
  7017. },
  7018. "url": {
  7019. "type": "string"
  7020. },
  7021. "source": {
  7022. "$ref": "#/components/schemas/FilePartSource"
  7023. }
  7024. },
  7025. "required": ["type", "mime", "url"],
  7026. "additionalProperties": false
  7027. }
  7028. }
  7029. },
  7030. "required": ["arguments", "command"],
  7031. "additionalProperties": false
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "x-codeSamples": [
  7037. {
  7038. "lang": "js",
  7039. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7040. }
  7041. ]
  7042. }
  7043. },
  7044. "/session/{sessionID}/shell": {
  7045. "post": {
  7046. "tags": ["session"],
  7047. "operationId": "session.shell",
  7048. "parameters": [
  7049. {
  7050. "name": "sessionID",
  7051. "in": "path",
  7052. "schema": {
  7053. "type": "string",
  7054. "pattern": "^ses"
  7055. },
  7056. "required": true
  7057. },
  7058. {
  7059. "name": "directory",
  7060. "in": "query",
  7061. "schema": {
  7062. "type": "string"
  7063. },
  7064. "required": false
  7065. },
  7066. {
  7067. "name": "workspace",
  7068. "in": "query",
  7069. "schema": {
  7070. "type": "string"
  7071. },
  7072. "required": false
  7073. }
  7074. ],
  7075. "responses": {
  7076. "200": {
  7077. "description": "Created message",
  7078. "content": {
  7079. "application/json": {
  7080. "schema": {
  7081. "type": "object",
  7082. "properties": {
  7083. "info": {
  7084. "$ref": "#/components/schemas/Message"
  7085. },
  7086. "parts": {
  7087. "type": "array",
  7088. "items": {
  7089. "$ref": "#/components/schemas/Part"
  7090. }
  7091. }
  7092. },
  7093. "required": ["info", "parts"],
  7094. "additionalProperties": false,
  7095. "description": "Created message"
  7096. }
  7097. }
  7098. }
  7099. },
  7100. "400": {
  7101. "description": "BadRequest | InvalidRequestError",
  7102. "content": {
  7103. "application/json": {
  7104. "schema": {
  7105. "anyOf": [
  7106. {
  7107. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7108. },
  7109. {
  7110. "$ref": "#/components/schemas/InvalidRequestError"
  7111. }
  7112. ]
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "404": {
  7118. "description": "NotFoundError",
  7119. "content": {
  7120. "application/json": {
  7121. "schema": {
  7122. "$ref": "#/components/schemas/NotFoundError"
  7123. }
  7124. }
  7125. }
  7126. }
  7127. },
  7128. "description": "Execute a shell command within the session context and return the AI's response.",
  7129. "summary": "Run shell command",
  7130. "requestBody": {
  7131. "content": {
  7132. "application/json": {
  7133. "schema": {
  7134. "type": "object",
  7135. "properties": {
  7136. "messageID": {
  7137. "type": "string",
  7138. "pattern": "^msg"
  7139. },
  7140. "agent": {
  7141. "type": "string"
  7142. },
  7143. "model": {
  7144. "type": "object",
  7145. "properties": {
  7146. "providerID": {
  7147. "type": "string"
  7148. },
  7149. "modelID": {
  7150. "type": "string"
  7151. }
  7152. },
  7153. "required": ["providerID", "modelID"],
  7154. "additionalProperties": false
  7155. },
  7156. "command": {
  7157. "type": "string"
  7158. }
  7159. },
  7160. "required": ["agent", "command"],
  7161. "additionalProperties": false
  7162. }
  7163. }
  7164. }
  7165. },
  7166. "x-codeSamples": [
  7167. {
  7168. "lang": "js",
  7169. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7170. }
  7171. ]
  7172. }
  7173. },
  7174. "/session/{sessionID}/revert": {
  7175. "post": {
  7176. "tags": ["session"],
  7177. "operationId": "session.revert",
  7178. "parameters": [
  7179. {
  7180. "name": "sessionID",
  7181. "in": "path",
  7182. "schema": {
  7183. "type": "string",
  7184. "pattern": "^ses"
  7185. },
  7186. "required": true
  7187. },
  7188. {
  7189. "name": "directory",
  7190. "in": "query",
  7191. "schema": {
  7192. "type": "string"
  7193. },
  7194. "required": false
  7195. },
  7196. {
  7197. "name": "workspace",
  7198. "in": "query",
  7199. "schema": {
  7200. "type": "string"
  7201. },
  7202. "required": false
  7203. }
  7204. ],
  7205. "responses": {
  7206. "200": {
  7207. "description": "Updated session",
  7208. "content": {
  7209. "application/json": {
  7210. "schema": {
  7211. "$ref": "#/components/schemas/Session"
  7212. }
  7213. }
  7214. }
  7215. },
  7216. "400": {
  7217. "description": "BadRequest | InvalidRequestError",
  7218. "content": {
  7219. "application/json": {
  7220. "schema": {
  7221. "anyOf": [
  7222. {
  7223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7224. },
  7225. {
  7226. "$ref": "#/components/schemas/InvalidRequestError"
  7227. }
  7228. ]
  7229. }
  7230. }
  7231. }
  7232. },
  7233. "404": {
  7234. "description": "NotFoundError",
  7235. "content": {
  7236. "application/json": {
  7237. "schema": {
  7238. "$ref": "#/components/schemas/NotFoundError"
  7239. }
  7240. }
  7241. }
  7242. }
  7243. },
  7244. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7245. "summary": "Revert message",
  7246. "requestBody": {
  7247. "content": {
  7248. "application/json": {
  7249. "schema": {
  7250. "type": "object",
  7251. "properties": {
  7252. "messageID": {
  7253. "type": "string",
  7254. "pattern": "^msg"
  7255. },
  7256. "partID": {
  7257. "type": "string",
  7258. "pattern": "^prt"
  7259. }
  7260. },
  7261. "required": ["messageID"],
  7262. "additionalProperties": false
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "x-codeSamples": [
  7268. {
  7269. "lang": "js",
  7270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7271. }
  7272. ]
  7273. }
  7274. },
  7275. "/session/{sessionID}/unrevert": {
  7276. "post": {
  7277. "tags": ["session"],
  7278. "operationId": "session.unrevert",
  7279. "parameters": [
  7280. {
  7281. "name": "sessionID",
  7282. "in": "path",
  7283. "schema": {
  7284. "type": "string",
  7285. "pattern": "^ses"
  7286. },
  7287. "required": true
  7288. },
  7289. {
  7290. "name": "directory",
  7291. "in": "query",
  7292. "schema": {
  7293. "type": "string"
  7294. },
  7295. "required": false
  7296. },
  7297. {
  7298. "name": "workspace",
  7299. "in": "query",
  7300. "schema": {
  7301. "type": "string"
  7302. },
  7303. "required": false
  7304. }
  7305. ],
  7306. "responses": {
  7307. "200": {
  7308. "description": "Updated session",
  7309. "content": {
  7310. "application/json": {
  7311. "schema": {
  7312. "$ref": "#/components/schemas/Session"
  7313. }
  7314. }
  7315. }
  7316. },
  7317. "400": {
  7318. "description": "BadRequest | InvalidRequestError",
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "anyOf": [
  7323. {
  7324. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7325. },
  7326. {
  7327. "$ref": "#/components/schemas/InvalidRequestError"
  7328. }
  7329. ]
  7330. }
  7331. }
  7332. }
  7333. },
  7334. "404": {
  7335. "description": "NotFoundError",
  7336. "content": {
  7337. "application/json": {
  7338. "schema": {
  7339. "$ref": "#/components/schemas/NotFoundError"
  7340. }
  7341. }
  7342. }
  7343. }
  7344. },
  7345. "description": "Restore all previously reverted messages in a session.",
  7346. "summary": "Restore reverted messages",
  7347. "x-codeSamples": [
  7348. {
  7349. "lang": "js",
  7350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7351. }
  7352. ]
  7353. }
  7354. },
  7355. "/session/{sessionID}/permissions/{permissionID}": {
  7356. "post": {
  7357. "tags": ["session"],
  7358. "operationId": "permission.respond",
  7359. "parameters": [
  7360. {
  7361. "name": "sessionID",
  7362. "in": "path",
  7363. "schema": {
  7364. "type": "string",
  7365. "pattern": "^ses"
  7366. },
  7367. "required": true
  7368. },
  7369. {
  7370. "name": "permissionID",
  7371. "in": "path",
  7372. "schema": {
  7373. "type": "string",
  7374. "pattern": "^per"
  7375. },
  7376. "required": true
  7377. },
  7378. {
  7379. "name": "directory",
  7380. "in": "query",
  7381. "schema": {
  7382. "type": "string"
  7383. },
  7384. "required": false
  7385. },
  7386. {
  7387. "name": "workspace",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. }
  7394. ],
  7395. "responses": {
  7396. "200": {
  7397. "description": "Permission processed successfully",
  7398. "content": {
  7399. "application/json": {
  7400. "schema": {
  7401. "type": "boolean",
  7402. "description": "Permission processed successfully"
  7403. }
  7404. }
  7405. }
  7406. },
  7407. "400": {
  7408. "description": "BadRequest | InvalidRequestError",
  7409. "content": {
  7410. "application/json": {
  7411. "schema": {
  7412. "anyOf": [
  7413. {
  7414. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7415. },
  7416. {
  7417. "$ref": "#/components/schemas/InvalidRequestError"
  7418. }
  7419. ]
  7420. }
  7421. }
  7422. }
  7423. },
  7424. "404": {
  7425. "description": "NotFoundError",
  7426. "content": {
  7427. "application/json": {
  7428. "schema": {
  7429. "$ref": "#/components/schemas/NotFoundError"
  7430. }
  7431. }
  7432. }
  7433. }
  7434. },
  7435. "description": "Approve or deny a permission request from the AI assistant.",
  7436. "summary": "Respond to permission",
  7437. "deprecated": true,
  7438. "requestBody": {
  7439. "content": {
  7440. "application/json": {
  7441. "schema": {
  7442. "type": "object",
  7443. "properties": {
  7444. "response": {
  7445. "type": "string",
  7446. "enum": ["once", "always", "reject"]
  7447. }
  7448. },
  7449. "required": ["response"],
  7450. "additionalProperties": false
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "x-codeSamples": [
  7456. {
  7457. "lang": "js",
  7458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7459. }
  7460. ]
  7461. }
  7462. },
  7463. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7464. "delete": {
  7465. "tags": ["session"],
  7466. "operationId": "part.delete",
  7467. "parameters": [
  7468. {
  7469. "name": "sessionID",
  7470. "in": "path",
  7471. "schema": {
  7472. "type": "string",
  7473. "pattern": "^ses"
  7474. },
  7475. "required": true
  7476. },
  7477. {
  7478. "name": "messageID",
  7479. "in": "path",
  7480. "schema": {
  7481. "type": "string",
  7482. "pattern": "^msg"
  7483. },
  7484. "required": true
  7485. },
  7486. {
  7487. "name": "partID",
  7488. "in": "path",
  7489. "schema": {
  7490. "type": "string",
  7491. "pattern": "^prt"
  7492. },
  7493. "required": true
  7494. },
  7495. {
  7496. "name": "directory",
  7497. "in": "query",
  7498. "schema": {
  7499. "type": "string"
  7500. },
  7501. "required": false
  7502. },
  7503. {
  7504. "name": "workspace",
  7505. "in": "query",
  7506. "schema": {
  7507. "type": "string"
  7508. },
  7509. "required": false
  7510. }
  7511. ],
  7512. "responses": {
  7513. "200": {
  7514. "description": "Successfully deleted part",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "type": "boolean",
  7519. "description": "Successfully deleted part"
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "400": {
  7525. "description": "BadRequest | InvalidRequestError",
  7526. "content": {
  7527. "application/json": {
  7528. "schema": {
  7529. "anyOf": [
  7530. {
  7531. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7532. },
  7533. {
  7534. "$ref": "#/components/schemas/InvalidRequestError"
  7535. }
  7536. ]
  7537. }
  7538. }
  7539. }
  7540. },
  7541. "404": {
  7542. "description": "NotFoundError",
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "$ref": "#/components/schemas/NotFoundError"
  7547. }
  7548. }
  7549. }
  7550. }
  7551. },
  7552. "description": "Delete a part from a message.",
  7553. "x-codeSamples": [
  7554. {
  7555. "lang": "js",
  7556. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7557. }
  7558. ]
  7559. },
  7560. "patch": {
  7561. "tags": ["session"],
  7562. "operationId": "part.update",
  7563. "parameters": [
  7564. {
  7565. "name": "sessionID",
  7566. "in": "path",
  7567. "schema": {
  7568. "type": "string",
  7569. "pattern": "^ses"
  7570. },
  7571. "required": true
  7572. },
  7573. {
  7574. "name": "messageID",
  7575. "in": "path",
  7576. "schema": {
  7577. "type": "string",
  7578. "pattern": "^msg"
  7579. },
  7580. "required": true
  7581. },
  7582. {
  7583. "name": "partID",
  7584. "in": "path",
  7585. "schema": {
  7586. "type": "string",
  7587. "pattern": "^prt"
  7588. },
  7589. "required": true
  7590. },
  7591. {
  7592. "name": "directory",
  7593. "in": "query",
  7594. "schema": {
  7595. "type": "string"
  7596. },
  7597. "required": false
  7598. },
  7599. {
  7600. "name": "workspace",
  7601. "in": "query",
  7602. "schema": {
  7603. "type": "string"
  7604. },
  7605. "required": false
  7606. }
  7607. ],
  7608. "responses": {
  7609. "200": {
  7610. "description": "Successfully updated part",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "$ref": "#/components/schemas/Part"
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "400": {
  7620. "description": "BadRequest | InvalidRequestError",
  7621. "content": {
  7622. "application/json": {
  7623. "schema": {
  7624. "anyOf": [
  7625. {
  7626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7627. },
  7628. {
  7629. "$ref": "#/components/schemas/InvalidRequestError"
  7630. }
  7631. ]
  7632. }
  7633. }
  7634. }
  7635. },
  7636. "404": {
  7637. "description": "NotFoundError",
  7638. "content": {
  7639. "application/json": {
  7640. "schema": {
  7641. "$ref": "#/components/schemas/NotFoundError"
  7642. }
  7643. }
  7644. }
  7645. }
  7646. },
  7647. "description": "Update a part in a message.",
  7648. "requestBody": {
  7649. "content": {
  7650. "application/json": {
  7651. "schema": {
  7652. "$ref": "#/components/schemas/Part"
  7653. }
  7654. }
  7655. }
  7656. },
  7657. "x-codeSamples": [
  7658. {
  7659. "lang": "js",
  7660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7661. }
  7662. ]
  7663. }
  7664. },
  7665. "/sync/start": {
  7666. "post": {
  7667. "tags": ["sync"],
  7668. "operationId": "sync.start",
  7669. "parameters": [
  7670. {
  7671. "name": "directory",
  7672. "in": "query",
  7673. "schema": {
  7674. "type": "string"
  7675. },
  7676. "required": false
  7677. },
  7678. {
  7679. "name": "workspace",
  7680. "in": "query",
  7681. "schema": {
  7682. "type": "string"
  7683. },
  7684. "required": false
  7685. }
  7686. ],
  7687. "responses": {
  7688. "200": {
  7689. "description": "Workspace sync started",
  7690. "content": {
  7691. "application/json": {
  7692. "schema": {
  7693. "type": "boolean",
  7694. "description": "Workspace sync started"
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "400": {
  7700. "description": "Bad request",
  7701. "content": {
  7702. "application/json": {
  7703. "schema": {
  7704. "$ref": "#/components/schemas/BadRequestError"
  7705. }
  7706. }
  7707. }
  7708. }
  7709. },
  7710. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7711. "summary": "Start workspace sync",
  7712. "x-codeSamples": [
  7713. {
  7714. "lang": "js",
  7715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7716. }
  7717. ]
  7718. }
  7719. },
  7720. "/sync/replay": {
  7721. "post": {
  7722. "tags": ["sync"],
  7723. "operationId": "sync.replay",
  7724. "parameters": [
  7725. {
  7726. "name": "directory",
  7727. "in": "query",
  7728. "schema": {
  7729. "type": "string"
  7730. },
  7731. "required": false
  7732. },
  7733. {
  7734. "name": "workspace",
  7735. "in": "query",
  7736. "schema": {
  7737. "type": "string"
  7738. },
  7739. "required": false
  7740. }
  7741. ],
  7742. "responses": {
  7743. "200": {
  7744. "description": "Replayed sync events",
  7745. "content": {
  7746. "application/json": {
  7747. "schema": {
  7748. "type": "object",
  7749. "properties": {
  7750. "sessionID": {
  7751. "type": "string"
  7752. }
  7753. },
  7754. "required": ["sessionID"],
  7755. "additionalProperties": false,
  7756. "description": "Replayed sync events"
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "400": {
  7762. "description": "BadRequest | InvalidRequestError",
  7763. "content": {
  7764. "application/json": {
  7765. "schema": {
  7766. "anyOf": [
  7767. {
  7768. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7769. },
  7770. {
  7771. "$ref": "#/components/schemas/InvalidRequestError"
  7772. }
  7773. ]
  7774. }
  7775. }
  7776. }
  7777. }
  7778. },
  7779. "description": "Validate and replay a complete sync event history.",
  7780. "summary": "Replay sync events",
  7781. "requestBody": {
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "object",
  7786. "properties": {
  7787. "directory": {
  7788. "type": "string"
  7789. },
  7790. "events": {
  7791. "type": "array",
  7792. "minItems": 1,
  7793. "items": {
  7794. "type": "object",
  7795. "properties": {
  7796. "id": {
  7797. "type": "string"
  7798. },
  7799. "aggregateID": {
  7800. "type": "string"
  7801. },
  7802. "seq": {
  7803. "type": "integer",
  7804. "minimum": 0
  7805. },
  7806. "type": {
  7807. "type": "string"
  7808. },
  7809. "data": {
  7810. "type": "object"
  7811. }
  7812. },
  7813. "required": ["id", "aggregateID", "seq", "type", "data"],
  7814. "additionalProperties": false
  7815. }
  7816. }
  7817. },
  7818. "required": ["directory", "events"],
  7819. "additionalProperties": false
  7820. }
  7821. }
  7822. }
  7823. },
  7824. "x-codeSamples": [
  7825. {
  7826. "lang": "js",
  7827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7828. }
  7829. ]
  7830. }
  7831. },
  7832. "/sync/steal": {
  7833. "post": {
  7834. "tags": ["sync"],
  7835. "operationId": "sync.steal",
  7836. "parameters": [
  7837. {
  7838. "name": "directory",
  7839. "in": "query",
  7840. "schema": {
  7841. "type": "string"
  7842. },
  7843. "required": false
  7844. },
  7845. {
  7846. "name": "workspace",
  7847. "in": "query",
  7848. "schema": {
  7849. "type": "string"
  7850. },
  7851. "required": false
  7852. }
  7853. ],
  7854. "responses": {
  7855. "200": {
  7856. "description": "Session stolen into workspace",
  7857. "content": {
  7858. "application/json": {
  7859. "schema": {
  7860. "type": "object",
  7861. "properties": {
  7862. "sessionID": {
  7863. "type": "string",
  7864. "pattern": "^ses"
  7865. }
  7866. },
  7867. "required": ["sessionID"],
  7868. "additionalProperties": false,
  7869. "description": "Session stolen into workspace"
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "400": {
  7875. "description": "BadRequest | InvalidRequestError",
  7876. "content": {
  7877. "application/json": {
  7878. "schema": {
  7879. "anyOf": [
  7880. {
  7881. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7882. },
  7883. {
  7884. "$ref": "#/components/schemas/InvalidRequestError"
  7885. }
  7886. ]
  7887. }
  7888. }
  7889. }
  7890. }
  7891. },
  7892. "description": "Update a session to belong to the current workspace through the sync event system.",
  7893. "summary": "Steal session into workspace",
  7894. "requestBody": {
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "type": "object",
  7899. "properties": {
  7900. "sessionID": {
  7901. "type": "string",
  7902. "pattern": "^ses"
  7903. }
  7904. },
  7905. "required": ["sessionID"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. }
  7910. },
  7911. "x-codeSamples": [
  7912. {
  7913. "lang": "js",
  7914. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7915. }
  7916. ]
  7917. }
  7918. },
  7919. "/sync/history": {
  7920. "post": {
  7921. "tags": ["sync"],
  7922. "operationId": "sync.history.list",
  7923. "parameters": [
  7924. {
  7925. "name": "directory",
  7926. "in": "query",
  7927. "schema": {
  7928. "type": "string"
  7929. },
  7930. "required": false
  7931. },
  7932. {
  7933. "name": "workspace",
  7934. "in": "query",
  7935. "schema": {
  7936. "type": "string"
  7937. },
  7938. "required": false
  7939. }
  7940. ],
  7941. "responses": {
  7942. "200": {
  7943. "description": "Sync events",
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "array",
  7948. "items": {
  7949. "type": "object",
  7950. "properties": {
  7951. "id": {
  7952. "type": "string"
  7953. },
  7954. "aggregate_id": {
  7955. "type": "string"
  7956. },
  7957. "seq": {
  7958. "type": "integer",
  7959. "minimum": 0
  7960. },
  7961. "type": {
  7962. "type": "string"
  7963. },
  7964. "data": {
  7965. "type": "object"
  7966. }
  7967. },
  7968. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7969. "additionalProperties": false
  7970. },
  7971. "description": "Sync events"
  7972. }
  7973. }
  7974. }
  7975. },
  7976. "400": {
  7977. "description": "BadRequest | InvalidRequestError",
  7978. "content": {
  7979. "application/json": {
  7980. "schema": {
  7981. "anyOf": [
  7982. {
  7983. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7984. },
  7985. {
  7986. "$ref": "#/components/schemas/InvalidRequestError"
  7987. }
  7988. ]
  7989. }
  7990. }
  7991. }
  7992. }
  7993. },
  7994. "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.",
  7995. "summary": "List sync events",
  7996. "requestBody": {
  7997. "content": {
  7998. "application/json": {
  7999. "schema": {
  8000. "type": "object",
  8001. "additionalProperties": {
  8002. "type": "integer",
  8003. "minimum": 0
  8004. }
  8005. }
  8006. }
  8007. }
  8008. },
  8009. "x-codeSamples": [
  8010. {
  8011. "lang": "js",
  8012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8013. }
  8014. ]
  8015. }
  8016. },
  8017. "/api/session": {
  8018. "get": {
  8019. "tags": ["v2"],
  8020. "operationId": "v2.session.list",
  8021. "parameters": [
  8022. {
  8023. "name": "directory",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. },
  8030. {
  8031. "name": "workspace",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "limit",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "number"
  8043. },
  8044. "required": false
  8045. },
  8046. {
  8047. "name": "order",
  8048. "in": "query",
  8049. "schema": {
  8050. "type": "string",
  8051. "enum": ["asc", "desc"]
  8052. },
  8053. "required": false
  8054. },
  8055. {
  8056. "name": "path",
  8057. "in": "query",
  8058. "schema": {
  8059. "type": "string"
  8060. },
  8061. "required": false
  8062. },
  8063. {
  8064. "name": "roots",
  8065. "in": "query",
  8066. "schema": {
  8067. "anyOf": [
  8068. {
  8069. "type": "boolean"
  8070. },
  8071. {
  8072. "type": "string",
  8073. "enum": ["true", "false"]
  8074. }
  8075. ]
  8076. },
  8077. "required": false
  8078. },
  8079. {
  8080. "name": "start",
  8081. "in": "query",
  8082. "schema": {
  8083. "type": "number"
  8084. },
  8085. "required": false
  8086. },
  8087. {
  8088. "name": "search",
  8089. "in": "query",
  8090. "schema": {
  8091. "type": "string"
  8092. },
  8093. "required": false
  8094. },
  8095. {
  8096. "name": "cursor",
  8097. "in": "query",
  8098. "schema": {
  8099. "type": "string",
  8100. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8101. },
  8102. "required": false
  8103. }
  8104. ],
  8105. "security": [],
  8106. "responses": {
  8107. "200": {
  8108. "description": "V2SessionsResponse",
  8109. "content": {
  8110. "application/json": {
  8111. "schema": {
  8112. "$ref": "#/components/schemas/V2SessionsResponse"
  8113. }
  8114. }
  8115. }
  8116. },
  8117. "400": {
  8118. "description": "InvalidCursorError | InvalidRequestError",
  8119. "content": {
  8120. "application/json": {
  8121. "schema": {
  8122. "anyOf": [
  8123. {
  8124. "$ref": "#/components/schemas/InvalidCursorError"
  8125. },
  8126. {
  8127. "$ref": "#/components/schemas/InvalidRequestError"
  8128. },
  8129. {
  8130. "$ref": "#/components/schemas/InvalidRequestError"
  8131. }
  8132. ]
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "401": {
  8138. "description": "UnauthorizedError",
  8139. "content": {
  8140. "application/json": {
  8141. "schema": {
  8142. "$ref": "#/components/schemas/UnauthorizedError"
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "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.",
  8149. "summary": "List v2 sessions",
  8150. "x-codeSamples": [
  8151. {
  8152. "lang": "js",
  8153. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8154. }
  8155. ]
  8156. }
  8157. },
  8158. "/api/session/{sessionID}/prompt": {
  8159. "post": {
  8160. "tags": ["v2"],
  8161. "operationId": "v2.session.prompt",
  8162. "parameters": [
  8163. {
  8164. "name": "sessionID",
  8165. "in": "path",
  8166. "schema": {
  8167. "type": "string",
  8168. "pattern": "^ses"
  8169. },
  8170. "required": true
  8171. },
  8172. {
  8173. "name": "directory",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. },
  8180. {
  8181. "name": "workspace",
  8182. "in": "query",
  8183. "schema": {
  8184. "type": "string"
  8185. },
  8186. "required": false
  8187. }
  8188. ],
  8189. "security": [],
  8190. "responses": {
  8191. "200": {
  8192. "description": "Session.Message",
  8193. "content": {
  8194. "application/json": {
  8195. "schema": {
  8196. "$ref": "#/components/schemas/SessionMessage"
  8197. }
  8198. }
  8199. }
  8200. },
  8201. "400": {
  8202. "description": "InvalidRequestError",
  8203. "content": {
  8204. "application/json": {
  8205. "schema": {
  8206. "$ref": "#/components/schemas/InvalidRequestError"
  8207. }
  8208. }
  8209. }
  8210. },
  8211. "401": {
  8212. "description": "UnauthorizedError",
  8213. "content": {
  8214. "application/json": {
  8215. "schema": {
  8216. "$ref": "#/components/schemas/UnauthorizedError"
  8217. }
  8218. }
  8219. }
  8220. },
  8221. "404": {
  8222. "description": "SessionNotFoundError",
  8223. "content": {
  8224. "application/json": {
  8225. "schema": {
  8226. "$ref": "#/components/schemas/SessionNotFoundError"
  8227. }
  8228. }
  8229. }
  8230. },
  8231. "503": {
  8232. "description": "ServiceUnavailableError",
  8233. "content": {
  8234. "application/json": {
  8235. "schema": {
  8236. "$ref": "#/components/schemas/ServiceUnavailableError"
  8237. }
  8238. }
  8239. }
  8240. }
  8241. },
  8242. "description": "Create a v2 session message and queue it for the agent loop.",
  8243. "summary": "Send v2 message",
  8244. "requestBody": {
  8245. "content": {
  8246. "application/json": {
  8247. "schema": {
  8248. "type": "object",
  8249. "properties": {
  8250. "prompt": {
  8251. "$ref": "#/components/schemas/Prompt"
  8252. },
  8253. "delivery": {
  8254. "$ref": "#/components/schemas/SessionDelivery"
  8255. }
  8256. },
  8257. "required": ["prompt"],
  8258. "additionalProperties": false
  8259. }
  8260. }
  8261. }
  8262. },
  8263. "x-codeSamples": [
  8264. {
  8265. "lang": "js",
  8266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8267. }
  8268. ]
  8269. }
  8270. },
  8271. "/api/session/{sessionID}/compact": {
  8272. "post": {
  8273. "tags": ["v2"],
  8274. "operationId": "v2.session.compact",
  8275. "parameters": [
  8276. {
  8277. "name": "sessionID",
  8278. "in": "path",
  8279. "schema": {
  8280. "type": "string",
  8281. "pattern": "^ses"
  8282. },
  8283. "required": true
  8284. },
  8285. {
  8286. "name": "directory",
  8287. "in": "query",
  8288. "schema": {
  8289. "type": "string"
  8290. },
  8291. "required": false
  8292. },
  8293. {
  8294. "name": "workspace",
  8295. "in": "query",
  8296. "schema": {
  8297. "type": "string"
  8298. },
  8299. "required": false
  8300. }
  8301. ],
  8302. "security": [],
  8303. "responses": {
  8304. "204": {
  8305. "description": "<No Content>"
  8306. },
  8307. "400": {
  8308. "description": "InvalidRequestError",
  8309. "content": {
  8310. "application/json": {
  8311. "schema": {
  8312. "$ref": "#/components/schemas/InvalidRequestError"
  8313. }
  8314. }
  8315. }
  8316. },
  8317. "401": {
  8318. "description": "UnauthorizedError",
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "$ref": "#/components/schemas/UnauthorizedError"
  8323. }
  8324. }
  8325. }
  8326. },
  8327. "404": {
  8328. "description": "SessionNotFoundError",
  8329. "content": {
  8330. "application/json": {
  8331. "schema": {
  8332. "$ref": "#/components/schemas/SessionNotFoundError"
  8333. }
  8334. }
  8335. }
  8336. },
  8337. "503": {
  8338. "description": "ServiceUnavailableError",
  8339. "content": {
  8340. "application/json": {
  8341. "schema": {
  8342. "$ref": "#/components/schemas/ServiceUnavailableError"
  8343. }
  8344. }
  8345. }
  8346. }
  8347. },
  8348. "description": "Compact a v2 session conversation.",
  8349. "summary": "Compact v2 session",
  8350. "x-codeSamples": [
  8351. {
  8352. "lang": "js",
  8353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8354. }
  8355. ]
  8356. }
  8357. },
  8358. "/api/session/{sessionID}/wait": {
  8359. "post": {
  8360. "tags": ["v2"],
  8361. "operationId": "v2.session.wait",
  8362. "parameters": [
  8363. {
  8364. "name": "sessionID",
  8365. "in": "path",
  8366. "schema": {
  8367. "type": "string",
  8368. "pattern": "^ses"
  8369. },
  8370. "required": true
  8371. },
  8372. {
  8373. "name": "directory",
  8374. "in": "query",
  8375. "schema": {
  8376. "type": "string"
  8377. },
  8378. "required": false
  8379. },
  8380. {
  8381. "name": "workspace",
  8382. "in": "query",
  8383. "schema": {
  8384. "type": "string"
  8385. },
  8386. "required": false
  8387. }
  8388. ],
  8389. "security": [],
  8390. "responses": {
  8391. "204": {
  8392. "description": "<No Content>"
  8393. },
  8394. "400": {
  8395. "description": "InvalidRequestError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/InvalidRequestError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "401": {
  8405. "description": "UnauthorizedError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/UnauthorizedError"
  8410. }
  8411. }
  8412. }
  8413. },
  8414. "404": {
  8415. "description": "SessionNotFoundError",
  8416. "content": {
  8417. "application/json": {
  8418. "schema": {
  8419. "$ref": "#/components/schemas/SessionNotFoundError"
  8420. }
  8421. }
  8422. }
  8423. },
  8424. "503": {
  8425. "description": "ServiceUnavailableError",
  8426. "content": {
  8427. "application/json": {
  8428. "schema": {
  8429. "$ref": "#/components/schemas/ServiceUnavailableError"
  8430. }
  8431. }
  8432. }
  8433. }
  8434. },
  8435. "description": "Wait for a v2 session agent loop to become idle.",
  8436. "summary": "Wait for v2 session",
  8437. "x-codeSamples": [
  8438. {
  8439. "lang": "js",
  8440. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8441. }
  8442. ]
  8443. }
  8444. },
  8445. "/api/session/{sessionID}/context": {
  8446. "get": {
  8447. "tags": ["v2"],
  8448. "operationId": "v2.session.context",
  8449. "parameters": [
  8450. {
  8451. "name": "sessionID",
  8452. "in": "path",
  8453. "schema": {
  8454. "type": "string",
  8455. "pattern": "^ses"
  8456. },
  8457. "required": true
  8458. },
  8459. {
  8460. "name": "directory",
  8461. "in": "query",
  8462. "schema": {
  8463. "type": "string"
  8464. },
  8465. "required": false
  8466. },
  8467. {
  8468. "name": "workspace",
  8469. "in": "query",
  8470. "schema": {
  8471. "type": "string"
  8472. },
  8473. "required": false
  8474. }
  8475. ],
  8476. "security": [],
  8477. "responses": {
  8478. "200": {
  8479. "description": "Success",
  8480. "content": {
  8481. "application/json": {
  8482. "schema": {
  8483. "type": "array",
  8484. "items": {
  8485. "$ref": "#/components/schemas/SessionMessage"
  8486. }
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "400": {
  8492. "description": "InvalidRequestError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/InvalidRequestError"
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "401": {
  8502. "description": "UnauthorizedError",
  8503. "content": {
  8504. "application/json": {
  8505. "schema": {
  8506. "$ref": "#/components/schemas/UnauthorizedError"
  8507. }
  8508. }
  8509. }
  8510. },
  8511. "404": {
  8512. "description": "SessionNotFoundError",
  8513. "content": {
  8514. "application/json": {
  8515. "schema": {
  8516. "$ref": "#/components/schemas/SessionNotFoundError"
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "500": {
  8522. "description": "UnknownError",
  8523. "content": {
  8524. "application/json": {
  8525. "schema": {
  8526. "$ref": "#/components/schemas/UnknownError1"
  8527. }
  8528. }
  8529. }
  8530. }
  8531. },
  8532. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8533. "summary": "Get v2 session context",
  8534. "x-codeSamples": [
  8535. {
  8536. "lang": "js",
  8537. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8538. }
  8539. ]
  8540. }
  8541. },
  8542. "/api/session/{sessionID}/message": {
  8543. "get": {
  8544. "tags": ["v2 messages"],
  8545. "operationId": "v2.session.messages",
  8546. "parameters": [
  8547. {
  8548. "name": "sessionID",
  8549. "in": "path",
  8550. "schema": {
  8551. "type": "string",
  8552. "pattern": "^ses"
  8553. },
  8554. "required": true
  8555. },
  8556. {
  8557. "name": "directory",
  8558. "in": "query",
  8559. "schema": {
  8560. "type": "string"
  8561. },
  8562. "required": false
  8563. },
  8564. {
  8565. "name": "workspace",
  8566. "in": "query",
  8567. "schema": {
  8568. "type": "string"
  8569. },
  8570. "required": false
  8571. },
  8572. {
  8573. "name": "limit",
  8574. "in": "query",
  8575. "schema": {
  8576. "type": "number"
  8577. },
  8578. "required": false
  8579. },
  8580. {
  8581. "name": "order",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string",
  8585. "enum": ["asc", "desc"]
  8586. },
  8587. "required": false
  8588. },
  8589. {
  8590. "name": "cursor",
  8591. "in": "query",
  8592. "schema": {
  8593. "type": "string",
  8594. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8595. },
  8596. "required": false
  8597. }
  8598. ],
  8599. "security": [],
  8600. "responses": {
  8601. "200": {
  8602. "description": "V2SessionMessagesResponse",
  8603. "content": {
  8604. "application/json": {
  8605. "schema": {
  8606. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8607. }
  8608. }
  8609. }
  8610. },
  8611. "400": {
  8612. "description": "InvalidCursorError | InvalidRequestError",
  8613. "content": {
  8614. "application/json": {
  8615. "schema": {
  8616. "anyOf": [
  8617. {
  8618. "$ref": "#/components/schemas/InvalidCursorError"
  8619. },
  8620. {
  8621. "$ref": "#/components/schemas/InvalidRequestError"
  8622. }
  8623. ]
  8624. }
  8625. }
  8626. }
  8627. },
  8628. "401": {
  8629. "description": "UnauthorizedError",
  8630. "content": {
  8631. "application/json": {
  8632. "schema": {
  8633. "$ref": "#/components/schemas/UnauthorizedError"
  8634. }
  8635. }
  8636. }
  8637. },
  8638. "404": {
  8639. "description": "SessionNotFoundError",
  8640. "content": {
  8641. "application/json": {
  8642. "schema": {
  8643. "$ref": "#/components/schemas/SessionNotFoundError"
  8644. }
  8645. }
  8646. }
  8647. },
  8648. "500": {
  8649. "description": "UnknownError",
  8650. "content": {
  8651. "application/json": {
  8652. "schema": {
  8653. "$ref": "#/components/schemas/UnknownError1"
  8654. }
  8655. }
  8656. }
  8657. }
  8658. },
  8659. "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.",
  8660. "summary": "Get v2 session messages",
  8661. "x-codeSamples": [
  8662. {
  8663. "lang": "js",
  8664. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8665. }
  8666. ]
  8667. }
  8668. },
  8669. "/api/model": {
  8670. "get": {
  8671. "tags": ["v2 models"],
  8672. "operationId": "v2.model.list",
  8673. "parameters": [
  8674. {
  8675. "name": "location",
  8676. "in": "query",
  8677. "schema": {
  8678. "type": "object",
  8679. "properties": {
  8680. "directory": {
  8681. "type": "string"
  8682. },
  8683. "workspace": {
  8684. "type": "string"
  8685. }
  8686. },
  8687. "additionalProperties": false
  8688. },
  8689. "required": false,
  8690. "style": "deepObject",
  8691. "explode": true
  8692. }
  8693. ],
  8694. "security": [],
  8695. "responses": {
  8696. "200": {
  8697. "description": "Success",
  8698. "content": {
  8699. "application/json": {
  8700. "schema": {
  8701. "type": "array",
  8702. "items": {
  8703. "$ref": "#/components/schemas/ModelV2Info"
  8704. }
  8705. }
  8706. }
  8707. }
  8708. },
  8709. "400": {
  8710. "description": "InvalidRequestError",
  8711. "content": {
  8712. "application/json": {
  8713. "schema": {
  8714. "$ref": "#/components/schemas/InvalidRequestError"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "401": {
  8720. "description": "UnauthorizedError",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/UnauthorizedError"
  8725. }
  8726. }
  8727. }
  8728. },
  8729. "503": {
  8730. "description": "ServiceUnavailableError",
  8731. "content": {
  8732. "application/json": {
  8733. "schema": {
  8734. "$ref": "#/components/schemas/ServiceUnavailableError"
  8735. }
  8736. }
  8737. }
  8738. }
  8739. },
  8740. "description": "Retrieve available v2 models ordered by release date.",
  8741. "summary": "List v2 models",
  8742. "x-codeSamples": [
  8743. {
  8744. "lang": "js",
  8745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8746. }
  8747. ]
  8748. }
  8749. },
  8750. "/api/provider": {
  8751. "get": {
  8752. "tags": ["v2 providers"],
  8753. "operationId": "v2.provider.list",
  8754. "parameters": [
  8755. {
  8756. "name": "location",
  8757. "in": "query",
  8758. "schema": {
  8759. "type": "object",
  8760. "properties": {
  8761. "directory": {
  8762. "type": "string"
  8763. },
  8764. "workspace": {
  8765. "type": "string"
  8766. }
  8767. },
  8768. "additionalProperties": false
  8769. },
  8770. "required": false,
  8771. "style": "deepObject",
  8772. "explode": true
  8773. }
  8774. ],
  8775. "security": [],
  8776. "responses": {
  8777. "200": {
  8778. "description": "Success",
  8779. "content": {
  8780. "application/json": {
  8781. "schema": {
  8782. "type": "array",
  8783. "items": {
  8784. "$ref": "#/components/schemas/ProviderV2Info"
  8785. }
  8786. }
  8787. }
  8788. }
  8789. },
  8790. "400": {
  8791. "description": "InvalidRequestError",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "$ref": "#/components/schemas/InvalidRequestError"
  8796. }
  8797. }
  8798. }
  8799. },
  8800. "401": {
  8801. "description": "UnauthorizedError",
  8802. "content": {
  8803. "application/json": {
  8804. "schema": {
  8805. "$ref": "#/components/schemas/UnauthorizedError"
  8806. }
  8807. }
  8808. }
  8809. },
  8810. "503": {
  8811. "description": "ServiceUnavailableError",
  8812. "content": {
  8813. "application/json": {
  8814. "schema": {
  8815. "$ref": "#/components/schemas/ServiceUnavailableError"
  8816. }
  8817. }
  8818. }
  8819. }
  8820. },
  8821. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8822. "summary": "List v2 providers",
  8823. "x-codeSamples": [
  8824. {
  8825. "lang": "js",
  8826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8827. }
  8828. ]
  8829. }
  8830. },
  8831. "/api/provider/{providerID}": {
  8832. "get": {
  8833. "tags": ["v2 providers"],
  8834. "operationId": "v2.provider.get",
  8835. "parameters": [
  8836. {
  8837. "name": "providerID",
  8838. "in": "path",
  8839. "schema": {
  8840. "type": "string"
  8841. },
  8842. "required": true
  8843. },
  8844. {
  8845. "name": "location",
  8846. "in": "query",
  8847. "schema": {
  8848. "type": "object",
  8849. "properties": {
  8850. "directory": {
  8851. "type": "string"
  8852. },
  8853. "workspace": {
  8854. "type": "string"
  8855. }
  8856. },
  8857. "additionalProperties": false
  8858. },
  8859. "required": false,
  8860. "style": "deepObject",
  8861. "explode": true
  8862. }
  8863. ],
  8864. "security": [],
  8865. "responses": {
  8866. "200": {
  8867. "description": "ProviderV2.Info",
  8868. "content": {
  8869. "application/json": {
  8870. "schema": {
  8871. "$ref": "#/components/schemas/ProviderV2Info"
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "400": {
  8877. "description": "InvalidRequestError",
  8878. "content": {
  8879. "application/json": {
  8880. "schema": {
  8881. "$ref": "#/components/schemas/InvalidRequestError"
  8882. }
  8883. }
  8884. }
  8885. },
  8886. "401": {
  8887. "description": "UnauthorizedError",
  8888. "content": {
  8889. "application/json": {
  8890. "schema": {
  8891. "$ref": "#/components/schemas/UnauthorizedError"
  8892. }
  8893. }
  8894. }
  8895. },
  8896. "404": {
  8897. "description": "ProviderNotFoundError",
  8898. "content": {
  8899. "application/json": {
  8900. "schema": {
  8901. "$ref": "#/components/schemas/ProviderNotFoundError"
  8902. }
  8903. }
  8904. }
  8905. },
  8906. "503": {
  8907. "description": "ServiceUnavailableError",
  8908. "content": {
  8909. "application/json": {
  8910. "schema": {
  8911. "$ref": "#/components/schemas/ServiceUnavailableError"
  8912. }
  8913. }
  8914. }
  8915. }
  8916. },
  8917. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8918. "summary": "Get v2 provider",
  8919. "x-codeSamples": [
  8920. {
  8921. "lang": "js",
  8922. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  8923. }
  8924. ]
  8925. }
  8926. },
  8927. "/tui/append-prompt": {
  8928. "post": {
  8929. "tags": ["tui"],
  8930. "operationId": "tui.appendPrompt",
  8931. "parameters": [
  8932. {
  8933. "name": "directory",
  8934. "in": "query",
  8935. "schema": {
  8936. "type": "string"
  8937. },
  8938. "required": false
  8939. },
  8940. {
  8941. "name": "workspace",
  8942. "in": "query",
  8943. "schema": {
  8944. "type": "string"
  8945. },
  8946. "required": false
  8947. }
  8948. ],
  8949. "responses": {
  8950. "200": {
  8951. "description": "Prompt processed successfully",
  8952. "content": {
  8953. "application/json": {
  8954. "schema": {
  8955. "type": "boolean",
  8956. "description": "Prompt processed successfully"
  8957. }
  8958. }
  8959. }
  8960. },
  8961. "400": {
  8962. "description": "BadRequest | InvalidRequestError",
  8963. "content": {
  8964. "application/json": {
  8965. "schema": {
  8966. "anyOf": [
  8967. {
  8968. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8969. },
  8970. {
  8971. "$ref": "#/components/schemas/InvalidRequestError"
  8972. }
  8973. ]
  8974. }
  8975. }
  8976. }
  8977. }
  8978. },
  8979. "description": "Append prompt to the TUI.",
  8980. "summary": "Append TUI prompt",
  8981. "requestBody": {
  8982. "content": {
  8983. "application/json": {
  8984. "schema": {
  8985. "type": "object",
  8986. "properties": {
  8987. "text": {
  8988. "type": "string"
  8989. }
  8990. },
  8991. "required": ["text"],
  8992. "additionalProperties": false
  8993. }
  8994. }
  8995. }
  8996. },
  8997. "x-codeSamples": [
  8998. {
  8999. "lang": "js",
  9000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9001. }
  9002. ]
  9003. }
  9004. },
  9005. "/tui/open-help": {
  9006. "post": {
  9007. "tags": ["tui"],
  9008. "operationId": "tui.openHelp",
  9009. "parameters": [
  9010. {
  9011. "name": "directory",
  9012. "in": "query",
  9013. "schema": {
  9014. "type": "string"
  9015. },
  9016. "required": false
  9017. },
  9018. {
  9019. "name": "workspace",
  9020. "in": "query",
  9021. "schema": {
  9022. "type": "string"
  9023. },
  9024. "required": false
  9025. }
  9026. ],
  9027. "responses": {
  9028. "200": {
  9029. "description": "Help dialog opened successfully",
  9030. "content": {
  9031. "application/json": {
  9032. "schema": {
  9033. "type": "boolean",
  9034. "description": "Help dialog opened successfully"
  9035. }
  9036. }
  9037. }
  9038. },
  9039. "400": {
  9040. "description": "Bad request",
  9041. "content": {
  9042. "application/json": {
  9043. "schema": {
  9044. "$ref": "#/components/schemas/BadRequestError"
  9045. }
  9046. }
  9047. }
  9048. }
  9049. },
  9050. "description": "Open the help dialog in the TUI to display user assistance information.",
  9051. "summary": "Open help dialog",
  9052. "x-codeSamples": [
  9053. {
  9054. "lang": "js",
  9055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9056. }
  9057. ]
  9058. }
  9059. },
  9060. "/tui/open-sessions": {
  9061. "post": {
  9062. "tags": ["tui"],
  9063. "operationId": "tui.openSessions",
  9064. "parameters": [
  9065. {
  9066. "name": "directory",
  9067. "in": "query",
  9068. "schema": {
  9069. "type": "string"
  9070. },
  9071. "required": false
  9072. },
  9073. {
  9074. "name": "workspace",
  9075. "in": "query",
  9076. "schema": {
  9077. "type": "string"
  9078. },
  9079. "required": false
  9080. }
  9081. ],
  9082. "responses": {
  9083. "200": {
  9084. "description": "Session dialog opened successfully",
  9085. "content": {
  9086. "application/json": {
  9087. "schema": {
  9088. "type": "boolean",
  9089. "description": "Session dialog opened successfully"
  9090. }
  9091. }
  9092. }
  9093. },
  9094. "400": {
  9095. "description": "Bad request",
  9096. "content": {
  9097. "application/json": {
  9098. "schema": {
  9099. "$ref": "#/components/schemas/BadRequestError"
  9100. }
  9101. }
  9102. }
  9103. }
  9104. },
  9105. "description": "Open the session dialog.",
  9106. "summary": "Open sessions dialog",
  9107. "x-codeSamples": [
  9108. {
  9109. "lang": "js",
  9110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9111. }
  9112. ]
  9113. }
  9114. },
  9115. "/tui/open-themes": {
  9116. "post": {
  9117. "tags": ["tui"],
  9118. "operationId": "tui.openThemes",
  9119. "parameters": [
  9120. {
  9121. "name": "directory",
  9122. "in": "query",
  9123. "schema": {
  9124. "type": "string"
  9125. },
  9126. "required": false
  9127. },
  9128. {
  9129. "name": "workspace",
  9130. "in": "query",
  9131. "schema": {
  9132. "type": "string"
  9133. },
  9134. "required": false
  9135. }
  9136. ],
  9137. "responses": {
  9138. "200": {
  9139. "description": "Theme dialog opened successfully",
  9140. "content": {
  9141. "application/json": {
  9142. "schema": {
  9143. "type": "boolean",
  9144. "description": "Theme dialog opened successfully"
  9145. }
  9146. }
  9147. }
  9148. },
  9149. "400": {
  9150. "description": "Bad request",
  9151. "content": {
  9152. "application/json": {
  9153. "schema": {
  9154. "$ref": "#/components/schemas/BadRequestError"
  9155. }
  9156. }
  9157. }
  9158. }
  9159. },
  9160. "description": "Open the theme dialog.",
  9161. "summary": "Open themes dialog",
  9162. "x-codeSamples": [
  9163. {
  9164. "lang": "js",
  9165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9166. }
  9167. ]
  9168. }
  9169. },
  9170. "/tui/open-models": {
  9171. "post": {
  9172. "tags": ["tui"],
  9173. "operationId": "tui.openModels",
  9174. "parameters": [
  9175. {
  9176. "name": "directory",
  9177. "in": "query",
  9178. "schema": {
  9179. "type": "string"
  9180. },
  9181. "required": false
  9182. },
  9183. {
  9184. "name": "workspace",
  9185. "in": "query",
  9186. "schema": {
  9187. "type": "string"
  9188. },
  9189. "required": false
  9190. }
  9191. ],
  9192. "responses": {
  9193. "200": {
  9194. "description": "Model dialog opened successfully",
  9195. "content": {
  9196. "application/json": {
  9197. "schema": {
  9198. "type": "boolean",
  9199. "description": "Model dialog opened successfully"
  9200. }
  9201. }
  9202. }
  9203. },
  9204. "400": {
  9205. "description": "Bad request",
  9206. "content": {
  9207. "application/json": {
  9208. "schema": {
  9209. "$ref": "#/components/schemas/BadRequestError"
  9210. }
  9211. }
  9212. }
  9213. }
  9214. },
  9215. "description": "Open the model dialog.",
  9216. "summary": "Open models dialog",
  9217. "x-codeSamples": [
  9218. {
  9219. "lang": "js",
  9220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9221. }
  9222. ]
  9223. }
  9224. },
  9225. "/tui/submit-prompt": {
  9226. "post": {
  9227. "tags": ["tui"],
  9228. "operationId": "tui.submitPrompt",
  9229. "parameters": [
  9230. {
  9231. "name": "directory",
  9232. "in": "query",
  9233. "schema": {
  9234. "type": "string"
  9235. },
  9236. "required": false
  9237. },
  9238. {
  9239. "name": "workspace",
  9240. "in": "query",
  9241. "schema": {
  9242. "type": "string"
  9243. },
  9244. "required": false
  9245. }
  9246. ],
  9247. "responses": {
  9248. "200": {
  9249. "description": "Prompt submitted successfully",
  9250. "content": {
  9251. "application/json": {
  9252. "schema": {
  9253. "type": "boolean",
  9254. "description": "Prompt submitted successfully"
  9255. }
  9256. }
  9257. }
  9258. },
  9259. "400": {
  9260. "description": "Bad request",
  9261. "content": {
  9262. "application/json": {
  9263. "schema": {
  9264. "$ref": "#/components/schemas/BadRequestError"
  9265. }
  9266. }
  9267. }
  9268. }
  9269. },
  9270. "description": "Submit the prompt.",
  9271. "summary": "Submit TUI prompt",
  9272. "x-codeSamples": [
  9273. {
  9274. "lang": "js",
  9275. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9276. }
  9277. ]
  9278. }
  9279. },
  9280. "/tui/clear-prompt": {
  9281. "post": {
  9282. "tags": ["tui"],
  9283. "operationId": "tui.clearPrompt",
  9284. "parameters": [
  9285. {
  9286. "name": "directory",
  9287. "in": "query",
  9288. "schema": {
  9289. "type": "string"
  9290. },
  9291. "required": false
  9292. },
  9293. {
  9294. "name": "workspace",
  9295. "in": "query",
  9296. "schema": {
  9297. "type": "string"
  9298. },
  9299. "required": false
  9300. }
  9301. ],
  9302. "responses": {
  9303. "200": {
  9304. "description": "Prompt cleared successfully",
  9305. "content": {
  9306. "application/json": {
  9307. "schema": {
  9308. "type": "boolean",
  9309. "description": "Prompt cleared successfully"
  9310. }
  9311. }
  9312. }
  9313. },
  9314. "400": {
  9315. "description": "Bad request",
  9316. "content": {
  9317. "application/json": {
  9318. "schema": {
  9319. "$ref": "#/components/schemas/BadRequestError"
  9320. }
  9321. }
  9322. }
  9323. }
  9324. },
  9325. "description": "Clear the prompt.",
  9326. "summary": "Clear TUI prompt",
  9327. "x-codeSamples": [
  9328. {
  9329. "lang": "js",
  9330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9331. }
  9332. ]
  9333. }
  9334. },
  9335. "/tui/execute-command": {
  9336. "post": {
  9337. "tags": ["tui"],
  9338. "operationId": "tui.executeCommand",
  9339. "parameters": [
  9340. {
  9341. "name": "directory",
  9342. "in": "query",
  9343. "schema": {
  9344. "type": "string"
  9345. },
  9346. "required": false
  9347. },
  9348. {
  9349. "name": "workspace",
  9350. "in": "query",
  9351. "schema": {
  9352. "type": "string"
  9353. },
  9354. "required": false
  9355. }
  9356. ],
  9357. "responses": {
  9358. "200": {
  9359. "description": "Command executed successfully",
  9360. "content": {
  9361. "application/json": {
  9362. "schema": {
  9363. "type": "boolean",
  9364. "description": "Command executed successfully"
  9365. }
  9366. }
  9367. }
  9368. },
  9369. "400": {
  9370. "description": "BadRequest | InvalidRequestError",
  9371. "content": {
  9372. "application/json": {
  9373. "schema": {
  9374. "anyOf": [
  9375. {
  9376. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9377. },
  9378. {
  9379. "$ref": "#/components/schemas/InvalidRequestError"
  9380. }
  9381. ]
  9382. }
  9383. }
  9384. }
  9385. }
  9386. },
  9387. "description": "Execute a TUI command.",
  9388. "summary": "Execute TUI command",
  9389. "requestBody": {
  9390. "content": {
  9391. "application/json": {
  9392. "schema": {
  9393. "type": "object",
  9394. "properties": {
  9395. "command": {
  9396. "type": "string"
  9397. }
  9398. },
  9399. "required": ["command"],
  9400. "additionalProperties": false
  9401. }
  9402. }
  9403. }
  9404. },
  9405. "x-codeSamples": [
  9406. {
  9407. "lang": "js",
  9408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9409. }
  9410. ]
  9411. }
  9412. },
  9413. "/tui/show-toast": {
  9414. "post": {
  9415. "tags": ["tui"],
  9416. "operationId": "tui.showToast",
  9417. "parameters": [
  9418. {
  9419. "name": "directory",
  9420. "in": "query",
  9421. "schema": {
  9422. "type": "string"
  9423. },
  9424. "required": false
  9425. },
  9426. {
  9427. "name": "workspace",
  9428. "in": "query",
  9429. "schema": {
  9430. "type": "string"
  9431. },
  9432. "required": false
  9433. }
  9434. ],
  9435. "responses": {
  9436. "200": {
  9437. "description": "Toast notification shown successfully",
  9438. "content": {
  9439. "application/json": {
  9440. "schema": {
  9441. "type": "boolean",
  9442. "description": "Toast notification shown successfully"
  9443. }
  9444. }
  9445. }
  9446. },
  9447. "400": {
  9448. "description": "Bad request",
  9449. "content": {
  9450. "application/json": {
  9451. "schema": {
  9452. "$ref": "#/components/schemas/BadRequestError"
  9453. }
  9454. }
  9455. }
  9456. }
  9457. },
  9458. "description": "Show a toast notification in the TUI.",
  9459. "summary": "Show TUI toast",
  9460. "requestBody": {
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "type": "object",
  9465. "properties": {
  9466. "title": {
  9467. "type": "string"
  9468. },
  9469. "message": {
  9470. "type": "string"
  9471. },
  9472. "variant": {
  9473. "type": "string",
  9474. "enum": ["info", "success", "warning", "error"]
  9475. },
  9476. "duration": {
  9477. "type": "integer",
  9478. "exclusiveMinimum": 0
  9479. }
  9480. },
  9481. "required": ["message", "variant"],
  9482. "additionalProperties": false
  9483. }
  9484. }
  9485. }
  9486. },
  9487. "x-codeSamples": [
  9488. {
  9489. "lang": "js",
  9490. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9491. }
  9492. ]
  9493. }
  9494. },
  9495. "/tui/publish": {
  9496. "post": {
  9497. "tags": ["tui"],
  9498. "operationId": "tui.publish",
  9499. "parameters": [
  9500. {
  9501. "name": "directory",
  9502. "in": "query",
  9503. "schema": {
  9504. "type": "string"
  9505. },
  9506. "required": false
  9507. },
  9508. {
  9509. "name": "workspace",
  9510. "in": "query",
  9511. "schema": {
  9512. "type": "string"
  9513. },
  9514. "required": false
  9515. }
  9516. ],
  9517. "responses": {
  9518. "200": {
  9519. "description": "Event published successfully",
  9520. "content": {
  9521. "application/json": {
  9522. "schema": {
  9523. "type": "boolean",
  9524. "description": "Event published successfully"
  9525. }
  9526. }
  9527. }
  9528. },
  9529. "400": {
  9530. "description": "BadRequest | InvalidRequestError",
  9531. "content": {
  9532. "application/json": {
  9533. "schema": {
  9534. "anyOf": [
  9535. {
  9536. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9537. },
  9538. {
  9539. "$ref": "#/components/schemas/InvalidRequestError"
  9540. }
  9541. ]
  9542. }
  9543. }
  9544. }
  9545. }
  9546. },
  9547. "description": "Publish a TUI event.",
  9548. "summary": "Publish TUI event",
  9549. "requestBody": {
  9550. "content": {
  9551. "application/json": {
  9552. "schema": {
  9553. "anyOf": [
  9554. {
  9555. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9556. },
  9557. {
  9558. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/EventTuiToastShow"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. },
  9571. "x-codeSamples": [
  9572. {
  9573. "lang": "js",
  9574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9575. }
  9576. ]
  9577. }
  9578. },
  9579. "/tui/select-session": {
  9580. "post": {
  9581. "tags": ["tui"],
  9582. "operationId": "tui.selectSession",
  9583. "parameters": [
  9584. {
  9585. "name": "directory",
  9586. "in": "query",
  9587. "schema": {
  9588. "type": "string"
  9589. },
  9590. "required": false
  9591. },
  9592. {
  9593. "name": "workspace",
  9594. "in": "query",
  9595. "schema": {
  9596. "type": "string"
  9597. },
  9598. "required": false
  9599. }
  9600. ],
  9601. "responses": {
  9602. "200": {
  9603. "description": "Session selected successfully",
  9604. "content": {
  9605. "application/json": {
  9606. "schema": {
  9607. "type": "boolean",
  9608. "description": "Session selected successfully"
  9609. }
  9610. }
  9611. }
  9612. },
  9613. "400": {
  9614. "description": "BadRequest | InvalidRequestError",
  9615. "content": {
  9616. "application/json": {
  9617. "schema": {
  9618. "anyOf": [
  9619. {
  9620. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9621. },
  9622. {
  9623. "$ref": "#/components/schemas/InvalidRequestError"
  9624. }
  9625. ]
  9626. }
  9627. }
  9628. }
  9629. },
  9630. "404": {
  9631. "description": "NotFoundError",
  9632. "content": {
  9633. "application/json": {
  9634. "schema": {
  9635. "$ref": "#/components/schemas/NotFoundError"
  9636. }
  9637. }
  9638. }
  9639. }
  9640. },
  9641. "description": "Navigate the TUI to display the specified session.",
  9642. "summary": "Select session",
  9643. "requestBody": {
  9644. "content": {
  9645. "application/json": {
  9646. "schema": {
  9647. "type": "object",
  9648. "properties": {
  9649. "sessionID": {
  9650. "type": "string",
  9651. "pattern": "^ses",
  9652. "description": "Session ID to navigate to"
  9653. }
  9654. },
  9655. "required": ["sessionID"],
  9656. "additionalProperties": false
  9657. }
  9658. }
  9659. }
  9660. },
  9661. "x-codeSamples": [
  9662. {
  9663. "lang": "js",
  9664. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9665. }
  9666. ]
  9667. }
  9668. },
  9669. "/tui/control/next": {
  9670. "get": {
  9671. "tags": ["tui"],
  9672. "operationId": "tui.control.next",
  9673. "parameters": [
  9674. {
  9675. "name": "directory",
  9676. "in": "query",
  9677. "schema": {
  9678. "type": "string"
  9679. },
  9680. "required": false
  9681. },
  9682. {
  9683. "name": "workspace",
  9684. "in": "query",
  9685. "schema": {
  9686. "type": "string"
  9687. },
  9688. "required": false
  9689. }
  9690. ],
  9691. "responses": {
  9692. "200": {
  9693. "description": "Next TUI request",
  9694. "content": {
  9695. "application/json": {
  9696. "schema": {
  9697. "type": "object",
  9698. "properties": {
  9699. "path": {
  9700. "type": "string"
  9701. },
  9702. "body": {}
  9703. },
  9704. "required": ["path", "body"],
  9705. "additionalProperties": false,
  9706. "description": "Next TUI request"
  9707. }
  9708. }
  9709. }
  9710. },
  9711. "400": {
  9712. "description": "Bad request",
  9713. "content": {
  9714. "application/json": {
  9715. "schema": {
  9716. "$ref": "#/components/schemas/BadRequestError"
  9717. }
  9718. }
  9719. }
  9720. }
  9721. },
  9722. "description": "Retrieve the next TUI request from the queue for processing.",
  9723. "summary": "Get next TUI request",
  9724. "x-codeSamples": [
  9725. {
  9726. "lang": "js",
  9727. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9728. }
  9729. ]
  9730. }
  9731. },
  9732. "/tui/control/response": {
  9733. "post": {
  9734. "tags": ["tui"],
  9735. "operationId": "tui.control.response",
  9736. "parameters": [
  9737. {
  9738. "name": "directory",
  9739. "in": "query",
  9740. "schema": {
  9741. "type": "string"
  9742. },
  9743. "required": false
  9744. },
  9745. {
  9746. "name": "workspace",
  9747. "in": "query",
  9748. "schema": {
  9749. "type": "string"
  9750. },
  9751. "required": false
  9752. }
  9753. ],
  9754. "responses": {
  9755. "200": {
  9756. "description": "Response submitted successfully",
  9757. "content": {
  9758. "application/json": {
  9759. "schema": {
  9760. "type": "boolean",
  9761. "description": "Response submitted successfully"
  9762. }
  9763. }
  9764. }
  9765. },
  9766. "400": {
  9767. "description": "Bad request",
  9768. "content": {
  9769. "application/json": {
  9770. "schema": {
  9771. "$ref": "#/components/schemas/BadRequestError"
  9772. }
  9773. }
  9774. }
  9775. }
  9776. },
  9777. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9778. "summary": "Submit TUI response",
  9779. "requestBody": {
  9780. "content": {
  9781. "application/json": {
  9782. "schema": {}
  9783. }
  9784. }
  9785. },
  9786. "x-codeSamples": [
  9787. {
  9788. "lang": "js",
  9789. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9790. }
  9791. ]
  9792. }
  9793. },
  9794. "/experimental/workspace/adapter": {
  9795. "get": {
  9796. "tags": ["workspace"],
  9797. "operationId": "experimental.workspace.adapter.list",
  9798. "parameters": [
  9799. {
  9800. "name": "directory",
  9801. "in": "query",
  9802. "schema": {
  9803. "type": "string"
  9804. },
  9805. "required": false
  9806. },
  9807. {
  9808. "name": "workspace",
  9809. "in": "query",
  9810. "schema": {
  9811. "type": "string"
  9812. },
  9813. "required": false
  9814. }
  9815. ],
  9816. "responses": {
  9817. "200": {
  9818. "description": "Workspace adapters",
  9819. "content": {
  9820. "application/json": {
  9821. "schema": {
  9822. "type": "array",
  9823. "items": {
  9824. "type": "object",
  9825. "properties": {
  9826. "type": {
  9827. "type": "string"
  9828. },
  9829. "name": {
  9830. "type": "string"
  9831. },
  9832. "description": {
  9833. "type": "string"
  9834. }
  9835. },
  9836. "required": ["type", "name", "description"],
  9837. "additionalProperties": false
  9838. },
  9839. "description": "Workspace adapters"
  9840. }
  9841. }
  9842. }
  9843. },
  9844. "400": {
  9845. "description": "Bad request",
  9846. "content": {
  9847. "application/json": {
  9848. "schema": {
  9849. "$ref": "#/components/schemas/BadRequestError"
  9850. }
  9851. }
  9852. }
  9853. }
  9854. },
  9855. "description": "List all available workspace adapters for the current project.",
  9856. "summary": "List workspace adapters",
  9857. "x-codeSamples": [
  9858. {
  9859. "lang": "js",
  9860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9861. }
  9862. ]
  9863. }
  9864. },
  9865. "/experimental/workspace": {
  9866. "get": {
  9867. "tags": ["workspace"],
  9868. "operationId": "experimental.workspace.list",
  9869. "parameters": [
  9870. {
  9871. "name": "directory",
  9872. "in": "query",
  9873. "schema": {
  9874. "type": "string"
  9875. },
  9876. "required": false
  9877. },
  9878. {
  9879. "name": "workspace",
  9880. "in": "query",
  9881. "schema": {
  9882. "type": "string"
  9883. },
  9884. "required": false
  9885. }
  9886. ],
  9887. "responses": {
  9888. "200": {
  9889. "description": "Workspaces",
  9890. "content": {
  9891. "application/json": {
  9892. "schema": {
  9893. "type": "array",
  9894. "items": {
  9895. "$ref": "#/components/schemas/Workspace"
  9896. },
  9897. "description": "Workspaces"
  9898. }
  9899. }
  9900. }
  9901. },
  9902. "400": {
  9903. "description": "Bad request",
  9904. "content": {
  9905. "application/json": {
  9906. "schema": {
  9907. "$ref": "#/components/schemas/BadRequestError"
  9908. }
  9909. }
  9910. }
  9911. }
  9912. },
  9913. "description": "List all workspaces.",
  9914. "summary": "List workspaces",
  9915. "x-codeSamples": [
  9916. {
  9917. "lang": "js",
  9918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9919. }
  9920. ]
  9921. },
  9922. "post": {
  9923. "tags": ["workspace"],
  9924. "operationId": "experimental.workspace.create",
  9925. "parameters": [
  9926. {
  9927. "name": "directory",
  9928. "in": "query",
  9929. "schema": {
  9930. "type": "string"
  9931. },
  9932. "required": false
  9933. },
  9934. {
  9935. "name": "workspace",
  9936. "in": "query",
  9937. "schema": {
  9938. "type": "string"
  9939. },
  9940. "required": false
  9941. }
  9942. ],
  9943. "responses": {
  9944. "200": {
  9945. "description": "Workspace created",
  9946. "content": {
  9947. "application/json": {
  9948. "schema": {
  9949. "$ref": "#/components/schemas/Workspace"
  9950. }
  9951. }
  9952. }
  9953. },
  9954. "400": {
  9955. "description": "BadRequest | InvalidRequestError",
  9956. "content": {
  9957. "application/json": {
  9958. "schema": {
  9959. "anyOf": [
  9960. {
  9961. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9962. },
  9963. {
  9964. "$ref": "#/components/schemas/InvalidRequestError"
  9965. }
  9966. ]
  9967. }
  9968. }
  9969. }
  9970. }
  9971. },
  9972. "description": "Create a workspace for the current project.",
  9973. "summary": "Create workspace",
  9974. "requestBody": {
  9975. "content": {
  9976. "application/json": {
  9977. "schema": {
  9978. "type": "object",
  9979. "properties": {
  9980. "id": {
  9981. "type": "string",
  9982. "pattern": "^wrk"
  9983. },
  9984. "type": {
  9985. "type": "string"
  9986. },
  9987. "branch": {
  9988. "anyOf": [
  9989. {
  9990. "type": "string"
  9991. },
  9992. {
  9993. "type": "null"
  9994. }
  9995. ]
  9996. },
  9997. "extra": {
  9998. "anyOf": [
  9999. {},
  10000. {
  10001. "type": "null"
  10002. }
  10003. ]
  10004. }
  10005. },
  10006. "required": ["type"],
  10007. "additionalProperties": false
  10008. }
  10009. }
  10010. }
  10011. },
  10012. "x-codeSamples": [
  10013. {
  10014. "lang": "js",
  10015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10016. }
  10017. ]
  10018. }
  10019. },
  10020. "/experimental/workspace/sync-list": {
  10021. "post": {
  10022. "tags": ["workspace"],
  10023. "operationId": "experimental.workspace.syncList",
  10024. "parameters": [
  10025. {
  10026. "name": "directory",
  10027. "in": "query",
  10028. "schema": {
  10029. "type": "string"
  10030. },
  10031. "required": false
  10032. },
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string"
  10038. },
  10039. "required": false
  10040. }
  10041. ],
  10042. "responses": {
  10043. "204": {
  10044. "description": "Workspace list synced"
  10045. },
  10046. "400": {
  10047. "description": "Bad request",
  10048. "content": {
  10049. "application/json": {
  10050. "schema": {
  10051. "$ref": "#/components/schemas/BadRequestError"
  10052. }
  10053. }
  10054. }
  10055. }
  10056. },
  10057. "description": "Register missing workspaces returned by workspace adapters.",
  10058. "summary": "Sync workspace list",
  10059. "x-codeSamples": [
  10060. {
  10061. "lang": "js",
  10062. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10063. }
  10064. ]
  10065. }
  10066. },
  10067. "/experimental/workspace/status": {
  10068. "get": {
  10069. "tags": ["workspace"],
  10070. "operationId": "experimental.workspace.status",
  10071. "parameters": [
  10072. {
  10073. "name": "directory",
  10074. "in": "query",
  10075. "schema": {
  10076. "type": "string"
  10077. },
  10078. "required": false
  10079. },
  10080. {
  10081. "name": "workspace",
  10082. "in": "query",
  10083. "schema": {
  10084. "type": "string"
  10085. },
  10086. "required": false
  10087. }
  10088. ],
  10089. "responses": {
  10090. "200": {
  10091. "description": "Workspace status",
  10092. "content": {
  10093. "application/json": {
  10094. "schema": {
  10095. "type": "array",
  10096. "items": {
  10097. "type": "object",
  10098. "properties": {
  10099. "workspaceID": {
  10100. "type": "string",
  10101. "pattern": "^wrk"
  10102. },
  10103. "status": {
  10104. "type": "string",
  10105. "enum": ["connected", "connecting", "disconnected", "error"]
  10106. }
  10107. },
  10108. "required": ["workspaceID", "status"],
  10109. "additionalProperties": false
  10110. },
  10111. "description": "Workspace status"
  10112. }
  10113. }
  10114. }
  10115. },
  10116. "400": {
  10117. "description": "Bad request",
  10118. "content": {
  10119. "application/json": {
  10120. "schema": {
  10121. "$ref": "#/components/schemas/BadRequestError"
  10122. }
  10123. }
  10124. }
  10125. }
  10126. },
  10127. "description": "Get connection status for workspaces in the current project.",
  10128. "summary": "Workspace status",
  10129. "x-codeSamples": [
  10130. {
  10131. "lang": "js",
  10132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10133. }
  10134. ]
  10135. }
  10136. },
  10137. "/experimental/workspace/{id}": {
  10138. "delete": {
  10139. "tags": ["workspace"],
  10140. "operationId": "experimental.workspace.remove",
  10141. "parameters": [
  10142. {
  10143. "name": "id",
  10144. "in": "path",
  10145. "schema": {
  10146. "type": "string",
  10147. "pattern": "^wrk"
  10148. },
  10149. "required": true
  10150. },
  10151. {
  10152. "name": "directory",
  10153. "in": "query",
  10154. "schema": {
  10155. "type": "string"
  10156. },
  10157. "required": false
  10158. },
  10159. {
  10160. "name": "workspace",
  10161. "in": "query",
  10162. "schema": {
  10163. "type": "string"
  10164. },
  10165. "required": false
  10166. }
  10167. ],
  10168. "responses": {
  10169. "200": {
  10170. "description": "Workspace removed",
  10171. "content": {
  10172. "application/json": {
  10173. "schema": {
  10174. "$ref": "#/components/schemas/Workspace"
  10175. }
  10176. }
  10177. }
  10178. },
  10179. "400": {
  10180. "description": "BadRequest | InvalidRequestError",
  10181. "content": {
  10182. "application/json": {
  10183. "schema": {
  10184. "anyOf": [
  10185. {
  10186. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10187. },
  10188. {
  10189. "$ref": "#/components/schemas/InvalidRequestError"
  10190. }
  10191. ]
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Remove an existing workspace.",
  10198. "summary": "Remove workspace",
  10199. "x-codeSamples": [
  10200. {
  10201. "lang": "js",
  10202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10203. }
  10204. ]
  10205. }
  10206. },
  10207. "/experimental/workspace/warp": {
  10208. "post": {
  10209. "tags": ["workspace"],
  10210. "operationId": "experimental.workspace.warp",
  10211. "parameters": [
  10212. {
  10213. "name": "directory",
  10214. "in": "query",
  10215. "schema": {
  10216. "type": "string"
  10217. },
  10218. "required": false
  10219. },
  10220. {
  10221. "name": "workspace",
  10222. "in": "query",
  10223. "schema": {
  10224. "type": "string"
  10225. },
  10226. "required": false
  10227. }
  10228. ],
  10229. "responses": {
  10230. "204": {
  10231. "description": "Session warped"
  10232. },
  10233. "400": {
  10234. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10235. "content": {
  10236. "application/json": {
  10237. "schema": {
  10238. "anyOf": [
  10239. {
  10240. "$ref": "#/components/schemas/WorkspaceWarpError"
  10241. },
  10242. {
  10243. "$ref": "#/components/schemas/VcsApplyError"
  10244. },
  10245. {
  10246. "$ref": "#/components/schemas/InvalidRequestError"
  10247. }
  10248. ]
  10249. }
  10250. }
  10251. }
  10252. }
  10253. },
  10254. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10255. "summary": "Warp session into workspace",
  10256. "requestBody": {
  10257. "content": {
  10258. "application/json": {
  10259. "schema": {
  10260. "type": "object",
  10261. "properties": {
  10262. "id": {
  10263. "anyOf": [
  10264. {
  10265. "type": "string",
  10266. "pattern": "^wrk"
  10267. },
  10268. {
  10269. "type": "null"
  10270. }
  10271. ]
  10272. },
  10273. "sessionID": {
  10274. "type": "string",
  10275. "pattern": "^ses"
  10276. },
  10277. "copyChanges": {
  10278. "type": "boolean"
  10279. }
  10280. },
  10281. "required": ["id", "sessionID"],
  10282. "additionalProperties": false
  10283. }
  10284. }
  10285. }
  10286. },
  10287. "x-codeSamples": [
  10288. {
  10289. "lang": "js",
  10290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10291. }
  10292. ]
  10293. }
  10294. },
  10295. "/pty/{ptyID}/connect": {
  10296. "get": {
  10297. "tags": ["pty"],
  10298. "operationId": "pty.connect",
  10299. "parameters": [
  10300. {
  10301. "name": "ptyID",
  10302. "in": "path",
  10303. "schema": {
  10304. "type": "string",
  10305. "pattern": "^pty"
  10306. },
  10307. "required": true
  10308. },
  10309. {
  10310. "name": "directory",
  10311. "in": "query",
  10312. "schema": {
  10313. "type": "string"
  10314. },
  10315. "required": false
  10316. },
  10317. {
  10318. "name": "workspace",
  10319. "in": "query",
  10320. "schema": {
  10321. "type": "string"
  10322. },
  10323. "required": false
  10324. }
  10325. ],
  10326. "responses": {
  10327. "200": {
  10328. "description": "Connected session",
  10329. "content": {
  10330. "application/json": {
  10331. "schema": {
  10332. "type": "boolean",
  10333. "description": "Connected session"
  10334. }
  10335. }
  10336. }
  10337. },
  10338. "403": {
  10339. "description": "Forbidden",
  10340. "content": {
  10341. "application/json": {
  10342. "schema": {
  10343. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10344. }
  10345. }
  10346. }
  10347. },
  10348. "404": {
  10349. "description": "Not found",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/NotFoundError"
  10354. }
  10355. }
  10356. }
  10357. }
  10358. },
  10359. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10360. "summary": "Connect to PTY session",
  10361. "x-codeSamples": [
  10362. {
  10363. "lang": "js",
  10364. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10365. }
  10366. ]
  10367. }
  10368. }
  10369. },
  10370. "components": {
  10371. "schemas": {
  10372. "Event": {
  10373. "anyOf": [
  10374. {
  10375. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10376. },
  10377. {
  10378. "$ref": "#/components/schemas/Event.tui.command.execute"
  10379. },
  10380. {
  10381. "$ref": "#/components/schemas/EventTuiToastShow1"
  10382. },
  10383. {
  10384. "$ref": "#/components/schemas/Event.tui.session.select"
  10385. },
  10386. {
  10387. "$ref": "#/components/schemas/EventServerConnected"
  10388. },
  10389. {
  10390. "$ref": "#/components/schemas/EventGlobalDisposed"
  10391. },
  10392. {
  10393. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10394. },
  10395. {
  10396. "$ref": "#/components/schemas/EventFileEdited"
  10397. },
  10398. {
  10399. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10400. },
  10401. {
  10402. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10403. },
  10404. {
  10405. "$ref": "#/components/schemas/EventLspUpdated"
  10406. },
  10407. {
  10408. "$ref": "#/components/schemas/EventMessagePartDelta"
  10409. },
  10410. {
  10411. "$ref": "#/components/schemas/EventPermissionAsked"
  10412. },
  10413. {
  10414. "$ref": "#/components/schemas/EventPermissionReplied"
  10415. },
  10416. {
  10417. "$ref": "#/components/schemas/EventSessionDiff"
  10418. },
  10419. {
  10420. "$ref": "#/components/schemas/EventSessionError"
  10421. },
  10422. {
  10423. "$ref": "#/components/schemas/EventQuestionAsked"
  10424. },
  10425. {
  10426. "$ref": "#/components/schemas/EventQuestionReplied"
  10427. },
  10428. {
  10429. "$ref": "#/components/schemas/EventQuestionRejected"
  10430. },
  10431. {
  10432. "$ref": "#/components/schemas/EventTodoUpdated"
  10433. },
  10434. {
  10435. "$ref": "#/components/schemas/EventSessionStatus"
  10436. },
  10437. {
  10438. "$ref": "#/components/schemas/EventSessionIdle"
  10439. },
  10440. {
  10441. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10442. },
  10443. {
  10444. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10445. },
  10446. {
  10447. "$ref": "#/components/schemas/EventCommandExecuted"
  10448. },
  10449. {
  10450. "$ref": "#/components/schemas/EventProjectUpdated"
  10451. },
  10452. {
  10453. "$ref": "#/components/schemas/EventSessionCompacted"
  10454. },
  10455. {
  10456. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10457. },
  10458. {
  10459. "$ref": "#/components/schemas/EventWorkspaceReady"
  10460. },
  10461. {
  10462. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10463. },
  10464. {
  10465. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10466. },
  10467. {
  10468. "$ref": "#/components/schemas/EventWorktreeReady"
  10469. },
  10470. {
  10471. "$ref": "#/components/schemas/EventWorktreeFailed"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/EventPtyCreated"
  10475. },
  10476. {
  10477. "$ref": "#/components/schemas/EventPtyUpdated"
  10478. },
  10479. {
  10480. "$ref": "#/components/schemas/EventPtyExited"
  10481. },
  10482. {
  10483. "$ref": "#/components/schemas/EventPtyDeleted"
  10484. },
  10485. {
  10486. "$ref": "#/components/schemas/EventInstallationUpdated"
  10487. },
  10488. {
  10489. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10490. },
  10491. {
  10492. "$ref": "#/components/schemas/EventMessageUpdated"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/EventMessageRemoved"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventSessionCreated"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventSessionUpdated"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventSessionDeleted"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventSessionNextRetried"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventSessionNextRetried"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventAccountAdded"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventAccountRemoved"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventAccountSwitched"
  10682. }
  10683. ]
  10684. },
  10685. "OAuth": {
  10686. "type": "object",
  10687. "properties": {
  10688. "type": {
  10689. "type": "string",
  10690. "enum": ["oauth"]
  10691. },
  10692. "refresh": {
  10693. "type": "string"
  10694. },
  10695. "access": {
  10696. "type": "string"
  10697. },
  10698. "expires": {
  10699. "type": "integer",
  10700. "minimum": 0
  10701. },
  10702. "accountId": {
  10703. "type": "string"
  10704. },
  10705. "enterpriseUrl": {
  10706. "type": "string"
  10707. }
  10708. },
  10709. "required": ["type", "refresh", "access", "expires"],
  10710. "additionalProperties": false
  10711. },
  10712. "ApiAuth": {
  10713. "type": "object",
  10714. "properties": {
  10715. "type": {
  10716. "type": "string",
  10717. "enum": ["api"]
  10718. },
  10719. "key": {
  10720. "type": "string"
  10721. },
  10722. "metadata": {
  10723. "type": "object",
  10724. "additionalProperties": {
  10725. "type": "string"
  10726. }
  10727. }
  10728. },
  10729. "required": ["type", "key"],
  10730. "additionalProperties": false
  10731. },
  10732. "WellKnownAuth": {
  10733. "type": "object",
  10734. "properties": {
  10735. "type": {
  10736. "type": "string",
  10737. "enum": ["wellknown"]
  10738. },
  10739. "key": {
  10740. "type": "string"
  10741. },
  10742. "token": {
  10743. "type": "string"
  10744. }
  10745. },
  10746. "required": ["type", "key", "token"],
  10747. "additionalProperties": false
  10748. },
  10749. "Auth": {
  10750. "anyOf": [
  10751. {
  10752. "$ref": "#/components/schemas/OAuth"
  10753. },
  10754. {
  10755. "$ref": "#/components/schemas/ApiAuth"
  10756. },
  10757. {
  10758. "$ref": "#/components/schemas/WellKnownAuth"
  10759. }
  10760. ]
  10761. },
  10762. "effect_HttpApiError_BadRequest": {
  10763. "type": "object",
  10764. "properties": {
  10765. "_tag": {
  10766. "type": "string",
  10767. "enum": ["BadRequest"]
  10768. }
  10769. },
  10770. "required": ["_tag"],
  10771. "additionalProperties": false
  10772. },
  10773. "InvalidRequestError": {
  10774. "type": "object",
  10775. "properties": {
  10776. "_tag": {
  10777. "type": "string",
  10778. "enum": ["InvalidRequestError"]
  10779. },
  10780. "message": {
  10781. "type": "string"
  10782. },
  10783. "kind": {
  10784. "type": "string"
  10785. },
  10786. "field": {
  10787. "type": "string"
  10788. }
  10789. },
  10790. "required": ["_tag", "message"],
  10791. "additionalProperties": false
  10792. },
  10793. "Event.tui.prompt.append": {
  10794. "type": "object",
  10795. "properties": {
  10796. "id": {
  10797. "type": "string"
  10798. },
  10799. "type": {
  10800. "type": "string",
  10801. "enum": ["tui.prompt.append"]
  10802. },
  10803. "properties": {
  10804. "type": "object",
  10805. "properties": {
  10806. "text": {
  10807. "type": "string"
  10808. }
  10809. },
  10810. "required": ["text"],
  10811. "additionalProperties": false
  10812. }
  10813. },
  10814. "required": ["id", "type", "properties"],
  10815. "additionalProperties": false
  10816. },
  10817. "Event.tui.command.execute": {
  10818. "type": "object",
  10819. "properties": {
  10820. "id": {
  10821. "type": "string"
  10822. },
  10823. "type": {
  10824. "type": "string",
  10825. "enum": ["tui.command.execute"]
  10826. },
  10827. "properties": {
  10828. "type": "object",
  10829. "properties": {
  10830. "command": {
  10831. "anyOf": [
  10832. {
  10833. "type": "string",
  10834. "enum": [
  10835. "session.list",
  10836. "session.new",
  10837. "session.share",
  10838. "session.interrupt",
  10839. "session.compact",
  10840. "session.page.up",
  10841. "session.page.down",
  10842. "session.line.up",
  10843. "session.line.down",
  10844. "session.half.page.up",
  10845. "session.half.page.down",
  10846. "session.first",
  10847. "session.last",
  10848. "prompt.clear",
  10849. "prompt.submit",
  10850. "agent.cycle"
  10851. ]
  10852. },
  10853. {
  10854. "type": "string"
  10855. }
  10856. ]
  10857. }
  10858. },
  10859. "required": ["command"],
  10860. "additionalProperties": false
  10861. }
  10862. },
  10863. "required": ["id", "type", "properties"],
  10864. "additionalProperties": false
  10865. },
  10866. "Event.tui.toast.show": {
  10867. "type": "object",
  10868. "properties": {
  10869. "id": {
  10870. "type": "string"
  10871. },
  10872. "type": {
  10873. "type": "string",
  10874. "enum": ["tui.toast.show"]
  10875. },
  10876. "properties": {
  10877. "type": "object",
  10878. "properties": {
  10879. "title": {
  10880. "type": "string"
  10881. },
  10882. "message": {
  10883. "type": "string"
  10884. },
  10885. "variant": {
  10886. "type": "string",
  10887. "enum": ["info", "success", "warning", "error"]
  10888. },
  10889. "duration": {
  10890. "type": "integer",
  10891. "exclusiveMinimum": 0
  10892. }
  10893. },
  10894. "required": ["message", "variant"],
  10895. "additionalProperties": false
  10896. }
  10897. },
  10898. "required": ["id", "type", "properties"],
  10899. "additionalProperties": false
  10900. },
  10901. "Event.tui.session.select": {
  10902. "type": "object",
  10903. "properties": {
  10904. "id": {
  10905. "type": "string"
  10906. },
  10907. "type": {
  10908. "type": "string",
  10909. "enum": ["tui.session.select"]
  10910. },
  10911. "properties": {
  10912. "type": "object",
  10913. "properties": {
  10914. "sessionID": {
  10915. "type": "string",
  10916. "pattern": "^ses",
  10917. "description": "Session ID to navigate to"
  10918. }
  10919. },
  10920. "required": ["sessionID"],
  10921. "additionalProperties": false
  10922. }
  10923. },
  10924. "required": ["id", "type", "properties"],
  10925. "additionalProperties": false
  10926. },
  10927. "PermissionRequest": {
  10928. "type": "object",
  10929. "properties": {
  10930. "id": {
  10931. "type": "string",
  10932. "pattern": "^per"
  10933. },
  10934. "sessionID": {
  10935. "type": "string",
  10936. "pattern": "^ses"
  10937. },
  10938. "permission": {
  10939. "type": "string"
  10940. },
  10941. "patterns": {
  10942. "type": "array",
  10943. "items": {
  10944. "type": "string"
  10945. }
  10946. },
  10947. "metadata": {
  10948. "type": "object"
  10949. },
  10950. "always": {
  10951. "type": "array",
  10952. "items": {
  10953. "type": "string"
  10954. }
  10955. },
  10956. "tool": {
  10957. "type": "object",
  10958. "properties": {
  10959. "messageID": {
  10960. "type": "string",
  10961. "pattern": "^msg"
  10962. },
  10963. "callID": {
  10964. "type": "string"
  10965. }
  10966. },
  10967. "required": ["messageID", "callID"],
  10968. "additionalProperties": false
  10969. }
  10970. },
  10971. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  10972. "additionalProperties": false
  10973. },
  10974. "SnapshotFileDiff": {
  10975. "type": "object",
  10976. "properties": {
  10977. "file": {
  10978. "type": "string"
  10979. },
  10980. "patch": {
  10981. "type": "string"
  10982. },
  10983. "additions": {
  10984. "type": "number"
  10985. },
  10986. "deletions": {
  10987. "type": "number"
  10988. },
  10989. "status": {
  10990. "type": "string",
  10991. "enum": ["added", "deleted", "modified"]
  10992. }
  10993. },
  10994. "required": ["additions", "deletions"],
  10995. "additionalProperties": false
  10996. },
  10997. "ProviderAuthError": {
  10998. "type": "object",
  10999. "properties": {
  11000. "name": {
  11001. "type": "string",
  11002. "enum": ["ProviderAuthError"]
  11003. },
  11004. "data": {
  11005. "type": "object",
  11006. "properties": {
  11007. "providerID": {
  11008. "type": "string"
  11009. },
  11010. "message": {
  11011. "type": "string"
  11012. }
  11013. },
  11014. "required": ["providerID", "message"],
  11015. "additionalProperties": false
  11016. }
  11017. },
  11018. "required": ["name", "data"],
  11019. "additionalProperties": false
  11020. },
  11021. "UnknownError": {
  11022. "type": "object",
  11023. "properties": {
  11024. "name": {
  11025. "type": "string",
  11026. "enum": ["UnknownError"]
  11027. },
  11028. "data": {
  11029. "type": "object",
  11030. "properties": {
  11031. "message": {
  11032. "type": "string"
  11033. },
  11034. "ref": {
  11035. "type": "string"
  11036. }
  11037. },
  11038. "required": ["message"],
  11039. "additionalProperties": false
  11040. }
  11041. },
  11042. "required": ["name", "data"],
  11043. "additionalProperties": false
  11044. },
  11045. "MessageOutputLengthError": {
  11046. "type": "object",
  11047. "properties": {
  11048. "name": {
  11049. "type": "string",
  11050. "enum": ["MessageOutputLengthError"]
  11051. },
  11052. "data": {
  11053. "type": "object",
  11054. "properties": {}
  11055. }
  11056. },
  11057. "required": ["name", "data"],
  11058. "additionalProperties": false
  11059. },
  11060. "MessageAbortedError": {
  11061. "type": "object",
  11062. "properties": {
  11063. "name": {
  11064. "type": "string",
  11065. "enum": ["MessageAbortedError"]
  11066. },
  11067. "data": {
  11068. "type": "object",
  11069. "properties": {
  11070. "message": {
  11071. "type": "string"
  11072. }
  11073. },
  11074. "required": ["message"],
  11075. "additionalProperties": false
  11076. }
  11077. },
  11078. "required": ["name", "data"],
  11079. "additionalProperties": false
  11080. },
  11081. "StructuredOutputError": {
  11082. "type": "object",
  11083. "properties": {
  11084. "name": {
  11085. "type": "string",
  11086. "enum": ["StructuredOutputError"]
  11087. },
  11088. "data": {
  11089. "type": "object",
  11090. "properties": {
  11091. "message": {
  11092. "type": "string"
  11093. },
  11094. "retries": {
  11095. "type": "integer",
  11096. "minimum": 0
  11097. }
  11098. },
  11099. "required": ["message", "retries"],
  11100. "additionalProperties": false
  11101. }
  11102. },
  11103. "required": ["name", "data"],
  11104. "additionalProperties": false
  11105. },
  11106. "ContextOverflowError": {
  11107. "type": "object",
  11108. "properties": {
  11109. "name": {
  11110. "type": "string",
  11111. "enum": ["ContextOverflowError"]
  11112. },
  11113. "data": {
  11114. "type": "object",
  11115. "properties": {
  11116. "message": {
  11117. "type": "string"
  11118. },
  11119. "responseBody": {
  11120. "type": "string"
  11121. }
  11122. },
  11123. "required": ["message"],
  11124. "additionalProperties": false
  11125. }
  11126. },
  11127. "required": ["name", "data"],
  11128. "additionalProperties": false
  11129. },
  11130. "APIError": {
  11131. "type": "object",
  11132. "properties": {
  11133. "name": {
  11134. "type": "string",
  11135. "enum": ["APIError"]
  11136. },
  11137. "data": {
  11138. "type": "object",
  11139. "properties": {
  11140. "message": {
  11141. "type": "string"
  11142. },
  11143. "statusCode": {
  11144. "type": "integer",
  11145. "minimum": 0
  11146. },
  11147. "isRetryable": {
  11148. "type": "boolean"
  11149. },
  11150. "responseHeaders": {
  11151. "type": "object",
  11152. "additionalProperties": {
  11153. "type": "string"
  11154. }
  11155. },
  11156. "responseBody": {
  11157. "type": "string"
  11158. },
  11159. "metadata": {
  11160. "type": "object",
  11161. "additionalProperties": {
  11162. "type": "string"
  11163. }
  11164. }
  11165. },
  11166. "required": ["message", "isRetryable"],
  11167. "additionalProperties": false
  11168. }
  11169. },
  11170. "required": ["name", "data"],
  11171. "additionalProperties": false
  11172. },
  11173. "QuestionOption": {
  11174. "type": "object",
  11175. "properties": {
  11176. "label": {
  11177. "type": "string",
  11178. "description": "Display text (1-5 words, concise)"
  11179. },
  11180. "description": {
  11181. "type": "string",
  11182. "description": "Explanation of choice"
  11183. }
  11184. },
  11185. "required": ["label", "description"],
  11186. "additionalProperties": false
  11187. },
  11188. "QuestionInfo": {
  11189. "type": "object",
  11190. "properties": {
  11191. "question": {
  11192. "type": "string",
  11193. "description": "Complete question"
  11194. },
  11195. "header": {
  11196. "type": "string",
  11197. "description": "Very short label (max 30 chars)"
  11198. },
  11199. "options": {
  11200. "type": "array",
  11201. "items": {
  11202. "$ref": "#/components/schemas/QuestionOption"
  11203. },
  11204. "description": "Available choices"
  11205. },
  11206. "multiple": {
  11207. "type": "boolean"
  11208. },
  11209. "custom": {
  11210. "type": "boolean"
  11211. }
  11212. },
  11213. "required": ["question", "header", "options"],
  11214. "additionalProperties": false
  11215. },
  11216. "QuestionTool": {
  11217. "type": "object",
  11218. "properties": {
  11219. "messageID": {
  11220. "type": "string",
  11221. "pattern": "^msg"
  11222. },
  11223. "callID": {
  11224. "type": "string"
  11225. }
  11226. },
  11227. "required": ["messageID", "callID"],
  11228. "additionalProperties": false
  11229. },
  11230. "QuestionRequest": {
  11231. "type": "object",
  11232. "properties": {
  11233. "id": {
  11234. "type": "string",
  11235. "pattern": "^que"
  11236. },
  11237. "sessionID": {
  11238. "type": "string",
  11239. "pattern": "^ses"
  11240. },
  11241. "questions": {
  11242. "type": "array",
  11243. "items": {
  11244. "$ref": "#/components/schemas/QuestionInfo"
  11245. },
  11246. "description": "Questions to ask"
  11247. },
  11248. "tool": {
  11249. "$ref": "#/components/schemas/QuestionTool"
  11250. }
  11251. },
  11252. "required": ["id", "sessionID", "questions"],
  11253. "additionalProperties": false
  11254. },
  11255. "QuestionAnswer": {
  11256. "type": "array",
  11257. "items": {
  11258. "type": "string"
  11259. }
  11260. },
  11261. "QuestionReplied": {
  11262. "type": "object",
  11263. "properties": {
  11264. "sessionID": {
  11265. "type": "string",
  11266. "pattern": "^ses"
  11267. },
  11268. "requestID": {
  11269. "type": "string",
  11270. "pattern": "^que"
  11271. },
  11272. "answers": {
  11273. "type": "array",
  11274. "items": {
  11275. "$ref": "#/components/schemas/QuestionAnswer"
  11276. }
  11277. }
  11278. },
  11279. "required": ["sessionID", "requestID", "answers"],
  11280. "additionalProperties": false
  11281. },
  11282. "QuestionRejected": {
  11283. "type": "object",
  11284. "properties": {
  11285. "sessionID": {
  11286. "type": "string",
  11287. "pattern": "^ses"
  11288. },
  11289. "requestID": {
  11290. "type": "string",
  11291. "pattern": "^que"
  11292. }
  11293. },
  11294. "required": ["sessionID", "requestID"],
  11295. "additionalProperties": false
  11296. },
  11297. "Todo": {
  11298. "type": "object",
  11299. "properties": {
  11300. "content": {
  11301. "type": "string",
  11302. "description": "Brief description of the task"
  11303. },
  11304. "status": {
  11305. "type": "string",
  11306. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11307. },
  11308. "priority": {
  11309. "type": "string",
  11310. "description": "Priority level of the task: high, medium, low"
  11311. }
  11312. },
  11313. "required": ["content", "status", "priority"],
  11314. "additionalProperties": false
  11315. },
  11316. "SessionStatus": {
  11317. "anyOf": [
  11318. {
  11319. "type": "object",
  11320. "properties": {
  11321. "type": {
  11322. "type": "string",
  11323. "enum": ["idle"]
  11324. }
  11325. },
  11326. "required": ["type"],
  11327. "additionalProperties": false
  11328. },
  11329. {
  11330. "type": "object",
  11331. "properties": {
  11332. "type": {
  11333. "type": "string",
  11334. "enum": ["retry"]
  11335. },
  11336. "attempt": {
  11337. "type": "integer",
  11338. "minimum": 0
  11339. },
  11340. "message": {
  11341. "type": "string"
  11342. },
  11343. "action": {
  11344. "type": "object",
  11345. "properties": {
  11346. "reason": {
  11347. "type": "string"
  11348. },
  11349. "provider": {
  11350. "type": "string"
  11351. },
  11352. "title": {
  11353. "type": "string"
  11354. },
  11355. "message": {
  11356. "type": "string"
  11357. },
  11358. "label": {
  11359. "type": "string"
  11360. },
  11361. "link": {
  11362. "type": "string"
  11363. }
  11364. },
  11365. "required": ["reason", "provider", "title", "message", "label"],
  11366. "additionalProperties": false
  11367. },
  11368. "next": {
  11369. "type": "integer",
  11370. "minimum": 0
  11371. }
  11372. },
  11373. "required": ["type", "attempt", "message", "next"],
  11374. "additionalProperties": false
  11375. },
  11376. {
  11377. "type": "object",
  11378. "properties": {
  11379. "type": {
  11380. "type": "string",
  11381. "enum": ["busy"]
  11382. }
  11383. },
  11384. "required": ["type"],
  11385. "additionalProperties": false
  11386. }
  11387. ]
  11388. },
  11389. "Project": {
  11390. "type": "object",
  11391. "properties": {
  11392. "id": {
  11393. "type": "string"
  11394. },
  11395. "worktree": {
  11396. "type": "string"
  11397. },
  11398. "vcs": {
  11399. "type": "string",
  11400. "enum": ["git"]
  11401. },
  11402. "name": {
  11403. "type": "string"
  11404. },
  11405. "icon": {
  11406. "type": "object",
  11407. "properties": {
  11408. "url": {
  11409. "type": "string"
  11410. },
  11411. "override": {
  11412. "type": "string"
  11413. },
  11414. "color": {
  11415. "type": "string"
  11416. }
  11417. },
  11418. "additionalProperties": false
  11419. },
  11420. "commands": {
  11421. "type": "object",
  11422. "properties": {
  11423. "start": {
  11424. "type": "string",
  11425. "description": "Startup script to run when creating a new workspace (worktree)"
  11426. }
  11427. },
  11428. "additionalProperties": false
  11429. },
  11430. "time": {
  11431. "type": "object",
  11432. "properties": {
  11433. "created": {
  11434. "type": "integer",
  11435. "minimum": 0
  11436. },
  11437. "updated": {
  11438. "type": "integer",
  11439. "minimum": 0
  11440. },
  11441. "initialized": {
  11442. "type": "integer",
  11443. "minimum": 0
  11444. }
  11445. },
  11446. "required": ["created", "updated"],
  11447. "additionalProperties": false
  11448. },
  11449. "sandboxes": {
  11450. "type": "array",
  11451. "items": {
  11452. "type": "string"
  11453. }
  11454. }
  11455. },
  11456. "required": ["id", "worktree", "time", "sandboxes"],
  11457. "additionalProperties": false
  11458. },
  11459. "Pty": {
  11460. "type": "object",
  11461. "properties": {
  11462. "id": {
  11463. "type": "string",
  11464. "pattern": "^pty"
  11465. },
  11466. "title": {
  11467. "type": "string"
  11468. },
  11469. "command": {
  11470. "type": "string"
  11471. },
  11472. "args": {
  11473. "type": "array",
  11474. "items": {
  11475. "type": "string"
  11476. }
  11477. },
  11478. "cwd": {
  11479. "type": "string"
  11480. },
  11481. "status": {
  11482. "type": "string",
  11483. "enum": ["running", "exited"]
  11484. },
  11485. "pid": {
  11486. "type": "integer",
  11487. "exclusiveMinimum": 0
  11488. }
  11489. },
  11490. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11491. "additionalProperties": false
  11492. },
  11493. "OutputFormatText": {
  11494. "type": "object",
  11495. "properties": {
  11496. "type": {
  11497. "type": "string",
  11498. "enum": ["text"]
  11499. }
  11500. },
  11501. "required": ["type"],
  11502. "additionalProperties": false
  11503. },
  11504. "JSONSchema": {
  11505. "type": "object"
  11506. },
  11507. "OutputFormatJsonSchema": {
  11508. "type": "object",
  11509. "properties": {
  11510. "type": {
  11511. "type": "string",
  11512. "enum": ["json_schema"]
  11513. },
  11514. "schema": {
  11515. "$ref": "#/components/schemas/JSONSchema"
  11516. },
  11517. "retryCount": {
  11518. "type": "integer",
  11519. "minimum": 0
  11520. }
  11521. },
  11522. "required": ["type", "schema"],
  11523. "additionalProperties": false
  11524. },
  11525. "OutputFormat": {
  11526. "anyOf": [
  11527. {
  11528. "$ref": "#/components/schemas/OutputFormatText"
  11529. },
  11530. {
  11531. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11532. }
  11533. ]
  11534. },
  11535. "UserMessage": {
  11536. "type": "object",
  11537. "properties": {
  11538. "id": {
  11539. "type": "string",
  11540. "pattern": "^msg"
  11541. },
  11542. "sessionID": {
  11543. "type": "string",
  11544. "pattern": "^ses"
  11545. },
  11546. "role": {
  11547. "type": "string",
  11548. "enum": ["user"]
  11549. },
  11550. "time": {
  11551. "type": "object",
  11552. "properties": {
  11553. "created": {
  11554. "type": "integer",
  11555. "minimum": 0
  11556. }
  11557. },
  11558. "required": ["created"],
  11559. "additionalProperties": false
  11560. },
  11561. "format": {
  11562. "$ref": "#/components/schemas/OutputFormat"
  11563. },
  11564. "summary": {
  11565. "type": "object",
  11566. "properties": {
  11567. "title": {
  11568. "type": "string"
  11569. },
  11570. "body": {
  11571. "type": "string"
  11572. },
  11573. "diffs": {
  11574. "type": "array",
  11575. "items": {
  11576. "$ref": "#/components/schemas/SnapshotFileDiff"
  11577. }
  11578. }
  11579. },
  11580. "required": ["diffs"],
  11581. "additionalProperties": false
  11582. },
  11583. "agent": {
  11584. "type": "string"
  11585. },
  11586. "model": {
  11587. "type": "object",
  11588. "properties": {
  11589. "providerID": {
  11590. "type": "string"
  11591. },
  11592. "modelID": {
  11593. "type": "string"
  11594. },
  11595. "variant": {
  11596. "type": "string"
  11597. }
  11598. },
  11599. "required": ["providerID", "modelID"],
  11600. "additionalProperties": false
  11601. },
  11602. "system": {
  11603. "type": "string"
  11604. },
  11605. "tools": {
  11606. "type": "object",
  11607. "additionalProperties": {
  11608. "type": "boolean"
  11609. }
  11610. }
  11611. },
  11612. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11613. "additionalProperties": false
  11614. },
  11615. "AssistantMessage": {
  11616. "type": "object",
  11617. "properties": {
  11618. "id": {
  11619. "type": "string",
  11620. "pattern": "^msg"
  11621. },
  11622. "sessionID": {
  11623. "type": "string",
  11624. "pattern": "^ses"
  11625. },
  11626. "role": {
  11627. "type": "string",
  11628. "enum": ["assistant"]
  11629. },
  11630. "time": {
  11631. "type": "object",
  11632. "properties": {
  11633. "created": {
  11634. "type": "integer",
  11635. "minimum": 0
  11636. },
  11637. "completed": {
  11638. "type": "integer",
  11639. "minimum": 0
  11640. }
  11641. },
  11642. "required": ["created"],
  11643. "additionalProperties": false
  11644. },
  11645. "error": {
  11646. "anyOf": [
  11647. {
  11648. "$ref": "#/components/schemas/ProviderAuthError"
  11649. },
  11650. {
  11651. "$ref": "#/components/schemas/UnknownError"
  11652. },
  11653. {
  11654. "$ref": "#/components/schemas/MessageOutputLengthError"
  11655. },
  11656. {
  11657. "$ref": "#/components/schemas/MessageAbortedError"
  11658. },
  11659. {
  11660. "$ref": "#/components/schemas/StructuredOutputError"
  11661. },
  11662. {
  11663. "$ref": "#/components/schemas/ContextOverflowError"
  11664. },
  11665. {
  11666. "$ref": "#/components/schemas/APIError"
  11667. }
  11668. ]
  11669. },
  11670. "parentID": {
  11671. "type": "string",
  11672. "pattern": "^msg"
  11673. },
  11674. "modelID": {
  11675. "type": "string"
  11676. },
  11677. "providerID": {
  11678. "type": "string"
  11679. },
  11680. "mode": {
  11681. "type": "string"
  11682. },
  11683. "agent": {
  11684. "type": "string"
  11685. },
  11686. "path": {
  11687. "type": "object",
  11688. "properties": {
  11689. "cwd": {
  11690. "type": "string"
  11691. },
  11692. "root": {
  11693. "type": "string"
  11694. }
  11695. },
  11696. "required": ["cwd", "root"],
  11697. "additionalProperties": false
  11698. },
  11699. "summary": {
  11700. "type": "boolean"
  11701. },
  11702. "cost": {
  11703. "type": "number"
  11704. },
  11705. "tokens": {
  11706. "type": "object",
  11707. "properties": {
  11708. "total": {
  11709. "type": "number"
  11710. },
  11711. "input": {
  11712. "type": "number"
  11713. },
  11714. "output": {
  11715. "type": "number"
  11716. },
  11717. "reasoning": {
  11718. "type": "number"
  11719. },
  11720. "cache": {
  11721. "type": "object",
  11722. "properties": {
  11723. "read": {
  11724. "type": "number"
  11725. },
  11726. "write": {
  11727. "type": "number"
  11728. }
  11729. },
  11730. "required": ["read", "write"],
  11731. "additionalProperties": false
  11732. }
  11733. },
  11734. "required": ["input", "output", "reasoning", "cache"],
  11735. "additionalProperties": false
  11736. },
  11737. "structured": {},
  11738. "variant": {
  11739. "type": "string"
  11740. },
  11741. "finish": {
  11742. "type": "string"
  11743. }
  11744. },
  11745. "required": [
  11746. "id",
  11747. "sessionID",
  11748. "role",
  11749. "time",
  11750. "parentID",
  11751. "modelID",
  11752. "providerID",
  11753. "mode",
  11754. "agent",
  11755. "path",
  11756. "cost",
  11757. "tokens"
  11758. ],
  11759. "additionalProperties": false
  11760. },
  11761. "Message": {
  11762. "anyOf": [
  11763. {
  11764. "$ref": "#/components/schemas/UserMessage"
  11765. },
  11766. {
  11767. "$ref": "#/components/schemas/AssistantMessage"
  11768. }
  11769. ]
  11770. },
  11771. "TextPart": {
  11772. "type": "object",
  11773. "properties": {
  11774. "id": {
  11775. "type": "string",
  11776. "pattern": "^prt"
  11777. },
  11778. "sessionID": {
  11779. "type": "string",
  11780. "pattern": "^ses"
  11781. },
  11782. "messageID": {
  11783. "type": "string",
  11784. "pattern": "^msg"
  11785. },
  11786. "type": {
  11787. "type": "string",
  11788. "enum": ["text"]
  11789. },
  11790. "text": {
  11791. "type": "string"
  11792. },
  11793. "synthetic": {
  11794. "type": "boolean"
  11795. },
  11796. "ignored": {
  11797. "type": "boolean"
  11798. },
  11799. "time": {
  11800. "type": "object",
  11801. "properties": {
  11802. "start": {
  11803. "type": "integer",
  11804. "minimum": 0
  11805. },
  11806. "end": {
  11807. "type": "integer",
  11808. "minimum": 0
  11809. }
  11810. },
  11811. "required": ["start"],
  11812. "additionalProperties": false
  11813. },
  11814. "metadata": {
  11815. "type": "object"
  11816. }
  11817. },
  11818. "required": ["id", "sessionID", "messageID", "type", "text"],
  11819. "additionalProperties": false
  11820. },
  11821. "SubtaskPart": {
  11822. "type": "object",
  11823. "properties": {
  11824. "id": {
  11825. "type": "string",
  11826. "pattern": "^prt"
  11827. },
  11828. "sessionID": {
  11829. "type": "string",
  11830. "pattern": "^ses"
  11831. },
  11832. "messageID": {
  11833. "type": "string",
  11834. "pattern": "^msg"
  11835. },
  11836. "type": {
  11837. "type": "string",
  11838. "enum": ["subtask"]
  11839. },
  11840. "prompt": {
  11841. "type": "string"
  11842. },
  11843. "description": {
  11844. "type": "string"
  11845. },
  11846. "agent": {
  11847. "type": "string"
  11848. },
  11849. "model": {
  11850. "type": "object",
  11851. "properties": {
  11852. "providerID": {
  11853. "type": "string"
  11854. },
  11855. "modelID": {
  11856. "type": "string"
  11857. }
  11858. },
  11859. "required": ["providerID", "modelID"],
  11860. "additionalProperties": false
  11861. },
  11862. "command": {
  11863. "type": "string"
  11864. }
  11865. },
  11866. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11867. "additionalProperties": false
  11868. },
  11869. "ReasoningPart": {
  11870. "type": "object",
  11871. "properties": {
  11872. "id": {
  11873. "type": "string",
  11874. "pattern": "^prt"
  11875. },
  11876. "sessionID": {
  11877. "type": "string",
  11878. "pattern": "^ses"
  11879. },
  11880. "messageID": {
  11881. "type": "string",
  11882. "pattern": "^msg"
  11883. },
  11884. "type": {
  11885. "type": "string",
  11886. "enum": ["reasoning"]
  11887. },
  11888. "text": {
  11889. "type": "string"
  11890. },
  11891. "metadata": {
  11892. "type": "object"
  11893. },
  11894. "time": {
  11895. "type": "object",
  11896. "properties": {
  11897. "start": {
  11898. "type": "integer",
  11899. "minimum": 0
  11900. },
  11901. "end": {
  11902. "type": "integer",
  11903. "minimum": 0
  11904. }
  11905. },
  11906. "required": ["start"],
  11907. "additionalProperties": false
  11908. }
  11909. },
  11910. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11911. "additionalProperties": false
  11912. },
  11913. "FilePartSourceText": {
  11914. "type": "object",
  11915. "properties": {
  11916. "value": {
  11917. "type": "string"
  11918. },
  11919. "start": {
  11920. "type": "number"
  11921. },
  11922. "end": {
  11923. "type": "number"
  11924. }
  11925. },
  11926. "required": ["value", "start", "end"],
  11927. "additionalProperties": false
  11928. },
  11929. "FileSource": {
  11930. "type": "object",
  11931. "properties": {
  11932. "text": {
  11933. "$ref": "#/components/schemas/FilePartSourceText"
  11934. },
  11935. "type": {
  11936. "type": "string",
  11937. "enum": ["file"]
  11938. },
  11939. "path": {
  11940. "type": "string"
  11941. }
  11942. },
  11943. "required": ["text", "type", "path"],
  11944. "additionalProperties": false
  11945. },
  11946. "Range": {
  11947. "type": "object",
  11948. "properties": {
  11949. "start": {
  11950. "type": "object",
  11951. "properties": {
  11952. "line": {
  11953. "type": "integer",
  11954. "minimum": 0
  11955. },
  11956. "character": {
  11957. "type": "integer",
  11958. "minimum": 0
  11959. }
  11960. },
  11961. "required": ["line", "character"],
  11962. "additionalProperties": false
  11963. },
  11964. "end": {
  11965. "type": "object",
  11966. "properties": {
  11967. "line": {
  11968. "type": "integer",
  11969. "minimum": 0
  11970. },
  11971. "character": {
  11972. "type": "integer",
  11973. "minimum": 0
  11974. }
  11975. },
  11976. "required": ["line", "character"],
  11977. "additionalProperties": false
  11978. }
  11979. },
  11980. "required": ["start", "end"],
  11981. "additionalProperties": false
  11982. },
  11983. "SymbolSource": {
  11984. "type": "object",
  11985. "properties": {
  11986. "text": {
  11987. "$ref": "#/components/schemas/FilePartSourceText"
  11988. },
  11989. "type": {
  11990. "type": "string",
  11991. "enum": ["symbol"]
  11992. },
  11993. "path": {
  11994. "type": "string"
  11995. },
  11996. "range": {
  11997. "$ref": "#/components/schemas/Range"
  11998. },
  11999. "name": {
  12000. "type": "string"
  12001. },
  12002. "kind": {
  12003. "type": "integer",
  12004. "minimum": 0
  12005. }
  12006. },
  12007. "required": ["text", "type", "path", "range", "name", "kind"],
  12008. "additionalProperties": false
  12009. },
  12010. "ResourceSource": {
  12011. "type": "object",
  12012. "properties": {
  12013. "text": {
  12014. "$ref": "#/components/schemas/FilePartSourceText"
  12015. },
  12016. "type": {
  12017. "type": "string",
  12018. "enum": ["resource"]
  12019. },
  12020. "clientName": {
  12021. "type": "string"
  12022. },
  12023. "uri": {
  12024. "type": "string"
  12025. }
  12026. },
  12027. "required": ["text", "type", "clientName", "uri"],
  12028. "additionalProperties": false
  12029. },
  12030. "FilePartSource": {
  12031. "anyOf": [
  12032. {
  12033. "$ref": "#/components/schemas/FileSource"
  12034. },
  12035. {
  12036. "$ref": "#/components/schemas/SymbolSource"
  12037. },
  12038. {
  12039. "$ref": "#/components/schemas/ResourceSource"
  12040. }
  12041. ]
  12042. },
  12043. "FilePart": {
  12044. "type": "object",
  12045. "properties": {
  12046. "id": {
  12047. "type": "string",
  12048. "pattern": "^prt"
  12049. },
  12050. "sessionID": {
  12051. "type": "string",
  12052. "pattern": "^ses"
  12053. },
  12054. "messageID": {
  12055. "type": "string",
  12056. "pattern": "^msg"
  12057. },
  12058. "type": {
  12059. "type": "string",
  12060. "enum": ["file"]
  12061. },
  12062. "mime": {
  12063. "type": "string"
  12064. },
  12065. "filename": {
  12066. "type": "string"
  12067. },
  12068. "url": {
  12069. "type": "string"
  12070. },
  12071. "source": {
  12072. "$ref": "#/components/schemas/FilePartSource"
  12073. }
  12074. },
  12075. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12076. "additionalProperties": false
  12077. },
  12078. "ToolStatePending": {
  12079. "type": "object",
  12080. "properties": {
  12081. "status": {
  12082. "type": "string",
  12083. "enum": ["pending"]
  12084. },
  12085. "input": {
  12086. "type": "object"
  12087. },
  12088. "raw": {
  12089. "type": "string"
  12090. }
  12091. },
  12092. "required": ["status", "input", "raw"],
  12093. "additionalProperties": false
  12094. },
  12095. "ToolStateRunning": {
  12096. "type": "object",
  12097. "properties": {
  12098. "status": {
  12099. "type": "string",
  12100. "enum": ["running"]
  12101. },
  12102. "input": {
  12103. "type": "object"
  12104. },
  12105. "title": {
  12106. "type": "string"
  12107. },
  12108. "metadata": {
  12109. "type": "object"
  12110. },
  12111. "time": {
  12112. "type": "object",
  12113. "properties": {
  12114. "start": {
  12115. "type": "integer",
  12116. "minimum": 0
  12117. }
  12118. },
  12119. "required": ["start"],
  12120. "additionalProperties": false
  12121. }
  12122. },
  12123. "required": ["status", "input", "time"],
  12124. "additionalProperties": false
  12125. },
  12126. "ToolStateCompleted": {
  12127. "type": "object",
  12128. "properties": {
  12129. "status": {
  12130. "type": "string",
  12131. "enum": ["completed"]
  12132. },
  12133. "input": {
  12134. "type": "object"
  12135. },
  12136. "output": {
  12137. "type": "string"
  12138. },
  12139. "title": {
  12140. "type": "string"
  12141. },
  12142. "metadata": {
  12143. "type": "object"
  12144. },
  12145. "time": {
  12146. "type": "object",
  12147. "properties": {
  12148. "start": {
  12149. "type": "integer",
  12150. "minimum": 0
  12151. },
  12152. "end": {
  12153. "type": "integer",
  12154. "minimum": 0
  12155. },
  12156. "compacted": {
  12157. "type": "integer",
  12158. "minimum": 0
  12159. }
  12160. },
  12161. "required": ["start", "end"],
  12162. "additionalProperties": false
  12163. },
  12164. "attachments": {
  12165. "type": "array",
  12166. "items": {
  12167. "$ref": "#/components/schemas/FilePart"
  12168. }
  12169. }
  12170. },
  12171. "required": ["status", "input", "output", "title", "metadata", "time"],
  12172. "additionalProperties": false
  12173. },
  12174. "ToolStateError": {
  12175. "type": "object",
  12176. "properties": {
  12177. "status": {
  12178. "type": "string",
  12179. "enum": ["error"]
  12180. },
  12181. "input": {
  12182. "type": "object"
  12183. },
  12184. "error": {
  12185. "type": "string"
  12186. },
  12187. "metadata": {
  12188. "type": "object"
  12189. },
  12190. "time": {
  12191. "type": "object",
  12192. "properties": {
  12193. "start": {
  12194. "type": "integer",
  12195. "minimum": 0
  12196. },
  12197. "end": {
  12198. "type": "integer",
  12199. "minimum": 0
  12200. }
  12201. },
  12202. "required": ["start", "end"],
  12203. "additionalProperties": false
  12204. }
  12205. },
  12206. "required": ["status", "input", "error", "time"],
  12207. "additionalProperties": false
  12208. },
  12209. "ToolState": {
  12210. "anyOf": [
  12211. {
  12212. "$ref": "#/components/schemas/ToolStatePending"
  12213. },
  12214. {
  12215. "$ref": "#/components/schemas/ToolStateRunning"
  12216. },
  12217. {
  12218. "$ref": "#/components/schemas/ToolStateCompleted"
  12219. },
  12220. {
  12221. "$ref": "#/components/schemas/ToolStateError"
  12222. }
  12223. ]
  12224. },
  12225. "ToolPart": {
  12226. "type": "object",
  12227. "properties": {
  12228. "id": {
  12229. "type": "string",
  12230. "pattern": "^prt"
  12231. },
  12232. "sessionID": {
  12233. "type": "string",
  12234. "pattern": "^ses"
  12235. },
  12236. "messageID": {
  12237. "type": "string",
  12238. "pattern": "^msg"
  12239. },
  12240. "type": {
  12241. "type": "string",
  12242. "enum": ["tool"]
  12243. },
  12244. "callID": {
  12245. "type": "string"
  12246. },
  12247. "tool": {
  12248. "type": "string"
  12249. },
  12250. "state": {
  12251. "$ref": "#/components/schemas/ToolState"
  12252. },
  12253. "metadata": {
  12254. "type": "object"
  12255. }
  12256. },
  12257. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12258. "additionalProperties": false
  12259. },
  12260. "StepStartPart": {
  12261. "type": "object",
  12262. "properties": {
  12263. "id": {
  12264. "type": "string",
  12265. "pattern": "^prt"
  12266. },
  12267. "sessionID": {
  12268. "type": "string",
  12269. "pattern": "^ses"
  12270. },
  12271. "messageID": {
  12272. "type": "string",
  12273. "pattern": "^msg"
  12274. },
  12275. "type": {
  12276. "type": "string",
  12277. "enum": ["step-start"]
  12278. },
  12279. "snapshot": {
  12280. "type": "string"
  12281. }
  12282. },
  12283. "required": ["id", "sessionID", "messageID", "type"],
  12284. "additionalProperties": false
  12285. },
  12286. "StepFinishPart": {
  12287. "type": "object",
  12288. "properties": {
  12289. "id": {
  12290. "type": "string",
  12291. "pattern": "^prt"
  12292. },
  12293. "sessionID": {
  12294. "type": "string",
  12295. "pattern": "^ses"
  12296. },
  12297. "messageID": {
  12298. "type": "string",
  12299. "pattern": "^msg"
  12300. },
  12301. "type": {
  12302. "type": "string",
  12303. "enum": ["step-finish"]
  12304. },
  12305. "reason": {
  12306. "type": "string"
  12307. },
  12308. "snapshot": {
  12309. "type": "string"
  12310. },
  12311. "cost": {
  12312. "type": "number"
  12313. },
  12314. "tokens": {
  12315. "type": "object",
  12316. "properties": {
  12317. "total": {
  12318. "type": "number"
  12319. },
  12320. "input": {
  12321. "type": "number"
  12322. },
  12323. "output": {
  12324. "type": "number"
  12325. },
  12326. "reasoning": {
  12327. "type": "number"
  12328. },
  12329. "cache": {
  12330. "type": "object",
  12331. "properties": {
  12332. "read": {
  12333. "type": "number"
  12334. },
  12335. "write": {
  12336. "type": "number"
  12337. }
  12338. },
  12339. "required": ["read", "write"],
  12340. "additionalProperties": false
  12341. }
  12342. },
  12343. "required": ["input", "output", "reasoning", "cache"],
  12344. "additionalProperties": false
  12345. }
  12346. },
  12347. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12348. "additionalProperties": false
  12349. },
  12350. "SnapshotPart": {
  12351. "type": "object",
  12352. "properties": {
  12353. "id": {
  12354. "type": "string",
  12355. "pattern": "^prt"
  12356. },
  12357. "sessionID": {
  12358. "type": "string",
  12359. "pattern": "^ses"
  12360. },
  12361. "messageID": {
  12362. "type": "string",
  12363. "pattern": "^msg"
  12364. },
  12365. "type": {
  12366. "type": "string",
  12367. "enum": ["snapshot"]
  12368. },
  12369. "snapshot": {
  12370. "type": "string"
  12371. }
  12372. },
  12373. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12374. "additionalProperties": false
  12375. },
  12376. "PatchPart": {
  12377. "type": "object",
  12378. "properties": {
  12379. "id": {
  12380. "type": "string",
  12381. "pattern": "^prt"
  12382. },
  12383. "sessionID": {
  12384. "type": "string",
  12385. "pattern": "^ses"
  12386. },
  12387. "messageID": {
  12388. "type": "string",
  12389. "pattern": "^msg"
  12390. },
  12391. "type": {
  12392. "type": "string",
  12393. "enum": ["patch"]
  12394. },
  12395. "hash": {
  12396. "type": "string"
  12397. },
  12398. "files": {
  12399. "type": "array",
  12400. "items": {
  12401. "type": "string"
  12402. }
  12403. }
  12404. },
  12405. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12406. "additionalProperties": false
  12407. },
  12408. "AgentPart": {
  12409. "type": "object",
  12410. "properties": {
  12411. "id": {
  12412. "type": "string",
  12413. "pattern": "^prt"
  12414. },
  12415. "sessionID": {
  12416. "type": "string",
  12417. "pattern": "^ses"
  12418. },
  12419. "messageID": {
  12420. "type": "string",
  12421. "pattern": "^msg"
  12422. },
  12423. "type": {
  12424. "type": "string",
  12425. "enum": ["agent"]
  12426. },
  12427. "name": {
  12428. "type": "string"
  12429. },
  12430. "source": {
  12431. "type": "object",
  12432. "properties": {
  12433. "value": {
  12434. "type": "string"
  12435. },
  12436. "start": {
  12437. "type": "integer",
  12438. "minimum": 0
  12439. },
  12440. "end": {
  12441. "type": "integer",
  12442. "minimum": 0
  12443. }
  12444. },
  12445. "required": ["value", "start", "end"],
  12446. "additionalProperties": false
  12447. }
  12448. },
  12449. "required": ["id", "sessionID", "messageID", "type", "name"],
  12450. "additionalProperties": false
  12451. },
  12452. "RetryPart": {
  12453. "type": "object",
  12454. "properties": {
  12455. "id": {
  12456. "type": "string",
  12457. "pattern": "^prt"
  12458. },
  12459. "sessionID": {
  12460. "type": "string",
  12461. "pattern": "^ses"
  12462. },
  12463. "messageID": {
  12464. "type": "string",
  12465. "pattern": "^msg"
  12466. },
  12467. "type": {
  12468. "type": "string",
  12469. "enum": ["retry"]
  12470. },
  12471. "attempt": {
  12472. "type": "integer",
  12473. "minimum": 0
  12474. },
  12475. "error": {
  12476. "$ref": "#/components/schemas/APIError"
  12477. },
  12478. "time": {
  12479. "type": "object",
  12480. "properties": {
  12481. "created": {
  12482. "type": "integer",
  12483. "minimum": 0
  12484. }
  12485. },
  12486. "required": ["created"],
  12487. "additionalProperties": false
  12488. }
  12489. },
  12490. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12491. "additionalProperties": false
  12492. },
  12493. "CompactionPart": {
  12494. "type": "object",
  12495. "properties": {
  12496. "id": {
  12497. "type": "string",
  12498. "pattern": "^prt"
  12499. },
  12500. "sessionID": {
  12501. "type": "string",
  12502. "pattern": "^ses"
  12503. },
  12504. "messageID": {
  12505. "type": "string",
  12506. "pattern": "^msg"
  12507. },
  12508. "type": {
  12509. "type": "string",
  12510. "enum": ["compaction"]
  12511. },
  12512. "auto": {
  12513. "type": "boolean"
  12514. },
  12515. "overflow": {
  12516. "type": "boolean"
  12517. },
  12518. "tail_start_id": {
  12519. "type": "string",
  12520. "pattern": "^msg"
  12521. }
  12522. },
  12523. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12524. "additionalProperties": false
  12525. },
  12526. "Part": {
  12527. "anyOf": [
  12528. {
  12529. "$ref": "#/components/schemas/TextPart"
  12530. },
  12531. {
  12532. "$ref": "#/components/schemas/SubtaskPart"
  12533. },
  12534. {
  12535. "$ref": "#/components/schemas/ReasoningPart"
  12536. },
  12537. {
  12538. "$ref": "#/components/schemas/FilePart"
  12539. },
  12540. {
  12541. "$ref": "#/components/schemas/ToolPart"
  12542. },
  12543. {
  12544. "$ref": "#/components/schemas/StepStartPart"
  12545. },
  12546. {
  12547. "$ref": "#/components/schemas/StepFinishPart"
  12548. },
  12549. {
  12550. "$ref": "#/components/schemas/SnapshotPart"
  12551. },
  12552. {
  12553. "$ref": "#/components/schemas/PatchPart"
  12554. },
  12555. {
  12556. "$ref": "#/components/schemas/AgentPart"
  12557. },
  12558. {
  12559. "$ref": "#/components/schemas/RetryPart"
  12560. },
  12561. {
  12562. "$ref": "#/components/schemas/CompactionPart"
  12563. }
  12564. ]
  12565. },
  12566. "PermissionAction": {
  12567. "type": "string",
  12568. "enum": ["allow", "deny", "ask"]
  12569. },
  12570. "PermissionRule": {
  12571. "type": "object",
  12572. "properties": {
  12573. "permission": {
  12574. "type": "string"
  12575. },
  12576. "pattern": {
  12577. "type": "string"
  12578. },
  12579. "action": {
  12580. "$ref": "#/components/schemas/PermissionAction"
  12581. }
  12582. },
  12583. "required": ["permission", "pattern", "action"],
  12584. "additionalProperties": false
  12585. },
  12586. "PermissionRuleset": {
  12587. "type": "array",
  12588. "items": {
  12589. "$ref": "#/components/schemas/PermissionRule"
  12590. }
  12591. },
  12592. "Session": {
  12593. "type": "object",
  12594. "properties": {
  12595. "id": {
  12596. "type": "string",
  12597. "pattern": "^ses"
  12598. },
  12599. "slug": {
  12600. "type": "string"
  12601. },
  12602. "projectID": {
  12603. "type": "string"
  12604. },
  12605. "workspaceID": {
  12606. "type": "string",
  12607. "pattern": "^wrk"
  12608. },
  12609. "directory": {
  12610. "type": "string"
  12611. },
  12612. "path": {
  12613. "type": "string"
  12614. },
  12615. "parentID": {
  12616. "type": "string",
  12617. "pattern": "^ses"
  12618. },
  12619. "summary": {
  12620. "type": "object",
  12621. "properties": {
  12622. "additions": {
  12623. "type": "number"
  12624. },
  12625. "deletions": {
  12626. "type": "number"
  12627. },
  12628. "files": {
  12629. "type": "number"
  12630. },
  12631. "diffs": {
  12632. "type": "array",
  12633. "items": {
  12634. "$ref": "#/components/schemas/SnapshotFileDiff"
  12635. }
  12636. }
  12637. },
  12638. "required": ["additions", "deletions", "files"],
  12639. "additionalProperties": false
  12640. },
  12641. "cost": {
  12642. "type": "number"
  12643. },
  12644. "tokens": {
  12645. "type": "object",
  12646. "properties": {
  12647. "input": {
  12648. "type": "number"
  12649. },
  12650. "output": {
  12651. "type": "number"
  12652. },
  12653. "reasoning": {
  12654. "type": "number"
  12655. },
  12656. "cache": {
  12657. "type": "object",
  12658. "properties": {
  12659. "read": {
  12660. "type": "number"
  12661. },
  12662. "write": {
  12663. "type": "number"
  12664. }
  12665. },
  12666. "required": ["read", "write"],
  12667. "additionalProperties": false
  12668. }
  12669. },
  12670. "required": ["input", "output", "reasoning", "cache"],
  12671. "additionalProperties": false
  12672. },
  12673. "share": {
  12674. "type": "object",
  12675. "properties": {
  12676. "url": {
  12677. "type": "string"
  12678. }
  12679. },
  12680. "required": ["url"],
  12681. "additionalProperties": false
  12682. },
  12683. "title": {
  12684. "type": "string"
  12685. },
  12686. "agent": {
  12687. "type": "string"
  12688. },
  12689. "model": {
  12690. "type": "object",
  12691. "properties": {
  12692. "id": {
  12693. "type": "string"
  12694. },
  12695. "providerID": {
  12696. "type": "string"
  12697. },
  12698. "variant": {
  12699. "type": "string"
  12700. }
  12701. },
  12702. "required": ["id", "providerID"],
  12703. "additionalProperties": false
  12704. },
  12705. "version": {
  12706. "type": "string"
  12707. },
  12708. "time": {
  12709. "type": "object",
  12710. "properties": {
  12711. "created": {
  12712. "type": "integer",
  12713. "minimum": 0
  12714. },
  12715. "updated": {
  12716. "type": "integer",
  12717. "minimum": 0
  12718. },
  12719. "compacting": {
  12720. "type": "integer",
  12721. "minimum": 0
  12722. },
  12723. "archived": {
  12724. "type": "number"
  12725. }
  12726. },
  12727. "required": ["created", "updated"],
  12728. "additionalProperties": false
  12729. },
  12730. "permission": {
  12731. "$ref": "#/components/schemas/PermissionRuleset"
  12732. },
  12733. "revert": {
  12734. "type": "object",
  12735. "properties": {
  12736. "messageID": {
  12737. "type": "string",
  12738. "pattern": "^msg"
  12739. },
  12740. "partID": {
  12741. "type": "string",
  12742. "pattern": "^prt"
  12743. },
  12744. "snapshot": {
  12745. "type": "string"
  12746. },
  12747. "diff": {
  12748. "type": "string"
  12749. }
  12750. },
  12751. "required": ["messageID"],
  12752. "additionalProperties": false
  12753. }
  12754. },
  12755. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12756. "additionalProperties": false
  12757. },
  12758. "Prompt": {
  12759. "type": "object",
  12760. "properties": {
  12761. "text": {
  12762. "type": "string"
  12763. },
  12764. "files": {
  12765. "type": "array",
  12766. "items": {
  12767. "$ref": "#/components/schemas/PromptFileAttachment"
  12768. }
  12769. },
  12770. "agents": {
  12771. "type": "array",
  12772. "items": {
  12773. "$ref": "#/components/schemas/PromptAgentAttachment"
  12774. }
  12775. },
  12776. "references": {
  12777. "type": "array",
  12778. "items": {
  12779. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12780. }
  12781. }
  12782. },
  12783. "required": ["text"],
  12784. "additionalProperties": false
  12785. },
  12786. "GlobalEvent": {
  12787. "type": "object",
  12788. "properties": {
  12789. "directory": {
  12790. "type": "string"
  12791. },
  12792. "project": {
  12793. "type": "string"
  12794. },
  12795. "workspace": {
  12796. "type": "string"
  12797. },
  12798. "payload": {
  12799. "anyOf": [
  12800. {
  12801. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12802. },
  12803. {
  12804. "$ref": "#/components/schemas/Event.tui.command.execute"
  12805. },
  12806. {
  12807. "$ref": "#/components/schemas/Event.tui.toast.show"
  12808. },
  12809. {
  12810. "$ref": "#/components/schemas/Event.tui.session.select"
  12811. },
  12812. {
  12813. "$ref": "#/components/schemas/EventServerConnected"
  12814. },
  12815. {
  12816. "$ref": "#/components/schemas/EventGlobalDisposed"
  12817. },
  12818. {
  12819. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12820. },
  12821. {
  12822. "$ref": "#/components/schemas/EventFileEdited"
  12823. },
  12824. {
  12825. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12826. },
  12827. {
  12828. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12829. },
  12830. {
  12831. "$ref": "#/components/schemas/EventLspUpdated"
  12832. },
  12833. {
  12834. "$ref": "#/components/schemas/EventMessagePartDelta"
  12835. },
  12836. {
  12837. "$ref": "#/components/schemas/EventPermissionAsked"
  12838. },
  12839. {
  12840. "$ref": "#/components/schemas/EventPermissionReplied"
  12841. },
  12842. {
  12843. "$ref": "#/components/schemas/EventSessionDiff"
  12844. },
  12845. {
  12846. "$ref": "#/components/schemas/EventSessionError"
  12847. },
  12848. {
  12849. "$ref": "#/components/schemas/EventQuestionAsked"
  12850. },
  12851. {
  12852. "$ref": "#/components/schemas/EventQuestionReplied"
  12853. },
  12854. {
  12855. "$ref": "#/components/schemas/EventQuestionRejected"
  12856. },
  12857. {
  12858. "$ref": "#/components/schemas/EventTodoUpdated"
  12859. },
  12860. {
  12861. "$ref": "#/components/schemas/EventSessionStatus"
  12862. },
  12863. {
  12864. "$ref": "#/components/schemas/EventSessionIdle"
  12865. },
  12866. {
  12867. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12868. },
  12869. {
  12870. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12871. },
  12872. {
  12873. "$ref": "#/components/schemas/EventCommandExecuted"
  12874. },
  12875. {
  12876. "$ref": "#/components/schemas/EventProjectUpdated"
  12877. },
  12878. {
  12879. "$ref": "#/components/schemas/EventSessionCompacted"
  12880. },
  12881. {
  12882. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12883. },
  12884. {
  12885. "$ref": "#/components/schemas/EventWorkspaceReady"
  12886. },
  12887. {
  12888. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12889. },
  12890. {
  12891. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12892. },
  12893. {
  12894. "$ref": "#/components/schemas/EventWorktreeReady"
  12895. },
  12896. {
  12897. "$ref": "#/components/schemas/EventWorktreeFailed"
  12898. },
  12899. {
  12900. "$ref": "#/components/schemas/EventPtyCreated"
  12901. },
  12902. {
  12903. "$ref": "#/components/schemas/EventPtyUpdated"
  12904. },
  12905. {
  12906. "$ref": "#/components/schemas/EventPtyExited"
  12907. },
  12908. {
  12909. "$ref": "#/components/schemas/EventPtyDeleted"
  12910. },
  12911. {
  12912. "$ref": "#/components/schemas/EventInstallationUpdated"
  12913. },
  12914. {
  12915. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12916. },
  12917. {
  12918. "$ref": "#/components/schemas/EventMessageUpdated"
  12919. },
  12920. {
  12921. "$ref": "#/components/schemas/EventMessageRemoved"
  12922. },
  12923. {
  12924. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12925. },
  12926. {
  12927. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12928. },
  12929. {
  12930. "$ref": "#/components/schemas/EventSessionCreated"
  12931. },
  12932. {
  12933. "$ref": "#/components/schemas/EventSessionUpdated"
  12934. },
  12935. {
  12936. "$ref": "#/components/schemas/EventSessionDeleted"
  12937. },
  12938. {
  12939. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12940. },
  12941. {
  12942. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12943. },
  12944. {
  12945. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12946. },
  12947. {
  12948. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12949. },
  12950. {
  12951. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12952. },
  12953. {
  12954. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12955. },
  12956. {
  12957. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12958. },
  12959. {
  12960. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12961. },
  12962. {
  12963. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12964. },
  12965. {
  12966. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12967. },
  12968. {
  12969. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12970. },
  12971. {
  12972. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12973. },
  12974. {
  12975. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12976. },
  12977. {
  12978. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12979. },
  12980. {
  12981. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12982. },
  12983. {
  12984. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12985. },
  12986. {
  12987. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12988. },
  12989. {
  12990. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12991. },
  12992. {
  12993. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12994. },
  12995. {
  12996. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12997. },
  12998. {
  12999. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13003. },
  13004. {
  13005. "$ref": "#/components/schemas/EventSessionNextRetried"
  13006. },
  13007. {
  13008. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13009. },
  13010. {
  13011. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13012. },
  13013. {
  13014. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13015. },
  13016. {
  13017. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13018. },
  13019. {
  13020. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13021. },
  13022. {
  13023. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13024. },
  13025. {
  13026. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13027. },
  13028. {
  13029. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13030. },
  13031. {
  13032. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13048. },
  13049. {
  13050. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13051. },
  13052. {
  13053. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13054. },
  13055. {
  13056. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13057. },
  13058. {
  13059. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13060. },
  13061. {
  13062. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13066. },
  13067. {
  13068. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13069. },
  13070. {
  13071. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13072. },
  13073. {
  13074. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13075. },
  13076. {
  13077. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13078. },
  13079. {
  13080. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13081. },
  13082. {
  13083. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13084. },
  13085. {
  13086. "$ref": "#/components/schemas/EventSessionNextRetried"
  13087. },
  13088. {
  13089. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13090. },
  13091. {
  13092. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13093. },
  13094. {
  13095. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13096. },
  13097. {
  13098. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13099. },
  13100. {
  13101. "$ref": "#/components/schemas/EventAccountAdded"
  13102. },
  13103. {
  13104. "$ref": "#/components/schemas/EventAccountRemoved"
  13105. },
  13106. {
  13107. "$ref": "#/components/schemas/EventAccountSwitched"
  13108. },
  13109. {
  13110. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13111. },
  13112. {
  13113. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13114. },
  13115. {
  13116. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13117. },
  13118. {
  13119. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13120. },
  13121. {
  13122. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13126. },
  13127. {
  13128. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13129. },
  13130. {
  13131. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13141. },
  13142. {
  13143. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13150. },
  13151. {
  13152. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13159. },
  13160. {
  13161. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13162. },
  13163. {
  13164. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13165. },
  13166. {
  13167. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13168. },
  13169. {
  13170. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13171. },
  13172. {
  13173. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13174. },
  13175. {
  13176. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13177. },
  13178. {
  13179. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13180. },
  13181. {
  13182. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13183. },
  13184. {
  13185. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13186. },
  13187. {
  13188. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13189. },
  13190. {
  13191. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13192. },
  13193. {
  13194. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13195. },
  13196. {
  13197. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13198. },
  13199. {
  13200. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13201. },
  13202. {
  13203. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13204. },
  13205. {
  13206. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13207. }
  13208. ]
  13209. }
  13210. },
  13211. "required": ["directory", "payload"],
  13212. "additionalProperties": false
  13213. },
  13214. "LogLevel": {
  13215. "type": "string",
  13216. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13217. "description": "Log level"
  13218. },
  13219. "ServerConfig": {
  13220. "type": "object",
  13221. "properties": {
  13222. "port": {
  13223. "type": "integer",
  13224. "exclusiveMinimum": 0
  13225. },
  13226. "hostname": {
  13227. "type": "string"
  13228. },
  13229. "mdns": {
  13230. "type": "boolean"
  13231. },
  13232. "mdnsDomain": {
  13233. "type": "string"
  13234. },
  13235. "cors": {
  13236. "type": "array",
  13237. "items": {
  13238. "type": "string"
  13239. }
  13240. }
  13241. },
  13242. "additionalProperties": false,
  13243. "description": "Server configuration for opencode serve and web commands"
  13244. },
  13245. "ReferenceConfigEntry": {
  13246. "anyOf": [
  13247. {
  13248. "type": "string"
  13249. },
  13250. {
  13251. "type": "object",
  13252. "properties": {
  13253. "repository": {
  13254. "type": "string",
  13255. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13256. },
  13257. "branch": {
  13258. "type": "string"
  13259. }
  13260. },
  13261. "required": ["repository"],
  13262. "additionalProperties": false
  13263. },
  13264. {
  13265. "type": "object",
  13266. "properties": {
  13267. "path": {
  13268. "type": "string",
  13269. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13270. }
  13271. },
  13272. "required": ["path"],
  13273. "additionalProperties": false
  13274. }
  13275. ]
  13276. },
  13277. "ReferenceConfig": {
  13278. "type": "object",
  13279. "additionalProperties": {
  13280. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13281. }
  13282. },
  13283. "PermissionActionConfig": {
  13284. "type": "string",
  13285. "enum": ["ask", "allow", "deny"]
  13286. },
  13287. "PermissionObjectConfig": {
  13288. "type": "object",
  13289. "additionalProperties": {
  13290. "$ref": "#/components/schemas/PermissionActionConfig"
  13291. }
  13292. },
  13293. "PermissionRuleConfig": {
  13294. "anyOf": [
  13295. {
  13296. "$ref": "#/components/schemas/PermissionActionConfig"
  13297. },
  13298. {
  13299. "$ref": "#/components/schemas/PermissionObjectConfig"
  13300. }
  13301. ]
  13302. },
  13303. "PermissionConfig": {
  13304. "anyOf": [
  13305. {
  13306. "$ref": "#/components/schemas/PermissionActionConfig"
  13307. },
  13308. {
  13309. "type": "object",
  13310. "properties": {
  13311. "read": {
  13312. "$ref": "#/components/schemas/PermissionRuleConfig"
  13313. },
  13314. "edit": {
  13315. "$ref": "#/components/schemas/PermissionRuleConfig"
  13316. },
  13317. "glob": {
  13318. "$ref": "#/components/schemas/PermissionRuleConfig"
  13319. },
  13320. "grep": {
  13321. "$ref": "#/components/schemas/PermissionRuleConfig"
  13322. },
  13323. "list": {
  13324. "$ref": "#/components/schemas/PermissionRuleConfig"
  13325. },
  13326. "bash": {
  13327. "$ref": "#/components/schemas/PermissionRuleConfig"
  13328. },
  13329. "task": {
  13330. "$ref": "#/components/schemas/PermissionRuleConfig"
  13331. },
  13332. "external_directory": {
  13333. "$ref": "#/components/schemas/PermissionRuleConfig"
  13334. },
  13335. "todowrite": {
  13336. "$ref": "#/components/schemas/PermissionActionConfig"
  13337. },
  13338. "question": {
  13339. "$ref": "#/components/schemas/PermissionActionConfig"
  13340. },
  13341. "webfetch": {
  13342. "$ref": "#/components/schemas/PermissionActionConfig"
  13343. },
  13344. "websearch": {
  13345. "$ref": "#/components/schemas/PermissionActionConfig"
  13346. },
  13347. "repo_clone": {
  13348. "$ref": "#/components/schemas/PermissionRuleConfig"
  13349. },
  13350. "repo_overview": {
  13351. "$ref": "#/components/schemas/PermissionRuleConfig"
  13352. },
  13353. "lsp": {
  13354. "$ref": "#/components/schemas/PermissionRuleConfig"
  13355. },
  13356. "doom_loop": {
  13357. "$ref": "#/components/schemas/PermissionActionConfig"
  13358. },
  13359. "skill": {
  13360. "$ref": "#/components/schemas/PermissionRuleConfig"
  13361. }
  13362. },
  13363. "additionalProperties": {
  13364. "$ref": "#/components/schemas/PermissionRuleConfig"
  13365. }
  13366. }
  13367. ]
  13368. },
  13369. "AgentConfig": {
  13370. "type": "object",
  13371. "properties": {
  13372. "model": {
  13373. "type": "string"
  13374. },
  13375. "variant": {
  13376. "type": "string"
  13377. },
  13378. "temperature": {
  13379. "type": "number"
  13380. },
  13381. "top_p": {
  13382. "type": "number"
  13383. },
  13384. "prompt": {
  13385. "type": "string"
  13386. },
  13387. "tools": {
  13388. "type": "object",
  13389. "additionalProperties": {
  13390. "type": "boolean"
  13391. }
  13392. },
  13393. "disable": {
  13394. "type": "boolean"
  13395. },
  13396. "description": {
  13397. "type": "string"
  13398. },
  13399. "mode": {
  13400. "type": "string",
  13401. "enum": ["subagent", "primary", "all"]
  13402. },
  13403. "hidden": {
  13404. "type": "boolean"
  13405. },
  13406. "options": {
  13407. "type": "object"
  13408. },
  13409. "color": {
  13410. "anyOf": [
  13411. {
  13412. "type": "string",
  13413. "pattern": "^#[0-9a-fA-F]{6}$"
  13414. },
  13415. {
  13416. "type": "string",
  13417. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13418. }
  13419. ],
  13420. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13421. },
  13422. "steps": {
  13423. "type": "integer",
  13424. "exclusiveMinimum": 0
  13425. },
  13426. "maxSteps": {
  13427. "type": "integer",
  13428. "exclusiveMinimum": 0
  13429. },
  13430. "permission": {
  13431. "$ref": "#/components/schemas/PermissionConfig"
  13432. }
  13433. },
  13434. "additionalProperties": {}
  13435. },
  13436. "ProviderConfig": {
  13437. "type": "object",
  13438. "properties": {
  13439. "api": {
  13440. "type": "string"
  13441. },
  13442. "name": {
  13443. "type": "string"
  13444. },
  13445. "env": {
  13446. "type": "array",
  13447. "items": {
  13448. "type": "string"
  13449. }
  13450. },
  13451. "id": {
  13452. "type": "string"
  13453. },
  13454. "npm": {
  13455. "type": "string"
  13456. },
  13457. "whitelist": {
  13458. "type": "array",
  13459. "items": {
  13460. "type": "string"
  13461. }
  13462. },
  13463. "blacklist": {
  13464. "type": "array",
  13465. "items": {
  13466. "type": "string"
  13467. }
  13468. },
  13469. "options": {
  13470. "type": "object",
  13471. "properties": {
  13472. "apiKey": {
  13473. "type": "string"
  13474. },
  13475. "baseURL": {
  13476. "type": "string"
  13477. },
  13478. "enterpriseUrl": {
  13479. "type": "string"
  13480. },
  13481. "setCacheKey": {
  13482. "type": "boolean"
  13483. },
  13484. "timeout": {
  13485. "anyOf": [
  13486. {
  13487. "type": "integer",
  13488. "exclusiveMinimum": 0
  13489. },
  13490. {
  13491. "type": "boolean",
  13492. "enum": [false]
  13493. }
  13494. ],
  13495. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13496. },
  13497. "chunkTimeout": {
  13498. "type": "integer",
  13499. "exclusiveMinimum": 0
  13500. }
  13501. },
  13502. "additionalProperties": {}
  13503. },
  13504. "models": {
  13505. "type": "object",
  13506. "additionalProperties": {
  13507. "type": "object",
  13508. "properties": {
  13509. "id": {
  13510. "type": "string"
  13511. },
  13512. "name": {
  13513. "type": "string"
  13514. },
  13515. "family": {
  13516. "type": "string"
  13517. },
  13518. "release_date": {
  13519. "type": "string"
  13520. },
  13521. "attachment": {
  13522. "type": "boolean"
  13523. },
  13524. "reasoning": {
  13525. "type": "boolean"
  13526. },
  13527. "temperature": {
  13528. "type": "boolean"
  13529. },
  13530. "tool_call": {
  13531. "type": "boolean"
  13532. },
  13533. "interleaved": {
  13534. "anyOf": [
  13535. {
  13536. "type": "boolean",
  13537. "enum": [true]
  13538. },
  13539. {
  13540. "type": "object",
  13541. "properties": {
  13542. "field": {
  13543. "type": "string",
  13544. "enum": ["reasoning_content", "reasoning_details"]
  13545. }
  13546. },
  13547. "required": ["field"],
  13548. "additionalProperties": false
  13549. }
  13550. ]
  13551. },
  13552. "cost": {
  13553. "type": "object",
  13554. "properties": {
  13555. "input": {
  13556. "type": "number"
  13557. },
  13558. "output": {
  13559. "type": "number"
  13560. },
  13561. "cache_read": {
  13562. "type": "number"
  13563. },
  13564. "cache_write": {
  13565. "type": "number"
  13566. },
  13567. "context_over_200k": {
  13568. "type": "object",
  13569. "properties": {
  13570. "input": {
  13571. "type": "number"
  13572. },
  13573. "output": {
  13574. "type": "number"
  13575. },
  13576. "cache_read": {
  13577. "type": "number"
  13578. },
  13579. "cache_write": {
  13580. "type": "number"
  13581. }
  13582. },
  13583. "required": ["input", "output"],
  13584. "additionalProperties": false
  13585. }
  13586. },
  13587. "required": ["input", "output"],
  13588. "additionalProperties": false
  13589. },
  13590. "limit": {
  13591. "type": "object",
  13592. "properties": {
  13593. "context": {
  13594. "type": "number"
  13595. },
  13596. "input": {
  13597. "type": "number"
  13598. },
  13599. "output": {
  13600. "type": "number"
  13601. }
  13602. },
  13603. "required": ["context", "output"],
  13604. "additionalProperties": false
  13605. },
  13606. "modalities": {
  13607. "type": "object",
  13608. "properties": {
  13609. "input": {
  13610. "type": "array",
  13611. "items": {
  13612. "type": "string",
  13613. "enum": ["text", "audio", "image", "video", "pdf"]
  13614. }
  13615. },
  13616. "output": {
  13617. "type": "array",
  13618. "items": {
  13619. "type": "string",
  13620. "enum": ["text", "audio", "image", "video", "pdf"]
  13621. }
  13622. }
  13623. },
  13624. "required": ["input", "output"],
  13625. "additionalProperties": false
  13626. },
  13627. "experimental": {
  13628. "type": "boolean"
  13629. },
  13630. "status": {
  13631. "type": "string",
  13632. "enum": ["alpha", "beta", "deprecated", "active"]
  13633. },
  13634. "provider": {
  13635. "type": "object",
  13636. "properties": {
  13637. "npm": {
  13638. "type": "string"
  13639. },
  13640. "api": {
  13641. "type": "string"
  13642. }
  13643. },
  13644. "additionalProperties": false
  13645. },
  13646. "options": {
  13647. "type": "object"
  13648. },
  13649. "headers": {
  13650. "type": "object",
  13651. "additionalProperties": {
  13652. "type": "string"
  13653. }
  13654. },
  13655. "variants": {
  13656. "type": "object",
  13657. "additionalProperties": {
  13658. "type": "object",
  13659. "properties": {
  13660. "disabled": {
  13661. "type": "boolean"
  13662. }
  13663. },
  13664. "additionalProperties": {}
  13665. },
  13666. "description": "Variant-specific configuration"
  13667. }
  13668. },
  13669. "additionalProperties": false
  13670. }
  13671. }
  13672. },
  13673. "additionalProperties": false
  13674. },
  13675. "McpLocalConfig": {
  13676. "type": "object",
  13677. "properties": {
  13678. "type": {
  13679. "type": "string",
  13680. "enum": ["local"],
  13681. "description": "Type of MCP server connection"
  13682. },
  13683. "command": {
  13684. "type": "array",
  13685. "items": {
  13686. "type": "string"
  13687. },
  13688. "description": "Command and arguments to run the MCP server"
  13689. },
  13690. "environment": {
  13691. "type": "object",
  13692. "additionalProperties": {
  13693. "type": "string"
  13694. }
  13695. },
  13696. "enabled": {
  13697. "type": "boolean"
  13698. },
  13699. "timeout": {
  13700. "type": "integer",
  13701. "exclusiveMinimum": 0
  13702. }
  13703. },
  13704. "required": ["type", "command"],
  13705. "additionalProperties": false
  13706. },
  13707. "McpOAuthConfig": {
  13708. "type": "object",
  13709. "properties": {
  13710. "clientId": {
  13711. "type": "string"
  13712. },
  13713. "clientSecret": {
  13714. "type": "string"
  13715. },
  13716. "scope": {
  13717. "type": "string"
  13718. },
  13719. "redirectUri": {
  13720. "type": "string"
  13721. }
  13722. },
  13723. "additionalProperties": false
  13724. },
  13725. "McpRemoteConfig": {
  13726. "type": "object",
  13727. "properties": {
  13728. "type": {
  13729. "type": "string",
  13730. "enum": ["remote"],
  13731. "description": "Type of MCP server connection"
  13732. },
  13733. "url": {
  13734. "type": "string",
  13735. "description": "URL of the remote MCP server"
  13736. },
  13737. "enabled": {
  13738. "type": "boolean"
  13739. },
  13740. "headers": {
  13741. "type": "object",
  13742. "additionalProperties": {
  13743. "type": "string"
  13744. }
  13745. },
  13746. "oauth": {
  13747. "anyOf": [
  13748. {
  13749. "$ref": "#/components/schemas/McpOAuthConfig"
  13750. },
  13751. {
  13752. "type": "boolean",
  13753. "enum": [false]
  13754. }
  13755. ],
  13756. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13757. },
  13758. "timeout": {
  13759. "type": "integer",
  13760. "exclusiveMinimum": 0
  13761. }
  13762. },
  13763. "required": ["type", "url"],
  13764. "additionalProperties": false
  13765. },
  13766. "LayoutConfig": {
  13767. "type": "string",
  13768. "enum": ["auto", "stretch"],
  13769. "description": "@deprecated Always uses stretch layout."
  13770. },
  13771. "ImageAttachmentConfig": {
  13772. "type": "object",
  13773. "properties": {
  13774. "auto_resize": {
  13775. "type": "boolean"
  13776. },
  13777. "max_width": {
  13778. "type": "integer",
  13779. "exclusiveMinimum": 0
  13780. },
  13781. "max_height": {
  13782. "type": "integer",
  13783. "exclusiveMinimum": 0
  13784. },
  13785. "max_base64_bytes": {
  13786. "type": "integer",
  13787. "exclusiveMinimum": 0
  13788. }
  13789. },
  13790. "additionalProperties": false
  13791. },
  13792. "AttachmentConfig": {
  13793. "type": "object",
  13794. "properties": {
  13795. "image": {
  13796. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13797. }
  13798. },
  13799. "additionalProperties": false
  13800. },
  13801. "Config": {
  13802. "type": "object",
  13803. "properties": {
  13804. "$schema": {
  13805. "type": "string"
  13806. },
  13807. "shell": {
  13808. "type": "string"
  13809. },
  13810. "logLevel": {
  13811. "$ref": "#/components/schemas/LogLevel"
  13812. },
  13813. "server": {
  13814. "$ref": "#/components/schemas/ServerConfig"
  13815. },
  13816. "command": {
  13817. "type": "object",
  13818. "additionalProperties": {
  13819. "type": "object",
  13820. "properties": {
  13821. "template": {
  13822. "type": "string"
  13823. },
  13824. "description": {
  13825. "type": "string"
  13826. },
  13827. "agent": {
  13828. "type": "string"
  13829. },
  13830. "model": {
  13831. "type": "string"
  13832. },
  13833. "subtask": {
  13834. "type": "boolean"
  13835. }
  13836. },
  13837. "required": ["template"],
  13838. "additionalProperties": false
  13839. }
  13840. },
  13841. "skills": {
  13842. "type": "object",
  13843. "properties": {
  13844. "paths": {
  13845. "type": "array",
  13846. "items": {
  13847. "type": "string"
  13848. }
  13849. },
  13850. "urls": {
  13851. "type": "array",
  13852. "items": {
  13853. "type": "string"
  13854. }
  13855. }
  13856. },
  13857. "additionalProperties": false
  13858. },
  13859. "reference": {
  13860. "$ref": "#/components/schemas/ReferenceConfig"
  13861. },
  13862. "watcher": {
  13863. "type": "object",
  13864. "properties": {
  13865. "ignore": {
  13866. "type": "array",
  13867. "items": {
  13868. "type": "string"
  13869. }
  13870. }
  13871. },
  13872. "additionalProperties": false
  13873. },
  13874. "snapshot": {
  13875. "type": "boolean"
  13876. },
  13877. "plugin": {
  13878. "type": "array",
  13879. "items": {
  13880. "anyOf": [
  13881. {
  13882. "type": "string"
  13883. },
  13884. {
  13885. "type": "array",
  13886. "prefixItems": [
  13887. {
  13888. "type": "string"
  13889. },
  13890. {
  13891. "type": "object"
  13892. }
  13893. ],
  13894. "maxItems": 2,
  13895. "minItems": 2
  13896. }
  13897. ]
  13898. }
  13899. },
  13900. "share": {
  13901. "type": "string",
  13902. "enum": ["manual", "auto", "disabled"]
  13903. },
  13904. "autoshare": {
  13905. "type": "boolean"
  13906. },
  13907. "autoupdate": {
  13908. "anyOf": [
  13909. {
  13910. "type": "boolean"
  13911. },
  13912. {
  13913. "type": "string",
  13914. "enum": ["notify"]
  13915. }
  13916. ],
  13917. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13918. },
  13919. "disabled_providers": {
  13920. "type": "array",
  13921. "items": {
  13922. "type": "string"
  13923. }
  13924. },
  13925. "enabled_providers": {
  13926. "type": "array",
  13927. "items": {
  13928. "type": "string"
  13929. }
  13930. },
  13931. "model": {
  13932. "type": "string"
  13933. },
  13934. "small_model": {
  13935. "type": "string"
  13936. },
  13937. "default_agent": {
  13938. "type": "string"
  13939. },
  13940. "username": {
  13941. "type": "string"
  13942. },
  13943. "mode": {
  13944. "type": "object",
  13945. "properties": {
  13946. "build": {
  13947. "$ref": "#/components/schemas/AgentConfig"
  13948. },
  13949. "plan": {
  13950. "$ref": "#/components/schemas/AgentConfig"
  13951. }
  13952. },
  13953. "additionalProperties": {
  13954. "$ref": "#/components/schemas/AgentConfig"
  13955. }
  13956. },
  13957. "agent": {
  13958. "type": "object",
  13959. "properties": {
  13960. "plan": {
  13961. "$ref": "#/components/schemas/AgentConfig"
  13962. },
  13963. "build": {
  13964. "$ref": "#/components/schemas/AgentConfig"
  13965. },
  13966. "general": {
  13967. "$ref": "#/components/schemas/AgentConfig"
  13968. },
  13969. "explore": {
  13970. "$ref": "#/components/schemas/AgentConfig"
  13971. },
  13972. "scout": {
  13973. "$ref": "#/components/schemas/AgentConfig"
  13974. },
  13975. "title": {
  13976. "$ref": "#/components/schemas/AgentConfig"
  13977. },
  13978. "summary": {
  13979. "$ref": "#/components/schemas/AgentConfig"
  13980. },
  13981. "compaction": {
  13982. "$ref": "#/components/schemas/AgentConfig"
  13983. }
  13984. },
  13985. "additionalProperties": {
  13986. "$ref": "#/components/schemas/AgentConfig"
  13987. }
  13988. },
  13989. "provider": {
  13990. "type": "object",
  13991. "additionalProperties": {
  13992. "$ref": "#/components/schemas/ProviderConfig"
  13993. }
  13994. },
  13995. "mcp": {
  13996. "type": "object",
  13997. "additionalProperties": {
  13998. "anyOf": [
  13999. {
  14000. "$ref": "#/components/schemas/McpLocalConfig"
  14001. },
  14002. {
  14003. "$ref": "#/components/schemas/McpRemoteConfig"
  14004. },
  14005. {
  14006. "type": "object",
  14007. "properties": {
  14008. "enabled": {
  14009. "type": "boolean"
  14010. }
  14011. },
  14012. "required": ["enabled"],
  14013. "additionalProperties": false
  14014. }
  14015. ]
  14016. }
  14017. },
  14018. "formatter": {
  14019. "anyOf": [
  14020. {
  14021. "type": "boolean"
  14022. },
  14023. {
  14024. "type": "object",
  14025. "additionalProperties": {
  14026. "type": "object",
  14027. "properties": {
  14028. "disabled": {
  14029. "type": "boolean"
  14030. },
  14031. "command": {
  14032. "type": "array",
  14033. "items": {
  14034. "type": "string"
  14035. }
  14036. },
  14037. "environment": {
  14038. "type": "object",
  14039. "additionalProperties": {
  14040. "type": "string"
  14041. }
  14042. },
  14043. "extensions": {
  14044. "type": "array",
  14045. "items": {
  14046. "type": "string"
  14047. }
  14048. }
  14049. },
  14050. "additionalProperties": false
  14051. }
  14052. }
  14053. ],
  14054. "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."
  14055. },
  14056. "lsp": {
  14057. "anyOf": [
  14058. {
  14059. "type": "boolean"
  14060. },
  14061. {
  14062. "type": "object",
  14063. "additionalProperties": {
  14064. "anyOf": [
  14065. {
  14066. "type": "object",
  14067. "properties": {
  14068. "disabled": {
  14069. "type": "boolean",
  14070. "enum": [true]
  14071. }
  14072. },
  14073. "required": ["disabled"],
  14074. "additionalProperties": false
  14075. },
  14076. {
  14077. "type": "object",
  14078. "properties": {
  14079. "command": {
  14080. "type": "array",
  14081. "items": {
  14082. "type": "string"
  14083. }
  14084. },
  14085. "extensions": {
  14086. "type": "array",
  14087. "items": {
  14088. "type": "string"
  14089. }
  14090. },
  14091. "disabled": {
  14092. "type": "boolean"
  14093. },
  14094. "env": {
  14095. "type": "object",
  14096. "additionalProperties": {
  14097. "type": "string"
  14098. }
  14099. },
  14100. "initialization": {
  14101. "type": "object"
  14102. }
  14103. },
  14104. "required": ["command"],
  14105. "additionalProperties": false
  14106. }
  14107. ]
  14108. }
  14109. }
  14110. ],
  14111. "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."
  14112. },
  14113. "instructions": {
  14114. "type": "array",
  14115. "items": {
  14116. "type": "string"
  14117. }
  14118. },
  14119. "layout": {
  14120. "$ref": "#/components/schemas/LayoutConfig"
  14121. },
  14122. "permission": {
  14123. "$ref": "#/components/schemas/PermissionConfig"
  14124. },
  14125. "tools": {
  14126. "type": "object",
  14127. "additionalProperties": {
  14128. "type": "boolean"
  14129. }
  14130. },
  14131. "attachment": {
  14132. "$ref": "#/components/schemas/AttachmentConfig"
  14133. },
  14134. "enterprise": {
  14135. "type": "object",
  14136. "properties": {
  14137. "url": {
  14138. "type": "string"
  14139. }
  14140. },
  14141. "additionalProperties": false
  14142. },
  14143. "tool_output": {
  14144. "type": "object",
  14145. "properties": {
  14146. "max_lines": {
  14147. "type": "integer",
  14148. "exclusiveMinimum": 0
  14149. },
  14150. "max_bytes": {
  14151. "type": "integer",
  14152. "exclusiveMinimum": 0
  14153. }
  14154. },
  14155. "additionalProperties": false
  14156. },
  14157. "compaction": {
  14158. "type": "object",
  14159. "properties": {
  14160. "auto": {
  14161. "type": "boolean"
  14162. },
  14163. "prune": {
  14164. "type": "boolean"
  14165. },
  14166. "tail_turns": {
  14167. "type": "integer",
  14168. "minimum": 0
  14169. },
  14170. "preserve_recent_tokens": {
  14171. "type": "integer",
  14172. "minimum": 0
  14173. },
  14174. "reserved": {
  14175. "type": "integer",
  14176. "minimum": 0
  14177. }
  14178. },
  14179. "additionalProperties": false
  14180. },
  14181. "experimental": {
  14182. "type": "object",
  14183. "properties": {
  14184. "disable_paste_summary": {
  14185. "type": "boolean"
  14186. },
  14187. "batch_tool": {
  14188. "type": "boolean"
  14189. },
  14190. "openTelemetry": {
  14191. "type": "boolean"
  14192. },
  14193. "primary_tools": {
  14194. "type": "array",
  14195. "items": {
  14196. "type": "string"
  14197. }
  14198. },
  14199. "continue_loop_on_deny": {
  14200. "type": "boolean"
  14201. },
  14202. "mcp_timeout": {
  14203. "type": "integer",
  14204. "exclusiveMinimum": 0
  14205. }
  14206. },
  14207. "additionalProperties": false
  14208. }
  14209. },
  14210. "additionalProperties": false
  14211. },
  14212. "Model": {
  14213. "type": "object",
  14214. "properties": {
  14215. "id": {
  14216. "type": "string"
  14217. },
  14218. "providerID": {
  14219. "type": "string"
  14220. },
  14221. "api": {
  14222. "type": "object",
  14223. "properties": {
  14224. "id": {
  14225. "type": "string"
  14226. },
  14227. "url": {
  14228. "type": "string"
  14229. },
  14230. "npm": {
  14231. "type": "string"
  14232. }
  14233. },
  14234. "required": ["id", "url", "npm"],
  14235. "additionalProperties": false
  14236. },
  14237. "name": {
  14238. "type": "string"
  14239. },
  14240. "family": {
  14241. "type": "string"
  14242. },
  14243. "capabilities": {
  14244. "type": "object",
  14245. "properties": {
  14246. "temperature": {
  14247. "type": "boolean"
  14248. },
  14249. "reasoning": {
  14250. "type": "boolean"
  14251. },
  14252. "attachment": {
  14253. "type": "boolean"
  14254. },
  14255. "toolcall": {
  14256. "type": "boolean"
  14257. },
  14258. "input": {
  14259. "type": "object",
  14260. "properties": {
  14261. "text": {
  14262. "type": "boolean"
  14263. },
  14264. "audio": {
  14265. "type": "boolean"
  14266. },
  14267. "image": {
  14268. "type": "boolean"
  14269. },
  14270. "video": {
  14271. "type": "boolean"
  14272. },
  14273. "pdf": {
  14274. "type": "boolean"
  14275. }
  14276. },
  14277. "required": ["text", "audio", "image", "video", "pdf"],
  14278. "additionalProperties": false
  14279. },
  14280. "output": {
  14281. "type": "object",
  14282. "properties": {
  14283. "text": {
  14284. "type": "boolean"
  14285. },
  14286. "audio": {
  14287. "type": "boolean"
  14288. },
  14289. "image": {
  14290. "type": "boolean"
  14291. },
  14292. "video": {
  14293. "type": "boolean"
  14294. },
  14295. "pdf": {
  14296. "type": "boolean"
  14297. }
  14298. },
  14299. "required": ["text", "audio", "image", "video", "pdf"],
  14300. "additionalProperties": false
  14301. },
  14302. "interleaved": {
  14303. "anyOf": [
  14304. {
  14305. "type": "boolean"
  14306. },
  14307. {
  14308. "type": "object",
  14309. "properties": {
  14310. "field": {
  14311. "type": "string",
  14312. "enum": ["reasoning_content", "reasoning_details"]
  14313. }
  14314. },
  14315. "required": ["field"],
  14316. "additionalProperties": false
  14317. }
  14318. ]
  14319. }
  14320. },
  14321. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14322. "additionalProperties": false
  14323. },
  14324. "cost": {
  14325. "type": "object",
  14326. "properties": {
  14327. "input": {
  14328. "type": "number"
  14329. },
  14330. "output": {
  14331. "type": "number"
  14332. },
  14333. "cache": {
  14334. "type": "object",
  14335. "properties": {
  14336. "read": {
  14337. "type": "number"
  14338. },
  14339. "write": {
  14340. "type": "number"
  14341. }
  14342. },
  14343. "required": ["read", "write"],
  14344. "additionalProperties": false
  14345. },
  14346. "tiers": {
  14347. "type": "array",
  14348. "items": {
  14349. "type": "object",
  14350. "properties": {
  14351. "input": {
  14352. "type": "number"
  14353. },
  14354. "output": {
  14355. "type": "number"
  14356. },
  14357. "cache": {
  14358. "type": "object",
  14359. "properties": {
  14360. "read": {
  14361. "type": "number"
  14362. },
  14363. "write": {
  14364. "type": "number"
  14365. }
  14366. },
  14367. "required": ["read", "write"],
  14368. "additionalProperties": false
  14369. },
  14370. "tier": {
  14371. "type": "object",
  14372. "properties": {
  14373. "type": {
  14374. "type": "string",
  14375. "enum": ["context"]
  14376. },
  14377. "size": {
  14378. "type": "number"
  14379. }
  14380. },
  14381. "required": ["type", "size"],
  14382. "additionalProperties": false
  14383. }
  14384. },
  14385. "required": ["input", "output", "cache", "tier"],
  14386. "additionalProperties": false
  14387. }
  14388. },
  14389. "experimentalOver200K": {
  14390. "type": "object",
  14391. "properties": {
  14392. "input": {
  14393. "type": "number"
  14394. },
  14395. "output": {
  14396. "type": "number"
  14397. },
  14398. "cache": {
  14399. "type": "object",
  14400. "properties": {
  14401. "read": {
  14402. "type": "number"
  14403. },
  14404. "write": {
  14405. "type": "number"
  14406. }
  14407. },
  14408. "required": ["read", "write"],
  14409. "additionalProperties": false
  14410. }
  14411. },
  14412. "required": ["input", "output", "cache"],
  14413. "additionalProperties": false
  14414. }
  14415. },
  14416. "required": ["input", "output", "cache"],
  14417. "additionalProperties": false
  14418. },
  14419. "limit": {
  14420. "type": "object",
  14421. "properties": {
  14422. "context": {
  14423. "type": "number"
  14424. },
  14425. "input": {
  14426. "type": "number"
  14427. },
  14428. "output": {
  14429. "type": "number"
  14430. }
  14431. },
  14432. "required": ["context", "output"],
  14433. "additionalProperties": false
  14434. },
  14435. "status": {
  14436. "type": "string",
  14437. "enum": ["alpha", "beta", "deprecated", "active"]
  14438. },
  14439. "options": {
  14440. "type": "object"
  14441. },
  14442. "headers": {
  14443. "type": "object",
  14444. "additionalProperties": {
  14445. "type": "string"
  14446. }
  14447. },
  14448. "release_date": {
  14449. "type": "string"
  14450. },
  14451. "variants": {
  14452. "type": "object",
  14453. "additionalProperties": {
  14454. "type": "object"
  14455. }
  14456. }
  14457. },
  14458. "required": [
  14459. "id",
  14460. "providerID",
  14461. "api",
  14462. "name",
  14463. "capabilities",
  14464. "cost",
  14465. "limit",
  14466. "status",
  14467. "options",
  14468. "headers",
  14469. "release_date"
  14470. ],
  14471. "additionalProperties": false
  14472. },
  14473. "Provider": {
  14474. "type": "object",
  14475. "properties": {
  14476. "id": {
  14477. "type": "string"
  14478. },
  14479. "name": {
  14480. "type": "string"
  14481. },
  14482. "source": {
  14483. "type": "string",
  14484. "enum": ["env", "config", "custom", "api"]
  14485. },
  14486. "env": {
  14487. "type": "array",
  14488. "items": {
  14489. "type": "string"
  14490. }
  14491. },
  14492. "key": {
  14493. "type": "string"
  14494. },
  14495. "options": {
  14496. "type": "object"
  14497. },
  14498. "models": {
  14499. "type": "object",
  14500. "additionalProperties": {
  14501. "$ref": "#/components/schemas/Model"
  14502. }
  14503. }
  14504. },
  14505. "required": ["id", "name", "source", "env", "options", "models"],
  14506. "additionalProperties": false
  14507. },
  14508. "ConsoleState": {
  14509. "type": "object",
  14510. "properties": {
  14511. "consoleManagedProviders": {
  14512. "type": "array",
  14513. "items": {
  14514. "type": "string"
  14515. }
  14516. },
  14517. "activeOrgName": {
  14518. "type": "string"
  14519. },
  14520. "switchableOrgCount": {
  14521. "type": "integer",
  14522. "minimum": 0
  14523. }
  14524. },
  14525. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14526. "additionalProperties": false
  14527. },
  14528. "effect_HttpApiError_InternalServerError": {
  14529. "type": "object",
  14530. "properties": {
  14531. "_tag": {
  14532. "type": "string",
  14533. "enum": ["InternalServerError"]
  14534. }
  14535. },
  14536. "required": ["_tag"],
  14537. "additionalProperties": false
  14538. },
  14539. "ToolListItem": {
  14540. "type": "object",
  14541. "properties": {
  14542. "id": {
  14543. "type": "string"
  14544. },
  14545. "description": {
  14546. "type": "string"
  14547. },
  14548. "parameters": {}
  14549. },
  14550. "required": ["id", "description", "parameters"],
  14551. "additionalProperties": false
  14552. },
  14553. "ToolList": {
  14554. "type": "array",
  14555. "items": {
  14556. "$ref": "#/components/schemas/ToolListItem"
  14557. }
  14558. },
  14559. "ToolIDs": {
  14560. "type": "array",
  14561. "items": {
  14562. "type": "string"
  14563. }
  14564. },
  14565. "WorktreeError": {
  14566. "type": "object",
  14567. "properties": {
  14568. "name": {
  14569. "type": "string",
  14570. "enum": [
  14571. "WorktreeNotGitError",
  14572. "WorktreeNameGenerationFailedError",
  14573. "WorktreeCreateFailedError",
  14574. "WorktreeStartCommandFailedError",
  14575. "WorktreeRemoveFailedError",
  14576. "WorktreeResetFailedError",
  14577. "WorktreeListFailedError"
  14578. ]
  14579. },
  14580. "data": {
  14581. "type": "object",
  14582. "properties": {
  14583. "message": {
  14584. "type": "string"
  14585. }
  14586. },
  14587. "required": ["message"],
  14588. "additionalProperties": false
  14589. }
  14590. },
  14591. "required": ["name", "data"],
  14592. "additionalProperties": false
  14593. },
  14594. "WorktreeCreateInput": {
  14595. "type": "object",
  14596. "properties": {
  14597. "name": {
  14598. "type": "string"
  14599. },
  14600. "startCommand": {
  14601. "type": "string",
  14602. "description": "Additional startup script to run after the project's start command"
  14603. }
  14604. },
  14605. "additionalProperties": false
  14606. },
  14607. "Worktree": {
  14608. "type": "object",
  14609. "properties": {
  14610. "name": {
  14611. "type": "string"
  14612. },
  14613. "branch": {
  14614. "type": "string"
  14615. },
  14616. "directory": {
  14617. "type": "string"
  14618. }
  14619. },
  14620. "required": ["name", "directory"],
  14621. "additionalProperties": false
  14622. },
  14623. "WorktreeRemoveInput": {
  14624. "type": "object",
  14625. "properties": {
  14626. "directory": {
  14627. "type": "string"
  14628. }
  14629. },
  14630. "required": ["directory"],
  14631. "additionalProperties": false
  14632. },
  14633. "WorktreeResetInput": {
  14634. "type": "object",
  14635. "properties": {
  14636. "directory": {
  14637. "type": "string"
  14638. }
  14639. },
  14640. "required": ["directory"],
  14641. "additionalProperties": false
  14642. },
  14643. "ProjectSummary": {
  14644. "type": "object",
  14645. "properties": {
  14646. "id": {
  14647. "type": "string"
  14648. },
  14649. "name": {
  14650. "type": "string"
  14651. },
  14652. "worktree": {
  14653. "type": "string"
  14654. }
  14655. },
  14656. "required": ["id", "worktree"],
  14657. "additionalProperties": false
  14658. },
  14659. "GlobalSession": {
  14660. "type": "object",
  14661. "properties": {
  14662. "id": {
  14663. "type": "string",
  14664. "pattern": "^ses"
  14665. },
  14666. "slug": {
  14667. "type": "string"
  14668. },
  14669. "projectID": {
  14670. "type": "string"
  14671. },
  14672. "workspaceID": {
  14673. "type": "string",
  14674. "pattern": "^wrk"
  14675. },
  14676. "directory": {
  14677. "type": "string"
  14678. },
  14679. "path": {
  14680. "type": "string"
  14681. },
  14682. "parentID": {
  14683. "type": "string",
  14684. "pattern": "^ses"
  14685. },
  14686. "summary": {
  14687. "type": "object",
  14688. "properties": {
  14689. "additions": {
  14690. "type": "number"
  14691. },
  14692. "deletions": {
  14693. "type": "number"
  14694. },
  14695. "files": {
  14696. "type": "number"
  14697. },
  14698. "diffs": {
  14699. "type": "array",
  14700. "items": {
  14701. "$ref": "#/components/schemas/SnapshotFileDiff"
  14702. }
  14703. }
  14704. },
  14705. "required": ["additions", "deletions", "files"],
  14706. "additionalProperties": false
  14707. },
  14708. "cost": {
  14709. "type": "number"
  14710. },
  14711. "tokens": {
  14712. "type": "object",
  14713. "properties": {
  14714. "input": {
  14715. "type": "number"
  14716. },
  14717. "output": {
  14718. "type": "number"
  14719. },
  14720. "reasoning": {
  14721. "type": "number"
  14722. },
  14723. "cache": {
  14724. "type": "object",
  14725. "properties": {
  14726. "read": {
  14727. "type": "number"
  14728. },
  14729. "write": {
  14730. "type": "number"
  14731. }
  14732. },
  14733. "required": ["read", "write"],
  14734. "additionalProperties": false
  14735. }
  14736. },
  14737. "required": ["input", "output", "reasoning", "cache"],
  14738. "additionalProperties": false
  14739. },
  14740. "share": {
  14741. "type": "object",
  14742. "properties": {
  14743. "url": {
  14744. "type": "string"
  14745. }
  14746. },
  14747. "required": ["url"],
  14748. "additionalProperties": false
  14749. },
  14750. "title": {
  14751. "type": "string"
  14752. },
  14753. "agent": {
  14754. "type": "string"
  14755. },
  14756. "model": {
  14757. "type": "object",
  14758. "properties": {
  14759. "id": {
  14760. "type": "string"
  14761. },
  14762. "providerID": {
  14763. "type": "string"
  14764. },
  14765. "variant": {
  14766. "type": "string"
  14767. }
  14768. },
  14769. "required": ["id", "providerID"],
  14770. "additionalProperties": false
  14771. },
  14772. "version": {
  14773. "type": "string"
  14774. },
  14775. "time": {
  14776. "type": "object",
  14777. "properties": {
  14778. "created": {
  14779. "type": "integer",
  14780. "minimum": 0
  14781. },
  14782. "updated": {
  14783. "type": "integer",
  14784. "minimum": 0
  14785. },
  14786. "compacting": {
  14787. "type": "integer",
  14788. "minimum": 0
  14789. },
  14790. "archived": {
  14791. "type": "number"
  14792. }
  14793. },
  14794. "required": ["created", "updated"],
  14795. "additionalProperties": false
  14796. },
  14797. "permission": {
  14798. "$ref": "#/components/schemas/PermissionRuleset"
  14799. },
  14800. "revert": {
  14801. "type": "object",
  14802. "properties": {
  14803. "messageID": {
  14804. "type": "string",
  14805. "pattern": "^msg"
  14806. },
  14807. "partID": {
  14808. "type": "string",
  14809. "pattern": "^prt"
  14810. },
  14811. "snapshot": {
  14812. "type": "string"
  14813. },
  14814. "diff": {
  14815. "type": "string"
  14816. }
  14817. },
  14818. "required": ["messageID"],
  14819. "additionalProperties": false
  14820. },
  14821. "project": {
  14822. "anyOf": [
  14823. {
  14824. "$ref": "#/components/schemas/ProjectSummary"
  14825. },
  14826. {
  14827. "type": "null"
  14828. }
  14829. ]
  14830. }
  14831. },
  14832. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14833. "additionalProperties": false
  14834. },
  14835. "McpResource": {
  14836. "type": "object",
  14837. "properties": {
  14838. "name": {
  14839. "type": "string"
  14840. },
  14841. "uri": {
  14842. "type": "string"
  14843. },
  14844. "description": {
  14845. "type": "string"
  14846. },
  14847. "mimeType": {
  14848. "type": "string"
  14849. },
  14850. "client": {
  14851. "type": "string"
  14852. }
  14853. },
  14854. "required": ["name", "uri", "client"],
  14855. "additionalProperties": false
  14856. },
  14857. "Symbol": {
  14858. "type": "object",
  14859. "properties": {
  14860. "name": {
  14861. "type": "string"
  14862. },
  14863. "kind": {
  14864. "type": "integer",
  14865. "minimum": 0
  14866. },
  14867. "location": {
  14868. "type": "object",
  14869. "properties": {
  14870. "uri": {
  14871. "type": "string"
  14872. },
  14873. "range": {
  14874. "$ref": "#/components/schemas/Range"
  14875. }
  14876. },
  14877. "required": ["uri", "range"],
  14878. "additionalProperties": false
  14879. }
  14880. },
  14881. "required": ["name", "kind", "location"],
  14882. "additionalProperties": false
  14883. },
  14884. "FileNode": {
  14885. "type": "object",
  14886. "properties": {
  14887. "name": {
  14888. "type": "string"
  14889. },
  14890. "path": {
  14891. "type": "string"
  14892. },
  14893. "absolute": {
  14894. "type": "string"
  14895. },
  14896. "type": {
  14897. "type": "string",
  14898. "enum": ["file", "directory"]
  14899. },
  14900. "ignored": {
  14901. "type": "boolean"
  14902. }
  14903. },
  14904. "required": ["name", "path", "absolute", "type", "ignored"],
  14905. "additionalProperties": false
  14906. },
  14907. "FileContent": {
  14908. "type": "object",
  14909. "properties": {
  14910. "type": {
  14911. "type": "string",
  14912. "enum": ["text", "binary"]
  14913. },
  14914. "content": {
  14915. "type": "string"
  14916. },
  14917. "diff": {
  14918. "type": "string"
  14919. },
  14920. "patch": {
  14921. "type": "object",
  14922. "properties": {
  14923. "oldFileName": {
  14924. "type": "string"
  14925. },
  14926. "newFileName": {
  14927. "type": "string"
  14928. },
  14929. "oldHeader": {
  14930. "type": "string"
  14931. },
  14932. "newHeader": {
  14933. "type": "string"
  14934. },
  14935. "hunks": {
  14936. "type": "array",
  14937. "items": {
  14938. "type": "object",
  14939. "properties": {
  14940. "oldStart": {
  14941. "type": "integer",
  14942. "minimum": 0
  14943. },
  14944. "oldLines": {
  14945. "type": "integer",
  14946. "minimum": 0
  14947. },
  14948. "newStart": {
  14949. "type": "integer",
  14950. "minimum": 0
  14951. },
  14952. "newLines": {
  14953. "type": "integer",
  14954. "minimum": 0
  14955. },
  14956. "lines": {
  14957. "type": "array",
  14958. "items": {
  14959. "type": "string"
  14960. }
  14961. }
  14962. },
  14963. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  14964. "additionalProperties": false
  14965. }
  14966. },
  14967. "index": {
  14968. "type": "string"
  14969. }
  14970. },
  14971. "required": ["oldFileName", "newFileName", "hunks"],
  14972. "additionalProperties": false
  14973. },
  14974. "encoding": {
  14975. "type": "string",
  14976. "enum": ["base64"]
  14977. },
  14978. "mimeType": {
  14979. "type": "string"
  14980. }
  14981. },
  14982. "required": ["type", "content"],
  14983. "additionalProperties": false
  14984. },
  14985. "File": {
  14986. "type": "object",
  14987. "properties": {
  14988. "path": {
  14989. "type": "string"
  14990. },
  14991. "added": {
  14992. "type": "integer",
  14993. "minimum": 0
  14994. },
  14995. "removed": {
  14996. "type": "integer",
  14997. "minimum": 0
  14998. },
  14999. "status": {
  15000. "type": "string",
  15001. "enum": ["added", "deleted", "modified"]
  15002. }
  15003. },
  15004. "required": ["path", "added", "removed", "status"],
  15005. "additionalProperties": false
  15006. },
  15007. "Path": {
  15008. "type": "object",
  15009. "properties": {
  15010. "home": {
  15011. "type": "string"
  15012. },
  15013. "state": {
  15014. "type": "string"
  15015. },
  15016. "config": {
  15017. "type": "string"
  15018. },
  15019. "worktree": {
  15020. "type": "string"
  15021. },
  15022. "directory": {
  15023. "type": "string"
  15024. }
  15025. },
  15026. "required": ["home", "state", "config", "worktree", "directory"],
  15027. "additionalProperties": false
  15028. },
  15029. "VcsInfo": {
  15030. "type": "object",
  15031. "properties": {
  15032. "branch": {
  15033. "type": "string"
  15034. },
  15035. "default_branch": {
  15036. "type": "string"
  15037. }
  15038. },
  15039. "additionalProperties": false
  15040. },
  15041. "VcsFileStatus": {
  15042. "type": "object",
  15043. "properties": {
  15044. "file": {
  15045. "type": "string"
  15046. },
  15047. "additions": {
  15048. "type": "number"
  15049. },
  15050. "deletions": {
  15051. "type": "number"
  15052. },
  15053. "status": {
  15054. "type": "string",
  15055. "enum": ["added", "deleted", "modified"]
  15056. }
  15057. },
  15058. "required": ["file", "additions", "deletions", "status"],
  15059. "additionalProperties": false
  15060. },
  15061. "VcsFileDiff": {
  15062. "type": "object",
  15063. "properties": {
  15064. "file": {
  15065. "type": "string"
  15066. },
  15067. "patch": {
  15068. "type": "string"
  15069. },
  15070. "additions": {
  15071. "type": "number"
  15072. },
  15073. "deletions": {
  15074. "type": "number"
  15075. },
  15076. "status": {
  15077. "type": "string",
  15078. "enum": ["added", "deleted", "modified"]
  15079. }
  15080. },
  15081. "required": ["file", "additions", "deletions"],
  15082. "additionalProperties": false
  15083. },
  15084. "VcsApplyError": {
  15085. "type": "object",
  15086. "properties": {
  15087. "name": {
  15088. "type": "string",
  15089. "enum": ["VcsApplyError"]
  15090. },
  15091. "data": {
  15092. "type": "object",
  15093. "properties": {
  15094. "message": {
  15095. "type": "string"
  15096. },
  15097. "reason": {
  15098. "type": "string",
  15099. "enum": ["non-git", "not-clean"]
  15100. }
  15101. },
  15102. "required": ["message", "reason"],
  15103. "additionalProperties": false
  15104. }
  15105. },
  15106. "required": ["name", "data"],
  15107. "additionalProperties": false
  15108. },
  15109. "Command": {
  15110. "type": "object",
  15111. "properties": {
  15112. "name": {
  15113. "type": "string"
  15114. },
  15115. "description": {
  15116. "type": "string"
  15117. },
  15118. "agent": {
  15119. "type": "string"
  15120. },
  15121. "model": {
  15122. "type": "string"
  15123. },
  15124. "source": {
  15125. "type": "string",
  15126. "enum": ["command", "mcp", "skill"]
  15127. },
  15128. "template": {
  15129. "type": "string"
  15130. },
  15131. "subtask": {
  15132. "type": "boolean"
  15133. },
  15134. "hints": {
  15135. "type": "array",
  15136. "items": {
  15137. "type": "string"
  15138. }
  15139. }
  15140. },
  15141. "required": ["name", "template", "hints"],
  15142. "additionalProperties": false
  15143. },
  15144. "Agent": {
  15145. "type": "object",
  15146. "properties": {
  15147. "name": {
  15148. "type": "string"
  15149. },
  15150. "description": {
  15151. "type": "string"
  15152. },
  15153. "mode": {
  15154. "type": "string",
  15155. "enum": ["subagent", "primary", "all"]
  15156. },
  15157. "native": {
  15158. "type": "boolean"
  15159. },
  15160. "hidden": {
  15161. "type": "boolean"
  15162. },
  15163. "topP": {
  15164. "type": "number"
  15165. },
  15166. "temperature": {
  15167. "type": "number"
  15168. },
  15169. "color": {
  15170. "type": "string"
  15171. },
  15172. "permission": {
  15173. "$ref": "#/components/schemas/PermissionRuleset"
  15174. },
  15175. "model": {
  15176. "type": "object",
  15177. "properties": {
  15178. "modelID": {
  15179. "type": "string"
  15180. },
  15181. "providerID": {
  15182. "type": "string"
  15183. }
  15184. },
  15185. "required": ["modelID", "providerID"],
  15186. "additionalProperties": false
  15187. },
  15188. "variant": {
  15189. "type": "string"
  15190. },
  15191. "prompt": {
  15192. "type": "string"
  15193. },
  15194. "options": {
  15195. "type": "object"
  15196. },
  15197. "steps": {
  15198. "type": "number"
  15199. }
  15200. },
  15201. "required": ["name", "mode", "permission", "options"],
  15202. "additionalProperties": false
  15203. },
  15204. "LSPStatus": {
  15205. "type": "object",
  15206. "properties": {
  15207. "id": {
  15208. "type": "string"
  15209. },
  15210. "name": {
  15211. "type": "string"
  15212. },
  15213. "root": {
  15214. "type": "string"
  15215. },
  15216. "status": {
  15217. "type": "string",
  15218. "enum": ["connected", "error"]
  15219. }
  15220. },
  15221. "required": ["id", "name", "root", "status"],
  15222. "additionalProperties": false
  15223. },
  15224. "FormatterStatus": {
  15225. "type": "object",
  15226. "properties": {
  15227. "name": {
  15228. "type": "string"
  15229. },
  15230. "extensions": {
  15231. "type": "array",
  15232. "items": {
  15233. "type": "string"
  15234. }
  15235. },
  15236. "enabled": {
  15237. "type": "boolean"
  15238. }
  15239. },
  15240. "required": ["name", "extensions", "enabled"],
  15241. "additionalProperties": false
  15242. },
  15243. "MCPStatusConnected": {
  15244. "type": "object",
  15245. "properties": {
  15246. "status": {
  15247. "type": "string",
  15248. "enum": ["connected"]
  15249. }
  15250. },
  15251. "required": ["status"],
  15252. "additionalProperties": false
  15253. },
  15254. "MCPStatusDisabled": {
  15255. "type": "object",
  15256. "properties": {
  15257. "status": {
  15258. "type": "string",
  15259. "enum": ["disabled"]
  15260. }
  15261. },
  15262. "required": ["status"],
  15263. "additionalProperties": false
  15264. },
  15265. "MCPStatusFailed": {
  15266. "type": "object",
  15267. "properties": {
  15268. "status": {
  15269. "type": "string",
  15270. "enum": ["failed"]
  15271. },
  15272. "error": {
  15273. "type": "string"
  15274. }
  15275. },
  15276. "required": ["status", "error"],
  15277. "additionalProperties": false
  15278. },
  15279. "MCPStatusNeedsAuth": {
  15280. "type": "object",
  15281. "properties": {
  15282. "status": {
  15283. "type": "string",
  15284. "enum": ["needs_auth"]
  15285. }
  15286. },
  15287. "required": ["status"],
  15288. "additionalProperties": false
  15289. },
  15290. "MCPStatusNeedsClientRegistration": {
  15291. "type": "object",
  15292. "properties": {
  15293. "status": {
  15294. "type": "string",
  15295. "enum": ["needs_client_registration"]
  15296. },
  15297. "error": {
  15298. "type": "string"
  15299. }
  15300. },
  15301. "required": ["status", "error"],
  15302. "additionalProperties": false
  15303. },
  15304. "MCPStatus": {
  15305. "anyOf": [
  15306. {
  15307. "$ref": "#/components/schemas/MCPStatusConnected"
  15308. },
  15309. {
  15310. "$ref": "#/components/schemas/MCPStatusDisabled"
  15311. },
  15312. {
  15313. "$ref": "#/components/schemas/MCPStatusFailed"
  15314. },
  15315. {
  15316. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15317. },
  15318. {
  15319. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15320. }
  15321. ]
  15322. },
  15323. "McpUnsupportedOAuthError": {
  15324. "type": "object",
  15325. "properties": {
  15326. "error": {
  15327. "type": "string"
  15328. }
  15329. },
  15330. "required": ["error"],
  15331. "additionalProperties": false
  15332. },
  15333. "NotFoundError": {
  15334. "type": "object",
  15335. "required": ["name", "data"],
  15336. "properties": {
  15337. "name": {
  15338. "type": "string",
  15339. "enum": ["NotFoundError"]
  15340. },
  15341. "data": {
  15342. "type": "object",
  15343. "required": ["message"],
  15344. "properties": {
  15345. "message": {
  15346. "type": "string"
  15347. }
  15348. }
  15349. }
  15350. }
  15351. },
  15352. "effect_HttpApiError_Forbidden": {
  15353. "type": "object",
  15354. "properties": {
  15355. "_tag": {
  15356. "type": "string",
  15357. "enum": ["Forbidden"]
  15358. }
  15359. },
  15360. "required": ["_tag"],
  15361. "additionalProperties": false
  15362. },
  15363. "ProviderAuthMethod": {
  15364. "type": "object",
  15365. "properties": {
  15366. "type": {
  15367. "type": "string",
  15368. "enum": ["oauth", "api"]
  15369. },
  15370. "label": {
  15371. "type": "string"
  15372. },
  15373. "prompts": {
  15374. "type": "array",
  15375. "items": {
  15376. "anyOf": [
  15377. {
  15378. "type": "object",
  15379. "properties": {
  15380. "type": {
  15381. "type": "string",
  15382. "enum": ["text"]
  15383. },
  15384. "key": {
  15385. "type": "string"
  15386. },
  15387. "message": {
  15388. "type": "string"
  15389. },
  15390. "placeholder": {
  15391. "type": "string"
  15392. },
  15393. "when": {
  15394. "type": "object",
  15395. "properties": {
  15396. "key": {
  15397. "type": "string"
  15398. },
  15399. "op": {
  15400. "type": "string",
  15401. "enum": ["eq", "neq"]
  15402. },
  15403. "value": {
  15404. "type": "string"
  15405. }
  15406. },
  15407. "required": ["key", "op", "value"],
  15408. "additionalProperties": false
  15409. }
  15410. },
  15411. "required": ["type", "key", "message"],
  15412. "additionalProperties": false
  15413. },
  15414. {
  15415. "type": "object",
  15416. "properties": {
  15417. "type": {
  15418. "type": "string",
  15419. "enum": ["select"]
  15420. },
  15421. "key": {
  15422. "type": "string"
  15423. },
  15424. "message": {
  15425. "type": "string"
  15426. },
  15427. "options": {
  15428. "type": "array",
  15429. "items": {
  15430. "type": "object",
  15431. "properties": {
  15432. "label": {
  15433. "type": "string"
  15434. },
  15435. "value": {
  15436. "type": "string"
  15437. },
  15438. "hint": {
  15439. "type": "string"
  15440. }
  15441. },
  15442. "required": ["label", "value"],
  15443. "additionalProperties": false
  15444. }
  15445. },
  15446. "when": {
  15447. "type": "object",
  15448. "properties": {
  15449. "key": {
  15450. "type": "string"
  15451. },
  15452. "op": {
  15453. "type": "string",
  15454. "enum": ["eq", "neq"]
  15455. },
  15456. "value": {
  15457. "type": "string"
  15458. }
  15459. },
  15460. "required": ["key", "op", "value"],
  15461. "additionalProperties": false
  15462. }
  15463. },
  15464. "required": ["type", "key", "message", "options"],
  15465. "additionalProperties": false
  15466. }
  15467. ]
  15468. }
  15469. }
  15470. },
  15471. "required": ["type", "label"],
  15472. "additionalProperties": false
  15473. },
  15474. "ProviderAuthAuthorization": {
  15475. "type": "object",
  15476. "properties": {
  15477. "url": {
  15478. "type": "string"
  15479. },
  15480. "method": {
  15481. "type": "string",
  15482. "enum": ["auto", "code"]
  15483. },
  15484. "instructions": {
  15485. "type": "string"
  15486. }
  15487. },
  15488. "required": ["url", "method", "instructions"],
  15489. "additionalProperties": false
  15490. },
  15491. "ProviderAuthError1": {
  15492. "type": "object",
  15493. "properties": {
  15494. "name": {
  15495. "type": "string",
  15496. "enum": [
  15497. "BadRequest",
  15498. "ProviderAuthOauthMissing",
  15499. "ProviderAuthOauthCodeMissing",
  15500. "ProviderAuthOauthCallbackFailed",
  15501. "ProviderAuthValidationFailed"
  15502. ]
  15503. },
  15504. "data": {
  15505. "type": "object",
  15506. "properties": {
  15507. "providerID": {
  15508. "type": "string"
  15509. },
  15510. "field": {
  15511. "type": "string"
  15512. },
  15513. "message": {
  15514. "type": "string"
  15515. },
  15516. "kind": {
  15517. "type": "string"
  15518. }
  15519. },
  15520. "additionalProperties": false
  15521. }
  15522. },
  15523. "required": ["name", "data"],
  15524. "additionalProperties": false
  15525. },
  15526. "TextPartInput": {
  15527. "type": "object",
  15528. "properties": {
  15529. "id": {
  15530. "type": "string",
  15531. "pattern": "^prt"
  15532. },
  15533. "type": {
  15534. "type": "string",
  15535. "enum": ["text"]
  15536. },
  15537. "text": {
  15538. "type": "string"
  15539. },
  15540. "synthetic": {
  15541. "type": "boolean"
  15542. },
  15543. "ignored": {
  15544. "type": "boolean"
  15545. },
  15546. "time": {
  15547. "type": "object",
  15548. "properties": {
  15549. "start": {
  15550. "type": "integer",
  15551. "minimum": 0
  15552. },
  15553. "end": {
  15554. "type": "integer",
  15555. "minimum": 0
  15556. }
  15557. },
  15558. "required": ["start"],
  15559. "additionalProperties": false
  15560. },
  15561. "metadata": {
  15562. "type": "object"
  15563. }
  15564. },
  15565. "required": ["type", "text"],
  15566. "additionalProperties": false
  15567. },
  15568. "FilePartInput": {
  15569. "type": "object",
  15570. "properties": {
  15571. "id": {
  15572. "type": "string",
  15573. "pattern": "^prt"
  15574. },
  15575. "type": {
  15576. "type": "string",
  15577. "enum": ["file"]
  15578. },
  15579. "mime": {
  15580. "type": "string"
  15581. },
  15582. "filename": {
  15583. "type": "string"
  15584. },
  15585. "url": {
  15586. "type": "string"
  15587. },
  15588. "source": {
  15589. "$ref": "#/components/schemas/FilePartSource"
  15590. }
  15591. },
  15592. "required": ["type", "mime", "url"],
  15593. "additionalProperties": false
  15594. },
  15595. "AgentPartInput": {
  15596. "type": "object",
  15597. "properties": {
  15598. "id": {
  15599. "type": "string",
  15600. "pattern": "^prt"
  15601. },
  15602. "type": {
  15603. "type": "string",
  15604. "enum": ["agent"]
  15605. },
  15606. "name": {
  15607. "type": "string"
  15608. },
  15609. "source": {
  15610. "type": "object",
  15611. "properties": {
  15612. "value": {
  15613. "type": "string"
  15614. },
  15615. "start": {
  15616. "type": "integer",
  15617. "minimum": 0
  15618. },
  15619. "end": {
  15620. "type": "integer",
  15621. "minimum": 0
  15622. }
  15623. },
  15624. "required": ["value", "start", "end"],
  15625. "additionalProperties": false
  15626. }
  15627. },
  15628. "required": ["type", "name"],
  15629. "additionalProperties": false
  15630. },
  15631. "SubtaskPartInput": {
  15632. "type": "object",
  15633. "properties": {
  15634. "id": {
  15635. "type": "string",
  15636. "pattern": "^prt"
  15637. },
  15638. "type": {
  15639. "type": "string",
  15640. "enum": ["subtask"]
  15641. },
  15642. "prompt": {
  15643. "type": "string"
  15644. },
  15645. "description": {
  15646. "type": "string"
  15647. },
  15648. "agent": {
  15649. "type": "string"
  15650. },
  15651. "model": {
  15652. "type": "object",
  15653. "properties": {
  15654. "providerID": {
  15655. "type": "string"
  15656. },
  15657. "modelID": {
  15658. "type": "string"
  15659. }
  15660. },
  15661. "required": ["providerID", "modelID"],
  15662. "additionalProperties": false
  15663. },
  15664. "command": {
  15665. "type": "string"
  15666. }
  15667. },
  15668. "required": ["type", "prompt", "description", "agent"],
  15669. "additionalProperties": false
  15670. },
  15671. "V2SessionsResponse": {
  15672. "type": "object",
  15673. "properties": {
  15674. "items": {
  15675. "type": "array",
  15676. "items": {
  15677. "$ref": "#/components/schemas/SessionInfo"
  15678. }
  15679. },
  15680. "cursor": {
  15681. "type": "object",
  15682. "properties": {
  15683. "previous": {
  15684. "type": "string"
  15685. },
  15686. "next": {
  15687. "type": "string"
  15688. }
  15689. },
  15690. "additionalProperties": false
  15691. }
  15692. },
  15693. "required": ["items", "cursor"],
  15694. "additionalProperties": false
  15695. },
  15696. "InvalidCursorError": {
  15697. "type": "object",
  15698. "properties": {
  15699. "_tag": {
  15700. "type": "string",
  15701. "enum": ["InvalidCursorError"]
  15702. },
  15703. "message": {
  15704. "type": "string"
  15705. }
  15706. },
  15707. "required": ["_tag", "message"],
  15708. "additionalProperties": false
  15709. },
  15710. "UnauthorizedError": {
  15711. "type": "object",
  15712. "properties": {
  15713. "_tag": {
  15714. "type": "string",
  15715. "enum": ["UnauthorizedError"]
  15716. },
  15717. "message": {
  15718. "type": "string"
  15719. }
  15720. },
  15721. "required": ["_tag", "message"],
  15722. "additionalProperties": false
  15723. },
  15724. "SessionNotFoundError": {
  15725. "type": "object",
  15726. "properties": {
  15727. "_tag": {
  15728. "type": "string",
  15729. "enum": ["SessionNotFoundError"]
  15730. },
  15731. "sessionID": {
  15732. "type": "string"
  15733. },
  15734. "message": {
  15735. "type": "string"
  15736. }
  15737. },
  15738. "required": ["_tag", "sessionID", "message"],
  15739. "additionalProperties": false
  15740. },
  15741. "ServiceUnavailableError": {
  15742. "type": "object",
  15743. "properties": {
  15744. "_tag": {
  15745. "type": "string",
  15746. "enum": ["ServiceUnavailableError"]
  15747. },
  15748. "message": {
  15749. "type": "string"
  15750. },
  15751. "service": {
  15752. "type": "string"
  15753. }
  15754. },
  15755. "required": ["_tag", "message"],
  15756. "additionalProperties": false
  15757. },
  15758. "UnknownError1": {
  15759. "type": "object",
  15760. "properties": {
  15761. "_tag": {
  15762. "type": "string",
  15763. "enum": ["UnknownError"]
  15764. },
  15765. "message": {
  15766. "type": "string"
  15767. },
  15768. "ref": {
  15769. "type": "string"
  15770. }
  15771. },
  15772. "required": ["_tag", "message"],
  15773. "additionalProperties": false
  15774. },
  15775. "V2SessionMessagesResponse": {
  15776. "type": "object",
  15777. "properties": {
  15778. "items": {
  15779. "type": "array",
  15780. "items": {
  15781. "$ref": "#/components/schemas/SessionMessage"
  15782. }
  15783. },
  15784. "cursor": {
  15785. "type": "object",
  15786. "properties": {
  15787. "previous": {
  15788. "type": "string"
  15789. },
  15790. "next": {
  15791. "type": "string"
  15792. }
  15793. },
  15794. "additionalProperties": false
  15795. }
  15796. },
  15797. "required": ["items", "cursor"],
  15798. "additionalProperties": false
  15799. },
  15800. "ProviderNotFoundError": {
  15801. "type": "object",
  15802. "properties": {
  15803. "_tag": {
  15804. "type": "string",
  15805. "enum": ["ProviderNotFoundError"]
  15806. },
  15807. "providerID": {
  15808. "type": "string"
  15809. },
  15810. "message": {
  15811. "type": "string"
  15812. }
  15813. },
  15814. "required": ["_tag", "providerID", "message"],
  15815. "additionalProperties": false
  15816. },
  15817. "EventTuiPromptAppend": {
  15818. "type": "object",
  15819. "properties": {
  15820. "type": {
  15821. "type": "string",
  15822. "enum": ["tui.prompt.append"]
  15823. },
  15824. "properties": {
  15825. "type": "object",
  15826. "properties": {
  15827. "text": {
  15828. "type": "string"
  15829. }
  15830. },
  15831. "required": ["text"],
  15832. "additionalProperties": false
  15833. }
  15834. },
  15835. "required": ["type", "properties"],
  15836. "additionalProperties": false
  15837. },
  15838. "EventTuiCommandExecute": {
  15839. "type": "object",
  15840. "properties": {
  15841. "type": {
  15842. "type": "string",
  15843. "enum": ["tui.command.execute"]
  15844. },
  15845. "properties": {
  15846. "type": "object",
  15847. "properties": {
  15848. "command": {
  15849. "anyOf": [
  15850. {
  15851. "type": "string",
  15852. "enum": [
  15853. "session.list",
  15854. "session.new",
  15855. "session.share",
  15856. "session.interrupt",
  15857. "session.compact",
  15858. "session.page.up",
  15859. "session.page.down",
  15860. "session.line.up",
  15861. "session.line.down",
  15862. "session.half.page.up",
  15863. "session.half.page.down",
  15864. "session.first",
  15865. "session.last",
  15866. "prompt.clear",
  15867. "prompt.submit",
  15868. "agent.cycle"
  15869. ]
  15870. },
  15871. {
  15872. "type": "string"
  15873. }
  15874. ]
  15875. }
  15876. },
  15877. "required": ["command"],
  15878. "additionalProperties": false
  15879. }
  15880. },
  15881. "required": ["type", "properties"],
  15882. "additionalProperties": false
  15883. },
  15884. "EventTuiToastShow": {
  15885. "type": "object",
  15886. "properties": {
  15887. "type": {
  15888. "type": "string",
  15889. "enum": ["tui.toast.show"]
  15890. },
  15891. "properties": {
  15892. "type": "object",
  15893. "properties": {
  15894. "title": {
  15895. "type": "string"
  15896. },
  15897. "message": {
  15898. "type": "string"
  15899. },
  15900. "variant": {
  15901. "type": "string",
  15902. "enum": ["info", "success", "warning", "error"]
  15903. },
  15904. "duration": {
  15905. "type": "integer",
  15906. "exclusiveMinimum": 0
  15907. }
  15908. },
  15909. "required": ["message", "variant"],
  15910. "additionalProperties": false
  15911. }
  15912. },
  15913. "required": ["type", "properties"],
  15914. "additionalProperties": false
  15915. },
  15916. "EventTuiSessionSelect": {
  15917. "type": "object",
  15918. "properties": {
  15919. "type": {
  15920. "type": "string",
  15921. "enum": ["tui.session.select"]
  15922. },
  15923. "properties": {
  15924. "type": "object",
  15925. "properties": {
  15926. "sessionID": {
  15927. "type": "string",
  15928. "pattern": "^ses",
  15929. "description": "Session ID to navigate to"
  15930. }
  15931. },
  15932. "required": ["sessionID"],
  15933. "additionalProperties": false
  15934. }
  15935. },
  15936. "required": ["type", "properties"],
  15937. "additionalProperties": false
  15938. },
  15939. "Workspace": {
  15940. "type": "object",
  15941. "properties": {
  15942. "id": {
  15943. "type": "string",
  15944. "pattern": "^wrk"
  15945. },
  15946. "type": {
  15947. "type": "string"
  15948. },
  15949. "name": {
  15950. "type": "string"
  15951. },
  15952. "branch": {
  15953. "anyOf": [
  15954. {
  15955. "type": "string"
  15956. },
  15957. {
  15958. "type": "null"
  15959. }
  15960. ]
  15961. },
  15962. "directory": {
  15963. "anyOf": [
  15964. {
  15965. "type": "string"
  15966. },
  15967. {
  15968. "type": "null"
  15969. }
  15970. ]
  15971. },
  15972. "extra": {
  15973. "anyOf": [
  15974. {},
  15975. {
  15976. "type": "null"
  15977. }
  15978. ]
  15979. },
  15980. "projectID": {
  15981. "type": "string"
  15982. },
  15983. "timeUsed": {
  15984. "anyOf": [
  15985. {
  15986. "type": "number"
  15987. },
  15988. {
  15989. "type": "string",
  15990. "enum": ["NaN"]
  15991. },
  15992. {
  15993. "type": "string",
  15994. "enum": ["Infinity"]
  15995. },
  15996. {
  15997. "type": "string",
  15998. "enum": ["-Infinity"]
  15999. },
  16000. {
  16001. "type": "string",
  16002. "enum": ["Infinity", "-Infinity", "NaN"]
  16003. }
  16004. ]
  16005. }
  16006. },
  16007. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16008. "additionalProperties": false
  16009. },
  16010. "WorkspaceWarpError": {
  16011. "type": "object",
  16012. "properties": {
  16013. "name": {
  16014. "type": "string",
  16015. "enum": ["WorkspaceWarpError"]
  16016. },
  16017. "data": {
  16018. "type": "object",
  16019. "properties": {
  16020. "message": {
  16021. "type": "string"
  16022. }
  16023. },
  16024. "required": ["message"],
  16025. "additionalProperties": false
  16026. }
  16027. },
  16028. "required": ["name", "data"],
  16029. "additionalProperties": false
  16030. },
  16031. "SyncEventMessageUpdated": {
  16032. "type": "object",
  16033. "properties": {
  16034. "type": {
  16035. "type": "string",
  16036. "enum": ["sync"]
  16037. },
  16038. "name": {
  16039. "type": "string",
  16040. "enum": ["message.updated.1"]
  16041. },
  16042. "id": {
  16043. "type": "string"
  16044. },
  16045. "seq": {
  16046. "type": "number"
  16047. },
  16048. "aggregateID": {
  16049. "type": "string",
  16050. "enum": ["sessionID"]
  16051. },
  16052. "data": {
  16053. "type": "object",
  16054. "properties": {
  16055. "sessionID": {
  16056. "type": "string",
  16057. "pattern": "^ses"
  16058. },
  16059. "info": {
  16060. "$ref": "#/components/schemas/Message"
  16061. }
  16062. },
  16063. "required": ["sessionID", "info"],
  16064. "additionalProperties": false
  16065. }
  16066. },
  16067. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16068. "additionalProperties": false
  16069. },
  16070. "SyncEventMessageRemoved": {
  16071. "type": "object",
  16072. "properties": {
  16073. "type": {
  16074. "type": "string",
  16075. "enum": ["sync"]
  16076. },
  16077. "name": {
  16078. "type": "string",
  16079. "enum": ["message.removed.1"]
  16080. },
  16081. "id": {
  16082. "type": "string"
  16083. },
  16084. "seq": {
  16085. "type": "number"
  16086. },
  16087. "aggregateID": {
  16088. "type": "string",
  16089. "enum": ["sessionID"]
  16090. },
  16091. "data": {
  16092. "type": "object",
  16093. "properties": {
  16094. "sessionID": {
  16095. "type": "string",
  16096. "pattern": "^ses"
  16097. },
  16098. "messageID": {
  16099. "type": "string",
  16100. "pattern": "^msg"
  16101. }
  16102. },
  16103. "required": ["sessionID", "messageID"],
  16104. "additionalProperties": false
  16105. }
  16106. },
  16107. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16108. "additionalProperties": false
  16109. },
  16110. "SyncEventMessagePartUpdated": {
  16111. "type": "object",
  16112. "properties": {
  16113. "type": {
  16114. "type": "string",
  16115. "enum": ["sync"]
  16116. },
  16117. "name": {
  16118. "type": "string",
  16119. "enum": ["message.part.updated.1"]
  16120. },
  16121. "id": {
  16122. "type": "string"
  16123. },
  16124. "seq": {
  16125. "type": "number"
  16126. },
  16127. "aggregateID": {
  16128. "type": "string",
  16129. "enum": ["sessionID"]
  16130. },
  16131. "data": {
  16132. "type": "object",
  16133. "properties": {
  16134. "sessionID": {
  16135. "type": "string",
  16136. "pattern": "^ses"
  16137. },
  16138. "part": {
  16139. "$ref": "#/components/schemas/Part"
  16140. },
  16141. "time": {
  16142. "type": "integer",
  16143. "minimum": 0
  16144. }
  16145. },
  16146. "required": ["sessionID", "part", "time"],
  16147. "additionalProperties": false
  16148. }
  16149. },
  16150. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16151. "additionalProperties": false
  16152. },
  16153. "SyncEventMessagePartRemoved": {
  16154. "type": "object",
  16155. "properties": {
  16156. "type": {
  16157. "type": "string",
  16158. "enum": ["sync"]
  16159. },
  16160. "name": {
  16161. "type": "string",
  16162. "enum": ["message.part.removed.1"]
  16163. },
  16164. "id": {
  16165. "type": "string"
  16166. },
  16167. "seq": {
  16168. "type": "number"
  16169. },
  16170. "aggregateID": {
  16171. "type": "string",
  16172. "enum": ["sessionID"]
  16173. },
  16174. "data": {
  16175. "type": "object",
  16176. "properties": {
  16177. "sessionID": {
  16178. "type": "string",
  16179. "pattern": "^ses"
  16180. },
  16181. "messageID": {
  16182. "type": "string",
  16183. "pattern": "^msg"
  16184. },
  16185. "partID": {
  16186. "type": "string",
  16187. "pattern": "^prt"
  16188. }
  16189. },
  16190. "required": ["sessionID", "messageID", "partID"],
  16191. "additionalProperties": false
  16192. }
  16193. },
  16194. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16195. "additionalProperties": false
  16196. },
  16197. "SyncEventSessionCreated": {
  16198. "type": "object",
  16199. "properties": {
  16200. "type": {
  16201. "type": "string",
  16202. "enum": ["sync"]
  16203. },
  16204. "name": {
  16205. "type": "string",
  16206. "enum": ["session.created.1"]
  16207. },
  16208. "id": {
  16209. "type": "string"
  16210. },
  16211. "seq": {
  16212. "type": "number"
  16213. },
  16214. "aggregateID": {
  16215. "type": "string",
  16216. "enum": ["sessionID"]
  16217. },
  16218. "data": {
  16219. "type": "object",
  16220. "properties": {
  16221. "sessionID": {
  16222. "type": "string",
  16223. "pattern": "^ses"
  16224. },
  16225. "info": {
  16226. "$ref": "#/components/schemas/Session"
  16227. }
  16228. },
  16229. "required": ["sessionID", "info"],
  16230. "additionalProperties": false
  16231. }
  16232. },
  16233. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16234. "additionalProperties": false
  16235. },
  16236. "SyncEventSessionUpdated": {
  16237. "type": "object",
  16238. "properties": {
  16239. "type": {
  16240. "type": "string",
  16241. "enum": ["sync"]
  16242. },
  16243. "name": {
  16244. "type": "string",
  16245. "enum": ["session.updated.1"]
  16246. },
  16247. "id": {
  16248. "type": "string"
  16249. },
  16250. "seq": {
  16251. "type": "number"
  16252. },
  16253. "aggregateID": {
  16254. "type": "string",
  16255. "enum": ["sessionID"]
  16256. },
  16257. "data": {
  16258. "type": "object",
  16259. "properties": {
  16260. "sessionID": {
  16261. "type": "string",
  16262. "pattern": "^ses"
  16263. },
  16264. "info": {
  16265. "type": "object",
  16266. "properties": {
  16267. "id": {
  16268. "anyOf": [
  16269. {
  16270. "type": "string",
  16271. "pattern": "^ses"
  16272. },
  16273. {
  16274. "type": "null"
  16275. }
  16276. ]
  16277. },
  16278. "slug": {
  16279. "anyOf": [
  16280. {
  16281. "type": "string"
  16282. },
  16283. {
  16284. "type": "null"
  16285. }
  16286. ]
  16287. },
  16288. "projectID": {
  16289. "anyOf": [
  16290. {
  16291. "type": "string"
  16292. },
  16293. {
  16294. "type": "null"
  16295. }
  16296. ]
  16297. },
  16298. "workspaceID": {
  16299. "anyOf": [
  16300. {
  16301. "type": "string",
  16302. "pattern": "^wrk"
  16303. },
  16304. {
  16305. "type": "null"
  16306. }
  16307. ]
  16308. },
  16309. "directory": {
  16310. "anyOf": [
  16311. {
  16312. "type": "string"
  16313. },
  16314. {
  16315. "type": "null"
  16316. }
  16317. ]
  16318. },
  16319. "path": {
  16320. "anyOf": [
  16321. {
  16322. "type": "string"
  16323. },
  16324. {
  16325. "type": "null"
  16326. }
  16327. ]
  16328. },
  16329. "parentID": {
  16330. "anyOf": [
  16331. {
  16332. "type": "string",
  16333. "pattern": "^ses"
  16334. },
  16335. {
  16336. "type": "null"
  16337. }
  16338. ]
  16339. },
  16340. "summary": {
  16341. "anyOf": [
  16342. {
  16343. "type": "object",
  16344. "properties": {
  16345. "additions": {
  16346. "type": "number"
  16347. },
  16348. "deletions": {
  16349. "type": "number"
  16350. },
  16351. "files": {
  16352. "type": "number"
  16353. },
  16354. "diffs": {
  16355. "type": "array",
  16356. "items": {
  16357. "$ref": "#/components/schemas/SnapshotFileDiff"
  16358. }
  16359. }
  16360. },
  16361. "required": ["additions", "deletions", "files"],
  16362. "additionalProperties": false
  16363. },
  16364. {
  16365. "type": "null"
  16366. }
  16367. ]
  16368. },
  16369. "cost": {
  16370. "anyOf": [
  16371. {
  16372. "type": "number"
  16373. },
  16374. {
  16375. "type": "null"
  16376. }
  16377. ]
  16378. },
  16379. "tokens": {
  16380. "anyOf": [
  16381. {
  16382. "type": "object",
  16383. "properties": {
  16384. "input": {
  16385. "type": "number"
  16386. },
  16387. "output": {
  16388. "type": "number"
  16389. },
  16390. "reasoning": {
  16391. "type": "number"
  16392. },
  16393. "cache": {
  16394. "type": "object",
  16395. "properties": {
  16396. "read": {
  16397. "type": "number"
  16398. },
  16399. "write": {
  16400. "type": "number"
  16401. }
  16402. },
  16403. "required": ["read", "write"],
  16404. "additionalProperties": false
  16405. }
  16406. },
  16407. "required": ["input", "output", "reasoning", "cache"],
  16408. "additionalProperties": false
  16409. },
  16410. {
  16411. "type": "null"
  16412. }
  16413. ]
  16414. },
  16415. "share": {
  16416. "type": "object",
  16417. "properties": {
  16418. "url": {
  16419. "anyOf": [
  16420. {
  16421. "type": "string"
  16422. },
  16423. {
  16424. "type": "null"
  16425. }
  16426. ]
  16427. }
  16428. },
  16429. "additionalProperties": false
  16430. },
  16431. "title": {
  16432. "anyOf": [
  16433. {
  16434. "type": "string"
  16435. },
  16436. {
  16437. "type": "null"
  16438. }
  16439. ]
  16440. },
  16441. "agent": {
  16442. "anyOf": [
  16443. {
  16444. "type": "string"
  16445. },
  16446. {
  16447. "type": "null"
  16448. }
  16449. ]
  16450. },
  16451. "model": {
  16452. "anyOf": [
  16453. {
  16454. "type": "object",
  16455. "properties": {
  16456. "id": {
  16457. "type": "string"
  16458. },
  16459. "providerID": {
  16460. "type": "string"
  16461. },
  16462. "variant": {
  16463. "type": "string"
  16464. }
  16465. },
  16466. "required": ["id", "providerID"],
  16467. "additionalProperties": false
  16468. },
  16469. {
  16470. "type": "null"
  16471. }
  16472. ]
  16473. },
  16474. "version": {
  16475. "anyOf": [
  16476. {
  16477. "type": "string"
  16478. },
  16479. {
  16480. "type": "null"
  16481. }
  16482. ]
  16483. },
  16484. "time": {
  16485. "type": "object",
  16486. "properties": {
  16487. "created": {
  16488. "anyOf": [
  16489. {
  16490. "type": "integer",
  16491. "minimum": 0
  16492. },
  16493. {
  16494. "type": "null"
  16495. }
  16496. ]
  16497. },
  16498. "updated": {
  16499. "anyOf": [
  16500. {
  16501. "type": "integer",
  16502. "minimum": 0
  16503. },
  16504. {
  16505. "type": "null"
  16506. }
  16507. ]
  16508. },
  16509. "compacting": {
  16510. "anyOf": [
  16511. {
  16512. "type": "integer",
  16513. "minimum": 0
  16514. },
  16515. {
  16516. "type": "null"
  16517. }
  16518. ]
  16519. },
  16520. "archived": {
  16521. "anyOf": [
  16522. {
  16523. "type": "number"
  16524. },
  16525. {
  16526. "type": "null"
  16527. }
  16528. ]
  16529. }
  16530. },
  16531. "additionalProperties": false
  16532. },
  16533. "permission": {
  16534. "anyOf": [
  16535. {
  16536. "$ref": "#/components/schemas/PermissionRuleset"
  16537. },
  16538. {
  16539. "type": "null"
  16540. }
  16541. ]
  16542. },
  16543. "revert": {
  16544. "anyOf": [
  16545. {
  16546. "type": "object",
  16547. "properties": {
  16548. "messageID": {
  16549. "type": "string",
  16550. "pattern": "^msg"
  16551. },
  16552. "partID": {
  16553. "type": "string",
  16554. "pattern": "^prt"
  16555. },
  16556. "snapshot": {
  16557. "type": "string"
  16558. },
  16559. "diff": {
  16560. "type": "string"
  16561. }
  16562. },
  16563. "required": ["messageID"],
  16564. "additionalProperties": false
  16565. },
  16566. {
  16567. "type": "null"
  16568. }
  16569. ]
  16570. }
  16571. },
  16572. "additionalProperties": false
  16573. }
  16574. },
  16575. "required": ["sessionID", "info"],
  16576. "additionalProperties": false
  16577. }
  16578. },
  16579. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16580. "additionalProperties": false
  16581. },
  16582. "SyncEventSessionDeleted": {
  16583. "type": "object",
  16584. "properties": {
  16585. "type": {
  16586. "type": "string",
  16587. "enum": ["sync"]
  16588. },
  16589. "name": {
  16590. "type": "string",
  16591. "enum": ["session.deleted.1"]
  16592. },
  16593. "id": {
  16594. "type": "string"
  16595. },
  16596. "seq": {
  16597. "type": "number"
  16598. },
  16599. "aggregateID": {
  16600. "type": "string",
  16601. "enum": ["sessionID"]
  16602. },
  16603. "data": {
  16604. "type": "object",
  16605. "properties": {
  16606. "sessionID": {
  16607. "type": "string",
  16608. "pattern": "^ses"
  16609. },
  16610. "info": {
  16611. "$ref": "#/components/schemas/Session"
  16612. }
  16613. },
  16614. "required": ["sessionID", "info"],
  16615. "additionalProperties": false
  16616. }
  16617. },
  16618. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16619. "additionalProperties": false
  16620. },
  16621. "SyncEventSessionNextAgentSwitched": {
  16622. "type": "object",
  16623. "properties": {
  16624. "type": {
  16625. "type": "string",
  16626. "enum": ["sync"]
  16627. },
  16628. "name": {
  16629. "type": "string",
  16630. "enum": ["session.next.agent.switched.1"]
  16631. },
  16632. "id": {
  16633. "type": "string"
  16634. },
  16635. "seq": {
  16636. "type": "number"
  16637. },
  16638. "aggregateID": {
  16639. "type": "string",
  16640. "enum": ["sessionID"]
  16641. },
  16642. "data": {
  16643. "type": "object",
  16644. "properties": {
  16645. "timestamp": {
  16646. "type": "number"
  16647. },
  16648. "sessionID": {
  16649. "type": "string",
  16650. "pattern": "^ses"
  16651. },
  16652. "agent": {
  16653. "type": "string"
  16654. }
  16655. },
  16656. "required": ["timestamp", "sessionID", "agent"],
  16657. "additionalProperties": false
  16658. }
  16659. },
  16660. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16661. "additionalProperties": false
  16662. },
  16663. "SyncEventSessionNextModelSwitched": {
  16664. "type": "object",
  16665. "properties": {
  16666. "type": {
  16667. "type": "string",
  16668. "enum": ["sync"]
  16669. },
  16670. "name": {
  16671. "type": "string",
  16672. "enum": ["session.next.model.switched.1"]
  16673. },
  16674. "id": {
  16675. "type": "string"
  16676. },
  16677. "seq": {
  16678. "type": "number"
  16679. },
  16680. "aggregateID": {
  16681. "type": "string",
  16682. "enum": ["sessionID"]
  16683. },
  16684. "data": {
  16685. "type": "object",
  16686. "properties": {
  16687. "timestamp": {
  16688. "type": "number"
  16689. },
  16690. "sessionID": {
  16691. "type": "string",
  16692. "pattern": "^ses"
  16693. },
  16694. "model": {
  16695. "type": "object",
  16696. "properties": {
  16697. "id": {
  16698. "type": "string"
  16699. },
  16700. "providerID": {
  16701. "type": "string"
  16702. },
  16703. "variant": {
  16704. "type": "string"
  16705. }
  16706. },
  16707. "required": ["id", "providerID", "variant"],
  16708. "additionalProperties": false
  16709. }
  16710. },
  16711. "required": ["timestamp", "sessionID", "model"],
  16712. "additionalProperties": false
  16713. }
  16714. },
  16715. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16716. "additionalProperties": false
  16717. },
  16718. "SyncEventSessionNextPrompted": {
  16719. "type": "object",
  16720. "properties": {
  16721. "type": {
  16722. "type": "string",
  16723. "enum": ["sync"]
  16724. },
  16725. "name": {
  16726. "type": "string",
  16727. "enum": ["session.next.prompted.1"]
  16728. },
  16729. "id": {
  16730. "type": "string"
  16731. },
  16732. "seq": {
  16733. "type": "number"
  16734. },
  16735. "aggregateID": {
  16736. "type": "string",
  16737. "enum": ["sessionID"]
  16738. },
  16739. "data": {
  16740. "type": "object",
  16741. "properties": {
  16742. "timestamp": {
  16743. "type": "number"
  16744. },
  16745. "sessionID": {
  16746. "type": "string",
  16747. "pattern": "^ses"
  16748. },
  16749. "prompt": {
  16750. "$ref": "#/components/schemas/Prompt"
  16751. }
  16752. },
  16753. "required": ["timestamp", "sessionID", "prompt"],
  16754. "additionalProperties": false
  16755. }
  16756. },
  16757. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16758. "additionalProperties": false
  16759. },
  16760. "SyncEventSessionNextSynthetic": {
  16761. "type": "object",
  16762. "properties": {
  16763. "type": {
  16764. "type": "string",
  16765. "enum": ["sync"]
  16766. },
  16767. "name": {
  16768. "type": "string",
  16769. "enum": ["session.next.synthetic.1"]
  16770. },
  16771. "id": {
  16772. "type": "string"
  16773. },
  16774. "seq": {
  16775. "type": "number"
  16776. },
  16777. "aggregateID": {
  16778. "type": "string",
  16779. "enum": ["sessionID"]
  16780. },
  16781. "data": {
  16782. "type": "object",
  16783. "properties": {
  16784. "timestamp": {
  16785. "type": "number"
  16786. },
  16787. "sessionID": {
  16788. "type": "string",
  16789. "pattern": "^ses"
  16790. },
  16791. "text": {
  16792. "type": "string"
  16793. }
  16794. },
  16795. "required": ["timestamp", "sessionID", "text"],
  16796. "additionalProperties": false
  16797. }
  16798. },
  16799. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16800. "additionalProperties": false
  16801. },
  16802. "SyncEventSessionNextShellStarted": {
  16803. "type": "object",
  16804. "properties": {
  16805. "type": {
  16806. "type": "string",
  16807. "enum": ["sync"]
  16808. },
  16809. "name": {
  16810. "type": "string",
  16811. "enum": ["session.next.shell.started.1"]
  16812. },
  16813. "id": {
  16814. "type": "string"
  16815. },
  16816. "seq": {
  16817. "type": "number"
  16818. },
  16819. "aggregateID": {
  16820. "type": "string",
  16821. "enum": ["sessionID"]
  16822. },
  16823. "data": {
  16824. "type": "object",
  16825. "properties": {
  16826. "timestamp": {
  16827. "type": "number"
  16828. },
  16829. "sessionID": {
  16830. "type": "string",
  16831. "pattern": "^ses"
  16832. },
  16833. "callID": {
  16834. "type": "string"
  16835. },
  16836. "command": {
  16837. "type": "string"
  16838. }
  16839. },
  16840. "required": ["timestamp", "sessionID", "callID", "command"],
  16841. "additionalProperties": false
  16842. }
  16843. },
  16844. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16845. "additionalProperties": false
  16846. },
  16847. "SyncEventSessionNextShellEnded": {
  16848. "type": "object",
  16849. "properties": {
  16850. "type": {
  16851. "type": "string",
  16852. "enum": ["sync"]
  16853. },
  16854. "name": {
  16855. "type": "string",
  16856. "enum": ["session.next.shell.ended.1"]
  16857. },
  16858. "id": {
  16859. "type": "string"
  16860. },
  16861. "seq": {
  16862. "type": "number"
  16863. },
  16864. "aggregateID": {
  16865. "type": "string",
  16866. "enum": ["sessionID"]
  16867. },
  16868. "data": {
  16869. "type": "object",
  16870. "properties": {
  16871. "timestamp": {
  16872. "type": "number"
  16873. },
  16874. "sessionID": {
  16875. "type": "string",
  16876. "pattern": "^ses"
  16877. },
  16878. "callID": {
  16879. "type": "string"
  16880. },
  16881. "output": {
  16882. "type": "string"
  16883. }
  16884. },
  16885. "required": ["timestamp", "sessionID", "callID", "output"],
  16886. "additionalProperties": false
  16887. }
  16888. },
  16889. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16890. "additionalProperties": false
  16891. },
  16892. "SyncEventSessionNextStepStarted": {
  16893. "type": "object",
  16894. "properties": {
  16895. "type": {
  16896. "type": "string",
  16897. "enum": ["sync"]
  16898. },
  16899. "name": {
  16900. "type": "string",
  16901. "enum": ["session.next.step.started.1"]
  16902. },
  16903. "id": {
  16904. "type": "string"
  16905. },
  16906. "seq": {
  16907. "type": "number"
  16908. },
  16909. "aggregateID": {
  16910. "type": "string",
  16911. "enum": ["sessionID"]
  16912. },
  16913. "data": {
  16914. "type": "object",
  16915. "properties": {
  16916. "timestamp": {
  16917. "type": "number"
  16918. },
  16919. "sessionID": {
  16920. "type": "string",
  16921. "pattern": "^ses"
  16922. },
  16923. "agent": {
  16924. "type": "string"
  16925. },
  16926. "model": {
  16927. "type": "object",
  16928. "properties": {
  16929. "id": {
  16930. "type": "string"
  16931. },
  16932. "providerID": {
  16933. "type": "string"
  16934. },
  16935. "variant": {
  16936. "type": "string"
  16937. }
  16938. },
  16939. "required": ["id", "providerID", "variant"],
  16940. "additionalProperties": false
  16941. },
  16942. "snapshot": {
  16943. "type": "string"
  16944. }
  16945. },
  16946. "required": ["timestamp", "sessionID", "agent", "model"],
  16947. "additionalProperties": false
  16948. }
  16949. },
  16950. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16951. "additionalProperties": false
  16952. },
  16953. "SyncEventSessionNextStepEnded": {
  16954. "type": "object",
  16955. "properties": {
  16956. "type": {
  16957. "type": "string",
  16958. "enum": ["sync"]
  16959. },
  16960. "name": {
  16961. "type": "string",
  16962. "enum": ["session.next.step.ended.1"]
  16963. },
  16964. "id": {
  16965. "type": "string"
  16966. },
  16967. "seq": {
  16968. "type": "number"
  16969. },
  16970. "aggregateID": {
  16971. "type": "string",
  16972. "enum": ["sessionID"]
  16973. },
  16974. "data": {
  16975. "type": "object",
  16976. "properties": {
  16977. "timestamp": {
  16978. "type": "number"
  16979. },
  16980. "sessionID": {
  16981. "type": "string",
  16982. "pattern": "^ses"
  16983. },
  16984. "finish": {
  16985. "type": "string"
  16986. },
  16987. "cost": {
  16988. "type": "number"
  16989. },
  16990. "tokens": {
  16991. "type": "object",
  16992. "properties": {
  16993. "input": {
  16994. "type": "number"
  16995. },
  16996. "output": {
  16997. "type": "number"
  16998. },
  16999. "reasoning": {
  17000. "type": "number"
  17001. },
  17002. "cache": {
  17003. "type": "object",
  17004. "properties": {
  17005. "read": {
  17006. "type": "number"
  17007. },
  17008. "write": {
  17009. "type": "number"
  17010. }
  17011. },
  17012. "required": ["read", "write"],
  17013. "additionalProperties": false
  17014. }
  17015. },
  17016. "required": ["input", "output", "reasoning", "cache"],
  17017. "additionalProperties": false
  17018. },
  17019. "snapshot": {
  17020. "type": "string"
  17021. }
  17022. },
  17023. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17024. "additionalProperties": false
  17025. }
  17026. },
  17027. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17028. "additionalProperties": false
  17029. },
  17030. "SyncEventSessionNextStepFailed": {
  17031. "type": "object",
  17032. "properties": {
  17033. "type": {
  17034. "type": "string",
  17035. "enum": ["sync"]
  17036. },
  17037. "name": {
  17038. "type": "string",
  17039. "enum": ["session.next.step.failed.1"]
  17040. },
  17041. "id": {
  17042. "type": "string"
  17043. },
  17044. "seq": {
  17045. "type": "number"
  17046. },
  17047. "aggregateID": {
  17048. "type": "string",
  17049. "enum": ["sessionID"]
  17050. },
  17051. "data": {
  17052. "type": "object",
  17053. "properties": {
  17054. "timestamp": {
  17055. "type": "number"
  17056. },
  17057. "sessionID": {
  17058. "type": "string",
  17059. "pattern": "^ses"
  17060. },
  17061. "error": {
  17062. "$ref": "#/components/schemas/SessionErrorUnknown"
  17063. }
  17064. },
  17065. "required": ["timestamp", "sessionID", "error"],
  17066. "additionalProperties": false
  17067. }
  17068. },
  17069. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17070. "additionalProperties": false
  17071. },
  17072. "SyncEventSessionNextTextStarted": {
  17073. "type": "object",
  17074. "properties": {
  17075. "type": {
  17076. "type": "string",
  17077. "enum": ["sync"]
  17078. },
  17079. "name": {
  17080. "type": "string",
  17081. "enum": ["session.next.text.started.1"]
  17082. },
  17083. "id": {
  17084. "type": "string"
  17085. },
  17086. "seq": {
  17087. "type": "number"
  17088. },
  17089. "aggregateID": {
  17090. "type": "string",
  17091. "enum": ["sessionID"]
  17092. },
  17093. "data": {
  17094. "type": "object",
  17095. "properties": {
  17096. "timestamp": {
  17097. "type": "number"
  17098. },
  17099. "sessionID": {
  17100. "type": "string",
  17101. "pattern": "^ses"
  17102. }
  17103. },
  17104. "required": ["timestamp", "sessionID"],
  17105. "additionalProperties": false
  17106. }
  17107. },
  17108. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17109. "additionalProperties": false
  17110. },
  17111. "SyncEventSessionNextTextDelta": {
  17112. "type": "object",
  17113. "properties": {
  17114. "type": {
  17115. "type": "string",
  17116. "enum": ["sync"]
  17117. },
  17118. "name": {
  17119. "type": "string",
  17120. "enum": ["session.next.text.delta.1"]
  17121. },
  17122. "id": {
  17123. "type": "string"
  17124. },
  17125. "seq": {
  17126. "type": "number"
  17127. },
  17128. "aggregateID": {
  17129. "type": "string",
  17130. "enum": ["sessionID"]
  17131. },
  17132. "data": {
  17133. "type": "object",
  17134. "properties": {
  17135. "timestamp": {
  17136. "type": "number"
  17137. },
  17138. "sessionID": {
  17139. "type": "string",
  17140. "pattern": "^ses"
  17141. },
  17142. "delta": {
  17143. "type": "string"
  17144. }
  17145. },
  17146. "required": ["timestamp", "sessionID", "delta"],
  17147. "additionalProperties": false
  17148. }
  17149. },
  17150. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17151. "additionalProperties": false
  17152. },
  17153. "SyncEventSessionNextTextEnded": {
  17154. "type": "object",
  17155. "properties": {
  17156. "type": {
  17157. "type": "string",
  17158. "enum": ["sync"]
  17159. },
  17160. "name": {
  17161. "type": "string",
  17162. "enum": ["session.next.text.ended.1"]
  17163. },
  17164. "id": {
  17165. "type": "string"
  17166. },
  17167. "seq": {
  17168. "type": "number"
  17169. },
  17170. "aggregateID": {
  17171. "type": "string",
  17172. "enum": ["sessionID"]
  17173. },
  17174. "data": {
  17175. "type": "object",
  17176. "properties": {
  17177. "timestamp": {
  17178. "type": "number"
  17179. },
  17180. "sessionID": {
  17181. "type": "string",
  17182. "pattern": "^ses"
  17183. },
  17184. "text": {
  17185. "type": "string"
  17186. }
  17187. },
  17188. "required": ["timestamp", "sessionID", "text"],
  17189. "additionalProperties": false
  17190. }
  17191. },
  17192. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17193. "additionalProperties": false
  17194. },
  17195. "SyncEventSessionNextReasoningStarted": {
  17196. "type": "object",
  17197. "properties": {
  17198. "type": {
  17199. "type": "string",
  17200. "enum": ["sync"]
  17201. },
  17202. "name": {
  17203. "type": "string",
  17204. "enum": ["session.next.reasoning.started.1"]
  17205. },
  17206. "id": {
  17207. "type": "string"
  17208. },
  17209. "seq": {
  17210. "type": "number"
  17211. },
  17212. "aggregateID": {
  17213. "type": "string",
  17214. "enum": ["sessionID"]
  17215. },
  17216. "data": {
  17217. "type": "object",
  17218. "properties": {
  17219. "timestamp": {
  17220. "type": "number"
  17221. },
  17222. "sessionID": {
  17223. "type": "string",
  17224. "pattern": "^ses"
  17225. },
  17226. "reasoningID": {
  17227. "type": "string"
  17228. }
  17229. },
  17230. "required": ["timestamp", "sessionID", "reasoningID"],
  17231. "additionalProperties": false
  17232. }
  17233. },
  17234. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17235. "additionalProperties": false
  17236. },
  17237. "SyncEventSessionNextReasoningDelta": {
  17238. "type": "object",
  17239. "properties": {
  17240. "type": {
  17241. "type": "string",
  17242. "enum": ["sync"]
  17243. },
  17244. "name": {
  17245. "type": "string",
  17246. "enum": ["session.next.reasoning.delta.1"]
  17247. },
  17248. "id": {
  17249. "type": "string"
  17250. },
  17251. "seq": {
  17252. "type": "number"
  17253. },
  17254. "aggregateID": {
  17255. "type": "string",
  17256. "enum": ["sessionID"]
  17257. },
  17258. "data": {
  17259. "type": "object",
  17260. "properties": {
  17261. "timestamp": {
  17262. "type": "number"
  17263. },
  17264. "sessionID": {
  17265. "type": "string",
  17266. "pattern": "^ses"
  17267. },
  17268. "reasoningID": {
  17269. "type": "string"
  17270. },
  17271. "delta": {
  17272. "type": "string"
  17273. }
  17274. },
  17275. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17276. "additionalProperties": false
  17277. }
  17278. },
  17279. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17280. "additionalProperties": false
  17281. },
  17282. "SyncEventSessionNextReasoningEnded": {
  17283. "type": "object",
  17284. "properties": {
  17285. "type": {
  17286. "type": "string",
  17287. "enum": ["sync"]
  17288. },
  17289. "name": {
  17290. "type": "string",
  17291. "enum": ["session.next.reasoning.ended.1"]
  17292. },
  17293. "id": {
  17294. "type": "string"
  17295. },
  17296. "seq": {
  17297. "type": "number"
  17298. },
  17299. "aggregateID": {
  17300. "type": "string",
  17301. "enum": ["sessionID"]
  17302. },
  17303. "data": {
  17304. "type": "object",
  17305. "properties": {
  17306. "timestamp": {
  17307. "type": "number"
  17308. },
  17309. "sessionID": {
  17310. "type": "string",
  17311. "pattern": "^ses"
  17312. },
  17313. "reasoningID": {
  17314. "type": "string"
  17315. },
  17316. "text": {
  17317. "type": "string"
  17318. }
  17319. },
  17320. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17321. "additionalProperties": false
  17322. }
  17323. },
  17324. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17325. "additionalProperties": false
  17326. },
  17327. "SyncEventSessionNextToolInputStarted": {
  17328. "type": "object",
  17329. "properties": {
  17330. "type": {
  17331. "type": "string",
  17332. "enum": ["sync"]
  17333. },
  17334. "name": {
  17335. "type": "string",
  17336. "enum": ["session.next.tool.input.started.1"]
  17337. },
  17338. "id": {
  17339. "type": "string"
  17340. },
  17341. "seq": {
  17342. "type": "number"
  17343. },
  17344. "aggregateID": {
  17345. "type": "string",
  17346. "enum": ["sessionID"]
  17347. },
  17348. "data": {
  17349. "type": "object",
  17350. "properties": {
  17351. "timestamp": {
  17352. "type": "number"
  17353. },
  17354. "sessionID": {
  17355. "type": "string",
  17356. "pattern": "^ses"
  17357. },
  17358. "callID": {
  17359. "type": "string"
  17360. },
  17361. "name": {
  17362. "type": "string"
  17363. }
  17364. },
  17365. "required": ["timestamp", "sessionID", "callID", "name"],
  17366. "additionalProperties": false
  17367. }
  17368. },
  17369. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17370. "additionalProperties": false
  17371. },
  17372. "SyncEventSessionNextToolInputDelta": {
  17373. "type": "object",
  17374. "properties": {
  17375. "type": {
  17376. "type": "string",
  17377. "enum": ["sync"]
  17378. },
  17379. "name": {
  17380. "type": "string",
  17381. "enum": ["session.next.tool.input.delta.1"]
  17382. },
  17383. "id": {
  17384. "type": "string"
  17385. },
  17386. "seq": {
  17387. "type": "number"
  17388. },
  17389. "aggregateID": {
  17390. "type": "string",
  17391. "enum": ["sessionID"]
  17392. },
  17393. "data": {
  17394. "type": "object",
  17395. "properties": {
  17396. "timestamp": {
  17397. "type": "number"
  17398. },
  17399. "sessionID": {
  17400. "type": "string",
  17401. "pattern": "^ses"
  17402. },
  17403. "callID": {
  17404. "type": "string"
  17405. },
  17406. "delta": {
  17407. "type": "string"
  17408. }
  17409. },
  17410. "required": ["timestamp", "sessionID", "callID", "delta"],
  17411. "additionalProperties": false
  17412. }
  17413. },
  17414. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17415. "additionalProperties": false
  17416. },
  17417. "SyncEventSessionNextToolInputEnded": {
  17418. "type": "object",
  17419. "properties": {
  17420. "type": {
  17421. "type": "string",
  17422. "enum": ["sync"]
  17423. },
  17424. "name": {
  17425. "type": "string",
  17426. "enum": ["session.next.tool.input.ended.1"]
  17427. },
  17428. "id": {
  17429. "type": "string"
  17430. },
  17431. "seq": {
  17432. "type": "number"
  17433. },
  17434. "aggregateID": {
  17435. "type": "string",
  17436. "enum": ["sessionID"]
  17437. },
  17438. "data": {
  17439. "type": "object",
  17440. "properties": {
  17441. "timestamp": {
  17442. "type": "number"
  17443. },
  17444. "sessionID": {
  17445. "type": "string",
  17446. "pattern": "^ses"
  17447. },
  17448. "callID": {
  17449. "type": "string"
  17450. },
  17451. "text": {
  17452. "type": "string"
  17453. }
  17454. },
  17455. "required": ["timestamp", "sessionID", "callID", "text"],
  17456. "additionalProperties": false
  17457. }
  17458. },
  17459. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17460. "additionalProperties": false
  17461. },
  17462. "SyncEventSessionNextToolCalled": {
  17463. "type": "object",
  17464. "properties": {
  17465. "type": {
  17466. "type": "string",
  17467. "enum": ["sync"]
  17468. },
  17469. "name": {
  17470. "type": "string",
  17471. "enum": ["session.next.tool.called.1"]
  17472. },
  17473. "id": {
  17474. "type": "string"
  17475. },
  17476. "seq": {
  17477. "type": "number"
  17478. },
  17479. "aggregateID": {
  17480. "type": "string",
  17481. "enum": ["sessionID"]
  17482. },
  17483. "data": {
  17484. "type": "object",
  17485. "properties": {
  17486. "timestamp": {
  17487. "type": "number"
  17488. },
  17489. "sessionID": {
  17490. "type": "string",
  17491. "pattern": "^ses"
  17492. },
  17493. "callID": {
  17494. "type": "string"
  17495. },
  17496. "tool": {
  17497. "type": "string"
  17498. },
  17499. "input": {
  17500. "type": "object"
  17501. },
  17502. "provider": {
  17503. "type": "object",
  17504. "properties": {
  17505. "executed": {
  17506. "type": "boolean"
  17507. },
  17508. "metadata": {
  17509. "type": "object"
  17510. }
  17511. },
  17512. "required": ["executed"],
  17513. "additionalProperties": false
  17514. }
  17515. },
  17516. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17517. "additionalProperties": false
  17518. }
  17519. },
  17520. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17521. "additionalProperties": false
  17522. },
  17523. "SyncEventSessionNextToolProgress": {
  17524. "type": "object",
  17525. "properties": {
  17526. "type": {
  17527. "type": "string",
  17528. "enum": ["sync"]
  17529. },
  17530. "name": {
  17531. "type": "string",
  17532. "enum": ["session.next.tool.progress.1"]
  17533. },
  17534. "id": {
  17535. "type": "string"
  17536. },
  17537. "seq": {
  17538. "type": "number"
  17539. },
  17540. "aggregateID": {
  17541. "type": "string",
  17542. "enum": ["sessionID"]
  17543. },
  17544. "data": {
  17545. "type": "object",
  17546. "properties": {
  17547. "timestamp": {
  17548. "type": "number"
  17549. },
  17550. "sessionID": {
  17551. "type": "string",
  17552. "pattern": "^ses"
  17553. },
  17554. "callID": {
  17555. "type": "string"
  17556. },
  17557. "structured": {
  17558. "type": "object"
  17559. },
  17560. "content": {
  17561. "type": "array",
  17562. "items": {
  17563. "anyOf": [
  17564. {
  17565. "$ref": "#/components/schemas/ToolTextContent"
  17566. },
  17567. {
  17568. "$ref": "#/components/schemas/ToolFileContent"
  17569. }
  17570. ]
  17571. }
  17572. }
  17573. },
  17574. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17575. "additionalProperties": false
  17576. }
  17577. },
  17578. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17579. "additionalProperties": false
  17580. },
  17581. "SyncEventSessionNextToolSuccess": {
  17582. "type": "object",
  17583. "properties": {
  17584. "type": {
  17585. "type": "string",
  17586. "enum": ["sync"]
  17587. },
  17588. "name": {
  17589. "type": "string",
  17590. "enum": ["session.next.tool.success.1"]
  17591. },
  17592. "id": {
  17593. "type": "string"
  17594. },
  17595. "seq": {
  17596. "type": "number"
  17597. },
  17598. "aggregateID": {
  17599. "type": "string",
  17600. "enum": ["sessionID"]
  17601. },
  17602. "data": {
  17603. "type": "object",
  17604. "properties": {
  17605. "timestamp": {
  17606. "type": "number"
  17607. },
  17608. "sessionID": {
  17609. "type": "string",
  17610. "pattern": "^ses"
  17611. },
  17612. "callID": {
  17613. "type": "string"
  17614. },
  17615. "structured": {
  17616. "type": "object"
  17617. },
  17618. "content": {
  17619. "type": "array",
  17620. "items": {
  17621. "anyOf": [
  17622. {
  17623. "$ref": "#/components/schemas/ToolTextContent"
  17624. },
  17625. {
  17626. "$ref": "#/components/schemas/ToolFileContent"
  17627. }
  17628. ]
  17629. }
  17630. },
  17631. "provider": {
  17632. "type": "object",
  17633. "properties": {
  17634. "executed": {
  17635. "type": "boolean"
  17636. },
  17637. "metadata": {
  17638. "type": "object"
  17639. }
  17640. },
  17641. "required": ["executed"],
  17642. "additionalProperties": false
  17643. }
  17644. },
  17645. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17646. "additionalProperties": false
  17647. }
  17648. },
  17649. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17650. "additionalProperties": false
  17651. },
  17652. "SyncEventSessionNextToolFailed": {
  17653. "type": "object",
  17654. "properties": {
  17655. "type": {
  17656. "type": "string",
  17657. "enum": ["sync"]
  17658. },
  17659. "name": {
  17660. "type": "string",
  17661. "enum": ["session.next.tool.failed.1"]
  17662. },
  17663. "id": {
  17664. "type": "string"
  17665. },
  17666. "seq": {
  17667. "type": "number"
  17668. },
  17669. "aggregateID": {
  17670. "type": "string",
  17671. "enum": ["sessionID"]
  17672. },
  17673. "data": {
  17674. "type": "object",
  17675. "properties": {
  17676. "timestamp": {
  17677. "type": "number"
  17678. },
  17679. "sessionID": {
  17680. "type": "string",
  17681. "pattern": "^ses"
  17682. },
  17683. "callID": {
  17684. "type": "string"
  17685. },
  17686. "error": {
  17687. "$ref": "#/components/schemas/SessionErrorUnknown"
  17688. },
  17689. "provider": {
  17690. "type": "object",
  17691. "properties": {
  17692. "executed": {
  17693. "type": "boolean"
  17694. },
  17695. "metadata": {
  17696. "type": "object"
  17697. }
  17698. },
  17699. "required": ["executed"],
  17700. "additionalProperties": false
  17701. }
  17702. },
  17703. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17704. "additionalProperties": false
  17705. }
  17706. },
  17707. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17708. "additionalProperties": false
  17709. },
  17710. "SyncEventSessionNextRetried": {
  17711. "type": "object",
  17712. "properties": {
  17713. "type": {
  17714. "type": "string",
  17715. "enum": ["sync"]
  17716. },
  17717. "name": {
  17718. "type": "string",
  17719. "enum": ["session.next.retried.1"]
  17720. },
  17721. "id": {
  17722. "type": "string"
  17723. },
  17724. "seq": {
  17725. "type": "number"
  17726. },
  17727. "aggregateID": {
  17728. "type": "string",
  17729. "enum": ["sessionID"]
  17730. },
  17731. "data": {
  17732. "type": "object",
  17733. "properties": {
  17734. "timestamp": {
  17735. "type": "number"
  17736. },
  17737. "sessionID": {
  17738. "type": "string",
  17739. "pattern": "^ses"
  17740. },
  17741. "attempt": {
  17742. "type": "number"
  17743. },
  17744. "error": {
  17745. "$ref": "#/components/schemas/SessionNextRetry_error"
  17746. }
  17747. },
  17748. "required": ["timestamp", "sessionID", "attempt", "error"],
  17749. "additionalProperties": false
  17750. }
  17751. },
  17752. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17753. "additionalProperties": false
  17754. },
  17755. "SyncEventSessionNextCompactionStarted": {
  17756. "type": "object",
  17757. "properties": {
  17758. "type": {
  17759. "type": "string",
  17760. "enum": ["sync"]
  17761. },
  17762. "name": {
  17763. "type": "string",
  17764. "enum": ["session.next.compaction.started.1"]
  17765. },
  17766. "id": {
  17767. "type": "string"
  17768. },
  17769. "seq": {
  17770. "type": "number"
  17771. },
  17772. "aggregateID": {
  17773. "type": "string",
  17774. "enum": ["sessionID"]
  17775. },
  17776. "data": {
  17777. "type": "object",
  17778. "properties": {
  17779. "timestamp": {
  17780. "type": "number"
  17781. },
  17782. "sessionID": {
  17783. "type": "string",
  17784. "pattern": "^ses"
  17785. },
  17786. "reason": {
  17787. "type": "string",
  17788. "enum": ["auto", "manual"]
  17789. }
  17790. },
  17791. "required": ["timestamp", "sessionID", "reason"],
  17792. "additionalProperties": false
  17793. }
  17794. },
  17795. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17796. "additionalProperties": false
  17797. },
  17798. "SyncEventSessionNextCompactionDelta": {
  17799. "type": "object",
  17800. "properties": {
  17801. "type": {
  17802. "type": "string",
  17803. "enum": ["sync"]
  17804. },
  17805. "name": {
  17806. "type": "string",
  17807. "enum": ["session.next.compaction.delta.1"]
  17808. },
  17809. "id": {
  17810. "type": "string"
  17811. },
  17812. "seq": {
  17813. "type": "number"
  17814. },
  17815. "aggregateID": {
  17816. "type": "string",
  17817. "enum": ["sessionID"]
  17818. },
  17819. "data": {
  17820. "type": "object",
  17821. "properties": {
  17822. "timestamp": {
  17823. "type": "number"
  17824. },
  17825. "sessionID": {
  17826. "type": "string",
  17827. "pattern": "^ses"
  17828. },
  17829. "text": {
  17830. "type": "string"
  17831. }
  17832. },
  17833. "required": ["timestamp", "sessionID", "text"],
  17834. "additionalProperties": false
  17835. }
  17836. },
  17837. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17838. "additionalProperties": false
  17839. },
  17840. "SyncEventSessionNextCompactionEnded": {
  17841. "type": "object",
  17842. "properties": {
  17843. "type": {
  17844. "type": "string",
  17845. "enum": ["sync"]
  17846. },
  17847. "name": {
  17848. "type": "string",
  17849. "enum": ["session.next.compaction.ended.1"]
  17850. },
  17851. "id": {
  17852. "type": "string"
  17853. },
  17854. "seq": {
  17855. "type": "number"
  17856. },
  17857. "aggregateID": {
  17858. "type": "string",
  17859. "enum": ["sessionID"]
  17860. },
  17861. "data": {
  17862. "type": "object",
  17863. "properties": {
  17864. "timestamp": {
  17865. "type": "number"
  17866. },
  17867. "sessionID": {
  17868. "type": "string",
  17869. "pattern": "^ses"
  17870. },
  17871. "text": {
  17872. "type": "string"
  17873. },
  17874. "include": {
  17875. "type": "string"
  17876. }
  17877. },
  17878. "required": ["timestamp", "sessionID", "text"],
  17879. "additionalProperties": false
  17880. }
  17881. },
  17882. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17883. "additionalProperties": false
  17884. },
  17885. "EventServerConnected": {
  17886. "type": "object",
  17887. "properties": {
  17888. "id": {
  17889. "type": "string"
  17890. },
  17891. "type": {
  17892. "type": "string",
  17893. "enum": ["server.connected"]
  17894. },
  17895. "properties": {
  17896. "type": "object",
  17897. "properties": {}
  17898. }
  17899. },
  17900. "required": ["id", "type", "properties"],
  17901. "additionalProperties": false
  17902. },
  17903. "EventGlobalDisposed": {
  17904. "type": "object",
  17905. "properties": {
  17906. "id": {
  17907. "type": "string"
  17908. },
  17909. "type": {
  17910. "type": "string",
  17911. "enum": ["global.disposed"]
  17912. },
  17913. "properties": {
  17914. "type": "object",
  17915. "properties": {}
  17916. }
  17917. },
  17918. "required": ["id", "type", "properties"],
  17919. "additionalProperties": false
  17920. },
  17921. "EventServerInstanceDisposed": {
  17922. "type": "object",
  17923. "properties": {
  17924. "id": {
  17925. "type": "string"
  17926. },
  17927. "type": {
  17928. "type": "string",
  17929. "enum": ["server.instance.disposed"]
  17930. },
  17931. "properties": {
  17932. "type": "object",
  17933. "properties": {
  17934. "directory": {
  17935. "type": "string"
  17936. }
  17937. },
  17938. "required": ["directory"],
  17939. "additionalProperties": false
  17940. }
  17941. },
  17942. "required": ["id", "type", "properties"],
  17943. "additionalProperties": false
  17944. },
  17945. "EventFileEdited": {
  17946. "type": "object",
  17947. "properties": {
  17948. "id": {
  17949. "type": "string"
  17950. },
  17951. "type": {
  17952. "type": "string",
  17953. "enum": ["file.edited"]
  17954. },
  17955. "properties": {
  17956. "type": "object",
  17957. "properties": {
  17958. "file": {
  17959. "type": "string"
  17960. }
  17961. },
  17962. "required": ["file"],
  17963. "additionalProperties": false
  17964. }
  17965. },
  17966. "required": ["id", "type", "properties"],
  17967. "additionalProperties": false
  17968. },
  17969. "EventFileWatcherUpdated": {
  17970. "type": "object",
  17971. "properties": {
  17972. "id": {
  17973. "type": "string"
  17974. },
  17975. "type": {
  17976. "type": "string",
  17977. "enum": ["file.watcher.updated"]
  17978. },
  17979. "properties": {
  17980. "type": "object",
  17981. "properties": {
  17982. "file": {
  17983. "type": "string"
  17984. },
  17985. "event": {
  17986. "type": "string",
  17987. "enum": ["add", "change", "unlink"]
  17988. }
  17989. },
  17990. "required": ["file", "event"],
  17991. "additionalProperties": false
  17992. }
  17993. },
  17994. "required": ["id", "type", "properties"],
  17995. "additionalProperties": false
  17996. },
  17997. "EventLspClientDiagnostics": {
  17998. "type": "object",
  17999. "properties": {
  18000. "id": {
  18001. "type": "string"
  18002. },
  18003. "type": {
  18004. "type": "string",
  18005. "enum": ["lsp.client.diagnostics"]
  18006. },
  18007. "properties": {
  18008. "type": "object",
  18009. "properties": {
  18010. "serverID": {
  18011. "type": "string"
  18012. },
  18013. "path": {
  18014. "type": "string"
  18015. }
  18016. },
  18017. "required": ["serverID", "path"],
  18018. "additionalProperties": false
  18019. }
  18020. },
  18021. "required": ["id", "type", "properties"],
  18022. "additionalProperties": false
  18023. },
  18024. "EventLspUpdated": {
  18025. "type": "object",
  18026. "properties": {
  18027. "id": {
  18028. "type": "string"
  18029. },
  18030. "type": {
  18031. "type": "string",
  18032. "enum": ["lsp.updated"]
  18033. },
  18034. "properties": {
  18035. "type": "object",
  18036. "properties": {}
  18037. }
  18038. },
  18039. "required": ["id", "type", "properties"],
  18040. "additionalProperties": false
  18041. },
  18042. "EventMessagePartDelta": {
  18043. "type": "object",
  18044. "properties": {
  18045. "id": {
  18046. "type": "string"
  18047. },
  18048. "type": {
  18049. "type": "string",
  18050. "enum": ["message.part.delta"]
  18051. },
  18052. "properties": {
  18053. "type": "object",
  18054. "properties": {
  18055. "sessionID": {
  18056. "type": "string",
  18057. "pattern": "^ses"
  18058. },
  18059. "messageID": {
  18060. "type": "string",
  18061. "pattern": "^msg"
  18062. },
  18063. "partID": {
  18064. "type": "string",
  18065. "pattern": "^prt"
  18066. },
  18067. "field": {
  18068. "type": "string"
  18069. },
  18070. "delta": {
  18071. "type": "string"
  18072. }
  18073. },
  18074. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18075. "additionalProperties": false
  18076. }
  18077. },
  18078. "required": ["id", "type", "properties"],
  18079. "additionalProperties": false
  18080. },
  18081. "EventPermissionAsked": {
  18082. "type": "object",
  18083. "properties": {
  18084. "id": {
  18085. "type": "string"
  18086. },
  18087. "type": {
  18088. "type": "string",
  18089. "enum": ["permission.asked"]
  18090. },
  18091. "properties": {
  18092. "$ref": "#/components/schemas/PermissionRequest"
  18093. }
  18094. },
  18095. "required": ["id", "type", "properties"],
  18096. "additionalProperties": false
  18097. },
  18098. "EventPermissionReplied": {
  18099. "type": "object",
  18100. "properties": {
  18101. "id": {
  18102. "type": "string"
  18103. },
  18104. "type": {
  18105. "type": "string",
  18106. "enum": ["permission.replied"]
  18107. },
  18108. "properties": {
  18109. "type": "object",
  18110. "properties": {
  18111. "sessionID": {
  18112. "type": "string",
  18113. "pattern": "^ses"
  18114. },
  18115. "requestID": {
  18116. "type": "string",
  18117. "pattern": "^per"
  18118. },
  18119. "reply": {
  18120. "type": "string",
  18121. "enum": ["once", "always", "reject"]
  18122. }
  18123. },
  18124. "required": ["sessionID", "requestID", "reply"],
  18125. "additionalProperties": false
  18126. }
  18127. },
  18128. "required": ["id", "type", "properties"],
  18129. "additionalProperties": false
  18130. },
  18131. "EventSessionDiff": {
  18132. "type": "object",
  18133. "properties": {
  18134. "id": {
  18135. "type": "string"
  18136. },
  18137. "type": {
  18138. "type": "string",
  18139. "enum": ["session.diff"]
  18140. },
  18141. "properties": {
  18142. "type": "object",
  18143. "properties": {
  18144. "sessionID": {
  18145. "type": "string",
  18146. "pattern": "^ses"
  18147. },
  18148. "diff": {
  18149. "type": "array",
  18150. "items": {
  18151. "$ref": "#/components/schemas/SnapshotFileDiff"
  18152. }
  18153. }
  18154. },
  18155. "required": ["sessionID", "diff"],
  18156. "additionalProperties": false
  18157. }
  18158. },
  18159. "required": ["id", "type", "properties"],
  18160. "additionalProperties": false
  18161. },
  18162. "EventSessionError": {
  18163. "type": "object",
  18164. "properties": {
  18165. "id": {
  18166. "type": "string"
  18167. },
  18168. "type": {
  18169. "type": "string",
  18170. "enum": ["session.error"]
  18171. },
  18172. "properties": {
  18173. "type": "object",
  18174. "properties": {
  18175. "sessionID": {
  18176. "type": "string",
  18177. "pattern": "^ses"
  18178. },
  18179. "error": {
  18180. "anyOf": [
  18181. {
  18182. "$ref": "#/components/schemas/ProviderAuthError"
  18183. },
  18184. {
  18185. "$ref": "#/components/schemas/UnknownError"
  18186. },
  18187. {
  18188. "$ref": "#/components/schemas/MessageOutputLengthError"
  18189. },
  18190. {
  18191. "$ref": "#/components/schemas/MessageAbortedError"
  18192. },
  18193. {
  18194. "$ref": "#/components/schemas/StructuredOutputError"
  18195. },
  18196. {
  18197. "$ref": "#/components/schemas/ContextOverflowError"
  18198. },
  18199. {
  18200. "$ref": "#/components/schemas/APIError"
  18201. }
  18202. ]
  18203. }
  18204. },
  18205. "additionalProperties": false
  18206. }
  18207. },
  18208. "required": ["id", "type", "properties"],
  18209. "additionalProperties": false
  18210. },
  18211. "EventQuestionAsked": {
  18212. "type": "object",
  18213. "properties": {
  18214. "id": {
  18215. "type": "string"
  18216. },
  18217. "type": {
  18218. "type": "string",
  18219. "enum": ["question.asked"]
  18220. },
  18221. "properties": {
  18222. "$ref": "#/components/schemas/QuestionRequest"
  18223. }
  18224. },
  18225. "required": ["id", "type", "properties"],
  18226. "additionalProperties": false
  18227. },
  18228. "EventQuestionReplied": {
  18229. "type": "object",
  18230. "properties": {
  18231. "id": {
  18232. "type": "string"
  18233. },
  18234. "type": {
  18235. "type": "string",
  18236. "enum": ["question.replied"]
  18237. },
  18238. "properties": {
  18239. "$ref": "#/components/schemas/QuestionReplied"
  18240. }
  18241. },
  18242. "required": ["id", "type", "properties"],
  18243. "additionalProperties": false
  18244. },
  18245. "EventQuestionRejected": {
  18246. "type": "object",
  18247. "properties": {
  18248. "id": {
  18249. "type": "string"
  18250. },
  18251. "type": {
  18252. "type": "string",
  18253. "enum": ["question.rejected"]
  18254. },
  18255. "properties": {
  18256. "$ref": "#/components/schemas/QuestionRejected"
  18257. }
  18258. },
  18259. "required": ["id", "type", "properties"],
  18260. "additionalProperties": false
  18261. },
  18262. "EventTodoUpdated": {
  18263. "type": "object",
  18264. "properties": {
  18265. "id": {
  18266. "type": "string"
  18267. },
  18268. "type": {
  18269. "type": "string",
  18270. "enum": ["todo.updated"]
  18271. },
  18272. "properties": {
  18273. "type": "object",
  18274. "properties": {
  18275. "sessionID": {
  18276. "type": "string",
  18277. "pattern": "^ses"
  18278. },
  18279. "todos": {
  18280. "type": "array",
  18281. "items": {
  18282. "$ref": "#/components/schemas/Todo"
  18283. }
  18284. }
  18285. },
  18286. "required": ["sessionID", "todos"],
  18287. "additionalProperties": false
  18288. }
  18289. },
  18290. "required": ["id", "type", "properties"],
  18291. "additionalProperties": false
  18292. },
  18293. "EventSessionStatus": {
  18294. "type": "object",
  18295. "properties": {
  18296. "id": {
  18297. "type": "string"
  18298. },
  18299. "type": {
  18300. "type": "string",
  18301. "enum": ["session.status"]
  18302. },
  18303. "properties": {
  18304. "type": "object",
  18305. "properties": {
  18306. "sessionID": {
  18307. "type": "string",
  18308. "pattern": "^ses"
  18309. },
  18310. "status": {
  18311. "$ref": "#/components/schemas/SessionStatus"
  18312. }
  18313. },
  18314. "required": ["sessionID", "status"],
  18315. "additionalProperties": false
  18316. }
  18317. },
  18318. "required": ["id", "type", "properties"],
  18319. "additionalProperties": false
  18320. },
  18321. "EventSessionIdle": {
  18322. "type": "object",
  18323. "properties": {
  18324. "id": {
  18325. "type": "string"
  18326. },
  18327. "type": {
  18328. "type": "string",
  18329. "enum": ["session.idle"]
  18330. },
  18331. "properties": {
  18332. "type": "object",
  18333. "properties": {
  18334. "sessionID": {
  18335. "type": "string",
  18336. "pattern": "^ses"
  18337. }
  18338. },
  18339. "required": ["sessionID"],
  18340. "additionalProperties": false
  18341. }
  18342. },
  18343. "required": ["id", "type", "properties"],
  18344. "additionalProperties": false
  18345. },
  18346. "EventMcpToolsChanged": {
  18347. "type": "object",
  18348. "properties": {
  18349. "id": {
  18350. "type": "string"
  18351. },
  18352. "type": {
  18353. "type": "string",
  18354. "enum": ["mcp.tools.changed"]
  18355. },
  18356. "properties": {
  18357. "type": "object",
  18358. "properties": {
  18359. "server": {
  18360. "type": "string"
  18361. }
  18362. },
  18363. "required": ["server"],
  18364. "additionalProperties": false
  18365. }
  18366. },
  18367. "required": ["id", "type", "properties"],
  18368. "additionalProperties": false
  18369. },
  18370. "EventMcpBrowserOpenFailed": {
  18371. "type": "object",
  18372. "properties": {
  18373. "id": {
  18374. "type": "string"
  18375. },
  18376. "type": {
  18377. "type": "string",
  18378. "enum": ["mcp.browser.open.failed"]
  18379. },
  18380. "properties": {
  18381. "type": "object",
  18382. "properties": {
  18383. "mcpName": {
  18384. "type": "string"
  18385. },
  18386. "url": {
  18387. "type": "string"
  18388. }
  18389. },
  18390. "required": ["mcpName", "url"],
  18391. "additionalProperties": false
  18392. }
  18393. },
  18394. "required": ["id", "type", "properties"],
  18395. "additionalProperties": false
  18396. },
  18397. "EventCommandExecuted": {
  18398. "type": "object",
  18399. "properties": {
  18400. "id": {
  18401. "type": "string"
  18402. },
  18403. "type": {
  18404. "type": "string",
  18405. "enum": ["command.executed"]
  18406. },
  18407. "properties": {
  18408. "type": "object",
  18409. "properties": {
  18410. "name": {
  18411. "type": "string"
  18412. },
  18413. "sessionID": {
  18414. "type": "string",
  18415. "pattern": "^ses"
  18416. },
  18417. "arguments": {
  18418. "type": "string"
  18419. },
  18420. "messageID": {
  18421. "type": "string",
  18422. "pattern": "^msg"
  18423. }
  18424. },
  18425. "required": ["name", "sessionID", "arguments", "messageID"],
  18426. "additionalProperties": false
  18427. }
  18428. },
  18429. "required": ["id", "type", "properties"],
  18430. "additionalProperties": false
  18431. },
  18432. "EventProjectUpdated": {
  18433. "type": "object",
  18434. "properties": {
  18435. "id": {
  18436. "type": "string"
  18437. },
  18438. "type": {
  18439. "type": "string",
  18440. "enum": ["project.updated"]
  18441. },
  18442. "properties": {
  18443. "$ref": "#/components/schemas/Project"
  18444. }
  18445. },
  18446. "required": ["id", "type", "properties"],
  18447. "additionalProperties": false
  18448. },
  18449. "EventSessionCompacted": {
  18450. "type": "object",
  18451. "properties": {
  18452. "id": {
  18453. "type": "string"
  18454. },
  18455. "type": {
  18456. "type": "string",
  18457. "enum": ["session.compacted"]
  18458. },
  18459. "properties": {
  18460. "type": "object",
  18461. "properties": {
  18462. "sessionID": {
  18463. "type": "string",
  18464. "pattern": "^ses"
  18465. }
  18466. },
  18467. "required": ["sessionID"],
  18468. "additionalProperties": false
  18469. }
  18470. },
  18471. "required": ["id", "type", "properties"],
  18472. "additionalProperties": false
  18473. },
  18474. "EventVcsBranchUpdated": {
  18475. "type": "object",
  18476. "properties": {
  18477. "id": {
  18478. "type": "string"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["vcs.branch.updated"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "branch": {
  18488. "type": "string"
  18489. }
  18490. },
  18491. "additionalProperties": false
  18492. }
  18493. },
  18494. "required": ["id", "type", "properties"],
  18495. "additionalProperties": false
  18496. },
  18497. "EventWorkspaceReady": {
  18498. "type": "object",
  18499. "properties": {
  18500. "id": {
  18501. "type": "string"
  18502. },
  18503. "type": {
  18504. "type": "string",
  18505. "enum": ["workspace.ready"]
  18506. },
  18507. "properties": {
  18508. "type": "object",
  18509. "properties": {
  18510. "name": {
  18511. "type": "string"
  18512. }
  18513. },
  18514. "required": ["name"],
  18515. "additionalProperties": false
  18516. }
  18517. },
  18518. "required": ["id", "type", "properties"],
  18519. "additionalProperties": false
  18520. },
  18521. "EventWorkspaceFailed": {
  18522. "type": "object",
  18523. "properties": {
  18524. "id": {
  18525. "type": "string"
  18526. },
  18527. "type": {
  18528. "type": "string",
  18529. "enum": ["workspace.failed"]
  18530. },
  18531. "properties": {
  18532. "type": "object",
  18533. "properties": {
  18534. "message": {
  18535. "type": "string"
  18536. }
  18537. },
  18538. "required": ["message"],
  18539. "additionalProperties": false
  18540. }
  18541. },
  18542. "required": ["id", "type", "properties"],
  18543. "additionalProperties": false
  18544. },
  18545. "EventWorkspaceStatus": {
  18546. "type": "object",
  18547. "properties": {
  18548. "id": {
  18549. "type": "string"
  18550. },
  18551. "type": {
  18552. "type": "string",
  18553. "enum": ["workspace.status"]
  18554. },
  18555. "properties": {
  18556. "type": "object",
  18557. "properties": {
  18558. "workspaceID": {
  18559. "type": "string",
  18560. "pattern": "^wrk"
  18561. },
  18562. "status": {
  18563. "type": "string",
  18564. "enum": ["connected", "connecting", "disconnected", "error"]
  18565. }
  18566. },
  18567. "required": ["workspaceID", "status"],
  18568. "additionalProperties": false
  18569. }
  18570. },
  18571. "required": ["id", "type", "properties"],
  18572. "additionalProperties": false
  18573. },
  18574. "EventWorktreeReady": {
  18575. "type": "object",
  18576. "properties": {
  18577. "id": {
  18578. "type": "string"
  18579. },
  18580. "type": {
  18581. "type": "string",
  18582. "enum": ["worktree.ready"]
  18583. },
  18584. "properties": {
  18585. "type": "object",
  18586. "properties": {
  18587. "name": {
  18588. "type": "string"
  18589. },
  18590. "branch": {
  18591. "type": "string"
  18592. }
  18593. },
  18594. "required": ["name"],
  18595. "additionalProperties": false
  18596. }
  18597. },
  18598. "required": ["id", "type", "properties"],
  18599. "additionalProperties": false
  18600. },
  18601. "EventWorktreeFailed": {
  18602. "type": "object",
  18603. "properties": {
  18604. "id": {
  18605. "type": "string"
  18606. },
  18607. "type": {
  18608. "type": "string",
  18609. "enum": ["worktree.failed"]
  18610. },
  18611. "properties": {
  18612. "type": "object",
  18613. "properties": {
  18614. "message": {
  18615. "type": "string"
  18616. }
  18617. },
  18618. "required": ["message"],
  18619. "additionalProperties": false
  18620. }
  18621. },
  18622. "required": ["id", "type", "properties"],
  18623. "additionalProperties": false
  18624. },
  18625. "EventPtyCreated": {
  18626. "type": "object",
  18627. "properties": {
  18628. "id": {
  18629. "type": "string"
  18630. },
  18631. "type": {
  18632. "type": "string",
  18633. "enum": ["pty.created"]
  18634. },
  18635. "properties": {
  18636. "type": "object",
  18637. "properties": {
  18638. "info": {
  18639. "$ref": "#/components/schemas/Pty"
  18640. }
  18641. },
  18642. "required": ["info"],
  18643. "additionalProperties": false
  18644. }
  18645. },
  18646. "required": ["id", "type", "properties"],
  18647. "additionalProperties": false
  18648. },
  18649. "EventPtyUpdated": {
  18650. "type": "object",
  18651. "properties": {
  18652. "id": {
  18653. "type": "string"
  18654. },
  18655. "type": {
  18656. "type": "string",
  18657. "enum": ["pty.updated"]
  18658. },
  18659. "properties": {
  18660. "type": "object",
  18661. "properties": {
  18662. "info": {
  18663. "$ref": "#/components/schemas/Pty"
  18664. }
  18665. },
  18666. "required": ["info"],
  18667. "additionalProperties": false
  18668. }
  18669. },
  18670. "required": ["id", "type", "properties"],
  18671. "additionalProperties": false
  18672. },
  18673. "EventPtyExited": {
  18674. "type": "object",
  18675. "properties": {
  18676. "id": {
  18677. "type": "string"
  18678. },
  18679. "type": {
  18680. "type": "string",
  18681. "enum": ["pty.exited"]
  18682. },
  18683. "properties": {
  18684. "type": "object",
  18685. "properties": {
  18686. "id": {
  18687. "type": "string",
  18688. "pattern": "^pty"
  18689. },
  18690. "exitCode": {
  18691. "type": "integer",
  18692. "minimum": 0
  18693. }
  18694. },
  18695. "required": ["id", "exitCode"],
  18696. "additionalProperties": false
  18697. }
  18698. },
  18699. "required": ["id", "type", "properties"],
  18700. "additionalProperties": false
  18701. },
  18702. "EventPtyDeleted": {
  18703. "type": "object",
  18704. "properties": {
  18705. "id": {
  18706. "type": "string"
  18707. },
  18708. "type": {
  18709. "type": "string",
  18710. "enum": ["pty.deleted"]
  18711. },
  18712. "properties": {
  18713. "type": "object",
  18714. "properties": {
  18715. "id": {
  18716. "type": "string",
  18717. "pattern": "^pty"
  18718. }
  18719. },
  18720. "required": ["id"],
  18721. "additionalProperties": false
  18722. }
  18723. },
  18724. "required": ["id", "type", "properties"],
  18725. "additionalProperties": false
  18726. },
  18727. "EventInstallationUpdated": {
  18728. "type": "object",
  18729. "properties": {
  18730. "id": {
  18731. "type": "string"
  18732. },
  18733. "type": {
  18734. "type": "string",
  18735. "enum": ["installation.updated"]
  18736. },
  18737. "properties": {
  18738. "type": "object",
  18739. "properties": {
  18740. "version": {
  18741. "type": "string"
  18742. }
  18743. },
  18744. "required": ["version"],
  18745. "additionalProperties": false
  18746. }
  18747. },
  18748. "required": ["id", "type", "properties"],
  18749. "additionalProperties": false
  18750. },
  18751. "EventInstallationUpdate-available": {
  18752. "type": "object",
  18753. "properties": {
  18754. "id": {
  18755. "type": "string"
  18756. },
  18757. "type": {
  18758. "type": "string",
  18759. "enum": ["installation.update-available"]
  18760. },
  18761. "properties": {
  18762. "type": "object",
  18763. "properties": {
  18764. "version": {
  18765. "type": "string"
  18766. }
  18767. },
  18768. "required": ["version"],
  18769. "additionalProperties": false
  18770. }
  18771. },
  18772. "required": ["id", "type", "properties"],
  18773. "additionalProperties": false
  18774. },
  18775. "EventMessageUpdated": {
  18776. "type": "object",
  18777. "properties": {
  18778. "id": {
  18779. "type": "string"
  18780. },
  18781. "type": {
  18782. "type": "string",
  18783. "enum": ["message.updated"]
  18784. },
  18785. "properties": {
  18786. "type": "object",
  18787. "properties": {
  18788. "sessionID": {
  18789. "type": "string",
  18790. "pattern": "^ses"
  18791. },
  18792. "info": {
  18793. "$ref": "#/components/schemas/Message"
  18794. }
  18795. },
  18796. "required": ["sessionID", "info"],
  18797. "additionalProperties": false
  18798. }
  18799. },
  18800. "required": ["id", "type", "properties"],
  18801. "additionalProperties": false
  18802. },
  18803. "EventMessageRemoved": {
  18804. "type": "object",
  18805. "properties": {
  18806. "id": {
  18807. "type": "string"
  18808. },
  18809. "type": {
  18810. "type": "string",
  18811. "enum": ["message.removed"]
  18812. },
  18813. "properties": {
  18814. "type": "object",
  18815. "properties": {
  18816. "sessionID": {
  18817. "type": "string",
  18818. "pattern": "^ses"
  18819. },
  18820. "messageID": {
  18821. "type": "string",
  18822. "pattern": "^msg"
  18823. }
  18824. },
  18825. "required": ["sessionID", "messageID"],
  18826. "additionalProperties": false
  18827. }
  18828. },
  18829. "required": ["id", "type", "properties"],
  18830. "additionalProperties": false
  18831. },
  18832. "EventMessagePartUpdated": {
  18833. "type": "object",
  18834. "properties": {
  18835. "id": {
  18836. "type": "string"
  18837. },
  18838. "type": {
  18839. "type": "string",
  18840. "enum": ["message.part.updated"]
  18841. },
  18842. "properties": {
  18843. "type": "object",
  18844. "properties": {
  18845. "sessionID": {
  18846. "type": "string",
  18847. "pattern": "^ses"
  18848. },
  18849. "part": {
  18850. "$ref": "#/components/schemas/Part"
  18851. },
  18852. "time": {
  18853. "type": "integer",
  18854. "minimum": 0
  18855. }
  18856. },
  18857. "required": ["sessionID", "part", "time"],
  18858. "additionalProperties": false
  18859. }
  18860. },
  18861. "required": ["id", "type", "properties"],
  18862. "additionalProperties": false
  18863. },
  18864. "EventMessagePartRemoved": {
  18865. "type": "object",
  18866. "properties": {
  18867. "id": {
  18868. "type": "string"
  18869. },
  18870. "type": {
  18871. "type": "string",
  18872. "enum": ["message.part.removed"]
  18873. },
  18874. "properties": {
  18875. "type": "object",
  18876. "properties": {
  18877. "sessionID": {
  18878. "type": "string",
  18879. "pattern": "^ses"
  18880. },
  18881. "messageID": {
  18882. "type": "string",
  18883. "pattern": "^msg"
  18884. },
  18885. "partID": {
  18886. "type": "string",
  18887. "pattern": "^prt"
  18888. }
  18889. },
  18890. "required": ["sessionID", "messageID", "partID"],
  18891. "additionalProperties": false
  18892. }
  18893. },
  18894. "required": ["id", "type", "properties"],
  18895. "additionalProperties": false
  18896. },
  18897. "EventSessionCreated": {
  18898. "type": "object",
  18899. "properties": {
  18900. "id": {
  18901. "type": "string"
  18902. },
  18903. "type": {
  18904. "type": "string",
  18905. "enum": ["session.created"]
  18906. },
  18907. "properties": {
  18908. "type": "object",
  18909. "properties": {
  18910. "sessionID": {
  18911. "type": "string",
  18912. "pattern": "^ses"
  18913. },
  18914. "info": {
  18915. "$ref": "#/components/schemas/Session"
  18916. }
  18917. },
  18918. "required": ["sessionID", "info"],
  18919. "additionalProperties": false
  18920. }
  18921. },
  18922. "required": ["id", "type", "properties"],
  18923. "additionalProperties": false
  18924. },
  18925. "EventSessionUpdated": {
  18926. "type": "object",
  18927. "properties": {
  18928. "id": {
  18929. "type": "string"
  18930. },
  18931. "type": {
  18932. "type": "string",
  18933. "enum": ["session.updated"]
  18934. },
  18935. "properties": {
  18936. "type": "object",
  18937. "properties": {
  18938. "sessionID": {
  18939. "type": "string",
  18940. "pattern": "^ses"
  18941. },
  18942. "info": {
  18943. "$ref": "#/components/schemas/Session"
  18944. }
  18945. },
  18946. "required": ["sessionID", "info"],
  18947. "additionalProperties": false
  18948. }
  18949. },
  18950. "required": ["id", "type", "properties"],
  18951. "additionalProperties": false
  18952. },
  18953. "EventSessionDeleted": {
  18954. "type": "object",
  18955. "properties": {
  18956. "id": {
  18957. "type": "string"
  18958. },
  18959. "type": {
  18960. "type": "string",
  18961. "enum": ["session.deleted"]
  18962. },
  18963. "properties": {
  18964. "type": "object",
  18965. "properties": {
  18966. "sessionID": {
  18967. "type": "string",
  18968. "pattern": "^ses"
  18969. },
  18970. "info": {
  18971. "$ref": "#/components/schemas/Session"
  18972. }
  18973. },
  18974. "required": ["sessionID", "info"],
  18975. "additionalProperties": false
  18976. }
  18977. },
  18978. "required": ["id", "type", "properties"],
  18979. "additionalProperties": false
  18980. },
  18981. "EventSessionNextAgentSwitched": {
  18982. "type": "object",
  18983. "properties": {
  18984. "id": {
  18985. "type": "string"
  18986. },
  18987. "type": {
  18988. "type": "string",
  18989. "enum": ["session.next.agent.switched"]
  18990. },
  18991. "properties": {
  18992. "type": "object",
  18993. "properties": {
  18994. "timestamp": {
  18995. "type": "number"
  18996. },
  18997. "sessionID": {
  18998. "type": "string",
  18999. "pattern": "^ses"
  19000. },
  19001. "agent": {
  19002. "type": "string"
  19003. }
  19004. },
  19005. "required": ["timestamp", "sessionID", "agent"],
  19006. "additionalProperties": false
  19007. }
  19008. },
  19009. "required": ["id", "type", "properties"],
  19010. "additionalProperties": false
  19011. },
  19012. "EventSessionNextModelSwitched": {
  19013. "type": "object",
  19014. "properties": {
  19015. "id": {
  19016. "type": "string"
  19017. },
  19018. "type": {
  19019. "type": "string",
  19020. "enum": ["session.next.model.switched"]
  19021. },
  19022. "properties": {
  19023. "type": "object",
  19024. "properties": {
  19025. "timestamp": {
  19026. "type": "number"
  19027. },
  19028. "sessionID": {
  19029. "type": "string",
  19030. "pattern": "^ses"
  19031. },
  19032. "model": {
  19033. "type": "object",
  19034. "properties": {
  19035. "id": {
  19036. "type": "string"
  19037. },
  19038. "providerID": {
  19039. "type": "string"
  19040. },
  19041. "variant": {
  19042. "type": "string"
  19043. }
  19044. },
  19045. "required": ["id", "providerID", "variant"],
  19046. "additionalProperties": false
  19047. }
  19048. },
  19049. "required": ["timestamp", "sessionID", "model"],
  19050. "additionalProperties": false
  19051. }
  19052. },
  19053. "required": ["id", "type", "properties"],
  19054. "additionalProperties": false
  19055. },
  19056. "PromptSource": {
  19057. "type": "object",
  19058. "properties": {
  19059. "start": {
  19060. "type": "number"
  19061. },
  19062. "end": {
  19063. "type": "number"
  19064. },
  19065. "text": {
  19066. "type": "string"
  19067. }
  19068. },
  19069. "required": ["start", "end", "text"],
  19070. "additionalProperties": false
  19071. },
  19072. "PromptFileAttachment": {
  19073. "type": "object",
  19074. "properties": {
  19075. "uri": {
  19076. "type": "string"
  19077. },
  19078. "mime": {
  19079. "type": "string"
  19080. },
  19081. "name": {
  19082. "type": "string"
  19083. },
  19084. "description": {
  19085. "type": "string"
  19086. },
  19087. "source": {
  19088. "$ref": "#/components/schemas/PromptSource"
  19089. }
  19090. },
  19091. "required": ["uri", "mime"],
  19092. "additionalProperties": false
  19093. },
  19094. "PromptAgentAttachment": {
  19095. "type": "object",
  19096. "properties": {
  19097. "name": {
  19098. "type": "string"
  19099. },
  19100. "source": {
  19101. "$ref": "#/components/schemas/PromptSource"
  19102. }
  19103. },
  19104. "required": ["name"],
  19105. "additionalProperties": false
  19106. },
  19107. "PromptReferenceAttachment": {
  19108. "type": "object",
  19109. "properties": {
  19110. "name": {
  19111. "type": "string"
  19112. },
  19113. "kind": {
  19114. "type": "string",
  19115. "enum": ["local", "git", "invalid"]
  19116. },
  19117. "uri": {
  19118. "type": "string"
  19119. },
  19120. "repository": {
  19121. "type": "string"
  19122. },
  19123. "branch": {
  19124. "type": "string"
  19125. },
  19126. "target": {
  19127. "type": "string"
  19128. },
  19129. "targetUri": {
  19130. "type": "string"
  19131. },
  19132. "problem": {
  19133. "type": "string"
  19134. },
  19135. "source": {
  19136. "$ref": "#/components/schemas/PromptSource"
  19137. }
  19138. },
  19139. "required": ["name", "kind"],
  19140. "additionalProperties": false
  19141. },
  19142. "EventSessionNextPrompted": {
  19143. "type": "object",
  19144. "properties": {
  19145. "id": {
  19146. "type": "string"
  19147. },
  19148. "type": {
  19149. "type": "string",
  19150. "enum": ["session.next.prompted"]
  19151. },
  19152. "properties": {
  19153. "type": "object",
  19154. "properties": {
  19155. "timestamp": {
  19156. "type": "number"
  19157. },
  19158. "sessionID": {
  19159. "type": "string",
  19160. "pattern": "^ses"
  19161. },
  19162. "prompt": {
  19163. "$ref": "#/components/schemas/Prompt"
  19164. }
  19165. },
  19166. "required": ["timestamp", "sessionID", "prompt"],
  19167. "additionalProperties": false
  19168. }
  19169. },
  19170. "required": ["id", "type", "properties"],
  19171. "additionalProperties": false
  19172. },
  19173. "EventSessionNextSynthetic": {
  19174. "type": "object",
  19175. "properties": {
  19176. "id": {
  19177. "type": "string"
  19178. },
  19179. "type": {
  19180. "type": "string",
  19181. "enum": ["session.next.synthetic"]
  19182. },
  19183. "properties": {
  19184. "type": "object",
  19185. "properties": {
  19186. "timestamp": {
  19187. "type": "number"
  19188. },
  19189. "sessionID": {
  19190. "type": "string",
  19191. "pattern": "^ses"
  19192. },
  19193. "text": {
  19194. "type": "string"
  19195. }
  19196. },
  19197. "required": ["timestamp", "sessionID", "text"],
  19198. "additionalProperties": false
  19199. }
  19200. },
  19201. "required": ["id", "type", "properties"],
  19202. "additionalProperties": false
  19203. },
  19204. "EventSessionNextShellStarted": {
  19205. "type": "object",
  19206. "properties": {
  19207. "id": {
  19208. "type": "string"
  19209. },
  19210. "type": {
  19211. "type": "string",
  19212. "enum": ["session.next.shell.started"]
  19213. },
  19214. "properties": {
  19215. "type": "object",
  19216. "properties": {
  19217. "timestamp": {
  19218. "type": "number"
  19219. },
  19220. "sessionID": {
  19221. "type": "string",
  19222. "pattern": "^ses"
  19223. },
  19224. "callID": {
  19225. "type": "string"
  19226. },
  19227. "command": {
  19228. "type": "string"
  19229. }
  19230. },
  19231. "required": ["timestamp", "sessionID", "callID", "command"],
  19232. "additionalProperties": false
  19233. }
  19234. },
  19235. "required": ["id", "type", "properties"],
  19236. "additionalProperties": false
  19237. },
  19238. "EventSessionNextShellEnded": {
  19239. "type": "object",
  19240. "properties": {
  19241. "id": {
  19242. "type": "string"
  19243. },
  19244. "type": {
  19245. "type": "string",
  19246. "enum": ["session.next.shell.ended"]
  19247. },
  19248. "properties": {
  19249. "type": "object",
  19250. "properties": {
  19251. "timestamp": {
  19252. "type": "number"
  19253. },
  19254. "sessionID": {
  19255. "type": "string",
  19256. "pattern": "^ses"
  19257. },
  19258. "callID": {
  19259. "type": "string"
  19260. },
  19261. "output": {
  19262. "type": "string"
  19263. }
  19264. },
  19265. "required": ["timestamp", "sessionID", "callID", "output"],
  19266. "additionalProperties": false
  19267. }
  19268. },
  19269. "required": ["id", "type", "properties"],
  19270. "additionalProperties": false
  19271. },
  19272. "EventSessionNextStepStarted": {
  19273. "type": "object",
  19274. "properties": {
  19275. "id": {
  19276. "type": "string"
  19277. },
  19278. "type": {
  19279. "type": "string",
  19280. "enum": ["session.next.step.started"]
  19281. },
  19282. "properties": {
  19283. "type": "object",
  19284. "properties": {
  19285. "timestamp": {
  19286. "type": "number"
  19287. },
  19288. "sessionID": {
  19289. "type": "string",
  19290. "pattern": "^ses"
  19291. },
  19292. "agent": {
  19293. "type": "string"
  19294. },
  19295. "model": {
  19296. "type": "object",
  19297. "properties": {
  19298. "id": {
  19299. "type": "string"
  19300. },
  19301. "providerID": {
  19302. "type": "string"
  19303. },
  19304. "variant": {
  19305. "type": "string"
  19306. }
  19307. },
  19308. "required": ["id", "providerID", "variant"],
  19309. "additionalProperties": false
  19310. },
  19311. "snapshot": {
  19312. "type": "string"
  19313. }
  19314. },
  19315. "required": ["timestamp", "sessionID", "agent", "model"],
  19316. "additionalProperties": false
  19317. }
  19318. },
  19319. "required": ["id", "type", "properties"],
  19320. "additionalProperties": false
  19321. },
  19322. "EventSessionNextStepEnded": {
  19323. "type": "object",
  19324. "properties": {
  19325. "id": {
  19326. "type": "string"
  19327. },
  19328. "type": {
  19329. "type": "string",
  19330. "enum": ["session.next.step.ended"]
  19331. },
  19332. "properties": {
  19333. "type": "object",
  19334. "properties": {
  19335. "timestamp": {
  19336. "type": "number"
  19337. },
  19338. "sessionID": {
  19339. "type": "string",
  19340. "pattern": "^ses"
  19341. },
  19342. "finish": {
  19343. "type": "string"
  19344. },
  19345. "cost": {
  19346. "type": "number"
  19347. },
  19348. "tokens": {
  19349. "type": "object",
  19350. "properties": {
  19351. "input": {
  19352. "type": "number"
  19353. },
  19354. "output": {
  19355. "type": "number"
  19356. },
  19357. "reasoning": {
  19358. "type": "number"
  19359. },
  19360. "cache": {
  19361. "type": "object",
  19362. "properties": {
  19363. "read": {
  19364. "type": "number"
  19365. },
  19366. "write": {
  19367. "type": "number"
  19368. }
  19369. },
  19370. "required": ["read", "write"],
  19371. "additionalProperties": false
  19372. }
  19373. },
  19374. "required": ["input", "output", "reasoning", "cache"],
  19375. "additionalProperties": false
  19376. },
  19377. "snapshot": {
  19378. "type": "string"
  19379. }
  19380. },
  19381. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19382. "additionalProperties": false
  19383. }
  19384. },
  19385. "required": ["id", "type", "properties"],
  19386. "additionalProperties": false
  19387. },
  19388. "SessionErrorUnknown": {
  19389. "type": "object",
  19390. "properties": {
  19391. "type": {
  19392. "type": "string",
  19393. "enum": ["unknown"]
  19394. },
  19395. "message": {
  19396. "type": "string"
  19397. }
  19398. },
  19399. "required": ["type", "message"],
  19400. "additionalProperties": false
  19401. },
  19402. "EventSessionNextStepFailed": {
  19403. "type": "object",
  19404. "properties": {
  19405. "id": {
  19406. "type": "string"
  19407. },
  19408. "type": {
  19409. "type": "string",
  19410. "enum": ["session.next.step.failed"]
  19411. },
  19412. "properties": {
  19413. "type": "object",
  19414. "properties": {
  19415. "timestamp": {
  19416. "type": "number"
  19417. },
  19418. "sessionID": {
  19419. "type": "string",
  19420. "pattern": "^ses"
  19421. },
  19422. "error": {
  19423. "$ref": "#/components/schemas/SessionErrorUnknown"
  19424. }
  19425. },
  19426. "required": ["timestamp", "sessionID", "error"],
  19427. "additionalProperties": false
  19428. }
  19429. },
  19430. "required": ["id", "type", "properties"],
  19431. "additionalProperties": false
  19432. },
  19433. "EventSessionNextTextStarted": {
  19434. "type": "object",
  19435. "properties": {
  19436. "id": {
  19437. "type": "string"
  19438. },
  19439. "type": {
  19440. "type": "string",
  19441. "enum": ["session.next.text.started"]
  19442. },
  19443. "properties": {
  19444. "type": "object",
  19445. "properties": {
  19446. "timestamp": {
  19447. "type": "number"
  19448. },
  19449. "sessionID": {
  19450. "type": "string",
  19451. "pattern": "^ses"
  19452. }
  19453. },
  19454. "required": ["timestamp", "sessionID"],
  19455. "additionalProperties": false
  19456. }
  19457. },
  19458. "required": ["id", "type", "properties"],
  19459. "additionalProperties": false
  19460. },
  19461. "EventSessionNextTextDelta": {
  19462. "type": "object",
  19463. "properties": {
  19464. "id": {
  19465. "type": "string"
  19466. },
  19467. "type": {
  19468. "type": "string",
  19469. "enum": ["session.next.text.delta"]
  19470. },
  19471. "properties": {
  19472. "type": "object",
  19473. "properties": {
  19474. "timestamp": {
  19475. "type": "number"
  19476. },
  19477. "sessionID": {
  19478. "type": "string",
  19479. "pattern": "^ses"
  19480. },
  19481. "delta": {
  19482. "type": "string"
  19483. }
  19484. },
  19485. "required": ["timestamp", "sessionID", "delta"],
  19486. "additionalProperties": false
  19487. }
  19488. },
  19489. "required": ["id", "type", "properties"],
  19490. "additionalProperties": false
  19491. },
  19492. "EventSessionNextTextEnded": {
  19493. "type": "object",
  19494. "properties": {
  19495. "id": {
  19496. "type": "string"
  19497. },
  19498. "type": {
  19499. "type": "string",
  19500. "enum": ["session.next.text.ended"]
  19501. },
  19502. "properties": {
  19503. "type": "object",
  19504. "properties": {
  19505. "timestamp": {
  19506. "type": "number"
  19507. },
  19508. "sessionID": {
  19509. "type": "string",
  19510. "pattern": "^ses"
  19511. },
  19512. "text": {
  19513. "type": "string"
  19514. }
  19515. },
  19516. "required": ["timestamp", "sessionID", "text"],
  19517. "additionalProperties": false
  19518. }
  19519. },
  19520. "required": ["id", "type", "properties"],
  19521. "additionalProperties": false
  19522. },
  19523. "EventSessionNextReasoningStarted": {
  19524. "type": "object",
  19525. "properties": {
  19526. "id": {
  19527. "type": "string"
  19528. },
  19529. "type": {
  19530. "type": "string",
  19531. "enum": ["session.next.reasoning.started"]
  19532. },
  19533. "properties": {
  19534. "type": "object",
  19535. "properties": {
  19536. "timestamp": {
  19537. "type": "number"
  19538. },
  19539. "sessionID": {
  19540. "type": "string",
  19541. "pattern": "^ses"
  19542. },
  19543. "reasoningID": {
  19544. "type": "string"
  19545. }
  19546. },
  19547. "required": ["timestamp", "sessionID", "reasoningID"],
  19548. "additionalProperties": false
  19549. }
  19550. },
  19551. "required": ["id", "type", "properties"],
  19552. "additionalProperties": false
  19553. },
  19554. "EventSessionNextReasoningDelta": {
  19555. "type": "object",
  19556. "properties": {
  19557. "id": {
  19558. "type": "string"
  19559. },
  19560. "type": {
  19561. "type": "string",
  19562. "enum": ["session.next.reasoning.delta"]
  19563. },
  19564. "properties": {
  19565. "type": "object",
  19566. "properties": {
  19567. "timestamp": {
  19568. "type": "number"
  19569. },
  19570. "sessionID": {
  19571. "type": "string",
  19572. "pattern": "^ses"
  19573. },
  19574. "reasoningID": {
  19575. "type": "string"
  19576. },
  19577. "delta": {
  19578. "type": "string"
  19579. }
  19580. },
  19581. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19582. "additionalProperties": false
  19583. }
  19584. },
  19585. "required": ["id", "type", "properties"],
  19586. "additionalProperties": false
  19587. },
  19588. "EventSessionNextReasoningEnded": {
  19589. "type": "object",
  19590. "properties": {
  19591. "id": {
  19592. "type": "string"
  19593. },
  19594. "type": {
  19595. "type": "string",
  19596. "enum": ["session.next.reasoning.ended"]
  19597. },
  19598. "properties": {
  19599. "type": "object",
  19600. "properties": {
  19601. "timestamp": {
  19602. "type": "number"
  19603. },
  19604. "sessionID": {
  19605. "type": "string",
  19606. "pattern": "^ses"
  19607. },
  19608. "reasoningID": {
  19609. "type": "string"
  19610. },
  19611. "text": {
  19612. "type": "string"
  19613. }
  19614. },
  19615. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19616. "additionalProperties": false
  19617. }
  19618. },
  19619. "required": ["id", "type", "properties"],
  19620. "additionalProperties": false
  19621. },
  19622. "EventSessionNextToolInputStarted": {
  19623. "type": "object",
  19624. "properties": {
  19625. "id": {
  19626. "type": "string"
  19627. },
  19628. "type": {
  19629. "type": "string",
  19630. "enum": ["session.next.tool.input.started"]
  19631. },
  19632. "properties": {
  19633. "type": "object",
  19634. "properties": {
  19635. "timestamp": {
  19636. "type": "number"
  19637. },
  19638. "sessionID": {
  19639. "type": "string",
  19640. "pattern": "^ses"
  19641. },
  19642. "callID": {
  19643. "type": "string"
  19644. },
  19645. "name": {
  19646. "type": "string"
  19647. }
  19648. },
  19649. "required": ["timestamp", "sessionID", "callID", "name"],
  19650. "additionalProperties": false
  19651. }
  19652. },
  19653. "required": ["id", "type", "properties"],
  19654. "additionalProperties": false
  19655. },
  19656. "EventSessionNextToolInputDelta": {
  19657. "type": "object",
  19658. "properties": {
  19659. "id": {
  19660. "type": "string"
  19661. },
  19662. "type": {
  19663. "type": "string",
  19664. "enum": ["session.next.tool.input.delta"]
  19665. },
  19666. "properties": {
  19667. "type": "object",
  19668. "properties": {
  19669. "timestamp": {
  19670. "type": "number"
  19671. },
  19672. "sessionID": {
  19673. "type": "string",
  19674. "pattern": "^ses"
  19675. },
  19676. "callID": {
  19677. "type": "string"
  19678. },
  19679. "delta": {
  19680. "type": "string"
  19681. }
  19682. },
  19683. "required": ["timestamp", "sessionID", "callID", "delta"],
  19684. "additionalProperties": false
  19685. }
  19686. },
  19687. "required": ["id", "type", "properties"],
  19688. "additionalProperties": false
  19689. },
  19690. "EventSessionNextToolInputEnded": {
  19691. "type": "object",
  19692. "properties": {
  19693. "id": {
  19694. "type": "string"
  19695. },
  19696. "type": {
  19697. "type": "string",
  19698. "enum": ["session.next.tool.input.ended"]
  19699. },
  19700. "properties": {
  19701. "type": "object",
  19702. "properties": {
  19703. "timestamp": {
  19704. "type": "number"
  19705. },
  19706. "sessionID": {
  19707. "type": "string",
  19708. "pattern": "^ses"
  19709. },
  19710. "callID": {
  19711. "type": "string"
  19712. },
  19713. "text": {
  19714. "type": "string"
  19715. }
  19716. },
  19717. "required": ["timestamp", "sessionID", "callID", "text"],
  19718. "additionalProperties": false
  19719. }
  19720. },
  19721. "required": ["id", "type", "properties"],
  19722. "additionalProperties": false
  19723. },
  19724. "EventSessionNextToolCalled": {
  19725. "type": "object",
  19726. "properties": {
  19727. "id": {
  19728. "type": "string"
  19729. },
  19730. "type": {
  19731. "type": "string",
  19732. "enum": ["session.next.tool.called"]
  19733. },
  19734. "properties": {
  19735. "type": "object",
  19736. "properties": {
  19737. "timestamp": {
  19738. "type": "number"
  19739. },
  19740. "sessionID": {
  19741. "type": "string",
  19742. "pattern": "^ses"
  19743. },
  19744. "callID": {
  19745. "type": "string"
  19746. },
  19747. "tool": {
  19748. "type": "string"
  19749. },
  19750. "input": {
  19751. "type": "object"
  19752. },
  19753. "provider": {
  19754. "type": "object",
  19755. "properties": {
  19756. "executed": {
  19757. "type": "boolean"
  19758. },
  19759. "metadata": {
  19760. "type": "object"
  19761. }
  19762. },
  19763. "required": ["executed"],
  19764. "additionalProperties": false
  19765. }
  19766. },
  19767. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19768. "additionalProperties": false
  19769. }
  19770. },
  19771. "required": ["id", "type", "properties"],
  19772. "additionalProperties": false
  19773. },
  19774. "ToolTextContent": {
  19775. "type": "object",
  19776. "properties": {
  19777. "type": {
  19778. "type": "string",
  19779. "enum": ["text"]
  19780. },
  19781. "text": {
  19782. "type": "string"
  19783. }
  19784. },
  19785. "required": ["type", "text"],
  19786. "additionalProperties": false
  19787. },
  19788. "ToolFileContent": {
  19789. "type": "object",
  19790. "properties": {
  19791. "type": {
  19792. "type": "string",
  19793. "enum": ["file"]
  19794. },
  19795. "uri": {
  19796. "type": "string"
  19797. },
  19798. "mime": {
  19799. "type": "string"
  19800. },
  19801. "name": {
  19802. "type": "string"
  19803. }
  19804. },
  19805. "required": ["type", "uri", "mime"],
  19806. "additionalProperties": false
  19807. },
  19808. "EventSessionNextToolProgress": {
  19809. "type": "object",
  19810. "properties": {
  19811. "id": {
  19812. "type": "string"
  19813. },
  19814. "type": {
  19815. "type": "string",
  19816. "enum": ["session.next.tool.progress"]
  19817. },
  19818. "properties": {
  19819. "type": "object",
  19820. "properties": {
  19821. "timestamp": {
  19822. "type": "number"
  19823. },
  19824. "sessionID": {
  19825. "type": "string",
  19826. "pattern": "^ses"
  19827. },
  19828. "callID": {
  19829. "type": "string"
  19830. },
  19831. "structured": {
  19832. "type": "object"
  19833. },
  19834. "content": {
  19835. "type": "array",
  19836. "items": {
  19837. "anyOf": [
  19838. {
  19839. "$ref": "#/components/schemas/ToolTextContent"
  19840. },
  19841. {
  19842. "$ref": "#/components/schemas/ToolFileContent"
  19843. }
  19844. ]
  19845. }
  19846. }
  19847. },
  19848. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19849. "additionalProperties": false
  19850. }
  19851. },
  19852. "required": ["id", "type", "properties"],
  19853. "additionalProperties": false
  19854. },
  19855. "EventSessionNextToolSuccess": {
  19856. "type": "object",
  19857. "properties": {
  19858. "id": {
  19859. "type": "string"
  19860. },
  19861. "type": {
  19862. "type": "string",
  19863. "enum": ["session.next.tool.success"]
  19864. },
  19865. "properties": {
  19866. "type": "object",
  19867. "properties": {
  19868. "timestamp": {
  19869. "type": "number"
  19870. },
  19871. "sessionID": {
  19872. "type": "string",
  19873. "pattern": "^ses"
  19874. },
  19875. "callID": {
  19876. "type": "string"
  19877. },
  19878. "structured": {
  19879. "type": "object"
  19880. },
  19881. "content": {
  19882. "type": "array",
  19883. "items": {
  19884. "anyOf": [
  19885. {
  19886. "$ref": "#/components/schemas/ToolTextContent"
  19887. },
  19888. {
  19889. "$ref": "#/components/schemas/ToolFileContent"
  19890. }
  19891. ]
  19892. }
  19893. },
  19894. "provider": {
  19895. "type": "object",
  19896. "properties": {
  19897. "executed": {
  19898. "type": "boolean"
  19899. },
  19900. "metadata": {
  19901. "type": "object"
  19902. }
  19903. },
  19904. "required": ["executed"],
  19905. "additionalProperties": false
  19906. }
  19907. },
  19908. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  19909. "additionalProperties": false
  19910. }
  19911. },
  19912. "required": ["id", "type", "properties"],
  19913. "additionalProperties": false
  19914. },
  19915. "EventSessionNextToolFailed": {
  19916. "type": "object",
  19917. "properties": {
  19918. "id": {
  19919. "type": "string"
  19920. },
  19921. "type": {
  19922. "type": "string",
  19923. "enum": ["session.next.tool.failed"]
  19924. },
  19925. "properties": {
  19926. "type": "object",
  19927. "properties": {
  19928. "timestamp": {
  19929. "type": "number"
  19930. },
  19931. "sessionID": {
  19932. "type": "string",
  19933. "pattern": "^ses"
  19934. },
  19935. "callID": {
  19936. "type": "string"
  19937. },
  19938. "error": {
  19939. "$ref": "#/components/schemas/SessionErrorUnknown"
  19940. },
  19941. "provider": {
  19942. "type": "object",
  19943. "properties": {
  19944. "executed": {
  19945. "type": "boolean"
  19946. },
  19947. "metadata": {
  19948. "type": "object"
  19949. }
  19950. },
  19951. "required": ["executed"],
  19952. "additionalProperties": false
  19953. }
  19954. },
  19955. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  19956. "additionalProperties": false
  19957. }
  19958. },
  19959. "required": ["id", "type", "properties"],
  19960. "additionalProperties": false
  19961. },
  19962. "SessionNextRetry_error": {
  19963. "type": "object",
  19964. "properties": {
  19965. "message": {
  19966. "type": "string"
  19967. },
  19968. "statusCode": {
  19969. "type": "number"
  19970. },
  19971. "isRetryable": {
  19972. "type": "boolean"
  19973. },
  19974. "responseHeaders": {
  19975. "type": "object",
  19976. "additionalProperties": {
  19977. "type": "string"
  19978. }
  19979. },
  19980. "responseBody": {
  19981. "type": "string"
  19982. },
  19983. "metadata": {
  19984. "type": "object",
  19985. "additionalProperties": {
  19986. "type": "string"
  19987. }
  19988. }
  19989. },
  19990. "required": ["message", "isRetryable"],
  19991. "additionalProperties": false
  19992. },
  19993. "EventSessionNextRetried": {
  19994. "type": "object",
  19995. "properties": {
  19996. "id": {
  19997. "type": "string"
  19998. },
  19999. "type": {
  20000. "type": "string",
  20001. "enum": ["session.next.retried"]
  20002. },
  20003. "properties": {
  20004. "type": "object",
  20005. "properties": {
  20006. "timestamp": {
  20007. "type": "number"
  20008. },
  20009. "sessionID": {
  20010. "type": "string",
  20011. "pattern": "^ses"
  20012. },
  20013. "attempt": {
  20014. "type": "number"
  20015. },
  20016. "error": {
  20017. "$ref": "#/components/schemas/SessionNextRetry_error"
  20018. }
  20019. },
  20020. "required": ["timestamp", "sessionID", "attempt", "error"],
  20021. "additionalProperties": false
  20022. }
  20023. },
  20024. "required": ["id", "type", "properties"],
  20025. "additionalProperties": false
  20026. },
  20027. "EventSessionNextCompactionStarted": {
  20028. "type": "object",
  20029. "properties": {
  20030. "id": {
  20031. "type": "string"
  20032. },
  20033. "type": {
  20034. "type": "string",
  20035. "enum": ["session.next.compaction.started"]
  20036. },
  20037. "properties": {
  20038. "type": "object",
  20039. "properties": {
  20040. "timestamp": {
  20041. "type": "number"
  20042. },
  20043. "sessionID": {
  20044. "type": "string",
  20045. "pattern": "^ses"
  20046. },
  20047. "reason": {
  20048. "type": "string",
  20049. "enum": ["auto", "manual"]
  20050. }
  20051. },
  20052. "required": ["timestamp", "sessionID", "reason"],
  20053. "additionalProperties": false
  20054. }
  20055. },
  20056. "required": ["id", "type", "properties"],
  20057. "additionalProperties": false
  20058. },
  20059. "EventSessionNextCompactionDelta": {
  20060. "type": "object",
  20061. "properties": {
  20062. "id": {
  20063. "type": "string"
  20064. },
  20065. "type": {
  20066. "type": "string",
  20067. "enum": ["session.next.compaction.delta"]
  20068. },
  20069. "properties": {
  20070. "type": "object",
  20071. "properties": {
  20072. "timestamp": {
  20073. "type": "number"
  20074. },
  20075. "sessionID": {
  20076. "type": "string",
  20077. "pattern": "^ses"
  20078. },
  20079. "text": {
  20080. "type": "string"
  20081. }
  20082. },
  20083. "required": ["timestamp", "sessionID", "text"],
  20084. "additionalProperties": false
  20085. }
  20086. },
  20087. "required": ["id", "type", "properties"],
  20088. "additionalProperties": false
  20089. },
  20090. "EventSessionNextCompactionEnded": {
  20091. "type": "object",
  20092. "properties": {
  20093. "id": {
  20094. "type": "string"
  20095. },
  20096. "type": {
  20097. "type": "string",
  20098. "enum": ["session.next.compaction.ended"]
  20099. },
  20100. "properties": {
  20101. "type": "object",
  20102. "properties": {
  20103. "timestamp": {
  20104. "type": "number"
  20105. },
  20106. "sessionID": {
  20107. "type": "string",
  20108. "pattern": "^ses"
  20109. },
  20110. "text": {
  20111. "type": "string"
  20112. },
  20113. "include": {
  20114. "type": "string"
  20115. }
  20116. },
  20117. "required": ["timestamp", "sessionID", "text"],
  20118. "additionalProperties": false
  20119. }
  20120. },
  20121. "required": ["id", "type", "properties"],
  20122. "additionalProperties": false
  20123. },
  20124. "ModelV2Info": {
  20125. "type": "object",
  20126. "properties": {
  20127. "id": {
  20128. "type": "string"
  20129. },
  20130. "apiID": {
  20131. "type": "string"
  20132. },
  20133. "providerID": {
  20134. "type": "string"
  20135. },
  20136. "family": {
  20137. "type": "string"
  20138. },
  20139. "name": {
  20140. "type": "string"
  20141. },
  20142. "endpoint": {
  20143. "anyOf": [
  20144. {
  20145. "type": "object",
  20146. "properties": {
  20147. "type": {
  20148. "type": "string",
  20149. "enum": ["unknown"]
  20150. }
  20151. },
  20152. "required": ["type"],
  20153. "additionalProperties": false
  20154. },
  20155. {
  20156. "type": "object",
  20157. "properties": {
  20158. "type": {
  20159. "type": "string",
  20160. "enum": ["openai/responses"]
  20161. },
  20162. "url": {
  20163. "type": "string"
  20164. },
  20165. "websocket": {
  20166. "type": "boolean"
  20167. }
  20168. },
  20169. "required": ["type", "url"],
  20170. "additionalProperties": false
  20171. },
  20172. {
  20173. "type": "object",
  20174. "properties": {
  20175. "type": {
  20176. "type": "string",
  20177. "enum": ["openai/completions"]
  20178. },
  20179. "url": {
  20180. "type": "string"
  20181. },
  20182. "reasoning": {
  20183. "anyOf": [
  20184. {
  20185. "type": "object",
  20186. "properties": {
  20187. "type": {
  20188. "type": "string",
  20189. "enum": ["reasoning_content"]
  20190. }
  20191. },
  20192. "required": ["type"],
  20193. "additionalProperties": false
  20194. },
  20195. {
  20196. "type": "object",
  20197. "properties": {
  20198. "type": {
  20199. "type": "string",
  20200. "enum": ["reasoning_details"]
  20201. }
  20202. },
  20203. "required": ["type"],
  20204. "additionalProperties": false
  20205. }
  20206. ]
  20207. }
  20208. },
  20209. "required": ["type", "url"],
  20210. "additionalProperties": false
  20211. },
  20212. {
  20213. "type": "object",
  20214. "properties": {
  20215. "type": {
  20216. "type": "string",
  20217. "enum": ["anthropic/messages"]
  20218. },
  20219. "url": {
  20220. "type": "string"
  20221. }
  20222. },
  20223. "required": ["type", "url"],
  20224. "additionalProperties": false
  20225. },
  20226. {
  20227. "type": "object",
  20228. "properties": {
  20229. "type": {
  20230. "type": "string",
  20231. "enum": ["aisdk"]
  20232. },
  20233. "package": {
  20234. "type": "string"
  20235. },
  20236. "url": {
  20237. "type": "string"
  20238. }
  20239. },
  20240. "required": ["type", "package"],
  20241. "additionalProperties": false
  20242. }
  20243. ]
  20244. },
  20245. "capabilities": {
  20246. "type": "object",
  20247. "properties": {
  20248. "tools": {
  20249. "type": "boolean"
  20250. },
  20251. "input": {
  20252. "type": "array",
  20253. "items": {
  20254. "type": "string"
  20255. }
  20256. },
  20257. "output": {
  20258. "type": "array",
  20259. "items": {
  20260. "type": "string"
  20261. }
  20262. }
  20263. },
  20264. "required": ["tools", "input", "output"],
  20265. "additionalProperties": false
  20266. },
  20267. "options": {
  20268. "type": "object",
  20269. "properties": {
  20270. "headers": {
  20271. "type": "object",
  20272. "additionalProperties": {
  20273. "type": "string"
  20274. }
  20275. },
  20276. "body": {
  20277. "type": "object"
  20278. },
  20279. "aisdk": {
  20280. "type": "object",
  20281. "properties": {
  20282. "provider": {
  20283. "type": "object"
  20284. },
  20285. "request": {
  20286. "type": "object"
  20287. }
  20288. },
  20289. "required": ["provider", "request"],
  20290. "additionalProperties": false
  20291. },
  20292. "variant": {
  20293. "type": "string"
  20294. }
  20295. },
  20296. "required": ["headers", "body", "aisdk"],
  20297. "additionalProperties": false
  20298. },
  20299. "variants": {
  20300. "type": "array",
  20301. "items": {
  20302. "type": "object",
  20303. "properties": {
  20304. "id": {
  20305. "type": "string"
  20306. },
  20307. "headers": {
  20308. "type": "object",
  20309. "additionalProperties": {
  20310. "type": "string"
  20311. }
  20312. },
  20313. "body": {
  20314. "type": "object"
  20315. },
  20316. "aisdk": {
  20317. "type": "object",
  20318. "properties": {
  20319. "provider": {
  20320. "type": "object"
  20321. },
  20322. "request": {
  20323. "type": "object"
  20324. }
  20325. },
  20326. "required": ["provider", "request"],
  20327. "additionalProperties": false
  20328. }
  20329. },
  20330. "required": ["id", "headers", "body", "aisdk"],
  20331. "additionalProperties": false
  20332. }
  20333. },
  20334. "time": {
  20335. "type": "object",
  20336. "properties": {
  20337. "released": {
  20338. "anyOf": [
  20339. {
  20340. "type": "number"
  20341. },
  20342. {
  20343. "type": "string",
  20344. "enum": ["NaN"]
  20345. },
  20346. {
  20347. "type": "string",
  20348. "enum": ["Infinity"]
  20349. },
  20350. {
  20351. "type": "string",
  20352. "enum": ["-Infinity"]
  20353. },
  20354. {
  20355. "type": "string",
  20356. "enum": ["Infinity", "-Infinity", "NaN"]
  20357. }
  20358. ]
  20359. }
  20360. },
  20361. "required": ["released"],
  20362. "additionalProperties": false
  20363. },
  20364. "cost": {
  20365. "type": "array",
  20366. "items": {
  20367. "type": "object",
  20368. "properties": {
  20369. "tier": {
  20370. "type": "object",
  20371. "properties": {
  20372. "type": {
  20373. "type": "string",
  20374. "enum": ["context"]
  20375. },
  20376. "size": {
  20377. "type": "integer"
  20378. }
  20379. },
  20380. "required": ["type", "size"],
  20381. "additionalProperties": false
  20382. },
  20383. "input": {
  20384. "type": "number"
  20385. },
  20386. "output": {
  20387. "type": "number"
  20388. },
  20389. "cache": {
  20390. "type": "object",
  20391. "properties": {
  20392. "read": {
  20393. "type": "number"
  20394. },
  20395. "write": {
  20396. "type": "number"
  20397. }
  20398. },
  20399. "required": ["read", "write"],
  20400. "additionalProperties": false
  20401. }
  20402. },
  20403. "required": ["input", "output", "cache"],
  20404. "additionalProperties": false
  20405. }
  20406. },
  20407. "status": {
  20408. "type": "string",
  20409. "enum": ["alpha", "beta", "deprecated", "active"]
  20410. },
  20411. "enabled": {
  20412. "type": "boolean"
  20413. },
  20414. "limit": {
  20415. "type": "object",
  20416. "properties": {
  20417. "context": {
  20418. "type": "integer"
  20419. },
  20420. "input": {
  20421. "type": "integer"
  20422. },
  20423. "output": {
  20424. "type": "integer"
  20425. }
  20426. },
  20427. "required": ["context", "output"],
  20428. "additionalProperties": false
  20429. }
  20430. },
  20431. "required": [
  20432. "id",
  20433. "apiID",
  20434. "providerID",
  20435. "name",
  20436. "endpoint",
  20437. "capabilities",
  20438. "options",
  20439. "variants",
  20440. "time",
  20441. "cost",
  20442. "status",
  20443. "enabled",
  20444. "limit"
  20445. ],
  20446. "additionalProperties": false
  20447. },
  20448. "EventCatalogModelUpdated": {
  20449. "type": "object",
  20450. "properties": {
  20451. "id": {
  20452. "type": "string"
  20453. },
  20454. "type": {
  20455. "type": "string",
  20456. "enum": ["catalog.model.updated"]
  20457. },
  20458. "properties": {
  20459. "type": "object",
  20460. "properties": {
  20461. "model": {
  20462. "$ref": "#/components/schemas/ModelV2Info"
  20463. }
  20464. },
  20465. "required": ["model"],
  20466. "additionalProperties": false
  20467. }
  20468. },
  20469. "required": ["id", "type", "properties"],
  20470. "additionalProperties": false
  20471. },
  20472. "EventModels-devRefreshed": {
  20473. "type": "object",
  20474. "properties": {
  20475. "id": {
  20476. "type": "string"
  20477. },
  20478. "type": {
  20479. "type": "string",
  20480. "enum": ["models-dev.refreshed"]
  20481. },
  20482. "properties": {
  20483. "type": "object",
  20484. "properties": {}
  20485. }
  20486. },
  20487. "required": ["id", "type", "properties"],
  20488. "additionalProperties": false
  20489. },
  20490. "AccountV2OAuthCredential": {
  20491. "type": "object",
  20492. "properties": {
  20493. "type": {
  20494. "type": "string",
  20495. "enum": ["oauth"]
  20496. },
  20497. "refresh": {
  20498. "type": "string"
  20499. },
  20500. "access": {
  20501. "type": "string"
  20502. },
  20503. "expires": {
  20504. "type": "integer",
  20505. "minimum": 0
  20506. }
  20507. },
  20508. "required": ["type", "refresh", "access", "expires"],
  20509. "additionalProperties": false
  20510. },
  20511. "AccountV2ApiKeyCredential": {
  20512. "type": "object",
  20513. "properties": {
  20514. "type": {
  20515. "type": "string",
  20516. "enum": ["api"]
  20517. },
  20518. "key": {
  20519. "type": "string"
  20520. },
  20521. "metadata": {
  20522. "type": "object",
  20523. "additionalProperties": {
  20524. "type": "string"
  20525. }
  20526. }
  20527. },
  20528. "required": ["type", "key"],
  20529. "additionalProperties": false
  20530. },
  20531. "AccountV2Credential": {
  20532. "anyOf": [
  20533. {
  20534. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20535. },
  20536. {
  20537. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20538. }
  20539. ]
  20540. },
  20541. "AccountV2Info": {
  20542. "type": "object",
  20543. "properties": {
  20544. "id": {
  20545. "type": "string"
  20546. },
  20547. "serviceID": {
  20548. "type": "string"
  20549. },
  20550. "description": {
  20551. "type": "string"
  20552. },
  20553. "credential": {
  20554. "$ref": "#/components/schemas/AccountV2Credential"
  20555. }
  20556. },
  20557. "required": ["id", "serviceID", "description", "credential"],
  20558. "additionalProperties": false
  20559. },
  20560. "EventAccountAdded": {
  20561. "type": "object",
  20562. "properties": {
  20563. "id": {
  20564. "type": "string"
  20565. },
  20566. "type": {
  20567. "type": "string",
  20568. "enum": ["account.added"]
  20569. },
  20570. "properties": {
  20571. "type": "object",
  20572. "properties": {
  20573. "account": {
  20574. "$ref": "#/components/schemas/AccountV2Info"
  20575. }
  20576. },
  20577. "required": ["account"],
  20578. "additionalProperties": false
  20579. }
  20580. },
  20581. "required": ["id", "type", "properties"],
  20582. "additionalProperties": false
  20583. },
  20584. "EventAccountRemoved": {
  20585. "type": "object",
  20586. "properties": {
  20587. "id": {
  20588. "type": "string"
  20589. },
  20590. "type": {
  20591. "type": "string",
  20592. "enum": ["account.removed"]
  20593. },
  20594. "properties": {
  20595. "type": "object",
  20596. "properties": {
  20597. "account": {
  20598. "$ref": "#/components/schemas/AccountV2Info"
  20599. }
  20600. },
  20601. "required": ["account"],
  20602. "additionalProperties": false
  20603. }
  20604. },
  20605. "required": ["id", "type", "properties"],
  20606. "additionalProperties": false
  20607. },
  20608. "EventAccountSwitched": {
  20609. "type": "object",
  20610. "properties": {
  20611. "id": {
  20612. "type": "string"
  20613. },
  20614. "type": {
  20615. "type": "string",
  20616. "enum": ["account.switched"]
  20617. },
  20618. "properties": {
  20619. "type": "object",
  20620. "properties": {
  20621. "serviceID": {
  20622. "type": "string"
  20623. },
  20624. "from": {
  20625. "type": "string"
  20626. },
  20627. "to": {
  20628. "type": "string"
  20629. }
  20630. },
  20631. "required": ["serviceID"],
  20632. "additionalProperties": false
  20633. }
  20634. },
  20635. "required": ["id", "type", "properties"],
  20636. "additionalProperties": false
  20637. },
  20638. "SessionInfo": {
  20639. "type": "object",
  20640. "properties": {
  20641. "id": {
  20642. "type": "string",
  20643. "pattern": "^ses"
  20644. },
  20645. "parentID": {
  20646. "type": "string",
  20647. "pattern": "^ses"
  20648. },
  20649. "projectID": {
  20650. "type": "string"
  20651. },
  20652. "workspaceID": {
  20653. "type": "string",
  20654. "pattern": "^wrk"
  20655. },
  20656. "path": {
  20657. "type": "string"
  20658. },
  20659. "agent": {
  20660. "type": "string"
  20661. },
  20662. "model": {
  20663. "type": "object",
  20664. "properties": {
  20665. "id": {
  20666. "type": "string"
  20667. },
  20668. "providerID": {
  20669. "type": "string"
  20670. },
  20671. "variant": {
  20672. "type": "string"
  20673. }
  20674. },
  20675. "required": ["id", "providerID", "variant"],
  20676. "additionalProperties": false
  20677. },
  20678. "cost": {
  20679. "type": "number"
  20680. },
  20681. "tokens": {
  20682. "type": "object",
  20683. "properties": {
  20684. "input": {
  20685. "type": "number"
  20686. },
  20687. "output": {
  20688. "type": "number"
  20689. },
  20690. "reasoning": {
  20691. "type": "number"
  20692. },
  20693. "cache": {
  20694. "type": "object",
  20695. "properties": {
  20696. "read": {
  20697. "type": "number"
  20698. },
  20699. "write": {
  20700. "type": "number"
  20701. }
  20702. },
  20703. "required": ["read", "write"],
  20704. "additionalProperties": false
  20705. }
  20706. },
  20707. "required": ["input", "output", "reasoning", "cache"],
  20708. "additionalProperties": false
  20709. },
  20710. "time": {
  20711. "type": "object",
  20712. "properties": {
  20713. "created": {
  20714. "type": "number"
  20715. },
  20716. "updated": {
  20717. "type": "number"
  20718. },
  20719. "archived": {
  20720. "type": "number"
  20721. }
  20722. },
  20723. "required": ["created", "updated"],
  20724. "additionalProperties": false
  20725. },
  20726. "title": {
  20727. "type": "string"
  20728. }
  20729. },
  20730. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20731. "additionalProperties": false
  20732. },
  20733. "SessionDelivery": {
  20734. "type": "string",
  20735. "enum": ["immediate", "deferred"]
  20736. },
  20737. "SessionMessageAgentSwitched": {
  20738. "type": "object",
  20739. "properties": {
  20740. "id": {
  20741. "type": "string"
  20742. },
  20743. "metadata": {
  20744. "type": "object"
  20745. },
  20746. "time": {
  20747. "type": "object",
  20748. "properties": {
  20749. "created": {
  20750. "type": "number"
  20751. }
  20752. },
  20753. "required": ["created"],
  20754. "additionalProperties": false
  20755. },
  20756. "type": {
  20757. "type": "string",
  20758. "enum": ["agent-switched"]
  20759. },
  20760. "agent": {
  20761. "type": "string"
  20762. }
  20763. },
  20764. "required": ["id", "time", "type", "agent"],
  20765. "additionalProperties": false
  20766. },
  20767. "SessionMessageModelSwitched": {
  20768. "type": "object",
  20769. "properties": {
  20770. "id": {
  20771. "type": "string"
  20772. },
  20773. "metadata": {
  20774. "type": "object"
  20775. },
  20776. "time": {
  20777. "type": "object",
  20778. "properties": {
  20779. "created": {
  20780. "type": "number"
  20781. }
  20782. },
  20783. "required": ["created"],
  20784. "additionalProperties": false
  20785. },
  20786. "type": {
  20787. "type": "string",
  20788. "enum": ["model-switched"]
  20789. },
  20790. "model": {
  20791. "type": "object",
  20792. "properties": {
  20793. "id": {
  20794. "type": "string"
  20795. },
  20796. "providerID": {
  20797. "type": "string"
  20798. },
  20799. "variant": {
  20800. "type": "string"
  20801. }
  20802. },
  20803. "required": ["id", "providerID", "variant"],
  20804. "additionalProperties": false
  20805. }
  20806. },
  20807. "required": ["id", "time", "type", "model"],
  20808. "additionalProperties": false
  20809. },
  20810. "SessionMessageUser": {
  20811. "type": "object",
  20812. "properties": {
  20813. "id": {
  20814. "type": "string"
  20815. },
  20816. "metadata": {
  20817. "type": "object"
  20818. },
  20819. "time": {
  20820. "type": "object",
  20821. "properties": {
  20822. "created": {
  20823. "type": "number"
  20824. }
  20825. },
  20826. "required": ["created"],
  20827. "additionalProperties": false
  20828. },
  20829. "text": {
  20830. "type": "string"
  20831. },
  20832. "files": {
  20833. "type": "array",
  20834. "items": {
  20835. "$ref": "#/components/schemas/PromptFileAttachment"
  20836. }
  20837. },
  20838. "agents": {
  20839. "type": "array",
  20840. "items": {
  20841. "$ref": "#/components/schemas/PromptAgentAttachment"
  20842. }
  20843. },
  20844. "references": {
  20845. "type": "array",
  20846. "items": {
  20847. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20848. }
  20849. },
  20850. "type": {
  20851. "type": "string",
  20852. "enum": ["user"]
  20853. }
  20854. },
  20855. "required": ["id", "time", "text", "type"],
  20856. "additionalProperties": false
  20857. },
  20858. "SessionMessageSynthetic": {
  20859. "type": "object",
  20860. "properties": {
  20861. "id": {
  20862. "type": "string"
  20863. },
  20864. "metadata": {
  20865. "type": "object"
  20866. },
  20867. "time": {
  20868. "type": "object",
  20869. "properties": {
  20870. "created": {
  20871. "type": "number"
  20872. }
  20873. },
  20874. "required": ["created"],
  20875. "additionalProperties": false
  20876. },
  20877. "sessionID": {
  20878. "type": "string",
  20879. "pattern": "^ses"
  20880. },
  20881. "text": {
  20882. "type": "string"
  20883. },
  20884. "type": {
  20885. "type": "string",
  20886. "enum": ["synthetic"]
  20887. }
  20888. },
  20889. "required": ["id", "time", "sessionID", "text", "type"],
  20890. "additionalProperties": false
  20891. },
  20892. "SessionMessageShell": {
  20893. "type": "object",
  20894. "properties": {
  20895. "id": {
  20896. "type": "string"
  20897. },
  20898. "metadata": {
  20899. "type": "object"
  20900. },
  20901. "time": {
  20902. "type": "object",
  20903. "properties": {
  20904. "created": {
  20905. "type": "number"
  20906. },
  20907. "completed": {
  20908. "type": "number"
  20909. }
  20910. },
  20911. "required": ["created"],
  20912. "additionalProperties": false
  20913. },
  20914. "type": {
  20915. "type": "string",
  20916. "enum": ["shell"]
  20917. },
  20918. "callID": {
  20919. "type": "string"
  20920. },
  20921. "command": {
  20922. "type": "string"
  20923. },
  20924. "output": {
  20925. "type": "string"
  20926. }
  20927. },
  20928. "required": ["id", "time", "type", "callID", "command", "output"],
  20929. "additionalProperties": false
  20930. },
  20931. "SessionMessageAssistantText": {
  20932. "type": "object",
  20933. "properties": {
  20934. "type": {
  20935. "type": "string",
  20936. "enum": ["text"]
  20937. },
  20938. "text": {
  20939. "type": "string"
  20940. }
  20941. },
  20942. "required": ["type", "text"],
  20943. "additionalProperties": false
  20944. },
  20945. "SessionMessageAssistantReasoning": {
  20946. "type": "object",
  20947. "properties": {
  20948. "type": {
  20949. "type": "string",
  20950. "enum": ["reasoning"]
  20951. },
  20952. "id": {
  20953. "type": "string"
  20954. },
  20955. "text": {
  20956. "type": "string"
  20957. }
  20958. },
  20959. "required": ["type", "id", "text"],
  20960. "additionalProperties": false
  20961. },
  20962. "SessionMessageToolStatePending": {
  20963. "type": "object",
  20964. "properties": {
  20965. "status": {
  20966. "type": "string",
  20967. "enum": ["pending"]
  20968. },
  20969. "input": {
  20970. "type": "string"
  20971. }
  20972. },
  20973. "required": ["status", "input"],
  20974. "additionalProperties": false
  20975. },
  20976. "SessionMessageToolStateRunning": {
  20977. "type": "object",
  20978. "properties": {
  20979. "status": {
  20980. "type": "string",
  20981. "enum": ["running"]
  20982. },
  20983. "input": {
  20984. "type": "object"
  20985. },
  20986. "structured": {
  20987. "type": "object"
  20988. },
  20989. "content": {
  20990. "type": "array",
  20991. "items": {
  20992. "anyOf": [
  20993. {
  20994. "$ref": "#/components/schemas/ToolTextContent"
  20995. },
  20996. {
  20997. "$ref": "#/components/schemas/ToolFileContent"
  20998. }
  20999. ]
  21000. }
  21001. }
  21002. },
  21003. "required": ["status", "input", "structured", "content"],
  21004. "additionalProperties": false
  21005. },
  21006. "SessionMessageToolStateCompleted": {
  21007. "type": "object",
  21008. "properties": {
  21009. "status": {
  21010. "type": "string",
  21011. "enum": ["completed"]
  21012. },
  21013. "input": {
  21014. "type": "object"
  21015. },
  21016. "attachments": {
  21017. "type": "array",
  21018. "items": {
  21019. "$ref": "#/components/schemas/PromptFileAttachment"
  21020. }
  21021. },
  21022. "content": {
  21023. "type": "array",
  21024. "items": {
  21025. "anyOf": [
  21026. {
  21027. "$ref": "#/components/schemas/ToolTextContent"
  21028. },
  21029. {
  21030. "$ref": "#/components/schemas/ToolFileContent"
  21031. }
  21032. ]
  21033. }
  21034. },
  21035. "structured": {
  21036. "type": "object"
  21037. }
  21038. },
  21039. "required": ["status", "input", "content", "structured"],
  21040. "additionalProperties": false
  21041. },
  21042. "SessionMessageToolStateError": {
  21043. "type": "object",
  21044. "properties": {
  21045. "status": {
  21046. "type": "string",
  21047. "enum": ["error"]
  21048. },
  21049. "input": {
  21050. "type": "object"
  21051. },
  21052. "content": {
  21053. "type": "array",
  21054. "items": {
  21055. "anyOf": [
  21056. {
  21057. "$ref": "#/components/schemas/ToolTextContent"
  21058. },
  21059. {
  21060. "$ref": "#/components/schemas/ToolFileContent"
  21061. }
  21062. ]
  21063. }
  21064. },
  21065. "structured": {
  21066. "type": "object"
  21067. },
  21068. "error": {
  21069. "$ref": "#/components/schemas/SessionErrorUnknown"
  21070. }
  21071. },
  21072. "required": ["status", "input", "content", "structured", "error"],
  21073. "additionalProperties": false
  21074. },
  21075. "SessionMessageAssistantTool": {
  21076. "type": "object",
  21077. "properties": {
  21078. "type": {
  21079. "type": "string",
  21080. "enum": ["tool"]
  21081. },
  21082. "id": {
  21083. "type": "string"
  21084. },
  21085. "name": {
  21086. "type": "string"
  21087. },
  21088. "provider": {
  21089. "type": "object",
  21090. "properties": {
  21091. "executed": {
  21092. "type": "boolean"
  21093. },
  21094. "metadata": {
  21095. "type": "object"
  21096. }
  21097. },
  21098. "required": ["executed"],
  21099. "additionalProperties": false
  21100. },
  21101. "state": {
  21102. "anyOf": [
  21103. {
  21104. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21105. },
  21106. {
  21107. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21108. },
  21109. {
  21110. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21111. },
  21112. {
  21113. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21114. }
  21115. ]
  21116. },
  21117. "time": {
  21118. "type": "object",
  21119. "properties": {
  21120. "created": {
  21121. "type": "number"
  21122. },
  21123. "ran": {
  21124. "type": "number"
  21125. },
  21126. "completed": {
  21127. "type": "number"
  21128. },
  21129. "pruned": {
  21130. "type": "number"
  21131. }
  21132. },
  21133. "required": ["created"],
  21134. "additionalProperties": false
  21135. }
  21136. },
  21137. "required": ["type", "id", "name", "state", "time"],
  21138. "additionalProperties": false
  21139. },
  21140. "SessionMessageAssistant": {
  21141. "type": "object",
  21142. "properties": {
  21143. "id": {
  21144. "type": "string"
  21145. },
  21146. "metadata": {
  21147. "type": "object"
  21148. },
  21149. "time": {
  21150. "type": "object",
  21151. "properties": {
  21152. "created": {
  21153. "type": "number"
  21154. },
  21155. "completed": {
  21156. "type": "number"
  21157. }
  21158. },
  21159. "required": ["created"],
  21160. "additionalProperties": false
  21161. },
  21162. "type": {
  21163. "type": "string",
  21164. "enum": ["assistant"]
  21165. },
  21166. "agent": {
  21167. "type": "string"
  21168. },
  21169. "model": {
  21170. "type": "object",
  21171. "properties": {
  21172. "id": {
  21173. "type": "string"
  21174. },
  21175. "providerID": {
  21176. "type": "string"
  21177. },
  21178. "variant": {
  21179. "type": "string"
  21180. }
  21181. },
  21182. "required": ["id", "providerID", "variant"],
  21183. "additionalProperties": false
  21184. },
  21185. "content": {
  21186. "type": "array",
  21187. "items": {
  21188. "anyOf": [
  21189. {
  21190. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21191. },
  21192. {
  21193. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21194. },
  21195. {
  21196. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21197. }
  21198. ]
  21199. }
  21200. },
  21201. "snapshot": {
  21202. "type": "object",
  21203. "properties": {
  21204. "start": {
  21205. "type": "string"
  21206. },
  21207. "end": {
  21208. "type": "string"
  21209. }
  21210. },
  21211. "additionalProperties": false
  21212. },
  21213. "finish": {
  21214. "type": "string"
  21215. },
  21216. "cost": {
  21217. "type": "number"
  21218. },
  21219. "tokens": {
  21220. "type": "object",
  21221. "properties": {
  21222. "input": {
  21223. "type": "number"
  21224. },
  21225. "output": {
  21226. "type": "number"
  21227. },
  21228. "reasoning": {
  21229. "type": "number"
  21230. },
  21231. "cache": {
  21232. "type": "object",
  21233. "properties": {
  21234. "read": {
  21235. "type": "number"
  21236. },
  21237. "write": {
  21238. "type": "number"
  21239. }
  21240. },
  21241. "required": ["read", "write"],
  21242. "additionalProperties": false
  21243. }
  21244. },
  21245. "required": ["input", "output", "reasoning", "cache"],
  21246. "additionalProperties": false
  21247. },
  21248. "error": {
  21249. "$ref": "#/components/schemas/SessionErrorUnknown"
  21250. }
  21251. },
  21252. "required": ["id", "time", "type", "agent", "model", "content"],
  21253. "additionalProperties": false
  21254. },
  21255. "SessionMessageCompaction": {
  21256. "type": "object",
  21257. "properties": {
  21258. "type": {
  21259. "type": "string",
  21260. "enum": ["compaction"]
  21261. },
  21262. "reason": {
  21263. "type": "string",
  21264. "enum": ["auto", "manual"]
  21265. },
  21266. "summary": {
  21267. "type": "string"
  21268. },
  21269. "include": {
  21270. "type": "string"
  21271. },
  21272. "id": {
  21273. "type": "string"
  21274. },
  21275. "metadata": {
  21276. "type": "object"
  21277. },
  21278. "time": {
  21279. "type": "object",
  21280. "properties": {
  21281. "created": {
  21282. "type": "number"
  21283. }
  21284. },
  21285. "required": ["created"],
  21286. "additionalProperties": false
  21287. }
  21288. },
  21289. "required": ["type", "reason", "summary", "id", "time"],
  21290. "additionalProperties": false
  21291. },
  21292. "SessionMessage": {
  21293. "anyOf": [
  21294. {
  21295. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21296. },
  21297. {
  21298. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21299. },
  21300. {
  21301. "$ref": "#/components/schemas/SessionMessageUser"
  21302. },
  21303. {
  21304. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21305. },
  21306. {
  21307. "$ref": "#/components/schemas/SessionMessageShell"
  21308. },
  21309. {
  21310. "$ref": "#/components/schemas/SessionMessageAssistant"
  21311. },
  21312. {
  21313. "$ref": "#/components/schemas/SessionMessageCompaction"
  21314. }
  21315. ]
  21316. },
  21317. "ProviderV2Info": {
  21318. "type": "object",
  21319. "properties": {
  21320. "id": {
  21321. "type": "string"
  21322. },
  21323. "name": {
  21324. "type": "string"
  21325. },
  21326. "enabled": {
  21327. "anyOf": [
  21328. {
  21329. "type": "boolean",
  21330. "enum": [false]
  21331. },
  21332. {
  21333. "type": "object",
  21334. "properties": {
  21335. "via": {
  21336. "type": "string",
  21337. "enum": ["env"]
  21338. },
  21339. "name": {
  21340. "type": "string"
  21341. }
  21342. },
  21343. "required": ["via", "name"],
  21344. "additionalProperties": false
  21345. },
  21346. {
  21347. "type": "object",
  21348. "properties": {
  21349. "via": {
  21350. "type": "string",
  21351. "enum": ["account"]
  21352. },
  21353. "service": {
  21354. "type": "string"
  21355. }
  21356. },
  21357. "required": ["via", "service"],
  21358. "additionalProperties": false
  21359. },
  21360. {
  21361. "type": "object",
  21362. "properties": {
  21363. "via": {
  21364. "type": "string",
  21365. "enum": ["custom"]
  21366. },
  21367. "data": {
  21368. "type": "object"
  21369. }
  21370. },
  21371. "required": ["via", "data"],
  21372. "additionalProperties": false
  21373. }
  21374. ]
  21375. },
  21376. "env": {
  21377. "type": "array",
  21378. "items": {
  21379. "type": "string"
  21380. }
  21381. },
  21382. "endpoint": {
  21383. "anyOf": [
  21384. {
  21385. "type": "object",
  21386. "properties": {
  21387. "type": {
  21388. "type": "string",
  21389. "enum": ["unknown"]
  21390. }
  21391. },
  21392. "required": ["type"],
  21393. "additionalProperties": false
  21394. },
  21395. {
  21396. "type": "object",
  21397. "properties": {
  21398. "type": {
  21399. "type": "string",
  21400. "enum": ["openai/responses"]
  21401. },
  21402. "url": {
  21403. "type": "string"
  21404. },
  21405. "websocket": {
  21406. "type": "boolean"
  21407. }
  21408. },
  21409. "required": ["type", "url"],
  21410. "additionalProperties": false
  21411. },
  21412. {
  21413. "type": "object",
  21414. "properties": {
  21415. "type": {
  21416. "type": "string",
  21417. "enum": ["openai/completions"]
  21418. },
  21419. "url": {
  21420. "type": "string"
  21421. },
  21422. "reasoning": {
  21423. "anyOf": [
  21424. {
  21425. "type": "object",
  21426. "properties": {
  21427. "type": {
  21428. "type": "string",
  21429. "enum": ["reasoning_content"]
  21430. }
  21431. },
  21432. "required": ["type"],
  21433. "additionalProperties": false
  21434. },
  21435. {
  21436. "type": "object",
  21437. "properties": {
  21438. "type": {
  21439. "type": "string",
  21440. "enum": ["reasoning_details"]
  21441. }
  21442. },
  21443. "required": ["type"],
  21444. "additionalProperties": false
  21445. }
  21446. ]
  21447. }
  21448. },
  21449. "required": ["type", "url"],
  21450. "additionalProperties": false
  21451. },
  21452. {
  21453. "type": "object",
  21454. "properties": {
  21455. "type": {
  21456. "type": "string",
  21457. "enum": ["anthropic/messages"]
  21458. },
  21459. "url": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "required": ["type", "url"],
  21464. "additionalProperties": false
  21465. },
  21466. {
  21467. "type": "object",
  21468. "properties": {
  21469. "type": {
  21470. "type": "string",
  21471. "enum": ["aisdk"]
  21472. },
  21473. "package": {
  21474. "type": "string"
  21475. },
  21476. "url": {
  21477. "type": "string"
  21478. }
  21479. },
  21480. "required": ["type", "package"],
  21481. "additionalProperties": false
  21482. }
  21483. ]
  21484. },
  21485. "options": {
  21486. "type": "object",
  21487. "properties": {
  21488. "headers": {
  21489. "type": "object",
  21490. "additionalProperties": {
  21491. "type": "string"
  21492. }
  21493. },
  21494. "body": {
  21495. "type": "object"
  21496. },
  21497. "aisdk": {
  21498. "type": "object",
  21499. "properties": {
  21500. "provider": {
  21501. "type": "object"
  21502. },
  21503. "request": {
  21504. "type": "object"
  21505. }
  21506. },
  21507. "required": ["provider", "request"],
  21508. "additionalProperties": false
  21509. }
  21510. },
  21511. "required": ["headers", "body", "aisdk"],
  21512. "additionalProperties": false
  21513. }
  21514. },
  21515. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21516. "additionalProperties": false
  21517. },
  21518. "EventTuiToastShow1": {
  21519. "type": "object",
  21520. "properties": {
  21521. "id": {
  21522. "type": "string"
  21523. },
  21524. "type": {
  21525. "type": "string",
  21526. "enum": ["tui.toast.show"]
  21527. },
  21528. "properties": {
  21529. "type": "object",
  21530. "properties": {
  21531. "title": {
  21532. "type": "string"
  21533. },
  21534. "message": {
  21535. "type": "string"
  21536. },
  21537. "variant": {
  21538. "type": "string",
  21539. "enum": ["info", "success", "warning", "error"]
  21540. },
  21541. "duration": {
  21542. "type": "integer",
  21543. "exclusiveMinimum": 0
  21544. }
  21545. },
  21546. "required": ["message", "variant"],
  21547. "additionalProperties": false
  21548. }
  21549. },
  21550. "required": ["id", "type", "properties"],
  21551. "additionalProperties": false
  21552. },
  21553. "ModelV2Info1": {
  21554. "type": "object",
  21555. "properties": {
  21556. "id": {
  21557. "type": "string"
  21558. },
  21559. "apiID": {
  21560. "type": "string"
  21561. },
  21562. "providerID": {
  21563. "type": "string"
  21564. },
  21565. "family": {
  21566. "type": "string"
  21567. },
  21568. "name": {
  21569. "type": "string"
  21570. },
  21571. "endpoint": {
  21572. "anyOf": [
  21573. {
  21574. "type": "object",
  21575. "properties": {
  21576. "type": {
  21577. "type": "string",
  21578. "enum": ["unknown"]
  21579. }
  21580. },
  21581. "required": ["type"],
  21582. "additionalProperties": false
  21583. },
  21584. {
  21585. "type": "object",
  21586. "properties": {
  21587. "type": {
  21588. "type": "string",
  21589. "enum": ["openai/responses"]
  21590. },
  21591. "url": {
  21592. "type": "string"
  21593. },
  21594. "websocket": {
  21595. "type": "boolean"
  21596. }
  21597. },
  21598. "required": ["type", "url"],
  21599. "additionalProperties": false
  21600. },
  21601. {
  21602. "type": "object",
  21603. "properties": {
  21604. "type": {
  21605. "type": "string",
  21606. "enum": ["openai/completions"]
  21607. },
  21608. "url": {
  21609. "type": "string"
  21610. },
  21611. "reasoning": {
  21612. "anyOf": [
  21613. {
  21614. "type": "object",
  21615. "properties": {
  21616. "type": {
  21617. "type": "string",
  21618. "enum": ["reasoning_content"]
  21619. }
  21620. },
  21621. "required": ["type"],
  21622. "additionalProperties": false
  21623. },
  21624. {
  21625. "type": "object",
  21626. "properties": {
  21627. "type": {
  21628. "type": "string",
  21629. "enum": ["reasoning_details"]
  21630. }
  21631. },
  21632. "required": ["type"],
  21633. "additionalProperties": false
  21634. }
  21635. ]
  21636. }
  21637. },
  21638. "required": ["type", "url"],
  21639. "additionalProperties": false
  21640. },
  21641. {
  21642. "type": "object",
  21643. "properties": {
  21644. "type": {
  21645. "type": "string",
  21646. "enum": ["anthropic/messages"]
  21647. },
  21648. "url": {
  21649. "type": "string"
  21650. }
  21651. },
  21652. "required": ["type", "url"],
  21653. "additionalProperties": false
  21654. },
  21655. {
  21656. "type": "object",
  21657. "properties": {
  21658. "type": {
  21659. "type": "string",
  21660. "enum": ["aisdk"]
  21661. },
  21662. "package": {
  21663. "type": "string"
  21664. },
  21665. "url": {
  21666. "type": "string"
  21667. }
  21668. },
  21669. "required": ["type", "package"],
  21670. "additionalProperties": false
  21671. }
  21672. ]
  21673. },
  21674. "capabilities": {
  21675. "type": "object",
  21676. "properties": {
  21677. "tools": {
  21678. "type": "boolean"
  21679. },
  21680. "input": {
  21681. "type": "array",
  21682. "items": {
  21683. "type": "string"
  21684. }
  21685. },
  21686. "output": {
  21687. "type": "array",
  21688. "items": {
  21689. "type": "string"
  21690. }
  21691. }
  21692. },
  21693. "required": ["tools", "input", "output"],
  21694. "additionalProperties": false
  21695. },
  21696. "options": {
  21697. "type": "object",
  21698. "properties": {
  21699. "headers": {
  21700. "type": "object",
  21701. "additionalProperties": {
  21702. "type": "string"
  21703. }
  21704. },
  21705. "body": {
  21706. "type": "object"
  21707. },
  21708. "aisdk": {
  21709. "type": "object",
  21710. "properties": {
  21711. "provider": {
  21712. "type": "object"
  21713. },
  21714. "request": {
  21715. "type": "object"
  21716. }
  21717. },
  21718. "required": ["provider", "request"],
  21719. "additionalProperties": false
  21720. },
  21721. "variant": {
  21722. "type": "string"
  21723. }
  21724. },
  21725. "required": ["headers", "body", "aisdk"],
  21726. "additionalProperties": false
  21727. },
  21728. "variants": {
  21729. "type": "array",
  21730. "items": {
  21731. "type": "object",
  21732. "properties": {
  21733. "id": {
  21734. "type": "string"
  21735. },
  21736. "headers": {
  21737. "type": "object",
  21738. "additionalProperties": {
  21739. "type": "string"
  21740. }
  21741. },
  21742. "body": {
  21743. "type": "object"
  21744. },
  21745. "aisdk": {
  21746. "type": "object",
  21747. "properties": {
  21748. "provider": {
  21749. "type": "object"
  21750. },
  21751. "request": {
  21752. "type": "object"
  21753. }
  21754. },
  21755. "required": ["provider", "request"],
  21756. "additionalProperties": false
  21757. }
  21758. },
  21759. "required": ["id", "headers", "body", "aisdk"],
  21760. "additionalProperties": false
  21761. }
  21762. },
  21763. "time": {
  21764. "type": "object",
  21765. "properties": {
  21766. "released": {
  21767. "anyOf": [
  21768. {
  21769. "type": "number"
  21770. },
  21771. {
  21772. "type": "string",
  21773. "enum": ["NaN"]
  21774. },
  21775. {
  21776. "type": "string",
  21777. "enum": ["Infinity"]
  21778. },
  21779. {
  21780. "type": "string",
  21781. "enum": ["-Infinity"]
  21782. }
  21783. ]
  21784. }
  21785. },
  21786. "required": ["released"],
  21787. "additionalProperties": false
  21788. },
  21789. "cost": {
  21790. "type": "array",
  21791. "items": {
  21792. "type": "object",
  21793. "properties": {
  21794. "tier": {
  21795. "type": "object",
  21796. "properties": {
  21797. "type": {
  21798. "type": "string",
  21799. "enum": ["context"]
  21800. },
  21801. "size": {
  21802. "type": "integer"
  21803. }
  21804. },
  21805. "required": ["type", "size"],
  21806. "additionalProperties": false
  21807. },
  21808. "input": {
  21809. "type": "number"
  21810. },
  21811. "output": {
  21812. "type": "number"
  21813. },
  21814. "cache": {
  21815. "type": "object",
  21816. "properties": {
  21817. "read": {
  21818. "type": "number"
  21819. },
  21820. "write": {
  21821. "type": "number"
  21822. }
  21823. },
  21824. "required": ["read", "write"],
  21825. "additionalProperties": false
  21826. }
  21827. },
  21828. "required": ["input", "output", "cache"],
  21829. "additionalProperties": false
  21830. }
  21831. },
  21832. "status": {
  21833. "type": "string",
  21834. "enum": ["alpha", "beta", "deprecated", "active"]
  21835. },
  21836. "enabled": {
  21837. "type": "boolean"
  21838. },
  21839. "limit": {
  21840. "type": "object",
  21841. "properties": {
  21842. "context": {
  21843. "type": "integer"
  21844. },
  21845. "input": {
  21846. "type": "integer"
  21847. },
  21848. "output": {
  21849. "type": "integer"
  21850. }
  21851. },
  21852. "required": ["context", "output"],
  21853. "additionalProperties": false
  21854. }
  21855. },
  21856. "required": [
  21857. "id",
  21858. "apiID",
  21859. "providerID",
  21860. "name",
  21861. "endpoint",
  21862. "capabilities",
  21863. "options",
  21864. "variants",
  21865. "time",
  21866. "cost",
  21867. "status",
  21868. "enabled",
  21869. "limit"
  21870. ],
  21871. "additionalProperties": false
  21872. },
  21873. "BadRequestError": {
  21874. "type": "object",
  21875. "required": ["name", "data"],
  21876. "properties": {
  21877. "name": {
  21878. "type": "string",
  21879. "enum": ["BadRequest"]
  21880. },
  21881. "data": {
  21882. "type": "object",
  21883. "required": ["message"],
  21884. "properties": {
  21885. "message": {
  21886. "type": "string"
  21887. },
  21888. "kind": {
  21889. "type": "string",
  21890. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  21891. }
  21892. }
  21893. }
  21894. }
  21895. }
  21896. }
  21897. },
  21898. "security": [],
  21899. "tags": [
  21900. {
  21901. "name": "control",
  21902. "description": "Control plane routes."
  21903. },
  21904. {
  21905. "name": "global",
  21906. "description": "Global server routes."
  21907. },
  21908. {
  21909. "name": "event",
  21910. "description": "Instance event stream route."
  21911. },
  21912. {
  21913. "name": "config",
  21914. "description": "Experimental HttpApi config routes."
  21915. },
  21916. {
  21917. "name": "experimental",
  21918. "description": "Experimental HttpApi read-only routes."
  21919. },
  21920. {
  21921. "name": "file",
  21922. "description": "Experimental HttpApi file routes."
  21923. },
  21924. {
  21925. "name": "instance",
  21926. "description": "Experimental HttpApi instance read routes."
  21927. },
  21928. {
  21929. "name": "mcp",
  21930. "description": "Experimental HttpApi MCP routes."
  21931. },
  21932. {
  21933. "name": "project",
  21934. "description": "Experimental HttpApi project routes."
  21935. },
  21936. {
  21937. "name": "pty",
  21938. "description": "Experimental HttpApi PTY routes."
  21939. },
  21940. {
  21941. "name": "question",
  21942. "description": "Question routes."
  21943. },
  21944. {
  21945. "name": "permission",
  21946. "description": "Experimental HttpApi permission routes."
  21947. },
  21948. {
  21949. "name": "provider",
  21950. "description": "Experimental HttpApi provider routes."
  21951. },
  21952. {
  21953. "name": "session",
  21954. "description": "Experimental HttpApi session routes."
  21955. },
  21956. {
  21957. "name": "sync",
  21958. "description": "Experimental HttpApi sync routes."
  21959. },
  21960. {
  21961. "name": "v2",
  21962. "description": "Experimental v2 routes."
  21963. },
  21964. {
  21965. "name": "v2 messages",
  21966. "description": "Experimental v2 message routes."
  21967. },
  21968. {
  21969. "name": "v2 models",
  21970. "description": "Experimental v2 model routes."
  21971. },
  21972. {
  21973. "name": "v2 providers",
  21974. "description": "Experimental v2 provider routes."
  21975. },
  21976. {
  21977. "name": "tui",
  21978. "description": "Experimental HttpApi TUI routes."
  21979. },
  21980. {
  21981. "name": "workspace",
  21982. "description": "Experimental HttpApi workspace routes."
  21983. },
  21984. {
  21985. "name": "pty",
  21986. "description": "PTY websocket route."
  21987. }
  21988. ]
  21989. }