openapi.json 868 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452
  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. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy/generate-name": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.generateName",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  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": "Success",
  3928. "content": {
  3929. "application/json": {
  3930. "schema": {
  3931. "type": "object",
  3932. "properties": {
  3933. "name": {
  3934. "type": "string"
  3935. }
  3936. },
  3937. "required": ["name"],
  3938. "additionalProperties": false
  3939. }
  3940. }
  3941. }
  3942. },
  3943. "400": {
  3944. "description": "Bad request",
  3945. "content": {
  3946. "application/json": {
  3947. "schema": {
  3948. "$ref": "#/components/schemas/BadRequestError"
  3949. }
  3950. }
  3951. }
  3952. }
  3953. },
  3954. "description": "Generate a short name for a project copy from task context.",
  3955. "summary": "Generate project copy name",
  3956. "requestBody": {
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "type": "object",
  3961. "properties": {
  3962. "context": {
  3963. "type": "string"
  3964. }
  3965. },
  3966. "additionalProperties": false
  3967. }
  3968. }
  3969. }
  3970. },
  3971. "x-codeSamples": [
  3972. {
  3973. "lang": "js",
  3974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  3975. }
  3976. ]
  3977. }
  3978. },
  3979. "/pty/shells": {
  3980. "get": {
  3981. "tags": ["pty"],
  3982. "operationId": "pty.shells",
  3983. "parameters": [
  3984. {
  3985. "name": "directory",
  3986. "in": "query",
  3987. "schema": {
  3988. "type": "string"
  3989. },
  3990. "required": false
  3991. },
  3992. {
  3993. "name": "workspace",
  3994. "in": "query",
  3995. "schema": {
  3996. "type": "string"
  3997. },
  3998. "required": false
  3999. }
  4000. ],
  4001. "responses": {
  4002. "200": {
  4003. "description": "List of shells",
  4004. "content": {
  4005. "application/json": {
  4006. "schema": {
  4007. "type": "array",
  4008. "items": {
  4009. "type": "object",
  4010. "properties": {
  4011. "path": {
  4012. "type": "string"
  4013. },
  4014. "name": {
  4015. "type": "string"
  4016. },
  4017. "acceptable": {
  4018. "type": "boolean"
  4019. }
  4020. },
  4021. "required": ["path", "name", "acceptable"],
  4022. "additionalProperties": false
  4023. },
  4024. "description": "List of shells"
  4025. }
  4026. }
  4027. }
  4028. },
  4029. "400": {
  4030. "description": "Bad request",
  4031. "content": {
  4032. "application/json": {
  4033. "schema": {
  4034. "$ref": "#/components/schemas/BadRequestError"
  4035. }
  4036. }
  4037. }
  4038. }
  4039. },
  4040. "description": "Get a list of available shells on the system.",
  4041. "summary": "List available shells",
  4042. "x-codeSamples": [
  4043. {
  4044. "lang": "js",
  4045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4046. }
  4047. ]
  4048. }
  4049. },
  4050. "/pty": {
  4051. "get": {
  4052. "tags": ["pty"],
  4053. "operationId": "pty.list",
  4054. "parameters": [
  4055. {
  4056. "name": "directory",
  4057. "in": "query",
  4058. "schema": {
  4059. "type": "string"
  4060. },
  4061. "required": false
  4062. },
  4063. {
  4064. "name": "workspace",
  4065. "in": "query",
  4066. "schema": {
  4067. "type": "string"
  4068. },
  4069. "required": false
  4070. }
  4071. ],
  4072. "responses": {
  4073. "200": {
  4074. "description": "List of sessions",
  4075. "content": {
  4076. "application/json": {
  4077. "schema": {
  4078. "type": "array",
  4079. "items": {
  4080. "$ref": "#/components/schemas/Pty"
  4081. },
  4082. "description": "List of sessions"
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "400": {
  4088. "description": "Bad request",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "$ref": "#/components/schemas/BadRequestError"
  4093. }
  4094. }
  4095. }
  4096. }
  4097. },
  4098. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4099. "summary": "List PTY sessions",
  4100. "x-codeSamples": [
  4101. {
  4102. "lang": "js",
  4103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4104. }
  4105. ]
  4106. },
  4107. "post": {
  4108. "tags": ["pty"],
  4109. "operationId": "pty.create",
  4110. "parameters": [
  4111. {
  4112. "name": "directory",
  4113. "in": "query",
  4114. "schema": {
  4115. "type": "string"
  4116. },
  4117. "required": false
  4118. },
  4119. {
  4120. "name": "workspace",
  4121. "in": "query",
  4122. "schema": {
  4123. "type": "string"
  4124. },
  4125. "required": false
  4126. }
  4127. ],
  4128. "responses": {
  4129. "200": {
  4130. "description": "Created session",
  4131. "content": {
  4132. "application/json": {
  4133. "schema": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. }
  4136. }
  4137. }
  4138. },
  4139. "400": {
  4140. "description": "BadRequest | InvalidRequestError",
  4141. "content": {
  4142. "application/json": {
  4143. "schema": {
  4144. "anyOf": [
  4145. {
  4146. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4147. },
  4148. {
  4149. "$ref": "#/components/schemas/InvalidRequestError"
  4150. }
  4151. ]
  4152. }
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4158. "summary": "Create PTY session",
  4159. "requestBody": {
  4160. "content": {
  4161. "application/json": {
  4162. "schema": {
  4163. "type": "object",
  4164. "properties": {
  4165. "command": {
  4166. "type": "string"
  4167. },
  4168. "args": {
  4169. "type": "array",
  4170. "items": {
  4171. "type": "string"
  4172. }
  4173. },
  4174. "cwd": {
  4175. "type": "string"
  4176. },
  4177. "title": {
  4178. "type": "string"
  4179. },
  4180. "env": {
  4181. "type": "object",
  4182. "additionalProperties": {
  4183. "type": "string"
  4184. }
  4185. }
  4186. },
  4187. "additionalProperties": false
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "x-codeSamples": [
  4193. {
  4194. "lang": "js",
  4195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4196. }
  4197. ]
  4198. }
  4199. },
  4200. "/pty/{ptyID}": {
  4201. "get": {
  4202. "tags": ["pty"],
  4203. "operationId": "pty.get",
  4204. "parameters": [
  4205. {
  4206. "name": "ptyID",
  4207. "in": "path",
  4208. "schema": {
  4209. "type": "string",
  4210. "pattern": "^pty"
  4211. },
  4212. "required": true
  4213. },
  4214. {
  4215. "name": "directory",
  4216. "in": "query",
  4217. "schema": {
  4218. "type": "string"
  4219. },
  4220. "required": false
  4221. },
  4222. {
  4223. "name": "workspace",
  4224. "in": "query",
  4225. "schema": {
  4226. "type": "string"
  4227. },
  4228. "required": false
  4229. }
  4230. ],
  4231. "responses": {
  4232. "200": {
  4233. "description": "Session info",
  4234. "content": {
  4235. "application/json": {
  4236. "schema": {
  4237. "$ref": "#/components/schemas/Pty"
  4238. }
  4239. }
  4240. }
  4241. },
  4242. "400": {
  4243. "description": "Bad request",
  4244. "content": {
  4245. "application/json": {
  4246. "schema": {
  4247. "$ref": "#/components/schemas/BadRequestError"
  4248. }
  4249. }
  4250. }
  4251. },
  4252. "404": {
  4253. "description": "PtyNotFoundError",
  4254. "content": {
  4255. "application/json": {
  4256. "schema": {
  4257. "$ref": "#/components/schemas/PtyNotFoundError"
  4258. }
  4259. }
  4260. }
  4261. }
  4262. },
  4263. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4264. "summary": "Get PTY session",
  4265. "x-codeSamples": [
  4266. {
  4267. "lang": "js",
  4268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4269. }
  4270. ]
  4271. },
  4272. "put": {
  4273. "tags": ["pty"],
  4274. "operationId": "pty.update",
  4275. "parameters": [
  4276. {
  4277. "name": "ptyID",
  4278. "in": "path",
  4279. "schema": {
  4280. "type": "string",
  4281. "pattern": "^pty"
  4282. },
  4283. "required": true
  4284. },
  4285. {
  4286. "name": "directory",
  4287. "in": "query",
  4288. "schema": {
  4289. "type": "string"
  4290. },
  4291. "required": false
  4292. },
  4293. {
  4294. "name": "workspace",
  4295. "in": "query",
  4296. "schema": {
  4297. "type": "string"
  4298. },
  4299. "required": false
  4300. }
  4301. ],
  4302. "responses": {
  4303. "200": {
  4304. "description": "Updated session",
  4305. "content": {
  4306. "application/json": {
  4307. "schema": {
  4308. "$ref": "#/components/schemas/Pty"
  4309. }
  4310. }
  4311. }
  4312. },
  4313. "400": {
  4314. "description": "BadRequest | InvalidRequestError",
  4315. "content": {
  4316. "application/json": {
  4317. "schema": {
  4318. "anyOf": [
  4319. {
  4320. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4321. },
  4322. {
  4323. "$ref": "#/components/schemas/InvalidRequestError"
  4324. }
  4325. ]
  4326. }
  4327. }
  4328. }
  4329. },
  4330. "404": {
  4331. "description": "PtyNotFoundError",
  4332. "content": {
  4333. "application/json": {
  4334. "schema": {
  4335. "$ref": "#/components/schemas/PtyNotFoundError"
  4336. }
  4337. }
  4338. }
  4339. }
  4340. },
  4341. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4342. "summary": "Update PTY session",
  4343. "requestBody": {
  4344. "content": {
  4345. "application/json": {
  4346. "schema": {
  4347. "type": "object",
  4348. "properties": {
  4349. "title": {
  4350. "type": "string"
  4351. },
  4352. "size": {
  4353. "type": "object",
  4354. "properties": {
  4355. "rows": {
  4356. "type": "integer",
  4357. "exclusiveMinimum": 0
  4358. },
  4359. "cols": {
  4360. "type": "integer",
  4361. "exclusiveMinimum": 0
  4362. }
  4363. },
  4364. "required": ["rows", "cols"],
  4365. "additionalProperties": false
  4366. }
  4367. },
  4368. "additionalProperties": false
  4369. }
  4370. }
  4371. }
  4372. },
  4373. "x-codeSamples": [
  4374. {
  4375. "lang": "js",
  4376. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4377. }
  4378. ]
  4379. },
  4380. "delete": {
  4381. "tags": ["pty"],
  4382. "operationId": "pty.remove",
  4383. "parameters": [
  4384. {
  4385. "name": "ptyID",
  4386. "in": "path",
  4387. "schema": {
  4388. "type": "string",
  4389. "pattern": "^pty"
  4390. },
  4391. "required": true
  4392. },
  4393. {
  4394. "name": "directory",
  4395. "in": "query",
  4396. "schema": {
  4397. "type": "string"
  4398. },
  4399. "required": false
  4400. },
  4401. {
  4402. "name": "workspace",
  4403. "in": "query",
  4404. "schema": {
  4405. "type": "string"
  4406. },
  4407. "required": false
  4408. }
  4409. ],
  4410. "responses": {
  4411. "200": {
  4412. "description": "Session removed",
  4413. "content": {
  4414. "application/json": {
  4415. "schema": {
  4416. "type": "boolean",
  4417. "description": "Session removed"
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "400": {
  4423. "description": "Bad request",
  4424. "content": {
  4425. "application/json": {
  4426. "schema": {
  4427. "$ref": "#/components/schemas/BadRequestError"
  4428. }
  4429. }
  4430. }
  4431. },
  4432. "404": {
  4433. "description": "PtyNotFoundError",
  4434. "content": {
  4435. "application/json": {
  4436. "schema": {
  4437. "$ref": "#/components/schemas/PtyNotFoundError"
  4438. }
  4439. }
  4440. }
  4441. }
  4442. },
  4443. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4444. "summary": "Remove PTY session",
  4445. "x-codeSamples": [
  4446. {
  4447. "lang": "js",
  4448. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4449. }
  4450. ]
  4451. }
  4452. },
  4453. "/pty/{ptyID}/connect-token": {
  4454. "post": {
  4455. "tags": ["pty"],
  4456. "operationId": "pty.connectToken",
  4457. "parameters": [
  4458. {
  4459. "name": "ptyID",
  4460. "in": "path",
  4461. "schema": {
  4462. "type": "string",
  4463. "pattern": "^pty"
  4464. },
  4465. "required": true
  4466. },
  4467. {
  4468. "name": "directory",
  4469. "in": "query",
  4470. "schema": {
  4471. "type": "string"
  4472. },
  4473. "required": false
  4474. },
  4475. {
  4476. "name": "workspace",
  4477. "in": "query",
  4478. "schema": {
  4479. "type": "string"
  4480. },
  4481. "required": false
  4482. }
  4483. ],
  4484. "responses": {
  4485. "200": {
  4486. "description": "WebSocket connect token",
  4487. "content": {
  4488. "application/json": {
  4489. "schema": {
  4490. "type": "object",
  4491. "properties": {
  4492. "ticket": {
  4493. "type": "string"
  4494. },
  4495. "expires_in": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["ticket", "expires_in"],
  4501. "additionalProperties": false,
  4502. "description": "WebSocket connect token"
  4503. }
  4504. }
  4505. }
  4506. },
  4507. "400": {
  4508. "description": "Bad request",
  4509. "content": {
  4510. "application/json": {
  4511. "schema": {
  4512. "$ref": "#/components/schemas/BadRequestError"
  4513. }
  4514. }
  4515. }
  4516. },
  4517. "403": {
  4518. "description": "PtyForbiddenError",
  4519. "content": {
  4520. "application/json": {
  4521. "schema": {
  4522. "$ref": "#/components/schemas/PtyForbiddenError"
  4523. }
  4524. }
  4525. }
  4526. },
  4527. "404": {
  4528. "description": "PtyNotFoundError",
  4529. "content": {
  4530. "application/json": {
  4531. "schema": {
  4532. "$ref": "#/components/schemas/PtyNotFoundError"
  4533. }
  4534. }
  4535. }
  4536. }
  4537. },
  4538. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4539. "summary": "Create PTY WebSocket token",
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/question": {
  4549. "get": {
  4550. "tags": ["question"],
  4551. "operationId": "question.list",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "List of pending questions",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "array",
  4577. "items": {
  4578. "$ref": "#/components/schemas/QuestionRequest"
  4579. },
  4580. "description": "List of pending questions"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Get all pending question requests across all sessions.",
  4597. "summary": "List pending questions",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/question/{requestID}/reply": {
  4607. "post": {
  4608. "tags": ["question"],
  4609. "operationId": "question.reply",
  4610. "parameters": [
  4611. {
  4612. "name": "requestID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^que"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Question answered successfully",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "type": "boolean",
  4644. "description": "Question answered successfully"
  4645. }
  4646. }
  4647. }
  4648. },
  4649. "400": {
  4650. "description": "BadRequest | InvalidRequestError",
  4651. "content": {
  4652. "application/json": {
  4653. "schema": {
  4654. "anyOf": [
  4655. {
  4656. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4657. },
  4658. {
  4659. "$ref": "#/components/schemas/InvalidRequestError"
  4660. }
  4661. ]
  4662. }
  4663. }
  4664. }
  4665. },
  4666. "404": {
  4667. "description": "QuestionNotFoundError",
  4668. "content": {
  4669. "application/json": {
  4670. "schema": {
  4671. "$ref": "#/components/schemas/QuestionNotFoundError"
  4672. }
  4673. }
  4674. }
  4675. }
  4676. },
  4677. "description": "Provide answers to a question request from the AI assistant.",
  4678. "summary": "Reply to question request",
  4679. "requestBody": {
  4680. "content": {
  4681. "application/json": {
  4682. "schema": {
  4683. "type": "object",
  4684. "properties": {
  4685. "answers": {
  4686. "type": "array",
  4687. "items": {
  4688. "$ref": "#/components/schemas/QuestionAnswer"
  4689. },
  4690. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4691. }
  4692. },
  4693. "required": ["answers"],
  4694. "additionalProperties": false
  4695. }
  4696. }
  4697. }
  4698. },
  4699. "x-codeSamples": [
  4700. {
  4701. "lang": "js",
  4702. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4703. }
  4704. ]
  4705. }
  4706. },
  4707. "/question/{requestID}/reject": {
  4708. "post": {
  4709. "tags": ["question"],
  4710. "operationId": "question.reject",
  4711. "parameters": [
  4712. {
  4713. "name": "requestID",
  4714. "in": "path",
  4715. "schema": {
  4716. "type": "string",
  4717. "pattern": "^que"
  4718. },
  4719. "required": true
  4720. },
  4721. {
  4722. "name": "directory",
  4723. "in": "query",
  4724. "schema": {
  4725. "type": "string"
  4726. },
  4727. "required": false
  4728. },
  4729. {
  4730. "name": "workspace",
  4731. "in": "query",
  4732. "schema": {
  4733. "type": "string"
  4734. },
  4735. "required": false
  4736. }
  4737. ],
  4738. "responses": {
  4739. "200": {
  4740. "description": "Question rejected successfully",
  4741. "content": {
  4742. "application/json": {
  4743. "schema": {
  4744. "type": "boolean",
  4745. "description": "Question rejected successfully"
  4746. }
  4747. }
  4748. }
  4749. },
  4750. "400": {
  4751. "description": "BadRequest | InvalidRequestError",
  4752. "content": {
  4753. "application/json": {
  4754. "schema": {
  4755. "anyOf": [
  4756. {
  4757. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4758. },
  4759. {
  4760. "$ref": "#/components/schemas/InvalidRequestError"
  4761. }
  4762. ]
  4763. }
  4764. }
  4765. }
  4766. },
  4767. "404": {
  4768. "description": "QuestionNotFoundError",
  4769. "content": {
  4770. "application/json": {
  4771. "schema": {
  4772. "$ref": "#/components/schemas/QuestionNotFoundError"
  4773. }
  4774. }
  4775. }
  4776. }
  4777. },
  4778. "description": "Reject a question request from the AI assistant.",
  4779. "summary": "Reject question request",
  4780. "x-codeSamples": [
  4781. {
  4782. "lang": "js",
  4783. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4784. }
  4785. ]
  4786. }
  4787. },
  4788. "/permission": {
  4789. "get": {
  4790. "tags": ["permission"],
  4791. "operationId": "permission.list",
  4792. "parameters": [
  4793. {
  4794. "name": "directory",
  4795. "in": "query",
  4796. "schema": {
  4797. "type": "string"
  4798. },
  4799. "required": false
  4800. },
  4801. {
  4802. "name": "workspace",
  4803. "in": "query",
  4804. "schema": {
  4805. "type": "string"
  4806. },
  4807. "required": false
  4808. }
  4809. ],
  4810. "responses": {
  4811. "200": {
  4812. "description": "List of pending permissions",
  4813. "content": {
  4814. "application/json": {
  4815. "schema": {
  4816. "type": "array",
  4817. "items": {
  4818. "$ref": "#/components/schemas/PermissionRequest"
  4819. },
  4820. "description": "List of pending permissions"
  4821. }
  4822. }
  4823. }
  4824. },
  4825. "400": {
  4826. "description": "Bad request",
  4827. "content": {
  4828. "application/json": {
  4829. "schema": {
  4830. "$ref": "#/components/schemas/BadRequestError"
  4831. }
  4832. }
  4833. }
  4834. }
  4835. },
  4836. "description": "Get all pending permission requests across all sessions.",
  4837. "summary": "List pending permissions",
  4838. "x-codeSamples": [
  4839. {
  4840. "lang": "js",
  4841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4842. }
  4843. ]
  4844. }
  4845. },
  4846. "/permission/{requestID}/reply": {
  4847. "post": {
  4848. "tags": ["permission"],
  4849. "operationId": "permission.reply",
  4850. "parameters": [
  4851. {
  4852. "name": "requestID",
  4853. "in": "path",
  4854. "schema": {
  4855. "type": "string",
  4856. "pattern": "^per"
  4857. },
  4858. "required": true
  4859. },
  4860. {
  4861. "name": "directory",
  4862. "in": "query",
  4863. "schema": {
  4864. "type": "string"
  4865. },
  4866. "required": false
  4867. },
  4868. {
  4869. "name": "workspace",
  4870. "in": "query",
  4871. "schema": {
  4872. "type": "string"
  4873. },
  4874. "required": false
  4875. }
  4876. ],
  4877. "responses": {
  4878. "200": {
  4879. "description": "Permission processed successfully",
  4880. "content": {
  4881. "application/json": {
  4882. "schema": {
  4883. "type": "boolean",
  4884. "description": "Permission processed successfully"
  4885. }
  4886. }
  4887. }
  4888. },
  4889. "400": {
  4890. "description": "BadRequest | InvalidRequestError",
  4891. "content": {
  4892. "application/json": {
  4893. "schema": {
  4894. "anyOf": [
  4895. {
  4896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4897. },
  4898. {
  4899. "$ref": "#/components/schemas/InvalidRequestError"
  4900. }
  4901. ]
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "404": {
  4907. "description": "PermissionNotFoundError",
  4908. "content": {
  4909. "application/json": {
  4910. "schema": {
  4911. "$ref": "#/components/schemas/PermissionNotFoundError"
  4912. }
  4913. }
  4914. }
  4915. }
  4916. },
  4917. "description": "Approve or deny a permission request from the AI assistant.",
  4918. "summary": "Respond to permission request",
  4919. "requestBody": {
  4920. "content": {
  4921. "application/json": {
  4922. "schema": {
  4923. "type": "object",
  4924. "properties": {
  4925. "reply": {
  4926. "type": "string",
  4927. "enum": ["once", "always", "reject"]
  4928. },
  4929. "message": {
  4930. "type": "string"
  4931. }
  4932. },
  4933. "required": ["reply"],
  4934. "additionalProperties": false
  4935. }
  4936. }
  4937. }
  4938. },
  4939. "x-codeSamples": [
  4940. {
  4941. "lang": "js",
  4942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4943. }
  4944. ]
  4945. }
  4946. },
  4947. "/provider": {
  4948. "get": {
  4949. "tags": ["provider"],
  4950. "operationId": "provider.list",
  4951. "parameters": [
  4952. {
  4953. "name": "directory",
  4954. "in": "query",
  4955. "schema": {
  4956. "type": "string"
  4957. },
  4958. "required": false
  4959. },
  4960. {
  4961. "name": "workspace",
  4962. "in": "query",
  4963. "schema": {
  4964. "type": "string"
  4965. },
  4966. "required": false
  4967. }
  4968. ],
  4969. "responses": {
  4970. "200": {
  4971. "description": "List of providers",
  4972. "content": {
  4973. "application/json": {
  4974. "schema": {
  4975. "type": "object",
  4976. "properties": {
  4977. "all": {
  4978. "type": "array",
  4979. "items": {
  4980. "$ref": "#/components/schemas/Provider"
  4981. }
  4982. },
  4983. "default": {
  4984. "type": "object",
  4985. "additionalProperties": {
  4986. "type": "string"
  4987. }
  4988. },
  4989. "connected": {
  4990. "type": "array",
  4991. "items": {
  4992. "type": "string"
  4993. }
  4994. }
  4995. },
  4996. "required": ["all", "default", "connected"],
  4997. "additionalProperties": false,
  4998. "description": "List of providers"
  4999. }
  5000. }
  5001. }
  5002. },
  5003. "400": {
  5004. "description": "Bad request",
  5005. "content": {
  5006. "application/json": {
  5007. "schema": {
  5008. "$ref": "#/components/schemas/BadRequestError"
  5009. }
  5010. }
  5011. }
  5012. }
  5013. },
  5014. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5015. "summary": "List providers",
  5016. "x-codeSamples": [
  5017. {
  5018. "lang": "js",
  5019. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5020. }
  5021. ]
  5022. }
  5023. },
  5024. "/provider/auth": {
  5025. "get": {
  5026. "tags": ["provider"],
  5027. "operationId": "provider.auth",
  5028. "parameters": [
  5029. {
  5030. "name": "directory",
  5031. "in": "query",
  5032. "schema": {
  5033. "type": "string"
  5034. },
  5035. "required": false
  5036. },
  5037. {
  5038. "name": "workspace",
  5039. "in": "query",
  5040. "schema": {
  5041. "type": "string"
  5042. },
  5043. "required": false
  5044. }
  5045. ],
  5046. "responses": {
  5047. "200": {
  5048. "description": "Provider auth methods",
  5049. "content": {
  5050. "application/json": {
  5051. "schema": {
  5052. "type": "object",
  5053. "additionalProperties": {
  5054. "type": "array",
  5055. "items": {
  5056. "$ref": "#/components/schemas/ProviderAuthMethod"
  5057. }
  5058. },
  5059. "description": "Provider auth methods"
  5060. }
  5061. }
  5062. }
  5063. },
  5064. "400": {
  5065. "description": "Bad request",
  5066. "content": {
  5067. "application/json": {
  5068. "schema": {
  5069. "$ref": "#/components/schemas/BadRequestError"
  5070. }
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "description": "Retrieve available authentication methods for all AI providers.",
  5076. "summary": "Get provider auth methods",
  5077. "x-codeSamples": [
  5078. {
  5079. "lang": "js",
  5080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5081. }
  5082. ]
  5083. }
  5084. },
  5085. "/provider/{providerID}/oauth/authorize": {
  5086. "post": {
  5087. "tags": ["provider"],
  5088. "operationId": "provider.oauth.authorize",
  5089. "parameters": [
  5090. {
  5091. "name": "providerID",
  5092. "in": "path",
  5093. "schema": {
  5094. "type": "string"
  5095. },
  5096. "required": true
  5097. },
  5098. {
  5099. "name": "directory",
  5100. "in": "query",
  5101. "schema": {
  5102. "type": "string"
  5103. },
  5104. "required": false
  5105. },
  5106. {
  5107. "name": "workspace",
  5108. "in": "query",
  5109. "schema": {
  5110. "type": "string"
  5111. },
  5112. "required": false
  5113. }
  5114. ],
  5115. "responses": {
  5116. "200": {
  5117. "description": "Authorization URL and method",
  5118. "content": {
  5119. "application/json": {
  5120. "schema": {
  5121. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5122. }
  5123. }
  5124. }
  5125. },
  5126. "400": {
  5127. "description": "ProviderAuthError | InvalidRequestError",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "anyOf": [
  5132. {
  5133. "$ref": "#/components/schemas/ProviderAuthError1"
  5134. },
  5135. {
  5136. "$ref": "#/components/schemas/InvalidRequestError"
  5137. }
  5138. ]
  5139. }
  5140. }
  5141. }
  5142. }
  5143. },
  5144. "description": "Start the OAuth authorization flow for a provider.",
  5145. "summary": "Start OAuth authorization",
  5146. "requestBody": {
  5147. "content": {
  5148. "application/json": {
  5149. "schema": {
  5150. "type": "object",
  5151. "properties": {
  5152. "method": {
  5153. "type": "number",
  5154. "description": "Auth method index"
  5155. },
  5156. "inputs": {
  5157. "type": "object",
  5158. "additionalProperties": {
  5159. "type": "string"
  5160. }
  5161. }
  5162. },
  5163. "required": ["method"],
  5164. "additionalProperties": false
  5165. }
  5166. }
  5167. }
  5168. },
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5173. }
  5174. ]
  5175. }
  5176. },
  5177. "/provider/{providerID}/oauth/callback": {
  5178. "post": {
  5179. "tags": ["provider"],
  5180. "operationId": "provider.oauth.callback",
  5181. "parameters": [
  5182. {
  5183. "name": "providerID",
  5184. "in": "path",
  5185. "schema": {
  5186. "type": "string"
  5187. },
  5188. "required": true
  5189. },
  5190. {
  5191. "name": "directory",
  5192. "in": "query",
  5193. "schema": {
  5194. "type": "string"
  5195. },
  5196. "required": false
  5197. },
  5198. {
  5199. "name": "workspace",
  5200. "in": "query",
  5201. "schema": {
  5202. "type": "string"
  5203. },
  5204. "required": false
  5205. }
  5206. ],
  5207. "responses": {
  5208. "200": {
  5209. "description": "OAuth callback processed successfully",
  5210. "content": {
  5211. "application/json": {
  5212. "schema": {
  5213. "type": "boolean",
  5214. "description": "OAuth callback processed successfully"
  5215. }
  5216. }
  5217. }
  5218. },
  5219. "400": {
  5220. "description": "ProviderAuthError | InvalidRequestError",
  5221. "content": {
  5222. "application/json": {
  5223. "schema": {
  5224. "anyOf": [
  5225. {
  5226. "$ref": "#/components/schemas/ProviderAuthError1"
  5227. },
  5228. {
  5229. "$ref": "#/components/schemas/InvalidRequestError"
  5230. }
  5231. ]
  5232. }
  5233. }
  5234. }
  5235. }
  5236. },
  5237. "description": "Handle the OAuth callback from a provider after user authorization.",
  5238. "summary": "Handle OAuth callback",
  5239. "requestBody": {
  5240. "content": {
  5241. "application/json": {
  5242. "schema": {
  5243. "type": "object",
  5244. "properties": {
  5245. "method": {
  5246. "type": "number",
  5247. "description": "Auth method index"
  5248. },
  5249. "code": {
  5250. "type": "string"
  5251. }
  5252. },
  5253. "required": ["method"],
  5254. "additionalProperties": false
  5255. }
  5256. }
  5257. }
  5258. },
  5259. "x-codeSamples": [
  5260. {
  5261. "lang": "js",
  5262. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5263. }
  5264. ]
  5265. }
  5266. },
  5267. "/session": {
  5268. "get": {
  5269. "tags": ["session"],
  5270. "operationId": "session.list",
  5271. "parameters": [
  5272. {
  5273. "name": "directory",
  5274. "in": "query",
  5275. "schema": {
  5276. "type": "string"
  5277. },
  5278. "required": false
  5279. },
  5280. {
  5281. "name": "workspace",
  5282. "in": "query",
  5283. "schema": {
  5284. "type": "string"
  5285. },
  5286. "required": false
  5287. },
  5288. {
  5289. "name": "scope",
  5290. "in": "query",
  5291. "schema": {
  5292. "type": "string",
  5293. "enum": ["project"]
  5294. },
  5295. "required": false
  5296. },
  5297. {
  5298. "name": "path",
  5299. "in": "query",
  5300. "schema": {
  5301. "type": "string"
  5302. },
  5303. "required": false
  5304. },
  5305. {
  5306. "name": "roots",
  5307. "in": "query",
  5308. "schema": {
  5309. "anyOf": [
  5310. {
  5311. "type": "boolean"
  5312. },
  5313. {
  5314. "type": "string",
  5315. "enum": ["true", "false"]
  5316. }
  5317. ]
  5318. },
  5319. "required": false
  5320. },
  5321. {
  5322. "name": "start",
  5323. "in": "query",
  5324. "schema": {
  5325. "type": "number"
  5326. },
  5327. "required": false
  5328. },
  5329. {
  5330. "name": "search",
  5331. "in": "query",
  5332. "schema": {
  5333. "type": "string"
  5334. },
  5335. "required": false
  5336. },
  5337. {
  5338. "name": "limit",
  5339. "in": "query",
  5340. "schema": {
  5341. "type": "number"
  5342. },
  5343. "required": false
  5344. }
  5345. ],
  5346. "responses": {
  5347. "200": {
  5348. "description": "List of sessions",
  5349. "content": {
  5350. "application/json": {
  5351. "schema": {
  5352. "type": "array",
  5353. "items": {
  5354. "$ref": "#/components/schemas/Session"
  5355. },
  5356. "description": "List of sessions"
  5357. }
  5358. }
  5359. }
  5360. },
  5361. "400": {
  5362. "description": "Bad request",
  5363. "content": {
  5364. "application/json": {
  5365. "schema": {
  5366. "$ref": "#/components/schemas/BadRequestError"
  5367. }
  5368. }
  5369. }
  5370. }
  5371. },
  5372. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5373. "summary": "List sessions",
  5374. "x-codeSamples": [
  5375. {
  5376. "lang": "js",
  5377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5378. }
  5379. ]
  5380. },
  5381. "post": {
  5382. "tags": ["session"],
  5383. "operationId": "session.create",
  5384. "parameters": [
  5385. {
  5386. "name": "directory",
  5387. "in": "query",
  5388. "schema": {
  5389. "type": "string"
  5390. },
  5391. "required": false
  5392. },
  5393. {
  5394. "name": "workspace",
  5395. "in": "query",
  5396. "schema": {
  5397. "type": "string"
  5398. },
  5399. "required": false
  5400. }
  5401. ],
  5402. "responses": {
  5403. "200": {
  5404. "description": "Successfully created session",
  5405. "content": {
  5406. "application/json": {
  5407. "schema": {
  5408. "$ref": "#/components/schemas/Session"
  5409. }
  5410. }
  5411. }
  5412. },
  5413. "400": {
  5414. "description": "BadRequest | InvalidRequestError",
  5415. "content": {
  5416. "application/json": {
  5417. "schema": {
  5418. "anyOf": [
  5419. {
  5420. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5421. },
  5422. {
  5423. "$ref": "#/components/schemas/InvalidRequestError"
  5424. }
  5425. ]
  5426. }
  5427. }
  5428. }
  5429. }
  5430. },
  5431. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5432. "summary": "Create session",
  5433. "requestBody": {
  5434. "content": {
  5435. "application/json": {
  5436. "schema": {
  5437. "type": "object",
  5438. "properties": {
  5439. "parentID": {
  5440. "type": "string",
  5441. "pattern": "^ses"
  5442. },
  5443. "title": {
  5444. "type": "string"
  5445. },
  5446. "agent": {
  5447. "type": "string"
  5448. },
  5449. "model": {
  5450. "type": "object",
  5451. "properties": {
  5452. "id": {
  5453. "type": "string"
  5454. },
  5455. "providerID": {
  5456. "type": "string"
  5457. },
  5458. "variant": {
  5459. "type": "string"
  5460. }
  5461. },
  5462. "required": ["id", "providerID"],
  5463. "additionalProperties": false
  5464. },
  5465. "metadata": {
  5466. "type": "object"
  5467. },
  5468. "permission": {
  5469. "$ref": "#/components/schemas/PermissionRuleset"
  5470. },
  5471. "workspaceID": {
  5472. "type": "string",
  5473. "pattern": "^wrk"
  5474. }
  5475. },
  5476. "additionalProperties": false
  5477. }
  5478. }
  5479. }
  5480. },
  5481. "x-codeSamples": [
  5482. {
  5483. "lang": "js",
  5484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5485. }
  5486. ]
  5487. }
  5488. },
  5489. "/session/status": {
  5490. "get": {
  5491. "tags": ["session"],
  5492. "operationId": "session.status",
  5493. "parameters": [
  5494. {
  5495. "name": "directory",
  5496. "in": "query",
  5497. "schema": {
  5498. "type": "string"
  5499. },
  5500. "required": false
  5501. },
  5502. {
  5503. "name": "workspace",
  5504. "in": "query",
  5505. "schema": {
  5506. "type": "string"
  5507. },
  5508. "required": false
  5509. }
  5510. ],
  5511. "responses": {
  5512. "200": {
  5513. "description": "Get session status",
  5514. "content": {
  5515. "application/json": {
  5516. "schema": {
  5517. "type": "object",
  5518. "additionalProperties": {
  5519. "$ref": "#/components/schemas/SessionStatus"
  5520. },
  5521. "description": "Get session status"
  5522. }
  5523. }
  5524. }
  5525. },
  5526. "400": {
  5527. "description": "BadRequest | InvalidRequestError",
  5528. "content": {
  5529. "application/json": {
  5530. "schema": {
  5531. "anyOf": [
  5532. {
  5533. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5534. },
  5535. {
  5536. "$ref": "#/components/schemas/InvalidRequestError"
  5537. }
  5538. ]
  5539. }
  5540. }
  5541. }
  5542. }
  5543. },
  5544. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5545. "summary": "Get session status",
  5546. "x-codeSamples": [
  5547. {
  5548. "lang": "js",
  5549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5550. }
  5551. ]
  5552. }
  5553. },
  5554. "/session/{sessionID}": {
  5555. "get": {
  5556. "tags": ["session"],
  5557. "operationId": "session.get",
  5558. "parameters": [
  5559. {
  5560. "name": "sessionID",
  5561. "in": "path",
  5562. "schema": {
  5563. "type": "string",
  5564. "pattern": "^ses"
  5565. },
  5566. "required": true
  5567. },
  5568. {
  5569. "name": "directory",
  5570. "in": "query",
  5571. "schema": {
  5572. "type": "string"
  5573. },
  5574. "required": false
  5575. },
  5576. {
  5577. "name": "workspace",
  5578. "in": "query",
  5579. "schema": {
  5580. "type": "string"
  5581. },
  5582. "required": false
  5583. }
  5584. ],
  5585. "responses": {
  5586. "200": {
  5587. "description": "Get session",
  5588. "content": {
  5589. "application/json": {
  5590. "schema": {
  5591. "$ref": "#/components/schemas/Session"
  5592. }
  5593. }
  5594. }
  5595. },
  5596. "400": {
  5597. "description": "BadRequest | InvalidRequestError",
  5598. "content": {
  5599. "application/json": {
  5600. "schema": {
  5601. "anyOf": [
  5602. {
  5603. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5604. },
  5605. {
  5606. "$ref": "#/components/schemas/InvalidRequestError"
  5607. }
  5608. ]
  5609. }
  5610. }
  5611. }
  5612. },
  5613. "404": {
  5614. "description": "NotFoundError",
  5615. "content": {
  5616. "application/json": {
  5617. "schema": {
  5618. "$ref": "#/components/schemas/NotFoundError"
  5619. }
  5620. }
  5621. }
  5622. }
  5623. },
  5624. "description": "Retrieve detailed information about a specific OpenCode session.",
  5625. "summary": "Get session",
  5626. "x-codeSamples": [
  5627. {
  5628. "lang": "js",
  5629. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5630. }
  5631. ]
  5632. },
  5633. "delete": {
  5634. "tags": ["session"],
  5635. "operationId": "session.delete",
  5636. "parameters": [
  5637. {
  5638. "name": "sessionID",
  5639. "in": "path",
  5640. "schema": {
  5641. "type": "string",
  5642. "pattern": "^ses"
  5643. },
  5644. "required": true
  5645. },
  5646. {
  5647. "name": "directory",
  5648. "in": "query",
  5649. "schema": {
  5650. "type": "string"
  5651. },
  5652. "required": false
  5653. },
  5654. {
  5655. "name": "workspace",
  5656. "in": "query",
  5657. "schema": {
  5658. "type": "string"
  5659. },
  5660. "required": false
  5661. }
  5662. ],
  5663. "responses": {
  5664. "200": {
  5665. "description": "Successfully deleted session",
  5666. "content": {
  5667. "application/json": {
  5668. "schema": {
  5669. "type": "boolean",
  5670. "description": "Successfully deleted session"
  5671. }
  5672. }
  5673. }
  5674. },
  5675. "400": {
  5676. "description": "BadRequest | InvalidRequestError",
  5677. "content": {
  5678. "application/json": {
  5679. "schema": {
  5680. "anyOf": [
  5681. {
  5682. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5683. },
  5684. {
  5685. "$ref": "#/components/schemas/InvalidRequestError"
  5686. }
  5687. ]
  5688. }
  5689. }
  5690. }
  5691. },
  5692. "404": {
  5693. "description": "NotFoundError",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "$ref": "#/components/schemas/NotFoundError"
  5698. }
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5704. "summary": "Delete session",
  5705. "x-codeSamples": [
  5706. {
  5707. "lang": "js",
  5708. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5709. }
  5710. ]
  5711. },
  5712. "patch": {
  5713. "tags": ["session"],
  5714. "operationId": "session.update",
  5715. "parameters": [
  5716. {
  5717. "name": "sessionID",
  5718. "in": "path",
  5719. "schema": {
  5720. "type": "string",
  5721. "pattern": "^ses"
  5722. },
  5723. "required": true
  5724. },
  5725. {
  5726. "name": "directory",
  5727. "in": "query",
  5728. "schema": {
  5729. "type": "string"
  5730. },
  5731. "required": false
  5732. },
  5733. {
  5734. "name": "workspace",
  5735. "in": "query",
  5736. "schema": {
  5737. "type": "string"
  5738. },
  5739. "required": false
  5740. }
  5741. ],
  5742. "responses": {
  5743. "200": {
  5744. "description": "Successfully updated session",
  5745. "content": {
  5746. "application/json": {
  5747. "schema": {
  5748. "$ref": "#/components/schemas/Session"
  5749. }
  5750. }
  5751. }
  5752. },
  5753. "400": {
  5754. "description": "BadRequest | InvalidRequestError",
  5755. "content": {
  5756. "application/json": {
  5757. "schema": {
  5758. "anyOf": [
  5759. {
  5760. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5761. },
  5762. {
  5763. "$ref": "#/components/schemas/InvalidRequestError"
  5764. }
  5765. ]
  5766. }
  5767. }
  5768. }
  5769. },
  5770. "404": {
  5771. "description": "NotFoundError",
  5772. "content": {
  5773. "application/json": {
  5774. "schema": {
  5775. "$ref": "#/components/schemas/NotFoundError"
  5776. }
  5777. }
  5778. }
  5779. }
  5780. },
  5781. "description": "Update properties of an existing session, such as title or other metadata.",
  5782. "summary": "Update session",
  5783. "requestBody": {
  5784. "content": {
  5785. "application/json": {
  5786. "schema": {
  5787. "type": "object",
  5788. "properties": {
  5789. "title": {
  5790. "type": "string"
  5791. },
  5792. "metadata": {
  5793. "type": "object"
  5794. },
  5795. "permission": {
  5796. "$ref": "#/components/schemas/PermissionRuleset"
  5797. },
  5798. "time": {
  5799. "type": "object",
  5800. "properties": {
  5801. "archived": {
  5802. "type": "number"
  5803. }
  5804. },
  5805. "additionalProperties": false
  5806. }
  5807. },
  5808. "additionalProperties": false
  5809. }
  5810. }
  5811. }
  5812. },
  5813. "x-codeSamples": [
  5814. {
  5815. "lang": "js",
  5816. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5817. }
  5818. ]
  5819. }
  5820. },
  5821. "/session/{sessionID}/children": {
  5822. "get": {
  5823. "tags": ["session"],
  5824. "operationId": "session.children",
  5825. "parameters": [
  5826. {
  5827. "name": "sessionID",
  5828. "in": "path",
  5829. "schema": {
  5830. "type": "string",
  5831. "pattern": "^ses"
  5832. },
  5833. "required": true
  5834. },
  5835. {
  5836. "name": "directory",
  5837. "in": "query",
  5838. "schema": {
  5839. "type": "string"
  5840. },
  5841. "required": false
  5842. },
  5843. {
  5844. "name": "workspace",
  5845. "in": "query",
  5846. "schema": {
  5847. "type": "string"
  5848. },
  5849. "required": false
  5850. }
  5851. ],
  5852. "responses": {
  5853. "200": {
  5854. "description": "List of children",
  5855. "content": {
  5856. "application/json": {
  5857. "schema": {
  5858. "type": "array",
  5859. "items": {
  5860. "$ref": "#/components/schemas/Session"
  5861. },
  5862. "description": "List of children"
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "400": {
  5868. "description": "BadRequest | InvalidRequestError",
  5869. "content": {
  5870. "application/json": {
  5871. "schema": {
  5872. "anyOf": [
  5873. {
  5874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5875. },
  5876. {
  5877. "$ref": "#/components/schemas/InvalidRequestError"
  5878. }
  5879. ]
  5880. }
  5881. }
  5882. }
  5883. },
  5884. "404": {
  5885. "description": "NotFoundError",
  5886. "content": {
  5887. "application/json": {
  5888. "schema": {
  5889. "$ref": "#/components/schemas/NotFoundError"
  5890. }
  5891. }
  5892. }
  5893. }
  5894. },
  5895. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5896. "summary": "Get session children",
  5897. "x-codeSamples": [
  5898. {
  5899. "lang": "js",
  5900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5901. }
  5902. ]
  5903. }
  5904. },
  5905. "/session/{sessionID}/todo": {
  5906. "get": {
  5907. "tags": ["session"],
  5908. "operationId": "session.todo",
  5909. "parameters": [
  5910. {
  5911. "name": "sessionID",
  5912. "in": "path",
  5913. "schema": {
  5914. "type": "string",
  5915. "pattern": "^ses"
  5916. },
  5917. "required": true
  5918. },
  5919. {
  5920. "name": "directory",
  5921. "in": "query",
  5922. "schema": {
  5923. "type": "string"
  5924. },
  5925. "required": false
  5926. },
  5927. {
  5928. "name": "workspace",
  5929. "in": "query",
  5930. "schema": {
  5931. "type": "string"
  5932. },
  5933. "required": false
  5934. }
  5935. ],
  5936. "responses": {
  5937. "200": {
  5938. "description": "Todo list",
  5939. "content": {
  5940. "application/json": {
  5941. "schema": {
  5942. "type": "array",
  5943. "items": {
  5944. "$ref": "#/components/schemas/Todo"
  5945. },
  5946. "description": "Todo list"
  5947. }
  5948. }
  5949. }
  5950. },
  5951. "400": {
  5952. "description": "BadRequest | InvalidRequestError",
  5953. "content": {
  5954. "application/json": {
  5955. "schema": {
  5956. "anyOf": [
  5957. {
  5958. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5959. },
  5960. {
  5961. "$ref": "#/components/schemas/InvalidRequestError"
  5962. }
  5963. ]
  5964. }
  5965. }
  5966. }
  5967. },
  5968. "404": {
  5969. "description": "NotFoundError",
  5970. "content": {
  5971. "application/json": {
  5972. "schema": {
  5973. "$ref": "#/components/schemas/NotFoundError"
  5974. }
  5975. }
  5976. }
  5977. }
  5978. },
  5979. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5980. "summary": "Get session todos",
  5981. "x-codeSamples": [
  5982. {
  5983. "lang": "js",
  5984. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5985. }
  5986. ]
  5987. }
  5988. },
  5989. "/session/{sessionID}/diff": {
  5990. "get": {
  5991. "tags": ["session"],
  5992. "operationId": "session.diff",
  5993. "parameters": [
  5994. {
  5995. "name": "sessionID",
  5996. "in": "path",
  5997. "schema": {
  5998. "type": "string",
  5999. "pattern": "^ses"
  6000. },
  6001. "required": true
  6002. },
  6003. {
  6004. "name": "directory",
  6005. "in": "query",
  6006. "schema": {
  6007. "type": "string"
  6008. },
  6009. "required": false
  6010. },
  6011. {
  6012. "name": "workspace",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "messageID",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string",
  6024. "pattern": "^msg"
  6025. },
  6026. "required": false
  6027. }
  6028. ],
  6029. "responses": {
  6030. "200": {
  6031. "description": "Successfully retrieved diff",
  6032. "content": {
  6033. "application/json": {
  6034. "schema": {
  6035. "type": "array",
  6036. "items": {
  6037. "$ref": "#/components/schemas/SnapshotFileDiff"
  6038. },
  6039. "description": "Successfully retrieved diff"
  6040. }
  6041. }
  6042. }
  6043. },
  6044. "400": {
  6045. "description": "Bad request",
  6046. "content": {
  6047. "application/json": {
  6048. "schema": {
  6049. "$ref": "#/components/schemas/BadRequestError"
  6050. }
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6056. "summary": "Get message diff",
  6057. "x-codeSamples": [
  6058. {
  6059. "lang": "js",
  6060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6061. }
  6062. ]
  6063. }
  6064. },
  6065. "/session/{sessionID}/message": {
  6066. "get": {
  6067. "tags": ["session"],
  6068. "operationId": "session.messages",
  6069. "parameters": [
  6070. {
  6071. "name": "sessionID",
  6072. "in": "path",
  6073. "schema": {
  6074. "type": "string",
  6075. "pattern": "^ses"
  6076. },
  6077. "required": true
  6078. },
  6079. {
  6080. "name": "directory",
  6081. "in": "query",
  6082. "schema": {
  6083. "type": "string"
  6084. },
  6085. "required": false
  6086. },
  6087. {
  6088. "name": "workspace",
  6089. "in": "query",
  6090. "schema": {
  6091. "type": "string"
  6092. },
  6093. "required": false
  6094. },
  6095. {
  6096. "name": "limit",
  6097. "in": "query",
  6098. "schema": {
  6099. "type": "integer",
  6100. "minimum": 0,
  6101. "maximum": 9007199254740991
  6102. },
  6103. "required": false
  6104. },
  6105. {
  6106. "name": "before",
  6107. "in": "query",
  6108. "schema": {
  6109. "type": "string"
  6110. },
  6111. "required": false
  6112. }
  6113. ],
  6114. "responses": {
  6115. "200": {
  6116. "description": "List of messages",
  6117. "content": {
  6118. "application/json": {
  6119. "schema": {
  6120. "type": "array",
  6121. "items": {
  6122. "type": "object",
  6123. "properties": {
  6124. "info": {
  6125. "$ref": "#/components/schemas/Message"
  6126. },
  6127. "parts": {
  6128. "type": "array",
  6129. "items": {
  6130. "$ref": "#/components/schemas/Part"
  6131. }
  6132. }
  6133. },
  6134. "required": ["info", "parts"],
  6135. "additionalProperties": false
  6136. },
  6137. "description": "List of messages"
  6138. }
  6139. }
  6140. }
  6141. },
  6142. "400": {
  6143. "description": "BadRequest | InvalidRequestError",
  6144. "content": {
  6145. "application/json": {
  6146. "schema": {
  6147. "anyOf": [
  6148. {
  6149. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6150. },
  6151. {
  6152. "$ref": "#/components/schemas/InvalidRequestError"
  6153. }
  6154. ]
  6155. }
  6156. }
  6157. }
  6158. },
  6159. "404": {
  6160. "description": "NotFoundError",
  6161. "content": {
  6162. "application/json": {
  6163. "schema": {
  6164. "$ref": "#/components/schemas/NotFoundError"
  6165. }
  6166. }
  6167. }
  6168. }
  6169. },
  6170. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6171. "summary": "Get session messages",
  6172. "x-codeSamples": [
  6173. {
  6174. "lang": "js",
  6175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6176. }
  6177. ]
  6178. },
  6179. "post": {
  6180. "tags": ["session"],
  6181. "operationId": "session.prompt",
  6182. "parameters": [
  6183. {
  6184. "name": "sessionID",
  6185. "in": "path",
  6186. "schema": {
  6187. "type": "string",
  6188. "pattern": "^ses"
  6189. },
  6190. "required": true
  6191. },
  6192. {
  6193. "name": "directory",
  6194. "in": "query",
  6195. "schema": {
  6196. "type": "string"
  6197. },
  6198. "required": false
  6199. },
  6200. {
  6201. "name": "workspace",
  6202. "in": "query",
  6203. "schema": {
  6204. "type": "string"
  6205. },
  6206. "required": false
  6207. }
  6208. ],
  6209. "responses": {
  6210. "200": {
  6211. "description": "Created message",
  6212. "content": {
  6213. "application/json": {
  6214. "schema": {
  6215. "type": "object",
  6216. "required": ["info", "parts"],
  6217. "properties": {
  6218. "info": {
  6219. "$ref": "#/components/schemas/AssistantMessage"
  6220. },
  6221. "parts": {
  6222. "type": "array",
  6223. "items": {
  6224. "$ref": "#/components/schemas/Part"
  6225. }
  6226. }
  6227. }
  6228. }
  6229. }
  6230. }
  6231. },
  6232. "400": {
  6233. "description": "BadRequest | InvalidRequestError",
  6234. "content": {
  6235. "application/json": {
  6236. "schema": {
  6237. "anyOf": [
  6238. {
  6239. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6240. },
  6241. {
  6242. "$ref": "#/components/schemas/InvalidRequestError"
  6243. }
  6244. ]
  6245. }
  6246. }
  6247. }
  6248. },
  6249. "404": {
  6250. "description": "NotFoundError",
  6251. "content": {
  6252. "application/json": {
  6253. "schema": {
  6254. "$ref": "#/components/schemas/NotFoundError"
  6255. }
  6256. }
  6257. }
  6258. }
  6259. },
  6260. "description": "Create and send a new message to a session, streaming the AI response.",
  6261. "summary": "Send message",
  6262. "requestBody": {
  6263. "content": {
  6264. "application/json": {
  6265. "schema": {
  6266. "type": "object",
  6267. "properties": {
  6268. "messageID": {
  6269. "type": "string",
  6270. "pattern": "^msg"
  6271. },
  6272. "model": {
  6273. "type": "object",
  6274. "properties": {
  6275. "providerID": {
  6276. "type": "string"
  6277. },
  6278. "modelID": {
  6279. "type": "string"
  6280. }
  6281. },
  6282. "required": ["providerID", "modelID"],
  6283. "additionalProperties": false
  6284. },
  6285. "agent": {
  6286. "type": "string"
  6287. },
  6288. "noReply": {
  6289. "type": "boolean"
  6290. },
  6291. "tools": {
  6292. "type": "object",
  6293. "additionalProperties": {
  6294. "type": "boolean"
  6295. }
  6296. },
  6297. "format": {
  6298. "$ref": "#/components/schemas/OutputFormat"
  6299. },
  6300. "system": {
  6301. "type": "string"
  6302. },
  6303. "variant": {
  6304. "type": "string"
  6305. },
  6306. "parts": {
  6307. "type": "array",
  6308. "items": {
  6309. "anyOf": [
  6310. {
  6311. "$ref": "#/components/schemas/TextPartInput"
  6312. },
  6313. {
  6314. "$ref": "#/components/schemas/FilePartInput"
  6315. },
  6316. {
  6317. "$ref": "#/components/schemas/AgentPartInput"
  6318. },
  6319. {
  6320. "$ref": "#/components/schemas/SubtaskPartInput"
  6321. }
  6322. ]
  6323. }
  6324. }
  6325. },
  6326. "required": ["parts"],
  6327. "additionalProperties": false
  6328. }
  6329. }
  6330. }
  6331. },
  6332. "x-codeSamples": [
  6333. {
  6334. "lang": "js",
  6335. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6336. }
  6337. ]
  6338. }
  6339. },
  6340. "/session/{sessionID}/message/{messageID}": {
  6341. "get": {
  6342. "tags": ["session"],
  6343. "operationId": "session.message",
  6344. "parameters": [
  6345. {
  6346. "name": "sessionID",
  6347. "in": "path",
  6348. "schema": {
  6349. "type": "string",
  6350. "pattern": "^ses"
  6351. },
  6352. "required": true
  6353. },
  6354. {
  6355. "name": "messageID",
  6356. "in": "path",
  6357. "schema": {
  6358. "type": "string",
  6359. "pattern": "^msg"
  6360. },
  6361. "required": true
  6362. },
  6363. {
  6364. "name": "directory",
  6365. "in": "query",
  6366. "schema": {
  6367. "type": "string"
  6368. },
  6369. "required": false
  6370. },
  6371. {
  6372. "name": "workspace",
  6373. "in": "query",
  6374. "schema": {
  6375. "type": "string"
  6376. },
  6377. "required": false
  6378. }
  6379. ],
  6380. "responses": {
  6381. "200": {
  6382. "description": "Message",
  6383. "content": {
  6384. "application/json": {
  6385. "schema": {
  6386. "type": "object",
  6387. "properties": {
  6388. "info": {
  6389. "$ref": "#/components/schemas/Message"
  6390. },
  6391. "parts": {
  6392. "type": "array",
  6393. "items": {
  6394. "$ref": "#/components/schemas/Part"
  6395. }
  6396. }
  6397. },
  6398. "required": ["info", "parts"],
  6399. "additionalProperties": false,
  6400. "description": "Message"
  6401. }
  6402. }
  6403. }
  6404. },
  6405. "400": {
  6406. "description": "BadRequest | InvalidRequestError",
  6407. "content": {
  6408. "application/json": {
  6409. "schema": {
  6410. "anyOf": [
  6411. {
  6412. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6413. },
  6414. {
  6415. "$ref": "#/components/schemas/InvalidRequestError"
  6416. }
  6417. ]
  6418. }
  6419. }
  6420. }
  6421. },
  6422. "404": {
  6423. "description": "NotFoundError",
  6424. "content": {
  6425. "application/json": {
  6426. "schema": {
  6427. "$ref": "#/components/schemas/NotFoundError"
  6428. }
  6429. }
  6430. }
  6431. }
  6432. },
  6433. "description": "Retrieve a specific message from a session by its message ID.",
  6434. "summary": "Get message",
  6435. "x-codeSamples": [
  6436. {
  6437. "lang": "js",
  6438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6439. }
  6440. ]
  6441. },
  6442. "delete": {
  6443. "tags": ["session"],
  6444. "operationId": "session.deleteMessage",
  6445. "parameters": [
  6446. {
  6447. "name": "sessionID",
  6448. "in": "path",
  6449. "schema": {
  6450. "type": "string",
  6451. "pattern": "^ses"
  6452. },
  6453. "required": true
  6454. },
  6455. {
  6456. "name": "messageID",
  6457. "in": "path",
  6458. "schema": {
  6459. "type": "string",
  6460. "pattern": "^msg"
  6461. },
  6462. "required": true
  6463. },
  6464. {
  6465. "name": "directory",
  6466. "in": "query",
  6467. "schema": {
  6468. "type": "string"
  6469. },
  6470. "required": false
  6471. },
  6472. {
  6473. "name": "workspace",
  6474. "in": "query",
  6475. "schema": {
  6476. "type": "string"
  6477. },
  6478. "required": false
  6479. }
  6480. ],
  6481. "responses": {
  6482. "200": {
  6483. "description": "Successfully deleted message",
  6484. "content": {
  6485. "application/json": {
  6486. "schema": {
  6487. "type": "boolean",
  6488. "description": "Successfully deleted message"
  6489. }
  6490. }
  6491. }
  6492. },
  6493. "400": {
  6494. "description": "BadRequest | InvalidRequestError",
  6495. "content": {
  6496. "application/json": {
  6497. "schema": {
  6498. "anyOf": [
  6499. {
  6500. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6501. },
  6502. {
  6503. "$ref": "#/components/schemas/InvalidRequestError"
  6504. }
  6505. ]
  6506. }
  6507. }
  6508. }
  6509. },
  6510. "404": {
  6511. "description": "NotFoundError",
  6512. "content": {
  6513. "application/json": {
  6514. "schema": {
  6515. "$ref": "#/components/schemas/NotFoundError"
  6516. }
  6517. }
  6518. }
  6519. },
  6520. "409": {
  6521. "description": "SessionBusyError",
  6522. "content": {
  6523. "application/json": {
  6524. "schema": {
  6525. "$ref": "#/components/schemas/SessionBusyError"
  6526. }
  6527. }
  6528. }
  6529. }
  6530. },
  6531. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6532. "summary": "Delete message",
  6533. "x-codeSamples": [
  6534. {
  6535. "lang": "js",
  6536. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6537. }
  6538. ]
  6539. }
  6540. },
  6541. "/session/{sessionID}/fork": {
  6542. "post": {
  6543. "tags": ["session"],
  6544. "operationId": "session.fork",
  6545. "parameters": [
  6546. {
  6547. "name": "sessionID",
  6548. "in": "path",
  6549. "schema": {
  6550. "type": "string",
  6551. "pattern": "^ses"
  6552. },
  6553. "required": true
  6554. },
  6555. {
  6556. "name": "directory",
  6557. "in": "query",
  6558. "schema": {
  6559. "type": "string"
  6560. },
  6561. "required": false
  6562. },
  6563. {
  6564. "name": "workspace",
  6565. "in": "query",
  6566. "schema": {
  6567. "type": "string"
  6568. },
  6569. "required": false
  6570. }
  6571. ],
  6572. "responses": {
  6573. "200": {
  6574. "description": "200",
  6575. "content": {
  6576. "application/json": {
  6577. "schema": {
  6578. "$ref": "#/components/schemas/Session"
  6579. }
  6580. }
  6581. }
  6582. },
  6583. "400": {
  6584. "description": "BadRequest | InvalidRequestError",
  6585. "content": {
  6586. "application/json": {
  6587. "schema": {
  6588. "anyOf": [
  6589. {
  6590. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6591. },
  6592. {
  6593. "$ref": "#/components/schemas/InvalidRequestError"
  6594. }
  6595. ]
  6596. }
  6597. }
  6598. }
  6599. },
  6600. "404": {
  6601. "description": "NotFoundError",
  6602. "content": {
  6603. "application/json": {
  6604. "schema": {
  6605. "$ref": "#/components/schemas/NotFoundError"
  6606. }
  6607. }
  6608. }
  6609. }
  6610. },
  6611. "description": "Create a new session by forking an existing session at a specific message point.",
  6612. "summary": "Fork session",
  6613. "requestBody": {
  6614. "content": {
  6615. "application/json": {
  6616. "schema": {
  6617. "type": "object",
  6618. "properties": {
  6619. "messageID": {
  6620. "type": "string",
  6621. "pattern": "^msg"
  6622. }
  6623. },
  6624. "additionalProperties": false
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "x-codeSamples": [
  6630. {
  6631. "lang": "js",
  6632. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6633. }
  6634. ]
  6635. }
  6636. },
  6637. "/session/{sessionID}/abort": {
  6638. "post": {
  6639. "tags": ["session"],
  6640. "operationId": "session.abort",
  6641. "parameters": [
  6642. {
  6643. "name": "sessionID",
  6644. "in": "path",
  6645. "schema": {
  6646. "type": "string",
  6647. "pattern": "^ses"
  6648. },
  6649. "required": true
  6650. },
  6651. {
  6652. "name": "directory",
  6653. "in": "query",
  6654. "schema": {
  6655. "type": "string"
  6656. },
  6657. "required": false
  6658. },
  6659. {
  6660. "name": "workspace",
  6661. "in": "query",
  6662. "schema": {
  6663. "type": "string"
  6664. },
  6665. "required": false
  6666. }
  6667. ],
  6668. "responses": {
  6669. "200": {
  6670. "description": "Aborted session",
  6671. "content": {
  6672. "application/json": {
  6673. "schema": {
  6674. "type": "boolean",
  6675. "description": "Aborted session"
  6676. }
  6677. }
  6678. }
  6679. },
  6680. "400": {
  6681. "description": "BadRequest | InvalidRequestError",
  6682. "content": {
  6683. "application/json": {
  6684. "schema": {
  6685. "anyOf": [
  6686. {
  6687. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6688. },
  6689. {
  6690. "$ref": "#/components/schemas/InvalidRequestError"
  6691. }
  6692. ]
  6693. }
  6694. }
  6695. }
  6696. }
  6697. },
  6698. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6699. "summary": "Abort session",
  6700. "x-codeSamples": [
  6701. {
  6702. "lang": "js",
  6703. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6704. }
  6705. ]
  6706. }
  6707. },
  6708. "/session/{sessionID}/init": {
  6709. "post": {
  6710. "tags": ["session"],
  6711. "operationId": "session.init",
  6712. "parameters": [
  6713. {
  6714. "name": "sessionID",
  6715. "in": "path",
  6716. "schema": {
  6717. "type": "string",
  6718. "pattern": "^ses"
  6719. },
  6720. "required": true
  6721. },
  6722. {
  6723. "name": "directory",
  6724. "in": "query",
  6725. "schema": {
  6726. "type": "string"
  6727. },
  6728. "required": false
  6729. },
  6730. {
  6731. "name": "workspace",
  6732. "in": "query",
  6733. "schema": {
  6734. "type": "string"
  6735. },
  6736. "required": false
  6737. }
  6738. ],
  6739. "responses": {
  6740. "200": {
  6741. "description": "200",
  6742. "content": {
  6743. "application/json": {
  6744. "schema": {
  6745. "type": "boolean",
  6746. "description": "200"
  6747. }
  6748. }
  6749. }
  6750. },
  6751. "400": {
  6752. "description": "BadRequest | InvalidRequestError",
  6753. "content": {
  6754. "application/json": {
  6755. "schema": {
  6756. "anyOf": [
  6757. {
  6758. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6759. },
  6760. {
  6761. "$ref": "#/components/schemas/InvalidRequestError"
  6762. }
  6763. ]
  6764. }
  6765. }
  6766. }
  6767. },
  6768. "404": {
  6769. "description": "NotFoundError",
  6770. "content": {
  6771. "application/json": {
  6772. "schema": {
  6773. "$ref": "#/components/schemas/NotFoundError"
  6774. }
  6775. }
  6776. }
  6777. }
  6778. },
  6779. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6780. "summary": "Initialize session",
  6781. "requestBody": {
  6782. "content": {
  6783. "application/json": {
  6784. "schema": {
  6785. "type": "object",
  6786. "properties": {
  6787. "modelID": {
  6788. "type": "string"
  6789. },
  6790. "providerID": {
  6791. "type": "string"
  6792. },
  6793. "messageID": {
  6794. "type": "string",
  6795. "pattern": "^msg"
  6796. }
  6797. },
  6798. "required": ["modelID", "providerID", "messageID"],
  6799. "additionalProperties": false
  6800. }
  6801. }
  6802. }
  6803. },
  6804. "x-codeSamples": [
  6805. {
  6806. "lang": "js",
  6807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6808. }
  6809. ]
  6810. }
  6811. },
  6812. "/session/{sessionID}/share": {
  6813. "post": {
  6814. "tags": ["session"],
  6815. "operationId": "session.share",
  6816. "parameters": [
  6817. {
  6818. "name": "sessionID",
  6819. "in": "path",
  6820. "schema": {
  6821. "type": "string",
  6822. "pattern": "^ses"
  6823. },
  6824. "required": true
  6825. },
  6826. {
  6827. "name": "directory",
  6828. "in": "query",
  6829. "schema": {
  6830. "type": "string"
  6831. },
  6832. "required": false
  6833. },
  6834. {
  6835. "name": "workspace",
  6836. "in": "query",
  6837. "schema": {
  6838. "type": "string"
  6839. },
  6840. "required": false
  6841. }
  6842. ],
  6843. "responses": {
  6844. "200": {
  6845. "description": "Successfully shared session",
  6846. "content": {
  6847. "application/json": {
  6848. "schema": {
  6849. "$ref": "#/components/schemas/Session"
  6850. }
  6851. }
  6852. }
  6853. },
  6854. "400": {
  6855. "description": "Bad request",
  6856. "content": {
  6857. "application/json": {
  6858. "schema": {
  6859. "$ref": "#/components/schemas/BadRequestError"
  6860. }
  6861. }
  6862. }
  6863. },
  6864. "404": {
  6865. "description": "NotFoundError",
  6866. "content": {
  6867. "application/json": {
  6868. "schema": {
  6869. "$ref": "#/components/schemas/NotFoundError"
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "500": {
  6875. "description": "InternalServerError",
  6876. "content": {
  6877. "application/json": {
  6878. "schema": {
  6879. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6880. }
  6881. }
  6882. }
  6883. }
  6884. },
  6885. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6886. "summary": "Share session",
  6887. "x-codeSamples": [
  6888. {
  6889. "lang": "js",
  6890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6891. }
  6892. ]
  6893. },
  6894. "delete": {
  6895. "tags": ["session"],
  6896. "operationId": "session.unshare",
  6897. "parameters": [
  6898. {
  6899. "name": "sessionID",
  6900. "in": "path",
  6901. "schema": {
  6902. "type": "string",
  6903. "pattern": "^ses"
  6904. },
  6905. "required": true
  6906. },
  6907. {
  6908. "name": "directory",
  6909. "in": "query",
  6910. "schema": {
  6911. "type": "string"
  6912. },
  6913. "required": false
  6914. },
  6915. {
  6916. "name": "workspace",
  6917. "in": "query",
  6918. "schema": {
  6919. "type": "string"
  6920. },
  6921. "required": false
  6922. }
  6923. ],
  6924. "responses": {
  6925. "200": {
  6926. "description": "Successfully unshared session",
  6927. "content": {
  6928. "application/json": {
  6929. "schema": {
  6930. "$ref": "#/components/schemas/Session"
  6931. }
  6932. }
  6933. }
  6934. },
  6935. "400": {
  6936. "description": "Bad request",
  6937. "content": {
  6938. "application/json": {
  6939. "schema": {
  6940. "$ref": "#/components/schemas/BadRequestError"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "404": {
  6946. "description": "NotFoundError",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/NotFoundError"
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "500": {
  6956. "description": "InternalServerError",
  6957. "content": {
  6958. "application/json": {
  6959. "schema": {
  6960. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6961. }
  6962. }
  6963. }
  6964. }
  6965. },
  6966. "description": "Remove the shareable link for a session, making it private again.",
  6967. "summary": "Unshare session",
  6968. "x-codeSamples": [
  6969. {
  6970. "lang": "js",
  6971. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6972. }
  6973. ]
  6974. }
  6975. },
  6976. "/session/{sessionID}/summarize": {
  6977. "post": {
  6978. "tags": ["session"],
  6979. "operationId": "session.summarize",
  6980. "parameters": [
  6981. {
  6982. "name": "sessionID",
  6983. "in": "path",
  6984. "schema": {
  6985. "type": "string",
  6986. "pattern": "^ses"
  6987. },
  6988. "required": true
  6989. },
  6990. {
  6991. "name": "directory",
  6992. "in": "query",
  6993. "schema": {
  6994. "type": "string"
  6995. },
  6996. "required": false
  6997. },
  6998. {
  6999. "name": "workspace",
  7000. "in": "query",
  7001. "schema": {
  7002. "type": "string"
  7003. },
  7004. "required": false
  7005. }
  7006. ],
  7007. "responses": {
  7008. "200": {
  7009. "description": "Summarized session",
  7010. "content": {
  7011. "application/json": {
  7012. "schema": {
  7013. "type": "boolean",
  7014. "description": "Summarized session"
  7015. }
  7016. }
  7017. }
  7018. },
  7019. "400": {
  7020. "description": "BadRequest | InvalidRequestError",
  7021. "content": {
  7022. "application/json": {
  7023. "schema": {
  7024. "anyOf": [
  7025. {
  7026. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7027. },
  7028. {
  7029. "$ref": "#/components/schemas/InvalidRequestError"
  7030. }
  7031. ]
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "404": {
  7037. "description": "NotFoundError",
  7038. "content": {
  7039. "application/json": {
  7040. "schema": {
  7041. "$ref": "#/components/schemas/NotFoundError"
  7042. }
  7043. }
  7044. }
  7045. }
  7046. },
  7047. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7048. "summary": "Summarize session",
  7049. "requestBody": {
  7050. "content": {
  7051. "application/json": {
  7052. "schema": {
  7053. "type": "object",
  7054. "properties": {
  7055. "providerID": {
  7056. "type": "string"
  7057. },
  7058. "modelID": {
  7059. "type": "string"
  7060. },
  7061. "auto": {
  7062. "type": "boolean"
  7063. }
  7064. },
  7065. "required": ["providerID", "modelID"],
  7066. "additionalProperties": false
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "x-codeSamples": [
  7072. {
  7073. "lang": "js",
  7074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7075. }
  7076. ]
  7077. }
  7078. },
  7079. "/session/{sessionID}/prompt_async": {
  7080. "post": {
  7081. "tags": ["session"],
  7082. "operationId": "session.prompt_async",
  7083. "parameters": [
  7084. {
  7085. "name": "sessionID",
  7086. "in": "path",
  7087. "schema": {
  7088. "type": "string",
  7089. "pattern": "^ses"
  7090. },
  7091. "required": true
  7092. },
  7093. {
  7094. "name": "directory",
  7095. "in": "query",
  7096. "schema": {
  7097. "type": "string"
  7098. },
  7099. "required": false
  7100. },
  7101. {
  7102. "name": "workspace",
  7103. "in": "query",
  7104. "schema": {
  7105. "type": "string"
  7106. },
  7107. "required": false
  7108. }
  7109. ],
  7110. "responses": {
  7111. "204": {
  7112. "description": "Prompt accepted"
  7113. },
  7114. "400": {
  7115. "description": "BadRequest | InvalidRequestError",
  7116. "content": {
  7117. "application/json": {
  7118. "schema": {
  7119. "anyOf": [
  7120. {
  7121. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7122. },
  7123. {
  7124. "$ref": "#/components/schemas/InvalidRequestError"
  7125. }
  7126. ]
  7127. }
  7128. }
  7129. }
  7130. },
  7131. "404": {
  7132. "description": "NotFoundError",
  7133. "content": {
  7134. "application/json": {
  7135. "schema": {
  7136. "$ref": "#/components/schemas/NotFoundError"
  7137. }
  7138. }
  7139. }
  7140. }
  7141. },
  7142. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7143. "summary": "Send async message",
  7144. "requestBody": {
  7145. "content": {
  7146. "application/json": {
  7147. "schema": {
  7148. "type": "object",
  7149. "properties": {
  7150. "messageID": {
  7151. "type": "string",
  7152. "pattern": "^msg"
  7153. },
  7154. "model": {
  7155. "type": "object",
  7156. "properties": {
  7157. "providerID": {
  7158. "type": "string"
  7159. },
  7160. "modelID": {
  7161. "type": "string"
  7162. }
  7163. },
  7164. "required": ["providerID", "modelID"],
  7165. "additionalProperties": false
  7166. },
  7167. "agent": {
  7168. "type": "string"
  7169. },
  7170. "noReply": {
  7171. "type": "boolean"
  7172. },
  7173. "tools": {
  7174. "type": "object",
  7175. "additionalProperties": {
  7176. "type": "boolean"
  7177. }
  7178. },
  7179. "format": {
  7180. "$ref": "#/components/schemas/OutputFormat"
  7181. },
  7182. "system": {
  7183. "type": "string"
  7184. },
  7185. "variant": {
  7186. "type": "string"
  7187. },
  7188. "parts": {
  7189. "type": "array",
  7190. "items": {
  7191. "anyOf": [
  7192. {
  7193. "$ref": "#/components/schemas/TextPartInput"
  7194. },
  7195. {
  7196. "$ref": "#/components/schemas/FilePartInput"
  7197. },
  7198. {
  7199. "$ref": "#/components/schemas/AgentPartInput"
  7200. },
  7201. {
  7202. "$ref": "#/components/schemas/SubtaskPartInput"
  7203. }
  7204. ]
  7205. }
  7206. }
  7207. },
  7208. "required": ["parts"],
  7209. "additionalProperties": false
  7210. }
  7211. }
  7212. }
  7213. },
  7214. "x-codeSamples": [
  7215. {
  7216. "lang": "js",
  7217. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7218. }
  7219. ]
  7220. }
  7221. },
  7222. "/session/{sessionID}/command": {
  7223. "post": {
  7224. "tags": ["session"],
  7225. "operationId": "session.command",
  7226. "parameters": [
  7227. {
  7228. "name": "sessionID",
  7229. "in": "path",
  7230. "schema": {
  7231. "type": "string",
  7232. "pattern": "^ses"
  7233. },
  7234. "required": true
  7235. },
  7236. {
  7237. "name": "directory",
  7238. "in": "query",
  7239. "schema": {
  7240. "type": "string"
  7241. },
  7242. "required": false
  7243. },
  7244. {
  7245. "name": "workspace",
  7246. "in": "query",
  7247. "schema": {
  7248. "type": "string"
  7249. },
  7250. "required": false
  7251. }
  7252. ],
  7253. "responses": {
  7254. "200": {
  7255. "description": "Created message",
  7256. "content": {
  7257. "application/json": {
  7258. "schema": {
  7259. "type": "object",
  7260. "required": ["info", "parts"],
  7261. "properties": {
  7262. "info": {
  7263. "$ref": "#/components/schemas/AssistantMessage"
  7264. },
  7265. "parts": {
  7266. "type": "array",
  7267. "items": {
  7268. "$ref": "#/components/schemas/Part"
  7269. }
  7270. }
  7271. }
  7272. }
  7273. }
  7274. }
  7275. },
  7276. "400": {
  7277. "description": "BadRequest | InvalidRequestError",
  7278. "content": {
  7279. "application/json": {
  7280. "schema": {
  7281. "anyOf": [
  7282. {
  7283. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7284. },
  7285. {
  7286. "$ref": "#/components/schemas/InvalidRequestError"
  7287. }
  7288. ]
  7289. }
  7290. }
  7291. }
  7292. },
  7293. "404": {
  7294. "description": "NotFoundError",
  7295. "content": {
  7296. "application/json": {
  7297. "schema": {
  7298. "$ref": "#/components/schemas/NotFoundError"
  7299. }
  7300. }
  7301. }
  7302. }
  7303. },
  7304. "description": "Send a new command to a session for execution by the AI assistant.",
  7305. "summary": "Send command",
  7306. "requestBody": {
  7307. "content": {
  7308. "application/json": {
  7309. "schema": {
  7310. "type": "object",
  7311. "properties": {
  7312. "messageID": {
  7313. "type": "string",
  7314. "pattern": "^msg"
  7315. },
  7316. "agent": {
  7317. "type": "string"
  7318. },
  7319. "model": {
  7320. "type": "string"
  7321. },
  7322. "arguments": {
  7323. "type": "string"
  7324. },
  7325. "command": {
  7326. "type": "string"
  7327. },
  7328. "variant": {
  7329. "type": "string"
  7330. },
  7331. "parts": {
  7332. "type": "array",
  7333. "items": {
  7334. "type": "object",
  7335. "properties": {
  7336. "id": {
  7337. "type": "string",
  7338. "pattern": "^prt"
  7339. },
  7340. "type": {
  7341. "type": "string",
  7342. "enum": ["file"]
  7343. },
  7344. "mime": {
  7345. "type": "string"
  7346. },
  7347. "filename": {
  7348. "type": "string"
  7349. },
  7350. "url": {
  7351. "type": "string"
  7352. },
  7353. "source": {
  7354. "$ref": "#/components/schemas/FilePartSource"
  7355. }
  7356. },
  7357. "required": ["type", "mime", "url"],
  7358. "additionalProperties": false
  7359. }
  7360. }
  7361. },
  7362. "required": ["arguments", "command"],
  7363. "additionalProperties": false
  7364. }
  7365. }
  7366. }
  7367. },
  7368. "x-codeSamples": [
  7369. {
  7370. "lang": "js",
  7371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7372. }
  7373. ]
  7374. }
  7375. },
  7376. "/session/{sessionID}/shell": {
  7377. "post": {
  7378. "tags": ["session"],
  7379. "operationId": "session.shell",
  7380. "parameters": [
  7381. {
  7382. "name": "sessionID",
  7383. "in": "path",
  7384. "schema": {
  7385. "type": "string",
  7386. "pattern": "^ses"
  7387. },
  7388. "required": true
  7389. },
  7390. {
  7391. "name": "directory",
  7392. "in": "query",
  7393. "schema": {
  7394. "type": "string"
  7395. },
  7396. "required": false
  7397. },
  7398. {
  7399. "name": "workspace",
  7400. "in": "query",
  7401. "schema": {
  7402. "type": "string"
  7403. },
  7404. "required": false
  7405. }
  7406. ],
  7407. "responses": {
  7408. "200": {
  7409. "description": "Created message",
  7410. "content": {
  7411. "application/json": {
  7412. "schema": {
  7413. "type": "object",
  7414. "properties": {
  7415. "info": {
  7416. "$ref": "#/components/schemas/Message"
  7417. },
  7418. "parts": {
  7419. "type": "array",
  7420. "items": {
  7421. "$ref": "#/components/schemas/Part"
  7422. }
  7423. }
  7424. },
  7425. "required": ["info", "parts"],
  7426. "additionalProperties": false,
  7427. "description": "Created message"
  7428. }
  7429. }
  7430. }
  7431. },
  7432. "400": {
  7433. "description": "BadRequest | InvalidRequestError",
  7434. "content": {
  7435. "application/json": {
  7436. "schema": {
  7437. "anyOf": [
  7438. {
  7439. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7440. },
  7441. {
  7442. "$ref": "#/components/schemas/InvalidRequestError"
  7443. }
  7444. ]
  7445. }
  7446. }
  7447. }
  7448. },
  7449. "404": {
  7450. "description": "NotFoundError",
  7451. "content": {
  7452. "application/json": {
  7453. "schema": {
  7454. "$ref": "#/components/schemas/NotFoundError"
  7455. }
  7456. }
  7457. }
  7458. },
  7459. "409": {
  7460. "description": "SessionBusyError",
  7461. "content": {
  7462. "application/json": {
  7463. "schema": {
  7464. "$ref": "#/components/schemas/SessionBusyError"
  7465. }
  7466. }
  7467. }
  7468. }
  7469. },
  7470. "description": "Execute a shell command within the session context and return the AI's response.",
  7471. "summary": "Run shell command",
  7472. "requestBody": {
  7473. "content": {
  7474. "application/json": {
  7475. "schema": {
  7476. "type": "object",
  7477. "properties": {
  7478. "messageID": {
  7479. "type": "string",
  7480. "pattern": "^msg"
  7481. },
  7482. "agent": {
  7483. "type": "string"
  7484. },
  7485. "model": {
  7486. "type": "object",
  7487. "properties": {
  7488. "providerID": {
  7489. "type": "string"
  7490. },
  7491. "modelID": {
  7492. "type": "string"
  7493. }
  7494. },
  7495. "required": ["providerID", "modelID"],
  7496. "additionalProperties": false
  7497. },
  7498. "command": {
  7499. "type": "string"
  7500. }
  7501. },
  7502. "required": ["agent", "command"],
  7503. "additionalProperties": false
  7504. }
  7505. }
  7506. }
  7507. },
  7508. "x-codeSamples": [
  7509. {
  7510. "lang": "js",
  7511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7512. }
  7513. ]
  7514. }
  7515. },
  7516. "/session/{sessionID}/revert": {
  7517. "post": {
  7518. "tags": ["session"],
  7519. "operationId": "session.revert",
  7520. "parameters": [
  7521. {
  7522. "name": "sessionID",
  7523. "in": "path",
  7524. "schema": {
  7525. "type": "string",
  7526. "pattern": "^ses"
  7527. },
  7528. "required": true
  7529. },
  7530. {
  7531. "name": "directory",
  7532. "in": "query",
  7533. "schema": {
  7534. "type": "string"
  7535. },
  7536. "required": false
  7537. },
  7538. {
  7539. "name": "workspace",
  7540. "in": "query",
  7541. "schema": {
  7542. "type": "string"
  7543. },
  7544. "required": false
  7545. }
  7546. ],
  7547. "responses": {
  7548. "200": {
  7549. "description": "Updated session",
  7550. "content": {
  7551. "application/json": {
  7552. "schema": {
  7553. "$ref": "#/components/schemas/Session"
  7554. }
  7555. }
  7556. }
  7557. },
  7558. "400": {
  7559. "description": "BadRequest | InvalidRequestError",
  7560. "content": {
  7561. "application/json": {
  7562. "schema": {
  7563. "anyOf": [
  7564. {
  7565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7566. },
  7567. {
  7568. "$ref": "#/components/schemas/InvalidRequestError"
  7569. }
  7570. ]
  7571. }
  7572. }
  7573. }
  7574. },
  7575. "404": {
  7576. "description": "NotFoundError",
  7577. "content": {
  7578. "application/json": {
  7579. "schema": {
  7580. "$ref": "#/components/schemas/NotFoundError"
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "409": {
  7586. "description": "SessionBusyError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/SessionBusyError"
  7591. }
  7592. }
  7593. }
  7594. }
  7595. },
  7596. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7597. "summary": "Revert message",
  7598. "requestBody": {
  7599. "content": {
  7600. "application/json": {
  7601. "schema": {
  7602. "type": "object",
  7603. "properties": {
  7604. "messageID": {
  7605. "type": "string",
  7606. "pattern": "^msg"
  7607. },
  7608. "partID": {
  7609. "type": "string",
  7610. "pattern": "^prt"
  7611. }
  7612. },
  7613. "required": ["messageID"],
  7614. "additionalProperties": false
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "x-codeSamples": [
  7620. {
  7621. "lang": "js",
  7622. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7623. }
  7624. ]
  7625. }
  7626. },
  7627. "/session/{sessionID}/unrevert": {
  7628. "post": {
  7629. "tags": ["session"],
  7630. "operationId": "session.unrevert",
  7631. "parameters": [
  7632. {
  7633. "name": "sessionID",
  7634. "in": "path",
  7635. "schema": {
  7636. "type": "string",
  7637. "pattern": "^ses"
  7638. },
  7639. "required": true
  7640. },
  7641. {
  7642. "name": "directory",
  7643. "in": "query",
  7644. "schema": {
  7645. "type": "string"
  7646. },
  7647. "required": false
  7648. },
  7649. {
  7650. "name": "workspace",
  7651. "in": "query",
  7652. "schema": {
  7653. "type": "string"
  7654. },
  7655. "required": false
  7656. }
  7657. ],
  7658. "responses": {
  7659. "200": {
  7660. "description": "Updated session",
  7661. "content": {
  7662. "application/json": {
  7663. "schema": {
  7664. "$ref": "#/components/schemas/Session"
  7665. }
  7666. }
  7667. }
  7668. },
  7669. "400": {
  7670. "description": "BadRequest | InvalidRequestError",
  7671. "content": {
  7672. "application/json": {
  7673. "schema": {
  7674. "anyOf": [
  7675. {
  7676. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7677. },
  7678. {
  7679. "$ref": "#/components/schemas/InvalidRequestError"
  7680. }
  7681. ]
  7682. }
  7683. }
  7684. }
  7685. },
  7686. "404": {
  7687. "description": "NotFoundError",
  7688. "content": {
  7689. "application/json": {
  7690. "schema": {
  7691. "$ref": "#/components/schemas/NotFoundError"
  7692. }
  7693. }
  7694. }
  7695. },
  7696. "409": {
  7697. "description": "SessionBusyError",
  7698. "content": {
  7699. "application/json": {
  7700. "schema": {
  7701. "$ref": "#/components/schemas/SessionBusyError"
  7702. }
  7703. }
  7704. }
  7705. }
  7706. },
  7707. "description": "Restore all previously reverted messages in a session.",
  7708. "summary": "Restore reverted messages",
  7709. "x-codeSamples": [
  7710. {
  7711. "lang": "js",
  7712. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7713. }
  7714. ]
  7715. }
  7716. },
  7717. "/session/{sessionID}/permissions/{permissionID}": {
  7718. "post": {
  7719. "tags": ["session"],
  7720. "operationId": "permission.respond",
  7721. "parameters": [
  7722. {
  7723. "name": "sessionID",
  7724. "in": "path",
  7725. "schema": {
  7726. "type": "string",
  7727. "pattern": "^ses"
  7728. },
  7729. "required": true
  7730. },
  7731. {
  7732. "name": "permissionID",
  7733. "in": "path",
  7734. "schema": {
  7735. "type": "string",
  7736. "pattern": "^per"
  7737. },
  7738. "required": true
  7739. },
  7740. {
  7741. "name": "directory",
  7742. "in": "query",
  7743. "schema": {
  7744. "type": "string"
  7745. },
  7746. "required": false
  7747. },
  7748. {
  7749. "name": "workspace",
  7750. "in": "query",
  7751. "schema": {
  7752. "type": "string"
  7753. },
  7754. "required": false
  7755. }
  7756. ],
  7757. "responses": {
  7758. "200": {
  7759. "description": "Permission processed successfully",
  7760. "content": {
  7761. "application/json": {
  7762. "schema": {
  7763. "type": "boolean",
  7764. "description": "Permission processed successfully"
  7765. }
  7766. }
  7767. }
  7768. },
  7769. "400": {
  7770. "description": "BadRequest | InvalidRequestError",
  7771. "content": {
  7772. "application/json": {
  7773. "schema": {
  7774. "anyOf": [
  7775. {
  7776. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7777. },
  7778. {
  7779. "$ref": "#/components/schemas/InvalidRequestError"
  7780. }
  7781. ]
  7782. }
  7783. }
  7784. }
  7785. },
  7786. "404": {
  7787. "description": "NotFoundError | PermissionNotFoundError",
  7788. "content": {
  7789. "application/json": {
  7790. "schema": {
  7791. "anyOf": [
  7792. {
  7793. "$ref": "#/components/schemas/NotFoundError"
  7794. },
  7795. {
  7796. "$ref": "#/components/schemas/PermissionNotFoundError"
  7797. }
  7798. ]
  7799. }
  7800. }
  7801. }
  7802. }
  7803. },
  7804. "description": "Approve or deny a permission request from the AI assistant.",
  7805. "summary": "Respond to permission",
  7806. "deprecated": true,
  7807. "requestBody": {
  7808. "content": {
  7809. "application/json": {
  7810. "schema": {
  7811. "type": "object",
  7812. "properties": {
  7813. "response": {
  7814. "type": "string",
  7815. "enum": ["once", "always", "reject"]
  7816. }
  7817. },
  7818. "required": ["response"],
  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.permission.respond({\n ...\n})"
  7828. }
  7829. ]
  7830. }
  7831. },
  7832. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7833. "delete": {
  7834. "tags": ["session"],
  7835. "operationId": "part.delete",
  7836. "parameters": [
  7837. {
  7838. "name": "sessionID",
  7839. "in": "path",
  7840. "schema": {
  7841. "type": "string",
  7842. "pattern": "^ses"
  7843. },
  7844. "required": true
  7845. },
  7846. {
  7847. "name": "messageID",
  7848. "in": "path",
  7849. "schema": {
  7850. "type": "string",
  7851. "pattern": "^msg"
  7852. },
  7853. "required": true
  7854. },
  7855. {
  7856. "name": "partID",
  7857. "in": "path",
  7858. "schema": {
  7859. "type": "string",
  7860. "pattern": "^prt"
  7861. },
  7862. "required": true
  7863. },
  7864. {
  7865. "name": "directory",
  7866. "in": "query",
  7867. "schema": {
  7868. "type": "string"
  7869. },
  7870. "required": false
  7871. },
  7872. {
  7873. "name": "workspace",
  7874. "in": "query",
  7875. "schema": {
  7876. "type": "string"
  7877. },
  7878. "required": false
  7879. }
  7880. ],
  7881. "responses": {
  7882. "200": {
  7883. "description": "Successfully deleted part",
  7884. "content": {
  7885. "application/json": {
  7886. "schema": {
  7887. "type": "boolean",
  7888. "description": "Successfully deleted part"
  7889. }
  7890. }
  7891. }
  7892. },
  7893. "400": {
  7894. "description": "BadRequest | InvalidRequestError",
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "anyOf": [
  7899. {
  7900. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7901. },
  7902. {
  7903. "$ref": "#/components/schemas/InvalidRequestError"
  7904. }
  7905. ]
  7906. }
  7907. }
  7908. }
  7909. },
  7910. "404": {
  7911. "description": "NotFoundError",
  7912. "content": {
  7913. "application/json": {
  7914. "schema": {
  7915. "$ref": "#/components/schemas/NotFoundError"
  7916. }
  7917. }
  7918. }
  7919. }
  7920. },
  7921. "description": "Delete a part from a message.",
  7922. "x-codeSamples": [
  7923. {
  7924. "lang": "js",
  7925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7926. }
  7927. ]
  7928. },
  7929. "patch": {
  7930. "tags": ["session"],
  7931. "operationId": "part.update",
  7932. "parameters": [
  7933. {
  7934. "name": "sessionID",
  7935. "in": "path",
  7936. "schema": {
  7937. "type": "string",
  7938. "pattern": "^ses"
  7939. },
  7940. "required": true
  7941. },
  7942. {
  7943. "name": "messageID",
  7944. "in": "path",
  7945. "schema": {
  7946. "type": "string",
  7947. "pattern": "^msg"
  7948. },
  7949. "required": true
  7950. },
  7951. {
  7952. "name": "partID",
  7953. "in": "path",
  7954. "schema": {
  7955. "type": "string",
  7956. "pattern": "^prt"
  7957. },
  7958. "required": true
  7959. },
  7960. {
  7961. "name": "directory",
  7962. "in": "query",
  7963. "schema": {
  7964. "type": "string"
  7965. },
  7966. "required": false
  7967. },
  7968. {
  7969. "name": "workspace",
  7970. "in": "query",
  7971. "schema": {
  7972. "type": "string"
  7973. },
  7974. "required": false
  7975. }
  7976. ],
  7977. "responses": {
  7978. "200": {
  7979. "description": "Successfully updated part",
  7980. "content": {
  7981. "application/json": {
  7982. "schema": {
  7983. "$ref": "#/components/schemas/Part"
  7984. }
  7985. }
  7986. }
  7987. },
  7988. "400": {
  7989. "description": "BadRequest | InvalidRequestError",
  7990. "content": {
  7991. "application/json": {
  7992. "schema": {
  7993. "anyOf": [
  7994. {
  7995. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7996. },
  7997. {
  7998. "$ref": "#/components/schemas/InvalidRequestError"
  7999. }
  8000. ]
  8001. }
  8002. }
  8003. }
  8004. },
  8005. "404": {
  8006. "description": "NotFoundError",
  8007. "content": {
  8008. "application/json": {
  8009. "schema": {
  8010. "$ref": "#/components/schemas/NotFoundError"
  8011. }
  8012. }
  8013. }
  8014. }
  8015. },
  8016. "description": "Update a part in a message.",
  8017. "requestBody": {
  8018. "content": {
  8019. "application/json": {
  8020. "schema": {
  8021. "$ref": "#/components/schemas/Part"
  8022. }
  8023. }
  8024. }
  8025. },
  8026. "x-codeSamples": [
  8027. {
  8028. "lang": "js",
  8029. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8030. }
  8031. ]
  8032. }
  8033. },
  8034. "/sync/start": {
  8035. "post": {
  8036. "tags": ["sync"],
  8037. "operationId": "sync.start",
  8038. "parameters": [
  8039. {
  8040. "name": "directory",
  8041. "in": "query",
  8042. "schema": {
  8043. "type": "string"
  8044. },
  8045. "required": false
  8046. },
  8047. {
  8048. "name": "workspace",
  8049. "in": "query",
  8050. "schema": {
  8051. "type": "string"
  8052. },
  8053. "required": false
  8054. }
  8055. ],
  8056. "responses": {
  8057. "200": {
  8058. "description": "Workspace sync started",
  8059. "content": {
  8060. "application/json": {
  8061. "schema": {
  8062. "type": "boolean",
  8063. "description": "Workspace sync started"
  8064. }
  8065. }
  8066. }
  8067. },
  8068. "400": {
  8069. "description": "Bad request",
  8070. "content": {
  8071. "application/json": {
  8072. "schema": {
  8073. "$ref": "#/components/schemas/BadRequestError"
  8074. }
  8075. }
  8076. }
  8077. }
  8078. },
  8079. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8080. "summary": "Start workspace sync",
  8081. "x-codeSamples": [
  8082. {
  8083. "lang": "js",
  8084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8085. }
  8086. ]
  8087. }
  8088. },
  8089. "/sync/replay": {
  8090. "post": {
  8091. "tags": ["sync"],
  8092. "operationId": "sync.replay",
  8093. "parameters": [
  8094. {
  8095. "name": "directory",
  8096. "in": "query",
  8097. "schema": {
  8098. "type": "string"
  8099. },
  8100. "required": false
  8101. },
  8102. {
  8103. "name": "workspace",
  8104. "in": "query",
  8105. "schema": {
  8106. "type": "string"
  8107. },
  8108. "required": false
  8109. }
  8110. ],
  8111. "responses": {
  8112. "200": {
  8113. "description": "Replayed sync events",
  8114. "content": {
  8115. "application/json": {
  8116. "schema": {
  8117. "type": "object",
  8118. "properties": {
  8119. "sessionID": {
  8120. "type": "string"
  8121. }
  8122. },
  8123. "required": ["sessionID"],
  8124. "additionalProperties": false,
  8125. "description": "Replayed sync events"
  8126. }
  8127. }
  8128. }
  8129. },
  8130. "400": {
  8131. "description": "BadRequest | InvalidRequestError",
  8132. "content": {
  8133. "application/json": {
  8134. "schema": {
  8135. "anyOf": [
  8136. {
  8137. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8138. },
  8139. {
  8140. "$ref": "#/components/schemas/InvalidRequestError"
  8141. }
  8142. ]
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "description": "Validate and replay a complete sync event history.",
  8149. "summary": "Replay sync events",
  8150. "requestBody": {
  8151. "content": {
  8152. "application/json": {
  8153. "schema": {
  8154. "type": "object",
  8155. "properties": {
  8156. "directory": {
  8157. "type": "string"
  8158. },
  8159. "events": {
  8160. "type": "array",
  8161. "minItems": 1,
  8162. "items": {
  8163. "type": "object",
  8164. "properties": {
  8165. "id": {
  8166. "type": "string",
  8167. "pattern": "^evt_"
  8168. },
  8169. "aggregateID": {
  8170. "type": "string"
  8171. },
  8172. "seq": {
  8173. "type": "integer",
  8174. "minimum": 0
  8175. },
  8176. "type": {
  8177. "type": "string"
  8178. },
  8179. "data": {
  8180. "type": "object"
  8181. }
  8182. },
  8183. "required": ["id", "aggregateID", "seq", "type", "data"],
  8184. "additionalProperties": false
  8185. }
  8186. }
  8187. },
  8188. "required": ["directory", "events"],
  8189. "additionalProperties": false
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "x-codeSamples": [
  8195. {
  8196. "lang": "js",
  8197. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8198. }
  8199. ]
  8200. }
  8201. },
  8202. "/sync/steal": {
  8203. "post": {
  8204. "tags": ["sync"],
  8205. "operationId": "sync.steal",
  8206. "parameters": [
  8207. {
  8208. "name": "directory",
  8209. "in": "query",
  8210. "schema": {
  8211. "type": "string"
  8212. },
  8213. "required": false
  8214. },
  8215. {
  8216. "name": "workspace",
  8217. "in": "query",
  8218. "schema": {
  8219. "type": "string"
  8220. },
  8221. "required": false
  8222. }
  8223. ],
  8224. "responses": {
  8225. "200": {
  8226. "description": "Session stolen into workspace",
  8227. "content": {
  8228. "application/json": {
  8229. "schema": {
  8230. "type": "object",
  8231. "properties": {
  8232. "sessionID": {
  8233. "type": "string",
  8234. "pattern": "^ses"
  8235. }
  8236. },
  8237. "required": ["sessionID"],
  8238. "additionalProperties": false,
  8239. "description": "Session stolen into workspace"
  8240. }
  8241. }
  8242. }
  8243. },
  8244. "400": {
  8245. "description": "BadRequest | InvalidRequestError",
  8246. "content": {
  8247. "application/json": {
  8248. "schema": {
  8249. "anyOf": [
  8250. {
  8251. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8252. },
  8253. {
  8254. "$ref": "#/components/schemas/InvalidRequestError"
  8255. }
  8256. ]
  8257. }
  8258. }
  8259. }
  8260. }
  8261. },
  8262. "description": "Update a session to belong to the current workspace through the sync event system.",
  8263. "summary": "Steal session into workspace",
  8264. "requestBody": {
  8265. "content": {
  8266. "application/json": {
  8267. "schema": {
  8268. "type": "object",
  8269. "properties": {
  8270. "sessionID": {
  8271. "type": "string",
  8272. "pattern": "^ses"
  8273. }
  8274. },
  8275. "required": ["sessionID"],
  8276. "additionalProperties": false
  8277. }
  8278. }
  8279. }
  8280. },
  8281. "x-codeSamples": [
  8282. {
  8283. "lang": "js",
  8284. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8285. }
  8286. ]
  8287. }
  8288. },
  8289. "/sync/history": {
  8290. "post": {
  8291. "tags": ["sync"],
  8292. "operationId": "sync.history.list",
  8293. "parameters": [
  8294. {
  8295. "name": "directory",
  8296. "in": "query",
  8297. "schema": {
  8298. "type": "string"
  8299. },
  8300. "required": false
  8301. },
  8302. {
  8303. "name": "workspace",
  8304. "in": "query",
  8305. "schema": {
  8306. "type": "string"
  8307. },
  8308. "required": false
  8309. }
  8310. ],
  8311. "responses": {
  8312. "200": {
  8313. "description": "Sync events",
  8314. "content": {
  8315. "application/json": {
  8316. "schema": {
  8317. "type": "array",
  8318. "items": {
  8319. "type": "object",
  8320. "properties": {
  8321. "id": {
  8322. "type": "string",
  8323. "pattern": "^evt_"
  8324. },
  8325. "aggregate_id": {
  8326. "type": "string"
  8327. },
  8328. "seq": {
  8329. "type": "integer",
  8330. "minimum": 0
  8331. },
  8332. "type": {
  8333. "type": "string"
  8334. },
  8335. "data": {
  8336. "type": "object"
  8337. }
  8338. },
  8339. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8340. "additionalProperties": false
  8341. },
  8342. "description": "Sync events"
  8343. }
  8344. }
  8345. }
  8346. },
  8347. "400": {
  8348. "description": "BadRequest | InvalidRequestError",
  8349. "content": {
  8350. "application/json": {
  8351. "schema": {
  8352. "anyOf": [
  8353. {
  8354. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8355. },
  8356. {
  8357. "$ref": "#/components/schemas/InvalidRequestError"
  8358. }
  8359. ]
  8360. }
  8361. }
  8362. }
  8363. }
  8364. },
  8365. "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.",
  8366. "summary": "List sync events",
  8367. "requestBody": {
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "object",
  8372. "additionalProperties": {
  8373. "type": "integer",
  8374. "minimum": 0
  8375. }
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "x-codeSamples": [
  8381. {
  8382. "lang": "js",
  8383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8384. }
  8385. ]
  8386. }
  8387. },
  8388. "/tui/append-prompt": {
  8389. "post": {
  8390. "tags": ["tui"],
  8391. "operationId": "tui.appendPrompt",
  8392. "parameters": [
  8393. {
  8394. "name": "directory",
  8395. "in": "query",
  8396. "schema": {
  8397. "type": "string"
  8398. },
  8399. "required": false
  8400. },
  8401. {
  8402. "name": "workspace",
  8403. "in": "query",
  8404. "schema": {
  8405. "type": "string"
  8406. },
  8407. "required": false
  8408. }
  8409. ],
  8410. "responses": {
  8411. "200": {
  8412. "description": "Prompt processed successfully",
  8413. "content": {
  8414. "application/json": {
  8415. "schema": {
  8416. "type": "boolean",
  8417. "description": "Prompt processed successfully"
  8418. }
  8419. }
  8420. }
  8421. },
  8422. "400": {
  8423. "description": "BadRequest | InvalidRequestError",
  8424. "content": {
  8425. "application/json": {
  8426. "schema": {
  8427. "anyOf": [
  8428. {
  8429. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8430. },
  8431. {
  8432. "$ref": "#/components/schemas/InvalidRequestError"
  8433. }
  8434. ]
  8435. }
  8436. }
  8437. }
  8438. }
  8439. },
  8440. "description": "Append prompt to the TUI.",
  8441. "summary": "Append TUI prompt",
  8442. "requestBody": {
  8443. "content": {
  8444. "application/json": {
  8445. "schema": {
  8446. "type": "object",
  8447. "properties": {
  8448. "text": {
  8449. "type": "string"
  8450. }
  8451. },
  8452. "required": ["text"],
  8453. "additionalProperties": false
  8454. }
  8455. }
  8456. }
  8457. },
  8458. "x-codeSamples": [
  8459. {
  8460. "lang": "js",
  8461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8462. }
  8463. ]
  8464. }
  8465. },
  8466. "/tui/open-help": {
  8467. "post": {
  8468. "tags": ["tui"],
  8469. "operationId": "tui.openHelp",
  8470. "parameters": [
  8471. {
  8472. "name": "directory",
  8473. "in": "query",
  8474. "schema": {
  8475. "type": "string"
  8476. },
  8477. "required": false
  8478. },
  8479. {
  8480. "name": "workspace",
  8481. "in": "query",
  8482. "schema": {
  8483. "type": "string"
  8484. },
  8485. "required": false
  8486. }
  8487. ],
  8488. "responses": {
  8489. "200": {
  8490. "description": "Help dialog opened successfully",
  8491. "content": {
  8492. "application/json": {
  8493. "schema": {
  8494. "type": "boolean",
  8495. "description": "Help dialog opened successfully"
  8496. }
  8497. }
  8498. }
  8499. },
  8500. "400": {
  8501. "description": "Bad request",
  8502. "content": {
  8503. "application/json": {
  8504. "schema": {
  8505. "$ref": "#/components/schemas/BadRequestError"
  8506. }
  8507. }
  8508. }
  8509. }
  8510. },
  8511. "description": "Open the help dialog in the TUI to display user assistance information.",
  8512. "summary": "Open help dialog",
  8513. "x-codeSamples": [
  8514. {
  8515. "lang": "js",
  8516. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8517. }
  8518. ]
  8519. }
  8520. },
  8521. "/tui/open-sessions": {
  8522. "post": {
  8523. "tags": ["tui"],
  8524. "operationId": "tui.openSessions",
  8525. "parameters": [
  8526. {
  8527. "name": "directory",
  8528. "in": "query",
  8529. "schema": {
  8530. "type": "string"
  8531. },
  8532. "required": false
  8533. },
  8534. {
  8535. "name": "workspace",
  8536. "in": "query",
  8537. "schema": {
  8538. "type": "string"
  8539. },
  8540. "required": false
  8541. }
  8542. ],
  8543. "responses": {
  8544. "200": {
  8545. "description": "Session dialog opened successfully",
  8546. "content": {
  8547. "application/json": {
  8548. "schema": {
  8549. "type": "boolean",
  8550. "description": "Session dialog opened successfully"
  8551. }
  8552. }
  8553. }
  8554. },
  8555. "400": {
  8556. "description": "Bad request",
  8557. "content": {
  8558. "application/json": {
  8559. "schema": {
  8560. "$ref": "#/components/schemas/BadRequestError"
  8561. }
  8562. }
  8563. }
  8564. }
  8565. },
  8566. "description": "Open the session dialog.",
  8567. "summary": "Open sessions dialog",
  8568. "x-codeSamples": [
  8569. {
  8570. "lang": "js",
  8571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8572. }
  8573. ]
  8574. }
  8575. },
  8576. "/tui/open-themes": {
  8577. "post": {
  8578. "tags": ["tui"],
  8579. "operationId": "tui.openThemes",
  8580. "parameters": [
  8581. {
  8582. "name": "directory",
  8583. "in": "query",
  8584. "schema": {
  8585. "type": "string"
  8586. },
  8587. "required": false
  8588. },
  8589. {
  8590. "name": "workspace",
  8591. "in": "query",
  8592. "schema": {
  8593. "type": "string"
  8594. },
  8595. "required": false
  8596. }
  8597. ],
  8598. "responses": {
  8599. "200": {
  8600. "description": "Theme dialog opened successfully",
  8601. "content": {
  8602. "application/json": {
  8603. "schema": {
  8604. "type": "boolean",
  8605. "description": "Theme dialog opened successfully"
  8606. }
  8607. }
  8608. }
  8609. },
  8610. "400": {
  8611. "description": "Bad request",
  8612. "content": {
  8613. "application/json": {
  8614. "schema": {
  8615. "$ref": "#/components/schemas/BadRequestError"
  8616. }
  8617. }
  8618. }
  8619. }
  8620. },
  8621. "description": "Open the theme dialog.",
  8622. "summary": "Open themes dialog",
  8623. "x-codeSamples": [
  8624. {
  8625. "lang": "js",
  8626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8627. }
  8628. ]
  8629. }
  8630. },
  8631. "/tui/open-models": {
  8632. "post": {
  8633. "tags": ["tui"],
  8634. "operationId": "tui.openModels",
  8635. "parameters": [
  8636. {
  8637. "name": "directory",
  8638. "in": "query",
  8639. "schema": {
  8640. "type": "string"
  8641. },
  8642. "required": false
  8643. },
  8644. {
  8645. "name": "workspace",
  8646. "in": "query",
  8647. "schema": {
  8648. "type": "string"
  8649. },
  8650. "required": false
  8651. }
  8652. ],
  8653. "responses": {
  8654. "200": {
  8655. "description": "Model dialog opened successfully",
  8656. "content": {
  8657. "application/json": {
  8658. "schema": {
  8659. "type": "boolean",
  8660. "description": "Model dialog opened successfully"
  8661. }
  8662. }
  8663. }
  8664. },
  8665. "400": {
  8666. "description": "Bad request",
  8667. "content": {
  8668. "application/json": {
  8669. "schema": {
  8670. "$ref": "#/components/schemas/BadRequestError"
  8671. }
  8672. }
  8673. }
  8674. }
  8675. },
  8676. "description": "Open the model dialog.",
  8677. "summary": "Open models dialog",
  8678. "x-codeSamples": [
  8679. {
  8680. "lang": "js",
  8681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8682. }
  8683. ]
  8684. }
  8685. },
  8686. "/tui/submit-prompt": {
  8687. "post": {
  8688. "tags": ["tui"],
  8689. "operationId": "tui.submitPrompt",
  8690. "parameters": [
  8691. {
  8692. "name": "directory",
  8693. "in": "query",
  8694. "schema": {
  8695. "type": "string"
  8696. },
  8697. "required": false
  8698. },
  8699. {
  8700. "name": "workspace",
  8701. "in": "query",
  8702. "schema": {
  8703. "type": "string"
  8704. },
  8705. "required": false
  8706. }
  8707. ],
  8708. "responses": {
  8709. "200": {
  8710. "description": "Prompt submitted successfully",
  8711. "content": {
  8712. "application/json": {
  8713. "schema": {
  8714. "type": "boolean",
  8715. "description": "Prompt submitted successfully"
  8716. }
  8717. }
  8718. }
  8719. },
  8720. "400": {
  8721. "description": "Bad request",
  8722. "content": {
  8723. "application/json": {
  8724. "schema": {
  8725. "$ref": "#/components/schemas/BadRequestError"
  8726. }
  8727. }
  8728. }
  8729. }
  8730. },
  8731. "description": "Submit the prompt.",
  8732. "summary": "Submit TUI prompt",
  8733. "x-codeSamples": [
  8734. {
  8735. "lang": "js",
  8736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8737. }
  8738. ]
  8739. }
  8740. },
  8741. "/tui/clear-prompt": {
  8742. "post": {
  8743. "tags": ["tui"],
  8744. "operationId": "tui.clearPrompt",
  8745. "parameters": [
  8746. {
  8747. "name": "directory",
  8748. "in": "query",
  8749. "schema": {
  8750. "type": "string"
  8751. },
  8752. "required": false
  8753. },
  8754. {
  8755. "name": "workspace",
  8756. "in": "query",
  8757. "schema": {
  8758. "type": "string"
  8759. },
  8760. "required": false
  8761. }
  8762. ],
  8763. "responses": {
  8764. "200": {
  8765. "description": "Prompt cleared successfully",
  8766. "content": {
  8767. "application/json": {
  8768. "schema": {
  8769. "type": "boolean",
  8770. "description": "Prompt cleared successfully"
  8771. }
  8772. }
  8773. }
  8774. },
  8775. "400": {
  8776. "description": "Bad request",
  8777. "content": {
  8778. "application/json": {
  8779. "schema": {
  8780. "$ref": "#/components/schemas/BadRequestError"
  8781. }
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "description": "Clear the prompt.",
  8787. "summary": "Clear TUI prompt",
  8788. "x-codeSamples": [
  8789. {
  8790. "lang": "js",
  8791. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8792. }
  8793. ]
  8794. }
  8795. },
  8796. "/tui/execute-command": {
  8797. "post": {
  8798. "tags": ["tui"],
  8799. "operationId": "tui.executeCommand",
  8800. "parameters": [
  8801. {
  8802. "name": "directory",
  8803. "in": "query",
  8804. "schema": {
  8805. "type": "string"
  8806. },
  8807. "required": false
  8808. },
  8809. {
  8810. "name": "workspace",
  8811. "in": "query",
  8812. "schema": {
  8813. "type": "string"
  8814. },
  8815. "required": false
  8816. }
  8817. ],
  8818. "responses": {
  8819. "200": {
  8820. "description": "Command executed successfully",
  8821. "content": {
  8822. "application/json": {
  8823. "schema": {
  8824. "type": "boolean",
  8825. "description": "Command executed successfully"
  8826. }
  8827. }
  8828. }
  8829. },
  8830. "400": {
  8831. "description": "BadRequest | InvalidRequestError",
  8832. "content": {
  8833. "application/json": {
  8834. "schema": {
  8835. "anyOf": [
  8836. {
  8837. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8838. },
  8839. {
  8840. "$ref": "#/components/schemas/InvalidRequestError"
  8841. }
  8842. ]
  8843. }
  8844. }
  8845. }
  8846. }
  8847. },
  8848. "description": "Execute a TUI command.",
  8849. "summary": "Execute TUI command",
  8850. "requestBody": {
  8851. "content": {
  8852. "application/json": {
  8853. "schema": {
  8854. "type": "object",
  8855. "properties": {
  8856. "command": {
  8857. "type": "string"
  8858. }
  8859. },
  8860. "required": ["command"],
  8861. "additionalProperties": false
  8862. }
  8863. }
  8864. }
  8865. },
  8866. "x-codeSamples": [
  8867. {
  8868. "lang": "js",
  8869. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8870. }
  8871. ]
  8872. }
  8873. },
  8874. "/tui/show-toast": {
  8875. "post": {
  8876. "tags": ["tui"],
  8877. "operationId": "tui.showToast",
  8878. "parameters": [
  8879. {
  8880. "name": "directory",
  8881. "in": "query",
  8882. "schema": {
  8883. "type": "string"
  8884. },
  8885. "required": false
  8886. },
  8887. {
  8888. "name": "workspace",
  8889. "in": "query",
  8890. "schema": {
  8891. "type": "string"
  8892. },
  8893. "required": false
  8894. }
  8895. ],
  8896. "responses": {
  8897. "200": {
  8898. "description": "Toast notification shown successfully",
  8899. "content": {
  8900. "application/json": {
  8901. "schema": {
  8902. "type": "boolean",
  8903. "description": "Toast notification shown successfully"
  8904. }
  8905. }
  8906. }
  8907. },
  8908. "400": {
  8909. "description": "Bad request",
  8910. "content": {
  8911. "application/json": {
  8912. "schema": {
  8913. "$ref": "#/components/schemas/BadRequestError"
  8914. }
  8915. }
  8916. }
  8917. }
  8918. },
  8919. "description": "Show a toast notification in the TUI.",
  8920. "summary": "Show TUI toast",
  8921. "requestBody": {
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "object",
  8926. "properties": {
  8927. "title": {
  8928. "type": "string"
  8929. },
  8930. "message": {
  8931. "type": "string"
  8932. },
  8933. "variant": {
  8934. "type": "string",
  8935. "enum": ["info", "success", "warning", "error"]
  8936. },
  8937. "duration": {
  8938. "type": "integer",
  8939. "exclusiveMinimum": 0
  8940. }
  8941. },
  8942. "required": ["message", "variant"],
  8943. "additionalProperties": false
  8944. }
  8945. }
  8946. }
  8947. },
  8948. "x-codeSamples": [
  8949. {
  8950. "lang": "js",
  8951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8952. }
  8953. ]
  8954. }
  8955. },
  8956. "/tui/publish": {
  8957. "post": {
  8958. "tags": ["tui"],
  8959. "operationId": "tui.publish",
  8960. "parameters": [
  8961. {
  8962. "name": "directory",
  8963. "in": "query",
  8964. "schema": {
  8965. "type": "string"
  8966. },
  8967. "required": false
  8968. },
  8969. {
  8970. "name": "workspace",
  8971. "in": "query",
  8972. "schema": {
  8973. "type": "string"
  8974. },
  8975. "required": false
  8976. }
  8977. ],
  8978. "responses": {
  8979. "200": {
  8980. "description": "Event published successfully",
  8981. "content": {
  8982. "application/json": {
  8983. "schema": {
  8984. "type": "boolean",
  8985. "description": "Event published successfully"
  8986. }
  8987. }
  8988. }
  8989. },
  8990. "400": {
  8991. "description": "BadRequest | InvalidRequestError",
  8992. "content": {
  8993. "application/json": {
  8994. "schema": {
  8995. "anyOf": [
  8996. {
  8997. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8998. },
  8999. {
  9000. "$ref": "#/components/schemas/InvalidRequestError"
  9001. }
  9002. ]
  9003. }
  9004. }
  9005. }
  9006. }
  9007. },
  9008. "description": "Publish a TUI event.",
  9009. "summary": "Publish TUI event",
  9010. "requestBody": {
  9011. "content": {
  9012. "application/json": {
  9013. "schema": {
  9014. "anyOf": [
  9015. {
  9016. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9017. },
  9018. {
  9019. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9020. },
  9021. {
  9022. "$ref": "#/components/schemas/EventTuiToastShow"
  9023. },
  9024. {
  9025. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9026. }
  9027. ]
  9028. }
  9029. }
  9030. }
  9031. },
  9032. "x-codeSamples": [
  9033. {
  9034. "lang": "js",
  9035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9036. }
  9037. ]
  9038. }
  9039. },
  9040. "/tui/select-session": {
  9041. "post": {
  9042. "tags": ["tui"],
  9043. "operationId": "tui.selectSession",
  9044. "parameters": [
  9045. {
  9046. "name": "directory",
  9047. "in": "query",
  9048. "schema": {
  9049. "type": "string"
  9050. },
  9051. "required": false
  9052. },
  9053. {
  9054. "name": "workspace",
  9055. "in": "query",
  9056. "schema": {
  9057. "type": "string"
  9058. },
  9059. "required": false
  9060. }
  9061. ],
  9062. "responses": {
  9063. "200": {
  9064. "description": "Session selected successfully",
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "type": "boolean",
  9069. "description": "Session selected successfully"
  9070. }
  9071. }
  9072. }
  9073. },
  9074. "400": {
  9075. "description": "BadRequest | InvalidRequestError",
  9076. "content": {
  9077. "application/json": {
  9078. "schema": {
  9079. "anyOf": [
  9080. {
  9081. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9082. },
  9083. {
  9084. "$ref": "#/components/schemas/InvalidRequestError"
  9085. }
  9086. ]
  9087. }
  9088. }
  9089. }
  9090. },
  9091. "404": {
  9092. "description": "NotFoundError",
  9093. "content": {
  9094. "application/json": {
  9095. "schema": {
  9096. "$ref": "#/components/schemas/NotFoundError"
  9097. }
  9098. }
  9099. }
  9100. }
  9101. },
  9102. "description": "Navigate the TUI to display the specified session.",
  9103. "summary": "Select session",
  9104. "requestBody": {
  9105. "content": {
  9106. "application/json": {
  9107. "schema": {
  9108. "type": "object",
  9109. "properties": {
  9110. "sessionID": {
  9111. "type": "string",
  9112. "pattern": "^ses",
  9113. "description": "Session ID to navigate to"
  9114. }
  9115. },
  9116. "required": ["sessionID"],
  9117. "additionalProperties": false
  9118. }
  9119. }
  9120. }
  9121. },
  9122. "x-codeSamples": [
  9123. {
  9124. "lang": "js",
  9125. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9126. }
  9127. ]
  9128. }
  9129. },
  9130. "/tui/control/next": {
  9131. "get": {
  9132. "tags": ["tui"],
  9133. "operationId": "tui.control.next",
  9134. "parameters": [
  9135. {
  9136. "name": "directory",
  9137. "in": "query",
  9138. "schema": {
  9139. "type": "string"
  9140. },
  9141. "required": false
  9142. },
  9143. {
  9144. "name": "workspace",
  9145. "in": "query",
  9146. "schema": {
  9147. "type": "string"
  9148. },
  9149. "required": false
  9150. }
  9151. ],
  9152. "responses": {
  9153. "200": {
  9154. "description": "Next TUI request",
  9155. "content": {
  9156. "application/json": {
  9157. "schema": {
  9158. "type": "object",
  9159. "properties": {
  9160. "path": {
  9161. "type": "string"
  9162. },
  9163. "body": {}
  9164. },
  9165. "required": ["path", "body"],
  9166. "additionalProperties": false,
  9167. "description": "Next TUI request"
  9168. }
  9169. }
  9170. }
  9171. },
  9172. "400": {
  9173. "description": "Bad request",
  9174. "content": {
  9175. "application/json": {
  9176. "schema": {
  9177. "$ref": "#/components/schemas/BadRequestError"
  9178. }
  9179. }
  9180. }
  9181. }
  9182. },
  9183. "description": "Retrieve the next TUI request from the queue for processing.",
  9184. "summary": "Get next TUI request",
  9185. "x-codeSamples": [
  9186. {
  9187. "lang": "js",
  9188. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9189. }
  9190. ]
  9191. }
  9192. },
  9193. "/tui/control/response": {
  9194. "post": {
  9195. "tags": ["tui"],
  9196. "operationId": "tui.control.response",
  9197. "parameters": [
  9198. {
  9199. "name": "directory",
  9200. "in": "query",
  9201. "schema": {
  9202. "type": "string"
  9203. },
  9204. "required": false
  9205. },
  9206. {
  9207. "name": "workspace",
  9208. "in": "query",
  9209. "schema": {
  9210. "type": "string"
  9211. },
  9212. "required": false
  9213. }
  9214. ],
  9215. "responses": {
  9216. "200": {
  9217. "description": "Response submitted successfully",
  9218. "content": {
  9219. "application/json": {
  9220. "schema": {
  9221. "type": "boolean",
  9222. "description": "Response submitted successfully"
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "400": {
  9228. "description": "Bad request",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/BadRequestError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9239. "summary": "Submit TUI response",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {}
  9244. }
  9245. }
  9246. },
  9247. "x-codeSamples": [
  9248. {
  9249. "lang": "js",
  9250. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9251. }
  9252. ]
  9253. }
  9254. },
  9255. "/experimental/workspace/adapter": {
  9256. "get": {
  9257. "tags": ["workspace"],
  9258. "operationId": "experimental.workspace.adapter.list",
  9259. "parameters": [
  9260. {
  9261. "name": "directory",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. },
  9268. {
  9269. "name": "workspace",
  9270. "in": "query",
  9271. "schema": {
  9272. "type": "string"
  9273. },
  9274. "required": false
  9275. }
  9276. ],
  9277. "responses": {
  9278. "200": {
  9279. "description": "Workspace adapters",
  9280. "content": {
  9281. "application/json": {
  9282. "schema": {
  9283. "type": "array",
  9284. "items": {
  9285. "type": "object",
  9286. "properties": {
  9287. "type": {
  9288. "type": "string"
  9289. },
  9290. "name": {
  9291. "type": "string"
  9292. },
  9293. "description": {
  9294. "type": "string"
  9295. }
  9296. },
  9297. "required": ["type", "name", "description"],
  9298. "additionalProperties": false
  9299. },
  9300. "description": "Workspace adapters"
  9301. }
  9302. }
  9303. }
  9304. },
  9305. "400": {
  9306. "description": "Bad request",
  9307. "content": {
  9308. "application/json": {
  9309. "schema": {
  9310. "$ref": "#/components/schemas/BadRequestError"
  9311. }
  9312. }
  9313. }
  9314. }
  9315. },
  9316. "description": "List all available workspace adapters for the current project.",
  9317. "summary": "List workspace adapters",
  9318. "x-codeSamples": [
  9319. {
  9320. "lang": "js",
  9321. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9322. }
  9323. ]
  9324. }
  9325. },
  9326. "/experimental/workspace": {
  9327. "get": {
  9328. "tags": ["workspace"],
  9329. "operationId": "experimental.workspace.list",
  9330. "parameters": [
  9331. {
  9332. "name": "directory",
  9333. "in": "query",
  9334. "schema": {
  9335. "type": "string"
  9336. },
  9337. "required": false
  9338. },
  9339. {
  9340. "name": "workspace",
  9341. "in": "query",
  9342. "schema": {
  9343. "type": "string"
  9344. },
  9345. "required": false
  9346. }
  9347. ],
  9348. "responses": {
  9349. "200": {
  9350. "description": "Workspaces",
  9351. "content": {
  9352. "application/json": {
  9353. "schema": {
  9354. "type": "array",
  9355. "items": {
  9356. "$ref": "#/components/schemas/Workspace"
  9357. },
  9358. "description": "Workspaces"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "List all workspaces.",
  9375. "summary": "List workspaces",
  9376. "x-codeSamples": [
  9377. {
  9378. "lang": "js",
  9379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9380. }
  9381. ]
  9382. },
  9383. "post": {
  9384. "tags": ["workspace"],
  9385. "operationId": "experimental.workspace.create",
  9386. "parameters": [
  9387. {
  9388. "name": "directory",
  9389. "in": "query",
  9390. "schema": {
  9391. "type": "string"
  9392. },
  9393. "required": false
  9394. },
  9395. {
  9396. "name": "workspace",
  9397. "in": "query",
  9398. "schema": {
  9399. "type": "string"
  9400. },
  9401. "required": false
  9402. }
  9403. ],
  9404. "responses": {
  9405. "200": {
  9406. "description": "Workspace created",
  9407. "content": {
  9408. "application/json": {
  9409. "schema": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. }
  9412. }
  9413. }
  9414. },
  9415. "400": {
  9416. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9417. "content": {
  9418. "application/json": {
  9419. "schema": {
  9420. "anyOf": [
  9421. {
  9422. "$ref": "#/components/schemas/WorkspaceCreateError"
  9423. },
  9424. {
  9425. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9426. },
  9427. {
  9428. "$ref": "#/components/schemas/InvalidRequestError"
  9429. }
  9430. ]
  9431. }
  9432. }
  9433. }
  9434. }
  9435. },
  9436. "description": "Create a workspace for the current project.",
  9437. "summary": "Create workspace",
  9438. "requestBody": {
  9439. "content": {
  9440. "application/json": {
  9441. "schema": {
  9442. "type": "object",
  9443. "properties": {
  9444. "id": {
  9445. "type": "string",
  9446. "pattern": "^wrk"
  9447. },
  9448. "type": {
  9449. "type": "string"
  9450. },
  9451. "branch": {
  9452. "anyOf": [
  9453. {
  9454. "type": "string"
  9455. },
  9456. {
  9457. "type": "null"
  9458. }
  9459. ]
  9460. },
  9461. "extra": {
  9462. "anyOf": [
  9463. {},
  9464. {
  9465. "type": "null"
  9466. }
  9467. ]
  9468. }
  9469. },
  9470. "required": ["type"],
  9471. "additionalProperties": false
  9472. }
  9473. }
  9474. }
  9475. },
  9476. "x-codeSamples": [
  9477. {
  9478. "lang": "js",
  9479. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9480. }
  9481. ]
  9482. }
  9483. },
  9484. "/experimental/workspace/sync-list": {
  9485. "post": {
  9486. "tags": ["workspace"],
  9487. "operationId": "experimental.workspace.syncList",
  9488. "parameters": [
  9489. {
  9490. "name": "directory",
  9491. "in": "query",
  9492. "schema": {
  9493. "type": "string"
  9494. },
  9495. "required": false
  9496. },
  9497. {
  9498. "name": "workspace",
  9499. "in": "query",
  9500. "schema": {
  9501. "type": "string"
  9502. },
  9503. "required": false
  9504. }
  9505. ],
  9506. "responses": {
  9507. "204": {
  9508. "description": "Workspace list synced"
  9509. },
  9510. "400": {
  9511. "description": "Bad request",
  9512. "content": {
  9513. "application/json": {
  9514. "schema": {
  9515. "$ref": "#/components/schemas/BadRequestError"
  9516. }
  9517. }
  9518. }
  9519. }
  9520. },
  9521. "description": "Register missing workspaces returned by workspace adapters.",
  9522. "summary": "Sync workspace list",
  9523. "x-codeSamples": [
  9524. {
  9525. "lang": "js",
  9526. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9527. }
  9528. ]
  9529. }
  9530. },
  9531. "/experimental/workspace/status": {
  9532. "get": {
  9533. "tags": ["workspace"],
  9534. "operationId": "experimental.workspace.status",
  9535. "parameters": [
  9536. {
  9537. "name": "directory",
  9538. "in": "query",
  9539. "schema": {
  9540. "type": "string"
  9541. },
  9542. "required": false
  9543. },
  9544. {
  9545. "name": "workspace",
  9546. "in": "query",
  9547. "schema": {
  9548. "type": "string"
  9549. },
  9550. "required": false
  9551. }
  9552. ],
  9553. "responses": {
  9554. "200": {
  9555. "description": "Workspace status",
  9556. "content": {
  9557. "application/json": {
  9558. "schema": {
  9559. "type": "array",
  9560. "items": {
  9561. "type": "object",
  9562. "properties": {
  9563. "workspaceID": {
  9564. "type": "string",
  9565. "pattern": "^wrk"
  9566. },
  9567. "status": {
  9568. "type": "string",
  9569. "enum": ["connected", "connecting", "disconnected", "error"]
  9570. }
  9571. },
  9572. "required": ["workspaceID", "status"],
  9573. "additionalProperties": false
  9574. },
  9575. "description": "Workspace status"
  9576. }
  9577. }
  9578. }
  9579. },
  9580. "400": {
  9581. "description": "Bad request",
  9582. "content": {
  9583. "application/json": {
  9584. "schema": {
  9585. "$ref": "#/components/schemas/BadRequestError"
  9586. }
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "description": "Get connection status for workspaces in the current project.",
  9592. "summary": "Workspace status",
  9593. "x-codeSamples": [
  9594. {
  9595. "lang": "js",
  9596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9597. }
  9598. ]
  9599. }
  9600. },
  9601. "/experimental/workspace/{id}": {
  9602. "delete": {
  9603. "tags": ["workspace"],
  9604. "operationId": "experimental.workspace.remove",
  9605. "parameters": [
  9606. {
  9607. "name": "id",
  9608. "in": "path",
  9609. "schema": {
  9610. "type": "string",
  9611. "pattern": "^wrk"
  9612. },
  9613. "required": true
  9614. },
  9615. {
  9616. "name": "directory",
  9617. "in": "query",
  9618. "schema": {
  9619. "type": "string"
  9620. },
  9621. "required": false
  9622. },
  9623. {
  9624. "name": "workspace",
  9625. "in": "query",
  9626. "schema": {
  9627. "type": "string"
  9628. },
  9629. "required": false
  9630. }
  9631. ],
  9632. "responses": {
  9633. "200": {
  9634. "description": "Workspace removed",
  9635. "content": {
  9636. "application/json": {
  9637. "schema": {
  9638. "$ref": "#/components/schemas/Workspace"
  9639. }
  9640. }
  9641. }
  9642. },
  9643. "400": {
  9644. "description": "BadRequest | InvalidRequestError",
  9645. "content": {
  9646. "application/json": {
  9647. "schema": {
  9648. "anyOf": [
  9649. {
  9650. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/InvalidRequestError"
  9654. }
  9655. ]
  9656. }
  9657. }
  9658. }
  9659. }
  9660. },
  9661. "description": "Remove an existing workspace.",
  9662. "summary": "Remove workspace",
  9663. "x-codeSamples": [
  9664. {
  9665. "lang": "js",
  9666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9667. }
  9668. ]
  9669. }
  9670. },
  9671. "/experimental/workspace/warp": {
  9672. "post": {
  9673. "tags": ["workspace"],
  9674. "operationId": "experimental.workspace.warp",
  9675. "parameters": [
  9676. {
  9677. "name": "directory",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. },
  9684. {
  9685. "name": "workspace",
  9686. "in": "query",
  9687. "schema": {
  9688. "type": "string"
  9689. },
  9690. "required": false
  9691. }
  9692. ],
  9693. "responses": {
  9694. "204": {
  9695. "description": "Session warped"
  9696. },
  9697. "400": {
  9698. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/WorkspaceWarpError"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/VcsApplyError"
  9708. },
  9709. {
  9710. "$ref": "#/components/schemas/InvalidRequestError"
  9711. }
  9712. ]
  9713. }
  9714. }
  9715. }
  9716. },
  9717. "404": {
  9718. "description": "NotFoundError",
  9719. "content": {
  9720. "application/json": {
  9721. "schema": {
  9722. "$ref": "#/components/schemas/NotFoundError"
  9723. }
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9729. "summary": "Warp session into workspace",
  9730. "requestBody": {
  9731. "content": {
  9732. "application/json": {
  9733. "schema": {
  9734. "type": "object",
  9735. "properties": {
  9736. "id": {
  9737. "anyOf": [
  9738. {
  9739. "type": "string",
  9740. "pattern": "^wrk"
  9741. },
  9742. {
  9743. "type": "null"
  9744. }
  9745. ]
  9746. },
  9747. "sessionID": {
  9748. "type": "string",
  9749. "pattern": "^ses"
  9750. },
  9751. "copyChanges": {
  9752. "type": "boolean"
  9753. }
  9754. },
  9755. "required": ["id", "sessionID"],
  9756. "additionalProperties": false
  9757. }
  9758. }
  9759. }
  9760. },
  9761. "x-codeSamples": [
  9762. {
  9763. "lang": "js",
  9764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9765. }
  9766. ]
  9767. }
  9768. },
  9769. "/api/health": {
  9770. "get": {
  9771. "tags": ["opencode HttpApi"],
  9772. "operationId": "v2.health.get",
  9773. "parameters": [],
  9774. "security": [],
  9775. "responses": {
  9776. "200": {
  9777. "description": "Success",
  9778. "content": {
  9779. "application/json": {
  9780. "schema": {
  9781. "type": "object",
  9782. "properties": {
  9783. "healthy": {
  9784. "type": "boolean",
  9785. "enum": [true]
  9786. }
  9787. },
  9788. "required": ["healthy"],
  9789. "additionalProperties": false
  9790. }
  9791. }
  9792. }
  9793. },
  9794. "400": {
  9795. "description": "InvalidRequestError",
  9796. "content": {
  9797. "application/json": {
  9798. "schema": {
  9799. "$ref": "#/components/schemas/InvalidRequestError"
  9800. }
  9801. }
  9802. }
  9803. },
  9804. "401": {
  9805. "description": "UnauthorizedError",
  9806. "content": {
  9807. "application/json": {
  9808. "schema": {
  9809. "$ref": "#/components/schemas/UnauthorizedError"
  9810. }
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "description": "Check whether the API server is ready to accept requests.",
  9816. "summary": "Check server health",
  9817. "x-codeSamples": [
  9818. {
  9819. "lang": "js",
  9820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9821. }
  9822. ]
  9823. }
  9824. },
  9825. "/api/location": {
  9826. "get": {
  9827. "tags": ["opencode HttpApi"],
  9828. "operationId": "v2.location.get",
  9829. "parameters": [
  9830. {
  9831. "name": "location",
  9832. "in": "query",
  9833. "schema": {
  9834. "type": "object",
  9835. "properties": {
  9836. "directory": {
  9837. "type": "string"
  9838. },
  9839. "workspace": {
  9840. "type": "string"
  9841. }
  9842. },
  9843. "additionalProperties": false
  9844. },
  9845. "required": false,
  9846. "style": "deepObject",
  9847. "explode": true
  9848. }
  9849. ],
  9850. "security": [],
  9851. "responses": {
  9852. "200": {
  9853. "description": "Location.Info",
  9854. "content": {
  9855. "application/json": {
  9856. "schema": {
  9857. "$ref": "#/components/schemas/LocationInfo"
  9858. }
  9859. }
  9860. }
  9861. },
  9862. "400": {
  9863. "description": "InvalidRequestError",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "$ref": "#/components/schemas/InvalidRequestError"
  9868. }
  9869. }
  9870. }
  9871. },
  9872. "401": {
  9873. "description": "UnauthorizedError",
  9874. "content": {
  9875. "application/json": {
  9876. "schema": {
  9877. "$ref": "#/components/schemas/UnauthorizedError"
  9878. }
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "description": "Resolve the requested location or the server default location.",
  9884. "summary": "Get location",
  9885. "x-codeSamples": [
  9886. {
  9887. "lang": "js",
  9888. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9889. }
  9890. ]
  9891. }
  9892. },
  9893. "/api/agent": {
  9894. "get": {
  9895. "tags": ["opencode HttpApi"],
  9896. "operationId": "v2.agent.list",
  9897. "parameters": [
  9898. {
  9899. "name": "location",
  9900. "in": "query",
  9901. "schema": {
  9902. "type": "object",
  9903. "properties": {
  9904. "directory": {
  9905. "type": "string"
  9906. },
  9907. "workspace": {
  9908. "type": "string"
  9909. }
  9910. },
  9911. "additionalProperties": false
  9912. },
  9913. "required": false,
  9914. "style": "deepObject",
  9915. "explode": true
  9916. }
  9917. ],
  9918. "security": [],
  9919. "responses": {
  9920. "200": {
  9921. "description": "Success",
  9922. "content": {
  9923. "application/json": {
  9924. "schema": {
  9925. "type": "object",
  9926. "properties": {
  9927. "location": {
  9928. "$ref": "#/components/schemas/LocationInfo"
  9929. },
  9930. "data": {
  9931. "type": "array",
  9932. "items": {
  9933. "$ref": "#/components/schemas/AgentV2Info"
  9934. }
  9935. }
  9936. },
  9937. "required": ["location", "data"],
  9938. "additionalProperties": false
  9939. }
  9940. }
  9941. }
  9942. },
  9943. "400": {
  9944. "description": "InvalidRequestError",
  9945. "content": {
  9946. "application/json": {
  9947. "schema": {
  9948. "$ref": "#/components/schemas/InvalidRequestError"
  9949. }
  9950. }
  9951. }
  9952. },
  9953. "401": {
  9954. "description": "UnauthorizedError",
  9955. "content": {
  9956. "application/json": {
  9957. "schema": {
  9958. "$ref": "#/components/schemas/UnauthorizedError"
  9959. }
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "description": "Retrieve currently registered agents.",
  9965. "summary": "List agents",
  9966. "x-codeSamples": [
  9967. {
  9968. "lang": "js",
  9969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9970. }
  9971. ]
  9972. }
  9973. },
  9974. "/api/session": {
  9975. "get": {
  9976. "tags": ["sessions"],
  9977. "operationId": "v2.session.list",
  9978. "parameters": [
  9979. {
  9980. "name": "workspace",
  9981. "in": "query",
  9982. "schema": {
  9983. "type": "string",
  9984. "pattern": "^wrk"
  9985. },
  9986. "required": false
  9987. },
  9988. {
  9989. "name": "limit",
  9990. "in": "query",
  9991. "schema": {
  9992. "type": "number"
  9993. },
  9994. "required": false
  9995. },
  9996. {
  9997. "name": "order",
  9998. "in": "query",
  9999. "schema": {
  10000. "type": "string",
  10001. "enum": ["asc", "desc"]
  10002. },
  10003. "required": false
  10004. },
  10005. {
  10006. "name": "search",
  10007. "in": "query",
  10008. "schema": {
  10009. "type": "string"
  10010. },
  10011. "required": false
  10012. },
  10013. {
  10014. "name": "directory",
  10015. "in": "query",
  10016. "schema": {
  10017. "type": "string"
  10018. },
  10019. "required": false
  10020. },
  10021. {
  10022. "name": "project",
  10023. "in": "query",
  10024. "schema": {
  10025. "type": "string"
  10026. },
  10027. "required": false
  10028. },
  10029. {
  10030. "name": "subpath",
  10031. "in": "query",
  10032. "schema": {
  10033. "type": "string"
  10034. },
  10035. "required": false
  10036. },
  10037. {
  10038. "name": "cursor",
  10039. "in": "query",
  10040. "schema": {
  10041. "type": "string",
  10042. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10043. },
  10044. "required": false
  10045. }
  10046. ],
  10047. "security": [],
  10048. "responses": {
  10049. "200": {
  10050. "description": "SessionsResponse",
  10051. "content": {
  10052. "application/json": {
  10053. "schema": {
  10054. "$ref": "#/components/schemas/SessionsResponse"
  10055. }
  10056. }
  10057. }
  10058. },
  10059. "400": {
  10060. "description": "InvalidCursorError | InvalidRequestError",
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "anyOf": [
  10065. {
  10066. "$ref": "#/components/schemas/InvalidCursorError"
  10067. },
  10068. {
  10069. "$ref": "#/components/schemas/InvalidRequestError"
  10070. },
  10071. {
  10072. "$ref": "#/components/schemas/InvalidRequestError"
  10073. }
  10074. ]
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "401": {
  10080. "description": "UnauthorizedError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/UnauthorizedError"
  10085. }
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "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.",
  10091. "summary": "List sessions",
  10092. "x-codeSamples": [
  10093. {
  10094. "lang": "js",
  10095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10096. }
  10097. ]
  10098. },
  10099. "post": {
  10100. "tags": ["sessions"],
  10101. "operationId": "v2.session.create",
  10102. "parameters": [],
  10103. "security": [],
  10104. "responses": {
  10105. "200": {
  10106. "description": "Success",
  10107. "content": {
  10108. "application/json": {
  10109. "schema": {
  10110. "type": "object",
  10111. "properties": {
  10112. "data": {
  10113. "$ref": "#/components/schemas/SessionV2Info"
  10114. }
  10115. },
  10116. "required": ["data"],
  10117. "additionalProperties": false
  10118. }
  10119. }
  10120. }
  10121. },
  10122. "400": {
  10123. "description": "InvalidRequestError",
  10124. "content": {
  10125. "application/json": {
  10126. "schema": {
  10127. "$ref": "#/components/schemas/InvalidRequestError"
  10128. }
  10129. }
  10130. }
  10131. },
  10132. "401": {
  10133. "description": "UnauthorizedError",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "$ref": "#/components/schemas/UnauthorizedError"
  10138. }
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "description": "Create a session at the requested location.",
  10144. "summary": "Create session",
  10145. "requestBody": {
  10146. "content": {
  10147. "application/json": {
  10148. "schema": {
  10149. "type": "object",
  10150. "properties": {
  10151. "id": {
  10152. "type": "string",
  10153. "pattern": "^ses"
  10154. },
  10155. "agent": {
  10156. "type": "string"
  10157. },
  10158. "model": {
  10159. "type": "object",
  10160. "properties": {
  10161. "id": {
  10162. "type": "string"
  10163. },
  10164. "providerID": {
  10165. "type": "string"
  10166. },
  10167. "variant": {
  10168. "type": "string"
  10169. }
  10170. },
  10171. "required": ["id", "providerID"],
  10172. "additionalProperties": false
  10173. },
  10174. "location": {
  10175. "$ref": "#/components/schemas/LocationRef"
  10176. }
  10177. },
  10178. "additionalProperties": false
  10179. }
  10180. }
  10181. },
  10182. "required": true
  10183. },
  10184. "x-codeSamples": [
  10185. {
  10186. "lang": "js",
  10187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10188. }
  10189. ]
  10190. }
  10191. },
  10192. "/api/session/{sessionID}": {
  10193. "get": {
  10194. "tags": ["sessions"],
  10195. "operationId": "v2.session.get",
  10196. "parameters": [
  10197. {
  10198. "name": "sessionID",
  10199. "in": "path",
  10200. "schema": {
  10201. "type": "string",
  10202. "pattern": "^ses"
  10203. },
  10204. "required": true
  10205. }
  10206. ],
  10207. "security": [],
  10208. "responses": {
  10209. "200": {
  10210. "description": "Success",
  10211. "content": {
  10212. "application/json": {
  10213. "schema": {
  10214. "type": "object",
  10215. "properties": {
  10216. "data": {
  10217. "$ref": "#/components/schemas/SessionV2Info"
  10218. }
  10219. },
  10220. "required": ["data"],
  10221. "additionalProperties": false
  10222. }
  10223. }
  10224. }
  10225. },
  10226. "400": {
  10227. "description": "InvalidRequestError",
  10228. "content": {
  10229. "application/json": {
  10230. "schema": {
  10231. "$ref": "#/components/schemas/InvalidRequestError"
  10232. }
  10233. }
  10234. }
  10235. },
  10236. "401": {
  10237. "description": "UnauthorizedError",
  10238. "content": {
  10239. "application/json": {
  10240. "schema": {
  10241. "$ref": "#/components/schemas/UnauthorizedError"
  10242. }
  10243. }
  10244. }
  10245. },
  10246. "404": {
  10247. "description": "SessionNotFoundError",
  10248. "content": {
  10249. "application/json": {
  10250. "schema": {
  10251. "anyOf": [
  10252. {
  10253. "$ref": "#/components/schemas/SessionNotFoundError"
  10254. },
  10255. {
  10256. "$ref": "#/components/schemas/SessionNotFoundError"
  10257. }
  10258. ]
  10259. }
  10260. }
  10261. }
  10262. }
  10263. },
  10264. "description": "Retrieve a session by ID.",
  10265. "summary": "Get session",
  10266. "x-codeSamples": [
  10267. {
  10268. "lang": "js",
  10269. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10270. }
  10271. ]
  10272. }
  10273. },
  10274. "/api/session/{sessionID}/prompt": {
  10275. "post": {
  10276. "tags": ["sessions"],
  10277. "operationId": "v2.session.prompt",
  10278. "parameters": [
  10279. {
  10280. "name": "sessionID",
  10281. "in": "path",
  10282. "schema": {
  10283. "type": "string",
  10284. "pattern": "^ses"
  10285. },
  10286. "required": true
  10287. }
  10288. ],
  10289. "security": [],
  10290. "responses": {
  10291. "200": {
  10292. "description": "Success",
  10293. "content": {
  10294. "application/json": {
  10295. "schema": {
  10296. "type": "object",
  10297. "properties": {
  10298. "data": {
  10299. "$ref": "#/components/schemas/SessionInputAdmitted"
  10300. }
  10301. },
  10302. "required": ["data"],
  10303. "additionalProperties": false
  10304. }
  10305. }
  10306. }
  10307. },
  10308. "400": {
  10309. "description": "InvalidRequestError",
  10310. "content": {
  10311. "application/json": {
  10312. "schema": {
  10313. "$ref": "#/components/schemas/InvalidRequestError"
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "401": {
  10319. "description": "UnauthorizedError",
  10320. "content": {
  10321. "application/json": {
  10322. "schema": {
  10323. "$ref": "#/components/schemas/UnauthorizedError"
  10324. }
  10325. }
  10326. }
  10327. },
  10328. "404": {
  10329. "description": "SessionNotFoundError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/SessionNotFoundError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/SessionNotFoundError"
  10339. }
  10340. ]
  10341. }
  10342. }
  10343. }
  10344. },
  10345. "409": {
  10346. "description": "ConflictError",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "$ref": "#/components/schemas/ConflictError"
  10351. }
  10352. }
  10353. }
  10354. }
  10355. },
  10356. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10357. "summary": "Send message",
  10358. "requestBody": {
  10359. "content": {
  10360. "application/json": {
  10361. "schema": {
  10362. "type": "object",
  10363. "properties": {
  10364. "id": {
  10365. "type": "string",
  10366. "pattern": "^msg_"
  10367. },
  10368. "prompt": {
  10369. "$ref": "#/components/schemas/Prompt"
  10370. },
  10371. "delivery": {
  10372. "type": "string",
  10373. "enum": ["steer", "queue"]
  10374. },
  10375. "resume": {
  10376. "type": "boolean"
  10377. }
  10378. },
  10379. "required": ["prompt"],
  10380. "additionalProperties": false
  10381. }
  10382. }
  10383. },
  10384. "required": true
  10385. },
  10386. "x-codeSamples": [
  10387. {
  10388. "lang": "js",
  10389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10390. }
  10391. ]
  10392. }
  10393. },
  10394. "/api/session/{sessionID}/compact": {
  10395. "post": {
  10396. "tags": ["sessions"],
  10397. "operationId": "v2.session.compact",
  10398. "parameters": [
  10399. {
  10400. "name": "sessionID",
  10401. "in": "path",
  10402. "schema": {
  10403. "type": "string",
  10404. "pattern": "^ses"
  10405. },
  10406. "required": true
  10407. }
  10408. ],
  10409. "security": [],
  10410. "responses": {
  10411. "204": {
  10412. "description": "<No Content>"
  10413. },
  10414. "400": {
  10415. "description": "InvalidRequestError",
  10416. "content": {
  10417. "application/json": {
  10418. "schema": {
  10419. "$ref": "#/components/schemas/InvalidRequestError"
  10420. }
  10421. }
  10422. }
  10423. },
  10424. "401": {
  10425. "description": "UnauthorizedError",
  10426. "content": {
  10427. "application/json": {
  10428. "schema": {
  10429. "$ref": "#/components/schemas/UnauthorizedError"
  10430. }
  10431. }
  10432. }
  10433. },
  10434. "404": {
  10435. "description": "SessionNotFoundError",
  10436. "content": {
  10437. "application/json": {
  10438. "schema": {
  10439. "anyOf": [
  10440. {
  10441. "$ref": "#/components/schemas/SessionNotFoundError"
  10442. },
  10443. {
  10444. "$ref": "#/components/schemas/SessionNotFoundError"
  10445. }
  10446. ]
  10447. }
  10448. }
  10449. }
  10450. },
  10451. "503": {
  10452. "description": "ServiceUnavailableError",
  10453. "content": {
  10454. "application/json": {
  10455. "schema": {
  10456. "$ref": "#/components/schemas/ServiceUnavailableError"
  10457. }
  10458. }
  10459. }
  10460. }
  10461. },
  10462. "description": "Compact a session conversation.",
  10463. "summary": "Compact session",
  10464. "x-codeSamples": [
  10465. {
  10466. "lang": "js",
  10467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10468. }
  10469. ]
  10470. }
  10471. },
  10472. "/api/session/{sessionID}/wait": {
  10473. "post": {
  10474. "tags": ["sessions"],
  10475. "operationId": "v2.session.wait",
  10476. "parameters": [
  10477. {
  10478. "name": "sessionID",
  10479. "in": "path",
  10480. "schema": {
  10481. "type": "string",
  10482. "pattern": "^ses"
  10483. },
  10484. "required": true
  10485. }
  10486. ],
  10487. "security": [],
  10488. "responses": {
  10489. "204": {
  10490. "description": "<No Content>"
  10491. },
  10492. "400": {
  10493. "description": "InvalidRequestError",
  10494. "content": {
  10495. "application/json": {
  10496. "schema": {
  10497. "$ref": "#/components/schemas/InvalidRequestError"
  10498. }
  10499. }
  10500. }
  10501. },
  10502. "401": {
  10503. "description": "UnauthorizedError",
  10504. "content": {
  10505. "application/json": {
  10506. "schema": {
  10507. "$ref": "#/components/schemas/UnauthorizedError"
  10508. }
  10509. }
  10510. }
  10511. },
  10512. "404": {
  10513. "description": "SessionNotFoundError",
  10514. "content": {
  10515. "application/json": {
  10516. "schema": {
  10517. "anyOf": [
  10518. {
  10519. "$ref": "#/components/schemas/SessionNotFoundError"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/SessionNotFoundError"
  10523. }
  10524. ]
  10525. }
  10526. }
  10527. }
  10528. },
  10529. "503": {
  10530. "description": "ServiceUnavailableError",
  10531. "content": {
  10532. "application/json": {
  10533. "schema": {
  10534. "$ref": "#/components/schemas/ServiceUnavailableError"
  10535. }
  10536. }
  10537. }
  10538. }
  10539. },
  10540. "description": "Wait for a session agent loop to become idle.",
  10541. "summary": "Wait for session",
  10542. "x-codeSamples": [
  10543. {
  10544. "lang": "js",
  10545. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10546. }
  10547. ]
  10548. }
  10549. },
  10550. "/api/session/{sessionID}/context": {
  10551. "get": {
  10552. "tags": ["sessions"],
  10553. "operationId": "v2.session.context",
  10554. "parameters": [
  10555. {
  10556. "name": "sessionID",
  10557. "in": "path",
  10558. "schema": {
  10559. "type": "string",
  10560. "pattern": "^ses"
  10561. },
  10562. "required": true
  10563. }
  10564. ],
  10565. "security": [],
  10566. "responses": {
  10567. "200": {
  10568. "description": "Success",
  10569. "content": {
  10570. "application/json": {
  10571. "schema": {
  10572. "type": "object",
  10573. "properties": {
  10574. "data": {
  10575. "type": "array",
  10576. "items": {
  10577. "$ref": "#/components/schemas/SessionMessage"
  10578. }
  10579. }
  10580. },
  10581. "required": ["data"],
  10582. "additionalProperties": false
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "400": {
  10588. "description": "InvalidRequestError",
  10589. "content": {
  10590. "application/json": {
  10591. "schema": {
  10592. "$ref": "#/components/schemas/InvalidRequestError"
  10593. }
  10594. }
  10595. }
  10596. },
  10597. "401": {
  10598. "description": "UnauthorizedError",
  10599. "content": {
  10600. "application/json": {
  10601. "schema": {
  10602. "$ref": "#/components/schemas/UnauthorizedError"
  10603. }
  10604. }
  10605. }
  10606. },
  10607. "404": {
  10608. "description": "SessionNotFoundError",
  10609. "content": {
  10610. "application/json": {
  10611. "schema": {
  10612. "anyOf": [
  10613. {
  10614. "$ref": "#/components/schemas/SessionNotFoundError"
  10615. },
  10616. {
  10617. "$ref": "#/components/schemas/SessionNotFoundError"
  10618. }
  10619. ]
  10620. }
  10621. }
  10622. }
  10623. },
  10624. "500": {
  10625. "description": "UnknownError",
  10626. "content": {
  10627. "application/json": {
  10628. "schema": {
  10629. "$ref": "#/components/schemas/UnknownError1"
  10630. }
  10631. }
  10632. }
  10633. }
  10634. },
  10635. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10636. "summary": "Get session context",
  10637. "x-codeSamples": [
  10638. {
  10639. "lang": "js",
  10640. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10641. }
  10642. ]
  10643. }
  10644. },
  10645. "/api/session/{sessionID}/message": {
  10646. "get": {
  10647. "tags": ["messages"],
  10648. "operationId": "v2.session.messages",
  10649. "parameters": [
  10650. {
  10651. "name": "sessionID",
  10652. "in": "path",
  10653. "schema": {
  10654. "type": "string",
  10655. "pattern": "^ses"
  10656. },
  10657. "required": true
  10658. },
  10659. {
  10660. "name": "limit",
  10661. "in": "query",
  10662. "schema": {
  10663. "type": "number"
  10664. },
  10665. "required": false
  10666. },
  10667. {
  10668. "name": "order",
  10669. "in": "query",
  10670. "schema": {
  10671. "type": "string",
  10672. "enum": ["asc", "desc"]
  10673. },
  10674. "required": false
  10675. },
  10676. {
  10677. "name": "cursor",
  10678. "in": "query",
  10679. "schema": {
  10680. "type": "string",
  10681. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10682. },
  10683. "required": false
  10684. }
  10685. ],
  10686. "security": [],
  10687. "responses": {
  10688. "200": {
  10689. "description": "SessionMessagesResponse",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/SessionMessagesResponse"
  10694. }
  10695. }
  10696. }
  10697. },
  10698. "400": {
  10699. "description": "InvalidCursorError | InvalidRequestError",
  10700. "content": {
  10701. "application/json": {
  10702. "schema": {
  10703. "anyOf": [
  10704. {
  10705. "$ref": "#/components/schemas/InvalidCursorError"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/InvalidRequestError"
  10709. }
  10710. ]
  10711. }
  10712. }
  10713. }
  10714. },
  10715. "401": {
  10716. "description": "UnauthorizedError",
  10717. "content": {
  10718. "application/json": {
  10719. "schema": {
  10720. "$ref": "#/components/schemas/UnauthorizedError"
  10721. }
  10722. }
  10723. }
  10724. },
  10725. "404": {
  10726. "description": "SessionNotFoundError",
  10727. "content": {
  10728. "application/json": {
  10729. "schema": {
  10730. "anyOf": [
  10731. {
  10732. "$ref": "#/components/schemas/SessionNotFoundError"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/SessionNotFoundError"
  10736. }
  10737. ]
  10738. }
  10739. }
  10740. }
  10741. },
  10742. "500": {
  10743. "description": "UnknownError",
  10744. "content": {
  10745. "application/json": {
  10746. "schema": {
  10747. "$ref": "#/components/schemas/UnknownError1"
  10748. }
  10749. }
  10750. }
  10751. }
  10752. },
  10753. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10754. "summary": "Get session messages",
  10755. "x-codeSamples": [
  10756. {
  10757. "lang": "js",
  10758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10759. }
  10760. ]
  10761. }
  10762. },
  10763. "/api/model": {
  10764. "get": {
  10765. "tags": ["models"],
  10766. "operationId": "v2.model.list",
  10767. "parameters": [
  10768. {
  10769. "name": "location",
  10770. "in": "query",
  10771. "schema": {
  10772. "type": "object",
  10773. "properties": {
  10774. "directory": {
  10775. "type": "string"
  10776. },
  10777. "workspace": {
  10778. "type": "string"
  10779. }
  10780. },
  10781. "additionalProperties": false
  10782. },
  10783. "required": false,
  10784. "style": "deepObject",
  10785. "explode": true
  10786. }
  10787. ],
  10788. "security": [],
  10789. "responses": {
  10790. "200": {
  10791. "description": "Success",
  10792. "content": {
  10793. "application/json": {
  10794. "schema": {
  10795. "type": "object",
  10796. "properties": {
  10797. "location": {
  10798. "$ref": "#/components/schemas/LocationInfo"
  10799. },
  10800. "data": {
  10801. "type": "array",
  10802. "items": {
  10803. "$ref": "#/components/schemas/ModelV2Info"
  10804. }
  10805. }
  10806. },
  10807. "required": ["location", "data"],
  10808. "additionalProperties": false
  10809. }
  10810. }
  10811. }
  10812. },
  10813. "400": {
  10814. "description": "InvalidRequestError",
  10815. "content": {
  10816. "application/json": {
  10817. "schema": {
  10818. "$ref": "#/components/schemas/InvalidRequestError"
  10819. }
  10820. }
  10821. }
  10822. },
  10823. "401": {
  10824. "description": "UnauthorizedError",
  10825. "content": {
  10826. "application/json": {
  10827. "schema": {
  10828. "$ref": "#/components/schemas/UnauthorizedError"
  10829. }
  10830. }
  10831. }
  10832. },
  10833. "503": {
  10834. "description": "ServiceUnavailableError",
  10835. "content": {
  10836. "application/json": {
  10837. "schema": {
  10838. "$ref": "#/components/schemas/ServiceUnavailableError"
  10839. }
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "description": "Retrieve available models ordered by release date.",
  10845. "summary": "List models",
  10846. "x-codeSamples": [
  10847. {
  10848. "lang": "js",
  10849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10850. }
  10851. ]
  10852. }
  10853. },
  10854. "/api/provider": {
  10855. "get": {
  10856. "tags": ["providers"],
  10857. "operationId": "v2.provider.list",
  10858. "parameters": [
  10859. {
  10860. "name": "location",
  10861. "in": "query",
  10862. "schema": {
  10863. "type": "object",
  10864. "properties": {
  10865. "directory": {
  10866. "type": "string"
  10867. },
  10868. "workspace": {
  10869. "type": "string"
  10870. }
  10871. },
  10872. "additionalProperties": false
  10873. },
  10874. "required": false,
  10875. "style": "deepObject",
  10876. "explode": true
  10877. }
  10878. ],
  10879. "security": [],
  10880. "responses": {
  10881. "200": {
  10882. "description": "Success",
  10883. "content": {
  10884. "application/json": {
  10885. "schema": {
  10886. "type": "object",
  10887. "properties": {
  10888. "location": {
  10889. "$ref": "#/components/schemas/LocationInfo"
  10890. },
  10891. "data": {
  10892. "type": "array",
  10893. "items": {
  10894. "$ref": "#/components/schemas/ProviderV2Info"
  10895. }
  10896. }
  10897. },
  10898. "required": ["location", "data"],
  10899. "additionalProperties": false
  10900. }
  10901. }
  10902. }
  10903. },
  10904. "400": {
  10905. "description": "InvalidRequestError",
  10906. "content": {
  10907. "application/json": {
  10908. "schema": {
  10909. "$ref": "#/components/schemas/InvalidRequestError"
  10910. }
  10911. }
  10912. }
  10913. },
  10914. "401": {
  10915. "description": "UnauthorizedError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/UnauthorizedError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "503": {
  10925. "description": "ServiceUnavailableError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/ServiceUnavailableError"
  10930. }
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  10936. "summary": "List providers",
  10937. "x-codeSamples": [
  10938. {
  10939. "lang": "js",
  10940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10941. }
  10942. ]
  10943. }
  10944. },
  10945. "/api/provider/{providerID}": {
  10946. "get": {
  10947. "tags": ["providers"],
  10948. "operationId": "v2.provider.get",
  10949. "parameters": [
  10950. {
  10951. "name": "providerID",
  10952. "in": "path",
  10953. "schema": {
  10954. "type": "string"
  10955. },
  10956. "required": true
  10957. },
  10958. {
  10959. "name": "location",
  10960. "in": "query",
  10961. "schema": {
  10962. "type": "object",
  10963. "properties": {
  10964. "directory": {
  10965. "type": "string"
  10966. },
  10967. "workspace": {
  10968. "type": "string"
  10969. }
  10970. },
  10971. "additionalProperties": false
  10972. },
  10973. "required": false,
  10974. "style": "deepObject",
  10975. "explode": true
  10976. }
  10977. ],
  10978. "security": [],
  10979. "responses": {
  10980. "200": {
  10981. "description": "Success",
  10982. "content": {
  10983. "application/json": {
  10984. "schema": {
  10985. "type": "object",
  10986. "properties": {
  10987. "location": {
  10988. "$ref": "#/components/schemas/LocationInfo"
  10989. },
  10990. "data": {
  10991. "$ref": "#/components/schemas/ProviderV2Info"
  10992. }
  10993. },
  10994. "required": ["location", "data"],
  10995. "additionalProperties": false
  10996. }
  10997. }
  10998. }
  10999. },
  11000. "400": {
  11001. "description": "InvalidRequestError",
  11002. "content": {
  11003. "application/json": {
  11004. "schema": {
  11005. "$ref": "#/components/schemas/InvalidRequestError"
  11006. }
  11007. }
  11008. }
  11009. },
  11010. "401": {
  11011. "description": "UnauthorizedError",
  11012. "content": {
  11013. "application/json": {
  11014. "schema": {
  11015. "$ref": "#/components/schemas/UnauthorizedError"
  11016. }
  11017. }
  11018. }
  11019. },
  11020. "404": {
  11021. "description": "ProviderNotFoundError",
  11022. "content": {
  11023. "application/json": {
  11024. "schema": {
  11025. "$ref": "#/components/schemas/ProviderNotFoundError"
  11026. }
  11027. }
  11028. }
  11029. },
  11030. "503": {
  11031. "description": "ServiceUnavailableError",
  11032. "content": {
  11033. "application/json": {
  11034. "schema": {
  11035. "$ref": "#/components/schemas/ServiceUnavailableError"
  11036. }
  11037. }
  11038. }
  11039. }
  11040. },
  11041. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11042. "summary": "Get provider",
  11043. "x-codeSamples": [
  11044. {
  11045. "lang": "js",
  11046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11047. }
  11048. ]
  11049. }
  11050. },
  11051. "/api/integration": {
  11052. "get": {
  11053. "tags": ["integrations"],
  11054. "operationId": "v2.integration.list",
  11055. "parameters": [
  11056. {
  11057. "name": "location",
  11058. "in": "query",
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "directory": {
  11063. "type": "string"
  11064. },
  11065. "workspace": {
  11066. "type": "string"
  11067. }
  11068. },
  11069. "additionalProperties": false
  11070. },
  11071. "required": false,
  11072. "style": "deepObject",
  11073. "explode": true
  11074. }
  11075. ],
  11076. "security": [],
  11077. "responses": {
  11078. "200": {
  11079. "description": "Success",
  11080. "content": {
  11081. "application/json": {
  11082. "schema": {
  11083. "type": "object",
  11084. "properties": {
  11085. "location": {
  11086. "$ref": "#/components/schemas/LocationInfo"
  11087. },
  11088. "data": {
  11089. "type": "array",
  11090. "items": {
  11091. "$ref": "#/components/schemas/IntegrationInfo"
  11092. }
  11093. }
  11094. },
  11095. "required": ["location", "data"],
  11096. "additionalProperties": false
  11097. }
  11098. }
  11099. }
  11100. },
  11101. "400": {
  11102. "description": "InvalidRequestError",
  11103. "content": {
  11104. "application/json": {
  11105. "schema": {
  11106. "$ref": "#/components/schemas/InvalidRequestError"
  11107. }
  11108. }
  11109. }
  11110. },
  11111. "401": {
  11112. "description": "UnauthorizedError",
  11113. "content": {
  11114. "application/json": {
  11115. "schema": {
  11116. "$ref": "#/components/schemas/UnauthorizedError"
  11117. }
  11118. }
  11119. }
  11120. }
  11121. },
  11122. "description": "Retrieve available integrations and their authentication methods.",
  11123. "summary": "List integrations",
  11124. "x-codeSamples": [
  11125. {
  11126. "lang": "js",
  11127. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11128. }
  11129. ]
  11130. }
  11131. },
  11132. "/api/integration/{integrationID}": {
  11133. "get": {
  11134. "tags": ["integrations"],
  11135. "operationId": "v2.integration.get",
  11136. "parameters": [
  11137. {
  11138. "name": "integrationID",
  11139. "in": "path",
  11140. "schema": {
  11141. "type": "string"
  11142. },
  11143. "required": true
  11144. },
  11145. {
  11146. "name": "location",
  11147. "in": "query",
  11148. "schema": {
  11149. "type": "object",
  11150. "properties": {
  11151. "directory": {
  11152. "type": "string"
  11153. },
  11154. "workspace": {
  11155. "type": "string"
  11156. }
  11157. },
  11158. "additionalProperties": false
  11159. },
  11160. "required": false,
  11161. "style": "deepObject",
  11162. "explode": true
  11163. }
  11164. ],
  11165. "security": [],
  11166. "responses": {
  11167. "200": {
  11168. "description": "Success",
  11169. "content": {
  11170. "application/json": {
  11171. "schema": {
  11172. "type": "object",
  11173. "properties": {
  11174. "location": {
  11175. "$ref": "#/components/schemas/LocationInfo"
  11176. },
  11177. "data": {
  11178. "$ref": "#/components/schemas/IntegrationInfo"
  11179. }
  11180. },
  11181. "required": ["location", "data"],
  11182. "additionalProperties": false
  11183. }
  11184. }
  11185. }
  11186. },
  11187. "400": {
  11188. "description": "InvalidRequestError",
  11189. "content": {
  11190. "application/json": {
  11191. "schema": {
  11192. "$ref": "#/components/schemas/InvalidRequestError"
  11193. }
  11194. }
  11195. }
  11196. },
  11197. "401": {
  11198. "description": "UnauthorizedError",
  11199. "content": {
  11200. "application/json": {
  11201. "schema": {
  11202. "$ref": "#/components/schemas/UnauthorizedError"
  11203. }
  11204. }
  11205. }
  11206. }
  11207. },
  11208. "description": "Retrieve one integration and its authentication methods.",
  11209. "summary": "Get integration",
  11210. "x-codeSamples": [
  11211. {
  11212. "lang": "js",
  11213. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11214. }
  11215. ]
  11216. }
  11217. },
  11218. "/api/integration/{integrationID}/connect/key": {
  11219. "post": {
  11220. "tags": ["integrations"],
  11221. "operationId": "v2.integration.connect.key",
  11222. "parameters": [
  11223. {
  11224. "name": "integrationID",
  11225. "in": "path",
  11226. "schema": {
  11227. "type": "string"
  11228. },
  11229. "required": true
  11230. },
  11231. {
  11232. "name": "location",
  11233. "in": "query",
  11234. "schema": {
  11235. "type": "object",
  11236. "properties": {
  11237. "directory": {
  11238. "type": "string"
  11239. },
  11240. "workspace": {
  11241. "type": "string"
  11242. }
  11243. },
  11244. "additionalProperties": false
  11245. },
  11246. "required": false,
  11247. "style": "deepObject",
  11248. "explode": true
  11249. }
  11250. ],
  11251. "security": [],
  11252. "responses": {
  11253. "204": {
  11254. "description": "<No Content>"
  11255. },
  11256. "400": {
  11257. "description": "InvalidRequestError",
  11258. "content": {
  11259. "application/json": {
  11260. "schema": {
  11261. "anyOf": [
  11262. {
  11263. "$ref": "#/components/schemas/InvalidRequestError"
  11264. },
  11265. {
  11266. "$ref": "#/components/schemas/InvalidRequestError"
  11267. }
  11268. ]
  11269. }
  11270. }
  11271. }
  11272. },
  11273. "401": {
  11274. "description": "UnauthorizedError",
  11275. "content": {
  11276. "application/json": {
  11277. "schema": {
  11278. "$ref": "#/components/schemas/UnauthorizedError"
  11279. }
  11280. }
  11281. }
  11282. }
  11283. },
  11284. "description": "Run a key authentication method and store the resulting credential.",
  11285. "summary": "Connect with key",
  11286. "requestBody": {
  11287. "content": {
  11288. "application/json": {
  11289. "schema": {
  11290. "type": "object",
  11291. "properties": {
  11292. "key": {
  11293. "type": "string"
  11294. },
  11295. "label": {
  11296. "type": "string"
  11297. }
  11298. },
  11299. "required": ["key"],
  11300. "additionalProperties": false
  11301. }
  11302. }
  11303. },
  11304. "required": true
  11305. },
  11306. "x-codeSamples": [
  11307. {
  11308. "lang": "js",
  11309. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11310. }
  11311. ]
  11312. }
  11313. },
  11314. "/api/integration/{integrationID}/connect/oauth": {
  11315. "post": {
  11316. "tags": ["integrations"],
  11317. "operationId": "v2.integration.connect.oauth",
  11318. "parameters": [
  11319. {
  11320. "name": "integrationID",
  11321. "in": "path",
  11322. "schema": {
  11323. "type": "string"
  11324. },
  11325. "required": true
  11326. },
  11327. {
  11328. "name": "location",
  11329. "in": "query",
  11330. "schema": {
  11331. "type": "object",
  11332. "properties": {
  11333. "directory": {
  11334. "type": "string"
  11335. },
  11336. "workspace": {
  11337. "type": "string"
  11338. }
  11339. },
  11340. "additionalProperties": false
  11341. },
  11342. "required": false,
  11343. "style": "deepObject",
  11344. "explode": true
  11345. }
  11346. ],
  11347. "security": [],
  11348. "responses": {
  11349. "200": {
  11350. "description": "Success",
  11351. "content": {
  11352. "application/json": {
  11353. "schema": {
  11354. "type": "object",
  11355. "properties": {
  11356. "location": {
  11357. "$ref": "#/components/schemas/LocationInfo"
  11358. },
  11359. "data": {
  11360. "$ref": "#/components/schemas/IntegrationAttempt"
  11361. }
  11362. },
  11363. "required": ["location", "data"],
  11364. "additionalProperties": false
  11365. }
  11366. }
  11367. }
  11368. },
  11369. "400": {
  11370. "description": "InvalidRequestError",
  11371. "content": {
  11372. "application/json": {
  11373. "schema": {
  11374. "anyOf": [
  11375. {
  11376. "$ref": "#/components/schemas/InvalidRequestError"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/InvalidRequestError"
  11380. }
  11381. ]
  11382. }
  11383. }
  11384. }
  11385. },
  11386. "401": {
  11387. "description": "UnauthorizedError",
  11388. "content": {
  11389. "application/json": {
  11390. "schema": {
  11391. "$ref": "#/components/schemas/UnauthorizedError"
  11392. }
  11393. }
  11394. }
  11395. }
  11396. },
  11397. "description": "Start an OAuth attempt and return the authorization details.",
  11398. "summary": "Begin OAuth connection",
  11399. "requestBody": {
  11400. "content": {
  11401. "application/json": {
  11402. "schema": {
  11403. "type": "object",
  11404. "properties": {
  11405. "methodID": {
  11406. "type": "string"
  11407. },
  11408. "inputs": {
  11409. "type": "object",
  11410. "additionalProperties": {
  11411. "type": "string"
  11412. }
  11413. },
  11414. "label": {
  11415. "type": "string"
  11416. }
  11417. },
  11418. "required": ["methodID", "inputs"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. },
  11423. "required": true
  11424. },
  11425. "x-codeSamples": [
  11426. {
  11427. "lang": "js",
  11428. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11429. }
  11430. ]
  11431. }
  11432. },
  11433. "/api/integration/attempt/{attemptID}": {
  11434. "get": {
  11435. "tags": ["integrations"],
  11436. "operationId": "v2.integration.attempt.status",
  11437. "parameters": [
  11438. {
  11439. "name": "attemptID",
  11440. "in": "path",
  11441. "schema": {
  11442. "type": "string"
  11443. },
  11444. "required": true
  11445. },
  11446. {
  11447. "name": "location",
  11448. "in": "query",
  11449. "schema": {
  11450. "type": "object",
  11451. "properties": {
  11452. "directory": {
  11453. "type": "string"
  11454. },
  11455. "workspace": {
  11456. "type": "string"
  11457. }
  11458. },
  11459. "additionalProperties": false
  11460. },
  11461. "required": false,
  11462. "style": "deepObject",
  11463. "explode": true
  11464. }
  11465. ],
  11466. "security": [],
  11467. "responses": {
  11468. "200": {
  11469. "description": "Success",
  11470. "content": {
  11471. "application/json": {
  11472. "schema": {
  11473. "type": "object",
  11474. "properties": {
  11475. "location": {
  11476. "$ref": "#/components/schemas/LocationInfo"
  11477. },
  11478. "data": {
  11479. "anyOf": [
  11480. {
  11481. "type": "object",
  11482. "properties": {
  11483. "status": {
  11484. "type": "string",
  11485. "enum": ["pending"]
  11486. },
  11487. "time": {
  11488. "type": "object",
  11489. "properties": {
  11490. "created": {
  11491. "anyOf": [
  11492. {
  11493. "type": "number"
  11494. },
  11495. {
  11496. "type": "string",
  11497. "enum": ["NaN"]
  11498. },
  11499. {
  11500. "type": "string",
  11501. "enum": ["Infinity"]
  11502. },
  11503. {
  11504. "type": "string",
  11505. "enum": ["-Infinity"]
  11506. },
  11507. {
  11508. "type": "string",
  11509. "enum": ["Infinity", "-Infinity", "NaN"]
  11510. }
  11511. ]
  11512. },
  11513. "expires": {
  11514. "anyOf": [
  11515. {
  11516. "type": "number"
  11517. },
  11518. {
  11519. "type": "string",
  11520. "enum": ["NaN"]
  11521. },
  11522. {
  11523. "type": "string",
  11524. "enum": ["Infinity"]
  11525. },
  11526. {
  11527. "type": "string",
  11528. "enum": ["-Infinity"]
  11529. },
  11530. {
  11531. "type": "string",
  11532. "enum": ["Infinity", "-Infinity", "NaN"]
  11533. }
  11534. ]
  11535. }
  11536. },
  11537. "required": ["created", "expires"],
  11538. "additionalProperties": false
  11539. }
  11540. },
  11541. "required": ["status", "time"],
  11542. "additionalProperties": false
  11543. },
  11544. {
  11545. "type": "object",
  11546. "properties": {
  11547. "status": {
  11548. "type": "string",
  11549. "enum": ["complete"]
  11550. },
  11551. "time": {
  11552. "type": "object",
  11553. "properties": {
  11554. "created": {
  11555. "anyOf": [
  11556. {
  11557. "type": "number"
  11558. },
  11559. {
  11560. "type": "string",
  11561. "enum": ["NaN"]
  11562. },
  11563. {
  11564. "type": "string",
  11565. "enum": ["Infinity"]
  11566. },
  11567. {
  11568. "type": "string",
  11569. "enum": ["-Infinity"]
  11570. },
  11571. {
  11572. "type": "string",
  11573. "enum": ["Infinity", "-Infinity", "NaN"]
  11574. }
  11575. ]
  11576. },
  11577. "expires": {
  11578. "anyOf": [
  11579. {
  11580. "type": "number"
  11581. },
  11582. {
  11583. "type": "string",
  11584. "enum": ["NaN"]
  11585. },
  11586. {
  11587. "type": "string",
  11588. "enum": ["Infinity"]
  11589. },
  11590. {
  11591. "type": "string",
  11592. "enum": ["-Infinity"]
  11593. },
  11594. {
  11595. "type": "string",
  11596. "enum": ["Infinity", "-Infinity", "NaN"]
  11597. }
  11598. ]
  11599. }
  11600. },
  11601. "required": ["created", "expires"],
  11602. "additionalProperties": false
  11603. }
  11604. },
  11605. "required": ["status", "time"],
  11606. "additionalProperties": false
  11607. },
  11608. {
  11609. "type": "object",
  11610. "properties": {
  11611. "status": {
  11612. "type": "string",
  11613. "enum": ["failed"]
  11614. },
  11615. "message": {
  11616. "type": "string"
  11617. },
  11618. "time": {
  11619. "type": "object",
  11620. "properties": {
  11621. "created": {
  11622. "anyOf": [
  11623. {
  11624. "type": "number"
  11625. },
  11626. {
  11627. "type": "string",
  11628. "enum": ["NaN"]
  11629. },
  11630. {
  11631. "type": "string",
  11632. "enum": ["Infinity"]
  11633. },
  11634. {
  11635. "type": "string",
  11636. "enum": ["-Infinity"]
  11637. },
  11638. {
  11639. "type": "string",
  11640. "enum": ["Infinity", "-Infinity", "NaN"]
  11641. }
  11642. ]
  11643. },
  11644. "expires": {
  11645. "anyOf": [
  11646. {
  11647. "type": "number"
  11648. },
  11649. {
  11650. "type": "string",
  11651. "enum": ["NaN"]
  11652. },
  11653. {
  11654. "type": "string",
  11655. "enum": ["Infinity"]
  11656. },
  11657. {
  11658. "type": "string",
  11659. "enum": ["-Infinity"]
  11660. },
  11661. {
  11662. "type": "string",
  11663. "enum": ["Infinity", "-Infinity", "NaN"]
  11664. }
  11665. ]
  11666. }
  11667. },
  11668. "required": ["created", "expires"],
  11669. "additionalProperties": false
  11670. }
  11671. },
  11672. "required": ["status", "message", "time"],
  11673. "additionalProperties": false
  11674. },
  11675. {
  11676. "type": "object",
  11677. "properties": {
  11678. "status": {
  11679. "type": "string",
  11680. "enum": ["expired"]
  11681. },
  11682. "time": {
  11683. "type": "object",
  11684. "properties": {
  11685. "created": {
  11686. "anyOf": [
  11687. {
  11688. "type": "number"
  11689. },
  11690. {
  11691. "type": "string",
  11692. "enum": ["NaN"]
  11693. },
  11694. {
  11695. "type": "string",
  11696. "enum": ["Infinity"]
  11697. },
  11698. {
  11699. "type": "string",
  11700. "enum": ["-Infinity"]
  11701. },
  11702. {
  11703. "type": "string",
  11704. "enum": ["Infinity", "-Infinity", "NaN"]
  11705. }
  11706. ]
  11707. },
  11708. "expires": {
  11709. "anyOf": [
  11710. {
  11711. "type": "number"
  11712. },
  11713. {
  11714. "type": "string",
  11715. "enum": ["NaN"]
  11716. },
  11717. {
  11718. "type": "string",
  11719. "enum": ["Infinity"]
  11720. },
  11721. {
  11722. "type": "string",
  11723. "enum": ["-Infinity"]
  11724. },
  11725. {
  11726. "type": "string",
  11727. "enum": ["Infinity", "-Infinity", "NaN"]
  11728. }
  11729. ]
  11730. }
  11731. },
  11732. "required": ["created", "expires"],
  11733. "additionalProperties": false
  11734. }
  11735. },
  11736. "required": ["status", "time"],
  11737. "additionalProperties": false
  11738. }
  11739. ]
  11740. }
  11741. },
  11742. "required": ["location", "data"],
  11743. "additionalProperties": false
  11744. }
  11745. }
  11746. }
  11747. },
  11748. "400": {
  11749. "description": "InvalidRequestError",
  11750. "content": {
  11751. "application/json": {
  11752. "schema": {
  11753. "$ref": "#/components/schemas/InvalidRequestError"
  11754. }
  11755. }
  11756. }
  11757. },
  11758. "401": {
  11759. "description": "UnauthorizedError",
  11760. "content": {
  11761. "application/json": {
  11762. "schema": {
  11763. "$ref": "#/components/schemas/UnauthorizedError"
  11764. }
  11765. }
  11766. }
  11767. }
  11768. },
  11769. "description": "Poll the current status of an OAuth attempt.",
  11770. "summary": "Get OAuth attempt status",
  11771. "x-codeSamples": [
  11772. {
  11773. "lang": "js",
  11774. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  11775. }
  11776. ]
  11777. },
  11778. "delete": {
  11779. "tags": ["integrations"],
  11780. "operationId": "v2.integration.attempt.cancel",
  11781. "parameters": [
  11782. {
  11783. "name": "attemptID",
  11784. "in": "path",
  11785. "schema": {
  11786. "type": "string"
  11787. },
  11788. "required": true
  11789. },
  11790. {
  11791. "name": "location",
  11792. "in": "query",
  11793. "schema": {
  11794. "type": "object",
  11795. "properties": {
  11796. "directory": {
  11797. "type": "string"
  11798. },
  11799. "workspace": {
  11800. "type": "string"
  11801. }
  11802. },
  11803. "additionalProperties": false
  11804. },
  11805. "required": false,
  11806. "style": "deepObject",
  11807. "explode": true
  11808. }
  11809. ],
  11810. "security": [],
  11811. "responses": {
  11812. "204": {
  11813. "description": "<No Content>"
  11814. },
  11815. "400": {
  11816. "description": "InvalidRequestError",
  11817. "content": {
  11818. "application/json": {
  11819. "schema": {
  11820. "$ref": "#/components/schemas/InvalidRequestError"
  11821. }
  11822. }
  11823. }
  11824. },
  11825. "401": {
  11826. "description": "UnauthorizedError",
  11827. "content": {
  11828. "application/json": {
  11829. "schema": {
  11830. "$ref": "#/components/schemas/UnauthorizedError"
  11831. }
  11832. }
  11833. }
  11834. }
  11835. },
  11836. "description": "Cancel an OAuth attempt and release its resources.",
  11837. "summary": "Cancel OAuth connection",
  11838. "x-codeSamples": [
  11839. {
  11840. "lang": "js",
  11841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  11842. }
  11843. ]
  11844. }
  11845. },
  11846. "/api/integration/attempt/{attemptID}/complete": {
  11847. "post": {
  11848. "tags": ["integrations"],
  11849. "operationId": "v2.integration.attempt.complete",
  11850. "parameters": [
  11851. {
  11852. "name": "attemptID",
  11853. "in": "path",
  11854. "schema": {
  11855. "type": "string"
  11856. },
  11857. "required": true
  11858. },
  11859. {
  11860. "name": "location",
  11861. "in": "query",
  11862. "schema": {
  11863. "type": "object",
  11864. "properties": {
  11865. "directory": {
  11866. "type": "string"
  11867. },
  11868. "workspace": {
  11869. "type": "string"
  11870. }
  11871. },
  11872. "additionalProperties": false
  11873. },
  11874. "required": false,
  11875. "style": "deepObject",
  11876. "explode": true
  11877. }
  11878. ],
  11879. "security": [],
  11880. "responses": {
  11881. "204": {
  11882. "description": "<No Content>"
  11883. },
  11884. "400": {
  11885. "description": "InvalidRequestError",
  11886. "content": {
  11887. "application/json": {
  11888. "schema": {
  11889. "anyOf": [
  11890. {
  11891. "$ref": "#/components/schemas/InvalidRequestError"
  11892. },
  11893. {
  11894. "$ref": "#/components/schemas/InvalidRequestError"
  11895. }
  11896. ]
  11897. }
  11898. }
  11899. }
  11900. },
  11901. "401": {
  11902. "description": "UnauthorizedError",
  11903. "content": {
  11904. "application/json": {
  11905. "schema": {
  11906. "$ref": "#/components/schemas/UnauthorizedError"
  11907. }
  11908. }
  11909. }
  11910. }
  11911. },
  11912. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  11913. "summary": "Complete OAuth connection",
  11914. "requestBody": {
  11915. "content": {
  11916. "application/json": {
  11917. "schema": {
  11918. "type": "object",
  11919. "properties": {
  11920. "code": {
  11921. "type": "string"
  11922. }
  11923. },
  11924. "additionalProperties": false
  11925. }
  11926. }
  11927. },
  11928. "required": true
  11929. },
  11930. "x-codeSamples": [
  11931. {
  11932. "lang": "js",
  11933. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  11934. }
  11935. ]
  11936. }
  11937. },
  11938. "/api/credential/{credentialID}": {
  11939. "patch": {
  11940. "tags": ["opencode HttpApi"],
  11941. "operationId": "v2.credential.update",
  11942. "parameters": [
  11943. {
  11944. "name": "credentialID",
  11945. "in": "path",
  11946. "schema": {
  11947. "type": "string"
  11948. },
  11949. "required": true
  11950. }
  11951. ],
  11952. "security": [],
  11953. "responses": {
  11954. "204": {
  11955. "description": "<No Content>"
  11956. },
  11957. "400": {
  11958. "description": "InvalidRequestError",
  11959. "content": {
  11960. "application/json": {
  11961. "schema": {
  11962. "$ref": "#/components/schemas/InvalidRequestError"
  11963. }
  11964. }
  11965. }
  11966. },
  11967. "401": {
  11968. "description": "UnauthorizedError",
  11969. "content": {
  11970. "application/json": {
  11971. "schema": {
  11972. "$ref": "#/components/schemas/UnauthorizedError"
  11973. }
  11974. }
  11975. }
  11976. }
  11977. },
  11978. "description": "Update a stored credential label.",
  11979. "summary": "Update credential",
  11980. "requestBody": {
  11981. "content": {
  11982. "application/json": {
  11983. "schema": {
  11984. "type": "object",
  11985. "properties": {
  11986. "label": {
  11987. "type": "string"
  11988. }
  11989. },
  11990. "required": ["label"],
  11991. "additionalProperties": false
  11992. }
  11993. }
  11994. },
  11995. "required": true
  11996. },
  11997. "x-codeSamples": [
  11998. {
  11999. "lang": "js",
  12000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12001. }
  12002. ]
  12003. },
  12004. "delete": {
  12005. "tags": ["opencode HttpApi"],
  12006. "operationId": "v2.credential.remove",
  12007. "parameters": [
  12008. {
  12009. "name": "credentialID",
  12010. "in": "path",
  12011. "schema": {
  12012. "type": "string"
  12013. },
  12014. "required": true
  12015. }
  12016. ],
  12017. "security": [],
  12018. "responses": {
  12019. "204": {
  12020. "description": "<No Content>"
  12021. },
  12022. "400": {
  12023. "description": "InvalidRequestError",
  12024. "content": {
  12025. "application/json": {
  12026. "schema": {
  12027. "$ref": "#/components/schemas/InvalidRequestError"
  12028. }
  12029. }
  12030. }
  12031. },
  12032. "401": {
  12033. "description": "UnauthorizedError",
  12034. "content": {
  12035. "application/json": {
  12036. "schema": {
  12037. "$ref": "#/components/schemas/UnauthorizedError"
  12038. }
  12039. }
  12040. }
  12041. }
  12042. },
  12043. "description": "Remove a stored integration credential.",
  12044. "summary": "Remove credential",
  12045. "x-codeSamples": [
  12046. {
  12047. "lang": "js",
  12048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12049. }
  12050. ]
  12051. }
  12052. },
  12053. "/api/permission/request": {
  12054. "get": {
  12055. "tags": ["permissions"],
  12056. "operationId": "v2.permission.request.list",
  12057. "parameters": [
  12058. {
  12059. "name": "location",
  12060. "in": "query",
  12061. "schema": {
  12062. "type": "object",
  12063. "properties": {
  12064. "directory": {
  12065. "type": "string"
  12066. },
  12067. "workspace": {
  12068. "type": "string"
  12069. }
  12070. },
  12071. "additionalProperties": false
  12072. },
  12073. "required": false,
  12074. "style": "deepObject",
  12075. "explode": true
  12076. }
  12077. ],
  12078. "security": [],
  12079. "responses": {
  12080. "200": {
  12081. "description": "Success",
  12082. "content": {
  12083. "application/json": {
  12084. "schema": {
  12085. "type": "object",
  12086. "properties": {
  12087. "location": {
  12088. "$ref": "#/components/schemas/LocationInfo"
  12089. },
  12090. "data": {
  12091. "type": "array",
  12092. "items": {
  12093. "$ref": "#/components/schemas/PermissionV2Request"
  12094. }
  12095. }
  12096. },
  12097. "required": ["location", "data"],
  12098. "additionalProperties": false
  12099. }
  12100. }
  12101. }
  12102. },
  12103. "400": {
  12104. "description": "InvalidRequestError",
  12105. "content": {
  12106. "application/json": {
  12107. "schema": {
  12108. "$ref": "#/components/schemas/InvalidRequestError"
  12109. }
  12110. }
  12111. }
  12112. },
  12113. "401": {
  12114. "description": "UnauthorizedError",
  12115. "content": {
  12116. "application/json": {
  12117. "schema": {
  12118. "$ref": "#/components/schemas/UnauthorizedError"
  12119. }
  12120. }
  12121. }
  12122. }
  12123. },
  12124. "description": "Retrieve pending permission requests for a location.",
  12125. "summary": "List pending permission requests",
  12126. "x-codeSamples": [
  12127. {
  12128. "lang": "js",
  12129. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12130. }
  12131. ]
  12132. }
  12133. },
  12134. "/api/permission/saved": {
  12135. "get": {
  12136. "tags": ["permissions"],
  12137. "operationId": "v2.permission.saved.list",
  12138. "parameters": [
  12139. {
  12140. "name": "projectID",
  12141. "in": "query",
  12142. "schema": {
  12143. "type": "string"
  12144. },
  12145. "required": false
  12146. }
  12147. ],
  12148. "security": [],
  12149. "responses": {
  12150. "200": {
  12151. "description": "Success",
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "data": {
  12158. "type": "array",
  12159. "items": {
  12160. "$ref": "#/components/schemas/PermissionSavedInfo"
  12161. }
  12162. }
  12163. },
  12164. "required": ["data"],
  12165. "additionalProperties": false
  12166. }
  12167. }
  12168. }
  12169. },
  12170. "400": {
  12171. "description": "InvalidRequestError",
  12172. "content": {
  12173. "application/json": {
  12174. "schema": {
  12175. "$ref": "#/components/schemas/InvalidRequestError"
  12176. }
  12177. }
  12178. }
  12179. },
  12180. "401": {
  12181. "description": "UnauthorizedError",
  12182. "content": {
  12183. "application/json": {
  12184. "schema": {
  12185. "$ref": "#/components/schemas/UnauthorizedError"
  12186. }
  12187. }
  12188. }
  12189. }
  12190. },
  12191. "description": "Retrieve saved permissions, optionally filtered by project.",
  12192. "summary": "List saved permissions",
  12193. "x-codeSamples": [
  12194. {
  12195. "lang": "js",
  12196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12197. }
  12198. ]
  12199. }
  12200. },
  12201. "/api/permission/saved/{id}": {
  12202. "delete": {
  12203. "tags": ["permissions"],
  12204. "operationId": "v2.permission.saved.remove",
  12205. "parameters": [
  12206. {
  12207. "name": "id",
  12208. "in": "path",
  12209. "schema": {
  12210. "type": "string"
  12211. },
  12212. "required": true
  12213. }
  12214. ],
  12215. "security": [],
  12216. "responses": {
  12217. "204": {
  12218. "description": "<No Content>"
  12219. },
  12220. "400": {
  12221. "description": "InvalidRequestError",
  12222. "content": {
  12223. "application/json": {
  12224. "schema": {
  12225. "$ref": "#/components/schemas/InvalidRequestError"
  12226. }
  12227. }
  12228. }
  12229. },
  12230. "401": {
  12231. "description": "UnauthorizedError",
  12232. "content": {
  12233. "application/json": {
  12234. "schema": {
  12235. "$ref": "#/components/schemas/UnauthorizedError"
  12236. }
  12237. }
  12238. }
  12239. }
  12240. },
  12241. "description": "Remove a saved permission by ID.",
  12242. "summary": "Remove saved permission",
  12243. "x-codeSamples": [
  12244. {
  12245. "lang": "js",
  12246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12247. }
  12248. ]
  12249. }
  12250. },
  12251. "/api/session/{sessionID}/permission": {
  12252. "get": {
  12253. "tags": ["permissions"],
  12254. "operationId": "v2.session.permission.list",
  12255. "parameters": [
  12256. {
  12257. "name": "sessionID",
  12258. "in": "path",
  12259. "schema": {
  12260. "type": "string",
  12261. "pattern": "^ses"
  12262. },
  12263. "required": true
  12264. }
  12265. ],
  12266. "security": [],
  12267. "responses": {
  12268. "200": {
  12269. "description": "Success",
  12270. "content": {
  12271. "application/json": {
  12272. "schema": {
  12273. "type": "object",
  12274. "properties": {
  12275. "data": {
  12276. "type": "array",
  12277. "items": {
  12278. "$ref": "#/components/schemas/PermissionV2Request"
  12279. }
  12280. }
  12281. },
  12282. "required": ["data"],
  12283. "additionalProperties": false
  12284. }
  12285. }
  12286. }
  12287. },
  12288. "400": {
  12289. "description": "InvalidRequestError",
  12290. "content": {
  12291. "application/json": {
  12292. "schema": {
  12293. "$ref": "#/components/schemas/InvalidRequestError"
  12294. }
  12295. }
  12296. }
  12297. },
  12298. "401": {
  12299. "description": "UnauthorizedError",
  12300. "content": {
  12301. "application/json": {
  12302. "schema": {
  12303. "$ref": "#/components/schemas/UnauthorizedError"
  12304. }
  12305. }
  12306. }
  12307. },
  12308. "404": {
  12309. "description": "SessionNotFoundError",
  12310. "content": {
  12311. "application/json": {
  12312. "schema": {
  12313. "anyOf": [
  12314. {
  12315. "$ref": "#/components/schemas/SessionNotFoundError"
  12316. },
  12317. {
  12318. "$ref": "#/components/schemas/SessionNotFoundError"
  12319. }
  12320. ]
  12321. }
  12322. }
  12323. }
  12324. }
  12325. },
  12326. "description": "Retrieve pending permission requests owned by a session.",
  12327. "summary": "List session permission requests",
  12328. "x-codeSamples": [
  12329. {
  12330. "lang": "js",
  12331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12332. }
  12333. ]
  12334. }
  12335. },
  12336. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12337. "post": {
  12338. "tags": ["permissions"],
  12339. "operationId": "v2.session.permission.reply",
  12340. "parameters": [
  12341. {
  12342. "name": "sessionID",
  12343. "in": "path",
  12344. "schema": {
  12345. "type": "string",
  12346. "pattern": "^ses"
  12347. },
  12348. "required": true
  12349. },
  12350. {
  12351. "name": "requestID",
  12352. "in": "path",
  12353. "schema": {
  12354. "type": "string",
  12355. "pattern": "^per"
  12356. },
  12357. "required": true
  12358. }
  12359. ],
  12360. "security": [],
  12361. "responses": {
  12362. "204": {
  12363. "description": "<No Content>"
  12364. },
  12365. "400": {
  12366. "description": "InvalidRequestError",
  12367. "content": {
  12368. "application/json": {
  12369. "schema": {
  12370. "$ref": "#/components/schemas/InvalidRequestError"
  12371. }
  12372. }
  12373. }
  12374. },
  12375. "401": {
  12376. "description": "UnauthorizedError",
  12377. "content": {
  12378. "application/json": {
  12379. "schema": {
  12380. "$ref": "#/components/schemas/UnauthorizedError"
  12381. }
  12382. }
  12383. }
  12384. },
  12385. "404": {
  12386. "description": "SessionNotFoundError | PermissionNotFoundError",
  12387. "content": {
  12388. "application/json": {
  12389. "schema": {
  12390. "anyOf": [
  12391. {
  12392. "$ref": "#/components/schemas/PermissionNotFoundError"
  12393. },
  12394. {
  12395. "$ref": "#/components/schemas/SessionNotFoundError"
  12396. },
  12397. {
  12398. "$ref": "#/components/schemas/SessionNotFoundError"
  12399. }
  12400. ]
  12401. }
  12402. }
  12403. }
  12404. }
  12405. },
  12406. "description": "Respond to a pending permission request owned by a session.",
  12407. "summary": "Reply to pending permission request",
  12408. "requestBody": {
  12409. "content": {
  12410. "application/json": {
  12411. "schema": {
  12412. "type": "object",
  12413. "properties": {
  12414. "reply": {
  12415. "$ref": "#/components/schemas/PermissionV2Reply"
  12416. },
  12417. "message": {
  12418. "type": "string"
  12419. }
  12420. },
  12421. "required": ["reply"],
  12422. "additionalProperties": false
  12423. }
  12424. }
  12425. },
  12426. "required": true
  12427. },
  12428. "x-codeSamples": [
  12429. {
  12430. "lang": "js",
  12431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12432. }
  12433. ]
  12434. }
  12435. },
  12436. "/api/fs/read/*": {
  12437. "get": {
  12438. "tags": ["filesystem"],
  12439. "operationId": "v2.fs.read",
  12440. "parameters": [
  12441. {
  12442. "name": "location",
  12443. "in": "query",
  12444. "schema": {
  12445. "type": "object",
  12446. "properties": {
  12447. "directory": {
  12448. "type": "string"
  12449. },
  12450. "workspace": {
  12451. "type": "string"
  12452. }
  12453. },
  12454. "additionalProperties": false
  12455. },
  12456. "required": false,
  12457. "style": "deepObject",
  12458. "explode": true
  12459. }
  12460. ],
  12461. "security": [],
  12462. "responses": {
  12463. "200": {
  12464. "description": "Success",
  12465. "content": {
  12466. "application/octet-stream": {
  12467. "schema": {
  12468. "type": "string",
  12469. "format": "binary"
  12470. }
  12471. }
  12472. }
  12473. },
  12474. "400": {
  12475. "description": "InvalidRequestError",
  12476. "content": {
  12477. "application/json": {
  12478. "schema": {
  12479. "$ref": "#/components/schemas/InvalidRequestError"
  12480. }
  12481. }
  12482. }
  12483. },
  12484. "401": {
  12485. "description": "UnauthorizedError",
  12486. "content": {
  12487. "application/json": {
  12488. "schema": {
  12489. "$ref": "#/components/schemas/UnauthorizedError"
  12490. }
  12491. }
  12492. }
  12493. }
  12494. },
  12495. "description": "Serve one file relative to the requested location.",
  12496. "summary": "Read file",
  12497. "x-codeSamples": [
  12498. {
  12499. "lang": "js",
  12500. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12501. }
  12502. ]
  12503. }
  12504. },
  12505. "/api/fs/list": {
  12506. "get": {
  12507. "tags": ["filesystem"],
  12508. "operationId": "v2.fs.list",
  12509. "parameters": [
  12510. {
  12511. "name": "location",
  12512. "in": "query",
  12513. "schema": {
  12514. "type": "object",
  12515. "properties": {
  12516. "directory": {
  12517. "type": "string"
  12518. },
  12519. "workspace": {
  12520. "type": "string"
  12521. }
  12522. },
  12523. "additionalProperties": false
  12524. },
  12525. "required": false,
  12526. "style": "deepObject",
  12527. "explode": true
  12528. },
  12529. {
  12530. "name": "path",
  12531. "in": "query",
  12532. "schema": {
  12533. "type": "string"
  12534. },
  12535. "required": false
  12536. }
  12537. ],
  12538. "security": [],
  12539. "responses": {
  12540. "200": {
  12541. "description": "Success",
  12542. "content": {
  12543. "application/json": {
  12544. "schema": {
  12545. "type": "object",
  12546. "properties": {
  12547. "location": {
  12548. "$ref": "#/components/schemas/LocationInfo"
  12549. },
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/FileSystemEntry"
  12554. }
  12555. }
  12556. },
  12557. "required": ["location", "data"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "400": {
  12564. "description": "InvalidRequestError",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/InvalidRequestError"
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "401": {
  12574. "description": "UnauthorizedError",
  12575. "content": {
  12576. "application/json": {
  12577. "schema": {
  12578. "$ref": "#/components/schemas/UnauthorizedError"
  12579. }
  12580. }
  12581. }
  12582. }
  12583. },
  12584. "description": "List direct children of one directory relative to the requested location.",
  12585. "summary": "List directory",
  12586. "x-codeSamples": [
  12587. {
  12588. "lang": "js",
  12589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12590. }
  12591. ]
  12592. }
  12593. },
  12594. "/api/fs/find": {
  12595. "get": {
  12596. "tags": ["filesystem"],
  12597. "operationId": "v2.fs.find",
  12598. "parameters": [
  12599. {
  12600. "name": "location",
  12601. "in": "query",
  12602. "schema": {
  12603. "type": "object",
  12604. "properties": {
  12605. "directory": {
  12606. "type": "string"
  12607. },
  12608. "workspace": {
  12609. "type": "string"
  12610. }
  12611. },
  12612. "additionalProperties": false
  12613. },
  12614. "required": false,
  12615. "style": "deepObject",
  12616. "explode": true
  12617. },
  12618. {
  12619. "name": "query",
  12620. "in": "query",
  12621. "schema": {
  12622. "type": "string"
  12623. },
  12624. "required": true
  12625. },
  12626. {
  12627. "name": "type",
  12628. "in": "query",
  12629. "schema": {
  12630. "type": "string",
  12631. "enum": ["file", "directory"]
  12632. },
  12633. "required": false
  12634. },
  12635. {
  12636. "name": "limit",
  12637. "in": "query",
  12638. "schema": {
  12639. "type": "string"
  12640. },
  12641. "required": false
  12642. }
  12643. ],
  12644. "security": [],
  12645. "responses": {
  12646. "200": {
  12647. "description": "Success",
  12648. "content": {
  12649. "application/json": {
  12650. "schema": {
  12651. "type": "object",
  12652. "properties": {
  12653. "location": {
  12654. "$ref": "#/components/schemas/LocationInfo"
  12655. },
  12656. "data": {
  12657. "type": "array",
  12658. "items": {
  12659. "$ref": "#/components/schemas/FileSystemEntry"
  12660. }
  12661. }
  12662. },
  12663. "required": ["location", "data"],
  12664. "additionalProperties": false
  12665. }
  12666. }
  12667. }
  12668. },
  12669. "400": {
  12670. "description": "InvalidRequestError",
  12671. "content": {
  12672. "application/json": {
  12673. "schema": {
  12674. "$ref": "#/components/schemas/InvalidRequestError"
  12675. }
  12676. }
  12677. }
  12678. },
  12679. "401": {
  12680. "description": "UnauthorizedError",
  12681. "content": {
  12682. "application/json": {
  12683. "schema": {
  12684. "$ref": "#/components/schemas/UnauthorizedError"
  12685. }
  12686. }
  12687. }
  12688. }
  12689. },
  12690. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12691. "summary": "Find files",
  12692. "x-codeSamples": [
  12693. {
  12694. "lang": "js",
  12695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12696. }
  12697. ]
  12698. }
  12699. },
  12700. "/api/command": {
  12701. "get": {
  12702. "tags": ["commands"],
  12703. "operationId": "v2.command.list",
  12704. "parameters": [
  12705. {
  12706. "name": "location",
  12707. "in": "query",
  12708. "schema": {
  12709. "type": "object",
  12710. "properties": {
  12711. "directory": {
  12712. "type": "string"
  12713. },
  12714. "workspace": {
  12715. "type": "string"
  12716. }
  12717. },
  12718. "additionalProperties": false
  12719. },
  12720. "required": false,
  12721. "style": "deepObject",
  12722. "explode": true
  12723. }
  12724. ],
  12725. "security": [],
  12726. "responses": {
  12727. "200": {
  12728. "description": "Success",
  12729. "content": {
  12730. "application/json": {
  12731. "schema": {
  12732. "type": "object",
  12733. "properties": {
  12734. "location": {
  12735. "$ref": "#/components/schemas/LocationInfo"
  12736. },
  12737. "data": {
  12738. "type": "array",
  12739. "items": {
  12740. "$ref": "#/components/schemas/CommandV2Info"
  12741. }
  12742. }
  12743. },
  12744. "required": ["location", "data"],
  12745. "additionalProperties": false
  12746. }
  12747. }
  12748. }
  12749. },
  12750. "400": {
  12751. "description": "InvalidRequestError",
  12752. "content": {
  12753. "application/json": {
  12754. "schema": {
  12755. "$ref": "#/components/schemas/InvalidRequestError"
  12756. }
  12757. }
  12758. }
  12759. },
  12760. "401": {
  12761. "description": "UnauthorizedError",
  12762. "content": {
  12763. "application/json": {
  12764. "schema": {
  12765. "$ref": "#/components/schemas/UnauthorizedError"
  12766. }
  12767. }
  12768. }
  12769. }
  12770. },
  12771. "description": "Retrieve currently registered commands.",
  12772. "summary": "List commands",
  12773. "x-codeSamples": [
  12774. {
  12775. "lang": "js",
  12776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  12777. }
  12778. ]
  12779. }
  12780. },
  12781. "/api/skill": {
  12782. "get": {
  12783. "tags": ["skills"],
  12784. "operationId": "v2.skill.list",
  12785. "parameters": [
  12786. {
  12787. "name": "location",
  12788. "in": "query",
  12789. "schema": {
  12790. "type": "object",
  12791. "properties": {
  12792. "directory": {
  12793. "type": "string"
  12794. },
  12795. "workspace": {
  12796. "type": "string"
  12797. }
  12798. },
  12799. "additionalProperties": false
  12800. },
  12801. "required": false,
  12802. "style": "deepObject",
  12803. "explode": true
  12804. }
  12805. ],
  12806. "security": [],
  12807. "responses": {
  12808. "200": {
  12809. "description": "Success",
  12810. "content": {
  12811. "application/json": {
  12812. "schema": {
  12813. "type": "object",
  12814. "properties": {
  12815. "location": {
  12816. "$ref": "#/components/schemas/LocationInfo"
  12817. },
  12818. "data": {
  12819. "type": "array",
  12820. "items": {
  12821. "$ref": "#/components/schemas/SkillV2Info"
  12822. }
  12823. }
  12824. },
  12825. "required": ["location", "data"],
  12826. "additionalProperties": false
  12827. }
  12828. }
  12829. }
  12830. },
  12831. "400": {
  12832. "description": "InvalidRequestError",
  12833. "content": {
  12834. "application/json": {
  12835. "schema": {
  12836. "$ref": "#/components/schemas/InvalidRequestError"
  12837. }
  12838. }
  12839. }
  12840. },
  12841. "401": {
  12842. "description": "UnauthorizedError",
  12843. "content": {
  12844. "application/json": {
  12845. "schema": {
  12846. "$ref": "#/components/schemas/UnauthorizedError"
  12847. }
  12848. }
  12849. }
  12850. }
  12851. },
  12852. "description": "Retrieve currently registered skills.",
  12853. "summary": "List skills",
  12854. "x-codeSamples": [
  12855. {
  12856. "lang": "js",
  12857. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12858. }
  12859. ]
  12860. }
  12861. },
  12862. "/api/event": {
  12863. "get": {
  12864. "tags": ["events"],
  12865. "operationId": "v2.event.subscribe",
  12866. "parameters": [
  12867. {
  12868. "name": "location",
  12869. "in": "query",
  12870. "schema": {
  12871. "type": "object",
  12872. "properties": {
  12873. "directory": {
  12874. "type": "string"
  12875. },
  12876. "workspace": {
  12877. "type": "string"
  12878. }
  12879. },
  12880. "additionalProperties": false
  12881. },
  12882. "required": false,
  12883. "style": "deepObject",
  12884. "explode": true
  12885. }
  12886. ],
  12887. "security": [],
  12888. "responses": {
  12889. "200": {
  12890. "description": "Success",
  12891. "content": {
  12892. "text/event-stream": {
  12893. "schema": {
  12894. "type": "string"
  12895. }
  12896. }
  12897. }
  12898. },
  12899. "400": {
  12900. "description": "InvalidRequestError",
  12901. "content": {
  12902. "application/json": {
  12903. "schema": {
  12904. "$ref": "#/components/schemas/InvalidRequestError"
  12905. }
  12906. }
  12907. }
  12908. },
  12909. "401": {
  12910. "description": "UnauthorizedError",
  12911. "content": {
  12912. "application/json": {
  12913. "schema": {
  12914. "$ref": "#/components/schemas/UnauthorizedError"
  12915. }
  12916. }
  12917. }
  12918. }
  12919. },
  12920. "description": "Subscribe to native event payloads for a location.",
  12921. "summary": "Subscribe to events",
  12922. "x-codeSamples": [
  12923. {
  12924. "lang": "js",
  12925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  12926. }
  12927. ]
  12928. }
  12929. },
  12930. "/api/question/request": {
  12931. "get": {
  12932. "tags": ["session questions"],
  12933. "operationId": "v2.question.request.list",
  12934. "parameters": [
  12935. {
  12936. "name": "location",
  12937. "in": "query",
  12938. "schema": {
  12939. "type": "object",
  12940. "properties": {
  12941. "directory": {
  12942. "type": "string"
  12943. },
  12944. "workspace": {
  12945. "type": "string"
  12946. }
  12947. },
  12948. "additionalProperties": false
  12949. },
  12950. "required": false,
  12951. "style": "deepObject",
  12952. "explode": true
  12953. }
  12954. ],
  12955. "security": [],
  12956. "responses": {
  12957. "200": {
  12958. "description": "Success",
  12959. "content": {
  12960. "application/json": {
  12961. "schema": {
  12962. "type": "object",
  12963. "properties": {
  12964. "location": {
  12965. "$ref": "#/components/schemas/LocationInfo"
  12966. },
  12967. "data": {
  12968. "type": "array",
  12969. "items": {
  12970. "$ref": "#/components/schemas/QuestionV2Request"
  12971. }
  12972. }
  12973. },
  12974. "required": ["location", "data"],
  12975. "additionalProperties": false
  12976. }
  12977. }
  12978. }
  12979. },
  12980. "400": {
  12981. "description": "InvalidRequestError",
  12982. "content": {
  12983. "application/json": {
  12984. "schema": {
  12985. "$ref": "#/components/schemas/InvalidRequestError"
  12986. }
  12987. }
  12988. }
  12989. },
  12990. "401": {
  12991. "description": "UnauthorizedError",
  12992. "content": {
  12993. "application/json": {
  12994. "schema": {
  12995. "$ref": "#/components/schemas/UnauthorizedError"
  12996. }
  12997. }
  12998. }
  12999. }
  13000. },
  13001. "description": "Retrieve pending question requests for a location.",
  13002. "summary": "List pending question requests",
  13003. "x-codeSamples": [
  13004. {
  13005. "lang": "js",
  13006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13007. }
  13008. ]
  13009. }
  13010. },
  13011. "/api/session/{sessionID}/question": {
  13012. "get": {
  13013. "tags": ["session questions"],
  13014. "operationId": "v2.session.question.list",
  13015. "parameters": [
  13016. {
  13017. "name": "sessionID",
  13018. "in": "path",
  13019. "schema": {
  13020. "type": "string",
  13021. "pattern": "^ses"
  13022. },
  13023. "required": true
  13024. }
  13025. ],
  13026. "security": [],
  13027. "responses": {
  13028. "200": {
  13029. "description": "Success",
  13030. "content": {
  13031. "application/json": {
  13032. "schema": {
  13033. "type": "object",
  13034. "properties": {
  13035. "data": {
  13036. "type": "array",
  13037. "items": {
  13038. "$ref": "#/components/schemas/QuestionV2Request"
  13039. }
  13040. }
  13041. },
  13042. "required": ["data"],
  13043. "additionalProperties": false
  13044. }
  13045. }
  13046. }
  13047. },
  13048. "400": {
  13049. "description": "InvalidRequestError",
  13050. "content": {
  13051. "application/json": {
  13052. "schema": {
  13053. "$ref": "#/components/schemas/InvalidRequestError"
  13054. }
  13055. }
  13056. }
  13057. },
  13058. "401": {
  13059. "description": "UnauthorizedError",
  13060. "content": {
  13061. "application/json": {
  13062. "schema": {
  13063. "$ref": "#/components/schemas/UnauthorizedError"
  13064. }
  13065. }
  13066. }
  13067. },
  13068. "404": {
  13069. "description": "SessionNotFoundError",
  13070. "content": {
  13071. "application/json": {
  13072. "schema": {
  13073. "anyOf": [
  13074. {
  13075. "$ref": "#/components/schemas/SessionNotFoundError"
  13076. },
  13077. {
  13078. "$ref": "#/components/schemas/SessionNotFoundError"
  13079. }
  13080. ]
  13081. }
  13082. }
  13083. }
  13084. }
  13085. },
  13086. "description": "Retrieve pending question requests owned by a session.",
  13087. "summary": "List session question requests",
  13088. "x-codeSamples": [
  13089. {
  13090. "lang": "js",
  13091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  13092. }
  13093. ]
  13094. }
  13095. },
  13096. "/api/session/{sessionID}/question/{requestID}/reply": {
  13097. "post": {
  13098. "tags": ["session questions"],
  13099. "operationId": "v2.session.question.reply",
  13100. "parameters": [
  13101. {
  13102. "name": "sessionID",
  13103. "in": "path",
  13104. "schema": {
  13105. "type": "string",
  13106. "pattern": "^ses"
  13107. },
  13108. "required": true
  13109. },
  13110. {
  13111. "name": "requestID",
  13112. "in": "path",
  13113. "schema": {
  13114. "type": "string",
  13115. "pattern": "^que"
  13116. },
  13117. "required": true
  13118. }
  13119. ],
  13120. "security": [],
  13121. "responses": {
  13122. "204": {
  13123. "description": "<No Content>"
  13124. },
  13125. "400": {
  13126. "description": "InvalidRequestError",
  13127. "content": {
  13128. "application/json": {
  13129. "schema": {
  13130. "$ref": "#/components/schemas/InvalidRequestError"
  13131. }
  13132. }
  13133. }
  13134. },
  13135. "401": {
  13136. "description": "UnauthorizedError",
  13137. "content": {
  13138. "application/json": {
  13139. "schema": {
  13140. "$ref": "#/components/schemas/UnauthorizedError"
  13141. }
  13142. }
  13143. }
  13144. },
  13145. "404": {
  13146. "description": "SessionNotFoundError | QuestionNotFoundError",
  13147. "content": {
  13148. "application/json": {
  13149. "schema": {
  13150. "anyOf": [
  13151. {
  13152. "$ref": "#/components/schemas/QuestionNotFoundError"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/SessionNotFoundError"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/SessionNotFoundError"
  13159. }
  13160. ]
  13161. }
  13162. }
  13163. }
  13164. }
  13165. },
  13166. "description": "Answer a pending question request owned by a session.",
  13167. "summary": "Reply to pending question request",
  13168. "requestBody": {
  13169. "content": {
  13170. "application/json": {
  13171. "schema": {
  13172. "$ref": "#/components/schemas/QuestionV2Reply"
  13173. }
  13174. }
  13175. },
  13176. "required": true
  13177. },
  13178. "x-codeSamples": [
  13179. {
  13180. "lang": "js",
  13181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  13182. }
  13183. ]
  13184. }
  13185. },
  13186. "/api/session/{sessionID}/question/{requestID}/reject": {
  13187. "post": {
  13188. "tags": ["session questions"],
  13189. "operationId": "v2.session.question.reject",
  13190. "parameters": [
  13191. {
  13192. "name": "sessionID",
  13193. "in": "path",
  13194. "schema": {
  13195. "type": "string",
  13196. "pattern": "^ses"
  13197. },
  13198. "required": true
  13199. },
  13200. {
  13201. "name": "requestID",
  13202. "in": "path",
  13203. "schema": {
  13204. "type": "string",
  13205. "pattern": "^que"
  13206. },
  13207. "required": true
  13208. }
  13209. ],
  13210. "security": [],
  13211. "responses": {
  13212. "204": {
  13213. "description": "<No Content>"
  13214. },
  13215. "400": {
  13216. "description": "InvalidRequestError",
  13217. "content": {
  13218. "application/json": {
  13219. "schema": {
  13220. "$ref": "#/components/schemas/InvalidRequestError"
  13221. }
  13222. }
  13223. }
  13224. },
  13225. "401": {
  13226. "description": "UnauthorizedError",
  13227. "content": {
  13228. "application/json": {
  13229. "schema": {
  13230. "$ref": "#/components/schemas/UnauthorizedError"
  13231. }
  13232. }
  13233. }
  13234. },
  13235. "404": {
  13236. "description": "SessionNotFoundError | QuestionNotFoundError",
  13237. "content": {
  13238. "application/json": {
  13239. "schema": {
  13240. "anyOf": [
  13241. {
  13242. "$ref": "#/components/schemas/QuestionNotFoundError"
  13243. },
  13244. {
  13245. "$ref": "#/components/schemas/SessionNotFoundError"
  13246. },
  13247. {
  13248. "$ref": "#/components/schemas/SessionNotFoundError"
  13249. }
  13250. ]
  13251. }
  13252. }
  13253. }
  13254. }
  13255. },
  13256. "description": "Reject a pending question request owned by a session.",
  13257. "summary": "Reject pending question request",
  13258. "x-codeSamples": [
  13259. {
  13260. "lang": "js",
  13261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  13262. }
  13263. ]
  13264. }
  13265. },
  13266. "/api/reference": {
  13267. "get": {
  13268. "tags": ["reference"],
  13269. "operationId": "v2.reference.list",
  13270. "parameters": [
  13271. {
  13272. "name": "location",
  13273. "in": "query",
  13274. "schema": {
  13275. "type": "object",
  13276. "properties": {
  13277. "directory": {
  13278. "type": "string"
  13279. },
  13280. "workspace": {
  13281. "type": "string"
  13282. }
  13283. },
  13284. "additionalProperties": false
  13285. },
  13286. "required": false,
  13287. "style": "deepObject",
  13288. "explode": true
  13289. }
  13290. ],
  13291. "security": [],
  13292. "responses": {
  13293. "200": {
  13294. "description": "Success",
  13295. "content": {
  13296. "application/json": {
  13297. "schema": {
  13298. "type": "object",
  13299. "properties": {
  13300. "location": {
  13301. "$ref": "#/components/schemas/LocationInfo"
  13302. },
  13303. "data": {
  13304. "type": "array",
  13305. "items": {
  13306. "$ref": "#/components/schemas/ReferenceInfo"
  13307. }
  13308. }
  13309. },
  13310. "required": ["location", "data"],
  13311. "additionalProperties": false
  13312. }
  13313. }
  13314. }
  13315. },
  13316. "400": {
  13317. "description": "InvalidRequestError",
  13318. "content": {
  13319. "application/json": {
  13320. "schema": {
  13321. "$ref": "#/components/schemas/InvalidRequestError"
  13322. }
  13323. }
  13324. }
  13325. },
  13326. "401": {
  13327. "description": "UnauthorizedError",
  13328. "content": {
  13329. "application/json": {
  13330. "schema": {
  13331. "$ref": "#/components/schemas/UnauthorizedError"
  13332. }
  13333. }
  13334. }
  13335. }
  13336. },
  13337. "description": "List references available in the requested location.",
  13338. "summary": "List references",
  13339. "x-codeSamples": [
  13340. {
  13341. "lang": "js",
  13342. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  13343. }
  13344. ]
  13345. }
  13346. },
  13347. "/experimental/project/{projectID}/copy": {
  13348. "post": {
  13349. "tags": ["projectCopy"],
  13350. "operationId": "v2.projectCopy.create",
  13351. "parameters": [
  13352. {
  13353. "name": "projectID",
  13354. "in": "path",
  13355. "schema": {
  13356. "type": "string"
  13357. },
  13358. "required": true
  13359. },
  13360. {
  13361. "name": "location",
  13362. "in": "query",
  13363. "schema": {
  13364. "type": "object",
  13365. "properties": {
  13366. "directory": {
  13367. "type": "string"
  13368. },
  13369. "workspace": {
  13370. "type": "string"
  13371. }
  13372. },
  13373. "additionalProperties": false
  13374. },
  13375. "required": false,
  13376. "style": "deepObject",
  13377. "explode": true
  13378. }
  13379. ],
  13380. "responses": {
  13381. "200": {
  13382. "description": "ProjectCopy.Copy",
  13383. "content": {
  13384. "application/json": {
  13385. "schema": {
  13386. "$ref": "#/components/schemas/ProjectCopyCopy"
  13387. }
  13388. }
  13389. }
  13390. },
  13391. "400": {
  13392. "description": "ProjectCopyError | InvalidRequestError",
  13393. "content": {
  13394. "application/json": {
  13395. "schema": {
  13396. "anyOf": [
  13397. {
  13398. "$ref": "#/components/schemas/ProjectCopyError"
  13399. },
  13400. {
  13401. "$ref": "#/components/schemas/InvalidRequestError"
  13402. }
  13403. ]
  13404. }
  13405. }
  13406. }
  13407. }
  13408. },
  13409. "requestBody": {
  13410. "content": {
  13411. "application/json": {
  13412. "schema": {
  13413. "type": "object",
  13414. "properties": {
  13415. "strategy": {
  13416. "type": "string"
  13417. },
  13418. "directory": {
  13419. "type": "string"
  13420. },
  13421. "name": {
  13422. "type": "string"
  13423. }
  13424. },
  13425. "required": ["strategy", "directory"],
  13426. "additionalProperties": false
  13427. }
  13428. }
  13429. }
  13430. },
  13431. "x-codeSamples": [
  13432. {
  13433. "lang": "js",
  13434. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  13435. }
  13436. ]
  13437. },
  13438. "delete": {
  13439. "tags": ["projectCopy"],
  13440. "operationId": "v2.projectCopy.remove",
  13441. "parameters": [
  13442. {
  13443. "name": "projectID",
  13444. "in": "path",
  13445. "schema": {
  13446. "type": "string"
  13447. },
  13448. "required": true
  13449. },
  13450. {
  13451. "name": "location",
  13452. "in": "query",
  13453. "schema": {
  13454. "type": "object",
  13455. "properties": {
  13456. "directory": {
  13457. "type": "string"
  13458. },
  13459. "workspace": {
  13460. "type": "string"
  13461. }
  13462. },
  13463. "additionalProperties": false
  13464. },
  13465. "required": false,
  13466. "style": "deepObject",
  13467. "explode": true
  13468. }
  13469. ],
  13470. "responses": {
  13471. "204": {
  13472. "description": "<No Content>"
  13473. },
  13474. "400": {
  13475. "description": "ProjectCopyError | InvalidRequestError",
  13476. "content": {
  13477. "application/json": {
  13478. "schema": {
  13479. "anyOf": [
  13480. {
  13481. "$ref": "#/components/schemas/ProjectCopyError"
  13482. },
  13483. {
  13484. "$ref": "#/components/schemas/InvalidRequestError"
  13485. }
  13486. ]
  13487. }
  13488. }
  13489. }
  13490. }
  13491. },
  13492. "requestBody": {
  13493. "content": {
  13494. "application/json": {
  13495. "schema": {
  13496. "type": "object",
  13497. "properties": {
  13498. "directory": {
  13499. "type": "string"
  13500. },
  13501. "force": {
  13502. "type": "boolean"
  13503. }
  13504. },
  13505. "required": ["directory", "force"],
  13506. "additionalProperties": false
  13507. }
  13508. }
  13509. }
  13510. },
  13511. "x-codeSamples": [
  13512. {
  13513. "lang": "js",
  13514. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  13515. }
  13516. ]
  13517. }
  13518. },
  13519. "/experimental/project/{projectID}/copy/refresh": {
  13520. "post": {
  13521. "tags": ["projectCopy"],
  13522. "operationId": "v2.projectCopy.refresh",
  13523. "parameters": [
  13524. {
  13525. "name": "projectID",
  13526. "in": "path",
  13527. "schema": {
  13528. "type": "string"
  13529. },
  13530. "required": true
  13531. },
  13532. {
  13533. "name": "location",
  13534. "in": "query",
  13535. "schema": {
  13536. "type": "object",
  13537. "properties": {
  13538. "directory": {
  13539. "type": "string"
  13540. },
  13541. "workspace": {
  13542. "type": "string"
  13543. }
  13544. },
  13545. "additionalProperties": false
  13546. },
  13547. "required": false,
  13548. "style": "deepObject",
  13549. "explode": true
  13550. }
  13551. ],
  13552. "responses": {
  13553. "204": {
  13554. "description": "<No Content>"
  13555. },
  13556. "400": {
  13557. "description": "ProjectCopyError | InvalidRequestError",
  13558. "content": {
  13559. "application/json": {
  13560. "schema": {
  13561. "anyOf": [
  13562. {
  13563. "$ref": "#/components/schemas/ProjectCopyError"
  13564. },
  13565. {
  13566. "$ref": "#/components/schemas/InvalidRequestError"
  13567. }
  13568. ]
  13569. }
  13570. }
  13571. }
  13572. }
  13573. },
  13574. "x-codeSamples": [
  13575. {
  13576. "lang": "js",
  13577. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  13578. }
  13579. ]
  13580. }
  13581. },
  13582. "/pty/{ptyID}/connect": {
  13583. "get": {
  13584. "tags": ["pty"],
  13585. "operationId": "pty.connect",
  13586. "parameters": [
  13587. {
  13588. "name": "ptyID",
  13589. "in": "path",
  13590. "schema": {
  13591. "type": "string",
  13592. "pattern": "^pty"
  13593. },
  13594. "required": true
  13595. },
  13596. {
  13597. "in": "query",
  13598. "name": "directory",
  13599. "schema": {
  13600. "type": "string"
  13601. }
  13602. },
  13603. {
  13604. "in": "query",
  13605. "name": "workspace",
  13606. "schema": {
  13607. "type": "string"
  13608. }
  13609. },
  13610. {
  13611. "in": "query",
  13612. "name": "cursor",
  13613. "schema": {
  13614. "type": "string"
  13615. }
  13616. },
  13617. {
  13618. "in": "query",
  13619. "name": "ticket",
  13620. "schema": {
  13621. "type": "string"
  13622. }
  13623. }
  13624. ],
  13625. "responses": {
  13626. "200": {
  13627. "description": "Connected session",
  13628. "content": {
  13629. "application/json": {
  13630. "schema": {
  13631. "type": "boolean",
  13632. "description": "Connected session"
  13633. }
  13634. }
  13635. }
  13636. },
  13637. "403": {
  13638. "description": "Forbidden",
  13639. "content": {
  13640. "application/json": {
  13641. "schema": {
  13642. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  13643. }
  13644. }
  13645. }
  13646. },
  13647. "404": {
  13648. "description": "Not found",
  13649. "content": {
  13650. "application/json": {
  13651. "schema": {
  13652. "$ref": "#/components/schemas/NotFoundError"
  13653. }
  13654. }
  13655. }
  13656. }
  13657. },
  13658. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  13659. "summary": "Connect to PTY session",
  13660. "x-codeSamples": [
  13661. {
  13662. "lang": "js",
  13663. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  13664. }
  13665. ]
  13666. }
  13667. }
  13668. },
  13669. "components": {
  13670. "schemas": {
  13671. "Event": {
  13672. "anyOf": [
  13673. {
  13674. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13675. },
  13676. {
  13677. "$ref": "#/components/schemas/EventPluginAdded"
  13678. },
  13679. {
  13680. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13681. },
  13682. {
  13683. "$ref": "#/components/schemas/EventSessionCreated"
  13684. },
  13685. {
  13686. "$ref": "#/components/schemas/EventSessionUpdated"
  13687. },
  13688. {
  13689. "$ref": "#/components/schemas/EventSessionDeleted"
  13690. },
  13691. {
  13692. "$ref": "#/components/schemas/EventMessageUpdated"
  13693. },
  13694. {
  13695. "$ref": "#/components/schemas/EventMessageRemoved"
  13696. },
  13697. {
  13698. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13699. },
  13700. {
  13701. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13702. },
  13703. {
  13704. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13705. },
  13706. {
  13707. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13708. },
  13709. {
  13710. "$ref": "#/components/schemas/EventSessionNextMoved"
  13711. },
  13712. {
  13713. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13714. },
  13715. {
  13716. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  13717. },
  13718. {
  13719. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  13720. },
  13721. {
  13722. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  13723. },
  13724. {
  13725. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  13726. },
  13727. {
  13728. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13729. },
  13730. {
  13731. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13732. },
  13733. {
  13734. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13735. },
  13736. {
  13737. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13738. },
  13739. {
  13740. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13741. },
  13742. {
  13743. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13744. },
  13745. {
  13746. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13747. },
  13748. {
  13749. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13750. },
  13751. {
  13752. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13753. },
  13754. {
  13755. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13756. },
  13757. {
  13758. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13759. },
  13760. {
  13761. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13762. },
  13763. {
  13764. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13765. },
  13766. {
  13767. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13768. },
  13769. {
  13770. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13771. },
  13772. {
  13773. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13774. },
  13775. {
  13776. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13777. },
  13778. {
  13779. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13780. },
  13781. {
  13782. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13783. },
  13784. {
  13785. "$ref": "#/components/schemas/EventSessionNextRetried"
  13786. },
  13787. {
  13788. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13789. },
  13790. {
  13791. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13792. },
  13793. {
  13794. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13795. },
  13796. {
  13797. "$ref": "#/components/schemas/EventMessagePartDelta"
  13798. },
  13799. {
  13800. "$ref": "#/components/schemas/EventSessionDiff"
  13801. },
  13802. {
  13803. "$ref": "#/components/schemas/EventSessionError"
  13804. },
  13805. {
  13806. "$ref": "#/components/schemas/EventInstallationUpdated"
  13807. },
  13808. {
  13809. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13810. },
  13811. {
  13812. "$ref": "#/components/schemas/EventFileEdited"
  13813. },
  13814. {
  13815. "$ref": "#/components/schemas/EventIntegrationUpdated"
  13816. },
  13817. {
  13818. "$ref": "#/components/schemas/EventPermissionV2Asked"
  13819. },
  13820. {
  13821. "$ref": "#/components/schemas/EventPermissionV2Replied"
  13822. },
  13823. {
  13824. "$ref": "#/components/schemas/EventReferenceUpdated"
  13825. },
  13826. {
  13827. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  13828. },
  13829. {
  13830. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  13831. },
  13832. {
  13833. "$ref": "#/components/schemas/EventPtyCreated"
  13834. },
  13835. {
  13836. "$ref": "#/components/schemas/EventPtyUpdated"
  13837. },
  13838. {
  13839. "$ref": "#/components/schemas/EventPtyExited"
  13840. },
  13841. {
  13842. "$ref": "#/components/schemas/EventPtyDeleted"
  13843. },
  13844. {
  13845. "$ref": "#/components/schemas/EventQuestionV2Asked"
  13846. },
  13847. {
  13848. "$ref": "#/components/schemas/EventQuestionV2Replied"
  13849. },
  13850. {
  13851. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  13852. },
  13853. {
  13854. "$ref": "#/components/schemas/EventTodoUpdated"
  13855. },
  13856. {
  13857. "$ref": "#/components/schemas/EventLspUpdated"
  13858. },
  13859. {
  13860. "$ref": "#/components/schemas/EventPermissionAsked"
  13861. },
  13862. {
  13863. "$ref": "#/components/schemas/EventPermissionReplied"
  13864. },
  13865. {
  13866. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13867. },
  13868. {
  13869. "$ref": "#/components/schemas/Event.tui.command.execute"
  13870. },
  13871. {
  13872. "$ref": "#/components/schemas/Event.tui.toast.show"
  13873. },
  13874. {
  13875. "$ref": "#/components/schemas/Event.tui.session.select"
  13876. },
  13877. {
  13878. "$ref": "#/components/schemas/EventMcpToolsChanged"
  13879. },
  13880. {
  13881. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  13882. },
  13883. {
  13884. "$ref": "#/components/schemas/EventCommandExecuted"
  13885. },
  13886. {
  13887. "$ref": "#/components/schemas/EventProjectUpdated"
  13888. },
  13889. {
  13890. "$ref": "#/components/schemas/EventSessionStatus"
  13891. },
  13892. {
  13893. "$ref": "#/components/schemas/EventSessionIdle"
  13894. },
  13895. {
  13896. "$ref": "#/components/schemas/EventQuestionAsked"
  13897. },
  13898. {
  13899. "$ref": "#/components/schemas/EventQuestionReplied"
  13900. },
  13901. {
  13902. "$ref": "#/components/schemas/EventQuestionRejected"
  13903. },
  13904. {
  13905. "$ref": "#/components/schemas/EventSessionCompacted"
  13906. },
  13907. {
  13908. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  13909. },
  13910. {
  13911. "$ref": "#/components/schemas/EventWorkspaceReady"
  13912. },
  13913. {
  13914. "$ref": "#/components/schemas/EventWorkspaceFailed"
  13915. },
  13916. {
  13917. "$ref": "#/components/schemas/EventWorkspaceStatus"
  13918. },
  13919. {
  13920. "$ref": "#/components/schemas/EventWorktreeReady"
  13921. },
  13922. {
  13923. "$ref": "#/components/schemas/EventWorktreeFailed"
  13924. },
  13925. {
  13926. "$ref": "#/components/schemas/EventServerConnected"
  13927. },
  13928. {
  13929. "$ref": "#/components/schemas/EventGlobalDisposed"
  13930. },
  13931. {
  13932. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  13933. }
  13934. ]
  13935. },
  13936. "QuestionReplied": {
  13937. "type": "object",
  13938. "properties": {
  13939. "sessionID": {
  13940. "type": "string",
  13941. "pattern": "^ses"
  13942. },
  13943. "requestID": {
  13944. "type": "string",
  13945. "pattern": "^que"
  13946. },
  13947. "answers": {
  13948. "type": "array",
  13949. "items": {
  13950. "$ref": "#/components/schemas/QuestionAnswer"
  13951. }
  13952. }
  13953. },
  13954. "required": ["sessionID", "requestID", "answers"],
  13955. "additionalProperties": false
  13956. },
  13957. "QuestionRejected": {
  13958. "type": "object",
  13959. "properties": {
  13960. "sessionID": {
  13961. "type": "string",
  13962. "pattern": "^ses"
  13963. },
  13964. "requestID": {
  13965. "type": "string",
  13966. "pattern": "^que"
  13967. }
  13968. },
  13969. "required": ["sessionID", "requestID"],
  13970. "additionalProperties": false
  13971. },
  13972. "OAuth": {
  13973. "type": "object",
  13974. "properties": {
  13975. "type": {
  13976. "type": "string",
  13977. "enum": ["oauth"]
  13978. },
  13979. "refresh": {
  13980. "type": "string"
  13981. },
  13982. "access": {
  13983. "type": "string"
  13984. },
  13985. "expires": {
  13986. "type": "integer",
  13987. "minimum": 0
  13988. },
  13989. "accountId": {
  13990. "type": "string"
  13991. },
  13992. "enterpriseUrl": {
  13993. "type": "string"
  13994. }
  13995. },
  13996. "required": ["type", "refresh", "access", "expires"],
  13997. "additionalProperties": false
  13998. },
  13999. "ApiAuth": {
  14000. "type": "object",
  14001. "properties": {
  14002. "type": {
  14003. "type": "string",
  14004. "enum": ["api"]
  14005. },
  14006. "key": {
  14007. "type": "string"
  14008. },
  14009. "metadata": {
  14010. "type": "object",
  14011. "additionalProperties": {
  14012. "type": "string"
  14013. }
  14014. }
  14015. },
  14016. "required": ["type", "key"],
  14017. "additionalProperties": false
  14018. },
  14019. "WellKnownAuth": {
  14020. "type": "object",
  14021. "properties": {
  14022. "type": {
  14023. "type": "string",
  14024. "enum": ["wellknown"]
  14025. },
  14026. "key": {
  14027. "type": "string"
  14028. },
  14029. "token": {
  14030. "type": "string"
  14031. }
  14032. },
  14033. "required": ["type", "key", "token"],
  14034. "additionalProperties": false
  14035. },
  14036. "Auth": {
  14037. "anyOf": [
  14038. {
  14039. "$ref": "#/components/schemas/OAuth"
  14040. },
  14041. {
  14042. "$ref": "#/components/schemas/ApiAuth"
  14043. },
  14044. {
  14045. "$ref": "#/components/schemas/WellKnownAuth"
  14046. }
  14047. ]
  14048. },
  14049. "effect_HttpApiError_BadRequest": {
  14050. "type": "object",
  14051. "properties": {
  14052. "_tag": {
  14053. "type": "string",
  14054. "enum": ["BadRequest"]
  14055. }
  14056. },
  14057. "required": ["_tag"],
  14058. "additionalProperties": false
  14059. },
  14060. "InvalidRequestError": {
  14061. "type": "object",
  14062. "properties": {
  14063. "_tag": {
  14064. "type": "string",
  14065. "enum": ["InvalidRequestError"]
  14066. },
  14067. "message": {
  14068. "type": "string"
  14069. },
  14070. "kind": {
  14071. "type": "string"
  14072. },
  14073. "field": {
  14074. "type": "string"
  14075. }
  14076. },
  14077. "required": ["_tag", "message"],
  14078. "additionalProperties": false
  14079. },
  14080. "MoveSessionError": {
  14081. "type": "object",
  14082. "properties": {
  14083. "name": {
  14084. "type": "string",
  14085. "enum": ["MoveSessionError"]
  14086. },
  14087. "data": {
  14088. "type": "object",
  14089. "properties": {
  14090. "message": {
  14091. "type": "string"
  14092. }
  14093. },
  14094. "required": ["message"],
  14095. "additionalProperties": false
  14096. }
  14097. },
  14098. "required": ["name", "data"],
  14099. "additionalProperties": false
  14100. },
  14101. "SnapshotFileDiff": {
  14102. "type": "object",
  14103. "properties": {
  14104. "file": {
  14105. "type": "string"
  14106. },
  14107. "patch": {
  14108. "type": "string"
  14109. },
  14110. "additions": {
  14111. "type": "number"
  14112. },
  14113. "deletions": {
  14114. "type": "number"
  14115. },
  14116. "status": {
  14117. "type": "string",
  14118. "enum": ["added", "deleted", "modified"]
  14119. }
  14120. },
  14121. "required": ["additions", "deletions"],
  14122. "additionalProperties": false
  14123. },
  14124. "PermissionAction": {
  14125. "type": "string",
  14126. "enum": ["allow", "deny", "ask"]
  14127. },
  14128. "PermissionRule": {
  14129. "type": "object",
  14130. "properties": {
  14131. "permission": {
  14132. "type": "string"
  14133. },
  14134. "pattern": {
  14135. "type": "string"
  14136. },
  14137. "action": {
  14138. "$ref": "#/components/schemas/PermissionAction"
  14139. }
  14140. },
  14141. "required": ["permission", "pattern", "action"],
  14142. "additionalProperties": false
  14143. },
  14144. "PermissionRuleset": {
  14145. "type": "array",
  14146. "items": {
  14147. "$ref": "#/components/schemas/PermissionRule"
  14148. }
  14149. },
  14150. "Session": {
  14151. "type": "object",
  14152. "properties": {
  14153. "id": {
  14154. "type": "string",
  14155. "pattern": "^ses"
  14156. },
  14157. "slug": {
  14158. "type": "string"
  14159. },
  14160. "projectID": {
  14161. "type": "string"
  14162. },
  14163. "workspaceID": {
  14164. "type": "string",
  14165. "pattern": "^wrk"
  14166. },
  14167. "directory": {
  14168. "type": "string"
  14169. },
  14170. "path": {
  14171. "type": "string"
  14172. },
  14173. "parentID": {
  14174. "type": "string",
  14175. "pattern": "^ses"
  14176. },
  14177. "summary": {
  14178. "type": "object",
  14179. "properties": {
  14180. "additions": {
  14181. "type": "number"
  14182. },
  14183. "deletions": {
  14184. "type": "number"
  14185. },
  14186. "files": {
  14187. "type": "number"
  14188. },
  14189. "diffs": {
  14190. "type": "array",
  14191. "items": {
  14192. "$ref": "#/components/schemas/SnapshotFileDiff"
  14193. }
  14194. }
  14195. },
  14196. "required": ["additions", "deletions", "files"],
  14197. "additionalProperties": false
  14198. },
  14199. "cost": {
  14200. "type": "number"
  14201. },
  14202. "tokens": {
  14203. "type": "object",
  14204. "properties": {
  14205. "input": {
  14206. "type": "number"
  14207. },
  14208. "output": {
  14209. "type": "number"
  14210. },
  14211. "reasoning": {
  14212. "type": "number"
  14213. },
  14214. "cache": {
  14215. "type": "object",
  14216. "properties": {
  14217. "read": {
  14218. "type": "number"
  14219. },
  14220. "write": {
  14221. "type": "number"
  14222. }
  14223. },
  14224. "required": ["read", "write"],
  14225. "additionalProperties": false
  14226. }
  14227. },
  14228. "required": ["input", "output", "reasoning", "cache"],
  14229. "additionalProperties": false
  14230. },
  14231. "share": {
  14232. "type": "object",
  14233. "properties": {
  14234. "url": {
  14235. "type": "string"
  14236. }
  14237. },
  14238. "required": ["url"],
  14239. "additionalProperties": false
  14240. },
  14241. "title": {
  14242. "type": "string"
  14243. },
  14244. "agent": {
  14245. "type": "string"
  14246. },
  14247. "model": {
  14248. "type": "object",
  14249. "properties": {
  14250. "id": {
  14251. "type": "string"
  14252. },
  14253. "providerID": {
  14254. "type": "string"
  14255. },
  14256. "variant": {
  14257. "type": "string"
  14258. }
  14259. },
  14260. "required": ["id", "providerID"],
  14261. "additionalProperties": false
  14262. },
  14263. "version": {
  14264. "type": "string"
  14265. },
  14266. "metadata": {
  14267. "type": "object"
  14268. },
  14269. "time": {
  14270. "type": "object",
  14271. "properties": {
  14272. "created": {
  14273. "type": "integer",
  14274. "minimum": 0
  14275. },
  14276. "updated": {
  14277. "type": "integer",
  14278. "minimum": 0
  14279. },
  14280. "compacting": {
  14281. "type": "integer",
  14282. "minimum": 0
  14283. },
  14284. "archived": {
  14285. "type": "number"
  14286. }
  14287. },
  14288. "required": ["created", "updated"],
  14289. "additionalProperties": false
  14290. },
  14291. "permission": {
  14292. "$ref": "#/components/schemas/PermissionRuleset"
  14293. },
  14294. "revert": {
  14295. "type": "object",
  14296. "properties": {
  14297. "messageID": {
  14298. "type": "string",
  14299. "pattern": "^msg"
  14300. },
  14301. "partID": {
  14302. "type": "string",
  14303. "pattern": "^prt"
  14304. },
  14305. "snapshot": {
  14306. "type": "string"
  14307. },
  14308. "diff": {
  14309. "type": "string"
  14310. }
  14311. },
  14312. "required": ["messageID"],
  14313. "additionalProperties": false
  14314. }
  14315. },
  14316. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  14317. "additionalProperties": false
  14318. },
  14319. "OutputFormatText": {
  14320. "type": "object",
  14321. "properties": {
  14322. "type": {
  14323. "type": "string",
  14324. "enum": ["text"]
  14325. }
  14326. },
  14327. "required": ["type"],
  14328. "additionalProperties": false
  14329. },
  14330. "JSONSchema": {
  14331. "type": "object"
  14332. },
  14333. "OutputFormatJsonSchema": {
  14334. "type": "object",
  14335. "properties": {
  14336. "type": {
  14337. "type": "string",
  14338. "enum": ["json_schema"]
  14339. },
  14340. "schema": {
  14341. "$ref": "#/components/schemas/JSONSchema"
  14342. },
  14343. "retryCount": {
  14344. "type": "integer",
  14345. "minimum": 0
  14346. }
  14347. },
  14348. "required": ["type", "schema"],
  14349. "additionalProperties": false
  14350. },
  14351. "OutputFormat": {
  14352. "anyOf": [
  14353. {
  14354. "$ref": "#/components/schemas/OutputFormatText"
  14355. },
  14356. {
  14357. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  14358. }
  14359. ]
  14360. },
  14361. "UserMessage": {
  14362. "type": "object",
  14363. "properties": {
  14364. "id": {
  14365. "type": "string",
  14366. "pattern": "^msg"
  14367. },
  14368. "sessionID": {
  14369. "type": "string",
  14370. "pattern": "^ses"
  14371. },
  14372. "role": {
  14373. "type": "string",
  14374. "enum": ["user"]
  14375. },
  14376. "time": {
  14377. "type": "object",
  14378. "properties": {
  14379. "created": {
  14380. "type": "number",
  14381. "minimum": 0
  14382. }
  14383. },
  14384. "required": ["created"],
  14385. "additionalProperties": false
  14386. },
  14387. "format": {
  14388. "$ref": "#/components/schemas/OutputFormat"
  14389. },
  14390. "summary": {
  14391. "type": "object",
  14392. "properties": {
  14393. "title": {
  14394. "type": "string"
  14395. },
  14396. "body": {
  14397. "type": "string"
  14398. },
  14399. "diffs": {
  14400. "type": "array",
  14401. "items": {
  14402. "$ref": "#/components/schemas/SnapshotFileDiff"
  14403. }
  14404. }
  14405. },
  14406. "required": ["diffs"],
  14407. "additionalProperties": false
  14408. },
  14409. "agent": {
  14410. "type": "string"
  14411. },
  14412. "model": {
  14413. "type": "object",
  14414. "properties": {
  14415. "providerID": {
  14416. "type": "string"
  14417. },
  14418. "modelID": {
  14419. "type": "string"
  14420. },
  14421. "variant": {
  14422. "type": "string"
  14423. }
  14424. },
  14425. "required": ["providerID", "modelID"],
  14426. "additionalProperties": false
  14427. },
  14428. "system": {
  14429. "type": "string"
  14430. },
  14431. "tools": {
  14432. "type": "object",
  14433. "additionalProperties": {
  14434. "type": "boolean"
  14435. }
  14436. }
  14437. },
  14438. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  14439. "additionalProperties": false
  14440. },
  14441. "ProviderAuthError": {
  14442. "type": "object",
  14443. "properties": {
  14444. "name": {
  14445. "type": "string",
  14446. "enum": ["ProviderAuthError"]
  14447. },
  14448. "data": {
  14449. "type": "object",
  14450. "properties": {
  14451. "providerID": {
  14452. "type": "string"
  14453. },
  14454. "message": {
  14455. "type": "string"
  14456. }
  14457. },
  14458. "required": ["providerID", "message"],
  14459. "additionalProperties": false
  14460. }
  14461. },
  14462. "required": ["name", "data"],
  14463. "additionalProperties": false
  14464. },
  14465. "UnknownError": {
  14466. "type": "object",
  14467. "properties": {
  14468. "name": {
  14469. "type": "string",
  14470. "enum": ["UnknownError"]
  14471. },
  14472. "data": {
  14473. "type": "object",
  14474. "properties": {
  14475. "message": {
  14476. "type": "string"
  14477. },
  14478. "ref": {
  14479. "type": "string"
  14480. }
  14481. },
  14482. "required": ["message"],
  14483. "additionalProperties": false
  14484. }
  14485. },
  14486. "required": ["name", "data"],
  14487. "additionalProperties": false
  14488. },
  14489. "MessageOutputLengthError": {
  14490. "type": "object",
  14491. "properties": {
  14492. "name": {
  14493. "type": "string",
  14494. "enum": ["MessageOutputLengthError"]
  14495. },
  14496. "data": {
  14497. "type": "object",
  14498. "properties": {}
  14499. }
  14500. },
  14501. "required": ["name", "data"],
  14502. "additionalProperties": false
  14503. },
  14504. "MessageAbortedError": {
  14505. "type": "object",
  14506. "properties": {
  14507. "name": {
  14508. "type": "string",
  14509. "enum": ["MessageAbortedError"]
  14510. },
  14511. "data": {
  14512. "type": "object",
  14513. "properties": {
  14514. "message": {
  14515. "type": "string"
  14516. }
  14517. },
  14518. "required": ["message"],
  14519. "additionalProperties": false
  14520. }
  14521. },
  14522. "required": ["name", "data"],
  14523. "additionalProperties": false
  14524. },
  14525. "StructuredOutputError": {
  14526. "type": "object",
  14527. "properties": {
  14528. "name": {
  14529. "type": "string",
  14530. "enum": ["StructuredOutputError"]
  14531. },
  14532. "data": {
  14533. "type": "object",
  14534. "properties": {
  14535. "message": {
  14536. "type": "string"
  14537. },
  14538. "retries": {
  14539. "type": "integer",
  14540. "minimum": 0
  14541. }
  14542. },
  14543. "required": ["message", "retries"],
  14544. "additionalProperties": false
  14545. }
  14546. },
  14547. "required": ["name", "data"],
  14548. "additionalProperties": false
  14549. },
  14550. "ContextOverflowError": {
  14551. "type": "object",
  14552. "properties": {
  14553. "name": {
  14554. "type": "string",
  14555. "enum": ["ContextOverflowError"]
  14556. },
  14557. "data": {
  14558. "type": "object",
  14559. "properties": {
  14560. "message": {
  14561. "type": "string"
  14562. },
  14563. "responseBody": {
  14564. "type": "string"
  14565. }
  14566. },
  14567. "required": ["message"],
  14568. "additionalProperties": false
  14569. }
  14570. },
  14571. "required": ["name", "data"],
  14572. "additionalProperties": false
  14573. },
  14574. "ContentFilterError": {
  14575. "type": "object",
  14576. "properties": {
  14577. "name": {
  14578. "type": "string",
  14579. "enum": ["ContentFilterError"]
  14580. },
  14581. "data": {
  14582. "type": "object",
  14583. "properties": {
  14584. "message": {
  14585. "type": "string"
  14586. }
  14587. },
  14588. "required": ["message"],
  14589. "additionalProperties": false
  14590. }
  14591. },
  14592. "required": ["name", "data"],
  14593. "additionalProperties": false
  14594. },
  14595. "APIError": {
  14596. "type": "object",
  14597. "properties": {
  14598. "name": {
  14599. "type": "string",
  14600. "enum": ["APIError"]
  14601. },
  14602. "data": {
  14603. "type": "object",
  14604. "properties": {
  14605. "message": {
  14606. "type": "string"
  14607. },
  14608. "statusCode": {
  14609. "type": "integer",
  14610. "minimum": 0
  14611. },
  14612. "isRetryable": {
  14613. "type": "boolean"
  14614. },
  14615. "responseHeaders": {
  14616. "type": "object",
  14617. "additionalProperties": {
  14618. "type": "string"
  14619. }
  14620. },
  14621. "responseBody": {
  14622. "type": "string"
  14623. },
  14624. "metadata": {
  14625. "type": "object",
  14626. "additionalProperties": {
  14627. "type": "string"
  14628. }
  14629. }
  14630. },
  14631. "required": ["message", "isRetryable"],
  14632. "additionalProperties": false
  14633. }
  14634. },
  14635. "required": ["name", "data"],
  14636. "additionalProperties": false
  14637. },
  14638. "AssistantMessage": {
  14639. "type": "object",
  14640. "properties": {
  14641. "id": {
  14642. "type": "string",
  14643. "pattern": "^msg"
  14644. },
  14645. "sessionID": {
  14646. "type": "string",
  14647. "pattern": "^ses"
  14648. },
  14649. "role": {
  14650. "type": "string",
  14651. "enum": ["assistant"]
  14652. },
  14653. "time": {
  14654. "type": "object",
  14655. "properties": {
  14656. "created": {
  14657. "type": "integer",
  14658. "minimum": 0
  14659. },
  14660. "completed": {
  14661. "type": "integer",
  14662. "minimum": 0
  14663. }
  14664. },
  14665. "required": ["created"],
  14666. "additionalProperties": false
  14667. },
  14668. "error": {
  14669. "anyOf": [
  14670. {
  14671. "$ref": "#/components/schemas/ProviderAuthError"
  14672. },
  14673. {
  14674. "$ref": "#/components/schemas/UnknownError"
  14675. },
  14676. {
  14677. "$ref": "#/components/schemas/MessageOutputLengthError"
  14678. },
  14679. {
  14680. "$ref": "#/components/schemas/MessageAbortedError"
  14681. },
  14682. {
  14683. "$ref": "#/components/schemas/StructuredOutputError"
  14684. },
  14685. {
  14686. "$ref": "#/components/schemas/ContextOverflowError"
  14687. },
  14688. {
  14689. "$ref": "#/components/schemas/ContentFilterError"
  14690. },
  14691. {
  14692. "$ref": "#/components/schemas/APIError"
  14693. }
  14694. ]
  14695. },
  14696. "parentID": {
  14697. "type": "string",
  14698. "pattern": "^msg"
  14699. },
  14700. "modelID": {
  14701. "type": "string"
  14702. },
  14703. "providerID": {
  14704. "type": "string"
  14705. },
  14706. "mode": {
  14707. "type": "string"
  14708. },
  14709. "agent": {
  14710. "type": "string"
  14711. },
  14712. "path": {
  14713. "type": "object",
  14714. "properties": {
  14715. "cwd": {
  14716. "type": "string"
  14717. },
  14718. "root": {
  14719. "type": "string"
  14720. }
  14721. },
  14722. "required": ["cwd", "root"],
  14723. "additionalProperties": false
  14724. },
  14725. "summary": {
  14726. "type": "boolean"
  14727. },
  14728. "cost": {
  14729. "type": "number"
  14730. },
  14731. "tokens": {
  14732. "type": "object",
  14733. "properties": {
  14734. "total": {
  14735. "type": "number"
  14736. },
  14737. "input": {
  14738. "type": "number"
  14739. },
  14740. "output": {
  14741. "type": "number"
  14742. },
  14743. "reasoning": {
  14744. "type": "number"
  14745. },
  14746. "cache": {
  14747. "type": "object",
  14748. "properties": {
  14749. "read": {
  14750. "type": "number"
  14751. },
  14752. "write": {
  14753. "type": "number"
  14754. }
  14755. },
  14756. "required": ["read", "write"],
  14757. "additionalProperties": false
  14758. }
  14759. },
  14760. "required": ["input", "output", "reasoning", "cache"],
  14761. "additionalProperties": false
  14762. },
  14763. "structured": {},
  14764. "variant": {
  14765. "type": "string"
  14766. },
  14767. "finish": {
  14768. "type": "string"
  14769. }
  14770. },
  14771. "required": [
  14772. "id",
  14773. "sessionID",
  14774. "role",
  14775. "time",
  14776. "parentID",
  14777. "modelID",
  14778. "providerID",
  14779. "mode",
  14780. "agent",
  14781. "path",
  14782. "cost",
  14783. "tokens"
  14784. ],
  14785. "additionalProperties": false
  14786. },
  14787. "Message": {
  14788. "anyOf": [
  14789. {
  14790. "$ref": "#/components/schemas/UserMessage"
  14791. },
  14792. {
  14793. "$ref": "#/components/schemas/AssistantMessage"
  14794. }
  14795. ]
  14796. },
  14797. "TextPart": {
  14798. "type": "object",
  14799. "properties": {
  14800. "id": {
  14801. "type": "string",
  14802. "pattern": "^prt"
  14803. },
  14804. "sessionID": {
  14805. "type": "string",
  14806. "pattern": "^ses"
  14807. },
  14808. "messageID": {
  14809. "type": "string",
  14810. "pattern": "^msg"
  14811. },
  14812. "type": {
  14813. "type": "string",
  14814. "enum": ["text"]
  14815. },
  14816. "text": {
  14817. "type": "string"
  14818. },
  14819. "synthetic": {
  14820. "type": "boolean"
  14821. },
  14822. "ignored": {
  14823. "type": "boolean"
  14824. },
  14825. "time": {
  14826. "type": "object",
  14827. "properties": {
  14828. "start": {
  14829. "type": "integer",
  14830. "minimum": 0
  14831. },
  14832. "end": {
  14833. "type": "integer",
  14834. "minimum": 0
  14835. }
  14836. },
  14837. "required": ["start"],
  14838. "additionalProperties": false
  14839. },
  14840. "metadata": {
  14841. "type": "object"
  14842. }
  14843. },
  14844. "required": ["id", "sessionID", "messageID", "type", "text"],
  14845. "additionalProperties": false
  14846. },
  14847. "SubtaskPart": {
  14848. "type": "object",
  14849. "properties": {
  14850. "id": {
  14851. "type": "string",
  14852. "pattern": "^prt"
  14853. },
  14854. "sessionID": {
  14855. "type": "string",
  14856. "pattern": "^ses"
  14857. },
  14858. "messageID": {
  14859. "type": "string",
  14860. "pattern": "^msg"
  14861. },
  14862. "type": {
  14863. "type": "string",
  14864. "enum": ["subtask"]
  14865. },
  14866. "prompt": {
  14867. "type": "string"
  14868. },
  14869. "description": {
  14870. "type": "string"
  14871. },
  14872. "agent": {
  14873. "type": "string"
  14874. },
  14875. "model": {
  14876. "type": "object",
  14877. "properties": {
  14878. "providerID": {
  14879. "type": "string"
  14880. },
  14881. "modelID": {
  14882. "type": "string"
  14883. }
  14884. },
  14885. "required": ["providerID", "modelID"],
  14886. "additionalProperties": false
  14887. },
  14888. "command": {
  14889. "type": "string"
  14890. }
  14891. },
  14892. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  14893. "additionalProperties": false
  14894. },
  14895. "ReasoningPart": {
  14896. "type": "object",
  14897. "properties": {
  14898. "id": {
  14899. "type": "string",
  14900. "pattern": "^prt"
  14901. },
  14902. "sessionID": {
  14903. "type": "string",
  14904. "pattern": "^ses"
  14905. },
  14906. "messageID": {
  14907. "type": "string",
  14908. "pattern": "^msg"
  14909. },
  14910. "type": {
  14911. "type": "string",
  14912. "enum": ["reasoning"]
  14913. },
  14914. "text": {
  14915. "type": "string"
  14916. },
  14917. "metadata": {
  14918. "type": "object"
  14919. },
  14920. "time": {
  14921. "type": "object",
  14922. "properties": {
  14923. "start": {
  14924. "type": "integer",
  14925. "minimum": 0
  14926. },
  14927. "end": {
  14928. "type": "integer",
  14929. "minimum": 0
  14930. }
  14931. },
  14932. "required": ["start"],
  14933. "additionalProperties": false
  14934. }
  14935. },
  14936. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  14937. "additionalProperties": false
  14938. },
  14939. "FilePartSourceText": {
  14940. "type": "object",
  14941. "properties": {
  14942. "value": {
  14943. "type": "string"
  14944. },
  14945. "start": {
  14946. "type": "number"
  14947. },
  14948. "end": {
  14949. "type": "number"
  14950. }
  14951. },
  14952. "required": ["value", "start", "end"],
  14953. "additionalProperties": false
  14954. },
  14955. "FileSource": {
  14956. "type": "object",
  14957. "properties": {
  14958. "text": {
  14959. "$ref": "#/components/schemas/FilePartSourceText"
  14960. },
  14961. "type": {
  14962. "type": "string",
  14963. "enum": ["file"]
  14964. },
  14965. "path": {
  14966. "type": "string"
  14967. }
  14968. },
  14969. "required": ["text", "type", "path"],
  14970. "additionalProperties": false
  14971. },
  14972. "Range": {
  14973. "type": "object",
  14974. "properties": {
  14975. "start": {
  14976. "type": "object",
  14977. "properties": {
  14978. "line": {
  14979. "type": "integer",
  14980. "minimum": 0
  14981. },
  14982. "character": {
  14983. "type": "integer",
  14984. "minimum": 0
  14985. }
  14986. },
  14987. "required": ["line", "character"],
  14988. "additionalProperties": false
  14989. },
  14990. "end": {
  14991. "type": "object",
  14992. "properties": {
  14993. "line": {
  14994. "type": "integer",
  14995. "minimum": 0
  14996. },
  14997. "character": {
  14998. "type": "integer",
  14999. "minimum": 0
  15000. }
  15001. },
  15002. "required": ["line", "character"],
  15003. "additionalProperties": false
  15004. }
  15005. },
  15006. "required": ["start", "end"],
  15007. "additionalProperties": false
  15008. },
  15009. "SymbolSource": {
  15010. "type": "object",
  15011. "properties": {
  15012. "text": {
  15013. "$ref": "#/components/schemas/FilePartSourceText"
  15014. },
  15015. "type": {
  15016. "type": "string",
  15017. "enum": ["symbol"]
  15018. },
  15019. "path": {
  15020. "type": "string"
  15021. },
  15022. "range": {
  15023. "$ref": "#/components/schemas/Range"
  15024. },
  15025. "name": {
  15026. "type": "string"
  15027. },
  15028. "kind": {
  15029. "type": "integer",
  15030. "minimum": 0
  15031. }
  15032. },
  15033. "required": ["text", "type", "path", "range", "name", "kind"],
  15034. "additionalProperties": false
  15035. },
  15036. "ResourceSource": {
  15037. "type": "object",
  15038. "properties": {
  15039. "text": {
  15040. "$ref": "#/components/schemas/FilePartSourceText"
  15041. },
  15042. "type": {
  15043. "type": "string",
  15044. "enum": ["resource"]
  15045. },
  15046. "clientName": {
  15047. "type": "string"
  15048. },
  15049. "uri": {
  15050. "type": "string"
  15051. }
  15052. },
  15053. "required": ["text", "type", "clientName", "uri"],
  15054. "additionalProperties": false
  15055. },
  15056. "FilePartSource": {
  15057. "anyOf": [
  15058. {
  15059. "$ref": "#/components/schemas/FileSource"
  15060. },
  15061. {
  15062. "$ref": "#/components/schemas/SymbolSource"
  15063. },
  15064. {
  15065. "$ref": "#/components/schemas/ResourceSource"
  15066. }
  15067. ]
  15068. },
  15069. "FilePart": {
  15070. "type": "object",
  15071. "properties": {
  15072. "id": {
  15073. "type": "string",
  15074. "pattern": "^prt"
  15075. },
  15076. "sessionID": {
  15077. "type": "string",
  15078. "pattern": "^ses"
  15079. },
  15080. "messageID": {
  15081. "type": "string",
  15082. "pattern": "^msg"
  15083. },
  15084. "type": {
  15085. "type": "string",
  15086. "enum": ["file"]
  15087. },
  15088. "mime": {
  15089. "type": "string"
  15090. },
  15091. "filename": {
  15092. "type": "string"
  15093. },
  15094. "url": {
  15095. "type": "string"
  15096. },
  15097. "source": {
  15098. "$ref": "#/components/schemas/FilePartSource"
  15099. }
  15100. },
  15101. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  15102. "additionalProperties": false
  15103. },
  15104. "ToolStatePending": {
  15105. "type": "object",
  15106. "properties": {
  15107. "status": {
  15108. "type": "string",
  15109. "enum": ["pending"]
  15110. },
  15111. "input": {
  15112. "type": "object"
  15113. },
  15114. "raw": {
  15115. "type": "string"
  15116. }
  15117. },
  15118. "required": ["status", "input", "raw"],
  15119. "additionalProperties": false
  15120. },
  15121. "ToolStateRunning": {
  15122. "type": "object",
  15123. "properties": {
  15124. "status": {
  15125. "type": "string",
  15126. "enum": ["running"]
  15127. },
  15128. "input": {
  15129. "type": "object"
  15130. },
  15131. "title": {
  15132. "type": "string"
  15133. },
  15134. "metadata": {
  15135. "type": "object"
  15136. },
  15137. "time": {
  15138. "type": "object",
  15139. "properties": {
  15140. "start": {
  15141. "type": "integer",
  15142. "minimum": 0
  15143. }
  15144. },
  15145. "required": ["start"],
  15146. "additionalProperties": false
  15147. }
  15148. },
  15149. "required": ["status", "input", "time"],
  15150. "additionalProperties": false
  15151. },
  15152. "ToolStateCompleted": {
  15153. "type": "object",
  15154. "properties": {
  15155. "status": {
  15156. "type": "string",
  15157. "enum": ["completed"]
  15158. },
  15159. "input": {
  15160. "type": "object"
  15161. },
  15162. "output": {
  15163. "type": "string"
  15164. },
  15165. "title": {
  15166. "type": "string"
  15167. },
  15168. "metadata": {
  15169. "type": "object"
  15170. },
  15171. "time": {
  15172. "type": "object",
  15173. "properties": {
  15174. "start": {
  15175. "type": "integer",
  15176. "minimum": 0
  15177. },
  15178. "end": {
  15179. "type": "integer",
  15180. "minimum": 0
  15181. },
  15182. "compacted": {
  15183. "type": "integer",
  15184. "minimum": 0
  15185. }
  15186. },
  15187. "required": ["start", "end"],
  15188. "additionalProperties": false
  15189. },
  15190. "attachments": {
  15191. "type": "array",
  15192. "items": {
  15193. "$ref": "#/components/schemas/FilePart"
  15194. }
  15195. }
  15196. },
  15197. "required": ["status", "input", "output", "title", "metadata", "time"],
  15198. "additionalProperties": false
  15199. },
  15200. "ToolStateError": {
  15201. "type": "object",
  15202. "properties": {
  15203. "status": {
  15204. "type": "string",
  15205. "enum": ["error"]
  15206. },
  15207. "input": {
  15208. "type": "object"
  15209. },
  15210. "error": {
  15211. "type": "string"
  15212. },
  15213. "metadata": {
  15214. "type": "object"
  15215. },
  15216. "time": {
  15217. "type": "object",
  15218. "properties": {
  15219. "start": {
  15220. "type": "integer",
  15221. "minimum": 0
  15222. },
  15223. "end": {
  15224. "type": "integer",
  15225. "minimum": 0
  15226. }
  15227. },
  15228. "required": ["start", "end"],
  15229. "additionalProperties": false
  15230. }
  15231. },
  15232. "required": ["status", "input", "error", "time"],
  15233. "additionalProperties": false
  15234. },
  15235. "ToolState": {
  15236. "anyOf": [
  15237. {
  15238. "$ref": "#/components/schemas/ToolStatePending"
  15239. },
  15240. {
  15241. "$ref": "#/components/schemas/ToolStateRunning"
  15242. },
  15243. {
  15244. "$ref": "#/components/schemas/ToolStateCompleted"
  15245. },
  15246. {
  15247. "$ref": "#/components/schemas/ToolStateError"
  15248. }
  15249. ]
  15250. },
  15251. "ToolPart": {
  15252. "type": "object",
  15253. "properties": {
  15254. "id": {
  15255. "type": "string",
  15256. "pattern": "^prt"
  15257. },
  15258. "sessionID": {
  15259. "type": "string",
  15260. "pattern": "^ses"
  15261. },
  15262. "messageID": {
  15263. "type": "string",
  15264. "pattern": "^msg"
  15265. },
  15266. "type": {
  15267. "type": "string",
  15268. "enum": ["tool"]
  15269. },
  15270. "callID": {
  15271. "type": "string"
  15272. },
  15273. "tool": {
  15274. "type": "string"
  15275. },
  15276. "state": {
  15277. "$ref": "#/components/schemas/ToolState"
  15278. },
  15279. "metadata": {
  15280. "type": "object"
  15281. }
  15282. },
  15283. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  15284. "additionalProperties": false
  15285. },
  15286. "StepStartPart": {
  15287. "type": "object",
  15288. "properties": {
  15289. "id": {
  15290. "type": "string",
  15291. "pattern": "^prt"
  15292. },
  15293. "sessionID": {
  15294. "type": "string",
  15295. "pattern": "^ses"
  15296. },
  15297. "messageID": {
  15298. "type": "string",
  15299. "pattern": "^msg"
  15300. },
  15301. "type": {
  15302. "type": "string",
  15303. "enum": ["step-start"]
  15304. },
  15305. "snapshot": {
  15306. "type": "string"
  15307. }
  15308. },
  15309. "required": ["id", "sessionID", "messageID", "type"],
  15310. "additionalProperties": false
  15311. },
  15312. "StepFinishPart": {
  15313. "type": "object",
  15314. "properties": {
  15315. "id": {
  15316. "type": "string",
  15317. "pattern": "^prt"
  15318. },
  15319. "sessionID": {
  15320. "type": "string",
  15321. "pattern": "^ses"
  15322. },
  15323. "messageID": {
  15324. "type": "string",
  15325. "pattern": "^msg"
  15326. },
  15327. "type": {
  15328. "type": "string",
  15329. "enum": ["step-finish"]
  15330. },
  15331. "reason": {
  15332. "type": "string"
  15333. },
  15334. "snapshot": {
  15335. "type": "string"
  15336. },
  15337. "cost": {
  15338. "type": "number"
  15339. },
  15340. "tokens": {
  15341. "type": "object",
  15342. "properties": {
  15343. "total": {
  15344. "type": "number"
  15345. },
  15346. "input": {
  15347. "type": "number"
  15348. },
  15349. "output": {
  15350. "type": "number"
  15351. },
  15352. "reasoning": {
  15353. "type": "number"
  15354. },
  15355. "cache": {
  15356. "type": "object",
  15357. "properties": {
  15358. "read": {
  15359. "type": "number"
  15360. },
  15361. "write": {
  15362. "type": "number"
  15363. }
  15364. },
  15365. "required": ["read", "write"],
  15366. "additionalProperties": false
  15367. }
  15368. },
  15369. "required": ["input", "output", "reasoning", "cache"],
  15370. "additionalProperties": false
  15371. }
  15372. },
  15373. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  15374. "additionalProperties": false
  15375. },
  15376. "SnapshotPart": {
  15377. "type": "object",
  15378. "properties": {
  15379. "id": {
  15380. "type": "string",
  15381. "pattern": "^prt"
  15382. },
  15383. "sessionID": {
  15384. "type": "string",
  15385. "pattern": "^ses"
  15386. },
  15387. "messageID": {
  15388. "type": "string",
  15389. "pattern": "^msg"
  15390. },
  15391. "type": {
  15392. "type": "string",
  15393. "enum": ["snapshot"]
  15394. },
  15395. "snapshot": {
  15396. "type": "string"
  15397. }
  15398. },
  15399. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  15400. "additionalProperties": false
  15401. },
  15402. "PatchPart": {
  15403. "type": "object",
  15404. "properties": {
  15405. "id": {
  15406. "type": "string",
  15407. "pattern": "^prt"
  15408. },
  15409. "sessionID": {
  15410. "type": "string",
  15411. "pattern": "^ses"
  15412. },
  15413. "messageID": {
  15414. "type": "string",
  15415. "pattern": "^msg"
  15416. },
  15417. "type": {
  15418. "type": "string",
  15419. "enum": ["patch"]
  15420. },
  15421. "hash": {
  15422. "type": "string"
  15423. },
  15424. "files": {
  15425. "type": "array",
  15426. "items": {
  15427. "type": "string"
  15428. }
  15429. }
  15430. },
  15431. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  15432. "additionalProperties": false
  15433. },
  15434. "AgentPart": {
  15435. "type": "object",
  15436. "properties": {
  15437. "id": {
  15438. "type": "string",
  15439. "pattern": "^prt"
  15440. },
  15441. "sessionID": {
  15442. "type": "string",
  15443. "pattern": "^ses"
  15444. },
  15445. "messageID": {
  15446. "type": "string",
  15447. "pattern": "^msg"
  15448. },
  15449. "type": {
  15450. "type": "string",
  15451. "enum": ["agent"]
  15452. },
  15453. "name": {
  15454. "type": "string"
  15455. },
  15456. "source": {
  15457. "type": "object",
  15458. "properties": {
  15459. "value": {
  15460. "type": "string"
  15461. },
  15462. "start": {
  15463. "type": "integer",
  15464. "minimum": 0
  15465. },
  15466. "end": {
  15467. "type": "integer",
  15468. "minimum": 0
  15469. }
  15470. },
  15471. "required": ["value", "start", "end"],
  15472. "additionalProperties": false
  15473. }
  15474. },
  15475. "required": ["id", "sessionID", "messageID", "type", "name"],
  15476. "additionalProperties": false
  15477. },
  15478. "RetryPart": {
  15479. "type": "object",
  15480. "properties": {
  15481. "id": {
  15482. "type": "string",
  15483. "pattern": "^prt"
  15484. },
  15485. "sessionID": {
  15486. "type": "string",
  15487. "pattern": "^ses"
  15488. },
  15489. "messageID": {
  15490. "type": "string",
  15491. "pattern": "^msg"
  15492. },
  15493. "type": {
  15494. "type": "string",
  15495. "enum": ["retry"]
  15496. },
  15497. "attempt": {
  15498. "type": "integer",
  15499. "minimum": 0
  15500. },
  15501. "error": {
  15502. "$ref": "#/components/schemas/APIError"
  15503. },
  15504. "time": {
  15505. "type": "object",
  15506. "properties": {
  15507. "created": {
  15508. "type": "integer",
  15509. "minimum": 0
  15510. }
  15511. },
  15512. "required": ["created"],
  15513. "additionalProperties": false
  15514. }
  15515. },
  15516. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  15517. "additionalProperties": false
  15518. },
  15519. "CompactionPart": {
  15520. "type": "object",
  15521. "properties": {
  15522. "id": {
  15523. "type": "string",
  15524. "pattern": "^prt"
  15525. },
  15526. "sessionID": {
  15527. "type": "string",
  15528. "pattern": "^ses"
  15529. },
  15530. "messageID": {
  15531. "type": "string",
  15532. "pattern": "^msg"
  15533. },
  15534. "type": {
  15535. "type": "string",
  15536. "enum": ["compaction"]
  15537. },
  15538. "auto": {
  15539. "type": "boolean"
  15540. },
  15541. "overflow": {
  15542. "type": "boolean"
  15543. },
  15544. "tail_start_id": {
  15545. "type": "string",
  15546. "pattern": "^msg"
  15547. }
  15548. },
  15549. "required": ["id", "sessionID", "messageID", "type", "auto"],
  15550. "additionalProperties": false
  15551. },
  15552. "Part": {
  15553. "anyOf": [
  15554. {
  15555. "$ref": "#/components/schemas/TextPart"
  15556. },
  15557. {
  15558. "$ref": "#/components/schemas/SubtaskPart"
  15559. },
  15560. {
  15561. "$ref": "#/components/schemas/ReasoningPart"
  15562. },
  15563. {
  15564. "$ref": "#/components/schemas/FilePart"
  15565. },
  15566. {
  15567. "$ref": "#/components/schemas/ToolPart"
  15568. },
  15569. {
  15570. "$ref": "#/components/schemas/StepStartPart"
  15571. },
  15572. {
  15573. "$ref": "#/components/schemas/StepFinishPart"
  15574. },
  15575. {
  15576. "$ref": "#/components/schemas/SnapshotPart"
  15577. },
  15578. {
  15579. "$ref": "#/components/schemas/PatchPart"
  15580. },
  15581. {
  15582. "$ref": "#/components/schemas/AgentPart"
  15583. },
  15584. {
  15585. "$ref": "#/components/schemas/RetryPart"
  15586. },
  15587. {
  15588. "$ref": "#/components/schemas/CompactionPart"
  15589. }
  15590. ]
  15591. },
  15592. "Prompt": {
  15593. "type": "object",
  15594. "properties": {
  15595. "text": {
  15596. "type": "string"
  15597. },
  15598. "files": {
  15599. "type": "array",
  15600. "items": {
  15601. "$ref": "#/components/schemas/PromptFileAttachment"
  15602. }
  15603. },
  15604. "agents": {
  15605. "type": "array",
  15606. "items": {
  15607. "$ref": "#/components/schemas/PromptAgentAttachment"
  15608. }
  15609. }
  15610. },
  15611. "required": ["text"],
  15612. "additionalProperties": false
  15613. },
  15614. "Pty": {
  15615. "type": "object",
  15616. "properties": {
  15617. "id": {
  15618. "type": "string",
  15619. "pattern": "^pty"
  15620. },
  15621. "title": {
  15622. "type": "string"
  15623. },
  15624. "command": {
  15625. "type": "string"
  15626. },
  15627. "args": {
  15628. "type": "array",
  15629. "items": {
  15630. "type": "string"
  15631. }
  15632. },
  15633. "cwd": {
  15634. "type": "string"
  15635. },
  15636. "status": {
  15637. "type": "string",
  15638. "enum": ["running", "exited"]
  15639. },
  15640. "pid": {
  15641. "type": "integer",
  15642. "minimum": 0
  15643. }
  15644. },
  15645. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  15646. "additionalProperties": false
  15647. },
  15648. "Todo": {
  15649. "type": "object",
  15650. "properties": {
  15651. "content": {
  15652. "type": "string",
  15653. "description": "Brief description of the task"
  15654. },
  15655. "status": {
  15656. "type": "string",
  15657. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  15658. },
  15659. "priority": {
  15660. "type": "string",
  15661. "description": "Priority level of the task: high, medium, low"
  15662. }
  15663. },
  15664. "required": ["content", "status", "priority"],
  15665. "additionalProperties": false
  15666. },
  15667. "SessionStatus": {
  15668. "anyOf": [
  15669. {
  15670. "type": "object",
  15671. "properties": {
  15672. "type": {
  15673. "type": "string",
  15674. "enum": ["idle"]
  15675. }
  15676. },
  15677. "required": ["type"],
  15678. "additionalProperties": false
  15679. },
  15680. {
  15681. "type": "object",
  15682. "properties": {
  15683. "type": {
  15684. "type": "string",
  15685. "enum": ["retry"]
  15686. },
  15687. "attempt": {
  15688. "type": "integer",
  15689. "minimum": 0
  15690. },
  15691. "message": {
  15692. "type": "string"
  15693. },
  15694. "action": {
  15695. "type": "object",
  15696. "properties": {
  15697. "reason": {
  15698. "type": "string"
  15699. },
  15700. "provider": {
  15701. "type": "string"
  15702. },
  15703. "title": {
  15704. "type": "string"
  15705. },
  15706. "message": {
  15707. "type": "string"
  15708. },
  15709. "label": {
  15710. "type": "string"
  15711. },
  15712. "link": {
  15713. "type": "string"
  15714. }
  15715. },
  15716. "required": ["reason", "provider", "title", "message", "label"],
  15717. "additionalProperties": false
  15718. },
  15719. "next": {
  15720. "type": "integer",
  15721. "minimum": 0
  15722. }
  15723. },
  15724. "required": ["type", "attempt", "message", "next"],
  15725. "additionalProperties": false
  15726. },
  15727. {
  15728. "type": "object",
  15729. "properties": {
  15730. "type": {
  15731. "type": "string",
  15732. "enum": ["busy"]
  15733. }
  15734. },
  15735. "required": ["type"],
  15736. "additionalProperties": false
  15737. }
  15738. ]
  15739. },
  15740. "QuestionOption": {
  15741. "type": "object",
  15742. "properties": {
  15743. "label": {
  15744. "type": "string",
  15745. "description": "Display text (1-5 words, concise)"
  15746. },
  15747. "description": {
  15748. "type": "string",
  15749. "description": "Explanation of choice"
  15750. }
  15751. },
  15752. "required": ["label", "description"],
  15753. "additionalProperties": false
  15754. },
  15755. "QuestionInfo": {
  15756. "type": "object",
  15757. "properties": {
  15758. "question": {
  15759. "type": "string",
  15760. "description": "Complete question"
  15761. },
  15762. "header": {
  15763. "type": "string",
  15764. "description": "Very short label (max 30 chars)"
  15765. },
  15766. "options": {
  15767. "type": "array",
  15768. "items": {
  15769. "$ref": "#/components/schemas/QuestionOption"
  15770. },
  15771. "description": "Available choices"
  15772. },
  15773. "multiple": {
  15774. "type": "boolean"
  15775. },
  15776. "custom": {
  15777. "type": "boolean"
  15778. }
  15779. },
  15780. "required": ["question", "header", "options"],
  15781. "additionalProperties": false
  15782. },
  15783. "QuestionTool": {
  15784. "type": "object",
  15785. "properties": {
  15786. "messageID": {
  15787. "type": "string",
  15788. "pattern": "^msg"
  15789. },
  15790. "callID": {
  15791. "type": "string"
  15792. }
  15793. },
  15794. "required": ["messageID", "callID"],
  15795. "additionalProperties": false
  15796. },
  15797. "QuestionAnswer": {
  15798. "type": "array",
  15799. "items": {
  15800. "type": "string"
  15801. }
  15802. },
  15803. "GlobalEvent": {
  15804. "type": "object",
  15805. "properties": {
  15806. "directory": {
  15807. "type": "string"
  15808. },
  15809. "project": {
  15810. "type": "string"
  15811. },
  15812. "workspace": {
  15813. "type": "string"
  15814. },
  15815. "payload": {
  15816. "anyOf": [
  15817. {
  15818. "type": "object",
  15819. "properties": {
  15820. "id": {
  15821. "type": "string",
  15822. "pattern": "^evt_"
  15823. },
  15824. "type": {
  15825. "type": "string",
  15826. "enum": ["models-dev.refreshed"]
  15827. },
  15828. "properties": {
  15829. "type": "object",
  15830. "properties": {}
  15831. }
  15832. },
  15833. "required": ["id", "type", "properties"],
  15834. "additionalProperties": false
  15835. },
  15836. {
  15837. "type": "object",
  15838. "properties": {
  15839. "id": {
  15840. "type": "string",
  15841. "pattern": "^evt_"
  15842. },
  15843. "type": {
  15844. "type": "string",
  15845. "enum": ["plugin.added"]
  15846. },
  15847. "properties": {
  15848. "type": "object",
  15849. "properties": {
  15850. "id": {
  15851. "type": "string"
  15852. }
  15853. },
  15854. "required": ["id"],
  15855. "additionalProperties": false
  15856. }
  15857. },
  15858. "required": ["id", "type", "properties"],
  15859. "additionalProperties": false
  15860. },
  15861. {
  15862. "type": "object",
  15863. "properties": {
  15864. "id": {
  15865. "type": "string",
  15866. "pattern": "^evt_"
  15867. },
  15868. "type": {
  15869. "type": "string",
  15870. "enum": ["catalog.model.updated"]
  15871. },
  15872. "properties": {
  15873. "type": "object",
  15874. "properties": {
  15875. "model": {
  15876. "$ref": "#/components/schemas/ModelV2Info"
  15877. }
  15878. },
  15879. "required": ["model"],
  15880. "additionalProperties": false
  15881. }
  15882. },
  15883. "required": ["id", "type", "properties"],
  15884. "additionalProperties": false
  15885. },
  15886. {
  15887. "type": "object",
  15888. "properties": {
  15889. "id": {
  15890. "type": "string",
  15891. "pattern": "^evt_"
  15892. },
  15893. "type": {
  15894. "type": "string",
  15895. "enum": ["session.created"]
  15896. },
  15897. "properties": {
  15898. "type": "object",
  15899. "properties": {
  15900. "sessionID": {
  15901. "type": "string",
  15902. "pattern": "^ses"
  15903. },
  15904. "info": {
  15905. "$ref": "#/components/schemas/Session"
  15906. }
  15907. },
  15908. "required": ["sessionID", "info"],
  15909. "additionalProperties": false
  15910. }
  15911. },
  15912. "required": ["id", "type", "properties"],
  15913. "additionalProperties": false
  15914. },
  15915. {
  15916. "type": "object",
  15917. "properties": {
  15918. "id": {
  15919. "type": "string",
  15920. "pattern": "^evt_"
  15921. },
  15922. "type": {
  15923. "type": "string",
  15924. "enum": ["session.updated"]
  15925. },
  15926. "properties": {
  15927. "type": "object",
  15928. "properties": {
  15929. "sessionID": {
  15930. "type": "string",
  15931. "pattern": "^ses"
  15932. },
  15933. "info": {
  15934. "$ref": "#/components/schemas/Session"
  15935. }
  15936. },
  15937. "required": ["sessionID", "info"],
  15938. "additionalProperties": false
  15939. }
  15940. },
  15941. "required": ["id", "type", "properties"],
  15942. "additionalProperties": false
  15943. },
  15944. {
  15945. "type": "object",
  15946. "properties": {
  15947. "id": {
  15948. "type": "string",
  15949. "pattern": "^evt_"
  15950. },
  15951. "type": {
  15952. "type": "string",
  15953. "enum": ["session.deleted"]
  15954. },
  15955. "properties": {
  15956. "type": "object",
  15957. "properties": {
  15958. "sessionID": {
  15959. "type": "string",
  15960. "pattern": "^ses"
  15961. },
  15962. "info": {
  15963. "$ref": "#/components/schemas/Session"
  15964. }
  15965. },
  15966. "required": ["sessionID", "info"],
  15967. "additionalProperties": false
  15968. }
  15969. },
  15970. "required": ["id", "type", "properties"],
  15971. "additionalProperties": false
  15972. },
  15973. {
  15974. "type": "object",
  15975. "properties": {
  15976. "id": {
  15977. "type": "string",
  15978. "pattern": "^evt_"
  15979. },
  15980. "type": {
  15981. "type": "string",
  15982. "enum": ["message.updated"]
  15983. },
  15984. "properties": {
  15985. "type": "object",
  15986. "properties": {
  15987. "sessionID": {
  15988. "type": "string",
  15989. "pattern": "^ses"
  15990. },
  15991. "info": {
  15992. "$ref": "#/components/schemas/Message"
  15993. }
  15994. },
  15995. "required": ["sessionID", "info"],
  15996. "additionalProperties": false
  15997. }
  15998. },
  15999. "required": ["id", "type", "properties"],
  16000. "additionalProperties": false
  16001. },
  16002. {
  16003. "type": "object",
  16004. "properties": {
  16005. "id": {
  16006. "type": "string",
  16007. "pattern": "^evt_"
  16008. },
  16009. "type": {
  16010. "type": "string",
  16011. "enum": ["message.removed"]
  16012. },
  16013. "properties": {
  16014. "type": "object",
  16015. "properties": {
  16016. "sessionID": {
  16017. "type": "string",
  16018. "pattern": "^ses"
  16019. },
  16020. "messageID": {
  16021. "type": "string",
  16022. "pattern": "^msg"
  16023. }
  16024. },
  16025. "required": ["sessionID", "messageID"],
  16026. "additionalProperties": false
  16027. }
  16028. },
  16029. "required": ["id", "type", "properties"],
  16030. "additionalProperties": false
  16031. },
  16032. {
  16033. "type": "object",
  16034. "properties": {
  16035. "id": {
  16036. "type": "string",
  16037. "pattern": "^evt_"
  16038. },
  16039. "type": {
  16040. "type": "string",
  16041. "enum": ["message.part.updated"]
  16042. },
  16043. "properties": {
  16044. "type": "object",
  16045. "properties": {
  16046. "sessionID": {
  16047. "type": "string",
  16048. "pattern": "^ses"
  16049. },
  16050. "part": {
  16051. "$ref": "#/components/schemas/Part"
  16052. },
  16053. "time": {
  16054. "type": "number"
  16055. }
  16056. },
  16057. "required": ["sessionID", "part", "time"],
  16058. "additionalProperties": false
  16059. }
  16060. },
  16061. "required": ["id", "type", "properties"],
  16062. "additionalProperties": false
  16063. },
  16064. {
  16065. "type": "object",
  16066. "properties": {
  16067. "id": {
  16068. "type": "string",
  16069. "pattern": "^evt_"
  16070. },
  16071. "type": {
  16072. "type": "string",
  16073. "enum": ["message.part.removed"]
  16074. },
  16075. "properties": {
  16076. "type": "object",
  16077. "properties": {
  16078. "sessionID": {
  16079. "type": "string",
  16080. "pattern": "^ses"
  16081. },
  16082. "messageID": {
  16083. "type": "string",
  16084. "pattern": "^msg"
  16085. },
  16086. "partID": {
  16087. "type": "string",
  16088. "pattern": "^prt"
  16089. }
  16090. },
  16091. "required": ["sessionID", "messageID", "partID"],
  16092. "additionalProperties": false
  16093. }
  16094. },
  16095. "required": ["id", "type", "properties"],
  16096. "additionalProperties": false
  16097. },
  16098. {
  16099. "type": "object",
  16100. "properties": {
  16101. "id": {
  16102. "type": "string",
  16103. "pattern": "^evt_"
  16104. },
  16105. "type": {
  16106. "type": "string",
  16107. "enum": ["session.next.agent.switched"]
  16108. },
  16109. "properties": {
  16110. "type": "object",
  16111. "properties": {
  16112. "timestamp": {
  16113. "type": "number"
  16114. },
  16115. "sessionID": {
  16116. "type": "string",
  16117. "pattern": "^ses"
  16118. },
  16119. "messageID": {
  16120. "type": "string",
  16121. "pattern": "^msg_"
  16122. },
  16123. "agent": {
  16124. "type": "string"
  16125. }
  16126. },
  16127. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16128. "additionalProperties": false
  16129. }
  16130. },
  16131. "required": ["id", "type", "properties"],
  16132. "additionalProperties": false
  16133. },
  16134. {
  16135. "type": "object",
  16136. "properties": {
  16137. "id": {
  16138. "type": "string",
  16139. "pattern": "^evt_"
  16140. },
  16141. "type": {
  16142. "type": "string",
  16143. "enum": ["session.next.model.switched"]
  16144. },
  16145. "properties": {
  16146. "type": "object",
  16147. "properties": {
  16148. "timestamp": {
  16149. "type": "number"
  16150. },
  16151. "sessionID": {
  16152. "type": "string",
  16153. "pattern": "^ses"
  16154. },
  16155. "messageID": {
  16156. "type": "string",
  16157. "pattern": "^msg_"
  16158. },
  16159. "model": {
  16160. "type": "object",
  16161. "properties": {
  16162. "id": {
  16163. "type": "string"
  16164. },
  16165. "providerID": {
  16166. "type": "string"
  16167. },
  16168. "variant": {
  16169. "type": "string"
  16170. }
  16171. },
  16172. "required": ["id", "providerID"],
  16173. "additionalProperties": false
  16174. }
  16175. },
  16176. "required": ["timestamp", "sessionID", "messageID", "model"],
  16177. "additionalProperties": false
  16178. }
  16179. },
  16180. "required": ["id", "type", "properties"],
  16181. "additionalProperties": false
  16182. },
  16183. {
  16184. "type": "object",
  16185. "properties": {
  16186. "id": {
  16187. "type": "string",
  16188. "pattern": "^evt_"
  16189. },
  16190. "type": {
  16191. "type": "string",
  16192. "enum": ["session.next.moved"]
  16193. },
  16194. "properties": {
  16195. "type": "object",
  16196. "properties": {
  16197. "timestamp": {
  16198. "type": "number"
  16199. },
  16200. "sessionID": {
  16201. "type": "string",
  16202. "pattern": "^ses"
  16203. },
  16204. "location": {
  16205. "$ref": "#/components/schemas/LocationRef"
  16206. },
  16207. "subdirectory": {
  16208. "type": "string"
  16209. }
  16210. },
  16211. "required": ["timestamp", "sessionID", "location"],
  16212. "additionalProperties": false
  16213. }
  16214. },
  16215. "required": ["id", "type", "properties"],
  16216. "additionalProperties": false
  16217. },
  16218. {
  16219. "type": "object",
  16220. "properties": {
  16221. "id": {
  16222. "type": "string",
  16223. "pattern": "^evt_"
  16224. },
  16225. "type": {
  16226. "type": "string",
  16227. "enum": ["session.next.prompted"]
  16228. },
  16229. "properties": {
  16230. "type": "object",
  16231. "properties": {
  16232. "timestamp": {
  16233. "type": "number"
  16234. },
  16235. "sessionID": {
  16236. "type": "string",
  16237. "pattern": "^ses"
  16238. },
  16239. "messageID": {
  16240. "type": "string",
  16241. "pattern": "^msg_"
  16242. },
  16243. "prompt": {
  16244. "$ref": "#/components/schemas/Prompt"
  16245. },
  16246. "delivery": {
  16247. "type": "string",
  16248. "enum": ["steer", "queue"]
  16249. }
  16250. },
  16251. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16252. "additionalProperties": false
  16253. }
  16254. },
  16255. "required": ["id", "type", "properties"],
  16256. "additionalProperties": false
  16257. },
  16258. {
  16259. "type": "object",
  16260. "properties": {
  16261. "id": {
  16262. "type": "string",
  16263. "pattern": "^evt_"
  16264. },
  16265. "type": {
  16266. "type": "string",
  16267. "enum": ["session.next.prompt.admitted"]
  16268. },
  16269. "properties": {
  16270. "type": "object",
  16271. "properties": {
  16272. "timestamp": {
  16273. "type": "number"
  16274. },
  16275. "sessionID": {
  16276. "type": "string",
  16277. "pattern": "^ses"
  16278. },
  16279. "messageID": {
  16280. "type": "string",
  16281. "pattern": "^msg_"
  16282. },
  16283. "prompt": {
  16284. "$ref": "#/components/schemas/Prompt"
  16285. },
  16286. "delivery": {
  16287. "type": "string",
  16288. "enum": ["steer", "queue"]
  16289. }
  16290. },
  16291. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16292. "additionalProperties": false
  16293. }
  16294. },
  16295. "required": ["id", "type", "properties"],
  16296. "additionalProperties": false
  16297. },
  16298. {
  16299. "type": "object",
  16300. "properties": {
  16301. "id": {
  16302. "type": "string",
  16303. "pattern": "^evt_"
  16304. },
  16305. "type": {
  16306. "type": "string",
  16307. "enum": ["session.next.prompt.promoted"]
  16308. },
  16309. "properties": {
  16310. "type": "object",
  16311. "properties": {
  16312. "timestamp": {
  16313. "type": "number"
  16314. },
  16315. "sessionID": {
  16316. "type": "string",
  16317. "pattern": "^ses"
  16318. },
  16319. "messageID": {
  16320. "type": "string",
  16321. "pattern": "^msg_"
  16322. },
  16323. "prompt": {
  16324. "$ref": "#/components/schemas/Prompt"
  16325. },
  16326. "timeCreated": {
  16327. "type": "number"
  16328. }
  16329. },
  16330. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  16331. "additionalProperties": false
  16332. }
  16333. },
  16334. "required": ["id", "type", "properties"],
  16335. "additionalProperties": false
  16336. },
  16337. {
  16338. "type": "object",
  16339. "properties": {
  16340. "id": {
  16341. "type": "string",
  16342. "pattern": "^evt_"
  16343. },
  16344. "type": {
  16345. "type": "string",
  16346. "enum": ["session.next.interrupt.requested"]
  16347. },
  16348. "properties": {
  16349. "type": "object",
  16350. "properties": {
  16351. "timestamp": {
  16352. "type": "number"
  16353. },
  16354. "sessionID": {
  16355. "type": "string",
  16356. "pattern": "^ses"
  16357. }
  16358. },
  16359. "required": ["timestamp", "sessionID"],
  16360. "additionalProperties": false
  16361. }
  16362. },
  16363. "required": ["id", "type", "properties"],
  16364. "additionalProperties": false
  16365. },
  16366. {
  16367. "type": "object",
  16368. "properties": {
  16369. "id": {
  16370. "type": "string",
  16371. "pattern": "^evt_"
  16372. },
  16373. "type": {
  16374. "type": "string",
  16375. "enum": ["session.next.context.updated"]
  16376. },
  16377. "properties": {
  16378. "type": "object",
  16379. "properties": {
  16380. "timestamp": {
  16381. "type": "number"
  16382. },
  16383. "sessionID": {
  16384. "type": "string",
  16385. "pattern": "^ses"
  16386. },
  16387. "messageID": {
  16388. "type": "string",
  16389. "pattern": "^msg_"
  16390. },
  16391. "text": {
  16392. "type": "string"
  16393. }
  16394. },
  16395. "required": ["timestamp", "sessionID", "messageID", "text"],
  16396. "additionalProperties": false
  16397. }
  16398. },
  16399. "required": ["id", "type", "properties"],
  16400. "additionalProperties": false
  16401. },
  16402. {
  16403. "type": "object",
  16404. "properties": {
  16405. "id": {
  16406. "type": "string",
  16407. "pattern": "^evt_"
  16408. },
  16409. "type": {
  16410. "type": "string",
  16411. "enum": ["session.next.synthetic"]
  16412. },
  16413. "properties": {
  16414. "type": "object",
  16415. "properties": {
  16416. "timestamp": {
  16417. "type": "number"
  16418. },
  16419. "sessionID": {
  16420. "type": "string",
  16421. "pattern": "^ses"
  16422. },
  16423. "messageID": {
  16424. "type": "string",
  16425. "pattern": "^msg_"
  16426. },
  16427. "text": {
  16428. "type": "string"
  16429. }
  16430. },
  16431. "required": ["timestamp", "sessionID", "messageID", "text"],
  16432. "additionalProperties": false
  16433. }
  16434. },
  16435. "required": ["id", "type", "properties"],
  16436. "additionalProperties": false
  16437. },
  16438. {
  16439. "type": "object",
  16440. "properties": {
  16441. "id": {
  16442. "type": "string",
  16443. "pattern": "^evt_"
  16444. },
  16445. "type": {
  16446. "type": "string",
  16447. "enum": ["session.next.shell.started"]
  16448. },
  16449. "properties": {
  16450. "type": "object",
  16451. "properties": {
  16452. "timestamp": {
  16453. "type": "number"
  16454. },
  16455. "sessionID": {
  16456. "type": "string",
  16457. "pattern": "^ses"
  16458. },
  16459. "messageID": {
  16460. "type": "string",
  16461. "pattern": "^msg_"
  16462. },
  16463. "callID": {
  16464. "type": "string"
  16465. },
  16466. "command": {
  16467. "type": "string"
  16468. }
  16469. },
  16470. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  16471. "additionalProperties": false
  16472. }
  16473. },
  16474. "required": ["id", "type", "properties"],
  16475. "additionalProperties": false
  16476. },
  16477. {
  16478. "type": "object",
  16479. "properties": {
  16480. "id": {
  16481. "type": "string",
  16482. "pattern": "^evt_"
  16483. },
  16484. "type": {
  16485. "type": "string",
  16486. "enum": ["session.next.shell.ended"]
  16487. },
  16488. "properties": {
  16489. "type": "object",
  16490. "properties": {
  16491. "timestamp": {
  16492. "type": "number"
  16493. },
  16494. "sessionID": {
  16495. "type": "string",
  16496. "pattern": "^ses"
  16497. },
  16498. "callID": {
  16499. "type": "string"
  16500. },
  16501. "output": {
  16502. "type": "string"
  16503. }
  16504. },
  16505. "required": ["timestamp", "sessionID", "callID", "output"],
  16506. "additionalProperties": false
  16507. }
  16508. },
  16509. "required": ["id", "type", "properties"],
  16510. "additionalProperties": false
  16511. },
  16512. {
  16513. "type": "object",
  16514. "properties": {
  16515. "id": {
  16516. "type": "string",
  16517. "pattern": "^evt_"
  16518. },
  16519. "type": {
  16520. "type": "string",
  16521. "enum": ["session.next.step.started"]
  16522. },
  16523. "properties": {
  16524. "type": "object",
  16525. "properties": {
  16526. "timestamp": {
  16527. "type": "number"
  16528. },
  16529. "sessionID": {
  16530. "type": "string",
  16531. "pattern": "^ses"
  16532. },
  16533. "assistantMessageID": {
  16534. "type": "string",
  16535. "pattern": "^msg_"
  16536. },
  16537. "agent": {
  16538. "type": "string"
  16539. },
  16540. "model": {
  16541. "type": "object",
  16542. "properties": {
  16543. "id": {
  16544. "type": "string"
  16545. },
  16546. "providerID": {
  16547. "type": "string"
  16548. },
  16549. "variant": {
  16550. "type": "string"
  16551. }
  16552. },
  16553. "required": ["id", "providerID"],
  16554. "additionalProperties": false
  16555. },
  16556. "snapshot": {
  16557. "type": "string"
  16558. }
  16559. },
  16560. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  16561. "additionalProperties": false
  16562. }
  16563. },
  16564. "required": ["id", "type", "properties"],
  16565. "additionalProperties": false
  16566. },
  16567. {
  16568. "type": "object",
  16569. "properties": {
  16570. "id": {
  16571. "type": "string",
  16572. "pattern": "^evt_"
  16573. },
  16574. "type": {
  16575. "type": "string",
  16576. "enum": ["session.next.step.ended"]
  16577. },
  16578. "properties": {
  16579. "type": "object",
  16580. "properties": {
  16581. "timestamp": {
  16582. "type": "number"
  16583. },
  16584. "sessionID": {
  16585. "type": "string",
  16586. "pattern": "^ses"
  16587. },
  16588. "assistantMessageID": {
  16589. "type": "string",
  16590. "pattern": "^msg_"
  16591. },
  16592. "finish": {
  16593. "type": "string"
  16594. },
  16595. "cost": {
  16596. "type": "number"
  16597. },
  16598. "tokens": {
  16599. "type": "object",
  16600. "properties": {
  16601. "input": {
  16602. "type": "number"
  16603. },
  16604. "output": {
  16605. "type": "number"
  16606. },
  16607. "reasoning": {
  16608. "type": "number"
  16609. },
  16610. "cache": {
  16611. "type": "object",
  16612. "properties": {
  16613. "read": {
  16614. "type": "number"
  16615. },
  16616. "write": {
  16617. "type": "number"
  16618. }
  16619. },
  16620. "required": ["read", "write"],
  16621. "additionalProperties": false
  16622. }
  16623. },
  16624. "required": ["input", "output", "reasoning", "cache"],
  16625. "additionalProperties": false
  16626. },
  16627. "snapshot": {
  16628. "type": "string"
  16629. }
  16630. },
  16631. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  16632. "additionalProperties": false
  16633. }
  16634. },
  16635. "required": ["id", "type", "properties"],
  16636. "additionalProperties": false
  16637. },
  16638. {
  16639. "type": "object",
  16640. "properties": {
  16641. "id": {
  16642. "type": "string",
  16643. "pattern": "^evt_"
  16644. },
  16645. "type": {
  16646. "type": "string",
  16647. "enum": ["session.next.step.failed"]
  16648. },
  16649. "properties": {
  16650. "type": "object",
  16651. "properties": {
  16652. "timestamp": {
  16653. "type": "number"
  16654. },
  16655. "sessionID": {
  16656. "type": "string",
  16657. "pattern": "^ses"
  16658. },
  16659. "assistantMessageID": {
  16660. "type": "string",
  16661. "pattern": "^msg_"
  16662. },
  16663. "error": {
  16664. "$ref": "#/components/schemas/SessionErrorUnknown"
  16665. }
  16666. },
  16667. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  16668. "additionalProperties": false
  16669. }
  16670. },
  16671. "required": ["id", "type", "properties"],
  16672. "additionalProperties": false
  16673. },
  16674. {
  16675. "type": "object",
  16676. "properties": {
  16677. "id": {
  16678. "type": "string",
  16679. "pattern": "^evt_"
  16680. },
  16681. "type": {
  16682. "type": "string",
  16683. "enum": ["session.next.text.started"]
  16684. },
  16685. "properties": {
  16686. "type": "object",
  16687. "properties": {
  16688. "timestamp": {
  16689. "type": "number"
  16690. },
  16691. "sessionID": {
  16692. "type": "string",
  16693. "pattern": "^ses"
  16694. },
  16695. "assistantMessageID": {
  16696. "type": "string",
  16697. "pattern": "^msg_"
  16698. },
  16699. "textID": {
  16700. "type": "string"
  16701. }
  16702. },
  16703. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  16704. "additionalProperties": false
  16705. }
  16706. },
  16707. "required": ["id", "type", "properties"],
  16708. "additionalProperties": false
  16709. },
  16710. {
  16711. "type": "object",
  16712. "properties": {
  16713. "id": {
  16714. "type": "string",
  16715. "pattern": "^evt_"
  16716. },
  16717. "type": {
  16718. "type": "string",
  16719. "enum": ["session.next.text.delta"]
  16720. },
  16721. "properties": {
  16722. "type": "object",
  16723. "properties": {
  16724. "timestamp": {
  16725. "type": "number"
  16726. },
  16727. "sessionID": {
  16728. "type": "string",
  16729. "pattern": "^ses"
  16730. },
  16731. "assistantMessageID": {
  16732. "type": "string",
  16733. "pattern": "^msg_"
  16734. },
  16735. "textID": {
  16736. "type": "string"
  16737. },
  16738. "delta": {
  16739. "type": "string"
  16740. }
  16741. },
  16742. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  16743. "additionalProperties": false
  16744. }
  16745. },
  16746. "required": ["id", "type", "properties"],
  16747. "additionalProperties": false
  16748. },
  16749. {
  16750. "type": "object",
  16751. "properties": {
  16752. "id": {
  16753. "type": "string",
  16754. "pattern": "^evt_"
  16755. },
  16756. "type": {
  16757. "type": "string",
  16758. "enum": ["session.next.text.ended"]
  16759. },
  16760. "properties": {
  16761. "type": "object",
  16762. "properties": {
  16763. "timestamp": {
  16764. "type": "number"
  16765. },
  16766. "sessionID": {
  16767. "type": "string",
  16768. "pattern": "^ses"
  16769. },
  16770. "assistantMessageID": {
  16771. "type": "string",
  16772. "pattern": "^msg_"
  16773. },
  16774. "textID": {
  16775. "type": "string"
  16776. },
  16777. "text": {
  16778. "type": "string"
  16779. }
  16780. },
  16781. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  16782. "additionalProperties": false
  16783. }
  16784. },
  16785. "required": ["id", "type", "properties"],
  16786. "additionalProperties": false
  16787. },
  16788. {
  16789. "type": "object",
  16790. "properties": {
  16791. "id": {
  16792. "type": "string",
  16793. "pattern": "^evt_"
  16794. },
  16795. "type": {
  16796. "type": "string",
  16797. "enum": ["session.next.reasoning.started"]
  16798. },
  16799. "properties": {
  16800. "type": "object",
  16801. "properties": {
  16802. "timestamp": {
  16803. "type": "number"
  16804. },
  16805. "sessionID": {
  16806. "type": "string",
  16807. "pattern": "^ses"
  16808. },
  16809. "assistantMessageID": {
  16810. "type": "string",
  16811. "pattern": "^msg_"
  16812. },
  16813. "reasoningID": {
  16814. "type": "string"
  16815. },
  16816. "providerMetadata": {
  16817. "type": "object",
  16818. "additionalProperties": {
  16819. "type": "object"
  16820. }
  16821. }
  16822. },
  16823. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  16824. "additionalProperties": false
  16825. }
  16826. },
  16827. "required": ["id", "type", "properties"],
  16828. "additionalProperties": false
  16829. },
  16830. {
  16831. "type": "object",
  16832. "properties": {
  16833. "id": {
  16834. "type": "string",
  16835. "pattern": "^evt_"
  16836. },
  16837. "type": {
  16838. "type": "string",
  16839. "enum": ["session.next.reasoning.delta"]
  16840. },
  16841. "properties": {
  16842. "type": "object",
  16843. "properties": {
  16844. "timestamp": {
  16845. "type": "number"
  16846. },
  16847. "sessionID": {
  16848. "type": "string",
  16849. "pattern": "^ses"
  16850. },
  16851. "assistantMessageID": {
  16852. "type": "string",
  16853. "pattern": "^msg_"
  16854. },
  16855. "reasoningID": {
  16856. "type": "string"
  16857. },
  16858. "delta": {
  16859. "type": "string"
  16860. }
  16861. },
  16862. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  16863. "additionalProperties": false
  16864. }
  16865. },
  16866. "required": ["id", "type", "properties"],
  16867. "additionalProperties": false
  16868. },
  16869. {
  16870. "type": "object",
  16871. "properties": {
  16872. "id": {
  16873. "type": "string",
  16874. "pattern": "^evt_"
  16875. },
  16876. "type": {
  16877. "type": "string",
  16878. "enum": ["session.next.reasoning.ended"]
  16879. },
  16880. "properties": {
  16881. "type": "object",
  16882. "properties": {
  16883. "timestamp": {
  16884. "type": "number"
  16885. },
  16886. "sessionID": {
  16887. "type": "string",
  16888. "pattern": "^ses"
  16889. },
  16890. "assistantMessageID": {
  16891. "type": "string",
  16892. "pattern": "^msg_"
  16893. },
  16894. "reasoningID": {
  16895. "type": "string"
  16896. },
  16897. "text": {
  16898. "type": "string"
  16899. },
  16900. "providerMetadata": {
  16901. "type": "object",
  16902. "additionalProperties": {
  16903. "type": "object"
  16904. }
  16905. }
  16906. },
  16907. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  16908. "additionalProperties": false
  16909. }
  16910. },
  16911. "required": ["id", "type", "properties"],
  16912. "additionalProperties": false
  16913. },
  16914. {
  16915. "type": "object",
  16916. "properties": {
  16917. "id": {
  16918. "type": "string",
  16919. "pattern": "^evt_"
  16920. },
  16921. "type": {
  16922. "type": "string",
  16923. "enum": ["session.next.tool.input.started"]
  16924. },
  16925. "properties": {
  16926. "type": "object",
  16927. "properties": {
  16928. "timestamp": {
  16929. "type": "number"
  16930. },
  16931. "sessionID": {
  16932. "type": "string",
  16933. "pattern": "^ses"
  16934. },
  16935. "assistantMessageID": {
  16936. "type": "string",
  16937. "pattern": "^msg_"
  16938. },
  16939. "callID": {
  16940. "type": "string"
  16941. },
  16942. "name": {
  16943. "type": "string"
  16944. }
  16945. },
  16946. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  16947. "additionalProperties": false
  16948. }
  16949. },
  16950. "required": ["id", "type", "properties"],
  16951. "additionalProperties": false
  16952. },
  16953. {
  16954. "type": "object",
  16955. "properties": {
  16956. "id": {
  16957. "type": "string",
  16958. "pattern": "^evt_"
  16959. },
  16960. "type": {
  16961. "type": "string",
  16962. "enum": ["session.next.tool.input.delta"]
  16963. },
  16964. "properties": {
  16965. "type": "object",
  16966. "properties": {
  16967. "timestamp": {
  16968. "type": "number"
  16969. },
  16970. "sessionID": {
  16971. "type": "string",
  16972. "pattern": "^ses"
  16973. },
  16974. "assistantMessageID": {
  16975. "type": "string",
  16976. "pattern": "^msg_"
  16977. },
  16978. "callID": {
  16979. "type": "string"
  16980. },
  16981. "delta": {
  16982. "type": "string"
  16983. }
  16984. },
  16985. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  16986. "additionalProperties": false
  16987. }
  16988. },
  16989. "required": ["id", "type", "properties"],
  16990. "additionalProperties": false
  16991. },
  16992. {
  16993. "type": "object",
  16994. "properties": {
  16995. "id": {
  16996. "type": "string",
  16997. "pattern": "^evt_"
  16998. },
  16999. "type": {
  17000. "type": "string",
  17001. "enum": ["session.next.tool.input.ended"]
  17002. },
  17003. "properties": {
  17004. "type": "object",
  17005. "properties": {
  17006. "timestamp": {
  17007. "type": "number"
  17008. },
  17009. "sessionID": {
  17010. "type": "string",
  17011. "pattern": "^ses"
  17012. },
  17013. "assistantMessageID": {
  17014. "type": "string",
  17015. "pattern": "^msg_"
  17016. },
  17017. "callID": {
  17018. "type": "string"
  17019. },
  17020. "text": {
  17021. "type": "string"
  17022. }
  17023. },
  17024. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17025. "additionalProperties": false
  17026. }
  17027. },
  17028. "required": ["id", "type", "properties"],
  17029. "additionalProperties": false
  17030. },
  17031. {
  17032. "type": "object",
  17033. "properties": {
  17034. "id": {
  17035. "type": "string",
  17036. "pattern": "^evt_"
  17037. },
  17038. "type": {
  17039. "type": "string",
  17040. "enum": ["session.next.tool.called"]
  17041. },
  17042. "properties": {
  17043. "type": "object",
  17044. "properties": {
  17045. "timestamp": {
  17046. "type": "number"
  17047. },
  17048. "sessionID": {
  17049. "type": "string",
  17050. "pattern": "^ses"
  17051. },
  17052. "assistantMessageID": {
  17053. "type": "string",
  17054. "pattern": "^msg_"
  17055. },
  17056. "callID": {
  17057. "type": "string"
  17058. },
  17059. "tool": {
  17060. "type": "string"
  17061. },
  17062. "input": {
  17063. "type": "object"
  17064. },
  17065. "provider": {
  17066. "type": "object",
  17067. "properties": {
  17068. "executed": {
  17069. "type": "boolean"
  17070. },
  17071. "metadata": {
  17072. "type": "object",
  17073. "additionalProperties": {
  17074. "type": "object"
  17075. }
  17076. }
  17077. },
  17078. "required": ["executed"],
  17079. "additionalProperties": false
  17080. }
  17081. },
  17082. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  17083. "additionalProperties": false
  17084. }
  17085. },
  17086. "required": ["id", "type", "properties"],
  17087. "additionalProperties": false
  17088. },
  17089. {
  17090. "type": "object",
  17091. "properties": {
  17092. "id": {
  17093. "type": "string",
  17094. "pattern": "^evt_"
  17095. },
  17096. "type": {
  17097. "type": "string",
  17098. "enum": ["session.next.tool.progress"]
  17099. },
  17100. "properties": {
  17101. "type": "object",
  17102. "properties": {
  17103. "timestamp": {
  17104. "type": "number"
  17105. },
  17106. "sessionID": {
  17107. "type": "string",
  17108. "pattern": "^ses"
  17109. },
  17110. "assistantMessageID": {
  17111. "type": "string",
  17112. "pattern": "^msg_"
  17113. },
  17114. "callID": {
  17115. "type": "string"
  17116. },
  17117. "structured": {
  17118. "type": "object"
  17119. },
  17120. "content": {
  17121. "type": "array",
  17122. "items": {
  17123. "anyOf": [
  17124. {
  17125. "$ref": "#/components/schemas/ToolTextContent"
  17126. },
  17127. {
  17128. "$ref": "#/components/schemas/ToolFileContent"
  17129. }
  17130. ]
  17131. }
  17132. }
  17133. },
  17134. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17135. "additionalProperties": false
  17136. }
  17137. },
  17138. "required": ["id", "type", "properties"],
  17139. "additionalProperties": false
  17140. },
  17141. {
  17142. "type": "object",
  17143. "properties": {
  17144. "id": {
  17145. "type": "string",
  17146. "pattern": "^evt_"
  17147. },
  17148. "type": {
  17149. "type": "string",
  17150. "enum": ["session.next.tool.success"]
  17151. },
  17152. "properties": {
  17153. "type": "object",
  17154. "properties": {
  17155. "timestamp": {
  17156. "type": "number"
  17157. },
  17158. "sessionID": {
  17159. "type": "string",
  17160. "pattern": "^ses"
  17161. },
  17162. "assistantMessageID": {
  17163. "type": "string",
  17164. "pattern": "^msg_"
  17165. },
  17166. "callID": {
  17167. "type": "string"
  17168. },
  17169. "structured": {
  17170. "type": "object"
  17171. },
  17172. "content": {
  17173. "type": "array",
  17174. "items": {
  17175. "anyOf": [
  17176. {
  17177. "$ref": "#/components/schemas/ToolTextContent"
  17178. },
  17179. {
  17180. "$ref": "#/components/schemas/ToolFileContent"
  17181. }
  17182. ]
  17183. }
  17184. },
  17185. "outputPaths": {
  17186. "type": "array",
  17187. "items": {
  17188. "type": "string"
  17189. }
  17190. },
  17191. "result": {},
  17192. "provider": {
  17193. "type": "object",
  17194. "properties": {
  17195. "executed": {
  17196. "type": "boolean"
  17197. },
  17198. "metadata": {
  17199. "type": "object",
  17200. "additionalProperties": {
  17201. "type": "object"
  17202. }
  17203. }
  17204. },
  17205. "required": ["executed"],
  17206. "additionalProperties": false
  17207. }
  17208. },
  17209. "required": [
  17210. "timestamp",
  17211. "sessionID",
  17212. "assistantMessageID",
  17213. "callID",
  17214. "structured",
  17215. "content",
  17216. "provider"
  17217. ],
  17218. "additionalProperties": false
  17219. }
  17220. },
  17221. "required": ["id", "type", "properties"],
  17222. "additionalProperties": false
  17223. },
  17224. {
  17225. "type": "object",
  17226. "properties": {
  17227. "id": {
  17228. "type": "string",
  17229. "pattern": "^evt_"
  17230. },
  17231. "type": {
  17232. "type": "string",
  17233. "enum": ["session.next.tool.failed"]
  17234. },
  17235. "properties": {
  17236. "type": "object",
  17237. "properties": {
  17238. "timestamp": {
  17239. "type": "number"
  17240. },
  17241. "sessionID": {
  17242. "type": "string",
  17243. "pattern": "^ses"
  17244. },
  17245. "assistantMessageID": {
  17246. "type": "string",
  17247. "pattern": "^msg_"
  17248. },
  17249. "callID": {
  17250. "type": "string"
  17251. },
  17252. "error": {
  17253. "$ref": "#/components/schemas/SessionErrorUnknown"
  17254. },
  17255. "result": {},
  17256. "provider": {
  17257. "type": "object",
  17258. "properties": {
  17259. "executed": {
  17260. "type": "boolean"
  17261. },
  17262. "metadata": {
  17263. "type": "object",
  17264. "additionalProperties": {
  17265. "type": "object"
  17266. }
  17267. }
  17268. },
  17269. "required": ["executed"],
  17270. "additionalProperties": false
  17271. }
  17272. },
  17273. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  17274. "additionalProperties": false
  17275. }
  17276. },
  17277. "required": ["id", "type", "properties"],
  17278. "additionalProperties": false
  17279. },
  17280. {
  17281. "type": "object",
  17282. "properties": {
  17283. "id": {
  17284. "type": "string",
  17285. "pattern": "^evt_"
  17286. },
  17287. "type": {
  17288. "type": "string",
  17289. "enum": ["session.next.retried"]
  17290. },
  17291. "properties": {
  17292. "type": "object",
  17293. "properties": {
  17294. "timestamp": {
  17295. "type": "number"
  17296. },
  17297. "sessionID": {
  17298. "type": "string",
  17299. "pattern": "^ses"
  17300. },
  17301. "attempt": {
  17302. "type": "number"
  17303. },
  17304. "error": {
  17305. "$ref": "#/components/schemas/SessionNextRetry_error"
  17306. }
  17307. },
  17308. "required": ["timestamp", "sessionID", "attempt", "error"],
  17309. "additionalProperties": false
  17310. }
  17311. },
  17312. "required": ["id", "type", "properties"],
  17313. "additionalProperties": false
  17314. },
  17315. {
  17316. "type": "object",
  17317. "properties": {
  17318. "id": {
  17319. "type": "string",
  17320. "pattern": "^evt_"
  17321. },
  17322. "type": {
  17323. "type": "string",
  17324. "enum": ["session.next.compaction.started"]
  17325. },
  17326. "properties": {
  17327. "type": "object",
  17328. "properties": {
  17329. "timestamp": {
  17330. "type": "number"
  17331. },
  17332. "sessionID": {
  17333. "type": "string",
  17334. "pattern": "^ses"
  17335. },
  17336. "messageID": {
  17337. "type": "string",
  17338. "pattern": "^msg_"
  17339. },
  17340. "reason": {
  17341. "type": "string",
  17342. "enum": ["auto", "manual"]
  17343. }
  17344. },
  17345. "required": ["timestamp", "sessionID", "messageID", "reason"],
  17346. "additionalProperties": false
  17347. }
  17348. },
  17349. "required": ["id", "type", "properties"],
  17350. "additionalProperties": false
  17351. },
  17352. {
  17353. "type": "object",
  17354. "properties": {
  17355. "id": {
  17356. "type": "string",
  17357. "pattern": "^evt_"
  17358. },
  17359. "type": {
  17360. "type": "string",
  17361. "enum": ["session.next.compaction.delta"]
  17362. },
  17363. "properties": {
  17364. "type": "object",
  17365. "properties": {
  17366. "timestamp": {
  17367. "type": "number"
  17368. },
  17369. "sessionID": {
  17370. "type": "string",
  17371. "pattern": "^ses"
  17372. },
  17373. "messageID": {
  17374. "type": "string",
  17375. "pattern": "^msg_"
  17376. },
  17377. "text": {
  17378. "type": "string"
  17379. }
  17380. },
  17381. "required": ["timestamp", "sessionID", "messageID", "text"],
  17382. "additionalProperties": false
  17383. }
  17384. },
  17385. "required": ["id", "type", "properties"],
  17386. "additionalProperties": false
  17387. },
  17388. {
  17389. "type": "object",
  17390. "properties": {
  17391. "id": {
  17392. "type": "string",
  17393. "pattern": "^evt_"
  17394. },
  17395. "type": {
  17396. "type": "string",
  17397. "enum": ["session.next.compaction.ended"]
  17398. },
  17399. "properties": {
  17400. "type": "object",
  17401. "properties": {
  17402. "timestamp": {
  17403. "type": "number"
  17404. },
  17405. "sessionID": {
  17406. "type": "string",
  17407. "pattern": "^ses"
  17408. },
  17409. "messageID": {
  17410. "type": "string",
  17411. "pattern": "^msg_"
  17412. },
  17413. "reason": {
  17414. "type": "string",
  17415. "enum": ["auto", "manual"]
  17416. },
  17417. "text": {
  17418. "type": "string"
  17419. },
  17420. "recent": {
  17421. "type": "string"
  17422. }
  17423. },
  17424. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  17425. "additionalProperties": false
  17426. }
  17427. },
  17428. "required": ["id", "type", "properties"],
  17429. "additionalProperties": false
  17430. },
  17431. {
  17432. "type": "object",
  17433. "properties": {
  17434. "id": {
  17435. "type": "string",
  17436. "pattern": "^evt_"
  17437. },
  17438. "type": {
  17439. "type": "string",
  17440. "enum": ["message.part.delta"]
  17441. },
  17442. "properties": {
  17443. "type": "object",
  17444. "properties": {
  17445. "sessionID": {
  17446. "type": "string",
  17447. "pattern": "^ses"
  17448. },
  17449. "messageID": {
  17450. "type": "string",
  17451. "pattern": "^msg"
  17452. },
  17453. "partID": {
  17454. "type": "string",
  17455. "pattern": "^prt"
  17456. },
  17457. "field": {
  17458. "type": "string"
  17459. },
  17460. "delta": {
  17461. "type": "string"
  17462. }
  17463. },
  17464. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17465. "additionalProperties": false
  17466. }
  17467. },
  17468. "required": ["id", "type", "properties"],
  17469. "additionalProperties": false
  17470. },
  17471. {
  17472. "type": "object",
  17473. "properties": {
  17474. "id": {
  17475. "type": "string",
  17476. "pattern": "^evt_"
  17477. },
  17478. "type": {
  17479. "type": "string",
  17480. "enum": ["session.diff"]
  17481. },
  17482. "properties": {
  17483. "type": "object",
  17484. "properties": {
  17485. "sessionID": {
  17486. "type": "string",
  17487. "pattern": "^ses"
  17488. },
  17489. "diff": {
  17490. "type": "array",
  17491. "items": {
  17492. "$ref": "#/components/schemas/SnapshotFileDiff"
  17493. }
  17494. }
  17495. },
  17496. "required": ["sessionID", "diff"],
  17497. "additionalProperties": false
  17498. }
  17499. },
  17500. "required": ["id", "type", "properties"],
  17501. "additionalProperties": false
  17502. },
  17503. {
  17504. "type": "object",
  17505. "properties": {
  17506. "id": {
  17507. "type": "string",
  17508. "pattern": "^evt_"
  17509. },
  17510. "type": {
  17511. "type": "string",
  17512. "enum": ["session.error"]
  17513. },
  17514. "properties": {
  17515. "type": "object",
  17516. "properties": {
  17517. "sessionID": {
  17518. "type": "string",
  17519. "pattern": "^ses"
  17520. },
  17521. "error": {
  17522. "anyOf": [
  17523. {
  17524. "$ref": "#/components/schemas/ProviderAuthError"
  17525. },
  17526. {
  17527. "$ref": "#/components/schemas/UnknownError"
  17528. },
  17529. {
  17530. "$ref": "#/components/schemas/MessageOutputLengthError"
  17531. },
  17532. {
  17533. "$ref": "#/components/schemas/MessageAbortedError"
  17534. },
  17535. {
  17536. "$ref": "#/components/schemas/StructuredOutputError"
  17537. },
  17538. {
  17539. "$ref": "#/components/schemas/ContextOverflowError"
  17540. },
  17541. {
  17542. "$ref": "#/components/schemas/ContentFilterError"
  17543. },
  17544. {
  17545. "$ref": "#/components/schemas/APIError"
  17546. }
  17547. ]
  17548. }
  17549. },
  17550. "additionalProperties": false
  17551. }
  17552. },
  17553. "required": ["id", "type", "properties"],
  17554. "additionalProperties": false
  17555. },
  17556. {
  17557. "type": "object",
  17558. "properties": {
  17559. "id": {
  17560. "type": "string",
  17561. "pattern": "^evt_"
  17562. },
  17563. "type": {
  17564. "type": "string",
  17565. "enum": ["installation.updated"]
  17566. },
  17567. "properties": {
  17568. "type": "object",
  17569. "properties": {
  17570. "version": {
  17571. "type": "string"
  17572. }
  17573. },
  17574. "required": ["version"],
  17575. "additionalProperties": false
  17576. }
  17577. },
  17578. "required": ["id", "type", "properties"],
  17579. "additionalProperties": false
  17580. },
  17581. {
  17582. "type": "object",
  17583. "properties": {
  17584. "id": {
  17585. "type": "string",
  17586. "pattern": "^evt_"
  17587. },
  17588. "type": {
  17589. "type": "string",
  17590. "enum": ["installation.update-available"]
  17591. },
  17592. "properties": {
  17593. "type": "object",
  17594. "properties": {
  17595. "version": {
  17596. "type": "string"
  17597. }
  17598. },
  17599. "required": ["version"],
  17600. "additionalProperties": false
  17601. }
  17602. },
  17603. "required": ["id", "type", "properties"],
  17604. "additionalProperties": false
  17605. },
  17606. {
  17607. "type": "object",
  17608. "properties": {
  17609. "id": {
  17610. "type": "string",
  17611. "pattern": "^evt_"
  17612. },
  17613. "type": {
  17614. "type": "string",
  17615. "enum": ["file.edited"]
  17616. },
  17617. "properties": {
  17618. "type": "object",
  17619. "properties": {
  17620. "file": {
  17621. "type": "string"
  17622. }
  17623. },
  17624. "required": ["file"],
  17625. "additionalProperties": false
  17626. }
  17627. },
  17628. "required": ["id", "type", "properties"],
  17629. "additionalProperties": false
  17630. },
  17631. {
  17632. "type": "object",
  17633. "properties": {
  17634. "id": {
  17635. "type": "string",
  17636. "pattern": "^evt_"
  17637. },
  17638. "type": {
  17639. "type": "string",
  17640. "enum": ["integration.updated"]
  17641. },
  17642. "properties": {
  17643. "type": "object",
  17644. "properties": {}
  17645. }
  17646. },
  17647. "required": ["id", "type", "properties"],
  17648. "additionalProperties": false
  17649. },
  17650. {
  17651. "type": "object",
  17652. "properties": {
  17653. "id": {
  17654. "type": "string",
  17655. "pattern": "^evt_"
  17656. },
  17657. "type": {
  17658. "type": "string",
  17659. "enum": ["permission.v2.asked"]
  17660. },
  17661. "properties": {
  17662. "type": "object",
  17663. "properties": {
  17664. "id": {
  17665. "type": "string",
  17666. "pattern": "^per"
  17667. },
  17668. "sessionID": {
  17669. "type": "string",
  17670. "pattern": "^ses"
  17671. },
  17672. "action": {
  17673. "type": "string"
  17674. },
  17675. "resources": {
  17676. "type": "array",
  17677. "items": {
  17678. "type": "string"
  17679. }
  17680. },
  17681. "save": {
  17682. "type": "array",
  17683. "items": {
  17684. "type": "string"
  17685. }
  17686. },
  17687. "metadata": {
  17688. "type": "object"
  17689. },
  17690. "source": {
  17691. "$ref": "#/components/schemas/PermissionV2Source"
  17692. }
  17693. },
  17694. "required": ["id", "sessionID", "action", "resources"],
  17695. "additionalProperties": false
  17696. }
  17697. },
  17698. "required": ["id", "type", "properties"],
  17699. "additionalProperties": false
  17700. },
  17701. {
  17702. "type": "object",
  17703. "properties": {
  17704. "id": {
  17705. "type": "string",
  17706. "pattern": "^evt_"
  17707. },
  17708. "type": {
  17709. "type": "string",
  17710. "enum": ["permission.v2.replied"]
  17711. },
  17712. "properties": {
  17713. "type": "object",
  17714. "properties": {
  17715. "sessionID": {
  17716. "type": "string",
  17717. "pattern": "^ses"
  17718. },
  17719. "requestID": {
  17720. "type": "string",
  17721. "pattern": "^per"
  17722. },
  17723. "reply": {
  17724. "$ref": "#/components/schemas/PermissionV2Reply"
  17725. }
  17726. },
  17727. "required": ["sessionID", "requestID", "reply"],
  17728. "additionalProperties": false
  17729. }
  17730. },
  17731. "required": ["id", "type", "properties"],
  17732. "additionalProperties": false
  17733. },
  17734. {
  17735. "type": "object",
  17736. "properties": {
  17737. "id": {
  17738. "type": "string",
  17739. "pattern": "^evt_"
  17740. },
  17741. "type": {
  17742. "type": "string",
  17743. "enum": ["reference.updated"]
  17744. },
  17745. "properties": {
  17746. "type": "object",
  17747. "properties": {}
  17748. }
  17749. },
  17750. "required": ["id", "type", "properties"],
  17751. "additionalProperties": false
  17752. },
  17753. {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string",
  17758. "pattern": "^evt_"
  17759. },
  17760. "type": {
  17761. "type": "string",
  17762. "enum": ["project.directories.updated"]
  17763. },
  17764. "properties": {
  17765. "type": "object",
  17766. "properties": {
  17767. "projectID": {
  17768. "type": "string"
  17769. }
  17770. },
  17771. "required": ["projectID"],
  17772. "additionalProperties": false
  17773. }
  17774. },
  17775. "required": ["id", "type", "properties"],
  17776. "additionalProperties": false
  17777. },
  17778. {
  17779. "type": "object",
  17780. "properties": {
  17781. "id": {
  17782. "type": "string",
  17783. "pattern": "^evt_"
  17784. },
  17785. "type": {
  17786. "type": "string",
  17787. "enum": ["file.watcher.updated"]
  17788. },
  17789. "properties": {
  17790. "type": "object",
  17791. "properties": {
  17792. "file": {
  17793. "type": "string"
  17794. },
  17795. "event": {
  17796. "type": "string",
  17797. "enum": ["add", "change", "unlink"]
  17798. }
  17799. },
  17800. "required": ["file", "event"],
  17801. "additionalProperties": false
  17802. }
  17803. },
  17804. "required": ["id", "type", "properties"],
  17805. "additionalProperties": false
  17806. },
  17807. {
  17808. "type": "object",
  17809. "properties": {
  17810. "id": {
  17811. "type": "string",
  17812. "pattern": "^evt_"
  17813. },
  17814. "type": {
  17815. "type": "string",
  17816. "enum": ["pty.created"]
  17817. },
  17818. "properties": {
  17819. "type": "object",
  17820. "properties": {
  17821. "info": {
  17822. "$ref": "#/components/schemas/Pty"
  17823. }
  17824. },
  17825. "required": ["info"],
  17826. "additionalProperties": false
  17827. }
  17828. },
  17829. "required": ["id", "type", "properties"],
  17830. "additionalProperties": false
  17831. },
  17832. {
  17833. "type": "object",
  17834. "properties": {
  17835. "id": {
  17836. "type": "string",
  17837. "pattern": "^evt_"
  17838. },
  17839. "type": {
  17840. "type": "string",
  17841. "enum": ["pty.updated"]
  17842. },
  17843. "properties": {
  17844. "type": "object",
  17845. "properties": {
  17846. "info": {
  17847. "$ref": "#/components/schemas/Pty"
  17848. }
  17849. },
  17850. "required": ["info"],
  17851. "additionalProperties": false
  17852. }
  17853. },
  17854. "required": ["id", "type", "properties"],
  17855. "additionalProperties": false
  17856. },
  17857. {
  17858. "type": "object",
  17859. "properties": {
  17860. "id": {
  17861. "type": "string",
  17862. "pattern": "^evt_"
  17863. },
  17864. "type": {
  17865. "type": "string",
  17866. "enum": ["pty.exited"]
  17867. },
  17868. "properties": {
  17869. "type": "object",
  17870. "properties": {
  17871. "id": {
  17872. "type": "string",
  17873. "pattern": "^pty"
  17874. },
  17875. "exitCode": {
  17876. "type": "integer",
  17877. "minimum": 0
  17878. }
  17879. },
  17880. "required": ["id", "exitCode"],
  17881. "additionalProperties": false
  17882. }
  17883. },
  17884. "required": ["id", "type", "properties"],
  17885. "additionalProperties": false
  17886. },
  17887. {
  17888. "type": "object",
  17889. "properties": {
  17890. "id": {
  17891. "type": "string",
  17892. "pattern": "^evt_"
  17893. },
  17894. "type": {
  17895. "type": "string",
  17896. "enum": ["pty.deleted"]
  17897. },
  17898. "properties": {
  17899. "type": "object",
  17900. "properties": {
  17901. "id": {
  17902. "type": "string",
  17903. "pattern": "^pty"
  17904. }
  17905. },
  17906. "required": ["id"],
  17907. "additionalProperties": false
  17908. }
  17909. },
  17910. "required": ["id", "type", "properties"],
  17911. "additionalProperties": false
  17912. },
  17913. {
  17914. "type": "object",
  17915. "properties": {
  17916. "id": {
  17917. "type": "string",
  17918. "pattern": "^evt_"
  17919. },
  17920. "type": {
  17921. "type": "string",
  17922. "enum": ["question.v2.asked"]
  17923. },
  17924. "properties": {
  17925. "type": "object",
  17926. "properties": {
  17927. "id": {
  17928. "type": "string",
  17929. "pattern": "^que"
  17930. },
  17931. "sessionID": {
  17932. "type": "string",
  17933. "pattern": "^ses"
  17934. },
  17935. "questions": {
  17936. "type": "array",
  17937. "items": {
  17938. "$ref": "#/components/schemas/QuestionV2Info"
  17939. },
  17940. "description": "Questions to ask"
  17941. },
  17942. "tool": {
  17943. "$ref": "#/components/schemas/QuestionV2Tool"
  17944. }
  17945. },
  17946. "required": ["id", "sessionID", "questions"],
  17947. "additionalProperties": false
  17948. }
  17949. },
  17950. "required": ["id", "type", "properties"],
  17951. "additionalProperties": false
  17952. },
  17953. {
  17954. "type": "object",
  17955. "properties": {
  17956. "id": {
  17957. "type": "string",
  17958. "pattern": "^evt_"
  17959. },
  17960. "type": {
  17961. "type": "string",
  17962. "enum": ["question.v2.replied"]
  17963. },
  17964. "properties": {
  17965. "type": "object",
  17966. "properties": {
  17967. "sessionID": {
  17968. "type": "string",
  17969. "pattern": "^ses"
  17970. },
  17971. "requestID": {
  17972. "type": "string",
  17973. "pattern": "^que"
  17974. },
  17975. "answers": {
  17976. "type": "array",
  17977. "items": {
  17978. "$ref": "#/components/schemas/QuestionV2Answer"
  17979. }
  17980. }
  17981. },
  17982. "required": ["sessionID", "requestID", "answers"],
  17983. "additionalProperties": false
  17984. }
  17985. },
  17986. "required": ["id", "type", "properties"],
  17987. "additionalProperties": false
  17988. },
  17989. {
  17990. "type": "object",
  17991. "properties": {
  17992. "id": {
  17993. "type": "string",
  17994. "pattern": "^evt_"
  17995. },
  17996. "type": {
  17997. "type": "string",
  17998. "enum": ["question.v2.rejected"]
  17999. },
  18000. "properties": {
  18001. "type": "object",
  18002. "properties": {
  18003. "sessionID": {
  18004. "type": "string",
  18005. "pattern": "^ses"
  18006. },
  18007. "requestID": {
  18008. "type": "string",
  18009. "pattern": "^que"
  18010. }
  18011. },
  18012. "required": ["sessionID", "requestID"],
  18013. "additionalProperties": false
  18014. }
  18015. },
  18016. "required": ["id", "type", "properties"],
  18017. "additionalProperties": false
  18018. },
  18019. {
  18020. "type": "object",
  18021. "properties": {
  18022. "id": {
  18023. "type": "string",
  18024. "pattern": "^evt_"
  18025. },
  18026. "type": {
  18027. "type": "string",
  18028. "enum": ["todo.updated"]
  18029. },
  18030. "properties": {
  18031. "type": "object",
  18032. "properties": {
  18033. "sessionID": {
  18034. "type": "string",
  18035. "pattern": "^ses"
  18036. },
  18037. "todos": {
  18038. "type": "array",
  18039. "items": {
  18040. "$ref": "#/components/schemas/Todo"
  18041. }
  18042. }
  18043. },
  18044. "required": ["sessionID", "todos"],
  18045. "additionalProperties": false
  18046. }
  18047. },
  18048. "required": ["id", "type", "properties"],
  18049. "additionalProperties": false
  18050. },
  18051. {
  18052. "type": "object",
  18053. "properties": {
  18054. "id": {
  18055. "type": "string",
  18056. "pattern": "^evt_"
  18057. },
  18058. "type": {
  18059. "type": "string",
  18060. "enum": ["lsp.updated"]
  18061. },
  18062. "properties": {
  18063. "type": "object",
  18064. "properties": {}
  18065. }
  18066. },
  18067. "required": ["id", "type", "properties"],
  18068. "additionalProperties": false
  18069. },
  18070. {
  18071. "type": "object",
  18072. "properties": {
  18073. "id": {
  18074. "type": "string",
  18075. "pattern": "^evt_"
  18076. },
  18077. "type": {
  18078. "type": "string",
  18079. "enum": ["permission.asked"]
  18080. },
  18081. "properties": {
  18082. "type": "object",
  18083. "properties": {
  18084. "id": {
  18085. "type": "string",
  18086. "pattern": "^per"
  18087. },
  18088. "sessionID": {
  18089. "type": "string",
  18090. "pattern": "^ses"
  18091. },
  18092. "permission": {
  18093. "type": "string"
  18094. },
  18095. "patterns": {
  18096. "type": "array",
  18097. "items": {
  18098. "type": "string"
  18099. }
  18100. },
  18101. "metadata": {
  18102. "type": "object"
  18103. },
  18104. "always": {
  18105. "type": "array",
  18106. "items": {
  18107. "type": "string"
  18108. }
  18109. },
  18110. "tool": {
  18111. "type": "object",
  18112. "properties": {
  18113. "messageID": {
  18114. "type": "string"
  18115. },
  18116. "callID": {
  18117. "type": "string"
  18118. }
  18119. },
  18120. "required": ["messageID", "callID"],
  18121. "additionalProperties": false
  18122. }
  18123. },
  18124. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18125. "additionalProperties": false
  18126. }
  18127. },
  18128. "required": ["id", "type", "properties"],
  18129. "additionalProperties": false
  18130. },
  18131. {
  18132. "type": "object",
  18133. "properties": {
  18134. "id": {
  18135. "type": "string",
  18136. "pattern": "^evt_"
  18137. },
  18138. "type": {
  18139. "type": "string",
  18140. "enum": ["permission.replied"]
  18141. },
  18142. "properties": {
  18143. "type": "object",
  18144. "properties": {
  18145. "sessionID": {
  18146. "type": "string",
  18147. "pattern": "^ses"
  18148. },
  18149. "requestID": {
  18150. "type": "string",
  18151. "pattern": "^per"
  18152. },
  18153. "reply": {
  18154. "type": "string",
  18155. "enum": ["once", "always", "reject"]
  18156. }
  18157. },
  18158. "required": ["sessionID", "requestID", "reply"],
  18159. "additionalProperties": false
  18160. }
  18161. },
  18162. "required": ["id", "type", "properties"],
  18163. "additionalProperties": false
  18164. },
  18165. {
  18166. "type": "object",
  18167. "properties": {
  18168. "id": {
  18169. "type": "string",
  18170. "pattern": "^evt_"
  18171. },
  18172. "type": {
  18173. "type": "string",
  18174. "enum": ["tui.prompt.append"]
  18175. },
  18176. "properties": {
  18177. "type": "object",
  18178. "properties": {
  18179. "text": {
  18180. "type": "string"
  18181. }
  18182. },
  18183. "required": ["text"],
  18184. "additionalProperties": false
  18185. }
  18186. },
  18187. "required": ["id", "type", "properties"],
  18188. "additionalProperties": false
  18189. },
  18190. {
  18191. "type": "object",
  18192. "properties": {
  18193. "id": {
  18194. "type": "string",
  18195. "pattern": "^evt_"
  18196. },
  18197. "type": {
  18198. "type": "string",
  18199. "enum": ["tui.command.execute"]
  18200. },
  18201. "properties": {
  18202. "type": "object",
  18203. "properties": {
  18204. "command": {
  18205. "anyOf": [
  18206. {
  18207. "type": "string",
  18208. "enum": [
  18209. "session.list",
  18210. "session.new",
  18211. "session.share",
  18212. "session.interrupt",
  18213. "session.compact",
  18214. "session.page.up",
  18215. "session.page.down",
  18216. "session.line.up",
  18217. "session.line.down",
  18218. "session.half.page.up",
  18219. "session.half.page.down",
  18220. "session.first",
  18221. "session.last",
  18222. "prompt.clear",
  18223. "prompt.submit",
  18224. "agent.cycle"
  18225. ]
  18226. },
  18227. {
  18228. "type": "string"
  18229. }
  18230. ]
  18231. }
  18232. },
  18233. "required": ["command"],
  18234. "additionalProperties": false
  18235. }
  18236. },
  18237. "required": ["id", "type", "properties"],
  18238. "additionalProperties": false
  18239. },
  18240. {
  18241. "type": "object",
  18242. "properties": {
  18243. "id": {
  18244. "type": "string",
  18245. "pattern": "^evt_"
  18246. },
  18247. "type": {
  18248. "type": "string",
  18249. "enum": ["tui.toast.show"]
  18250. },
  18251. "properties": {
  18252. "type": "object",
  18253. "properties": {
  18254. "title": {
  18255. "type": "string"
  18256. },
  18257. "message": {
  18258. "type": "string"
  18259. },
  18260. "variant": {
  18261. "type": "string",
  18262. "enum": ["info", "success", "warning", "error"]
  18263. },
  18264. "duration": {
  18265. "type": "integer",
  18266. "exclusiveMinimum": 0
  18267. }
  18268. },
  18269. "required": ["message", "variant"],
  18270. "additionalProperties": false
  18271. }
  18272. },
  18273. "required": ["id", "type", "properties"],
  18274. "additionalProperties": false
  18275. },
  18276. {
  18277. "type": "object",
  18278. "properties": {
  18279. "id": {
  18280. "type": "string",
  18281. "pattern": "^evt_"
  18282. },
  18283. "type": {
  18284. "type": "string",
  18285. "enum": ["tui.session.select"]
  18286. },
  18287. "properties": {
  18288. "type": "object",
  18289. "properties": {
  18290. "sessionID": {
  18291. "type": "string",
  18292. "pattern": "^ses",
  18293. "description": "Session ID to navigate to"
  18294. }
  18295. },
  18296. "required": ["sessionID"],
  18297. "additionalProperties": false
  18298. }
  18299. },
  18300. "required": ["id", "type", "properties"],
  18301. "additionalProperties": false
  18302. },
  18303. {
  18304. "type": "object",
  18305. "properties": {
  18306. "id": {
  18307. "type": "string",
  18308. "pattern": "^evt_"
  18309. },
  18310. "type": {
  18311. "type": "string",
  18312. "enum": ["mcp.tools.changed"]
  18313. },
  18314. "properties": {
  18315. "type": "object",
  18316. "properties": {
  18317. "server": {
  18318. "type": "string"
  18319. }
  18320. },
  18321. "required": ["server"],
  18322. "additionalProperties": false
  18323. }
  18324. },
  18325. "required": ["id", "type", "properties"],
  18326. "additionalProperties": false
  18327. },
  18328. {
  18329. "type": "object",
  18330. "properties": {
  18331. "id": {
  18332. "type": "string",
  18333. "pattern": "^evt_"
  18334. },
  18335. "type": {
  18336. "type": "string",
  18337. "enum": ["mcp.browser.open.failed"]
  18338. },
  18339. "properties": {
  18340. "type": "object",
  18341. "properties": {
  18342. "mcpName": {
  18343. "type": "string"
  18344. },
  18345. "url": {
  18346. "type": "string"
  18347. }
  18348. },
  18349. "required": ["mcpName", "url"],
  18350. "additionalProperties": false
  18351. }
  18352. },
  18353. "required": ["id", "type", "properties"],
  18354. "additionalProperties": false
  18355. },
  18356. {
  18357. "type": "object",
  18358. "properties": {
  18359. "id": {
  18360. "type": "string",
  18361. "pattern": "^evt_"
  18362. },
  18363. "type": {
  18364. "type": "string",
  18365. "enum": ["command.executed"]
  18366. },
  18367. "properties": {
  18368. "type": "object",
  18369. "properties": {
  18370. "name": {
  18371. "type": "string"
  18372. },
  18373. "sessionID": {
  18374. "type": "string",
  18375. "pattern": "^ses"
  18376. },
  18377. "arguments": {
  18378. "type": "string"
  18379. },
  18380. "messageID": {
  18381. "type": "string",
  18382. "pattern": "^msg"
  18383. }
  18384. },
  18385. "required": ["name", "sessionID", "arguments", "messageID"],
  18386. "additionalProperties": false
  18387. }
  18388. },
  18389. "required": ["id", "type", "properties"],
  18390. "additionalProperties": false
  18391. },
  18392. {
  18393. "type": "object",
  18394. "properties": {
  18395. "id": {
  18396. "type": "string",
  18397. "pattern": "^evt_"
  18398. },
  18399. "type": {
  18400. "type": "string",
  18401. "enum": ["project.updated"]
  18402. },
  18403. "properties": {
  18404. "type": "object",
  18405. "properties": {
  18406. "id": {
  18407. "type": "string"
  18408. },
  18409. "worktree": {
  18410. "type": "string"
  18411. },
  18412. "vcs": {
  18413. "type": "string",
  18414. "enum": ["git"]
  18415. },
  18416. "name": {
  18417. "type": "string"
  18418. },
  18419. "icon": {
  18420. "type": "object",
  18421. "properties": {
  18422. "url": {
  18423. "type": "string"
  18424. },
  18425. "override": {
  18426. "type": "string"
  18427. },
  18428. "color": {
  18429. "type": "string"
  18430. }
  18431. },
  18432. "additionalProperties": false
  18433. },
  18434. "commands": {
  18435. "type": "object",
  18436. "properties": {
  18437. "start": {
  18438. "type": "string",
  18439. "description": "Startup script to run when creating a new workspace (worktree)"
  18440. }
  18441. },
  18442. "additionalProperties": false
  18443. },
  18444. "time": {
  18445. "type": "object",
  18446. "properties": {
  18447. "created": {
  18448. "type": "integer",
  18449. "minimum": 0
  18450. },
  18451. "updated": {
  18452. "type": "integer",
  18453. "minimum": 0
  18454. },
  18455. "initialized": {
  18456. "type": "integer",
  18457. "minimum": 0
  18458. }
  18459. },
  18460. "required": ["created", "updated"],
  18461. "additionalProperties": false
  18462. },
  18463. "sandboxes": {
  18464. "type": "array",
  18465. "items": {
  18466. "type": "string"
  18467. }
  18468. }
  18469. },
  18470. "required": ["id", "worktree", "time", "sandboxes"],
  18471. "additionalProperties": false
  18472. }
  18473. },
  18474. "required": ["id", "type", "properties"],
  18475. "additionalProperties": false
  18476. },
  18477. {
  18478. "type": "object",
  18479. "properties": {
  18480. "id": {
  18481. "type": "string",
  18482. "pattern": "^evt_"
  18483. },
  18484. "type": {
  18485. "type": "string",
  18486. "enum": ["session.status"]
  18487. },
  18488. "properties": {
  18489. "type": "object",
  18490. "properties": {
  18491. "sessionID": {
  18492. "type": "string",
  18493. "pattern": "^ses"
  18494. },
  18495. "status": {
  18496. "$ref": "#/components/schemas/SessionStatus"
  18497. }
  18498. },
  18499. "required": ["sessionID", "status"],
  18500. "additionalProperties": false
  18501. }
  18502. },
  18503. "required": ["id", "type", "properties"],
  18504. "additionalProperties": false
  18505. },
  18506. {
  18507. "type": "object",
  18508. "properties": {
  18509. "id": {
  18510. "type": "string",
  18511. "pattern": "^evt_"
  18512. },
  18513. "type": {
  18514. "type": "string",
  18515. "enum": ["session.idle"]
  18516. },
  18517. "properties": {
  18518. "type": "object",
  18519. "properties": {
  18520. "sessionID": {
  18521. "type": "string",
  18522. "pattern": "^ses"
  18523. }
  18524. },
  18525. "required": ["sessionID"],
  18526. "additionalProperties": false
  18527. }
  18528. },
  18529. "required": ["id", "type", "properties"],
  18530. "additionalProperties": false
  18531. },
  18532. {
  18533. "type": "object",
  18534. "properties": {
  18535. "id": {
  18536. "type": "string",
  18537. "pattern": "^evt_"
  18538. },
  18539. "type": {
  18540. "type": "string",
  18541. "enum": ["question.asked"]
  18542. },
  18543. "properties": {
  18544. "type": "object",
  18545. "properties": {
  18546. "id": {
  18547. "type": "string",
  18548. "pattern": "^que"
  18549. },
  18550. "sessionID": {
  18551. "type": "string",
  18552. "pattern": "^ses"
  18553. },
  18554. "questions": {
  18555. "type": "array",
  18556. "items": {
  18557. "$ref": "#/components/schemas/QuestionInfo"
  18558. },
  18559. "description": "Questions to ask"
  18560. },
  18561. "tool": {
  18562. "$ref": "#/components/schemas/QuestionTool"
  18563. }
  18564. },
  18565. "required": ["id", "sessionID", "questions"],
  18566. "additionalProperties": false
  18567. }
  18568. },
  18569. "required": ["id", "type", "properties"],
  18570. "additionalProperties": false
  18571. },
  18572. {
  18573. "type": "object",
  18574. "properties": {
  18575. "id": {
  18576. "type": "string",
  18577. "pattern": "^evt_"
  18578. },
  18579. "type": {
  18580. "type": "string",
  18581. "enum": ["question.replied"]
  18582. },
  18583. "properties": {
  18584. "type": "object",
  18585. "properties": {
  18586. "sessionID": {
  18587. "type": "string",
  18588. "pattern": "^ses"
  18589. },
  18590. "requestID": {
  18591. "type": "string",
  18592. "pattern": "^que"
  18593. },
  18594. "answers": {
  18595. "type": "array",
  18596. "items": {
  18597. "$ref": "#/components/schemas/QuestionAnswer"
  18598. }
  18599. }
  18600. },
  18601. "required": ["sessionID", "requestID", "answers"],
  18602. "additionalProperties": false
  18603. }
  18604. },
  18605. "required": ["id", "type", "properties"],
  18606. "additionalProperties": false
  18607. },
  18608. {
  18609. "type": "object",
  18610. "properties": {
  18611. "id": {
  18612. "type": "string",
  18613. "pattern": "^evt_"
  18614. },
  18615. "type": {
  18616. "type": "string",
  18617. "enum": ["question.rejected"]
  18618. },
  18619. "properties": {
  18620. "type": "object",
  18621. "properties": {
  18622. "sessionID": {
  18623. "type": "string",
  18624. "pattern": "^ses"
  18625. },
  18626. "requestID": {
  18627. "type": "string",
  18628. "pattern": "^que"
  18629. }
  18630. },
  18631. "required": ["sessionID", "requestID"],
  18632. "additionalProperties": false
  18633. }
  18634. },
  18635. "required": ["id", "type", "properties"],
  18636. "additionalProperties": false
  18637. },
  18638. {
  18639. "type": "object",
  18640. "properties": {
  18641. "id": {
  18642. "type": "string",
  18643. "pattern": "^evt_"
  18644. },
  18645. "type": {
  18646. "type": "string",
  18647. "enum": ["session.compacted"]
  18648. },
  18649. "properties": {
  18650. "type": "object",
  18651. "properties": {
  18652. "sessionID": {
  18653. "type": "string",
  18654. "pattern": "^ses"
  18655. }
  18656. },
  18657. "required": ["sessionID"],
  18658. "additionalProperties": false
  18659. }
  18660. },
  18661. "required": ["id", "type", "properties"],
  18662. "additionalProperties": false
  18663. },
  18664. {
  18665. "type": "object",
  18666. "properties": {
  18667. "id": {
  18668. "type": "string",
  18669. "pattern": "^evt_"
  18670. },
  18671. "type": {
  18672. "type": "string",
  18673. "enum": ["vcs.branch.updated"]
  18674. },
  18675. "properties": {
  18676. "type": "object",
  18677. "properties": {
  18678. "branch": {
  18679. "type": "string"
  18680. }
  18681. },
  18682. "additionalProperties": false
  18683. }
  18684. },
  18685. "required": ["id", "type", "properties"],
  18686. "additionalProperties": false
  18687. },
  18688. {
  18689. "type": "object",
  18690. "properties": {
  18691. "id": {
  18692. "type": "string",
  18693. "pattern": "^evt_"
  18694. },
  18695. "type": {
  18696. "type": "string",
  18697. "enum": ["workspace.ready"]
  18698. },
  18699. "properties": {
  18700. "type": "object",
  18701. "properties": {
  18702. "name": {
  18703. "type": "string"
  18704. }
  18705. },
  18706. "required": ["name"],
  18707. "additionalProperties": false
  18708. }
  18709. },
  18710. "required": ["id", "type", "properties"],
  18711. "additionalProperties": false
  18712. },
  18713. {
  18714. "type": "object",
  18715. "properties": {
  18716. "id": {
  18717. "type": "string",
  18718. "pattern": "^evt_"
  18719. },
  18720. "type": {
  18721. "type": "string",
  18722. "enum": ["workspace.failed"]
  18723. },
  18724. "properties": {
  18725. "type": "object",
  18726. "properties": {
  18727. "message": {
  18728. "type": "string"
  18729. }
  18730. },
  18731. "required": ["message"],
  18732. "additionalProperties": false
  18733. }
  18734. },
  18735. "required": ["id", "type", "properties"],
  18736. "additionalProperties": false
  18737. },
  18738. {
  18739. "type": "object",
  18740. "properties": {
  18741. "id": {
  18742. "type": "string",
  18743. "pattern": "^evt_"
  18744. },
  18745. "type": {
  18746. "type": "string",
  18747. "enum": ["workspace.status"]
  18748. },
  18749. "properties": {
  18750. "type": "object",
  18751. "properties": {
  18752. "workspaceID": {
  18753. "type": "string",
  18754. "pattern": "^wrk"
  18755. },
  18756. "status": {
  18757. "type": "string",
  18758. "enum": ["connected", "connecting", "disconnected", "error"]
  18759. }
  18760. },
  18761. "required": ["workspaceID", "status"],
  18762. "additionalProperties": false
  18763. }
  18764. },
  18765. "required": ["id", "type", "properties"],
  18766. "additionalProperties": false
  18767. },
  18768. {
  18769. "type": "object",
  18770. "properties": {
  18771. "id": {
  18772. "type": "string",
  18773. "pattern": "^evt_"
  18774. },
  18775. "type": {
  18776. "type": "string",
  18777. "enum": ["worktree.ready"]
  18778. },
  18779. "properties": {
  18780. "type": "object",
  18781. "properties": {
  18782. "name": {
  18783. "type": "string"
  18784. },
  18785. "branch": {
  18786. "type": "string"
  18787. }
  18788. },
  18789. "required": ["name"],
  18790. "additionalProperties": false
  18791. }
  18792. },
  18793. "required": ["id", "type", "properties"],
  18794. "additionalProperties": false
  18795. },
  18796. {
  18797. "type": "object",
  18798. "properties": {
  18799. "id": {
  18800. "type": "string",
  18801. "pattern": "^evt_"
  18802. },
  18803. "type": {
  18804. "type": "string",
  18805. "enum": ["worktree.failed"]
  18806. },
  18807. "properties": {
  18808. "type": "object",
  18809. "properties": {
  18810. "message": {
  18811. "type": "string"
  18812. }
  18813. },
  18814. "required": ["message"],
  18815. "additionalProperties": false
  18816. }
  18817. },
  18818. "required": ["id", "type", "properties"],
  18819. "additionalProperties": false
  18820. },
  18821. {
  18822. "type": "object",
  18823. "properties": {
  18824. "id": {
  18825. "type": "string",
  18826. "pattern": "^evt_"
  18827. },
  18828. "type": {
  18829. "type": "string",
  18830. "enum": ["server.connected"]
  18831. },
  18832. "properties": {
  18833. "type": "object",
  18834. "properties": {}
  18835. }
  18836. },
  18837. "required": ["id", "type", "properties"],
  18838. "additionalProperties": false
  18839. },
  18840. {
  18841. "type": "object",
  18842. "properties": {
  18843. "id": {
  18844. "type": "string",
  18845. "pattern": "^evt_"
  18846. },
  18847. "type": {
  18848. "type": "string",
  18849. "enum": ["global.disposed"]
  18850. },
  18851. "properties": {
  18852. "type": "object",
  18853. "properties": {}
  18854. }
  18855. },
  18856. "required": ["id", "type", "properties"],
  18857. "additionalProperties": false
  18858. },
  18859. {
  18860. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  18861. },
  18862. {
  18863. "$ref": "#/components/schemas/SyncEventSessionCreated"
  18864. },
  18865. {
  18866. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  18867. },
  18868. {
  18869. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  18870. },
  18871. {
  18872. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  18873. },
  18874. {
  18875. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  18876. },
  18877. {
  18878. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  18879. },
  18880. {
  18881. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  18882. },
  18883. {
  18884. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  18885. },
  18886. {
  18887. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  18888. },
  18889. {
  18890. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  18891. },
  18892. {
  18893. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  18894. },
  18895. {
  18896. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  18897. },
  18898. {
  18899. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  18900. },
  18901. {
  18902. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  18903. },
  18904. {
  18905. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  18906. },
  18907. {
  18908. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  18909. },
  18910. {
  18911. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  18912. },
  18913. {
  18914. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  18915. },
  18916. {
  18917. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  18918. },
  18919. {
  18920. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  18921. },
  18922. {
  18923. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  18924. },
  18925. {
  18926. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  18927. },
  18928. {
  18929. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  18930. },
  18931. {
  18932. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  18933. },
  18934. {
  18935. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  18936. },
  18937. {
  18938. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  18939. },
  18940. {
  18941. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  18942. },
  18943. {
  18944. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  18945. },
  18946. {
  18947. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  18948. },
  18949. {
  18950. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  18951. },
  18952. {
  18953. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  18954. },
  18955. {
  18956. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  18957. },
  18958. {
  18959. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  18960. },
  18961. {
  18962. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  18963. }
  18964. ]
  18965. }
  18966. },
  18967. "required": ["directory", "payload"],
  18968. "additionalProperties": false
  18969. },
  18970. "LogLevel": {
  18971. "type": "string",
  18972. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  18973. "description": "Log level"
  18974. },
  18975. "ServerConfig": {
  18976. "type": "object",
  18977. "properties": {
  18978. "port": {
  18979. "type": "integer",
  18980. "exclusiveMinimum": 0
  18981. },
  18982. "hostname": {
  18983. "type": "string"
  18984. },
  18985. "mdns": {
  18986. "type": "boolean"
  18987. },
  18988. "mdnsDomain": {
  18989. "type": "string"
  18990. },
  18991. "cors": {
  18992. "type": "array",
  18993. "items": {
  18994. "type": "string"
  18995. }
  18996. }
  18997. },
  18998. "additionalProperties": false,
  18999. "description": "Server configuration for opencode serve and web commands"
  19000. },
  19001. "PermissionActionConfig": {
  19002. "type": "string",
  19003. "enum": ["ask", "allow", "deny"]
  19004. },
  19005. "PermissionObjectConfig": {
  19006. "type": "object",
  19007. "additionalProperties": {
  19008. "$ref": "#/components/schemas/PermissionActionConfig"
  19009. }
  19010. },
  19011. "PermissionRuleConfig": {
  19012. "anyOf": [
  19013. {
  19014. "$ref": "#/components/schemas/PermissionActionConfig"
  19015. },
  19016. {
  19017. "$ref": "#/components/schemas/PermissionObjectConfig"
  19018. }
  19019. ]
  19020. },
  19021. "PermissionConfig": {
  19022. "anyOf": [
  19023. {
  19024. "$ref": "#/components/schemas/PermissionActionConfig"
  19025. },
  19026. {
  19027. "type": "object",
  19028. "properties": {
  19029. "read": {
  19030. "$ref": "#/components/schemas/PermissionRuleConfig"
  19031. },
  19032. "edit": {
  19033. "$ref": "#/components/schemas/PermissionRuleConfig"
  19034. },
  19035. "glob": {
  19036. "$ref": "#/components/schemas/PermissionRuleConfig"
  19037. },
  19038. "grep": {
  19039. "$ref": "#/components/schemas/PermissionRuleConfig"
  19040. },
  19041. "list": {
  19042. "$ref": "#/components/schemas/PermissionRuleConfig"
  19043. },
  19044. "bash": {
  19045. "$ref": "#/components/schemas/PermissionRuleConfig"
  19046. },
  19047. "task": {
  19048. "$ref": "#/components/schemas/PermissionRuleConfig"
  19049. },
  19050. "external_directory": {
  19051. "$ref": "#/components/schemas/PermissionRuleConfig"
  19052. },
  19053. "todowrite": {
  19054. "$ref": "#/components/schemas/PermissionActionConfig"
  19055. },
  19056. "question": {
  19057. "$ref": "#/components/schemas/PermissionActionConfig"
  19058. },
  19059. "webfetch": {
  19060. "$ref": "#/components/schemas/PermissionActionConfig"
  19061. },
  19062. "websearch": {
  19063. "$ref": "#/components/schemas/PermissionActionConfig"
  19064. },
  19065. "lsp": {
  19066. "$ref": "#/components/schemas/PermissionRuleConfig"
  19067. },
  19068. "doom_loop": {
  19069. "$ref": "#/components/schemas/PermissionActionConfig"
  19070. },
  19071. "skill": {
  19072. "$ref": "#/components/schemas/PermissionRuleConfig"
  19073. }
  19074. },
  19075. "additionalProperties": {
  19076. "$ref": "#/components/schemas/PermissionRuleConfig"
  19077. }
  19078. }
  19079. ]
  19080. },
  19081. "AgentConfig": {
  19082. "type": "object",
  19083. "properties": {
  19084. "model": {
  19085. "type": "string"
  19086. },
  19087. "variant": {
  19088. "type": "string"
  19089. },
  19090. "temperature": {
  19091. "type": "number"
  19092. },
  19093. "top_p": {
  19094. "type": "number"
  19095. },
  19096. "prompt": {
  19097. "type": "string"
  19098. },
  19099. "tools": {
  19100. "type": "object",
  19101. "additionalProperties": {
  19102. "type": "boolean"
  19103. }
  19104. },
  19105. "disable": {
  19106. "type": "boolean"
  19107. },
  19108. "description": {
  19109. "type": "string"
  19110. },
  19111. "mode": {
  19112. "type": "string",
  19113. "enum": ["subagent", "primary", "all"]
  19114. },
  19115. "hidden": {
  19116. "type": "boolean"
  19117. },
  19118. "options": {
  19119. "type": "object"
  19120. },
  19121. "color": {
  19122. "anyOf": [
  19123. {
  19124. "type": "string",
  19125. "pattern": "^#[0-9a-fA-F]{6}$"
  19126. },
  19127. {
  19128. "type": "string",
  19129. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  19130. }
  19131. ],
  19132. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  19133. },
  19134. "steps": {
  19135. "type": "integer",
  19136. "exclusiveMinimum": 0
  19137. },
  19138. "maxSteps": {
  19139. "type": "integer",
  19140. "exclusiveMinimum": 0
  19141. },
  19142. "permission": {
  19143. "$ref": "#/components/schemas/PermissionConfig"
  19144. }
  19145. },
  19146. "additionalProperties": {}
  19147. },
  19148. "ProviderConfig": {
  19149. "type": "object",
  19150. "properties": {
  19151. "api": {
  19152. "type": "string"
  19153. },
  19154. "name": {
  19155. "type": "string"
  19156. },
  19157. "env": {
  19158. "type": "array",
  19159. "items": {
  19160. "type": "string"
  19161. }
  19162. },
  19163. "id": {
  19164. "type": "string"
  19165. },
  19166. "npm": {
  19167. "type": "string"
  19168. },
  19169. "whitelist": {
  19170. "type": "array",
  19171. "items": {
  19172. "type": "string"
  19173. }
  19174. },
  19175. "blacklist": {
  19176. "type": "array",
  19177. "items": {
  19178. "type": "string"
  19179. }
  19180. },
  19181. "options": {
  19182. "type": "object",
  19183. "properties": {
  19184. "apiKey": {
  19185. "type": "string"
  19186. },
  19187. "baseURL": {
  19188. "type": "string"
  19189. },
  19190. "enterpriseUrl": {
  19191. "type": "string"
  19192. },
  19193. "setCacheKey": {
  19194. "type": "boolean"
  19195. },
  19196. "timeout": {
  19197. "anyOf": [
  19198. {
  19199. "type": "integer",
  19200. "exclusiveMinimum": 0
  19201. },
  19202. {
  19203. "type": "boolean",
  19204. "enum": [false]
  19205. }
  19206. ],
  19207. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  19208. },
  19209. "headerTimeout": {
  19210. "anyOf": [
  19211. {
  19212. "type": "integer",
  19213. "exclusiveMinimum": 0
  19214. },
  19215. {
  19216. "type": "boolean",
  19217. "enum": [false]
  19218. }
  19219. ],
  19220. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  19221. },
  19222. "chunkTimeout": {
  19223. "type": "integer",
  19224. "exclusiveMinimum": 0
  19225. }
  19226. },
  19227. "additionalProperties": {}
  19228. },
  19229. "models": {
  19230. "type": "object",
  19231. "additionalProperties": {
  19232. "type": "object",
  19233. "properties": {
  19234. "id": {
  19235. "type": "string"
  19236. },
  19237. "name": {
  19238. "type": "string"
  19239. },
  19240. "family": {
  19241. "type": "string"
  19242. },
  19243. "release_date": {
  19244. "type": "string"
  19245. },
  19246. "attachment": {
  19247. "type": "boolean"
  19248. },
  19249. "reasoning": {
  19250. "type": "boolean"
  19251. },
  19252. "temperature": {
  19253. "type": "boolean"
  19254. },
  19255. "tool_call": {
  19256. "type": "boolean"
  19257. },
  19258. "interleaved": {
  19259. "anyOf": [
  19260. {
  19261. "type": "boolean",
  19262. "enum": [true]
  19263. },
  19264. {
  19265. "type": "object",
  19266. "properties": {
  19267. "field": {
  19268. "type": "string",
  19269. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19270. }
  19271. },
  19272. "required": ["field"],
  19273. "additionalProperties": false
  19274. }
  19275. ]
  19276. },
  19277. "cost": {
  19278. "type": "object",
  19279. "properties": {
  19280. "input": {
  19281. "type": "number"
  19282. },
  19283. "output": {
  19284. "type": "number"
  19285. },
  19286. "cache_read": {
  19287. "type": "number"
  19288. },
  19289. "cache_write": {
  19290. "type": "number"
  19291. },
  19292. "context_over_200k": {
  19293. "type": "object",
  19294. "properties": {
  19295. "input": {
  19296. "type": "number"
  19297. },
  19298. "output": {
  19299. "type": "number"
  19300. },
  19301. "cache_read": {
  19302. "type": "number"
  19303. },
  19304. "cache_write": {
  19305. "type": "number"
  19306. }
  19307. },
  19308. "required": ["input", "output"],
  19309. "additionalProperties": false
  19310. }
  19311. },
  19312. "required": ["input", "output"],
  19313. "additionalProperties": false
  19314. },
  19315. "limit": {
  19316. "type": "object",
  19317. "properties": {
  19318. "context": {
  19319. "type": "number"
  19320. },
  19321. "input": {
  19322. "type": "number"
  19323. },
  19324. "output": {
  19325. "type": "number"
  19326. }
  19327. },
  19328. "required": ["context", "output"],
  19329. "additionalProperties": false
  19330. },
  19331. "modalities": {
  19332. "type": "object",
  19333. "properties": {
  19334. "input": {
  19335. "type": "array",
  19336. "items": {
  19337. "type": "string",
  19338. "enum": ["text", "audio", "image", "video", "pdf"]
  19339. }
  19340. },
  19341. "output": {
  19342. "type": "array",
  19343. "items": {
  19344. "type": "string",
  19345. "enum": ["text", "audio", "image", "video", "pdf"]
  19346. }
  19347. }
  19348. },
  19349. "additionalProperties": false
  19350. },
  19351. "experimental": {
  19352. "type": "boolean"
  19353. },
  19354. "status": {
  19355. "type": "string",
  19356. "enum": ["alpha", "beta", "deprecated", "active"]
  19357. },
  19358. "provider": {
  19359. "type": "object",
  19360. "properties": {
  19361. "npm": {
  19362. "type": "string"
  19363. },
  19364. "api": {
  19365. "type": "string"
  19366. }
  19367. },
  19368. "additionalProperties": false
  19369. },
  19370. "options": {
  19371. "type": "object"
  19372. },
  19373. "headers": {
  19374. "type": "object",
  19375. "additionalProperties": {
  19376. "type": "string"
  19377. }
  19378. },
  19379. "variants": {
  19380. "type": "object",
  19381. "additionalProperties": {
  19382. "type": "object",
  19383. "properties": {
  19384. "disabled": {
  19385. "type": "boolean"
  19386. }
  19387. },
  19388. "additionalProperties": {}
  19389. },
  19390. "description": "Variant-specific configuration"
  19391. }
  19392. },
  19393. "additionalProperties": false
  19394. }
  19395. }
  19396. },
  19397. "additionalProperties": false
  19398. },
  19399. "McpLocalConfig": {
  19400. "type": "object",
  19401. "properties": {
  19402. "type": {
  19403. "type": "string",
  19404. "enum": ["local"],
  19405. "description": "Type of MCP server connection"
  19406. },
  19407. "command": {
  19408. "type": "array",
  19409. "items": {
  19410. "type": "string"
  19411. },
  19412. "description": "Command and arguments to run the MCP server"
  19413. },
  19414. "cwd": {
  19415. "type": "string"
  19416. },
  19417. "environment": {
  19418. "type": "object",
  19419. "additionalProperties": {
  19420. "type": "string"
  19421. }
  19422. },
  19423. "enabled": {
  19424. "type": "boolean"
  19425. },
  19426. "timeout": {
  19427. "type": "integer",
  19428. "exclusiveMinimum": 0
  19429. }
  19430. },
  19431. "required": ["type", "command"],
  19432. "additionalProperties": false
  19433. },
  19434. "McpOAuthConfig": {
  19435. "type": "object",
  19436. "properties": {
  19437. "clientId": {
  19438. "type": "string"
  19439. },
  19440. "clientSecret": {
  19441. "type": "string"
  19442. },
  19443. "scope": {
  19444. "type": "string"
  19445. },
  19446. "callbackPort": {
  19447. "type": "integer",
  19448. "minimum": 1,
  19449. "maximum": 65535
  19450. },
  19451. "redirectUri": {
  19452. "type": "string"
  19453. }
  19454. },
  19455. "additionalProperties": false
  19456. },
  19457. "McpRemoteConfig": {
  19458. "type": "object",
  19459. "properties": {
  19460. "type": {
  19461. "type": "string",
  19462. "enum": ["remote"],
  19463. "description": "Type of MCP server connection"
  19464. },
  19465. "url": {
  19466. "type": "string",
  19467. "description": "URL of the remote MCP server"
  19468. },
  19469. "enabled": {
  19470. "type": "boolean"
  19471. },
  19472. "headers": {
  19473. "type": "object",
  19474. "additionalProperties": {
  19475. "type": "string"
  19476. }
  19477. },
  19478. "oauth": {
  19479. "anyOf": [
  19480. {
  19481. "$ref": "#/components/schemas/McpOAuthConfig"
  19482. },
  19483. {
  19484. "type": "boolean",
  19485. "enum": [false]
  19486. }
  19487. ],
  19488. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  19489. },
  19490. "timeout": {
  19491. "type": "integer",
  19492. "exclusiveMinimum": 0
  19493. }
  19494. },
  19495. "required": ["type", "url"],
  19496. "additionalProperties": false
  19497. },
  19498. "LayoutConfig": {
  19499. "type": "string",
  19500. "enum": ["auto", "stretch"],
  19501. "description": "@deprecated Always uses stretch layout."
  19502. },
  19503. "ImageAttachmentConfig": {
  19504. "type": "object",
  19505. "properties": {
  19506. "auto_resize": {
  19507. "type": "boolean"
  19508. },
  19509. "max_width": {
  19510. "type": "integer",
  19511. "exclusiveMinimum": 0
  19512. },
  19513. "max_height": {
  19514. "type": "integer",
  19515. "exclusiveMinimum": 0
  19516. },
  19517. "max_base64_bytes": {
  19518. "type": "integer",
  19519. "exclusiveMinimum": 0
  19520. }
  19521. },
  19522. "additionalProperties": false
  19523. },
  19524. "AttachmentConfig": {
  19525. "type": "object",
  19526. "properties": {
  19527. "image": {
  19528. "$ref": "#/components/schemas/ImageAttachmentConfig"
  19529. }
  19530. },
  19531. "additionalProperties": false
  19532. },
  19533. "Config": {
  19534. "type": "object",
  19535. "properties": {
  19536. "$schema": {
  19537. "type": "string"
  19538. },
  19539. "shell": {
  19540. "type": "string"
  19541. },
  19542. "logLevel": {
  19543. "$ref": "#/components/schemas/LogLevel"
  19544. },
  19545. "server": {
  19546. "$ref": "#/components/schemas/ServerConfig"
  19547. },
  19548. "command": {
  19549. "type": "object",
  19550. "additionalProperties": {
  19551. "type": "object",
  19552. "properties": {
  19553. "template": {
  19554. "type": "string"
  19555. },
  19556. "description": {
  19557. "type": "string"
  19558. },
  19559. "agent": {
  19560. "type": "string"
  19561. },
  19562. "model": {
  19563. "type": "string"
  19564. },
  19565. "variant": {
  19566. "type": "string"
  19567. },
  19568. "subtask": {
  19569. "type": "boolean"
  19570. }
  19571. },
  19572. "required": ["template"],
  19573. "additionalProperties": false
  19574. }
  19575. },
  19576. "skills": {
  19577. "type": "object",
  19578. "properties": {
  19579. "paths": {
  19580. "type": "array",
  19581. "items": {
  19582. "type": "string"
  19583. }
  19584. },
  19585. "urls": {
  19586. "type": "array",
  19587. "items": {
  19588. "type": "string"
  19589. }
  19590. }
  19591. },
  19592. "additionalProperties": false
  19593. },
  19594. "references": {
  19595. "type": "object",
  19596. "additionalProperties": {
  19597. "anyOf": [
  19598. {
  19599. "type": "string"
  19600. },
  19601. {
  19602. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19603. },
  19604. {
  19605. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19606. }
  19607. ]
  19608. }
  19609. },
  19610. "reference": {
  19611. "type": "object",
  19612. "additionalProperties": {
  19613. "anyOf": [
  19614. {
  19615. "type": "string"
  19616. },
  19617. {
  19618. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19619. },
  19620. {
  19621. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19622. }
  19623. ]
  19624. }
  19625. },
  19626. "watcher": {
  19627. "type": "object",
  19628. "properties": {
  19629. "ignore": {
  19630. "type": "array",
  19631. "items": {
  19632. "type": "string"
  19633. }
  19634. }
  19635. },
  19636. "additionalProperties": false
  19637. },
  19638. "snapshot": {
  19639. "type": "boolean"
  19640. },
  19641. "plugin": {
  19642. "type": "array",
  19643. "items": {
  19644. "anyOf": [
  19645. {
  19646. "type": "string"
  19647. },
  19648. {
  19649. "type": "array",
  19650. "prefixItems": [
  19651. {
  19652. "type": "string"
  19653. },
  19654. {
  19655. "type": "object"
  19656. }
  19657. ],
  19658. "maxItems": 2,
  19659. "minItems": 2
  19660. }
  19661. ]
  19662. }
  19663. },
  19664. "share": {
  19665. "type": "string",
  19666. "enum": ["manual", "auto", "disabled"]
  19667. },
  19668. "autoshare": {
  19669. "type": "boolean"
  19670. },
  19671. "autoupdate": {
  19672. "anyOf": [
  19673. {
  19674. "type": "boolean"
  19675. },
  19676. {
  19677. "type": "string",
  19678. "enum": ["notify"]
  19679. }
  19680. ],
  19681. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  19682. },
  19683. "disabled_providers": {
  19684. "type": "array",
  19685. "items": {
  19686. "type": "string"
  19687. }
  19688. },
  19689. "enabled_providers": {
  19690. "type": "array",
  19691. "items": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "model": {
  19696. "type": "string"
  19697. },
  19698. "small_model": {
  19699. "type": "string"
  19700. },
  19701. "default_agent": {
  19702. "type": "string"
  19703. },
  19704. "username": {
  19705. "type": "string"
  19706. },
  19707. "mode": {
  19708. "type": "object",
  19709. "properties": {
  19710. "build": {
  19711. "$ref": "#/components/schemas/AgentConfig"
  19712. },
  19713. "plan": {
  19714. "$ref": "#/components/schemas/AgentConfig"
  19715. }
  19716. },
  19717. "additionalProperties": {
  19718. "$ref": "#/components/schemas/AgentConfig"
  19719. }
  19720. },
  19721. "agent": {
  19722. "type": "object",
  19723. "properties": {
  19724. "plan": {
  19725. "$ref": "#/components/schemas/AgentConfig"
  19726. },
  19727. "build": {
  19728. "$ref": "#/components/schemas/AgentConfig"
  19729. },
  19730. "general": {
  19731. "$ref": "#/components/schemas/AgentConfig"
  19732. },
  19733. "explore": {
  19734. "$ref": "#/components/schemas/AgentConfig"
  19735. },
  19736. "title": {
  19737. "$ref": "#/components/schemas/AgentConfig"
  19738. },
  19739. "summary": {
  19740. "$ref": "#/components/schemas/AgentConfig"
  19741. },
  19742. "compaction": {
  19743. "$ref": "#/components/schemas/AgentConfig"
  19744. }
  19745. },
  19746. "additionalProperties": {
  19747. "$ref": "#/components/schemas/AgentConfig"
  19748. }
  19749. },
  19750. "provider": {
  19751. "type": "object",
  19752. "additionalProperties": {
  19753. "$ref": "#/components/schemas/ProviderConfig"
  19754. }
  19755. },
  19756. "mcp": {
  19757. "type": "object",
  19758. "additionalProperties": {
  19759. "anyOf": [
  19760. {
  19761. "$ref": "#/components/schemas/McpLocalConfig"
  19762. },
  19763. {
  19764. "$ref": "#/components/schemas/McpRemoteConfig"
  19765. },
  19766. {
  19767. "type": "object",
  19768. "properties": {
  19769. "enabled": {
  19770. "type": "boolean"
  19771. }
  19772. },
  19773. "required": ["enabled"],
  19774. "additionalProperties": false
  19775. }
  19776. ]
  19777. }
  19778. },
  19779. "formatter": {
  19780. "anyOf": [
  19781. {
  19782. "type": "boolean"
  19783. },
  19784. {
  19785. "type": "object",
  19786. "additionalProperties": {
  19787. "type": "object",
  19788. "properties": {
  19789. "disabled": {
  19790. "type": "boolean"
  19791. },
  19792. "command": {
  19793. "type": "array",
  19794. "items": {
  19795. "type": "string"
  19796. }
  19797. },
  19798. "environment": {
  19799. "type": "object",
  19800. "additionalProperties": {
  19801. "type": "string"
  19802. }
  19803. },
  19804. "extensions": {
  19805. "type": "array",
  19806. "items": {
  19807. "type": "string"
  19808. }
  19809. }
  19810. },
  19811. "additionalProperties": false
  19812. }
  19813. }
  19814. ],
  19815. "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."
  19816. },
  19817. "lsp": {
  19818. "anyOf": [
  19819. {
  19820. "type": "boolean"
  19821. },
  19822. {
  19823. "type": "object",
  19824. "additionalProperties": {
  19825. "anyOf": [
  19826. {
  19827. "type": "object",
  19828. "properties": {
  19829. "disabled": {
  19830. "type": "boolean",
  19831. "enum": [true]
  19832. }
  19833. },
  19834. "required": ["disabled"],
  19835. "additionalProperties": false
  19836. },
  19837. {
  19838. "type": "object",
  19839. "properties": {
  19840. "command": {
  19841. "type": "array",
  19842. "items": {
  19843. "type": "string"
  19844. }
  19845. },
  19846. "extensions": {
  19847. "type": "array",
  19848. "items": {
  19849. "type": "string"
  19850. }
  19851. },
  19852. "disabled": {
  19853. "type": "boolean"
  19854. },
  19855. "env": {
  19856. "type": "object",
  19857. "additionalProperties": {
  19858. "type": "string"
  19859. }
  19860. },
  19861. "initialization": {
  19862. "type": "object"
  19863. }
  19864. },
  19865. "required": ["command"],
  19866. "additionalProperties": false
  19867. }
  19868. ]
  19869. }
  19870. }
  19871. ],
  19872. "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."
  19873. },
  19874. "instructions": {
  19875. "type": "array",
  19876. "items": {
  19877. "type": "string"
  19878. }
  19879. },
  19880. "layout": {
  19881. "$ref": "#/components/schemas/LayoutConfig"
  19882. },
  19883. "permission": {
  19884. "$ref": "#/components/schemas/PermissionConfig"
  19885. },
  19886. "tools": {
  19887. "type": "object",
  19888. "additionalProperties": {
  19889. "type": "boolean"
  19890. }
  19891. },
  19892. "attachment": {
  19893. "$ref": "#/components/schemas/AttachmentConfig"
  19894. },
  19895. "enterprise": {
  19896. "type": "object",
  19897. "properties": {
  19898. "url": {
  19899. "type": "string"
  19900. }
  19901. },
  19902. "additionalProperties": false
  19903. },
  19904. "tool_output": {
  19905. "type": "object",
  19906. "properties": {
  19907. "max_lines": {
  19908. "type": "integer",
  19909. "exclusiveMinimum": 0
  19910. },
  19911. "max_bytes": {
  19912. "type": "integer",
  19913. "exclusiveMinimum": 0
  19914. }
  19915. },
  19916. "additionalProperties": false
  19917. },
  19918. "compaction": {
  19919. "type": "object",
  19920. "properties": {
  19921. "auto": {
  19922. "type": "boolean"
  19923. },
  19924. "prune": {
  19925. "type": "boolean"
  19926. },
  19927. "tail_turns": {
  19928. "type": "integer",
  19929. "minimum": 0
  19930. },
  19931. "preserve_recent_tokens": {
  19932. "type": "integer",
  19933. "minimum": 0
  19934. },
  19935. "reserved": {
  19936. "type": "integer",
  19937. "minimum": 0
  19938. }
  19939. },
  19940. "additionalProperties": false
  19941. },
  19942. "experimental": {
  19943. "type": "object",
  19944. "properties": {
  19945. "disable_paste_summary": {
  19946. "type": "boolean"
  19947. },
  19948. "batch_tool": {
  19949. "type": "boolean"
  19950. },
  19951. "openTelemetry": {
  19952. "type": "boolean"
  19953. },
  19954. "primary_tools": {
  19955. "type": "array",
  19956. "items": {
  19957. "type": "string"
  19958. }
  19959. },
  19960. "continue_loop_on_deny": {
  19961. "type": "boolean"
  19962. },
  19963. "mcp_timeout": {
  19964. "type": "integer",
  19965. "exclusiveMinimum": 0
  19966. },
  19967. "policies": {
  19968. "type": "array",
  19969. "items": {
  19970. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  19971. }
  19972. }
  19973. },
  19974. "additionalProperties": false
  19975. }
  19976. },
  19977. "additionalProperties": false
  19978. },
  19979. "Model": {
  19980. "type": "object",
  19981. "properties": {
  19982. "id": {
  19983. "type": "string"
  19984. },
  19985. "providerID": {
  19986. "type": "string"
  19987. },
  19988. "api": {
  19989. "type": "object",
  19990. "properties": {
  19991. "id": {
  19992. "type": "string"
  19993. },
  19994. "url": {
  19995. "type": "string"
  19996. },
  19997. "npm": {
  19998. "type": "string"
  19999. }
  20000. },
  20001. "required": ["id", "url", "npm"],
  20002. "additionalProperties": false
  20003. },
  20004. "name": {
  20005. "type": "string"
  20006. },
  20007. "family": {
  20008. "type": "string"
  20009. },
  20010. "capabilities": {
  20011. "type": "object",
  20012. "properties": {
  20013. "temperature": {
  20014. "type": "boolean"
  20015. },
  20016. "reasoning": {
  20017. "type": "boolean"
  20018. },
  20019. "attachment": {
  20020. "type": "boolean"
  20021. },
  20022. "toolcall": {
  20023. "type": "boolean"
  20024. },
  20025. "input": {
  20026. "type": "object",
  20027. "properties": {
  20028. "text": {
  20029. "type": "boolean"
  20030. },
  20031. "audio": {
  20032. "type": "boolean"
  20033. },
  20034. "image": {
  20035. "type": "boolean"
  20036. },
  20037. "video": {
  20038. "type": "boolean"
  20039. },
  20040. "pdf": {
  20041. "type": "boolean"
  20042. }
  20043. },
  20044. "required": ["text", "audio", "image", "video", "pdf"],
  20045. "additionalProperties": false
  20046. },
  20047. "output": {
  20048. "type": "object",
  20049. "properties": {
  20050. "text": {
  20051. "type": "boolean"
  20052. },
  20053. "audio": {
  20054. "type": "boolean"
  20055. },
  20056. "image": {
  20057. "type": "boolean"
  20058. },
  20059. "video": {
  20060. "type": "boolean"
  20061. },
  20062. "pdf": {
  20063. "type": "boolean"
  20064. }
  20065. },
  20066. "required": ["text", "audio", "image", "video", "pdf"],
  20067. "additionalProperties": false
  20068. },
  20069. "interleaved": {
  20070. "anyOf": [
  20071. {
  20072. "type": "boolean"
  20073. },
  20074. {
  20075. "type": "object",
  20076. "properties": {
  20077. "field": {
  20078. "type": "string",
  20079. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20080. }
  20081. },
  20082. "required": ["field"],
  20083. "additionalProperties": false
  20084. }
  20085. ]
  20086. }
  20087. },
  20088. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  20089. "additionalProperties": false
  20090. },
  20091. "cost": {
  20092. "type": "object",
  20093. "properties": {
  20094. "input": {
  20095. "type": "number"
  20096. },
  20097. "output": {
  20098. "type": "number"
  20099. },
  20100. "cache": {
  20101. "type": "object",
  20102. "properties": {
  20103. "read": {
  20104. "type": "number"
  20105. },
  20106. "write": {
  20107. "type": "number"
  20108. }
  20109. },
  20110. "required": ["read", "write"],
  20111. "additionalProperties": false
  20112. },
  20113. "tiers": {
  20114. "type": "array",
  20115. "items": {
  20116. "type": "object",
  20117. "properties": {
  20118. "input": {
  20119. "type": "number"
  20120. },
  20121. "output": {
  20122. "type": "number"
  20123. },
  20124. "cache": {
  20125. "type": "object",
  20126. "properties": {
  20127. "read": {
  20128. "type": "number"
  20129. },
  20130. "write": {
  20131. "type": "number"
  20132. }
  20133. },
  20134. "required": ["read", "write"],
  20135. "additionalProperties": false
  20136. },
  20137. "tier": {
  20138. "type": "object",
  20139. "properties": {
  20140. "type": {
  20141. "type": "string",
  20142. "enum": ["context"]
  20143. },
  20144. "size": {
  20145. "type": "number"
  20146. }
  20147. },
  20148. "required": ["type", "size"],
  20149. "additionalProperties": false
  20150. }
  20151. },
  20152. "required": ["input", "output", "cache", "tier"],
  20153. "additionalProperties": false
  20154. }
  20155. },
  20156. "experimentalOver200K": {
  20157. "type": "object",
  20158. "properties": {
  20159. "input": {
  20160. "type": "number"
  20161. },
  20162. "output": {
  20163. "type": "number"
  20164. },
  20165. "cache": {
  20166. "type": "object",
  20167. "properties": {
  20168. "read": {
  20169. "type": "number"
  20170. },
  20171. "write": {
  20172. "type": "number"
  20173. }
  20174. },
  20175. "required": ["read", "write"],
  20176. "additionalProperties": false
  20177. }
  20178. },
  20179. "required": ["input", "output", "cache"],
  20180. "additionalProperties": false
  20181. }
  20182. },
  20183. "required": ["input", "output", "cache"],
  20184. "additionalProperties": false
  20185. },
  20186. "limit": {
  20187. "type": "object",
  20188. "properties": {
  20189. "context": {
  20190. "type": "number"
  20191. },
  20192. "input": {
  20193. "type": "number"
  20194. },
  20195. "output": {
  20196. "type": "number"
  20197. }
  20198. },
  20199. "required": ["context", "output"],
  20200. "additionalProperties": false
  20201. },
  20202. "status": {
  20203. "type": "string",
  20204. "enum": ["alpha", "beta", "deprecated", "active"]
  20205. },
  20206. "options": {
  20207. "type": "object"
  20208. },
  20209. "headers": {
  20210. "type": "object",
  20211. "additionalProperties": {
  20212. "type": "string"
  20213. }
  20214. },
  20215. "release_date": {
  20216. "type": "string"
  20217. },
  20218. "variants": {
  20219. "type": "object",
  20220. "additionalProperties": {
  20221. "type": "object"
  20222. }
  20223. }
  20224. },
  20225. "required": [
  20226. "id",
  20227. "providerID",
  20228. "api",
  20229. "name",
  20230. "capabilities",
  20231. "cost",
  20232. "limit",
  20233. "status",
  20234. "options",
  20235. "headers",
  20236. "release_date"
  20237. ],
  20238. "additionalProperties": false
  20239. },
  20240. "Provider": {
  20241. "type": "object",
  20242. "properties": {
  20243. "id": {
  20244. "type": "string"
  20245. },
  20246. "name": {
  20247. "type": "string"
  20248. },
  20249. "source": {
  20250. "type": "string",
  20251. "enum": ["env", "config", "custom", "api"]
  20252. },
  20253. "env": {
  20254. "type": "array",
  20255. "items": {
  20256. "type": "string"
  20257. }
  20258. },
  20259. "key": {
  20260. "type": "string"
  20261. },
  20262. "options": {
  20263. "type": "object"
  20264. },
  20265. "models": {
  20266. "type": "object",
  20267. "additionalProperties": {
  20268. "$ref": "#/components/schemas/Model"
  20269. }
  20270. }
  20271. },
  20272. "required": ["id", "name", "source", "env", "options", "models"],
  20273. "additionalProperties": false
  20274. },
  20275. "ConsoleState": {
  20276. "type": "object",
  20277. "properties": {
  20278. "consoleManagedProviders": {
  20279. "type": "array",
  20280. "items": {
  20281. "type": "string"
  20282. }
  20283. },
  20284. "activeOrgName": {
  20285. "type": "string"
  20286. },
  20287. "switchableOrgCount": {
  20288. "type": "integer",
  20289. "minimum": 0
  20290. }
  20291. },
  20292. "required": ["consoleManagedProviders", "switchableOrgCount"],
  20293. "additionalProperties": false
  20294. },
  20295. "effect_HttpApiError_InternalServerError": {
  20296. "type": "object",
  20297. "properties": {
  20298. "_tag": {
  20299. "type": "string",
  20300. "enum": ["InternalServerError"]
  20301. }
  20302. },
  20303. "required": ["_tag"],
  20304. "additionalProperties": false
  20305. },
  20306. "ToolListItem": {
  20307. "type": "object",
  20308. "properties": {
  20309. "id": {
  20310. "type": "string"
  20311. },
  20312. "description": {
  20313. "type": "string"
  20314. },
  20315. "parameters": {}
  20316. },
  20317. "required": ["id", "description", "parameters"],
  20318. "additionalProperties": false
  20319. },
  20320. "ToolList": {
  20321. "type": "array",
  20322. "items": {
  20323. "$ref": "#/components/schemas/ToolListItem"
  20324. }
  20325. },
  20326. "ToolIDs": {
  20327. "type": "array",
  20328. "items": {
  20329. "type": "string"
  20330. }
  20331. },
  20332. "WorktreeError": {
  20333. "type": "object",
  20334. "properties": {
  20335. "name": {
  20336. "type": "string",
  20337. "enum": [
  20338. "WorktreeNotGitError",
  20339. "WorktreeNameGenerationFailedError",
  20340. "WorktreeCreateFailedError",
  20341. "WorktreeStartCommandFailedError",
  20342. "WorktreeRemoveFailedError",
  20343. "WorktreeResetFailedError",
  20344. "WorktreeListFailedError"
  20345. ]
  20346. },
  20347. "data": {
  20348. "type": "object",
  20349. "properties": {
  20350. "message": {
  20351. "type": "string"
  20352. }
  20353. },
  20354. "required": ["message"],
  20355. "additionalProperties": false
  20356. }
  20357. },
  20358. "required": ["name", "data"],
  20359. "additionalProperties": false
  20360. },
  20361. "WorktreeCreateInput": {
  20362. "type": "object",
  20363. "properties": {
  20364. "name": {
  20365. "type": "string"
  20366. },
  20367. "startCommand": {
  20368. "type": "string",
  20369. "description": "Additional startup script to run after the project's start command"
  20370. }
  20371. },
  20372. "additionalProperties": false
  20373. },
  20374. "Worktree": {
  20375. "type": "object",
  20376. "properties": {
  20377. "name": {
  20378. "type": "string"
  20379. },
  20380. "branch": {
  20381. "type": "string"
  20382. },
  20383. "directory": {
  20384. "type": "string"
  20385. }
  20386. },
  20387. "required": ["name", "directory"],
  20388. "additionalProperties": false
  20389. },
  20390. "WorktreeRemoveInput": {
  20391. "type": "object",
  20392. "properties": {
  20393. "directory": {
  20394. "type": "string"
  20395. }
  20396. },
  20397. "required": ["directory"],
  20398. "additionalProperties": false
  20399. },
  20400. "WorktreeResetInput": {
  20401. "type": "object",
  20402. "properties": {
  20403. "directory": {
  20404. "type": "string"
  20405. }
  20406. },
  20407. "required": ["directory"],
  20408. "additionalProperties": false
  20409. },
  20410. "ProjectSummary": {
  20411. "type": "object",
  20412. "properties": {
  20413. "id": {
  20414. "type": "string"
  20415. },
  20416. "name": {
  20417. "type": "string"
  20418. },
  20419. "worktree": {
  20420. "type": "string"
  20421. }
  20422. },
  20423. "required": ["id", "worktree"],
  20424. "additionalProperties": false
  20425. },
  20426. "GlobalSession": {
  20427. "type": "object",
  20428. "properties": {
  20429. "id": {
  20430. "type": "string",
  20431. "pattern": "^ses"
  20432. },
  20433. "slug": {
  20434. "type": "string"
  20435. },
  20436. "projectID": {
  20437. "type": "string"
  20438. },
  20439. "workspaceID": {
  20440. "type": "string",
  20441. "pattern": "^wrk"
  20442. },
  20443. "directory": {
  20444. "type": "string"
  20445. },
  20446. "path": {
  20447. "type": "string"
  20448. },
  20449. "parentID": {
  20450. "type": "string",
  20451. "pattern": "^ses"
  20452. },
  20453. "summary": {
  20454. "type": "object",
  20455. "properties": {
  20456. "additions": {
  20457. "type": "number"
  20458. },
  20459. "deletions": {
  20460. "type": "number"
  20461. },
  20462. "files": {
  20463. "type": "number"
  20464. },
  20465. "diffs": {
  20466. "type": "array",
  20467. "items": {
  20468. "$ref": "#/components/schemas/SnapshotFileDiff"
  20469. }
  20470. }
  20471. },
  20472. "required": ["additions", "deletions", "files"],
  20473. "additionalProperties": false
  20474. },
  20475. "cost": {
  20476. "type": "number"
  20477. },
  20478. "tokens": {
  20479. "type": "object",
  20480. "properties": {
  20481. "input": {
  20482. "type": "number"
  20483. },
  20484. "output": {
  20485. "type": "number"
  20486. },
  20487. "reasoning": {
  20488. "type": "number"
  20489. },
  20490. "cache": {
  20491. "type": "object",
  20492. "properties": {
  20493. "read": {
  20494. "type": "number"
  20495. },
  20496. "write": {
  20497. "type": "number"
  20498. }
  20499. },
  20500. "required": ["read", "write"],
  20501. "additionalProperties": false
  20502. }
  20503. },
  20504. "required": ["input", "output", "reasoning", "cache"],
  20505. "additionalProperties": false
  20506. },
  20507. "share": {
  20508. "type": "object",
  20509. "properties": {
  20510. "url": {
  20511. "type": "string"
  20512. }
  20513. },
  20514. "required": ["url"],
  20515. "additionalProperties": false
  20516. },
  20517. "title": {
  20518. "type": "string"
  20519. },
  20520. "agent": {
  20521. "type": "string"
  20522. },
  20523. "model": {
  20524. "type": "object",
  20525. "properties": {
  20526. "id": {
  20527. "type": "string"
  20528. },
  20529. "providerID": {
  20530. "type": "string"
  20531. },
  20532. "variant": {
  20533. "type": "string"
  20534. }
  20535. },
  20536. "required": ["id", "providerID"],
  20537. "additionalProperties": false
  20538. },
  20539. "version": {
  20540. "type": "string"
  20541. },
  20542. "metadata": {
  20543. "type": "object"
  20544. },
  20545. "time": {
  20546. "type": "object",
  20547. "properties": {
  20548. "created": {
  20549. "type": "integer",
  20550. "minimum": 0
  20551. },
  20552. "updated": {
  20553. "type": "integer",
  20554. "minimum": 0
  20555. },
  20556. "compacting": {
  20557. "type": "integer",
  20558. "minimum": 0
  20559. },
  20560. "archived": {
  20561. "type": "number"
  20562. }
  20563. },
  20564. "required": ["created", "updated"],
  20565. "additionalProperties": false
  20566. },
  20567. "permission": {
  20568. "$ref": "#/components/schemas/PermissionRuleset"
  20569. },
  20570. "revert": {
  20571. "type": "object",
  20572. "properties": {
  20573. "messageID": {
  20574. "type": "string",
  20575. "pattern": "^msg"
  20576. },
  20577. "partID": {
  20578. "type": "string",
  20579. "pattern": "^prt"
  20580. },
  20581. "snapshot": {
  20582. "type": "string"
  20583. },
  20584. "diff": {
  20585. "type": "string"
  20586. }
  20587. },
  20588. "required": ["messageID"],
  20589. "additionalProperties": false
  20590. },
  20591. "project": {
  20592. "anyOf": [
  20593. {
  20594. "$ref": "#/components/schemas/ProjectSummary"
  20595. },
  20596. {
  20597. "type": "null"
  20598. }
  20599. ]
  20600. }
  20601. },
  20602. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  20603. "additionalProperties": false
  20604. },
  20605. "McpResource": {
  20606. "type": "object",
  20607. "properties": {
  20608. "name": {
  20609. "type": "string"
  20610. },
  20611. "uri": {
  20612. "type": "string"
  20613. },
  20614. "description": {
  20615. "type": "string"
  20616. },
  20617. "mimeType": {
  20618. "type": "string"
  20619. },
  20620. "client": {
  20621. "type": "string"
  20622. }
  20623. },
  20624. "required": ["name", "uri", "client"],
  20625. "additionalProperties": false
  20626. },
  20627. "Symbol": {
  20628. "type": "object",
  20629. "properties": {
  20630. "name": {
  20631. "type": "string"
  20632. },
  20633. "kind": {
  20634. "type": "integer",
  20635. "minimum": 0
  20636. },
  20637. "location": {
  20638. "type": "object",
  20639. "properties": {
  20640. "uri": {
  20641. "type": "string"
  20642. },
  20643. "range": {
  20644. "$ref": "#/components/schemas/Range"
  20645. }
  20646. },
  20647. "required": ["uri", "range"],
  20648. "additionalProperties": false
  20649. }
  20650. },
  20651. "required": ["name", "kind", "location"],
  20652. "additionalProperties": false
  20653. },
  20654. "FileNode": {
  20655. "type": "object",
  20656. "properties": {
  20657. "name": {
  20658. "type": "string"
  20659. },
  20660. "path": {
  20661. "type": "string"
  20662. },
  20663. "absolute": {
  20664. "type": "string"
  20665. },
  20666. "type": {
  20667. "type": "string",
  20668. "enum": ["file", "directory"]
  20669. },
  20670. "ignored": {
  20671. "type": "boolean"
  20672. }
  20673. },
  20674. "required": ["name", "path", "absolute", "type", "ignored"],
  20675. "additionalProperties": false
  20676. },
  20677. "FileContent": {
  20678. "type": "object",
  20679. "properties": {
  20680. "type": {
  20681. "type": "string",
  20682. "enum": ["text", "binary"]
  20683. },
  20684. "content": {
  20685. "type": "string"
  20686. },
  20687. "diff": {
  20688. "type": "string"
  20689. },
  20690. "patch": {
  20691. "type": "object",
  20692. "properties": {
  20693. "oldFileName": {
  20694. "type": "string"
  20695. },
  20696. "newFileName": {
  20697. "type": "string"
  20698. },
  20699. "oldHeader": {
  20700. "type": "string"
  20701. },
  20702. "newHeader": {
  20703. "type": "string"
  20704. },
  20705. "hunks": {
  20706. "type": "array",
  20707. "items": {
  20708. "type": "object",
  20709. "properties": {
  20710. "oldStart": {
  20711. "type": "integer",
  20712. "minimum": 0
  20713. },
  20714. "oldLines": {
  20715. "type": "integer",
  20716. "minimum": 0
  20717. },
  20718. "newStart": {
  20719. "type": "integer",
  20720. "minimum": 0
  20721. },
  20722. "newLines": {
  20723. "type": "integer",
  20724. "minimum": 0
  20725. },
  20726. "lines": {
  20727. "type": "array",
  20728. "items": {
  20729. "type": "string"
  20730. }
  20731. }
  20732. },
  20733. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  20734. "additionalProperties": false
  20735. }
  20736. },
  20737. "index": {
  20738. "type": "string"
  20739. }
  20740. },
  20741. "required": ["oldFileName", "newFileName", "hunks"],
  20742. "additionalProperties": false
  20743. },
  20744. "encoding": {
  20745. "type": "string",
  20746. "enum": ["base64"]
  20747. },
  20748. "mimeType": {
  20749. "type": "string"
  20750. }
  20751. },
  20752. "required": ["type", "content"],
  20753. "additionalProperties": false
  20754. },
  20755. "File": {
  20756. "type": "object",
  20757. "properties": {
  20758. "path": {
  20759. "type": "string"
  20760. },
  20761. "added": {
  20762. "type": "integer",
  20763. "minimum": 0
  20764. },
  20765. "removed": {
  20766. "type": "integer",
  20767. "minimum": 0
  20768. },
  20769. "status": {
  20770. "type": "string",
  20771. "enum": ["added", "deleted", "modified"]
  20772. }
  20773. },
  20774. "required": ["path", "added", "removed", "status"],
  20775. "additionalProperties": false
  20776. },
  20777. "Path": {
  20778. "type": "object",
  20779. "properties": {
  20780. "home": {
  20781. "type": "string"
  20782. },
  20783. "state": {
  20784. "type": "string"
  20785. },
  20786. "config": {
  20787. "type": "string"
  20788. },
  20789. "worktree": {
  20790. "type": "string"
  20791. },
  20792. "directory": {
  20793. "type": "string"
  20794. }
  20795. },
  20796. "required": ["home", "state", "config", "worktree", "directory"],
  20797. "additionalProperties": false
  20798. },
  20799. "VcsInfo": {
  20800. "type": "object",
  20801. "properties": {
  20802. "branch": {
  20803. "type": "string"
  20804. },
  20805. "default_branch": {
  20806. "type": "string"
  20807. }
  20808. },
  20809. "additionalProperties": false
  20810. },
  20811. "VcsFileStatus": {
  20812. "type": "object",
  20813. "properties": {
  20814. "file": {
  20815. "type": "string"
  20816. },
  20817. "additions": {
  20818. "type": "number"
  20819. },
  20820. "deletions": {
  20821. "type": "number"
  20822. },
  20823. "status": {
  20824. "type": "string",
  20825. "enum": ["added", "deleted", "modified"]
  20826. }
  20827. },
  20828. "required": ["file", "additions", "deletions", "status"],
  20829. "additionalProperties": false
  20830. },
  20831. "VcsFileDiff": {
  20832. "type": "object",
  20833. "properties": {
  20834. "file": {
  20835. "type": "string"
  20836. },
  20837. "patch": {
  20838. "type": "string"
  20839. },
  20840. "additions": {
  20841. "type": "number"
  20842. },
  20843. "deletions": {
  20844. "type": "number"
  20845. },
  20846. "status": {
  20847. "type": "string",
  20848. "enum": ["added", "deleted", "modified"]
  20849. }
  20850. },
  20851. "required": ["file", "additions", "deletions"],
  20852. "additionalProperties": false
  20853. },
  20854. "VcsApplyError": {
  20855. "type": "object",
  20856. "properties": {
  20857. "name": {
  20858. "type": "string",
  20859. "enum": ["VcsApplyError"]
  20860. },
  20861. "data": {
  20862. "type": "object",
  20863. "properties": {
  20864. "message": {
  20865. "type": "string"
  20866. },
  20867. "reason": {
  20868. "type": "string",
  20869. "enum": ["non-git", "not-clean"]
  20870. }
  20871. },
  20872. "required": ["message", "reason"],
  20873. "additionalProperties": false
  20874. }
  20875. },
  20876. "required": ["name", "data"],
  20877. "additionalProperties": false
  20878. },
  20879. "Command": {
  20880. "type": "object",
  20881. "properties": {
  20882. "name": {
  20883. "type": "string"
  20884. },
  20885. "description": {
  20886. "type": "string"
  20887. },
  20888. "agent": {
  20889. "type": "string"
  20890. },
  20891. "model": {
  20892. "type": "string"
  20893. },
  20894. "source": {
  20895. "type": "string",
  20896. "enum": ["command", "mcp", "skill"]
  20897. },
  20898. "template": {
  20899. "type": "string"
  20900. },
  20901. "subtask": {
  20902. "type": "boolean"
  20903. },
  20904. "hints": {
  20905. "type": "array",
  20906. "items": {
  20907. "type": "string"
  20908. }
  20909. }
  20910. },
  20911. "required": ["name", "template", "hints"],
  20912. "additionalProperties": false
  20913. },
  20914. "Agent": {
  20915. "type": "object",
  20916. "properties": {
  20917. "name": {
  20918. "type": "string"
  20919. },
  20920. "description": {
  20921. "type": "string"
  20922. },
  20923. "mode": {
  20924. "type": "string",
  20925. "enum": ["subagent", "primary", "all"]
  20926. },
  20927. "native": {
  20928. "type": "boolean"
  20929. },
  20930. "hidden": {
  20931. "type": "boolean"
  20932. },
  20933. "topP": {
  20934. "type": "number"
  20935. },
  20936. "temperature": {
  20937. "type": "number"
  20938. },
  20939. "color": {
  20940. "type": "string"
  20941. },
  20942. "permission": {
  20943. "$ref": "#/components/schemas/PermissionRuleset"
  20944. },
  20945. "model": {
  20946. "type": "object",
  20947. "properties": {
  20948. "modelID": {
  20949. "type": "string"
  20950. },
  20951. "providerID": {
  20952. "type": "string"
  20953. }
  20954. },
  20955. "required": ["modelID", "providerID"],
  20956. "additionalProperties": false
  20957. },
  20958. "variant": {
  20959. "type": "string"
  20960. },
  20961. "prompt": {
  20962. "type": "string"
  20963. },
  20964. "options": {
  20965. "type": "object"
  20966. },
  20967. "steps": {
  20968. "type": "number"
  20969. }
  20970. },
  20971. "required": ["name", "mode", "permission", "options"],
  20972. "additionalProperties": false
  20973. },
  20974. "LSPStatus": {
  20975. "type": "object",
  20976. "properties": {
  20977. "id": {
  20978. "type": "string"
  20979. },
  20980. "name": {
  20981. "type": "string"
  20982. },
  20983. "root": {
  20984. "type": "string"
  20985. },
  20986. "status": {
  20987. "type": "string",
  20988. "enum": ["connected", "error"]
  20989. }
  20990. },
  20991. "required": ["id", "name", "root", "status"],
  20992. "additionalProperties": false
  20993. },
  20994. "FormatterStatus": {
  20995. "type": "object",
  20996. "properties": {
  20997. "name": {
  20998. "type": "string"
  20999. },
  21000. "extensions": {
  21001. "type": "array",
  21002. "items": {
  21003. "type": "string"
  21004. }
  21005. },
  21006. "enabled": {
  21007. "type": "boolean"
  21008. }
  21009. },
  21010. "required": ["name", "extensions", "enabled"],
  21011. "additionalProperties": false
  21012. },
  21013. "MCPStatusConnected": {
  21014. "type": "object",
  21015. "properties": {
  21016. "status": {
  21017. "type": "string",
  21018. "enum": ["connected"]
  21019. }
  21020. },
  21021. "required": ["status"],
  21022. "additionalProperties": false
  21023. },
  21024. "MCPStatusDisabled": {
  21025. "type": "object",
  21026. "properties": {
  21027. "status": {
  21028. "type": "string",
  21029. "enum": ["disabled"]
  21030. }
  21031. },
  21032. "required": ["status"],
  21033. "additionalProperties": false
  21034. },
  21035. "MCPStatusFailed": {
  21036. "type": "object",
  21037. "properties": {
  21038. "status": {
  21039. "type": "string",
  21040. "enum": ["failed"]
  21041. },
  21042. "error": {
  21043. "type": "string"
  21044. }
  21045. },
  21046. "required": ["status", "error"],
  21047. "additionalProperties": false
  21048. },
  21049. "MCPStatusNeedsAuth": {
  21050. "type": "object",
  21051. "properties": {
  21052. "status": {
  21053. "type": "string",
  21054. "enum": ["needs_auth"]
  21055. }
  21056. },
  21057. "required": ["status"],
  21058. "additionalProperties": false
  21059. },
  21060. "MCPStatusNeedsClientRegistration": {
  21061. "type": "object",
  21062. "properties": {
  21063. "status": {
  21064. "type": "string",
  21065. "enum": ["needs_client_registration"]
  21066. },
  21067. "error": {
  21068. "type": "string"
  21069. }
  21070. },
  21071. "required": ["status", "error"],
  21072. "additionalProperties": false
  21073. },
  21074. "MCPStatus": {
  21075. "anyOf": [
  21076. {
  21077. "$ref": "#/components/schemas/MCPStatusConnected"
  21078. },
  21079. {
  21080. "$ref": "#/components/schemas/MCPStatusDisabled"
  21081. },
  21082. {
  21083. "$ref": "#/components/schemas/MCPStatusFailed"
  21084. },
  21085. {
  21086. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  21087. },
  21088. {
  21089. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  21090. }
  21091. ]
  21092. },
  21093. "McpUnsupportedOAuthError": {
  21094. "type": "object",
  21095. "properties": {
  21096. "error": {
  21097. "type": "string"
  21098. }
  21099. },
  21100. "required": ["error"],
  21101. "additionalProperties": false
  21102. },
  21103. "McpServerNotFoundError": {
  21104. "type": "object",
  21105. "properties": {
  21106. "_tag": {
  21107. "type": "string",
  21108. "enum": ["McpServerNotFoundError"]
  21109. },
  21110. "name": {
  21111. "type": "string"
  21112. },
  21113. "message": {
  21114. "type": "string"
  21115. }
  21116. },
  21117. "required": ["_tag", "name", "message"],
  21118. "additionalProperties": false
  21119. },
  21120. "Project": {
  21121. "type": "object",
  21122. "properties": {
  21123. "id": {
  21124. "type": "string"
  21125. },
  21126. "worktree": {
  21127. "type": "string"
  21128. },
  21129. "vcs": {
  21130. "type": "string",
  21131. "enum": ["git"]
  21132. },
  21133. "name": {
  21134. "type": "string"
  21135. },
  21136. "icon": {
  21137. "type": "object",
  21138. "properties": {
  21139. "url": {
  21140. "type": "string"
  21141. },
  21142. "override": {
  21143. "type": "string"
  21144. },
  21145. "color": {
  21146. "type": "string"
  21147. }
  21148. },
  21149. "additionalProperties": false
  21150. },
  21151. "commands": {
  21152. "type": "object",
  21153. "properties": {
  21154. "start": {
  21155. "type": "string",
  21156. "description": "Startup script to run when creating a new workspace (worktree)"
  21157. }
  21158. },
  21159. "additionalProperties": false
  21160. },
  21161. "time": {
  21162. "type": "object",
  21163. "properties": {
  21164. "created": {
  21165. "type": "integer",
  21166. "minimum": 0
  21167. },
  21168. "updated": {
  21169. "type": "integer",
  21170. "minimum": 0
  21171. },
  21172. "initialized": {
  21173. "type": "integer",
  21174. "minimum": 0
  21175. }
  21176. },
  21177. "required": ["created", "updated"],
  21178. "additionalProperties": false
  21179. },
  21180. "sandboxes": {
  21181. "type": "array",
  21182. "items": {
  21183. "type": "string"
  21184. }
  21185. }
  21186. },
  21187. "required": ["id", "worktree", "time", "sandboxes"],
  21188. "additionalProperties": false
  21189. },
  21190. "ProjectNotFoundError": {
  21191. "type": "object",
  21192. "properties": {
  21193. "_tag": {
  21194. "type": "string",
  21195. "enum": ["ProjectNotFoundError"]
  21196. },
  21197. "projectID": {
  21198. "type": "string"
  21199. },
  21200. "message": {
  21201. "type": "string"
  21202. }
  21203. },
  21204. "required": ["_tag", "projectID", "message"],
  21205. "additionalProperties": false
  21206. },
  21207. "PtyNotFoundError": {
  21208. "type": "object",
  21209. "properties": {
  21210. "_tag": {
  21211. "type": "string",
  21212. "enum": ["PtyNotFoundError"]
  21213. },
  21214. "ptyID": {
  21215. "type": "string"
  21216. },
  21217. "message": {
  21218. "type": "string"
  21219. }
  21220. },
  21221. "required": ["_tag", "ptyID", "message"],
  21222. "additionalProperties": false
  21223. },
  21224. "PtyForbiddenError": {
  21225. "type": "object",
  21226. "properties": {
  21227. "_tag": {
  21228. "type": "string",
  21229. "enum": ["PtyForbiddenError"]
  21230. },
  21231. "message": {
  21232. "type": "string"
  21233. }
  21234. },
  21235. "required": ["_tag", "message"],
  21236. "additionalProperties": false
  21237. },
  21238. "QuestionRequest": {
  21239. "type": "object",
  21240. "properties": {
  21241. "id": {
  21242. "type": "string",
  21243. "pattern": "^que"
  21244. },
  21245. "sessionID": {
  21246. "type": "string",
  21247. "pattern": "^ses"
  21248. },
  21249. "questions": {
  21250. "type": "array",
  21251. "items": {
  21252. "$ref": "#/components/schemas/QuestionInfo"
  21253. },
  21254. "description": "Questions to ask"
  21255. },
  21256. "tool": {
  21257. "$ref": "#/components/schemas/QuestionTool"
  21258. }
  21259. },
  21260. "required": ["id", "sessionID", "questions"],
  21261. "additionalProperties": false
  21262. },
  21263. "QuestionNotFoundError": {
  21264. "type": "object",
  21265. "properties": {
  21266. "_tag": {
  21267. "type": "string",
  21268. "enum": ["QuestionNotFoundError"]
  21269. },
  21270. "requestID": {
  21271. "type": "string"
  21272. },
  21273. "message": {
  21274. "type": "string"
  21275. }
  21276. },
  21277. "required": ["_tag", "requestID", "message"],
  21278. "additionalProperties": false
  21279. },
  21280. "PermissionRequest": {
  21281. "type": "object",
  21282. "properties": {
  21283. "id": {
  21284. "type": "string",
  21285. "pattern": "^per"
  21286. },
  21287. "sessionID": {
  21288. "type": "string",
  21289. "pattern": "^ses"
  21290. },
  21291. "permission": {
  21292. "type": "string"
  21293. },
  21294. "patterns": {
  21295. "type": "array",
  21296. "items": {
  21297. "type": "string"
  21298. }
  21299. },
  21300. "metadata": {
  21301. "type": "object"
  21302. },
  21303. "always": {
  21304. "type": "array",
  21305. "items": {
  21306. "type": "string"
  21307. }
  21308. },
  21309. "tool": {
  21310. "type": "object",
  21311. "properties": {
  21312. "messageID": {
  21313. "type": "string"
  21314. },
  21315. "callID": {
  21316. "type": "string"
  21317. }
  21318. },
  21319. "required": ["messageID", "callID"],
  21320. "additionalProperties": false
  21321. }
  21322. },
  21323. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  21324. "additionalProperties": false
  21325. },
  21326. "PermissionNotFoundError": {
  21327. "type": "object",
  21328. "properties": {
  21329. "_tag": {
  21330. "type": "string",
  21331. "enum": ["PermissionNotFoundError"]
  21332. },
  21333. "requestID": {
  21334. "type": "string"
  21335. },
  21336. "message": {
  21337. "type": "string"
  21338. }
  21339. },
  21340. "required": ["_tag", "requestID", "message"],
  21341. "additionalProperties": false
  21342. },
  21343. "ProviderAuthMethod": {
  21344. "type": "object",
  21345. "properties": {
  21346. "type": {
  21347. "type": "string",
  21348. "enum": ["oauth", "api"]
  21349. },
  21350. "label": {
  21351. "type": "string"
  21352. },
  21353. "prompts": {
  21354. "type": "array",
  21355. "items": {
  21356. "anyOf": [
  21357. {
  21358. "type": "object",
  21359. "properties": {
  21360. "type": {
  21361. "type": "string",
  21362. "enum": ["text"]
  21363. },
  21364. "key": {
  21365. "type": "string"
  21366. },
  21367. "message": {
  21368. "type": "string"
  21369. },
  21370. "placeholder": {
  21371. "type": "string"
  21372. },
  21373. "when": {
  21374. "type": "object",
  21375. "properties": {
  21376. "key": {
  21377. "type": "string"
  21378. },
  21379. "op": {
  21380. "type": "string",
  21381. "enum": ["eq", "neq"]
  21382. },
  21383. "value": {
  21384. "type": "string"
  21385. }
  21386. },
  21387. "required": ["key", "op", "value"],
  21388. "additionalProperties": false
  21389. }
  21390. },
  21391. "required": ["type", "key", "message"],
  21392. "additionalProperties": false
  21393. },
  21394. {
  21395. "type": "object",
  21396. "properties": {
  21397. "type": {
  21398. "type": "string",
  21399. "enum": ["select"]
  21400. },
  21401. "key": {
  21402. "type": "string"
  21403. },
  21404. "message": {
  21405. "type": "string"
  21406. },
  21407. "options": {
  21408. "type": "array",
  21409. "items": {
  21410. "type": "object",
  21411. "properties": {
  21412. "label": {
  21413. "type": "string"
  21414. },
  21415. "value": {
  21416. "type": "string"
  21417. },
  21418. "hint": {
  21419. "type": "string"
  21420. }
  21421. },
  21422. "required": ["label", "value"],
  21423. "additionalProperties": false
  21424. }
  21425. },
  21426. "when": {
  21427. "type": "object",
  21428. "properties": {
  21429. "key": {
  21430. "type": "string"
  21431. },
  21432. "op": {
  21433. "type": "string",
  21434. "enum": ["eq", "neq"]
  21435. },
  21436. "value": {
  21437. "type": "string"
  21438. }
  21439. },
  21440. "required": ["key", "op", "value"],
  21441. "additionalProperties": false
  21442. }
  21443. },
  21444. "required": ["type", "key", "message", "options"],
  21445. "additionalProperties": false
  21446. }
  21447. ]
  21448. }
  21449. }
  21450. },
  21451. "required": ["type", "label"],
  21452. "additionalProperties": false
  21453. },
  21454. "ProviderAuthAuthorization": {
  21455. "type": "object",
  21456. "properties": {
  21457. "url": {
  21458. "type": "string"
  21459. },
  21460. "method": {
  21461. "type": "string",
  21462. "enum": ["auto", "code"]
  21463. },
  21464. "instructions": {
  21465. "type": "string"
  21466. }
  21467. },
  21468. "required": ["url", "method", "instructions"],
  21469. "additionalProperties": false
  21470. },
  21471. "ProviderAuthError1": {
  21472. "type": "object",
  21473. "properties": {
  21474. "name": {
  21475. "type": "string",
  21476. "enum": [
  21477. "BadRequest",
  21478. "ProviderAuthOauthMissing",
  21479. "ProviderAuthOauthCodeMissing",
  21480. "ProviderAuthOauthCallbackFailed",
  21481. "ProviderAuthValidationFailed"
  21482. ]
  21483. },
  21484. "data": {
  21485. "type": "object",
  21486. "properties": {
  21487. "providerID": {
  21488. "type": "string"
  21489. },
  21490. "field": {
  21491. "type": "string"
  21492. },
  21493. "message": {
  21494. "type": "string"
  21495. },
  21496. "kind": {
  21497. "type": "string"
  21498. }
  21499. },
  21500. "additionalProperties": false
  21501. }
  21502. },
  21503. "required": ["name", "data"],
  21504. "additionalProperties": false
  21505. },
  21506. "NotFoundError": {
  21507. "type": "object",
  21508. "required": ["name", "data"],
  21509. "properties": {
  21510. "name": {
  21511. "type": "string",
  21512. "enum": ["NotFoundError"]
  21513. },
  21514. "data": {
  21515. "type": "object",
  21516. "required": ["message"],
  21517. "properties": {
  21518. "message": {
  21519. "type": "string"
  21520. }
  21521. }
  21522. }
  21523. }
  21524. },
  21525. "TextPartInput": {
  21526. "type": "object",
  21527. "properties": {
  21528. "id": {
  21529. "type": "string",
  21530. "pattern": "^prt"
  21531. },
  21532. "type": {
  21533. "type": "string",
  21534. "enum": ["text"]
  21535. },
  21536. "text": {
  21537. "type": "string"
  21538. },
  21539. "synthetic": {
  21540. "type": "boolean"
  21541. },
  21542. "ignored": {
  21543. "type": "boolean"
  21544. },
  21545. "time": {
  21546. "type": "object",
  21547. "properties": {
  21548. "start": {
  21549. "type": "integer",
  21550. "minimum": 0
  21551. },
  21552. "end": {
  21553. "type": "integer",
  21554. "minimum": 0
  21555. }
  21556. },
  21557. "required": ["start"],
  21558. "additionalProperties": false
  21559. },
  21560. "metadata": {
  21561. "type": "object"
  21562. }
  21563. },
  21564. "required": ["type", "text"],
  21565. "additionalProperties": false
  21566. },
  21567. "FilePartInput": {
  21568. "type": "object",
  21569. "properties": {
  21570. "id": {
  21571. "type": "string",
  21572. "pattern": "^prt"
  21573. },
  21574. "type": {
  21575. "type": "string",
  21576. "enum": ["file"]
  21577. },
  21578. "mime": {
  21579. "type": "string"
  21580. },
  21581. "filename": {
  21582. "type": "string"
  21583. },
  21584. "url": {
  21585. "type": "string"
  21586. },
  21587. "source": {
  21588. "$ref": "#/components/schemas/FilePartSource"
  21589. }
  21590. },
  21591. "required": ["type", "mime", "url"],
  21592. "additionalProperties": false
  21593. },
  21594. "AgentPartInput": {
  21595. "type": "object",
  21596. "properties": {
  21597. "id": {
  21598. "type": "string",
  21599. "pattern": "^prt"
  21600. },
  21601. "type": {
  21602. "type": "string",
  21603. "enum": ["agent"]
  21604. },
  21605. "name": {
  21606. "type": "string"
  21607. },
  21608. "source": {
  21609. "type": "object",
  21610. "properties": {
  21611. "value": {
  21612. "type": "string"
  21613. },
  21614. "start": {
  21615. "type": "integer",
  21616. "minimum": 0
  21617. },
  21618. "end": {
  21619. "type": "integer",
  21620. "minimum": 0
  21621. }
  21622. },
  21623. "required": ["value", "start", "end"],
  21624. "additionalProperties": false
  21625. }
  21626. },
  21627. "required": ["type", "name"],
  21628. "additionalProperties": false
  21629. },
  21630. "SubtaskPartInput": {
  21631. "type": "object",
  21632. "properties": {
  21633. "id": {
  21634. "type": "string",
  21635. "pattern": "^prt"
  21636. },
  21637. "type": {
  21638. "type": "string",
  21639. "enum": ["subtask"]
  21640. },
  21641. "prompt": {
  21642. "type": "string"
  21643. },
  21644. "description": {
  21645. "type": "string"
  21646. },
  21647. "agent": {
  21648. "type": "string"
  21649. },
  21650. "model": {
  21651. "type": "object",
  21652. "properties": {
  21653. "providerID": {
  21654. "type": "string"
  21655. },
  21656. "modelID": {
  21657. "type": "string"
  21658. }
  21659. },
  21660. "required": ["providerID", "modelID"],
  21661. "additionalProperties": false
  21662. },
  21663. "command": {
  21664. "type": "string"
  21665. }
  21666. },
  21667. "required": ["type", "prompt", "description", "agent"],
  21668. "additionalProperties": false
  21669. },
  21670. "SessionBusyError": {
  21671. "type": "object",
  21672. "properties": {
  21673. "_tag": {
  21674. "type": "string",
  21675. "enum": ["SessionBusyError"]
  21676. },
  21677. "sessionID": {
  21678. "type": "string"
  21679. },
  21680. "message": {
  21681. "type": "string"
  21682. }
  21683. },
  21684. "required": ["_tag", "sessionID", "message"],
  21685. "additionalProperties": false
  21686. },
  21687. "EventTuiPromptAppend": {
  21688. "type": "object",
  21689. "properties": {
  21690. "type": {
  21691. "type": "string",
  21692. "enum": ["tui.prompt.append"]
  21693. },
  21694. "properties": {
  21695. "type": "object",
  21696. "properties": {
  21697. "text": {
  21698. "type": "string"
  21699. }
  21700. },
  21701. "required": ["text"],
  21702. "additionalProperties": false
  21703. }
  21704. },
  21705. "required": ["type", "properties"],
  21706. "additionalProperties": false
  21707. },
  21708. "EventTuiCommandExecute": {
  21709. "type": "object",
  21710. "properties": {
  21711. "type": {
  21712. "type": "string",
  21713. "enum": ["tui.command.execute"]
  21714. },
  21715. "properties": {
  21716. "type": "object",
  21717. "properties": {
  21718. "command": {
  21719. "anyOf": [
  21720. {
  21721. "type": "string",
  21722. "enum": [
  21723. "session.list",
  21724. "session.new",
  21725. "session.share",
  21726. "session.interrupt",
  21727. "session.compact",
  21728. "session.page.up",
  21729. "session.page.down",
  21730. "session.line.up",
  21731. "session.line.down",
  21732. "session.half.page.up",
  21733. "session.half.page.down",
  21734. "session.first",
  21735. "session.last",
  21736. "prompt.clear",
  21737. "prompt.submit",
  21738. "agent.cycle"
  21739. ]
  21740. },
  21741. {
  21742. "type": "string"
  21743. }
  21744. ]
  21745. }
  21746. },
  21747. "required": ["command"],
  21748. "additionalProperties": false
  21749. }
  21750. },
  21751. "required": ["type", "properties"],
  21752. "additionalProperties": false
  21753. },
  21754. "EventTuiToastShow": {
  21755. "type": "object",
  21756. "properties": {
  21757. "type": {
  21758. "type": "string",
  21759. "enum": ["tui.toast.show"]
  21760. },
  21761. "properties": {
  21762. "type": "object",
  21763. "properties": {
  21764. "title": {
  21765. "type": "string"
  21766. },
  21767. "message": {
  21768. "type": "string"
  21769. },
  21770. "variant": {
  21771. "type": "string",
  21772. "enum": ["info", "success", "warning", "error"]
  21773. },
  21774. "duration": {
  21775. "type": "integer",
  21776. "exclusiveMinimum": 0
  21777. }
  21778. },
  21779. "required": ["message", "variant"],
  21780. "additionalProperties": false
  21781. }
  21782. },
  21783. "required": ["type", "properties"],
  21784. "additionalProperties": false
  21785. },
  21786. "EventTuiSessionSelect": {
  21787. "type": "object",
  21788. "properties": {
  21789. "type": {
  21790. "type": "string",
  21791. "enum": ["tui.session.select"]
  21792. },
  21793. "properties": {
  21794. "type": "object",
  21795. "properties": {
  21796. "sessionID": {
  21797. "type": "string",
  21798. "pattern": "^ses",
  21799. "description": "Session ID to navigate to"
  21800. }
  21801. },
  21802. "required": ["sessionID"],
  21803. "additionalProperties": false
  21804. }
  21805. },
  21806. "required": ["type", "properties"],
  21807. "additionalProperties": false
  21808. },
  21809. "Workspace": {
  21810. "type": "object",
  21811. "properties": {
  21812. "id": {
  21813. "type": "string",
  21814. "pattern": "^wrk"
  21815. },
  21816. "type": {
  21817. "type": "string"
  21818. },
  21819. "name": {
  21820. "type": "string"
  21821. },
  21822. "branch": {
  21823. "anyOf": [
  21824. {
  21825. "type": "string"
  21826. },
  21827. {
  21828. "type": "null"
  21829. }
  21830. ]
  21831. },
  21832. "directory": {
  21833. "anyOf": [
  21834. {
  21835. "type": "string"
  21836. },
  21837. {
  21838. "type": "null"
  21839. }
  21840. ]
  21841. },
  21842. "extra": {
  21843. "anyOf": [
  21844. {},
  21845. {
  21846. "type": "null"
  21847. }
  21848. ]
  21849. },
  21850. "projectID": {
  21851. "type": "string"
  21852. },
  21853. "timeUsed": {
  21854. "anyOf": [
  21855. {
  21856. "type": "number"
  21857. },
  21858. {
  21859. "type": "string",
  21860. "enum": ["NaN"]
  21861. },
  21862. {
  21863. "type": "string",
  21864. "enum": ["Infinity"]
  21865. },
  21866. {
  21867. "type": "string",
  21868. "enum": ["-Infinity"]
  21869. },
  21870. {
  21871. "type": "string",
  21872. "enum": ["Infinity", "-Infinity", "NaN"]
  21873. }
  21874. ]
  21875. }
  21876. },
  21877. "required": ["id", "type", "name", "projectID", "timeUsed"],
  21878. "additionalProperties": false
  21879. },
  21880. "WorkspaceCreateError": {
  21881. "type": "object",
  21882. "properties": {
  21883. "name": {
  21884. "type": "string",
  21885. "enum": ["WorkspaceCreateError"]
  21886. },
  21887. "data": {
  21888. "type": "object",
  21889. "properties": {
  21890. "message": {
  21891. "type": "string"
  21892. }
  21893. },
  21894. "required": ["message"],
  21895. "additionalProperties": false
  21896. }
  21897. },
  21898. "required": ["name", "data"],
  21899. "additionalProperties": false
  21900. },
  21901. "WorkspaceWarpError": {
  21902. "type": "object",
  21903. "properties": {
  21904. "name": {
  21905. "type": "string",
  21906. "enum": ["WorkspaceWarpError"]
  21907. },
  21908. "data": {
  21909. "type": "object",
  21910. "properties": {
  21911. "message": {
  21912. "type": "string"
  21913. }
  21914. },
  21915. "required": ["message"],
  21916. "additionalProperties": false
  21917. }
  21918. },
  21919. "required": ["name", "data"],
  21920. "additionalProperties": false
  21921. },
  21922. "UnauthorizedError": {
  21923. "type": "object",
  21924. "properties": {
  21925. "_tag": {
  21926. "type": "string",
  21927. "enum": ["UnauthorizedError"]
  21928. },
  21929. "message": {
  21930. "type": "string"
  21931. }
  21932. },
  21933. "required": ["_tag", "message"],
  21934. "additionalProperties": false
  21935. },
  21936. "SessionsResponse": {
  21937. "type": "object",
  21938. "properties": {
  21939. "data": {
  21940. "type": "array",
  21941. "items": {
  21942. "$ref": "#/components/schemas/SessionV2Info"
  21943. }
  21944. },
  21945. "cursor": {
  21946. "type": "object",
  21947. "properties": {
  21948. "previous": {
  21949. "type": "string"
  21950. },
  21951. "next": {
  21952. "type": "string"
  21953. }
  21954. },
  21955. "additionalProperties": false
  21956. }
  21957. },
  21958. "required": ["data", "cursor"],
  21959. "additionalProperties": false
  21960. },
  21961. "InvalidCursorError": {
  21962. "type": "object",
  21963. "properties": {
  21964. "_tag": {
  21965. "type": "string",
  21966. "enum": ["InvalidCursorError"]
  21967. },
  21968. "message": {
  21969. "type": "string"
  21970. }
  21971. },
  21972. "required": ["_tag", "message"],
  21973. "additionalProperties": false
  21974. },
  21975. "SessionNotFoundError": {
  21976. "type": "object",
  21977. "properties": {
  21978. "_tag": {
  21979. "type": "string",
  21980. "enum": ["SessionNotFoundError"]
  21981. },
  21982. "sessionID": {
  21983. "type": "string"
  21984. },
  21985. "message": {
  21986. "type": "string"
  21987. }
  21988. },
  21989. "required": ["_tag", "sessionID", "message"],
  21990. "additionalProperties": false
  21991. },
  21992. "ConflictError": {
  21993. "type": "object",
  21994. "properties": {
  21995. "_tag": {
  21996. "type": "string",
  21997. "enum": ["ConflictError"]
  21998. },
  21999. "message": {
  22000. "type": "string"
  22001. },
  22002. "resource": {
  22003. "type": "string"
  22004. }
  22005. },
  22006. "required": ["_tag", "message"],
  22007. "additionalProperties": false
  22008. },
  22009. "ServiceUnavailableError": {
  22010. "type": "object",
  22011. "properties": {
  22012. "_tag": {
  22013. "type": "string",
  22014. "enum": ["ServiceUnavailableError"]
  22015. },
  22016. "message": {
  22017. "type": "string"
  22018. },
  22019. "service": {
  22020. "type": "string"
  22021. }
  22022. },
  22023. "required": ["_tag", "message"],
  22024. "additionalProperties": false
  22025. },
  22026. "UnknownError1": {
  22027. "type": "object",
  22028. "properties": {
  22029. "_tag": {
  22030. "type": "string",
  22031. "enum": ["UnknownError"]
  22032. },
  22033. "message": {
  22034. "type": "string"
  22035. },
  22036. "ref": {
  22037. "type": "string"
  22038. }
  22039. },
  22040. "required": ["_tag", "message"],
  22041. "additionalProperties": false
  22042. },
  22043. "SessionMessagesResponse": {
  22044. "type": "object",
  22045. "properties": {
  22046. "data": {
  22047. "type": "array",
  22048. "items": {
  22049. "$ref": "#/components/schemas/SessionMessage"
  22050. }
  22051. },
  22052. "cursor": {
  22053. "type": "object",
  22054. "properties": {
  22055. "previous": {
  22056. "type": "string"
  22057. },
  22058. "next": {
  22059. "type": "string"
  22060. }
  22061. },
  22062. "additionalProperties": false
  22063. }
  22064. },
  22065. "required": ["data", "cursor"],
  22066. "additionalProperties": false
  22067. },
  22068. "ProviderNotFoundError": {
  22069. "type": "object",
  22070. "properties": {
  22071. "_tag": {
  22072. "type": "string",
  22073. "enum": ["ProviderNotFoundError"]
  22074. },
  22075. "providerID": {
  22076. "type": "string"
  22077. },
  22078. "message": {
  22079. "type": "string"
  22080. }
  22081. },
  22082. "required": ["_tag", "providerID", "message"],
  22083. "additionalProperties": false
  22084. },
  22085. "ProjectCopyError": {
  22086. "type": "object",
  22087. "properties": {
  22088. "name": {
  22089. "type": "string",
  22090. "enum": ["ProjectCopyError"]
  22091. },
  22092. "data": {
  22093. "type": "object",
  22094. "properties": {
  22095. "message": {
  22096. "type": "string"
  22097. },
  22098. "forceRequired": {
  22099. "type": "boolean"
  22100. }
  22101. },
  22102. "required": ["message"],
  22103. "additionalProperties": false
  22104. }
  22105. },
  22106. "required": ["name", "data"],
  22107. "additionalProperties": false
  22108. },
  22109. "effect_HttpApiError_Forbidden": {
  22110. "type": "object",
  22111. "properties": {
  22112. "_tag": {
  22113. "type": "string",
  22114. "enum": ["Forbidden"]
  22115. }
  22116. },
  22117. "required": ["_tag"],
  22118. "additionalProperties": false
  22119. },
  22120. "Event.tui.prompt.append": {
  22121. "type": "object",
  22122. "properties": {
  22123. "id": {
  22124. "type": "string",
  22125. "pattern": "^evt_"
  22126. },
  22127. "type": {
  22128. "type": "string",
  22129. "enum": ["tui.prompt.append"]
  22130. },
  22131. "properties": {
  22132. "type": "object",
  22133. "properties": {
  22134. "text": {
  22135. "type": "string"
  22136. }
  22137. },
  22138. "required": ["text"],
  22139. "additionalProperties": false
  22140. }
  22141. },
  22142. "required": ["id", "type", "properties"],
  22143. "additionalProperties": false
  22144. },
  22145. "Event.tui.command.execute": {
  22146. "type": "object",
  22147. "properties": {
  22148. "id": {
  22149. "type": "string",
  22150. "pattern": "^evt_"
  22151. },
  22152. "type": {
  22153. "type": "string",
  22154. "enum": ["tui.command.execute"]
  22155. },
  22156. "properties": {
  22157. "type": "object",
  22158. "properties": {
  22159. "command": {
  22160. "anyOf": [
  22161. {
  22162. "type": "string",
  22163. "enum": [
  22164. "session.list",
  22165. "session.new",
  22166. "session.share",
  22167. "session.interrupt",
  22168. "session.compact",
  22169. "session.page.up",
  22170. "session.page.down",
  22171. "session.line.up",
  22172. "session.line.down",
  22173. "session.half.page.up",
  22174. "session.half.page.down",
  22175. "session.first",
  22176. "session.last",
  22177. "prompt.clear",
  22178. "prompt.submit",
  22179. "agent.cycle"
  22180. ]
  22181. },
  22182. {
  22183. "type": "string"
  22184. }
  22185. ]
  22186. }
  22187. },
  22188. "required": ["command"],
  22189. "additionalProperties": false
  22190. }
  22191. },
  22192. "required": ["id", "type", "properties"],
  22193. "additionalProperties": false
  22194. },
  22195. "Event.tui.toast.show": {
  22196. "type": "object",
  22197. "properties": {
  22198. "id": {
  22199. "type": "string",
  22200. "pattern": "^evt_"
  22201. },
  22202. "type": {
  22203. "type": "string",
  22204. "enum": ["tui.toast.show"]
  22205. },
  22206. "properties": {
  22207. "type": "object",
  22208. "properties": {
  22209. "title": {
  22210. "type": "string"
  22211. },
  22212. "message": {
  22213. "type": "string"
  22214. },
  22215. "variant": {
  22216. "type": "string",
  22217. "enum": ["info", "success", "warning", "error"]
  22218. },
  22219. "duration": {
  22220. "type": "integer",
  22221. "exclusiveMinimum": 0
  22222. }
  22223. },
  22224. "required": ["message", "variant"],
  22225. "additionalProperties": false
  22226. }
  22227. },
  22228. "required": ["id", "type", "properties"],
  22229. "additionalProperties": false
  22230. },
  22231. "Event.tui.session.select": {
  22232. "type": "object",
  22233. "properties": {
  22234. "id": {
  22235. "type": "string",
  22236. "pattern": "^evt_"
  22237. },
  22238. "type": {
  22239. "type": "string",
  22240. "enum": ["tui.session.select"]
  22241. },
  22242. "properties": {
  22243. "type": "object",
  22244. "properties": {
  22245. "sessionID": {
  22246. "type": "string",
  22247. "pattern": "^ses",
  22248. "description": "Session ID to navigate to"
  22249. }
  22250. },
  22251. "required": ["sessionID"],
  22252. "additionalProperties": false
  22253. }
  22254. },
  22255. "required": ["id", "type", "properties"],
  22256. "additionalProperties": false
  22257. },
  22258. "MoveSessionDestination": {
  22259. "type": "object",
  22260. "properties": {
  22261. "directory": {
  22262. "type": "string"
  22263. }
  22264. },
  22265. "required": ["directory"],
  22266. "additionalProperties": false
  22267. },
  22268. "ModelV2Info": {
  22269. "type": "object",
  22270. "properties": {
  22271. "id": {
  22272. "type": "string"
  22273. },
  22274. "providerID": {
  22275. "type": "string"
  22276. },
  22277. "family": {
  22278. "type": "string"
  22279. },
  22280. "name": {
  22281. "type": "string"
  22282. },
  22283. "api": {
  22284. "anyOf": [
  22285. {
  22286. "type": "object",
  22287. "properties": {
  22288. "id": {
  22289. "type": "string"
  22290. },
  22291. "type": {
  22292. "type": "string",
  22293. "enum": ["aisdk"]
  22294. },
  22295. "package": {
  22296. "type": "string"
  22297. },
  22298. "url": {
  22299. "type": "string"
  22300. },
  22301. "settings": {
  22302. "type": "object"
  22303. }
  22304. },
  22305. "required": ["id", "type", "package"],
  22306. "additionalProperties": false
  22307. },
  22308. {
  22309. "type": "object",
  22310. "properties": {
  22311. "id": {
  22312. "type": "string"
  22313. },
  22314. "type": {
  22315. "type": "string",
  22316. "enum": ["native"]
  22317. },
  22318. "url": {
  22319. "type": "string"
  22320. },
  22321. "settings": {
  22322. "type": "object"
  22323. }
  22324. },
  22325. "required": ["id", "type", "settings"],
  22326. "additionalProperties": false
  22327. }
  22328. ]
  22329. },
  22330. "capabilities": {
  22331. "type": "object",
  22332. "properties": {
  22333. "tools": {
  22334. "type": "boolean"
  22335. },
  22336. "input": {
  22337. "type": "array",
  22338. "items": {
  22339. "type": "string"
  22340. }
  22341. },
  22342. "output": {
  22343. "type": "array",
  22344. "items": {
  22345. "type": "string"
  22346. }
  22347. }
  22348. },
  22349. "required": ["tools", "input", "output"],
  22350. "additionalProperties": false
  22351. },
  22352. "request": {
  22353. "type": "object",
  22354. "properties": {
  22355. "headers": {
  22356. "type": "object",
  22357. "additionalProperties": {
  22358. "type": "string"
  22359. }
  22360. },
  22361. "body": {
  22362. "type": "object"
  22363. },
  22364. "generation": {
  22365. "type": "object",
  22366. "properties": {
  22367. "maxTokens": {
  22368. "anyOf": [
  22369. {
  22370. "type": "number"
  22371. },
  22372. {
  22373. "type": "string",
  22374. "enum": ["NaN"]
  22375. },
  22376. {
  22377. "type": "string",
  22378. "enum": ["Infinity"]
  22379. },
  22380. {
  22381. "type": "string",
  22382. "enum": ["-Infinity"]
  22383. },
  22384. {
  22385. "type": "string",
  22386. "enum": ["Infinity", "-Infinity", "NaN"]
  22387. }
  22388. ]
  22389. },
  22390. "temperature": {
  22391. "anyOf": [
  22392. {
  22393. "type": "number"
  22394. },
  22395. {
  22396. "type": "string",
  22397. "enum": ["NaN"]
  22398. },
  22399. {
  22400. "type": "string",
  22401. "enum": ["Infinity"]
  22402. },
  22403. {
  22404. "type": "string",
  22405. "enum": ["-Infinity"]
  22406. },
  22407. {
  22408. "type": "string",
  22409. "enum": ["Infinity", "-Infinity", "NaN"]
  22410. }
  22411. ]
  22412. },
  22413. "topP": {
  22414. "anyOf": [
  22415. {
  22416. "type": "number"
  22417. },
  22418. {
  22419. "type": "string",
  22420. "enum": ["NaN"]
  22421. },
  22422. {
  22423. "type": "string",
  22424. "enum": ["Infinity"]
  22425. },
  22426. {
  22427. "type": "string",
  22428. "enum": ["-Infinity"]
  22429. },
  22430. {
  22431. "type": "string",
  22432. "enum": ["Infinity", "-Infinity", "NaN"]
  22433. }
  22434. ]
  22435. },
  22436. "topK": {
  22437. "anyOf": [
  22438. {
  22439. "type": "number"
  22440. },
  22441. {
  22442. "type": "string",
  22443. "enum": ["NaN"]
  22444. },
  22445. {
  22446. "type": "string",
  22447. "enum": ["Infinity"]
  22448. },
  22449. {
  22450. "type": "string",
  22451. "enum": ["-Infinity"]
  22452. },
  22453. {
  22454. "type": "string",
  22455. "enum": ["Infinity", "-Infinity", "NaN"]
  22456. }
  22457. ]
  22458. },
  22459. "frequencyPenalty": {
  22460. "anyOf": [
  22461. {
  22462. "type": "number"
  22463. },
  22464. {
  22465. "type": "string",
  22466. "enum": ["NaN"]
  22467. },
  22468. {
  22469. "type": "string",
  22470. "enum": ["Infinity"]
  22471. },
  22472. {
  22473. "type": "string",
  22474. "enum": ["-Infinity"]
  22475. },
  22476. {
  22477. "type": "string",
  22478. "enum": ["Infinity", "-Infinity", "NaN"]
  22479. }
  22480. ]
  22481. },
  22482. "presencePenalty": {
  22483. "anyOf": [
  22484. {
  22485. "type": "number"
  22486. },
  22487. {
  22488. "type": "string",
  22489. "enum": ["NaN"]
  22490. },
  22491. {
  22492. "type": "string",
  22493. "enum": ["Infinity"]
  22494. },
  22495. {
  22496. "type": "string",
  22497. "enum": ["-Infinity"]
  22498. },
  22499. {
  22500. "type": "string",
  22501. "enum": ["Infinity", "-Infinity", "NaN"]
  22502. }
  22503. ]
  22504. },
  22505. "seed": {
  22506. "anyOf": [
  22507. {
  22508. "type": "number"
  22509. },
  22510. {
  22511. "type": "string",
  22512. "enum": ["NaN"]
  22513. },
  22514. {
  22515. "type": "string",
  22516. "enum": ["Infinity"]
  22517. },
  22518. {
  22519. "type": "string",
  22520. "enum": ["-Infinity"]
  22521. },
  22522. {
  22523. "type": "string",
  22524. "enum": ["Infinity", "-Infinity", "NaN"]
  22525. }
  22526. ]
  22527. },
  22528. "stop": {
  22529. "type": "array",
  22530. "items": {
  22531. "type": "string"
  22532. }
  22533. }
  22534. },
  22535. "additionalProperties": false
  22536. },
  22537. "options": {
  22538. "type": "object"
  22539. },
  22540. "variant": {
  22541. "type": "string"
  22542. }
  22543. },
  22544. "required": ["headers", "body"],
  22545. "additionalProperties": false
  22546. },
  22547. "variants": {
  22548. "type": "array",
  22549. "items": {
  22550. "type": "object",
  22551. "properties": {
  22552. "id": {
  22553. "type": "string"
  22554. },
  22555. "headers": {
  22556. "type": "object",
  22557. "additionalProperties": {
  22558. "type": "string"
  22559. }
  22560. },
  22561. "body": {
  22562. "type": "object"
  22563. },
  22564. "generation": {
  22565. "type": "object",
  22566. "properties": {
  22567. "maxTokens": {
  22568. "anyOf": [
  22569. {
  22570. "type": "number"
  22571. },
  22572. {
  22573. "type": "string",
  22574. "enum": ["NaN"]
  22575. },
  22576. {
  22577. "type": "string",
  22578. "enum": ["Infinity"]
  22579. },
  22580. {
  22581. "type": "string",
  22582. "enum": ["-Infinity"]
  22583. },
  22584. {
  22585. "type": "string",
  22586. "enum": ["Infinity", "-Infinity", "NaN"]
  22587. }
  22588. ]
  22589. },
  22590. "temperature": {
  22591. "anyOf": [
  22592. {
  22593. "type": "number"
  22594. },
  22595. {
  22596. "type": "string",
  22597. "enum": ["NaN"]
  22598. },
  22599. {
  22600. "type": "string",
  22601. "enum": ["Infinity"]
  22602. },
  22603. {
  22604. "type": "string",
  22605. "enum": ["-Infinity"]
  22606. },
  22607. {
  22608. "type": "string",
  22609. "enum": ["Infinity", "-Infinity", "NaN"]
  22610. }
  22611. ]
  22612. },
  22613. "topP": {
  22614. "anyOf": [
  22615. {
  22616. "type": "number"
  22617. },
  22618. {
  22619. "type": "string",
  22620. "enum": ["NaN"]
  22621. },
  22622. {
  22623. "type": "string",
  22624. "enum": ["Infinity"]
  22625. },
  22626. {
  22627. "type": "string",
  22628. "enum": ["-Infinity"]
  22629. },
  22630. {
  22631. "type": "string",
  22632. "enum": ["Infinity", "-Infinity", "NaN"]
  22633. }
  22634. ]
  22635. },
  22636. "topK": {
  22637. "anyOf": [
  22638. {
  22639. "type": "number"
  22640. },
  22641. {
  22642. "type": "string",
  22643. "enum": ["NaN"]
  22644. },
  22645. {
  22646. "type": "string",
  22647. "enum": ["Infinity"]
  22648. },
  22649. {
  22650. "type": "string",
  22651. "enum": ["-Infinity"]
  22652. },
  22653. {
  22654. "type": "string",
  22655. "enum": ["Infinity", "-Infinity", "NaN"]
  22656. }
  22657. ]
  22658. },
  22659. "frequencyPenalty": {
  22660. "anyOf": [
  22661. {
  22662. "type": "number"
  22663. },
  22664. {
  22665. "type": "string",
  22666. "enum": ["NaN"]
  22667. },
  22668. {
  22669. "type": "string",
  22670. "enum": ["Infinity"]
  22671. },
  22672. {
  22673. "type": "string",
  22674. "enum": ["-Infinity"]
  22675. },
  22676. {
  22677. "type": "string",
  22678. "enum": ["Infinity", "-Infinity", "NaN"]
  22679. }
  22680. ]
  22681. },
  22682. "presencePenalty": {
  22683. "anyOf": [
  22684. {
  22685. "type": "number"
  22686. },
  22687. {
  22688. "type": "string",
  22689. "enum": ["NaN"]
  22690. },
  22691. {
  22692. "type": "string",
  22693. "enum": ["Infinity"]
  22694. },
  22695. {
  22696. "type": "string",
  22697. "enum": ["-Infinity"]
  22698. },
  22699. {
  22700. "type": "string",
  22701. "enum": ["Infinity", "-Infinity", "NaN"]
  22702. }
  22703. ]
  22704. },
  22705. "seed": {
  22706. "anyOf": [
  22707. {
  22708. "type": "number"
  22709. },
  22710. {
  22711. "type": "string",
  22712. "enum": ["NaN"]
  22713. },
  22714. {
  22715. "type": "string",
  22716. "enum": ["Infinity"]
  22717. },
  22718. {
  22719. "type": "string",
  22720. "enum": ["-Infinity"]
  22721. },
  22722. {
  22723. "type": "string",
  22724. "enum": ["Infinity", "-Infinity", "NaN"]
  22725. }
  22726. ]
  22727. },
  22728. "stop": {
  22729. "type": "array",
  22730. "items": {
  22731. "type": "string"
  22732. }
  22733. }
  22734. },
  22735. "additionalProperties": false
  22736. },
  22737. "options": {
  22738. "type": "object"
  22739. }
  22740. },
  22741. "required": ["id", "headers", "body"],
  22742. "additionalProperties": false
  22743. }
  22744. },
  22745. "time": {
  22746. "type": "object",
  22747. "properties": {
  22748. "released": {
  22749. "anyOf": [
  22750. {
  22751. "type": "number"
  22752. },
  22753. {
  22754. "type": "string",
  22755. "enum": ["NaN"]
  22756. },
  22757. {
  22758. "type": "string",
  22759. "enum": ["Infinity"]
  22760. },
  22761. {
  22762. "type": "string",
  22763. "enum": ["-Infinity"]
  22764. },
  22765. {
  22766. "type": "string",
  22767. "enum": ["Infinity", "-Infinity", "NaN"]
  22768. }
  22769. ]
  22770. }
  22771. },
  22772. "required": ["released"],
  22773. "additionalProperties": false
  22774. },
  22775. "cost": {
  22776. "type": "array",
  22777. "items": {
  22778. "type": "object",
  22779. "properties": {
  22780. "tier": {
  22781. "type": "object",
  22782. "properties": {
  22783. "type": {
  22784. "type": "string",
  22785. "enum": ["context"]
  22786. },
  22787. "size": {
  22788. "type": "integer"
  22789. }
  22790. },
  22791. "required": ["type", "size"],
  22792. "additionalProperties": false
  22793. },
  22794. "input": {
  22795. "type": "number"
  22796. },
  22797. "output": {
  22798. "type": "number"
  22799. },
  22800. "cache": {
  22801. "type": "object",
  22802. "properties": {
  22803. "read": {
  22804. "type": "number"
  22805. },
  22806. "write": {
  22807. "type": "number"
  22808. }
  22809. },
  22810. "required": ["read", "write"],
  22811. "additionalProperties": false
  22812. }
  22813. },
  22814. "required": ["input", "output", "cache"],
  22815. "additionalProperties": false
  22816. }
  22817. },
  22818. "status": {
  22819. "type": "string",
  22820. "enum": ["alpha", "beta", "deprecated", "active"]
  22821. },
  22822. "enabled": {
  22823. "type": "boolean"
  22824. },
  22825. "limit": {
  22826. "type": "object",
  22827. "properties": {
  22828. "context": {
  22829. "type": "integer"
  22830. },
  22831. "input": {
  22832. "type": "integer"
  22833. },
  22834. "output": {
  22835. "type": "integer"
  22836. }
  22837. },
  22838. "required": ["context", "output"],
  22839. "additionalProperties": false
  22840. }
  22841. },
  22842. "required": [
  22843. "id",
  22844. "providerID",
  22845. "name",
  22846. "api",
  22847. "capabilities",
  22848. "request",
  22849. "variants",
  22850. "time",
  22851. "cost",
  22852. "status",
  22853. "enabled",
  22854. "limit"
  22855. ],
  22856. "additionalProperties": false
  22857. },
  22858. "LocationRef": {
  22859. "type": "object",
  22860. "properties": {
  22861. "directory": {
  22862. "type": "string"
  22863. },
  22864. "workspaceID": {
  22865. "type": "string",
  22866. "pattern": "^wrk"
  22867. }
  22868. },
  22869. "required": ["directory"],
  22870. "additionalProperties": false
  22871. },
  22872. "PromptSource": {
  22873. "type": "object",
  22874. "properties": {
  22875. "start": {
  22876. "type": "number"
  22877. },
  22878. "end": {
  22879. "type": "number"
  22880. },
  22881. "text": {
  22882. "type": "string"
  22883. }
  22884. },
  22885. "required": ["start", "end", "text"],
  22886. "additionalProperties": false
  22887. },
  22888. "PromptFileAttachment": {
  22889. "type": "object",
  22890. "properties": {
  22891. "uri": {
  22892. "type": "string"
  22893. },
  22894. "mime": {
  22895. "type": "string"
  22896. },
  22897. "name": {
  22898. "type": "string"
  22899. },
  22900. "description": {
  22901. "type": "string"
  22902. },
  22903. "source": {
  22904. "$ref": "#/components/schemas/PromptSource"
  22905. }
  22906. },
  22907. "required": ["uri", "mime"],
  22908. "additionalProperties": false
  22909. },
  22910. "PromptAgentAttachment": {
  22911. "type": "object",
  22912. "properties": {
  22913. "name": {
  22914. "type": "string"
  22915. },
  22916. "source": {
  22917. "$ref": "#/components/schemas/PromptSource"
  22918. }
  22919. },
  22920. "required": ["name"],
  22921. "additionalProperties": false
  22922. },
  22923. "SessionErrorUnknown": {
  22924. "type": "object",
  22925. "properties": {
  22926. "type": {
  22927. "type": "string",
  22928. "enum": ["unknown"]
  22929. },
  22930. "message": {
  22931. "type": "string"
  22932. }
  22933. },
  22934. "required": ["type", "message"],
  22935. "additionalProperties": false
  22936. },
  22937. "ToolTextContent": {
  22938. "type": "object",
  22939. "properties": {
  22940. "type": {
  22941. "type": "string",
  22942. "enum": ["text"]
  22943. },
  22944. "text": {
  22945. "type": "string"
  22946. }
  22947. },
  22948. "required": ["type", "text"],
  22949. "additionalProperties": false
  22950. },
  22951. "ToolFileContent": {
  22952. "type": "object",
  22953. "properties": {
  22954. "type": {
  22955. "type": "string",
  22956. "enum": ["file"]
  22957. },
  22958. "uri": {
  22959. "type": "string"
  22960. },
  22961. "mime": {
  22962. "type": "string"
  22963. },
  22964. "name": {
  22965. "type": "string"
  22966. }
  22967. },
  22968. "required": ["type", "uri", "mime"],
  22969. "additionalProperties": false
  22970. },
  22971. "SessionNextRetry_error": {
  22972. "type": "object",
  22973. "properties": {
  22974. "message": {
  22975. "type": "string"
  22976. },
  22977. "statusCode": {
  22978. "type": "number"
  22979. },
  22980. "isRetryable": {
  22981. "type": "boolean"
  22982. },
  22983. "responseHeaders": {
  22984. "type": "object",
  22985. "additionalProperties": {
  22986. "type": "string"
  22987. }
  22988. },
  22989. "responseBody": {
  22990. "type": "string"
  22991. },
  22992. "metadata": {
  22993. "type": "object",
  22994. "additionalProperties": {
  22995. "type": "string"
  22996. }
  22997. }
  22998. },
  22999. "required": ["message", "isRetryable"],
  23000. "additionalProperties": false
  23001. },
  23002. "PermissionV2Source": {
  23003. "type": "object",
  23004. "properties": {
  23005. "type": {
  23006. "type": "string",
  23007. "enum": ["tool"]
  23008. },
  23009. "messageID": {
  23010. "type": "string"
  23011. },
  23012. "callID": {
  23013. "type": "string"
  23014. }
  23015. },
  23016. "required": ["type", "messageID", "callID"],
  23017. "additionalProperties": false
  23018. },
  23019. "PermissionV2Reply": {
  23020. "type": "string",
  23021. "enum": ["once", "always", "reject"]
  23022. },
  23023. "QuestionV2Option": {
  23024. "type": "object",
  23025. "properties": {
  23026. "label": {
  23027. "type": "string",
  23028. "description": "Display text (1-5 words, concise)"
  23029. },
  23030. "description": {
  23031. "type": "string",
  23032. "description": "Explanation of choice"
  23033. }
  23034. },
  23035. "required": ["label", "description"],
  23036. "additionalProperties": false
  23037. },
  23038. "QuestionV2Info": {
  23039. "type": "object",
  23040. "properties": {
  23041. "question": {
  23042. "type": "string",
  23043. "description": "Complete question"
  23044. },
  23045. "header": {
  23046. "type": "string",
  23047. "description": "Very short label (max 30 chars)"
  23048. },
  23049. "options": {
  23050. "type": "array",
  23051. "items": {
  23052. "$ref": "#/components/schemas/QuestionV2Option"
  23053. },
  23054. "description": "Available choices"
  23055. },
  23056. "multiple": {
  23057. "type": "boolean"
  23058. },
  23059. "custom": {
  23060. "type": "boolean"
  23061. }
  23062. },
  23063. "required": ["question", "header", "options"],
  23064. "additionalProperties": false
  23065. },
  23066. "QuestionV2Tool": {
  23067. "type": "object",
  23068. "properties": {
  23069. "messageID": {
  23070. "type": "string"
  23071. },
  23072. "callID": {
  23073. "type": "string"
  23074. }
  23075. },
  23076. "required": ["messageID", "callID"],
  23077. "additionalProperties": false
  23078. },
  23079. "QuestionV2Answer": {
  23080. "type": "array",
  23081. "items": {
  23082. "type": "string"
  23083. }
  23084. },
  23085. "EventServerInstanceDisposed": {
  23086. "type": "object",
  23087. "properties": {
  23088. "id": {
  23089. "type": "string"
  23090. },
  23091. "type": {
  23092. "type": "string",
  23093. "enum": ["server.instance.disposed"]
  23094. },
  23095. "properties": {
  23096. "type": "object",
  23097. "properties": {
  23098. "directory": {
  23099. "type": "string"
  23100. }
  23101. },
  23102. "required": ["directory"],
  23103. "additionalProperties": false
  23104. }
  23105. },
  23106. "required": ["id", "type", "properties"],
  23107. "additionalProperties": false
  23108. },
  23109. "SyncEventSessionCreated": {
  23110. "type": "object",
  23111. "properties": {
  23112. "type": {
  23113. "type": "string",
  23114. "enum": ["sync"]
  23115. },
  23116. "id": {
  23117. "type": "string",
  23118. "pattern": "^evt_"
  23119. },
  23120. "syncEvent": {
  23121. "type": "object",
  23122. "properties": {
  23123. "type": {
  23124. "type": "string",
  23125. "enum": ["session.created.1"]
  23126. },
  23127. "id": {
  23128. "type": "string",
  23129. "pattern": "^evt_"
  23130. },
  23131. "seq": {
  23132. "type": "number"
  23133. },
  23134. "aggregateID": {
  23135. "type": "string"
  23136. },
  23137. "data": {
  23138. "type": "object",
  23139. "properties": {
  23140. "sessionID": {
  23141. "type": "string",
  23142. "pattern": "^ses"
  23143. },
  23144. "info": {
  23145. "$ref": "#/components/schemas/Session"
  23146. }
  23147. },
  23148. "required": ["sessionID", "info"],
  23149. "additionalProperties": false
  23150. }
  23151. },
  23152. "required": ["type", "id", "seq", "aggregateID", "data"],
  23153. "additionalProperties": false
  23154. }
  23155. },
  23156. "required": ["type", "id", "syncEvent"],
  23157. "additionalProperties": false
  23158. },
  23159. "SyncEventSessionUpdated": {
  23160. "type": "object",
  23161. "properties": {
  23162. "type": {
  23163. "type": "string",
  23164. "enum": ["sync"]
  23165. },
  23166. "id": {
  23167. "type": "string",
  23168. "pattern": "^evt_"
  23169. },
  23170. "syncEvent": {
  23171. "type": "object",
  23172. "properties": {
  23173. "type": {
  23174. "type": "string",
  23175. "enum": ["session.updated.1"]
  23176. },
  23177. "id": {
  23178. "type": "string",
  23179. "pattern": "^evt_"
  23180. },
  23181. "seq": {
  23182. "type": "number"
  23183. },
  23184. "aggregateID": {
  23185. "type": "string"
  23186. },
  23187. "data": {
  23188. "type": "object",
  23189. "properties": {
  23190. "sessionID": {
  23191. "type": "string",
  23192. "pattern": "^ses"
  23193. },
  23194. "info": {
  23195. "$ref": "#/components/schemas/Session"
  23196. }
  23197. },
  23198. "required": ["sessionID", "info"],
  23199. "additionalProperties": false
  23200. }
  23201. },
  23202. "required": ["type", "id", "seq", "aggregateID", "data"],
  23203. "additionalProperties": false
  23204. }
  23205. },
  23206. "required": ["type", "id", "syncEvent"],
  23207. "additionalProperties": false
  23208. },
  23209. "SyncEventSessionDeleted": {
  23210. "type": "object",
  23211. "properties": {
  23212. "type": {
  23213. "type": "string",
  23214. "enum": ["sync"]
  23215. },
  23216. "id": {
  23217. "type": "string",
  23218. "pattern": "^evt_"
  23219. },
  23220. "syncEvent": {
  23221. "type": "object",
  23222. "properties": {
  23223. "type": {
  23224. "type": "string",
  23225. "enum": ["session.deleted.1"]
  23226. },
  23227. "id": {
  23228. "type": "string",
  23229. "pattern": "^evt_"
  23230. },
  23231. "seq": {
  23232. "type": "number"
  23233. },
  23234. "aggregateID": {
  23235. "type": "string"
  23236. },
  23237. "data": {
  23238. "type": "object",
  23239. "properties": {
  23240. "sessionID": {
  23241. "type": "string",
  23242. "pattern": "^ses"
  23243. },
  23244. "info": {
  23245. "$ref": "#/components/schemas/Session"
  23246. }
  23247. },
  23248. "required": ["sessionID", "info"],
  23249. "additionalProperties": false
  23250. }
  23251. },
  23252. "required": ["type", "id", "seq", "aggregateID", "data"],
  23253. "additionalProperties": false
  23254. }
  23255. },
  23256. "required": ["type", "id", "syncEvent"],
  23257. "additionalProperties": false
  23258. },
  23259. "SyncEventMessageUpdated": {
  23260. "type": "object",
  23261. "properties": {
  23262. "type": {
  23263. "type": "string",
  23264. "enum": ["sync"]
  23265. },
  23266. "id": {
  23267. "type": "string",
  23268. "pattern": "^evt_"
  23269. },
  23270. "syncEvent": {
  23271. "type": "object",
  23272. "properties": {
  23273. "type": {
  23274. "type": "string",
  23275. "enum": ["message.updated.1"]
  23276. },
  23277. "id": {
  23278. "type": "string",
  23279. "pattern": "^evt_"
  23280. },
  23281. "seq": {
  23282. "type": "number"
  23283. },
  23284. "aggregateID": {
  23285. "type": "string"
  23286. },
  23287. "data": {
  23288. "type": "object",
  23289. "properties": {
  23290. "sessionID": {
  23291. "type": "string",
  23292. "pattern": "^ses"
  23293. },
  23294. "info": {
  23295. "$ref": "#/components/schemas/Message"
  23296. }
  23297. },
  23298. "required": ["sessionID", "info"],
  23299. "additionalProperties": false
  23300. }
  23301. },
  23302. "required": ["type", "id", "seq", "aggregateID", "data"],
  23303. "additionalProperties": false
  23304. }
  23305. },
  23306. "required": ["type", "id", "syncEvent"],
  23307. "additionalProperties": false
  23308. },
  23309. "SyncEventMessageRemoved": {
  23310. "type": "object",
  23311. "properties": {
  23312. "type": {
  23313. "type": "string",
  23314. "enum": ["sync"]
  23315. },
  23316. "id": {
  23317. "type": "string",
  23318. "pattern": "^evt_"
  23319. },
  23320. "syncEvent": {
  23321. "type": "object",
  23322. "properties": {
  23323. "type": {
  23324. "type": "string",
  23325. "enum": ["message.removed.1"]
  23326. },
  23327. "id": {
  23328. "type": "string",
  23329. "pattern": "^evt_"
  23330. },
  23331. "seq": {
  23332. "type": "number"
  23333. },
  23334. "aggregateID": {
  23335. "type": "string"
  23336. },
  23337. "data": {
  23338. "type": "object",
  23339. "properties": {
  23340. "sessionID": {
  23341. "type": "string",
  23342. "pattern": "^ses"
  23343. },
  23344. "messageID": {
  23345. "type": "string",
  23346. "pattern": "^msg"
  23347. }
  23348. },
  23349. "required": ["sessionID", "messageID"],
  23350. "additionalProperties": false
  23351. }
  23352. },
  23353. "required": ["type", "id", "seq", "aggregateID", "data"],
  23354. "additionalProperties": false
  23355. }
  23356. },
  23357. "required": ["type", "id", "syncEvent"],
  23358. "additionalProperties": false
  23359. },
  23360. "SyncEventMessagePartUpdated": {
  23361. "type": "object",
  23362. "properties": {
  23363. "type": {
  23364. "type": "string",
  23365. "enum": ["sync"]
  23366. },
  23367. "id": {
  23368. "type": "string",
  23369. "pattern": "^evt_"
  23370. },
  23371. "syncEvent": {
  23372. "type": "object",
  23373. "properties": {
  23374. "type": {
  23375. "type": "string",
  23376. "enum": ["message.part.updated.1"]
  23377. },
  23378. "id": {
  23379. "type": "string",
  23380. "pattern": "^evt_"
  23381. },
  23382. "seq": {
  23383. "type": "number"
  23384. },
  23385. "aggregateID": {
  23386. "type": "string"
  23387. },
  23388. "data": {
  23389. "type": "object",
  23390. "properties": {
  23391. "sessionID": {
  23392. "type": "string",
  23393. "pattern": "^ses"
  23394. },
  23395. "part": {
  23396. "$ref": "#/components/schemas/Part"
  23397. },
  23398. "time": {
  23399. "type": "number"
  23400. }
  23401. },
  23402. "required": ["sessionID", "part", "time"],
  23403. "additionalProperties": false
  23404. }
  23405. },
  23406. "required": ["type", "id", "seq", "aggregateID", "data"],
  23407. "additionalProperties": false
  23408. }
  23409. },
  23410. "required": ["type", "id", "syncEvent"],
  23411. "additionalProperties": false
  23412. },
  23413. "SyncEventMessagePartRemoved": {
  23414. "type": "object",
  23415. "properties": {
  23416. "type": {
  23417. "type": "string",
  23418. "enum": ["sync"]
  23419. },
  23420. "id": {
  23421. "type": "string",
  23422. "pattern": "^evt_"
  23423. },
  23424. "syncEvent": {
  23425. "type": "object",
  23426. "properties": {
  23427. "type": {
  23428. "type": "string",
  23429. "enum": ["message.part.removed.1"]
  23430. },
  23431. "id": {
  23432. "type": "string",
  23433. "pattern": "^evt_"
  23434. },
  23435. "seq": {
  23436. "type": "number"
  23437. },
  23438. "aggregateID": {
  23439. "type": "string"
  23440. },
  23441. "data": {
  23442. "type": "object",
  23443. "properties": {
  23444. "sessionID": {
  23445. "type": "string",
  23446. "pattern": "^ses"
  23447. },
  23448. "messageID": {
  23449. "type": "string",
  23450. "pattern": "^msg"
  23451. },
  23452. "partID": {
  23453. "type": "string",
  23454. "pattern": "^prt"
  23455. }
  23456. },
  23457. "required": ["sessionID", "messageID", "partID"],
  23458. "additionalProperties": false
  23459. }
  23460. },
  23461. "required": ["type", "id", "seq", "aggregateID", "data"],
  23462. "additionalProperties": false
  23463. }
  23464. },
  23465. "required": ["type", "id", "syncEvent"],
  23466. "additionalProperties": false
  23467. },
  23468. "SyncEventSessionNextAgentSwitched": {
  23469. "type": "object",
  23470. "properties": {
  23471. "type": {
  23472. "type": "string",
  23473. "enum": ["sync"]
  23474. },
  23475. "id": {
  23476. "type": "string",
  23477. "pattern": "^evt_"
  23478. },
  23479. "syncEvent": {
  23480. "type": "object",
  23481. "properties": {
  23482. "type": {
  23483. "type": "string",
  23484. "enum": ["session.next.agent.switched.1"]
  23485. },
  23486. "id": {
  23487. "type": "string",
  23488. "pattern": "^evt_"
  23489. },
  23490. "seq": {
  23491. "type": "number"
  23492. },
  23493. "aggregateID": {
  23494. "type": "string"
  23495. },
  23496. "data": {
  23497. "type": "object",
  23498. "properties": {
  23499. "timestamp": {
  23500. "type": "number"
  23501. },
  23502. "sessionID": {
  23503. "type": "string",
  23504. "pattern": "^ses"
  23505. },
  23506. "messageID": {
  23507. "type": "string",
  23508. "pattern": "^msg_"
  23509. },
  23510. "agent": {
  23511. "type": "string"
  23512. }
  23513. },
  23514. "required": ["timestamp", "sessionID", "messageID", "agent"],
  23515. "additionalProperties": false
  23516. }
  23517. },
  23518. "required": ["type", "id", "seq", "aggregateID", "data"],
  23519. "additionalProperties": false
  23520. }
  23521. },
  23522. "required": ["type", "id", "syncEvent"],
  23523. "additionalProperties": false
  23524. },
  23525. "SyncEventSessionNextModelSwitched": {
  23526. "type": "object",
  23527. "properties": {
  23528. "type": {
  23529. "type": "string",
  23530. "enum": ["sync"]
  23531. },
  23532. "id": {
  23533. "type": "string",
  23534. "pattern": "^evt_"
  23535. },
  23536. "syncEvent": {
  23537. "type": "object",
  23538. "properties": {
  23539. "type": {
  23540. "type": "string",
  23541. "enum": ["session.next.model.switched.1"]
  23542. },
  23543. "id": {
  23544. "type": "string",
  23545. "pattern": "^evt_"
  23546. },
  23547. "seq": {
  23548. "type": "number"
  23549. },
  23550. "aggregateID": {
  23551. "type": "string"
  23552. },
  23553. "data": {
  23554. "type": "object",
  23555. "properties": {
  23556. "timestamp": {
  23557. "type": "number"
  23558. },
  23559. "sessionID": {
  23560. "type": "string",
  23561. "pattern": "^ses"
  23562. },
  23563. "messageID": {
  23564. "type": "string",
  23565. "pattern": "^msg_"
  23566. },
  23567. "model": {
  23568. "type": "object",
  23569. "properties": {
  23570. "id": {
  23571. "type": "string"
  23572. },
  23573. "providerID": {
  23574. "type": "string"
  23575. },
  23576. "variant": {
  23577. "type": "string"
  23578. }
  23579. },
  23580. "required": ["id", "providerID"],
  23581. "additionalProperties": false
  23582. }
  23583. },
  23584. "required": ["timestamp", "sessionID", "messageID", "model"],
  23585. "additionalProperties": false
  23586. }
  23587. },
  23588. "required": ["type", "id", "seq", "aggregateID", "data"],
  23589. "additionalProperties": false
  23590. }
  23591. },
  23592. "required": ["type", "id", "syncEvent"],
  23593. "additionalProperties": false
  23594. },
  23595. "SyncEventSessionNextMoved": {
  23596. "type": "object",
  23597. "properties": {
  23598. "type": {
  23599. "type": "string",
  23600. "enum": ["sync"]
  23601. },
  23602. "id": {
  23603. "type": "string",
  23604. "pattern": "^evt_"
  23605. },
  23606. "syncEvent": {
  23607. "type": "object",
  23608. "properties": {
  23609. "type": {
  23610. "type": "string",
  23611. "enum": ["session.next.moved.1"]
  23612. },
  23613. "id": {
  23614. "type": "string",
  23615. "pattern": "^evt_"
  23616. },
  23617. "seq": {
  23618. "type": "number"
  23619. },
  23620. "aggregateID": {
  23621. "type": "string"
  23622. },
  23623. "data": {
  23624. "type": "object",
  23625. "properties": {
  23626. "timestamp": {
  23627. "type": "number"
  23628. },
  23629. "sessionID": {
  23630. "type": "string",
  23631. "pattern": "^ses"
  23632. },
  23633. "location": {
  23634. "$ref": "#/components/schemas/LocationRef"
  23635. },
  23636. "subdirectory": {
  23637. "type": "string"
  23638. }
  23639. },
  23640. "required": ["timestamp", "sessionID", "location"],
  23641. "additionalProperties": false
  23642. }
  23643. },
  23644. "required": ["type", "id", "seq", "aggregateID", "data"],
  23645. "additionalProperties": false
  23646. }
  23647. },
  23648. "required": ["type", "id", "syncEvent"],
  23649. "additionalProperties": false
  23650. },
  23651. "SyncEventSessionNextPrompted": {
  23652. "type": "object",
  23653. "properties": {
  23654. "type": {
  23655. "type": "string",
  23656. "enum": ["sync"]
  23657. },
  23658. "id": {
  23659. "type": "string",
  23660. "pattern": "^evt_"
  23661. },
  23662. "syncEvent": {
  23663. "type": "object",
  23664. "properties": {
  23665. "type": {
  23666. "type": "string",
  23667. "enum": ["session.next.prompted.1"]
  23668. },
  23669. "id": {
  23670. "type": "string",
  23671. "pattern": "^evt_"
  23672. },
  23673. "seq": {
  23674. "type": "number"
  23675. },
  23676. "aggregateID": {
  23677. "type": "string"
  23678. },
  23679. "data": {
  23680. "type": "object",
  23681. "properties": {
  23682. "timestamp": {
  23683. "type": "number"
  23684. },
  23685. "sessionID": {
  23686. "type": "string",
  23687. "pattern": "^ses"
  23688. },
  23689. "messageID": {
  23690. "type": "string",
  23691. "pattern": "^msg_"
  23692. },
  23693. "prompt": {
  23694. "$ref": "#/components/schemas/Prompt"
  23695. },
  23696. "delivery": {
  23697. "type": "string",
  23698. "enum": ["steer", "queue"]
  23699. }
  23700. },
  23701. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23702. "additionalProperties": false
  23703. }
  23704. },
  23705. "required": ["type", "id", "seq", "aggregateID", "data"],
  23706. "additionalProperties": false
  23707. }
  23708. },
  23709. "required": ["type", "id", "syncEvent"],
  23710. "additionalProperties": false
  23711. },
  23712. "SyncEventSessionNextPromptAdmitted": {
  23713. "type": "object",
  23714. "properties": {
  23715. "type": {
  23716. "type": "string",
  23717. "enum": ["sync"]
  23718. },
  23719. "id": {
  23720. "type": "string",
  23721. "pattern": "^evt_"
  23722. },
  23723. "syncEvent": {
  23724. "type": "object",
  23725. "properties": {
  23726. "type": {
  23727. "type": "string",
  23728. "enum": ["session.next.prompt.admitted.1"]
  23729. },
  23730. "id": {
  23731. "type": "string",
  23732. "pattern": "^evt_"
  23733. },
  23734. "seq": {
  23735. "type": "number"
  23736. },
  23737. "aggregateID": {
  23738. "type": "string"
  23739. },
  23740. "data": {
  23741. "type": "object",
  23742. "properties": {
  23743. "timestamp": {
  23744. "type": "number"
  23745. },
  23746. "sessionID": {
  23747. "type": "string",
  23748. "pattern": "^ses"
  23749. },
  23750. "messageID": {
  23751. "type": "string",
  23752. "pattern": "^msg_"
  23753. },
  23754. "prompt": {
  23755. "$ref": "#/components/schemas/Prompt"
  23756. },
  23757. "delivery": {
  23758. "type": "string",
  23759. "enum": ["steer", "queue"]
  23760. }
  23761. },
  23762. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23763. "additionalProperties": false
  23764. }
  23765. },
  23766. "required": ["type", "id", "seq", "aggregateID", "data"],
  23767. "additionalProperties": false
  23768. }
  23769. },
  23770. "required": ["type", "id", "syncEvent"],
  23771. "additionalProperties": false
  23772. },
  23773. "SyncEventSessionNextPromptPromoted": {
  23774. "type": "object",
  23775. "properties": {
  23776. "type": {
  23777. "type": "string",
  23778. "enum": ["sync"]
  23779. },
  23780. "id": {
  23781. "type": "string",
  23782. "pattern": "^evt_"
  23783. },
  23784. "syncEvent": {
  23785. "type": "object",
  23786. "properties": {
  23787. "type": {
  23788. "type": "string",
  23789. "enum": ["session.next.prompt.promoted.1"]
  23790. },
  23791. "id": {
  23792. "type": "string",
  23793. "pattern": "^evt_"
  23794. },
  23795. "seq": {
  23796. "type": "number"
  23797. },
  23798. "aggregateID": {
  23799. "type": "string"
  23800. },
  23801. "data": {
  23802. "type": "object",
  23803. "properties": {
  23804. "timestamp": {
  23805. "type": "number"
  23806. },
  23807. "sessionID": {
  23808. "type": "string",
  23809. "pattern": "^ses"
  23810. },
  23811. "messageID": {
  23812. "type": "string",
  23813. "pattern": "^msg_"
  23814. },
  23815. "prompt": {
  23816. "$ref": "#/components/schemas/Prompt"
  23817. },
  23818. "timeCreated": {
  23819. "type": "number"
  23820. }
  23821. },
  23822. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  23823. "additionalProperties": false
  23824. }
  23825. },
  23826. "required": ["type", "id", "seq", "aggregateID", "data"],
  23827. "additionalProperties": false
  23828. }
  23829. },
  23830. "required": ["type", "id", "syncEvent"],
  23831. "additionalProperties": false
  23832. },
  23833. "SyncEventSessionNextInterruptRequested": {
  23834. "type": "object",
  23835. "properties": {
  23836. "type": {
  23837. "type": "string",
  23838. "enum": ["sync"]
  23839. },
  23840. "id": {
  23841. "type": "string",
  23842. "pattern": "^evt_"
  23843. },
  23844. "syncEvent": {
  23845. "type": "object",
  23846. "properties": {
  23847. "type": {
  23848. "type": "string",
  23849. "enum": ["session.next.interrupt.requested.1"]
  23850. },
  23851. "id": {
  23852. "type": "string",
  23853. "pattern": "^evt_"
  23854. },
  23855. "seq": {
  23856. "type": "number"
  23857. },
  23858. "aggregateID": {
  23859. "type": "string"
  23860. },
  23861. "data": {
  23862. "type": "object",
  23863. "properties": {
  23864. "timestamp": {
  23865. "type": "number"
  23866. },
  23867. "sessionID": {
  23868. "type": "string",
  23869. "pattern": "^ses"
  23870. }
  23871. },
  23872. "required": ["timestamp", "sessionID"],
  23873. "additionalProperties": false
  23874. }
  23875. },
  23876. "required": ["type", "id", "seq", "aggregateID", "data"],
  23877. "additionalProperties": false
  23878. }
  23879. },
  23880. "required": ["type", "id", "syncEvent"],
  23881. "additionalProperties": false
  23882. },
  23883. "SyncEventSessionNextContextUpdated": {
  23884. "type": "object",
  23885. "properties": {
  23886. "type": {
  23887. "type": "string",
  23888. "enum": ["sync"]
  23889. },
  23890. "id": {
  23891. "type": "string",
  23892. "pattern": "^evt_"
  23893. },
  23894. "syncEvent": {
  23895. "type": "object",
  23896. "properties": {
  23897. "type": {
  23898. "type": "string",
  23899. "enum": ["session.next.context.updated.1"]
  23900. },
  23901. "id": {
  23902. "type": "string",
  23903. "pattern": "^evt_"
  23904. },
  23905. "seq": {
  23906. "type": "number"
  23907. },
  23908. "aggregateID": {
  23909. "type": "string"
  23910. },
  23911. "data": {
  23912. "type": "object",
  23913. "properties": {
  23914. "timestamp": {
  23915. "type": "number"
  23916. },
  23917. "sessionID": {
  23918. "type": "string",
  23919. "pattern": "^ses"
  23920. },
  23921. "messageID": {
  23922. "type": "string",
  23923. "pattern": "^msg_"
  23924. },
  23925. "text": {
  23926. "type": "string"
  23927. }
  23928. },
  23929. "required": ["timestamp", "sessionID", "messageID", "text"],
  23930. "additionalProperties": false
  23931. }
  23932. },
  23933. "required": ["type", "id", "seq", "aggregateID", "data"],
  23934. "additionalProperties": false
  23935. }
  23936. },
  23937. "required": ["type", "id", "syncEvent"],
  23938. "additionalProperties": false
  23939. },
  23940. "SyncEventSessionNextSynthetic": {
  23941. "type": "object",
  23942. "properties": {
  23943. "type": {
  23944. "type": "string",
  23945. "enum": ["sync"]
  23946. },
  23947. "id": {
  23948. "type": "string",
  23949. "pattern": "^evt_"
  23950. },
  23951. "syncEvent": {
  23952. "type": "object",
  23953. "properties": {
  23954. "type": {
  23955. "type": "string",
  23956. "enum": ["session.next.synthetic.1"]
  23957. },
  23958. "id": {
  23959. "type": "string",
  23960. "pattern": "^evt_"
  23961. },
  23962. "seq": {
  23963. "type": "number"
  23964. },
  23965. "aggregateID": {
  23966. "type": "string"
  23967. },
  23968. "data": {
  23969. "type": "object",
  23970. "properties": {
  23971. "timestamp": {
  23972. "type": "number"
  23973. },
  23974. "sessionID": {
  23975. "type": "string",
  23976. "pattern": "^ses"
  23977. },
  23978. "messageID": {
  23979. "type": "string",
  23980. "pattern": "^msg_"
  23981. },
  23982. "text": {
  23983. "type": "string"
  23984. }
  23985. },
  23986. "required": ["timestamp", "sessionID", "messageID", "text"],
  23987. "additionalProperties": false
  23988. }
  23989. },
  23990. "required": ["type", "id", "seq", "aggregateID", "data"],
  23991. "additionalProperties": false
  23992. }
  23993. },
  23994. "required": ["type", "id", "syncEvent"],
  23995. "additionalProperties": false
  23996. },
  23997. "SyncEventSessionNextShellStarted": {
  23998. "type": "object",
  23999. "properties": {
  24000. "type": {
  24001. "type": "string",
  24002. "enum": ["sync"]
  24003. },
  24004. "id": {
  24005. "type": "string",
  24006. "pattern": "^evt_"
  24007. },
  24008. "syncEvent": {
  24009. "type": "object",
  24010. "properties": {
  24011. "type": {
  24012. "type": "string",
  24013. "enum": ["session.next.shell.started.1"]
  24014. },
  24015. "id": {
  24016. "type": "string",
  24017. "pattern": "^evt_"
  24018. },
  24019. "seq": {
  24020. "type": "number"
  24021. },
  24022. "aggregateID": {
  24023. "type": "string"
  24024. },
  24025. "data": {
  24026. "type": "object",
  24027. "properties": {
  24028. "timestamp": {
  24029. "type": "number"
  24030. },
  24031. "sessionID": {
  24032. "type": "string",
  24033. "pattern": "^ses"
  24034. },
  24035. "messageID": {
  24036. "type": "string",
  24037. "pattern": "^msg_"
  24038. },
  24039. "callID": {
  24040. "type": "string"
  24041. },
  24042. "command": {
  24043. "type": "string"
  24044. }
  24045. },
  24046. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24047. "additionalProperties": false
  24048. }
  24049. },
  24050. "required": ["type", "id", "seq", "aggregateID", "data"],
  24051. "additionalProperties": false
  24052. }
  24053. },
  24054. "required": ["type", "id", "syncEvent"],
  24055. "additionalProperties": false
  24056. },
  24057. "SyncEventSessionNextShellEnded": {
  24058. "type": "object",
  24059. "properties": {
  24060. "type": {
  24061. "type": "string",
  24062. "enum": ["sync"]
  24063. },
  24064. "id": {
  24065. "type": "string",
  24066. "pattern": "^evt_"
  24067. },
  24068. "syncEvent": {
  24069. "type": "object",
  24070. "properties": {
  24071. "type": {
  24072. "type": "string",
  24073. "enum": ["session.next.shell.ended.1"]
  24074. },
  24075. "id": {
  24076. "type": "string",
  24077. "pattern": "^evt_"
  24078. },
  24079. "seq": {
  24080. "type": "number"
  24081. },
  24082. "aggregateID": {
  24083. "type": "string"
  24084. },
  24085. "data": {
  24086. "type": "object",
  24087. "properties": {
  24088. "timestamp": {
  24089. "type": "number"
  24090. },
  24091. "sessionID": {
  24092. "type": "string",
  24093. "pattern": "^ses"
  24094. },
  24095. "callID": {
  24096. "type": "string"
  24097. },
  24098. "output": {
  24099. "type": "string"
  24100. }
  24101. },
  24102. "required": ["timestamp", "sessionID", "callID", "output"],
  24103. "additionalProperties": false
  24104. }
  24105. },
  24106. "required": ["type", "id", "seq", "aggregateID", "data"],
  24107. "additionalProperties": false
  24108. }
  24109. },
  24110. "required": ["type", "id", "syncEvent"],
  24111. "additionalProperties": false
  24112. },
  24113. "SyncEventSessionNextStepStarted": {
  24114. "type": "object",
  24115. "properties": {
  24116. "type": {
  24117. "type": "string",
  24118. "enum": ["sync"]
  24119. },
  24120. "id": {
  24121. "type": "string",
  24122. "pattern": "^evt_"
  24123. },
  24124. "syncEvent": {
  24125. "type": "object",
  24126. "properties": {
  24127. "type": {
  24128. "type": "string",
  24129. "enum": ["session.next.step.started.1"]
  24130. },
  24131. "id": {
  24132. "type": "string",
  24133. "pattern": "^evt_"
  24134. },
  24135. "seq": {
  24136. "type": "number"
  24137. },
  24138. "aggregateID": {
  24139. "type": "string"
  24140. },
  24141. "data": {
  24142. "type": "object",
  24143. "properties": {
  24144. "timestamp": {
  24145. "type": "number"
  24146. },
  24147. "sessionID": {
  24148. "type": "string",
  24149. "pattern": "^ses"
  24150. },
  24151. "assistantMessageID": {
  24152. "type": "string",
  24153. "pattern": "^msg_"
  24154. },
  24155. "agent": {
  24156. "type": "string"
  24157. },
  24158. "model": {
  24159. "type": "object",
  24160. "properties": {
  24161. "id": {
  24162. "type": "string"
  24163. },
  24164. "providerID": {
  24165. "type": "string"
  24166. },
  24167. "variant": {
  24168. "type": "string"
  24169. }
  24170. },
  24171. "required": ["id", "providerID"],
  24172. "additionalProperties": false
  24173. },
  24174. "snapshot": {
  24175. "type": "string"
  24176. }
  24177. },
  24178. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24179. "additionalProperties": false
  24180. }
  24181. },
  24182. "required": ["type", "id", "seq", "aggregateID", "data"],
  24183. "additionalProperties": false
  24184. }
  24185. },
  24186. "required": ["type", "id", "syncEvent"],
  24187. "additionalProperties": false
  24188. },
  24189. "SyncEventSessionNextStepEnded": {
  24190. "type": "object",
  24191. "properties": {
  24192. "type": {
  24193. "type": "string",
  24194. "enum": ["sync"]
  24195. },
  24196. "id": {
  24197. "type": "string",
  24198. "pattern": "^evt_"
  24199. },
  24200. "syncEvent": {
  24201. "type": "object",
  24202. "properties": {
  24203. "type": {
  24204. "type": "string",
  24205. "enum": ["session.next.step.ended.2"]
  24206. },
  24207. "id": {
  24208. "type": "string",
  24209. "pattern": "^evt_"
  24210. },
  24211. "seq": {
  24212. "type": "number"
  24213. },
  24214. "aggregateID": {
  24215. "type": "string"
  24216. },
  24217. "data": {
  24218. "type": "object",
  24219. "properties": {
  24220. "timestamp": {
  24221. "type": "number"
  24222. },
  24223. "sessionID": {
  24224. "type": "string",
  24225. "pattern": "^ses"
  24226. },
  24227. "assistantMessageID": {
  24228. "type": "string",
  24229. "pattern": "^msg_"
  24230. },
  24231. "finish": {
  24232. "type": "string"
  24233. },
  24234. "cost": {
  24235. "type": "number"
  24236. },
  24237. "tokens": {
  24238. "type": "object",
  24239. "properties": {
  24240. "input": {
  24241. "type": "number"
  24242. },
  24243. "output": {
  24244. "type": "number"
  24245. },
  24246. "reasoning": {
  24247. "type": "number"
  24248. },
  24249. "cache": {
  24250. "type": "object",
  24251. "properties": {
  24252. "read": {
  24253. "type": "number"
  24254. },
  24255. "write": {
  24256. "type": "number"
  24257. }
  24258. },
  24259. "required": ["read", "write"],
  24260. "additionalProperties": false
  24261. }
  24262. },
  24263. "required": ["input", "output", "reasoning", "cache"],
  24264. "additionalProperties": false
  24265. },
  24266. "snapshot": {
  24267. "type": "string"
  24268. }
  24269. },
  24270. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24271. "additionalProperties": false
  24272. }
  24273. },
  24274. "required": ["type", "id", "seq", "aggregateID", "data"],
  24275. "additionalProperties": false
  24276. }
  24277. },
  24278. "required": ["type", "id", "syncEvent"],
  24279. "additionalProperties": false
  24280. },
  24281. "SyncEventSessionNextStepFailed": {
  24282. "type": "object",
  24283. "properties": {
  24284. "type": {
  24285. "type": "string",
  24286. "enum": ["sync"]
  24287. },
  24288. "id": {
  24289. "type": "string",
  24290. "pattern": "^evt_"
  24291. },
  24292. "syncEvent": {
  24293. "type": "object",
  24294. "properties": {
  24295. "type": {
  24296. "type": "string",
  24297. "enum": ["session.next.step.failed.2"]
  24298. },
  24299. "id": {
  24300. "type": "string",
  24301. "pattern": "^evt_"
  24302. },
  24303. "seq": {
  24304. "type": "number"
  24305. },
  24306. "aggregateID": {
  24307. "type": "string"
  24308. },
  24309. "data": {
  24310. "type": "object",
  24311. "properties": {
  24312. "timestamp": {
  24313. "type": "number"
  24314. },
  24315. "sessionID": {
  24316. "type": "string",
  24317. "pattern": "^ses"
  24318. },
  24319. "assistantMessageID": {
  24320. "type": "string",
  24321. "pattern": "^msg_"
  24322. },
  24323. "error": {
  24324. "$ref": "#/components/schemas/SessionErrorUnknown"
  24325. }
  24326. },
  24327. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24328. "additionalProperties": false
  24329. }
  24330. },
  24331. "required": ["type", "id", "seq", "aggregateID", "data"],
  24332. "additionalProperties": false
  24333. }
  24334. },
  24335. "required": ["type", "id", "syncEvent"],
  24336. "additionalProperties": false
  24337. },
  24338. "SyncEventSessionNextTextStarted": {
  24339. "type": "object",
  24340. "properties": {
  24341. "type": {
  24342. "type": "string",
  24343. "enum": ["sync"]
  24344. },
  24345. "id": {
  24346. "type": "string",
  24347. "pattern": "^evt_"
  24348. },
  24349. "syncEvent": {
  24350. "type": "object",
  24351. "properties": {
  24352. "type": {
  24353. "type": "string",
  24354. "enum": ["session.next.text.started.1"]
  24355. },
  24356. "id": {
  24357. "type": "string",
  24358. "pattern": "^evt_"
  24359. },
  24360. "seq": {
  24361. "type": "number"
  24362. },
  24363. "aggregateID": {
  24364. "type": "string"
  24365. },
  24366. "data": {
  24367. "type": "object",
  24368. "properties": {
  24369. "timestamp": {
  24370. "type": "number"
  24371. },
  24372. "sessionID": {
  24373. "type": "string",
  24374. "pattern": "^ses"
  24375. },
  24376. "assistantMessageID": {
  24377. "type": "string",
  24378. "pattern": "^msg_"
  24379. },
  24380. "textID": {
  24381. "type": "string"
  24382. }
  24383. },
  24384. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24385. "additionalProperties": false
  24386. }
  24387. },
  24388. "required": ["type", "id", "seq", "aggregateID", "data"],
  24389. "additionalProperties": false
  24390. }
  24391. },
  24392. "required": ["type", "id", "syncEvent"],
  24393. "additionalProperties": false
  24394. },
  24395. "SyncEventSessionNextTextEnded": {
  24396. "type": "object",
  24397. "properties": {
  24398. "type": {
  24399. "type": "string",
  24400. "enum": ["sync"]
  24401. },
  24402. "id": {
  24403. "type": "string",
  24404. "pattern": "^evt_"
  24405. },
  24406. "syncEvent": {
  24407. "type": "object",
  24408. "properties": {
  24409. "type": {
  24410. "type": "string",
  24411. "enum": ["session.next.text.ended.1"]
  24412. },
  24413. "id": {
  24414. "type": "string",
  24415. "pattern": "^evt_"
  24416. },
  24417. "seq": {
  24418. "type": "number"
  24419. },
  24420. "aggregateID": {
  24421. "type": "string"
  24422. },
  24423. "data": {
  24424. "type": "object",
  24425. "properties": {
  24426. "timestamp": {
  24427. "type": "number"
  24428. },
  24429. "sessionID": {
  24430. "type": "string",
  24431. "pattern": "^ses"
  24432. },
  24433. "assistantMessageID": {
  24434. "type": "string",
  24435. "pattern": "^msg_"
  24436. },
  24437. "textID": {
  24438. "type": "string"
  24439. },
  24440. "text": {
  24441. "type": "string"
  24442. }
  24443. },
  24444. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24445. "additionalProperties": false
  24446. }
  24447. },
  24448. "required": ["type", "id", "seq", "aggregateID", "data"],
  24449. "additionalProperties": false
  24450. }
  24451. },
  24452. "required": ["type", "id", "syncEvent"],
  24453. "additionalProperties": false
  24454. },
  24455. "SyncEventSessionNextReasoningStarted": {
  24456. "type": "object",
  24457. "properties": {
  24458. "type": {
  24459. "type": "string",
  24460. "enum": ["sync"]
  24461. },
  24462. "id": {
  24463. "type": "string",
  24464. "pattern": "^evt_"
  24465. },
  24466. "syncEvent": {
  24467. "type": "object",
  24468. "properties": {
  24469. "type": {
  24470. "type": "string",
  24471. "enum": ["session.next.reasoning.started.1"]
  24472. },
  24473. "id": {
  24474. "type": "string",
  24475. "pattern": "^evt_"
  24476. },
  24477. "seq": {
  24478. "type": "number"
  24479. },
  24480. "aggregateID": {
  24481. "type": "string"
  24482. },
  24483. "data": {
  24484. "type": "object",
  24485. "properties": {
  24486. "timestamp": {
  24487. "type": "number"
  24488. },
  24489. "sessionID": {
  24490. "type": "string",
  24491. "pattern": "^ses"
  24492. },
  24493. "assistantMessageID": {
  24494. "type": "string",
  24495. "pattern": "^msg_"
  24496. },
  24497. "reasoningID": {
  24498. "type": "string"
  24499. },
  24500. "providerMetadata": {
  24501. "type": "object",
  24502. "additionalProperties": {
  24503. "type": "object"
  24504. }
  24505. }
  24506. },
  24507. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24508. "additionalProperties": false
  24509. }
  24510. },
  24511. "required": ["type", "id", "seq", "aggregateID", "data"],
  24512. "additionalProperties": false
  24513. }
  24514. },
  24515. "required": ["type", "id", "syncEvent"],
  24516. "additionalProperties": false
  24517. },
  24518. "SyncEventSessionNextReasoningEnded": {
  24519. "type": "object",
  24520. "properties": {
  24521. "type": {
  24522. "type": "string",
  24523. "enum": ["sync"]
  24524. },
  24525. "id": {
  24526. "type": "string",
  24527. "pattern": "^evt_"
  24528. },
  24529. "syncEvent": {
  24530. "type": "object",
  24531. "properties": {
  24532. "type": {
  24533. "type": "string",
  24534. "enum": ["session.next.reasoning.ended.1"]
  24535. },
  24536. "id": {
  24537. "type": "string",
  24538. "pattern": "^evt_"
  24539. },
  24540. "seq": {
  24541. "type": "number"
  24542. },
  24543. "aggregateID": {
  24544. "type": "string"
  24545. },
  24546. "data": {
  24547. "type": "object",
  24548. "properties": {
  24549. "timestamp": {
  24550. "type": "number"
  24551. },
  24552. "sessionID": {
  24553. "type": "string",
  24554. "pattern": "^ses"
  24555. },
  24556. "assistantMessageID": {
  24557. "type": "string",
  24558. "pattern": "^msg_"
  24559. },
  24560. "reasoningID": {
  24561. "type": "string"
  24562. },
  24563. "text": {
  24564. "type": "string"
  24565. },
  24566. "providerMetadata": {
  24567. "type": "object",
  24568. "additionalProperties": {
  24569. "type": "object"
  24570. }
  24571. }
  24572. },
  24573. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  24574. "additionalProperties": false
  24575. }
  24576. },
  24577. "required": ["type", "id", "seq", "aggregateID", "data"],
  24578. "additionalProperties": false
  24579. }
  24580. },
  24581. "required": ["type", "id", "syncEvent"],
  24582. "additionalProperties": false
  24583. },
  24584. "SyncEventSessionNextToolInputStarted": {
  24585. "type": "object",
  24586. "properties": {
  24587. "type": {
  24588. "type": "string",
  24589. "enum": ["sync"]
  24590. },
  24591. "id": {
  24592. "type": "string",
  24593. "pattern": "^evt_"
  24594. },
  24595. "syncEvent": {
  24596. "type": "object",
  24597. "properties": {
  24598. "type": {
  24599. "type": "string",
  24600. "enum": ["session.next.tool.input.started.1"]
  24601. },
  24602. "id": {
  24603. "type": "string",
  24604. "pattern": "^evt_"
  24605. },
  24606. "seq": {
  24607. "type": "number"
  24608. },
  24609. "aggregateID": {
  24610. "type": "string"
  24611. },
  24612. "data": {
  24613. "type": "object",
  24614. "properties": {
  24615. "timestamp": {
  24616. "type": "number"
  24617. },
  24618. "sessionID": {
  24619. "type": "string",
  24620. "pattern": "^ses"
  24621. },
  24622. "assistantMessageID": {
  24623. "type": "string",
  24624. "pattern": "^msg_"
  24625. },
  24626. "callID": {
  24627. "type": "string"
  24628. },
  24629. "name": {
  24630. "type": "string"
  24631. }
  24632. },
  24633. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  24634. "additionalProperties": false
  24635. }
  24636. },
  24637. "required": ["type", "id", "seq", "aggregateID", "data"],
  24638. "additionalProperties": false
  24639. }
  24640. },
  24641. "required": ["type", "id", "syncEvent"],
  24642. "additionalProperties": false
  24643. },
  24644. "SyncEventSessionNextToolInputEnded": {
  24645. "type": "object",
  24646. "properties": {
  24647. "type": {
  24648. "type": "string",
  24649. "enum": ["sync"]
  24650. },
  24651. "id": {
  24652. "type": "string",
  24653. "pattern": "^evt_"
  24654. },
  24655. "syncEvent": {
  24656. "type": "object",
  24657. "properties": {
  24658. "type": {
  24659. "type": "string",
  24660. "enum": ["session.next.tool.input.ended.1"]
  24661. },
  24662. "id": {
  24663. "type": "string",
  24664. "pattern": "^evt_"
  24665. },
  24666. "seq": {
  24667. "type": "number"
  24668. },
  24669. "aggregateID": {
  24670. "type": "string"
  24671. },
  24672. "data": {
  24673. "type": "object",
  24674. "properties": {
  24675. "timestamp": {
  24676. "type": "number"
  24677. },
  24678. "sessionID": {
  24679. "type": "string",
  24680. "pattern": "^ses"
  24681. },
  24682. "assistantMessageID": {
  24683. "type": "string",
  24684. "pattern": "^msg_"
  24685. },
  24686. "callID": {
  24687. "type": "string"
  24688. },
  24689. "text": {
  24690. "type": "string"
  24691. }
  24692. },
  24693. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  24694. "additionalProperties": false
  24695. }
  24696. },
  24697. "required": ["type", "id", "seq", "aggregateID", "data"],
  24698. "additionalProperties": false
  24699. }
  24700. },
  24701. "required": ["type", "id", "syncEvent"],
  24702. "additionalProperties": false
  24703. },
  24704. "SyncEventSessionNextToolCalled": {
  24705. "type": "object",
  24706. "properties": {
  24707. "type": {
  24708. "type": "string",
  24709. "enum": ["sync"]
  24710. },
  24711. "id": {
  24712. "type": "string",
  24713. "pattern": "^evt_"
  24714. },
  24715. "syncEvent": {
  24716. "type": "object",
  24717. "properties": {
  24718. "type": {
  24719. "type": "string",
  24720. "enum": ["session.next.tool.called.1"]
  24721. },
  24722. "id": {
  24723. "type": "string",
  24724. "pattern": "^evt_"
  24725. },
  24726. "seq": {
  24727. "type": "number"
  24728. },
  24729. "aggregateID": {
  24730. "type": "string"
  24731. },
  24732. "data": {
  24733. "type": "object",
  24734. "properties": {
  24735. "timestamp": {
  24736. "type": "number"
  24737. },
  24738. "sessionID": {
  24739. "type": "string",
  24740. "pattern": "^ses"
  24741. },
  24742. "assistantMessageID": {
  24743. "type": "string",
  24744. "pattern": "^msg_"
  24745. },
  24746. "callID": {
  24747. "type": "string"
  24748. },
  24749. "tool": {
  24750. "type": "string"
  24751. },
  24752. "input": {
  24753. "type": "object"
  24754. },
  24755. "provider": {
  24756. "type": "object",
  24757. "properties": {
  24758. "executed": {
  24759. "type": "boolean"
  24760. },
  24761. "metadata": {
  24762. "type": "object",
  24763. "additionalProperties": {
  24764. "type": "object"
  24765. }
  24766. }
  24767. },
  24768. "required": ["executed"],
  24769. "additionalProperties": false
  24770. }
  24771. },
  24772. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  24773. "additionalProperties": false
  24774. }
  24775. },
  24776. "required": ["type", "id", "seq", "aggregateID", "data"],
  24777. "additionalProperties": false
  24778. }
  24779. },
  24780. "required": ["type", "id", "syncEvent"],
  24781. "additionalProperties": false
  24782. },
  24783. "SyncEventSessionNextToolProgress": {
  24784. "type": "object",
  24785. "properties": {
  24786. "type": {
  24787. "type": "string",
  24788. "enum": ["sync"]
  24789. },
  24790. "id": {
  24791. "type": "string",
  24792. "pattern": "^evt_"
  24793. },
  24794. "syncEvent": {
  24795. "type": "object",
  24796. "properties": {
  24797. "type": {
  24798. "type": "string",
  24799. "enum": ["session.next.tool.progress.1"]
  24800. },
  24801. "id": {
  24802. "type": "string",
  24803. "pattern": "^evt_"
  24804. },
  24805. "seq": {
  24806. "type": "number"
  24807. },
  24808. "aggregateID": {
  24809. "type": "string"
  24810. },
  24811. "data": {
  24812. "type": "object",
  24813. "properties": {
  24814. "timestamp": {
  24815. "type": "number"
  24816. },
  24817. "sessionID": {
  24818. "type": "string",
  24819. "pattern": "^ses"
  24820. },
  24821. "assistantMessageID": {
  24822. "type": "string",
  24823. "pattern": "^msg_"
  24824. },
  24825. "callID": {
  24826. "type": "string"
  24827. },
  24828. "structured": {
  24829. "type": "object"
  24830. },
  24831. "content": {
  24832. "type": "array",
  24833. "items": {
  24834. "anyOf": [
  24835. {
  24836. "$ref": "#/components/schemas/ToolTextContent"
  24837. },
  24838. {
  24839. "$ref": "#/components/schemas/ToolFileContent"
  24840. }
  24841. ]
  24842. }
  24843. }
  24844. },
  24845. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  24846. "additionalProperties": false
  24847. }
  24848. },
  24849. "required": ["type", "id", "seq", "aggregateID", "data"],
  24850. "additionalProperties": false
  24851. }
  24852. },
  24853. "required": ["type", "id", "syncEvent"],
  24854. "additionalProperties": false
  24855. },
  24856. "SyncEventSessionNextToolSuccess": {
  24857. "type": "object",
  24858. "properties": {
  24859. "type": {
  24860. "type": "string",
  24861. "enum": ["sync"]
  24862. },
  24863. "id": {
  24864. "type": "string",
  24865. "pattern": "^evt_"
  24866. },
  24867. "syncEvent": {
  24868. "type": "object",
  24869. "properties": {
  24870. "type": {
  24871. "type": "string",
  24872. "enum": ["session.next.tool.success.1"]
  24873. },
  24874. "id": {
  24875. "type": "string",
  24876. "pattern": "^evt_"
  24877. },
  24878. "seq": {
  24879. "type": "number"
  24880. },
  24881. "aggregateID": {
  24882. "type": "string"
  24883. },
  24884. "data": {
  24885. "type": "object",
  24886. "properties": {
  24887. "timestamp": {
  24888. "type": "number"
  24889. },
  24890. "sessionID": {
  24891. "type": "string",
  24892. "pattern": "^ses"
  24893. },
  24894. "assistantMessageID": {
  24895. "type": "string",
  24896. "pattern": "^msg_"
  24897. },
  24898. "callID": {
  24899. "type": "string"
  24900. },
  24901. "structured": {
  24902. "type": "object"
  24903. },
  24904. "content": {
  24905. "type": "array",
  24906. "items": {
  24907. "anyOf": [
  24908. {
  24909. "$ref": "#/components/schemas/ToolTextContent"
  24910. },
  24911. {
  24912. "$ref": "#/components/schemas/ToolFileContent"
  24913. }
  24914. ]
  24915. }
  24916. },
  24917. "outputPaths": {
  24918. "type": "array",
  24919. "items": {
  24920. "type": "string"
  24921. }
  24922. },
  24923. "result": {},
  24924. "provider": {
  24925. "type": "object",
  24926. "properties": {
  24927. "executed": {
  24928. "type": "boolean"
  24929. },
  24930. "metadata": {
  24931. "type": "object",
  24932. "additionalProperties": {
  24933. "type": "object"
  24934. }
  24935. }
  24936. },
  24937. "required": ["executed"],
  24938. "additionalProperties": false
  24939. }
  24940. },
  24941. "required": [
  24942. "timestamp",
  24943. "sessionID",
  24944. "assistantMessageID",
  24945. "callID",
  24946. "structured",
  24947. "content",
  24948. "provider"
  24949. ],
  24950. "additionalProperties": false
  24951. }
  24952. },
  24953. "required": ["type", "id", "seq", "aggregateID", "data"],
  24954. "additionalProperties": false
  24955. }
  24956. },
  24957. "required": ["type", "id", "syncEvent"],
  24958. "additionalProperties": false
  24959. },
  24960. "SyncEventSessionNextToolFailed": {
  24961. "type": "object",
  24962. "properties": {
  24963. "type": {
  24964. "type": "string",
  24965. "enum": ["sync"]
  24966. },
  24967. "id": {
  24968. "type": "string",
  24969. "pattern": "^evt_"
  24970. },
  24971. "syncEvent": {
  24972. "type": "object",
  24973. "properties": {
  24974. "type": {
  24975. "type": "string",
  24976. "enum": ["session.next.tool.failed.1"]
  24977. },
  24978. "id": {
  24979. "type": "string",
  24980. "pattern": "^evt_"
  24981. },
  24982. "seq": {
  24983. "type": "number"
  24984. },
  24985. "aggregateID": {
  24986. "type": "string"
  24987. },
  24988. "data": {
  24989. "type": "object",
  24990. "properties": {
  24991. "timestamp": {
  24992. "type": "number"
  24993. },
  24994. "sessionID": {
  24995. "type": "string",
  24996. "pattern": "^ses"
  24997. },
  24998. "assistantMessageID": {
  24999. "type": "string",
  25000. "pattern": "^msg_"
  25001. },
  25002. "callID": {
  25003. "type": "string"
  25004. },
  25005. "error": {
  25006. "$ref": "#/components/schemas/SessionErrorUnknown"
  25007. },
  25008. "result": {},
  25009. "provider": {
  25010. "type": "object",
  25011. "properties": {
  25012. "executed": {
  25013. "type": "boolean"
  25014. },
  25015. "metadata": {
  25016. "type": "object",
  25017. "additionalProperties": {
  25018. "type": "object"
  25019. }
  25020. }
  25021. },
  25022. "required": ["executed"],
  25023. "additionalProperties": false
  25024. }
  25025. },
  25026. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25027. "additionalProperties": false
  25028. }
  25029. },
  25030. "required": ["type", "id", "seq", "aggregateID", "data"],
  25031. "additionalProperties": false
  25032. }
  25033. },
  25034. "required": ["type", "id", "syncEvent"],
  25035. "additionalProperties": false
  25036. },
  25037. "SyncEventSessionNextRetried": {
  25038. "type": "object",
  25039. "properties": {
  25040. "type": {
  25041. "type": "string",
  25042. "enum": ["sync"]
  25043. },
  25044. "id": {
  25045. "type": "string",
  25046. "pattern": "^evt_"
  25047. },
  25048. "syncEvent": {
  25049. "type": "object",
  25050. "properties": {
  25051. "type": {
  25052. "type": "string",
  25053. "enum": ["session.next.retried.1"]
  25054. },
  25055. "id": {
  25056. "type": "string",
  25057. "pattern": "^evt_"
  25058. },
  25059. "seq": {
  25060. "type": "number"
  25061. },
  25062. "aggregateID": {
  25063. "type": "string"
  25064. },
  25065. "data": {
  25066. "type": "object",
  25067. "properties": {
  25068. "timestamp": {
  25069. "type": "number"
  25070. },
  25071. "sessionID": {
  25072. "type": "string",
  25073. "pattern": "^ses"
  25074. },
  25075. "attempt": {
  25076. "type": "number"
  25077. },
  25078. "error": {
  25079. "$ref": "#/components/schemas/SessionNextRetry_error"
  25080. }
  25081. },
  25082. "required": ["timestamp", "sessionID", "attempt", "error"],
  25083. "additionalProperties": false
  25084. }
  25085. },
  25086. "required": ["type", "id", "seq", "aggregateID", "data"],
  25087. "additionalProperties": false
  25088. }
  25089. },
  25090. "required": ["type", "id", "syncEvent"],
  25091. "additionalProperties": false
  25092. },
  25093. "SyncEventSessionNextCompactionStarted": {
  25094. "type": "object",
  25095. "properties": {
  25096. "type": {
  25097. "type": "string",
  25098. "enum": ["sync"]
  25099. },
  25100. "id": {
  25101. "type": "string",
  25102. "pattern": "^evt_"
  25103. },
  25104. "syncEvent": {
  25105. "type": "object",
  25106. "properties": {
  25107. "type": {
  25108. "type": "string",
  25109. "enum": ["session.next.compaction.started.1"]
  25110. },
  25111. "id": {
  25112. "type": "string",
  25113. "pattern": "^evt_"
  25114. },
  25115. "seq": {
  25116. "type": "number"
  25117. },
  25118. "aggregateID": {
  25119. "type": "string"
  25120. },
  25121. "data": {
  25122. "type": "object",
  25123. "properties": {
  25124. "timestamp": {
  25125. "type": "number"
  25126. },
  25127. "sessionID": {
  25128. "type": "string",
  25129. "pattern": "^ses"
  25130. },
  25131. "messageID": {
  25132. "type": "string",
  25133. "pattern": "^msg_"
  25134. },
  25135. "reason": {
  25136. "type": "string",
  25137. "enum": ["auto", "manual"]
  25138. }
  25139. },
  25140. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25141. "additionalProperties": false
  25142. }
  25143. },
  25144. "required": ["type", "id", "seq", "aggregateID", "data"],
  25145. "additionalProperties": false
  25146. }
  25147. },
  25148. "required": ["type", "id", "syncEvent"],
  25149. "additionalProperties": false
  25150. },
  25151. "SyncEventSessionNextCompactionEnded": {
  25152. "type": "object",
  25153. "properties": {
  25154. "type": {
  25155. "type": "string",
  25156. "enum": ["sync"]
  25157. },
  25158. "id": {
  25159. "type": "string",
  25160. "pattern": "^evt_"
  25161. },
  25162. "syncEvent": {
  25163. "type": "object",
  25164. "properties": {
  25165. "type": {
  25166. "type": "string",
  25167. "enum": ["session.next.compaction.ended.2"]
  25168. },
  25169. "id": {
  25170. "type": "string",
  25171. "pattern": "^evt_"
  25172. },
  25173. "seq": {
  25174. "type": "number"
  25175. },
  25176. "aggregateID": {
  25177. "type": "string"
  25178. },
  25179. "data": {
  25180. "type": "object",
  25181. "properties": {
  25182. "timestamp": {
  25183. "type": "number"
  25184. },
  25185. "sessionID": {
  25186. "type": "string",
  25187. "pattern": "^ses"
  25188. },
  25189. "messageID": {
  25190. "type": "string",
  25191. "pattern": "^msg_"
  25192. },
  25193. "reason": {
  25194. "type": "string",
  25195. "enum": ["auto", "manual"]
  25196. },
  25197. "text": {
  25198. "type": "string"
  25199. },
  25200. "recent": {
  25201. "type": "string"
  25202. }
  25203. },
  25204. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25205. "additionalProperties": false
  25206. }
  25207. },
  25208. "required": ["type", "id", "seq", "aggregateID", "data"],
  25209. "additionalProperties": false
  25210. }
  25211. },
  25212. "required": ["type", "id", "syncEvent"],
  25213. "additionalProperties": false
  25214. },
  25215. "ConfigV2ReferenceGit": {
  25216. "type": "object",
  25217. "properties": {
  25218. "repository": {
  25219. "type": "string"
  25220. },
  25221. "branch": {
  25222. "type": "string"
  25223. },
  25224. "description": {
  25225. "type": "string"
  25226. },
  25227. "hidden": {
  25228. "type": "boolean"
  25229. }
  25230. },
  25231. "required": ["repository"],
  25232. "additionalProperties": false
  25233. },
  25234. "ConfigV2ReferenceLocal": {
  25235. "type": "object",
  25236. "properties": {
  25237. "path": {
  25238. "type": "string"
  25239. },
  25240. "description": {
  25241. "type": "string"
  25242. },
  25243. "hidden": {
  25244. "type": "boolean"
  25245. }
  25246. },
  25247. "required": ["path"],
  25248. "additionalProperties": false
  25249. },
  25250. "PolicyEffect": {
  25251. "type": "string",
  25252. "enum": ["allow", "deny"]
  25253. },
  25254. "ConfigV2ExperimentalPolicy": {
  25255. "type": "object",
  25256. "properties": {
  25257. "action": {
  25258. "type": "string",
  25259. "enum": ["provider.use"]
  25260. },
  25261. "effect": {
  25262. "$ref": "#/components/schemas/PolicyEffect"
  25263. },
  25264. "resource": {
  25265. "type": "string"
  25266. }
  25267. },
  25268. "required": ["action", "effect", "resource"],
  25269. "additionalProperties": false
  25270. },
  25271. "ProjectDirectories": {
  25272. "type": "array",
  25273. "items": {
  25274. "type": "object",
  25275. "properties": {
  25276. "directory": {
  25277. "type": "string"
  25278. },
  25279. "strategy": {
  25280. "type": "string"
  25281. }
  25282. },
  25283. "required": ["directory"],
  25284. "additionalProperties": false
  25285. }
  25286. },
  25287. "LocationInfo": {
  25288. "type": "object",
  25289. "properties": {
  25290. "directory": {
  25291. "type": "string"
  25292. },
  25293. "workspaceID": {
  25294. "type": "string",
  25295. "pattern": "^wrk"
  25296. },
  25297. "project": {
  25298. "type": "object",
  25299. "properties": {
  25300. "id": {
  25301. "type": "string"
  25302. },
  25303. "directory": {
  25304. "type": "string"
  25305. }
  25306. },
  25307. "required": ["id", "directory"],
  25308. "additionalProperties": false
  25309. }
  25310. },
  25311. "required": ["directory", "project"],
  25312. "additionalProperties": false
  25313. },
  25314. "PermissionV2Effect": {
  25315. "type": "string",
  25316. "enum": ["allow", "deny", "ask"]
  25317. },
  25318. "PermissionV2Rule": {
  25319. "type": "object",
  25320. "properties": {
  25321. "action": {
  25322. "type": "string"
  25323. },
  25324. "resource": {
  25325. "type": "string"
  25326. },
  25327. "effect": {
  25328. "$ref": "#/components/schemas/PermissionV2Effect"
  25329. }
  25330. },
  25331. "required": ["action", "resource", "effect"],
  25332. "additionalProperties": false
  25333. },
  25334. "PermissionV2Ruleset": {
  25335. "type": "array",
  25336. "items": {
  25337. "$ref": "#/components/schemas/PermissionV2Rule"
  25338. }
  25339. },
  25340. "AgentV2Info": {
  25341. "type": "object",
  25342. "properties": {
  25343. "id": {
  25344. "type": "string"
  25345. },
  25346. "model": {
  25347. "type": "object",
  25348. "properties": {
  25349. "id": {
  25350. "type": "string"
  25351. },
  25352. "providerID": {
  25353. "type": "string"
  25354. },
  25355. "variant": {
  25356. "type": "string"
  25357. }
  25358. },
  25359. "required": ["id", "providerID"],
  25360. "additionalProperties": false
  25361. },
  25362. "request": {
  25363. "type": "object",
  25364. "properties": {
  25365. "headers": {
  25366. "type": "object",
  25367. "additionalProperties": {
  25368. "type": "string"
  25369. }
  25370. },
  25371. "body": {
  25372. "type": "object"
  25373. }
  25374. },
  25375. "required": ["headers", "body"],
  25376. "additionalProperties": false
  25377. },
  25378. "system": {
  25379. "type": "string"
  25380. },
  25381. "description": {
  25382. "type": "string"
  25383. },
  25384. "mode": {
  25385. "type": "string",
  25386. "enum": ["subagent", "primary", "all"]
  25387. },
  25388. "hidden": {
  25389. "type": "boolean"
  25390. },
  25391. "color": {
  25392. "anyOf": [
  25393. {
  25394. "type": "string",
  25395. "pattern": "^#[0-9a-fA-F]{6}$"
  25396. },
  25397. {
  25398. "type": "string",
  25399. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25400. }
  25401. ]
  25402. },
  25403. "steps": {
  25404. "type": "integer",
  25405. "exclusiveMinimum": 0
  25406. },
  25407. "permissions": {
  25408. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25409. }
  25410. },
  25411. "required": ["id", "request", "mode", "hidden", "permissions"],
  25412. "additionalProperties": false
  25413. },
  25414. "SessionV2Info": {
  25415. "type": "object",
  25416. "properties": {
  25417. "id": {
  25418. "type": "string",
  25419. "pattern": "^ses"
  25420. },
  25421. "parentID": {
  25422. "type": "string",
  25423. "pattern": "^ses"
  25424. },
  25425. "projectID": {
  25426. "type": "string"
  25427. },
  25428. "agent": {
  25429. "type": "string"
  25430. },
  25431. "model": {
  25432. "type": "object",
  25433. "properties": {
  25434. "id": {
  25435. "type": "string"
  25436. },
  25437. "providerID": {
  25438. "type": "string"
  25439. },
  25440. "variant": {
  25441. "type": "string"
  25442. }
  25443. },
  25444. "required": ["id", "providerID"],
  25445. "additionalProperties": false
  25446. },
  25447. "cost": {
  25448. "type": "number"
  25449. },
  25450. "tokens": {
  25451. "type": "object",
  25452. "properties": {
  25453. "input": {
  25454. "type": "number"
  25455. },
  25456. "output": {
  25457. "type": "number"
  25458. },
  25459. "reasoning": {
  25460. "type": "number"
  25461. },
  25462. "cache": {
  25463. "type": "object",
  25464. "properties": {
  25465. "read": {
  25466. "type": "number"
  25467. },
  25468. "write": {
  25469. "type": "number"
  25470. }
  25471. },
  25472. "required": ["read", "write"],
  25473. "additionalProperties": false
  25474. }
  25475. },
  25476. "required": ["input", "output", "reasoning", "cache"],
  25477. "additionalProperties": false
  25478. },
  25479. "time": {
  25480. "type": "object",
  25481. "properties": {
  25482. "created": {
  25483. "type": "number"
  25484. },
  25485. "updated": {
  25486. "type": "number"
  25487. },
  25488. "archived": {
  25489. "type": "number"
  25490. }
  25491. },
  25492. "required": ["created", "updated"],
  25493. "additionalProperties": false
  25494. },
  25495. "title": {
  25496. "type": "string"
  25497. },
  25498. "location": {
  25499. "$ref": "#/components/schemas/LocationRef"
  25500. },
  25501. "subpath": {
  25502. "type": "string"
  25503. }
  25504. },
  25505. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25506. "additionalProperties": false
  25507. },
  25508. "SessionInputAdmitted": {
  25509. "type": "object",
  25510. "properties": {
  25511. "admittedSeq": {
  25512. "type": "integer",
  25513. "minimum": 0
  25514. },
  25515. "id": {
  25516. "type": "string",
  25517. "pattern": "^msg_"
  25518. },
  25519. "sessionID": {
  25520. "type": "string",
  25521. "pattern": "^ses"
  25522. },
  25523. "prompt": {
  25524. "$ref": "#/components/schemas/Prompt"
  25525. },
  25526. "delivery": {
  25527. "type": "string",
  25528. "enum": ["steer", "queue"]
  25529. },
  25530. "timeCreated": {
  25531. "type": "number"
  25532. },
  25533. "promotedSeq": {
  25534. "type": "integer",
  25535. "minimum": 0
  25536. }
  25537. },
  25538. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  25539. "additionalProperties": false
  25540. },
  25541. "SessionMessageAgentSwitched": {
  25542. "type": "object",
  25543. "properties": {
  25544. "id": {
  25545. "type": "string",
  25546. "pattern": "^msg_"
  25547. },
  25548. "metadata": {
  25549. "type": "object"
  25550. },
  25551. "time": {
  25552. "type": "object",
  25553. "properties": {
  25554. "created": {
  25555. "type": "number"
  25556. }
  25557. },
  25558. "required": ["created"],
  25559. "additionalProperties": false
  25560. },
  25561. "type": {
  25562. "type": "string",
  25563. "enum": ["agent-switched"]
  25564. },
  25565. "agent": {
  25566. "type": "string"
  25567. }
  25568. },
  25569. "required": ["id", "time", "type", "agent"],
  25570. "additionalProperties": false
  25571. },
  25572. "SessionMessageModelSwitched": {
  25573. "type": "object",
  25574. "properties": {
  25575. "id": {
  25576. "type": "string",
  25577. "pattern": "^msg_"
  25578. },
  25579. "metadata": {
  25580. "type": "object"
  25581. },
  25582. "time": {
  25583. "type": "object",
  25584. "properties": {
  25585. "created": {
  25586. "type": "number"
  25587. }
  25588. },
  25589. "required": ["created"],
  25590. "additionalProperties": false
  25591. },
  25592. "type": {
  25593. "type": "string",
  25594. "enum": ["model-switched"]
  25595. },
  25596. "model": {
  25597. "type": "object",
  25598. "properties": {
  25599. "id": {
  25600. "type": "string"
  25601. },
  25602. "providerID": {
  25603. "type": "string"
  25604. },
  25605. "variant": {
  25606. "type": "string"
  25607. }
  25608. },
  25609. "required": ["id", "providerID"],
  25610. "additionalProperties": false
  25611. }
  25612. },
  25613. "required": ["id", "time", "type", "model"],
  25614. "additionalProperties": false
  25615. },
  25616. "SessionMessageUser": {
  25617. "type": "object",
  25618. "properties": {
  25619. "id": {
  25620. "type": "string",
  25621. "pattern": "^msg_"
  25622. },
  25623. "metadata": {
  25624. "type": "object"
  25625. },
  25626. "time": {
  25627. "type": "object",
  25628. "properties": {
  25629. "created": {
  25630. "type": "number"
  25631. }
  25632. },
  25633. "required": ["created"],
  25634. "additionalProperties": false
  25635. },
  25636. "text": {
  25637. "type": "string"
  25638. },
  25639. "files": {
  25640. "type": "array",
  25641. "items": {
  25642. "$ref": "#/components/schemas/PromptFileAttachment"
  25643. }
  25644. },
  25645. "agents": {
  25646. "type": "array",
  25647. "items": {
  25648. "$ref": "#/components/schemas/PromptAgentAttachment"
  25649. }
  25650. },
  25651. "type": {
  25652. "type": "string",
  25653. "enum": ["user"]
  25654. }
  25655. },
  25656. "required": ["id", "time", "text", "type"],
  25657. "additionalProperties": false
  25658. },
  25659. "SessionMessageSynthetic": {
  25660. "type": "object",
  25661. "properties": {
  25662. "id": {
  25663. "type": "string",
  25664. "pattern": "^msg_"
  25665. },
  25666. "metadata": {
  25667. "type": "object"
  25668. },
  25669. "time": {
  25670. "type": "object",
  25671. "properties": {
  25672. "created": {
  25673. "type": "number"
  25674. }
  25675. },
  25676. "required": ["created"],
  25677. "additionalProperties": false
  25678. },
  25679. "sessionID": {
  25680. "type": "string",
  25681. "pattern": "^ses"
  25682. },
  25683. "text": {
  25684. "type": "string"
  25685. },
  25686. "type": {
  25687. "type": "string",
  25688. "enum": ["synthetic"]
  25689. }
  25690. },
  25691. "required": ["id", "time", "sessionID", "text", "type"],
  25692. "additionalProperties": false
  25693. },
  25694. "SessionMessageSystem": {
  25695. "type": "object",
  25696. "properties": {
  25697. "id": {
  25698. "type": "string",
  25699. "pattern": "^msg_"
  25700. },
  25701. "metadata": {
  25702. "type": "object"
  25703. },
  25704. "time": {
  25705. "type": "object",
  25706. "properties": {
  25707. "created": {
  25708. "type": "number"
  25709. }
  25710. },
  25711. "required": ["created"],
  25712. "additionalProperties": false
  25713. },
  25714. "type": {
  25715. "type": "string",
  25716. "enum": ["system"]
  25717. },
  25718. "text": {
  25719. "type": "string"
  25720. }
  25721. },
  25722. "required": ["id", "time", "type", "text"],
  25723. "additionalProperties": false
  25724. },
  25725. "SessionMessageShell": {
  25726. "type": "object",
  25727. "properties": {
  25728. "id": {
  25729. "type": "string",
  25730. "pattern": "^msg_"
  25731. },
  25732. "metadata": {
  25733. "type": "object"
  25734. },
  25735. "time": {
  25736. "type": "object",
  25737. "properties": {
  25738. "created": {
  25739. "type": "number"
  25740. },
  25741. "completed": {
  25742. "type": "number"
  25743. }
  25744. },
  25745. "required": ["created"],
  25746. "additionalProperties": false
  25747. },
  25748. "type": {
  25749. "type": "string",
  25750. "enum": ["shell"]
  25751. },
  25752. "callID": {
  25753. "type": "string"
  25754. },
  25755. "command": {
  25756. "type": "string"
  25757. },
  25758. "output": {
  25759. "type": "string"
  25760. }
  25761. },
  25762. "required": ["id", "time", "type", "callID", "command", "output"],
  25763. "additionalProperties": false
  25764. },
  25765. "SessionMessageAssistantText": {
  25766. "type": "object",
  25767. "properties": {
  25768. "type": {
  25769. "type": "string",
  25770. "enum": ["text"]
  25771. },
  25772. "id": {
  25773. "type": "string"
  25774. },
  25775. "text": {
  25776. "type": "string"
  25777. }
  25778. },
  25779. "required": ["type", "id", "text"],
  25780. "additionalProperties": false
  25781. },
  25782. "SessionMessageAssistantReasoning": {
  25783. "type": "object",
  25784. "properties": {
  25785. "type": {
  25786. "type": "string",
  25787. "enum": ["reasoning"]
  25788. },
  25789. "id": {
  25790. "type": "string"
  25791. },
  25792. "text": {
  25793. "type": "string"
  25794. },
  25795. "providerMetadata": {
  25796. "type": "object",
  25797. "additionalProperties": {
  25798. "type": "object"
  25799. }
  25800. }
  25801. },
  25802. "required": ["type", "id", "text"],
  25803. "additionalProperties": false
  25804. },
  25805. "SessionMessageToolStatePending": {
  25806. "type": "object",
  25807. "properties": {
  25808. "status": {
  25809. "type": "string",
  25810. "enum": ["pending"]
  25811. },
  25812. "input": {
  25813. "type": "string"
  25814. }
  25815. },
  25816. "required": ["status", "input"],
  25817. "additionalProperties": false
  25818. },
  25819. "SessionMessageToolStateRunning": {
  25820. "type": "object",
  25821. "properties": {
  25822. "status": {
  25823. "type": "string",
  25824. "enum": ["running"]
  25825. },
  25826. "input": {
  25827. "type": "object"
  25828. },
  25829. "structured": {
  25830. "type": "object"
  25831. },
  25832. "content": {
  25833. "type": "array",
  25834. "items": {
  25835. "anyOf": [
  25836. {
  25837. "$ref": "#/components/schemas/ToolTextContent"
  25838. },
  25839. {
  25840. "$ref": "#/components/schemas/ToolFileContent"
  25841. }
  25842. ]
  25843. }
  25844. }
  25845. },
  25846. "required": ["status", "input", "structured", "content"],
  25847. "additionalProperties": false
  25848. },
  25849. "SessionMessageToolStateCompleted": {
  25850. "type": "object",
  25851. "properties": {
  25852. "status": {
  25853. "type": "string",
  25854. "enum": ["completed"]
  25855. },
  25856. "input": {
  25857. "type": "object"
  25858. },
  25859. "attachments": {
  25860. "type": "array",
  25861. "items": {
  25862. "$ref": "#/components/schemas/PromptFileAttachment"
  25863. }
  25864. },
  25865. "content": {
  25866. "type": "array",
  25867. "items": {
  25868. "anyOf": [
  25869. {
  25870. "$ref": "#/components/schemas/ToolTextContent"
  25871. },
  25872. {
  25873. "$ref": "#/components/schemas/ToolFileContent"
  25874. }
  25875. ]
  25876. }
  25877. },
  25878. "outputPaths": {
  25879. "type": "array",
  25880. "items": {
  25881. "type": "string"
  25882. }
  25883. },
  25884. "structured": {
  25885. "type": "object"
  25886. },
  25887. "result": {}
  25888. },
  25889. "required": ["status", "input", "content", "structured"],
  25890. "additionalProperties": false
  25891. },
  25892. "SessionMessageToolStateError": {
  25893. "type": "object",
  25894. "properties": {
  25895. "status": {
  25896. "type": "string",
  25897. "enum": ["error"]
  25898. },
  25899. "input": {
  25900. "type": "object"
  25901. },
  25902. "content": {
  25903. "type": "array",
  25904. "items": {
  25905. "anyOf": [
  25906. {
  25907. "$ref": "#/components/schemas/ToolTextContent"
  25908. },
  25909. {
  25910. "$ref": "#/components/schemas/ToolFileContent"
  25911. }
  25912. ]
  25913. }
  25914. },
  25915. "structured": {
  25916. "type": "object"
  25917. },
  25918. "error": {
  25919. "$ref": "#/components/schemas/SessionErrorUnknown"
  25920. },
  25921. "result": {}
  25922. },
  25923. "required": ["status", "input", "content", "structured", "error"],
  25924. "additionalProperties": false
  25925. },
  25926. "SessionMessageAssistantTool": {
  25927. "type": "object",
  25928. "properties": {
  25929. "type": {
  25930. "type": "string",
  25931. "enum": ["tool"]
  25932. },
  25933. "id": {
  25934. "type": "string"
  25935. },
  25936. "name": {
  25937. "type": "string"
  25938. },
  25939. "provider": {
  25940. "type": "object",
  25941. "properties": {
  25942. "executed": {
  25943. "type": "boolean"
  25944. },
  25945. "metadata": {
  25946. "type": "object",
  25947. "additionalProperties": {
  25948. "type": "object"
  25949. }
  25950. },
  25951. "resultMetadata": {
  25952. "type": "object",
  25953. "additionalProperties": {
  25954. "type": "object"
  25955. }
  25956. }
  25957. },
  25958. "required": ["executed"],
  25959. "additionalProperties": false
  25960. },
  25961. "state": {
  25962. "anyOf": [
  25963. {
  25964. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  25965. },
  25966. {
  25967. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  25968. },
  25969. {
  25970. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  25971. },
  25972. {
  25973. "$ref": "#/components/schemas/SessionMessageToolStateError"
  25974. }
  25975. ]
  25976. },
  25977. "time": {
  25978. "type": "object",
  25979. "properties": {
  25980. "created": {
  25981. "type": "number"
  25982. },
  25983. "ran": {
  25984. "type": "number"
  25985. },
  25986. "completed": {
  25987. "type": "number"
  25988. },
  25989. "pruned": {
  25990. "type": "number"
  25991. }
  25992. },
  25993. "required": ["created"],
  25994. "additionalProperties": false
  25995. }
  25996. },
  25997. "required": ["type", "id", "name", "state", "time"],
  25998. "additionalProperties": false
  25999. },
  26000. "SessionMessageAssistant": {
  26001. "type": "object",
  26002. "properties": {
  26003. "id": {
  26004. "type": "string",
  26005. "pattern": "^msg_"
  26006. },
  26007. "metadata": {
  26008. "type": "object"
  26009. },
  26010. "time": {
  26011. "type": "object",
  26012. "properties": {
  26013. "created": {
  26014. "type": "number"
  26015. },
  26016. "completed": {
  26017. "type": "number"
  26018. }
  26019. },
  26020. "required": ["created"],
  26021. "additionalProperties": false
  26022. },
  26023. "type": {
  26024. "type": "string",
  26025. "enum": ["assistant"]
  26026. },
  26027. "agent": {
  26028. "type": "string"
  26029. },
  26030. "model": {
  26031. "type": "object",
  26032. "properties": {
  26033. "id": {
  26034. "type": "string"
  26035. },
  26036. "providerID": {
  26037. "type": "string"
  26038. },
  26039. "variant": {
  26040. "type": "string"
  26041. }
  26042. },
  26043. "required": ["id", "providerID"],
  26044. "additionalProperties": false
  26045. },
  26046. "content": {
  26047. "type": "array",
  26048. "items": {
  26049. "anyOf": [
  26050. {
  26051. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26052. },
  26053. {
  26054. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26055. },
  26056. {
  26057. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26058. }
  26059. ]
  26060. }
  26061. },
  26062. "snapshot": {
  26063. "type": "object",
  26064. "properties": {
  26065. "start": {
  26066. "type": "string"
  26067. },
  26068. "end": {
  26069. "type": "string"
  26070. }
  26071. },
  26072. "additionalProperties": false
  26073. },
  26074. "finish": {
  26075. "type": "string"
  26076. },
  26077. "cost": {
  26078. "type": "number"
  26079. },
  26080. "tokens": {
  26081. "type": "object",
  26082. "properties": {
  26083. "input": {
  26084. "type": "number"
  26085. },
  26086. "output": {
  26087. "type": "number"
  26088. },
  26089. "reasoning": {
  26090. "type": "number"
  26091. },
  26092. "cache": {
  26093. "type": "object",
  26094. "properties": {
  26095. "read": {
  26096. "type": "number"
  26097. },
  26098. "write": {
  26099. "type": "number"
  26100. }
  26101. },
  26102. "required": ["read", "write"],
  26103. "additionalProperties": false
  26104. }
  26105. },
  26106. "required": ["input", "output", "reasoning", "cache"],
  26107. "additionalProperties": false
  26108. },
  26109. "error": {
  26110. "$ref": "#/components/schemas/SessionErrorUnknown"
  26111. }
  26112. },
  26113. "required": ["id", "time", "type", "agent", "model", "content"],
  26114. "additionalProperties": false
  26115. },
  26116. "SessionMessageCompaction": {
  26117. "type": "object",
  26118. "properties": {
  26119. "type": {
  26120. "type": "string",
  26121. "enum": ["compaction"]
  26122. },
  26123. "reason": {
  26124. "type": "string",
  26125. "enum": ["auto", "manual"]
  26126. },
  26127. "summary": {
  26128. "type": "string"
  26129. },
  26130. "recent": {
  26131. "type": "string"
  26132. },
  26133. "id": {
  26134. "type": "string",
  26135. "pattern": "^msg_"
  26136. },
  26137. "metadata": {
  26138. "type": "object"
  26139. },
  26140. "time": {
  26141. "type": "object",
  26142. "properties": {
  26143. "created": {
  26144. "type": "number"
  26145. }
  26146. },
  26147. "required": ["created"],
  26148. "additionalProperties": false
  26149. }
  26150. },
  26151. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26152. "additionalProperties": false
  26153. },
  26154. "SessionMessage": {
  26155. "anyOf": [
  26156. {
  26157. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26158. },
  26159. {
  26160. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26161. },
  26162. {
  26163. "$ref": "#/components/schemas/SessionMessageUser"
  26164. },
  26165. {
  26166. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26167. },
  26168. {
  26169. "$ref": "#/components/schemas/SessionMessageSystem"
  26170. },
  26171. {
  26172. "$ref": "#/components/schemas/SessionMessageShell"
  26173. },
  26174. {
  26175. "$ref": "#/components/schemas/SessionMessageAssistant"
  26176. },
  26177. {
  26178. "$ref": "#/components/schemas/SessionMessageCompaction"
  26179. }
  26180. ]
  26181. },
  26182. "ProviderV2Info": {
  26183. "type": "object",
  26184. "properties": {
  26185. "id": {
  26186. "type": "string"
  26187. },
  26188. "name": {
  26189. "type": "string"
  26190. },
  26191. "enabled": {
  26192. "anyOf": [
  26193. {
  26194. "type": "boolean",
  26195. "enum": [false]
  26196. },
  26197. {
  26198. "type": "object",
  26199. "properties": {
  26200. "via": {
  26201. "type": "string",
  26202. "enum": ["env"]
  26203. },
  26204. "name": {
  26205. "type": "string"
  26206. }
  26207. },
  26208. "required": ["via", "name"],
  26209. "additionalProperties": false
  26210. },
  26211. {
  26212. "type": "object",
  26213. "properties": {
  26214. "via": {
  26215. "type": "string",
  26216. "enum": ["credential"]
  26217. },
  26218. "credentialID": {
  26219. "type": "string"
  26220. }
  26221. },
  26222. "required": ["via", "credentialID"],
  26223. "additionalProperties": false
  26224. },
  26225. {
  26226. "type": "object",
  26227. "properties": {
  26228. "via": {
  26229. "type": "string",
  26230. "enum": ["custom"]
  26231. },
  26232. "data": {
  26233. "type": "object"
  26234. }
  26235. },
  26236. "required": ["via", "data"],
  26237. "additionalProperties": false
  26238. }
  26239. ]
  26240. },
  26241. "env": {
  26242. "type": "array",
  26243. "items": {
  26244. "type": "string"
  26245. }
  26246. },
  26247. "api": {
  26248. "anyOf": [
  26249. {
  26250. "type": "object",
  26251. "properties": {
  26252. "type": {
  26253. "type": "string",
  26254. "enum": ["aisdk"]
  26255. },
  26256. "package": {
  26257. "type": "string"
  26258. },
  26259. "url": {
  26260. "type": "string"
  26261. },
  26262. "settings": {
  26263. "type": "object"
  26264. }
  26265. },
  26266. "required": ["type", "package"],
  26267. "additionalProperties": false
  26268. },
  26269. {
  26270. "type": "object",
  26271. "properties": {
  26272. "type": {
  26273. "type": "string",
  26274. "enum": ["native"]
  26275. },
  26276. "url": {
  26277. "type": "string"
  26278. },
  26279. "settings": {
  26280. "type": "object"
  26281. }
  26282. },
  26283. "required": ["type", "settings"],
  26284. "additionalProperties": false
  26285. }
  26286. ]
  26287. },
  26288. "request": {
  26289. "type": "object",
  26290. "properties": {
  26291. "headers": {
  26292. "type": "object",
  26293. "additionalProperties": {
  26294. "type": "string"
  26295. }
  26296. },
  26297. "body": {
  26298. "type": "object"
  26299. }
  26300. },
  26301. "required": ["headers", "body"],
  26302. "additionalProperties": false
  26303. }
  26304. },
  26305. "required": ["id", "name", "enabled", "env", "api", "request"],
  26306. "additionalProperties": false
  26307. },
  26308. "IntegrationWhen": {
  26309. "type": "object",
  26310. "properties": {
  26311. "key": {
  26312. "type": "string"
  26313. },
  26314. "op": {
  26315. "type": "string",
  26316. "enum": ["eq", "neq"]
  26317. },
  26318. "value": {
  26319. "type": "string"
  26320. }
  26321. },
  26322. "required": ["key", "op", "value"],
  26323. "additionalProperties": false
  26324. },
  26325. "IntegrationTextPrompt": {
  26326. "type": "object",
  26327. "properties": {
  26328. "type": {
  26329. "type": "string",
  26330. "enum": ["text"]
  26331. },
  26332. "key": {
  26333. "type": "string"
  26334. },
  26335. "message": {
  26336. "type": "string"
  26337. },
  26338. "placeholder": {
  26339. "type": "string"
  26340. },
  26341. "when": {
  26342. "$ref": "#/components/schemas/IntegrationWhen"
  26343. }
  26344. },
  26345. "required": ["type", "key", "message"],
  26346. "additionalProperties": false
  26347. },
  26348. "IntegrationSelectPrompt": {
  26349. "type": "object",
  26350. "properties": {
  26351. "type": {
  26352. "type": "string",
  26353. "enum": ["select"]
  26354. },
  26355. "key": {
  26356. "type": "string"
  26357. },
  26358. "message": {
  26359. "type": "string"
  26360. },
  26361. "options": {
  26362. "type": "array",
  26363. "items": {
  26364. "type": "object",
  26365. "properties": {
  26366. "label": {
  26367. "type": "string"
  26368. },
  26369. "value": {
  26370. "type": "string"
  26371. },
  26372. "hint": {
  26373. "type": "string"
  26374. }
  26375. },
  26376. "required": ["label", "value"],
  26377. "additionalProperties": false
  26378. }
  26379. },
  26380. "when": {
  26381. "$ref": "#/components/schemas/IntegrationWhen"
  26382. }
  26383. },
  26384. "required": ["type", "key", "message", "options"],
  26385. "additionalProperties": false
  26386. },
  26387. "IntegrationOAuthMethod": {
  26388. "type": "object",
  26389. "properties": {
  26390. "id": {
  26391. "type": "string"
  26392. },
  26393. "type": {
  26394. "type": "string",
  26395. "enum": ["oauth"]
  26396. },
  26397. "label": {
  26398. "type": "string"
  26399. },
  26400. "prompts": {
  26401. "type": "array",
  26402. "items": {
  26403. "anyOf": [
  26404. {
  26405. "$ref": "#/components/schemas/IntegrationTextPrompt"
  26406. },
  26407. {
  26408. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  26409. }
  26410. ]
  26411. }
  26412. }
  26413. },
  26414. "required": ["id", "type", "label"],
  26415. "additionalProperties": false
  26416. },
  26417. "IntegrationKeyMethod": {
  26418. "type": "object",
  26419. "properties": {
  26420. "type": {
  26421. "type": "string",
  26422. "enum": ["key"]
  26423. },
  26424. "label": {
  26425. "type": "string"
  26426. }
  26427. },
  26428. "required": ["type"],
  26429. "additionalProperties": false
  26430. },
  26431. "IntegrationEnvMethod": {
  26432. "type": "object",
  26433. "properties": {
  26434. "type": {
  26435. "type": "string",
  26436. "enum": ["env"]
  26437. },
  26438. "names": {
  26439. "type": "array",
  26440. "items": {
  26441. "type": "string"
  26442. }
  26443. }
  26444. },
  26445. "required": ["type", "names"],
  26446. "additionalProperties": false
  26447. },
  26448. "ConnectionCredentialInfo": {
  26449. "type": "object",
  26450. "properties": {
  26451. "type": {
  26452. "type": "string",
  26453. "enum": ["credential"]
  26454. },
  26455. "id": {
  26456. "type": "string"
  26457. },
  26458. "label": {
  26459. "type": "string"
  26460. }
  26461. },
  26462. "required": ["type", "id", "label"],
  26463. "additionalProperties": false
  26464. },
  26465. "ConnectionEnvInfo": {
  26466. "type": "object",
  26467. "properties": {
  26468. "type": {
  26469. "type": "string",
  26470. "enum": ["env"]
  26471. },
  26472. "name": {
  26473. "type": "string"
  26474. }
  26475. },
  26476. "required": ["type", "name"],
  26477. "additionalProperties": false
  26478. },
  26479. "ConnectionInfo": {
  26480. "anyOf": [
  26481. {
  26482. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  26483. },
  26484. {
  26485. "$ref": "#/components/schemas/ConnectionEnvInfo"
  26486. }
  26487. ]
  26488. },
  26489. "IntegrationInfo": {
  26490. "type": "object",
  26491. "properties": {
  26492. "id": {
  26493. "type": "string"
  26494. },
  26495. "name": {
  26496. "type": "string"
  26497. },
  26498. "methods": {
  26499. "type": "array",
  26500. "items": {
  26501. "anyOf": [
  26502. {
  26503. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  26504. },
  26505. {
  26506. "$ref": "#/components/schemas/IntegrationKeyMethod"
  26507. },
  26508. {
  26509. "$ref": "#/components/schemas/IntegrationEnvMethod"
  26510. }
  26511. ]
  26512. }
  26513. },
  26514. "connections": {
  26515. "type": "array",
  26516. "items": {
  26517. "$ref": "#/components/schemas/ConnectionInfo"
  26518. }
  26519. }
  26520. },
  26521. "required": ["id", "name", "methods", "connections"],
  26522. "additionalProperties": false
  26523. },
  26524. "IntegrationAttempt": {
  26525. "type": "object",
  26526. "properties": {
  26527. "attemptID": {
  26528. "type": "string"
  26529. },
  26530. "url": {
  26531. "type": "string"
  26532. },
  26533. "instructions": {
  26534. "type": "string"
  26535. },
  26536. "mode": {
  26537. "type": "string",
  26538. "enum": ["auto", "code"]
  26539. },
  26540. "time": {
  26541. "type": "object",
  26542. "properties": {
  26543. "created": {
  26544. "anyOf": [
  26545. {
  26546. "type": "number"
  26547. },
  26548. {
  26549. "type": "string",
  26550. "enum": ["NaN"]
  26551. },
  26552. {
  26553. "type": "string",
  26554. "enum": ["Infinity"]
  26555. },
  26556. {
  26557. "type": "string",
  26558. "enum": ["-Infinity"]
  26559. },
  26560. {
  26561. "type": "string",
  26562. "enum": ["Infinity", "-Infinity", "NaN"]
  26563. }
  26564. ]
  26565. },
  26566. "expires": {
  26567. "anyOf": [
  26568. {
  26569. "type": "number"
  26570. },
  26571. {
  26572. "type": "string",
  26573. "enum": ["NaN"]
  26574. },
  26575. {
  26576. "type": "string",
  26577. "enum": ["Infinity"]
  26578. },
  26579. {
  26580. "type": "string",
  26581. "enum": ["-Infinity"]
  26582. },
  26583. {
  26584. "type": "string",
  26585. "enum": ["Infinity", "-Infinity", "NaN"]
  26586. }
  26587. ]
  26588. }
  26589. },
  26590. "required": ["created", "expires"],
  26591. "additionalProperties": false
  26592. }
  26593. },
  26594. "required": ["attemptID", "url", "instructions", "mode", "time"],
  26595. "additionalProperties": false
  26596. },
  26597. "PermissionV2Request": {
  26598. "type": "object",
  26599. "properties": {
  26600. "id": {
  26601. "type": "string",
  26602. "pattern": "^per"
  26603. },
  26604. "sessionID": {
  26605. "type": "string",
  26606. "pattern": "^ses"
  26607. },
  26608. "action": {
  26609. "type": "string"
  26610. },
  26611. "resources": {
  26612. "type": "array",
  26613. "items": {
  26614. "type": "string"
  26615. }
  26616. },
  26617. "save": {
  26618. "type": "array",
  26619. "items": {
  26620. "type": "string"
  26621. }
  26622. },
  26623. "metadata": {
  26624. "type": "object"
  26625. },
  26626. "source": {
  26627. "$ref": "#/components/schemas/PermissionV2Source"
  26628. }
  26629. },
  26630. "required": ["id", "sessionID", "action", "resources"],
  26631. "additionalProperties": false
  26632. },
  26633. "PermissionSavedInfo": {
  26634. "type": "object",
  26635. "properties": {
  26636. "id": {
  26637. "type": "string"
  26638. },
  26639. "projectID": {
  26640. "type": "string"
  26641. },
  26642. "action": {
  26643. "type": "string"
  26644. },
  26645. "resource": {
  26646. "type": "string"
  26647. }
  26648. },
  26649. "required": ["id", "projectID", "action", "resource"],
  26650. "additionalProperties": false
  26651. },
  26652. "FileSystemEntry": {
  26653. "type": "object",
  26654. "properties": {
  26655. "path": {
  26656. "type": "string"
  26657. },
  26658. "type": {
  26659. "type": "string",
  26660. "enum": ["file", "directory"]
  26661. },
  26662. "mime": {
  26663. "type": "string"
  26664. }
  26665. },
  26666. "required": ["path", "type", "mime"],
  26667. "additionalProperties": false
  26668. },
  26669. "CommandV2Info": {
  26670. "type": "object",
  26671. "properties": {
  26672. "name": {
  26673. "type": "string"
  26674. },
  26675. "template": {
  26676. "type": "string"
  26677. },
  26678. "description": {
  26679. "type": "string"
  26680. },
  26681. "agent": {
  26682. "type": "string"
  26683. },
  26684. "model": {
  26685. "type": "object",
  26686. "properties": {
  26687. "id": {
  26688. "type": "string"
  26689. },
  26690. "providerID": {
  26691. "type": "string"
  26692. },
  26693. "variant": {
  26694. "type": "string"
  26695. }
  26696. },
  26697. "required": ["id", "providerID"],
  26698. "additionalProperties": false
  26699. },
  26700. "subtask": {
  26701. "type": "boolean"
  26702. }
  26703. },
  26704. "required": ["name", "template"],
  26705. "additionalProperties": false
  26706. },
  26707. "SkillV2Info": {
  26708. "type": "object",
  26709. "properties": {
  26710. "name": {
  26711. "type": "string"
  26712. },
  26713. "description": {
  26714. "type": "string"
  26715. },
  26716. "slash": {
  26717. "type": "boolean"
  26718. },
  26719. "location": {
  26720. "type": "string"
  26721. },
  26722. "content": {
  26723. "type": "string"
  26724. }
  26725. },
  26726. "required": ["name", "location", "content"],
  26727. "additionalProperties": false
  26728. },
  26729. "QuestionV2Request": {
  26730. "type": "object",
  26731. "properties": {
  26732. "id": {
  26733. "type": "string",
  26734. "pattern": "^que"
  26735. },
  26736. "sessionID": {
  26737. "type": "string",
  26738. "pattern": "^ses"
  26739. },
  26740. "questions": {
  26741. "type": "array",
  26742. "items": {
  26743. "$ref": "#/components/schemas/QuestionV2Info"
  26744. },
  26745. "description": "Questions to ask"
  26746. },
  26747. "tool": {
  26748. "$ref": "#/components/schemas/QuestionV2Tool"
  26749. }
  26750. },
  26751. "required": ["id", "sessionID", "questions"],
  26752. "additionalProperties": false
  26753. },
  26754. "QuestionV2Reply": {
  26755. "type": "object",
  26756. "properties": {
  26757. "answers": {
  26758. "type": "array",
  26759. "items": {
  26760. "$ref": "#/components/schemas/QuestionV2Answer"
  26761. },
  26762. "description": "User answers in order of questions (each answer is an array of selected labels)"
  26763. }
  26764. },
  26765. "required": ["answers"],
  26766. "additionalProperties": false
  26767. },
  26768. "ReferenceLocalSource": {
  26769. "type": "object",
  26770. "properties": {
  26771. "type": {
  26772. "type": "string",
  26773. "enum": ["local"]
  26774. },
  26775. "path": {
  26776. "type": "string"
  26777. },
  26778. "description": {
  26779. "type": "string"
  26780. },
  26781. "hidden": {
  26782. "type": "boolean"
  26783. }
  26784. },
  26785. "required": ["type", "path"],
  26786. "additionalProperties": false
  26787. },
  26788. "ReferenceGitSource": {
  26789. "type": "object",
  26790. "properties": {
  26791. "type": {
  26792. "type": "string",
  26793. "enum": ["git"]
  26794. },
  26795. "repository": {
  26796. "type": "string"
  26797. },
  26798. "branch": {
  26799. "type": "string"
  26800. },
  26801. "description": {
  26802. "type": "string"
  26803. },
  26804. "hidden": {
  26805. "type": "boolean"
  26806. }
  26807. },
  26808. "required": ["type", "repository"],
  26809. "additionalProperties": false
  26810. },
  26811. "ReferenceInfo": {
  26812. "type": "object",
  26813. "properties": {
  26814. "name": {
  26815. "type": "string"
  26816. },
  26817. "path": {
  26818. "type": "string"
  26819. },
  26820. "description": {
  26821. "type": "string"
  26822. },
  26823. "hidden": {
  26824. "type": "boolean"
  26825. },
  26826. "source": {
  26827. "anyOf": [
  26828. {
  26829. "$ref": "#/components/schemas/ReferenceLocalSource"
  26830. },
  26831. {
  26832. "$ref": "#/components/schemas/ReferenceGitSource"
  26833. }
  26834. ]
  26835. }
  26836. },
  26837. "required": ["name", "path", "source"],
  26838. "additionalProperties": false
  26839. },
  26840. "ProjectCopyCopy": {
  26841. "type": "object",
  26842. "properties": {
  26843. "directory": {
  26844. "type": "string"
  26845. }
  26846. },
  26847. "required": ["directory"],
  26848. "additionalProperties": false
  26849. },
  26850. "EventModels-devRefreshed": {
  26851. "type": "object",
  26852. "properties": {
  26853. "id": {
  26854. "type": "string",
  26855. "pattern": "^evt_"
  26856. },
  26857. "type": {
  26858. "type": "string",
  26859. "enum": ["models-dev.refreshed"]
  26860. },
  26861. "properties": {
  26862. "type": "object",
  26863. "properties": {}
  26864. }
  26865. },
  26866. "required": ["id", "type", "properties"],
  26867. "additionalProperties": false
  26868. },
  26869. "EventPluginAdded": {
  26870. "type": "object",
  26871. "properties": {
  26872. "id": {
  26873. "type": "string",
  26874. "pattern": "^evt_"
  26875. },
  26876. "type": {
  26877. "type": "string",
  26878. "enum": ["plugin.added"]
  26879. },
  26880. "properties": {
  26881. "type": "object",
  26882. "properties": {
  26883. "id": {
  26884. "type": "string"
  26885. }
  26886. },
  26887. "required": ["id"],
  26888. "additionalProperties": false
  26889. }
  26890. },
  26891. "required": ["id", "type", "properties"],
  26892. "additionalProperties": false
  26893. },
  26894. "ModelV2Info1": {
  26895. "type": "object",
  26896. "properties": {
  26897. "id": {
  26898. "type": "string"
  26899. },
  26900. "providerID": {
  26901. "type": "string"
  26902. },
  26903. "family": {
  26904. "type": "string"
  26905. },
  26906. "name": {
  26907. "type": "string"
  26908. },
  26909. "api": {
  26910. "anyOf": [
  26911. {
  26912. "type": "object",
  26913. "properties": {
  26914. "id": {
  26915. "type": "string"
  26916. },
  26917. "type": {
  26918. "type": "string",
  26919. "enum": ["aisdk"]
  26920. },
  26921. "package": {
  26922. "type": "string"
  26923. },
  26924. "url": {
  26925. "type": "string"
  26926. },
  26927. "settings": {
  26928. "type": "object"
  26929. }
  26930. },
  26931. "required": ["id", "type", "package"],
  26932. "additionalProperties": false
  26933. },
  26934. {
  26935. "type": "object",
  26936. "properties": {
  26937. "id": {
  26938. "type": "string"
  26939. },
  26940. "type": {
  26941. "type": "string",
  26942. "enum": ["native"]
  26943. },
  26944. "url": {
  26945. "type": "string"
  26946. },
  26947. "settings": {
  26948. "type": "object"
  26949. }
  26950. },
  26951. "required": ["id", "type", "settings"],
  26952. "additionalProperties": false
  26953. }
  26954. ]
  26955. },
  26956. "capabilities": {
  26957. "type": "object",
  26958. "properties": {
  26959. "tools": {
  26960. "type": "boolean"
  26961. },
  26962. "input": {
  26963. "type": "array",
  26964. "items": {
  26965. "type": "string"
  26966. }
  26967. },
  26968. "output": {
  26969. "type": "array",
  26970. "items": {
  26971. "type": "string"
  26972. }
  26973. }
  26974. },
  26975. "required": ["tools", "input", "output"],
  26976. "additionalProperties": false
  26977. },
  26978. "request": {
  26979. "type": "object",
  26980. "properties": {
  26981. "headers": {
  26982. "type": "object",
  26983. "additionalProperties": {
  26984. "type": "string"
  26985. }
  26986. },
  26987. "body": {
  26988. "type": "object"
  26989. },
  26990. "generation": {
  26991. "type": "object",
  26992. "properties": {
  26993. "maxTokens": {
  26994. "anyOf": [
  26995. {
  26996. "type": "number"
  26997. },
  26998. {
  26999. "type": "string",
  27000. "enum": ["NaN"]
  27001. },
  27002. {
  27003. "type": "string",
  27004. "enum": ["Infinity"]
  27005. },
  27006. {
  27007. "type": "string",
  27008. "enum": ["-Infinity"]
  27009. }
  27010. ]
  27011. },
  27012. "temperature": {
  27013. "anyOf": [
  27014. {
  27015. "type": "number"
  27016. },
  27017. {
  27018. "type": "string",
  27019. "enum": ["NaN"]
  27020. },
  27021. {
  27022. "type": "string",
  27023. "enum": ["Infinity"]
  27024. },
  27025. {
  27026. "type": "string",
  27027. "enum": ["-Infinity"]
  27028. }
  27029. ]
  27030. },
  27031. "topP": {
  27032. "anyOf": [
  27033. {
  27034. "type": "number"
  27035. },
  27036. {
  27037. "type": "string",
  27038. "enum": ["NaN"]
  27039. },
  27040. {
  27041. "type": "string",
  27042. "enum": ["Infinity"]
  27043. },
  27044. {
  27045. "type": "string",
  27046. "enum": ["-Infinity"]
  27047. }
  27048. ]
  27049. },
  27050. "topK": {
  27051. "anyOf": [
  27052. {
  27053. "type": "number"
  27054. },
  27055. {
  27056. "type": "string",
  27057. "enum": ["NaN"]
  27058. },
  27059. {
  27060. "type": "string",
  27061. "enum": ["Infinity"]
  27062. },
  27063. {
  27064. "type": "string",
  27065. "enum": ["-Infinity"]
  27066. }
  27067. ]
  27068. },
  27069. "frequencyPenalty": {
  27070. "anyOf": [
  27071. {
  27072. "type": "number"
  27073. },
  27074. {
  27075. "type": "string",
  27076. "enum": ["NaN"]
  27077. },
  27078. {
  27079. "type": "string",
  27080. "enum": ["Infinity"]
  27081. },
  27082. {
  27083. "type": "string",
  27084. "enum": ["-Infinity"]
  27085. }
  27086. ]
  27087. },
  27088. "presencePenalty": {
  27089. "anyOf": [
  27090. {
  27091. "type": "number"
  27092. },
  27093. {
  27094. "type": "string",
  27095. "enum": ["NaN"]
  27096. },
  27097. {
  27098. "type": "string",
  27099. "enum": ["Infinity"]
  27100. },
  27101. {
  27102. "type": "string",
  27103. "enum": ["-Infinity"]
  27104. }
  27105. ]
  27106. },
  27107. "seed": {
  27108. "anyOf": [
  27109. {
  27110. "type": "number"
  27111. },
  27112. {
  27113. "type": "string",
  27114. "enum": ["NaN"]
  27115. },
  27116. {
  27117. "type": "string",
  27118. "enum": ["Infinity"]
  27119. },
  27120. {
  27121. "type": "string",
  27122. "enum": ["-Infinity"]
  27123. }
  27124. ]
  27125. },
  27126. "stop": {
  27127. "type": "array",
  27128. "items": {
  27129. "type": "string"
  27130. }
  27131. }
  27132. },
  27133. "additionalProperties": false
  27134. },
  27135. "options": {
  27136. "type": "object"
  27137. },
  27138. "variant": {
  27139. "type": "string"
  27140. }
  27141. },
  27142. "required": ["headers", "body"],
  27143. "additionalProperties": false
  27144. },
  27145. "variants": {
  27146. "type": "array",
  27147. "items": {
  27148. "type": "object",
  27149. "properties": {
  27150. "id": {
  27151. "type": "string"
  27152. },
  27153. "headers": {
  27154. "type": "object",
  27155. "additionalProperties": {
  27156. "type": "string"
  27157. }
  27158. },
  27159. "body": {
  27160. "type": "object"
  27161. },
  27162. "generation": {
  27163. "type": "object",
  27164. "properties": {
  27165. "maxTokens": {
  27166. "anyOf": [
  27167. {
  27168. "type": "number"
  27169. },
  27170. {
  27171. "type": "string",
  27172. "enum": ["NaN"]
  27173. },
  27174. {
  27175. "type": "string",
  27176. "enum": ["Infinity"]
  27177. },
  27178. {
  27179. "type": "string",
  27180. "enum": ["-Infinity"]
  27181. }
  27182. ]
  27183. },
  27184. "temperature": {
  27185. "anyOf": [
  27186. {
  27187. "type": "number"
  27188. },
  27189. {
  27190. "type": "string",
  27191. "enum": ["NaN"]
  27192. },
  27193. {
  27194. "type": "string",
  27195. "enum": ["Infinity"]
  27196. },
  27197. {
  27198. "type": "string",
  27199. "enum": ["-Infinity"]
  27200. }
  27201. ]
  27202. },
  27203. "topP": {
  27204. "anyOf": [
  27205. {
  27206. "type": "number"
  27207. },
  27208. {
  27209. "type": "string",
  27210. "enum": ["NaN"]
  27211. },
  27212. {
  27213. "type": "string",
  27214. "enum": ["Infinity"]
  27215. },
  27216. {
  27217. "type": "string",
  27218. "enum": ["-Infinity"]
  27219. }
  27220. ]
  27221. },
  27222. "topK": {
  27223. "anyOf": [
  27224. {
  27225. "type": "number"
  27226. },
  27227. {
  27228. "type": "string",
  27229. "enum": ["NaN"]
  27230. },
  27231. {
  27232. "type": "string",
  27233. "enum": ["Infinity"]
  27234. },
  27235. {
  27236. "type": "string",
  27237. "enum": ["-Infinity"]
  27238. }
  27239. ]
  27240. },
  27241. "frequencyPenalty": {
  27242. "anyOf": [
  27243. {
  27244. "type": "number"
  27245. },
  27246. {
  27247. "type": "string",
  27248. "enum": ["NaN"]
  27249. },
  27250. {
  27251. "type": "string",
  27252. "enum": ["Infinity"]
  27253. },
  27254. {
  27255. "type": "string",
  27256. "enum": ["-Infinity"]
  27257. }
  27258. ]
  27259. },
  27260. "presencePenalty": {
  27261. "anyOf": [
  27262. {
  27263. "type": "number"
  27264. },
  27265. {
  27266. "type": "string",
  27267. "enum": ["NaN"]
  27268. },
  27269. {
  27270. "type": "string",
  27271. "enum": ["Infinity"]
  27272. },
  27273. {
  27274. "type": "string",
  27275. "enum": ["-Infinity"]
  27276. }
  27277. ]
  27278. },
  27279. "seed": {
  27280. "anyOf": [
  27281. {
  27282. "type": "number"
  27283. },
  27284. {
  27285. "type": "string",
  27286. "enum": ["NaN"]
  27287. },
  27288. {
  27289. "type": "string",
  27290. "enum": ["Infinity"]
  27291. },
  27292. {
  27293. "type": "string",
  27294. "enum": ["-Infinity"]
  27295. }
  27296. ]
  27297. },
  27298. "stop": {
  27299. "type": "array",
  27300. "items": {
  27301. "type": "string"
  27302. }
  27303. }
  27304. },
  27305. "additionalProperties": false
  27306. },
  27307. "options": {
  27308. "type": "object"
  27309. }
  27310. },
  27311. "required": ["id", "headers", "body"],
  27312. "additionalProperties": false
  27313. }
  27314. },
  27315. "time": {
  27316. "type": "object",
  27317. "properties": {
  27318. "released": {
  27319. "anyOf": [
  27320. {
  27321. "type": "number"
  27322. },
  27323. {
  27324. "type": "string",
  27325. "enum": ["NaN"]
  27326. },
  27327. {
  27328. "type": "string",
  27329. "enum": ["Infinity"]
  27330. },
  27331. {
  27332. "type": "string",
  27333. "enum": ["-Infinity"]
  27334. }
  27335. ]
  27336. }
  27337. },
  27338. "required": ["released"],
  27339. "additionalProperties": false
  27340. },
  27341. "cost": {
  27342. "type": "array",
  27343. "items": {
  27344. "type": "object",
  27345. "properties": {
  27346. "tier": {
  27347. "type": "object",
  27348. "properties": {
  27349. "type": {
  27350. "type": "string",
  27351. "enum": ["context"]
  27352. },
  27353. "size": {
  27354. "type": "integer"
  27355. }
  27356. },
  27357. "required": ["type", "size"],
  27358. "additionalProperties": false
  27359. },
  27360. "input": {
  27361. "type": "number"
  27362. },
  27363. "output": {
  27364. "type": "number"
  27365. },
  27366. "cache": {
  27367. "type": "object",
  27368. "properties": {
  27369. "read": {
  27370. "type": "number"
  27371. },
  27372. "write": {
  27373. "type": "number"
  27374. }
  27375. },
  27376. "required": ["read", "write"],
  27377. "additionalProperties": false
  27378. }
  27379. },
  27380. "required": ["input", "output", "cache"],
  27381. "additionalProperties": false
  27382. }
  27383. },
  27384. "status": {
  27385. "type": "string",
  27386. "enum": ["alpha", "beta", "deprecated", "active"]
  27387. },
  27388. "enabled": {
  27389. "type": "boolean"
  27390. },
  27391. "limit": {
  27392. "type": "object",
  27393. "properties": {
  27394. "context": {
  27395. "type": "integer"
  27396. },
  27397. "input": {
  27398. "type": "integer"
  27399. },
  27400. "output": {
  27401. "type": "integer"
  27402. }
  27403. },
  27404. "required": ["context", "output"],
  27405. "additionalProperties": false
  27406. }
  27407. },
  27408. "required": [
  27409. "id",
  27410. "providerID",
  27411. "name",
  27412. "api",
  27413. "capabilities",
  27414. "request",
  27415. "variants",
  27416. "time",
  27417. "cost",
  27418. "status",
  27419. "enabled",
  27420. "limit"
  27421. ],
  27422. "additionalProperties": false
  27423. },
  27424. "EventCatalogModelUpdated": {
  27425. "type": "object",
  27426. "properties": {
  27427. "id": {
  27428. "type": "string",
  27429. "pattern": "^evt_"
  27430. },
  27431. "type": {
  27432. "type": "string",
  27433. "enum": ["catalog.model.updated"]
  27434. },
  27435. "properties": {
  27436. "type": "object",
  27437. "properties": {
  27438. "model": {
  27439. "$ref": "#/components/schemas/ModelV2Info1"
  27440. }
  27441. },
  27442. "required": ["model"],
  27443. "additionalProperties": false
  27444. }
  27445. },
  27446. "required": ["id", "type", "properties"],
  27447. "additionalProperties": false
  27448. },
  27449. "EventSessionCreated": {
  27450. "type": "object",
  27451. "properties": {
  27452. "id": {
  27453. "type": "string",
  27454. "pattern": "^evt_"
  27455. },
  27456. "type": {
  27457. "type": "string",
  27458. "enum": ["session.created"]
  27459. },
  27460. "properties": {
  27461. "type": "object",
  27462. "properties": {
  27463. "sessionID": {
  27464. "type": "string",
  27465. "pattern": "^ses"
  27466. },
  27467. "info": {
  27468. "$ref": "#/components/schemas/Session"
  27469. }
  27470. },
  27471. "required": ["sessionID", "info"],
  27472. "additionalProperties": false
  27473. }
  27474. },
  27475. "required": ["id", "type", "properties"],
  27476. "additionalProperties": false
  27477. },
  27478. "EventSessionUpdated": {
  27479. "type": "object",
  27480. "properties": {
  27481. "id": {
  27482. "type": "string",
  27483. "pattern": "^evt_"
  27484. },
  27485. "type": {
  27486. "type": "string",
  27487. "enum": ["session.updated"]
  27488. },
  27489. "properties": {
  27490. "type": "object",
  27491. "properties": {
  27492. "sessionID": {
  27493. "type": "string",
  27494. "pattern": "^ses"
  27495. },
  27496. "info": {
  27497. "$ref": "#/components/schemas/Session"
  27498. }
  27499. },
  27500. "required": ["sessionID", "info"],
  27501. "additionalProperties": false
  27502. }
  27503. },
  27504. "required": ["id", "type", "properties"],
  27505. "additionalProperties": false
  27506. },
  27507. "EventSessionDeleted": {
  27508. "type": "object",
  27509. "properties": {
  27510. "id": {
  27511. "type": "string",
  27512. "pattern": "^evt_"
  27513. },
  27514. "type": {
  27515. "type": "string",
  27516. "enum": ["session.deleted"]
  27517. },
  27518. "properties": {
  27519. "type": "object",
  27520. "properties": {
  27521. "sessionID": {
  27522. "type": "string",
  27523. "pattern": "^ses"
  27524. },
  27525. "info": {
  27526. "$ref": "#/components/schemas/Session"
  27527. }
  27528. },
  27529. "required": ["sessionID", "info"],
  27530. "additionalProperties": false
  27531. }
  27532. },
  27533. "required": ["id", "type", "properties"],
  27534. "additionalProperties": false
  27535. },
  27536. "EventMessageUpdated": {
  27537. "type": "object",
  27538. "properties": {
  27539. "id": {
  27540. "type": "string",
  27541. "pattern": "^evt_"
  27542. },
  27543. "type": {
  27544. "type": "string",
  27545. "enum": ["message.updated"]
  27546. },
  27547. "properties": {
  27548. "type": "object",
  27549. "properties": {
  27550. "sessionID": {
  27551. "type": "string",
  27552. "pattern": "^ses"
  27553. },
  27554. "info": {
  27555. "$ref": "#/components/schemas/Message"
  27556. }
  27557. },
  27558. "required": ["sessionID", "info"],
  27559. "additionalProperties": false
  27560. }
  27561. },
  27562. "required": ["id", "type", "properties"],
  27563. "additionalProperties": false
  27564. },
  27565. "EventMessageRemoved": {
  27566. "type": "object",
  27567. "properties": {
  27568. "id": {
  27569. "type": "string",
  27570. "pattern": "^evt_"
  27571. },
  27572. "type": {
  27573. "type": "string",
  27574. "enum": ["message.removed"]
  27575. },
  27576. "properties": {
  27577. "type": "object",
  27578. "properties": {
  27579. "sessionID": {
  27580. "type": "string",
  27581. "pattern": "^ses"
  27582. },
  27583. "messageID": {
  27584. "type": "string",
  27585. "pattern": "^msg"
  27586. }
  27587. },
  27588. "required": ["sessionID", "messageID"],
  27589. "additionalProperties": false
  27590. }
  27591. },
  27592. "required": ["id", "type", "properties"],
  27593. "additionalProperties": false
  27594. },
  27595. "EventMessagePartUpdated": {
  27596. "type": "object",
  27597. "properties": {
  27598. "id": {
  27599. "type": "string",
  27600. "pattern": "^evt_"
  27601. },
  27602. "type": {
  27603. "type": "string",
  27604. "enum": ["message.part.updated"]
  27605. },
  27606. "properties": {
  27607. "type": "object",
  27608. "properties": {
  27609. "sessionID": {
  27610. "type": "string",
  27611. "pattern": "^ses"
  27612. },
  27613. "part": {
  27614. "$ref": "#/components/schemas/Part"
  27615. },
  27616. "time": {
  27617. "type": "number"
  27618. }
  27619. },
  27620. "required": ["sessionID", "part", "time"],
  27621. "additionalProperties": false
  27622. }
  27623. },
  27624. "required": ["id", "type", "properties"],
  27625. "additionalProperties": false
  27626. },
  27627. "EventMessagePartRemoved": {
  27628. "type": "object",
  27629. "properties": {
  27630. "id": {
  27631. "type": "string",
  27632. "pattern": "^evt_"
  27633. },
  27634. "type": {
  27635. "type": "string",
  27636. "enum": ["message.part.removed"]
  27637. },
  27638. "properties": {
  27639. "type": "object",
  27640. "properties": {
  27641. "sessionID": {
  27642. "type": "string",
  27643. "pattern": "^ses"
  27644. },
  27645. "messageID": {
  27646. "type": "string",
  27647. "pattern": "^msg"
  27648. },
  27649. "partID": {
  27650. "type": "string",
  27651. "pattern": "^prt"
  27652. }
  27653. },
  27654. "required": ["sessionID", "messageID", "partID"],
  27655. "additionalProperties": false
  27656. }
  27657. },
  27658. "required": ["id", "type", "properties"],
  27659. "additionalProperties": false
  27660. },
  27661. "EventSessionNextAgentSwitched": {
  27662. "type": "object",
  27663. "properties": {
  27664. "id": {
  27665. "type": "string",
  27666. "pattern": "^evt_"
  27667. },
  27668. "type": {
  27669. "type": "string",
  27670. "enum": ["session.next.agent.switched"]
  27671. },
  27672. "properties": {
  27673. "type": "object",
  27674. "properties": {
  27675. "timestamp": {
  27676. "type": "number"
  27677. },
  27678. "sessionID": {
  27679. "type": "string",
  27680. "pattern": "^ses"
  27681. },
  27682. "messageID": {
  27683. "type": "string",
  27684. "pattern": "^msg_"
  27685. },
  27686. "agent": {
  27687. "type": "string"
  27688. }
  27689. },
  27690. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27691. "additionalProperties": false
  27692. }
  27693. },
  27694. "required": ["id", "type", "properties"],
  27695. "additionalProperties": false
  27696. },
  27697. "EventSessionNextModelSwitched": {
  27698. "type": "object",
  27699. "properties": {
  27700. "id": {
  27701. "type": "string",
  27702. "pattern": "^evt_"
  27703. },
  27704. "type": {
  27705. "type": "string",
  27706. "enum": ["session.next.model.switched"]
  27707. },
  27708. "properties": {
  27709. "type": "object",
  27710. "properties": {
  27711. "timestamp": {
  27712. "type": "number"
  27713. },
  27714. "sessionID": {
  27715. "type": "string",
  27716. "pattern": "^ses"
  27717. },
  27718. "messageID": {
  27719. "type": "string",
  27720. "pattern": "^msg_"
  27721. },
  27722. "model": {
  27723. "type": "object",
  27724. "properties": {
  27725. "id": {
  27726. "type": "string"
  27727. },
  27728. "providerID": {
  27729. "type": "string"
  27730. },
  27731. "variant": {
  27732. "type": "string"
  27733. }
  27734. },
  27735. "required": ["id", "providerID"],
  27736. "additionalProperties": false
  27737. }
  27738. },
  27739. "required": ["timestamp", "sessionID", "messageID", "model"],
  27740. "additionalProperties": false
  27741. }
  27742. },
  27743. "required": ["id", "type", "properties"],
  27744. "additionalProperties": false
  27745. },
  27746. "EventSessionNextMoved": {
  27747. "type": "object",
  27748. "properties": {
  27749. "id": {
  27750. "type": "string",
  27751. "pattern": "^evt_"
  27752. },
  27753. "type": {
  27754. "type": "string",
  27755. "enum": ["session.next.moved"]
  27756. },
  27757. "properties": {
  27758. "type": "object",
  27759. "properties": {
  27760. "timestamp": {
  27761. "type": "number"
  27762. },
  27763. "sessionID": {
  27764. "type": "string",
  27765. "pattern": "^ses"
  27766. },
  27767. "location": {
  27768. "$ref": "#/components/schemas/LocationRef"
  27769. },
  27770. "subdirectory": {
  27771. "type": "string"
  27772. }
  27773. },
  27774. "required": ["timestamp", "sessionID", "location"],
  27775. "additionalProperties": false
  27776. }
  27777. },
  27778. "required": ["id", "type", "properties"],
  27779. "additionalProperties": false
  27780. },
  27781. "EventSessionNextPrompted": {
  27782. "type": "object",
  27783. "properties": {
  27784. "id": {
  27785. "type": "string",
  27786. "pattern": "^evt_"
  27787. },
  27788. "type": {
  27789. "type": "string",
  27790. "enum": ["session.next.prompted"]
  27791. },
  27792. "properties": {
  27793. "type": "object",
  27794. "properties": {
  27795. "timestamp": {
  27796. "type": "number"
  27797. },
  27798. "sessionID": {
  27799. "type": "string",
  27800. "pattern": "^ses"
  27801. },
  27802. "messageID": {
  27803. "type": "string",
  27804. "pattern": "^msg_"
  27805. },
  27806. "prompt": {
  27807. "$ref": "#/components/schemas/Prompt"
  27808. },
  27809. "delivery": {
  27810. "type": "string",
  27811. "enum": ["steer", "queue"]
  27812. }
  27813. },
  27814. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27815. "additionalProperties": false
  27816. }
  27817. },
  27818. "required": ["id", "type", "properties"],
  27819. "additionalProperties": false
  27820. },
  27821. "EventSessionNextPromptAdmitted": {
  27822. "type": "object",
  27823. "properties": {
  27824. "id": {
  27825. "type": "string",
  27826. "pattern": "^evt_"
  27827. },
  27828. "type": {
  27829. "type": "string",
  27830. "enum": ["session.next.prompt.admitted"]
  27831. },
  27832. "properties": {
  27833. "type": "object",
  27834. "properties": {
  27835. "timestamp": {
  27836. "type": "number"
  27837. },
  27838. "sessionID": {
  27839. "type": "string",
  27840. "pattern": "^ses"
  27841. },
  27842. "messageID": {
  27843. "type": "string",
  27844. "pattern": "^msg_"
  27845. },
  27846. "prompt": {
  27847. "$ref": "#/components/schemas/Prompt"
  27848. },
  27849. "delivery": {
  27850. "type": "string",
  27851. "enum": ["steer", "queue"]
  27852. }
  27853. },
  27854. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27855. "additionalProperties": false
  27856. }
  27857. },
  27858. "required": ["id", "type", "properties"],
  27859. "additionalProperties": false
  27860. },
  27861. "EventSessionNextPromptPromoted": {
  27862. "type": "object",
  27863. "properties": {
  27864. "id": {
  27865. "type": "string",
  27866. "pattern": "^evt_"
  27867. },
  27868. "type": {
  27869. "type": "string",
  27870. "enum": ["session.next.prompt.promoted"]
  27871. },
  27872. "properties": {
  27873. "type": "object",
  27874. "properties": {
  27875. "timestamp": {
  27876. "type": "number"
  27877. },
  27878. "sessionID": {
  27879. "type": "string",
  27880. "pattern": "^ses"
  27881. },
  27882. "messageID": {
  27883. "type": "string",
  27884. "pattern": "^msg_"
  27885. },
  27886. "prompt": {
  27887. "$ref": "#/components/schemas/Prompt"
  27888. },
  27889. "timeCreated": {
  27890. "type": "number"
  27891. }
  27892. },
  27893. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  27894. "additionalProperties": false
  27895. }
  27896. },
  27897. "required": ["id", "type", "properties"],
  27898. "additionalProperties": false
  27899. },
  27900. "EventSessionNextInterruptRequested": {
  27901. "type": "object",
  27902. "properties": {
  27903. "id": {
  27904. "type": "string",
  27905. "pattern": "^evt_"
  27906. },
  27907. "type": {
  27908. "type": "string",
  27909. "enum": ["session.next.interrupt.requested"]
  27910. },
  27911. "properties": {
  27912. "type": "object",
  27913. "properties": {
  27914. "timestamp": {
  27915. "type": "number"
  27916. },
  27917. "sessionID": {
  27918. "type": "string",
  27919. "pattern": "^ses"
  27920. }
  27921. },
  27922. "required": ["timestamp", "sessionID"],
  27923. "additionalProperties": false
  27924. }
  27925. },
  27926. "required": ["id", "type", "properties"],
  27927. "additionalProperties": false
  27928. },
  27929. "EventSessionNextContextUpdated": {
  27930. "type": "object",
  27931. "properties": {
  27932. "id": {
  27933. "type": "string",
  27934. "pattern": "^evt_"
  27935. },
  27936. "type": {
  27937. "type": "string",
  27938. "enum": ["session.next.context.updated"]
  27939. },
  27940. "properties": {
  27941. "type": "object",
  27942. "properties": {
  27943. "timestamp": {
  27944. "type": "number"
  27945. },
  27946. "sessionID": {
  27947. "type": "string",
  27948. "pattern": "^ses"
  27949. },
  27950. "messageID": {
  27951. "type": "string",
  27952. "pattern": "^msg_"
  27953. },
  27954. "text": {
  27955. "type": "string"
  27956. }
  27957. },
  27958. "required": ["timestamp", "sessionID", "messageID", "text"],
  27959. "additionalProperties": false
  27960. }
  27961. },
  27962. "required": ["id", "type", "properties"],
  27963. "additionalProperties": false
  27964. },
  27965. "EventSessionNextSynthetic": {
  27966. "type": "object",
  27967. "properties": {
  27968. "id": {
  27969. "type": "string",
  27970. "pattern": "^evt_"
  27971. },
  27972. "type": {
  27973. "type": "string",
  27974. "enum": ["session.next.synthetic"]
  27975. },
  27976. "properties": {
  27977. "type": "object",
  27978. "properties": {
  27979. "timestamp": {
  27980. "type": "number"
  27981. },
  27982. "sessionID": {
  27983. "type": "string",
  27984. "pattern": "^ses"
  27985. },
  27986. "messageID": {
  27987. "type": "string",
  27988. "pattern": "^msg_"
  27989. },
  27990. "text": {
  27991. "type": "string"
  27992. }
  27993. },
  27994. "required": ["timestamp", "sessionID", "messageID", "text"],
  27995. "additionalProperties": false
  27996. }
  27997. },
  27998. "required": ["id", "type", "properties"],
  27999. "additionalProperties": false
  28000. },
  28001. "EventSessionNextShellStarted": {
  28002. "type": "object",
  28003. "properties": {
  28004. "id": {
  28005. "type": "string",
  28006. "pattern": "^evt_"
  28007. },
  28008. "type": {
  28009. "type": "string",
  28010. "enum": ["session.next.shell.started"]
  28011. },
  28012. "properties": {
  28013. "type": "object",
  28014. "properties": {
  28015. "timestamp": {
  28016. "type": "number"
  28017. },
  28018. "sessionID": {
  28019. "type": "string",
  28020. "pattern": "^ses"
  28021. },
  28022. "messageID": {
  28023. "type": "string",
  28024. "pattern": "^msg_"
  28025. },
  28026. "callID": {
  28027. "type": "string"
  28028. },
  28029. "command": {
  28030. "type": "string"
  28031. }
  28032. },
  28033. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28034. "additionalProperties": false
  28035. }
  28036. },
  28037. "required": ["id", "type", "properties"],
  28038. "additionalProperties": false
  28039. },
  28040. "EventSessionNextShellEnded": {
  28041. "type": "object",
  28042. "properties": {
  28043. "id": {
  28044. "type": "string",
  28045. "pattern": "^evt_"
  28046. },
  28047. "type": {
  28048. "type": "string",
  28049. "enum": ["session.next.shell.ended"]
  28050. },
  28051. "properties": {
  28052. "type": "object",
  28053. "properties": {
  28054. "timestamp": {
  28055. "type": "number"
  28056. },
  28057. "sessionID": {
  28058. "type": "string",
  28059. "pattern": "^ses"
  28060. },
  28061. "callID": {
  28062. "type": "string"
  28063. },
  28064. "output": {
  28065. "type": "string"
  28066. }
  28067. },
  28068. "required": ["timestamp", "sessionID", "callID", "output"],
  28069. "additionalProperties": false
  28070. }
  28071. },
  28072. "required": ["id", "type", "properties"],
  28073. "additionalProperties": false
  28074. },
  28075. "EventSessionNextStepStarted": {
  28076. "type": "object",
  28077. "properties": {
  28078. "id": {
  28079. "type": "string",
  28080. "pattern": "^evt_"
  28081. },
  28082. "type": {
  28083. "type": "string",
  28084. "enum": ["session.next.step.started"]
  28085. },
  28086. "properties": {
  28087. "type": "object",
  28088. "properties": {
  28089. "timestamp": {
  28090. "type": "number"
  28091. },
  28092. "sessionID": {
  28093. "type": "string",
  28094. "pattern": "^ses"
  28095. },
  28096. "assistantMessageID": {
  28097. "type": "string",
  28098. "pattern": "^msg_"
  28099. },
  28100. "agent": {
  28101. "type": "string"
  28102. },
  28103. "model": {
  28104. "type": "object",
  28105. "properties": {
  28106. "id": {
  28107. "type": "string"
  28108. },
  28109. "providerID": {
  28110. "type": "string"
  28111. },
  28112. "variant": {
  28113. "type": "string"
  28114. }
  28115. },
  28116. "required": ["id", "providerID"],
  28117. "additionalProperties": false
  28118. },
  28119. "snapshot": {
  28120. "type": "string"
  28121. }
  28122. },
  28123. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28124. "additionalProperties": false
  28125. }
  28126. },
  28127. "required": ["id", "type", "properties"],
  28128. "additionalProperties": false
  28129. },
  28130. "EventSessionNextStepEnded": {
  28131. "type": "object",
  28132. "properties": {
  28133. "id": {
  28134. "type": "string",
  28135. "pattern": "^evt_"
  28136. },
  28137. "type": {
  28138. "type": "string",
  28139. "enum": ["session.next.step.ended"]
  28140. },
  28141. "properties": {
  28142. "type": "object",
  28143. "properties": {
  28144. "timestamp": {
  28145. "type": "number"
  28146. },
  28147. "sessionID": {
  28148. "type": "string",
  28149. "pattern": "^ses"
  28150. },
  28151. "assistantMessageID": {
  28152. "type": "string",
  28153. "pattern": "^msg_"
  28154. },
  28155. "finish": {
  28156. "type": "string"
  28157. },
  28158. "cost": {
  28159. "type": "number"
  28160. },
  28161. "tokens": {
  28162. "type": "object",
  28163. "properties": {
  28164. "input": {
  28165. "type": "number"
  28166. },
  28167. "output": {
  28168. "type": "number"
  28169. },
  28170. "reasoning": {
  28171. "type": "number"
  28172. },
  28173. "cache": {
  28174. "type": "object",
  28175. "properties": {
  28176. "read": {
  28177. "type": "number"
  28178. },
  28179. "write": {
  28180. "type": "number"
  28181. }
  28182. },
  28183. "required": ["read", "write"],
  28184. "additionalProperties": false
  28185. }
  28186. },
  28187. "required": ["input", "output", "reasoning", "cache"],
  28188. "additionalProperties": false
  28189. },
  28190. "snapshot": {
  28191. "type": "string"
  28192. }
  28193. },
  28194. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28195. "additionalProperties": false
  28196. }
  28197. },
  28198. "required": ["id", "type", "properties"],
  28199. "additionalProperties": false
  28200. },
  28201. "EventSessionNextStepFailed": {
  28202. "type": "object",
  28203. "properties": {
  28204. "id": {
  28205. "type": "string",
  28206. "pattern": "^evt_"
  28207. },
  28208. "type": {
  28209. "type": "string",
  28210. "enum": ["session.next.step.failed"]
  28211. },
  28212. "properties": {
  28213. "type": "object",
  28214. "properties": {
  28215. "timestamp": {
  28216. "type": "number"
  28217. },
  28218. "sessionID": {
  28219. "type": "string",
  28220. "pattern": "^ses"
  28221. },
  28222. "assistantMessageID": {
  28223. "type": "string",
  28224. "pattern": "^msg_"
  28225. },
  28226. "error": {
  28227. "$ref": "#/components/schemas/SessionErrorUnknown"
  28228. }
  28229. },
  28230. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28231. "additionalProperties": false
  28232. }
  28233. },
  28234. "required": ["id", "type", "properties"],
  28235. "additionalProperties": false
  28236. },
  28237. "EventSessionNextTextStarted": {
  28238. "type": "object",
  28239. "properties": {
  28240. "id": {
  28241. "type": "string",
  28242. "pattern": "^evt_"
  28243. },
  28244. "type": {
  28245. "type": "string",
  28246. "enum": ["session.next.text.started"]
  28247. },
  28248. "properties": {
  28249. "type": "object",
  28250. "properties": {
  28251. "timestamp": {
  28252. "type": "number"
  28253. },
  28254. "sessionID": {
  28255. "type": "string",
  28256. "pattern": "^ses"
  28257. },
  28258. "assistantMessageID": {
  28259. "type": "string",
  28260. "pattern": "^msg_"
  28261. },
  28262. "textID": {
  28263. "type": "string"
  28264. }
  28265. },
  28266. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28267. "additionalProperties": false
  28268. }
  28269. },
  28270. "required": ["id", "type", "properties"],
  28271. "additionalProperties": false
  28272. },
  28273. "EventSessionNextTextDelta": {
  28274. "type": "object",
  28275. "properties": {
  28276. "id": {
  28277. "type": "string",
  28278. "pattern": "^evt_"
  28279. },
  28280. "type": {
  28281. "type": "string",
  28282. "enum": ["session.next.text.delta"]
  28283. },
  28284. "properties": {
  28285. "type": "object",
  28286. "properties": {
  28287. "timestamp": {
  28288. "type": "number"
  28289. },
  28290. "sessionID": {
  28291. "type": "string",
  28292. "pattern": "^ses"
  28293. },
  28294. "assistantMessageID": {
  28295. "type": "string",
  28296. "pattern": "^msg_"
  28297. },
  28298. "textID": {
  28299. "type": "string"
  28300. },
  28301. "delta": {
  28302. "type": "string"
  28303. }
  28304. },
  28305. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28306. "additionalProperties": false
  28307. }
  28308. },
  28309. "required": ["id", "type", "properties"],
  28310. "additionalProperties": false
  28311. },
  28312. "EventSessionNextTextEnded": {
  28313. "type": "object",
  28314. "properties": {
  28315. "id": {
  28316. "type": "string",
  28317. "pattern": "^evt_"
  28318. },
  28319. "type": {
  28320. "type": "string",
  28321. "enum": ["session.next.text.ended"]
  28322. },
  28323. "properties": {
  28324. "type": "object",
  28325. "properties": {
  28326. "timestamp": {
  28327. "type": "number"
  28328. },
  28329. "sessionID": {
  28330. "type": "string",
  28331. "pattern": "^ses"
  28332. },
  28333. "assistantMessageID": {
  28334. "type": "string",
  28335. "pattern": "^msg_"
  28336. },
  28337. "textID": {
  28338. "type": "string"
  28339. },
  28340. "text": {
  28341. "type": "string"
  28342. }
  28343. },
  28344. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28345. "additionalProperties": false
  28346. }
  28347. },
  28348. "required": ["id", "type", "properties"],
  28349. "additionalProperties": false
  28350. },
  28351. "EventSessionNextReasoningStarted": {
  28352. "type": "object",
  28353. "properties": {
  28354. "id": {
  28355. "type": "string",
  28356. "pattern": "^evt_"
  28357. },
  28358. "type": {
  28359. "type": "string",
  28360. "enum": ["session.next.reasoning.started"]
  28361. },
  28362. "properties": {
  28363. "type": "object",
  28364. "properties": {
  28365. "timestamp": {
  28366. "type": "number"
  28367. },
  28368. "sessionID": {
  28369. "type": "string",
  28370. "pattern": "^ses"
  28371. },
  28372. "assistantMessageID": {
  28373. "type": "string",
  28374. "pattern": "^msg_"
  28375. },
  28376. "reasoningID": {
  28377. "type": "string"
  28378. },
  28379. "providerMetadata": {
  28380. "type": "object",
  28381. "additionalProperties": {
  28382. "type": "object"
  28383. }
  28384. }
  28385. },
  28386. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28387. "additionalProperties": false
  28388. }
  28389. },
  28390. "required": ["id", "type", "properties"],
  28391. "additionalProperties": false
  28392. },
  28393. "EventSessionNextReasoningDelta": {
  28394. "type": "object",
  28395. "properties": {
  28396. "id": {
  28397. "type": "string",
  28398. "pattern": "^evt_"
  28399. },
  28400. "type": {
  28401. "type": "string",
  28402. "enum": ["session.next.reasoning.delta"]
  28403. },
  28404. "properties": {
  28405. "type": "object",
  28406. "properties": {
  28407. "timestamp": {
  28408. "type": "number"
  28409. },
  28410. "sessionID": {
  28411. "type": "string",
  28412. "pattern": "^ses"
  28413. },
  28414. "assistantMessageID": {
  28415. "type": "string",
  28416. "pattern": "^msg_"
  28417. },
  28418. "reasoningID": {
  28419. "type": "string"
  28420. },
  28421. "delta": {
  28422. "type": "string"
  28423. }
  28424. },
  28425. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28426. "additionalProperties": false
  28427. }
  28428. },
  28429. "required": ["id", "type", "properties"],
  28430. "additionalProperties": false
  28431. },
  28432. "EventSessionNextReasoningEnded": {
  28433. "type": "object",
  28434. "properties": {
  28435. "id": {
  28436. "type": "string",
  28437. "pattern": "^evt_"
  28438. },
  28439. "type": {
  28440. "type": "string",
  28441. "enum": ["session.next.reasoning.ended"]
  28442. },
  28443. "properties": {
  28444. "type": "object",
  28445. "properties": {
  28446. "timestamp": {
  28447. "type": "number"
  28448. },
  28449. "sessionID": {
  28450. "type": "string",
  28451. "pattern": "^ses"
  28452. },
  28453. "assistantMessageID": {
  28454. "type": "string",
  28455. "pattern": "^msg_"
  28456. },
  28457. "reasoningID": {
  28458. "type": "string"
  28459. },
  28460. "text": {
  28461. "type": "string"
  28462. },
  28463. "providerMetadata": {
  28464. "type": "object",
  28465. "additionalProperties": {
  28466. "type": "object"
  28467. }
  28468. }
  28469. },
  28470. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28471. "additionalProperties": false
  28472. }
  28473. },
  28474. "required": ["id", "type", "properties"],
  28475. "additionalProperties": false
  28476. },
  28477. "EventSessionNextToolInputStarted": {
  28478. "type": "object",
  28479. "properties": {
  28480. "id": {
  28481. "type": "string",
  28482. "pattern": "^evt_"
  28483. },
  28484. "type": {
  28485. "type": "string",
  28486. "enum": ["session.next.tool.input.started"]
  28487. },
  28488. "properties": {
  28489. "type": "object",
  28490. "properties": {
  28491. "timestamp": {
  28492. "type": "number"
  28493. },
  28494. "sessionID": {
  28495. "type": "string",
  28496. "pattern": "^ses"
  28497. },
  28498. "assistantMessageID": {
  28499. "type": "string",
  28500. "pattern": "^msg_"
  28501. },
  28502. "callID": {
  28503. "type": "string"
  28504. },
  28505. "name": {
  28506. "type": "string"
  28507. }
  28508. },
  28509. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28510. "additionalProperties": false
  28511. }
  28512. },
  28513. "required": ["id", "type", "properties"],
  28514. "additionalProperties": false
  28515. },
  28516. "EventSessionNextToolInputDelta": {
  28517. "type": "object",
  28518. "properties": {
  28519. "id": {
  28520. "type": "string",
  28521. "pattern": "^evt_"
  28522. },
  28523. "type": {
  28524. "type": "string",
  28525. "enum": ["session.next.tool.input.delta"]
  28526. },
  28527. "properties": {
  28528. "type": "object",
  28529. "properties": {
  28530. "timestamp": {
  28531. "type": "number"
  28532. },
  28533. "sessionID": {
  28534. "type": "string",
  28535. "pattern": "^ses"
  28536. },
  28537. "assistantMessageID": {
  28538. "type": "string",
  28539. "pattern": "^msg_"
  28540. },
  28541. "callID": {
  28542. "type": "string"
  28543. },
  28544. "delta": {
  28545. "type": "string"
  28546. }
  28547. },
  28548. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28549. "additionalProperties": false
  28550. }
  28551. },
  28552. "required": ["id", "type", "properties"],
  28553. "additionalProperties": false
  28554. },
  28555. "EventSessionNextToolInputEnded": {
  28556. "type": "object",
  28557. "properties": {
  28558. "id": {
  28559. "type": "string",
  28560. "pattern": "^evt_"
  28561. },
  28562. "type": {
  28563. "type": "string",
  28564. "enum": ["session.next.tool.input.ended"]
  28565. },
  28566. "properties": {
  28567. "type": "object",
  28568. "properties": {
  28569. "timestamp": {
  28570. "type": "number"
  28571. },
  28572. "sessionID": {
  28573. "type": "string",
  28574. "pattern": "^ses"
  28575. },
  28576. "assistantMessageID": {
  28577. "type": "string",
  28578. "pattern": "^msg_"
  28579. },
  28580. "callID": {
  28581. "type": "string"
  28582. },
  28583. "text": {
  28584. "type": "string"
  28585. }
  28586. },
  28587. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28588. "additionalProperties": false
  28589. }
  28590. },
  28591. "required": ["id", "type", "properties"],
  28592. "additionalProperties": false
  28593. },
  28594. "EventSessionNextToolCalled": {
  28595. "type": "object",
  28596. "properties": {
  28597. "id": {
  28598. "type": "string",
  28599. "pattern": "^evt_"
  28600. },
  28601. "type": {
  28602. "type": "string",
  28603. "enum": ["session.next.tool.called"]
  28604. },
  28605. "properties": {
  28606. "type": "object",
  28607. "properties": {
  28608. "timestamp": {
  28609. "type": "number"
  28610. },
  28611. "sessionID": {
  28612. "type": "string",
  28613. "pattern": "^ses"
  28614. },
  28615. "assistantMessageID": {
  28616. "type": "string",
  28617. "pattern": "^msg_"
  28618. },
  28619. "callID": {
  28620. "type": "string"
  28621. },
  28622. "tool": {
  28623. "type": "string"
  28624. },
  28625. "input": {
  28626. "type": "object"
  28627. },
  28628. "provider": {
  28629. "type": "object",
  28630. "properties": {
  28631. "executed": {
  28632. "type": "boolean"
  28633. },
  28634. "metadata": {
  28635. "type": "object",
  28636. "additionalProperties": {
  28637. "type": "object"
  28638. }
  28639. }
  28640. },
  28641. "required": ["executed"],
  28642. "additionalProperties": false
  28643. }
  28644. },
  28645. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28646. "additionalProperties": false
  28647. }
  28648. },
  28649. "required": ["id", "type", "properties"],
  28650. "additionalProperties": false
  28651. },
  28652. "EventSessionNextToolProgress": {
  28653. "type": "object",
  28654. "properties": {
  28655. "id": {
  28656. "type": "string",
  28657. "pattern": "^evt_"
  28658. },
  28659. "type": {
  28660. "type": "string",
  28661. "enum": ["session.next.tool.progress"]
  28662. },
  28663. "properties": {
  28664. "type": "object",
  28665. "properties": {
  28666. "timestamp": {
  28667. "type": "number"
  28668. },
  28669. "sessionID": {
  28670. "type": "string",
  28671. "pattern": "^ses"
  28672. },
  28673. "assistantMessageID": {
  28674. "type": "string",
  28675. "pattern": "^msg_"
  28676. },
  28677. "callID": {
  28678. "type": "string"
  28679. },
  28680. "structured": {
  28681. "type": "object"
  28682. },
  28683. "content": {
  28684. "type": "array",
  28685. "items": {
  28686. "anyOf": [
  28687. {
  28688. "$ref": "#/components/schemas/ToolTextContent"
  28689. },
  28690. {
  28691. "$ref": "#/components/schemas/ToolFileContent"
  28692. }
  28693. ]
  28694. }
  28695. }
  28696. },
  28697. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28698. "additionalProperties": false
  28699. }
  28700. },
  28701. "required": ["id", "type", "properties"],
  28702. "additionalProperties": false
  28703. },
  28704. "EventSessionNextToolSuccess": {
  28705. "type": "object",
  28706. "properties": {
  28707. "id": {
  28708. "type": "string",
  28709. "pattern": "^evt_"
  28710. },
  28711. "type": {
  28712. "type": "string",
  28713. "enum": ["session.next.tool.success"]
  28714. },
  28715. "properties": {
  28716. "type": "object",
  28717. "properties": {
  28718. "timestamp": {
  28719. "type": "number"
  28720. },
  28721. "sessionID": {
  28722. "type": "string",
  28723. "pattern": "^ses"
  28724. },
  28725. "assistantMessageID": {
  28726. "type": "string",
  28727. "pattern": "^msg_"
  28728. },
  28729. "callID": {
  28730. "type": "string"
  28731. },
  28732. "structured": {
  28733. "type": "object"
  28734. },
  28735. "content": {
  28736. "type": "array",
  28737. "items": {
  28738. "anyOf": [
  28739. {
  28740. "$ref": "#/components/schemas/ToolTextContent"
  28741. },
  28742. {
  28743. "$ref": "#/components/schemas/ToolFileContent"
  28744. }
  28745. ]
  28746. }
  28747. },
  28748. "outputPaths": {
  28749. "type": "array",
  28750. "items": {
  28751. "type": "string"
  28752. }
  28753. },
  28754. "result": {},
  28755. "provider": {
  28756. "type": "object",
  28757. "properties": {
  28758. "executed": {
  28759. "type": "boolean"
  28760. },
  28761. "metadata": {
  28762. "type": "object",
  28763. "additionalProperties": {
  28764. "type": "object"
  28765. }
  28766. }
  28767. },
  28768. "required": ["executed"],
  28769. "additionalProperties": false
  28770. }
  28771. },
  28772. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  28773. "additionalProperties": false
  28774. }
  28775. },
  28776. "required": ["id", "type", "properties"],
  28777. "additionalProperties": false
  28778. },
  28779. "EventSessionNextToolFailed": {
  28780. "type": "object",
  28781. "properties": {
  28782. "id": {
  28783. "type": "string",
  28784. "pattern": "^evt_"
  28785. },
  28786. "type": {
  28787. "type": "string",
  28788. "enum": ["session.next.tool.failed"]
  28789. },
  28790. "properties": {
  28791. "type": "object",
  28792. "properties": {
  28793. "timestamp": {
  28794. "type": "number"
  28795. },
  28796. "sessionID": {
  28797. "type": "string",
  28798. "pattern": "^ses"
  28799. },
  28800. "assistantMessageID": {
  28801. "type": "string",
  28802. "pattern": "^msg_"
  28803. },
  28804. "callID": {
  28805. "type": "string"
  28806. },
  28807. "error": {
  28808. "$ref": "#/components/schemas/SessionErrorUnknown"
  28809. },
  28810. "result": {},
  28811. "provider": {
  28812. "type": "object",
  28813. "properties": {
  28814. "executed": {
  28815. "type": "boolean"
  28816. },
  28817. "metadata": {
  28818. "type": "object",
  28819. "additionalProperties": {
  28820. "type": "object"
  28821. }
  28822. }
  28823. },
  28824. "required": ["executed"],
  28825. "additionalProperties": false
  28826. }
  28827. },
  28828. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  28829. "additionalProperties": false
  28830. }
  28831. },
  28832. "required": ["id", "type", "properties"],
  28833. "additionalProperties": false
  28834. },
  28835. "EventSessionNextRetried": {
  28836. "type": "object",
  28837. "properties": {
  28838. "id": {
  28839. "type": "string",
  28840. "pattern": "^evt_"
  28841. },
  28842. "type": {
  28843. "type": "string",
  28844. "enum": ["session.next.retried"]
  28845. },
  28846. "properties": {
  28847. "type": "object",
  28848. "properties": {
  28849. "timestamp": {
  28850. "type": "number"
  28851. },
  28852. "sessionID": {
  28853. "type": "string",
  28854. "pattern": "^ses"
  28855. },
  28856. "attempt": {
  28857. "type": "number"
  28858. },
  28859. "error": {
  28860. "$ref": "#/components/schemas/SessionNextRetry_error"
  28861. }
  28862. },
  28863. "required": ["timestamp", "sessionID", "attempt", "error"],
  28864. "additionalProperties": false
  28865. }
  28866. },
  28867. "required": ["id", "type", "properties"],
  28868. "additionalProperties": false
  28869. },
  28870. "EventSessionNextCompactionStarted": {
  28871. "type": "object",
  28872. "properties": {
  28873. "id": {
  28874. "type": "string",
  28875. "pattern": "^evt_"
  28876. },
  28877. "type": {
  28878. "type": "string",
  28879. "enum": ["session.next.compaction.started"]
  28880. },
  28881. "properties": {
  28882. "type": "object",
  28883. "properties": {
  28884. "timestamp": {
  28885. "type": "number"
  28886. },
  28887. "sessionID": {
  28888. "type": "string",
  28889. "pattern": "^ses"
  28890. },
  28891. "messageID": {
  28892. "type": "string",
  28893. "pattern": "^msg_"
  28894. },
  28895. "reason": {
  28896. "type": "string",
  28897. "enum": ["auto", "manual"]
  28898. }
  28899. },
  28900. "required": ["timestamp", "sessionID", "messageID", "reason"],
  28901. "additionalProperties": false
  28902. }
  28903. },
  28904. "required": ["id", "type", "properties"],
  28905. "additionalProperties": false
  28906. },
  28907. "EventSessionNextCompactionDelta": {
  28908. "type": "object",
  28909. "properties": {
  28910. "id": {
  28911. "type": "string",
  28912. "pattern": "^evt_"
  28913. },
  28914. "type": {
  28915. "type": "string",
  28916. "enum": ["session.next.compaction.delta"]
  28917. },
  28918. "properties": {
  28919. "type": "object",
  28920. "properties": {
  28921. "timestamp": {
  28922. "type": "number"
  28923. },
  28924. "sessionID": {
  28925. "type": "string",
  28926. "pattern": "^ses"
  28927. },
  28928. "messageID": {
  28929. "type": "string",
  28930. "pattern": "^msg_"
  28931. },
  28932. "text": {
  28933. "type": "string"
  28934. }
  28935. },
  28936. "required": ["timestamp", "sessionID", "messageID", "text"],
  28937. "additionalProperties": false
  28938. }
  28939. },
  28940. "required": ["id", "type", "properties"],
  28941. "additionalProperties": false
  28942. },
  28943. "EventSessionNextCompactionEnded": {
  28944. "type": "object",
  28945. "properties": {
  28946. "id": {
  28947. "type": "string",
  28948. "pattern": "^evt_"
  28949. },
  28950. "type": {
  28951. "type": "string",
  28952. "enum": ["session.next.compaction.ended"]
  28953. },
  28954. "properties": {
  28955. "type": "object",
  28956. "properties": {
  28957. "timestamp": {
  28958. "type": "number"
  28959. },
  28960. "sessionID": {
  28961. "type": "string",
  28962. "pattern": "^ses"
  28963. },
  28964. "messageID": {
  28965. "type": "string",
  28966. "pattern": "^msg_"
  28967. },
  28968. "reason": {
  28969. "type": "string",
  28970. "enum": ["auto", "manual"]
  28971. },
  28972. "text": {
  28973. "type": "string"
  28974. },
  28975. "recent": {
  28976. "type": "string"
  28977. }
  28978. },
  28979. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  28980. "additionalProperties": false
  28981. }
  28982. },
  28983. "required": ["id", "type", "properties"],
  28984. "additionalProperties": false
  28985. },
  28986. "EventMessagePartDelta": {
  28987. "type": "object",
  28988. "properties": {
  28989. "id": {
  28990. "type": "string",
  28991. "pattern": "^evt_"
  28992. },
  28993. "type": {
  28994. "type": "string",
  28995. "enum": ["message.part.delta"]
  28996. },
  28997. "properties": {
  28998. "type": "object",
  28999. "properties": {
  29000. "sessionID": {
  29001. "type": "string",
  29002. "pattern": "^ses"
  29003. },
  29004. "messageID": {
  29005. "type": "string",
  29006. "pattern": "^msg"
  29007. },
  29008. "partID": {
  29009. "type": "string",
  29010. "pattern": "^prt"
  29011. },
  29012. "field": {
  29013. "type": "string"
  29014. },
  29015. "delta": {
  29016. "type": "string"
  29017. }
  29018. },
  29019. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29020. "additionalProperties": false
  29021. }
  29022. },
  29023. "required": ["id", "type", "properties"],
  29024. "additionalProperties": false
  29025. },
  29026. "EventSessionDiff": {
  29027. "type": "object",
  29028. "properties": {
  29029. "id": {
  29030. "type": "string",
  29031. "pattern": "^evt_"
  29032. },
  29033. "type": {
  29034. "type": "string",
  29035. "enum": ["session.diff"]
  29036. },
  29037. "properties": {
  29038. "type": "object",
  29039. "properties": {
  29040. "sessionID": {
  29041. "type": "string",
  29042. "pattern": "^ses"
  29043. },
  29044. "diff": {
  29045. "type": "array",
  29046. "items": {
  29047. "$ref": "#/components/schemas/SnapshotFileDiff"
  29048. }
  29049. }
  29050. },
  29051. "required": ["sessionID", "diff"],
  29052. "additionalProperties": false
  29053. }
  29054. },
  29055. "required": ["id", "type", "properties"],
  29056. "additionalProperties": false
  29057. },
  29058. "EventSessionError": {
  29059. "type": "object",
  29060. "properties": {
  29061. "id": {
  29062. "type": "string",
  29063. "pattern": "^evt_"
  29064. },
  29065. "type": {
  29066. "type": "string",
  29067. "enum": ["session.error"]
  29068. },
  29069. "properties": {
  29070. "type": "object",
  29071. "properties": {
  29072. "sessionID": {
  29073. "type": "string",
  29074. "pattern": "^ses"
  29075. },
  29076. "error": {
  29077. "anyOf": [
  29078. {
  29079. "$ref": "#/components/schemas/ProviderAuthError"
  29080. },
  29081. {
  29082. "$ref": "#/components/schemas/UnknownError"
  29083. },
  29084. {
  29085. "$ref": "#/components/schemas/MessageOutputLengthError"
  29086. },
  29087. {
  29088. "$ref": "#/components/schemas/MessageAbortedError"
  29089. },
  29090. {
  29091. "$ref": "#/components/schemas/StructuredOutputError"
  29092. },
  29093. {
  29094. "$ref": "#/components/schemas/ContextOverflowError"
  29095. },
  29096. {
  29097. "$ref": "#/components/schemas/ContentFilterError"
  29098. },
  29099. {
  29100. "$ref": "#/components/schemas/APIError"
  29101. }
  29102. ]
  29103. }
  29104. },
  29105. "additionalProperties": false
  29106. }
  29107. },
  29108. "required": ["id", "type", "properties"],
  29109. "additionalProperties": false
  29110. },
  29111. "EventInstallationUpdated": {
  29112. "type": "object",
  29113. "properties": {
  29114. "id": {
  29115. "type": "string",
  29116. "pattern": "^evt_"
  29117. },
  29118. "type": {
  29119. "type": "string",
  29120. "enum": ["installation.updated"]
  29121. },
  29122. "properties": {
  29123. "type": "object",
  29124. "properties": {
  29125. "version": {
  29126. "type": "string"
  29127. }
  29128. },
  29129. "required": ["version"],
  29130. "additionalProperties": false
  29131. }
  29132. },
  29133. "required": ["id", "type", "properties"],
  29134. "additionalProperties": false
  29135. },
  29136. "EventInstallationUpdate-available": {
  29137. "type": "object",
  29138. "properties": {
  29139. "id": {
  29140. "type": "string",
  29141. "pattern": "^evt_"
  29142. },
  29143. "type": {
  29144. "type": "string",
  29145. "enum": ["installation.update-available"]
  29146. },
  29147. "properties": {
  29148. "type": "object",
  29149. "properties": {
  29150. "version": {
  29151. "type": "string"
  29152. }
  29153. },
  29154. "required": ["version"],
  29155. "additionalProperties": false
  29156. }
  29157. },
  29158. "required": ["id", "type", "properties"],
  29159. "additionalProperties": false
  29160. },
  29161. "EventFileEdited": {
  29162. "type": "object",
  29163. "properties": {
  29164. "id": {
  29165. "type": "string",
  29166. "pattern": "^evt_"
  29167. },
  29168. "type": {
  29169. "type": "string",
  29170. "enum": ["file.edited"]
  29171. },
  29172. "properties": {
  29173. "type": "object",
  29174. "properties": {
  29175. "file": {
  29176. "type": "string"
  29177. }
  29178. },
  29179. "required": ["file"],
  29180. "additionalProperties": false
  29181. }
  29182. },
  29183. "required": ["id", "type", "properties"],
  29184. "additionalProperties": false
  29185. },
  29186. "EventIntegrationUpdated": {
  29187. "type": "object",
  29188. "properties": {
  29189. "id": {
  29190. "type": "string",
  29191. "pattern": "^evt_"
  29192. },
  29193. "type": {
  29194. "type": "string",
  29195. "enum": ["integration.updated"]
  29196. },
  29197. "properties": {
  29198. "type": "object",
  29199. "properties": {}
  29200. }
  29201. },
  29202. "required": ["id", "type", "properties"],
  29203. "additionalProperties": false
  29204. },
  29205. "EventPermissionV2Asked": {
  29206. "type": "object",
  29207. "properties": {
  29208. "id": {
  29209. "type": "string",
  29210. "pattern": "^evt_"
  29211. },
  29212. "type": {
  29213. "type": "string",
  29214. "enum": ["permission.v2.asked"]
  29215. },
  29216. "properties": {
  29217. "type": "object",
  29218. "properties": {
  29219. "id": {
  29220. "type": "string",
  29221. "pattern": "^per"
  29222. },
  29223. "sessionID": {
  29224. "type": "string",
  29225. "pattern": "^ses"
  29226. },
  29227. "action": {
  29228. "type": "string"
  29229. },
  29230. "resources": {
  29231. "type": "array",
  29232. "items": {
  29233. "type": "string"
  29234. }
  29235. },
  29236. "save": {
  29237. "type": "array",
  29238. "items": {
  29239. "type": "string"
  29240. }
  29241. },
  29242. "metadata": {
  29243. "type": "object"
  29244. },
  29245. "source": {
  29246. "$ref": "#/components/schemas/PermissionV2Source"
  29247. }
  29248. },
  29249. "required": ["id", "sessionID", "action", "resources"],
  29250. "additionalProperties": false
  29251. }
  29252. },
  29253. "required": ["id", "type", "properties"],
  29254. "additionalProperties": false
  29255. },
  29256. "EventPermissionV2Replied": {
  29257. "type": "object",
  29258. "properties": {
  29259. "id": {
  29260. "type": "string",
  29261. "pattern": "^evt_"
  29262. },
  29263. "type": {
  29264. "type": "string",
  29265. "enum": ["permission.v2.replied"]
  29266. },
  29267. "properties": {
  29268. "type": "object",
  29269. "properties": {
  29270. "sessionID": {
  29271. "type": "string",
  29272. "pattern": "^ses"
  29273. },
  29274. "requestID": {
  29275. "type": "string",
  29276. "pattern": "^per"
  29277. },
  29278. "reply": {
  29279. "$ref": "#/components/schemas/PermissionV2Reply"
  29280. }
  29281. },
  29282. "required": ["sessionID", "requestID", "reply"],
  29283. "additionalProperties": false
  29284. }
  29285. },
  29286. "required": ["id", "type", "properties"],
  29287. "additionalProperties": false
  29288. },
  29289. "EventReferenceUpdated": {
  29290. "type": "object",
  29291. "properties": {
  29292. "id": {
  29293. "type": "string",
  29294. "pattern": "^evt_"
  29295. },
  29296. "type": {
  29297. "type": "string",
  29298. "enum": ["reference.updated"]
  29299. },
  29300. "properties": {
  29301. "type": "object",
  29302. "properties": {}
  29303. }
  29304. },
  29305. "required": ["id", "type", "properties"],
  29306. "additionalProperties": false
  29307. },
  29308. "EventProjectDirectoriesUpdated": {
  29309. "type": "object",
  29310. "properties": {
  29311. "id": {
  29312. "type": "string",
  29313. "pattern": "^evt_"
  29314. },
  29315. "type": {
  29316. "type": "string",
  29317. "enum": ["project.directories.updated"]
  29318. },
  29319. "properties": {
  29320. "type": "object",
  29321. "properties": {
  29322. "projectID": {
  29323. "type": "string"
  29324. }
  29325. },
  29326. "required": ["projectID"],
  29327. "additionalProperties": false
  29328. }
  29329. },
  29330. "required": ["id", "type", "properties"],
  29331. "additionalProperties": false
  29332. },
  29333. "EventFileWatcherUpdated": {
  29334. "type": "object",
  29335. "properties": {
  29336. "id": {
  29337. "type": "string",
  29338. "pattern": "^evt_"
  29339. },
  29340. "type": {
  29341. "type": "string",
  29342. "enum": ["file.watcher.updated"]
  29343. },
  29344. "properties": {
  29345. "type": "object",
  29346. "properties": {
  29347. "file": {
  29348. "type": "string"
  29349. },
  29350. "event": {
  29351. "type": "string",
  29352. "enum": ["add", "change", "unlink"]
  29353. }
  29354. },
  29355. "required": ["file", "event"],
  29356. "additionalProperties": false
  29357. }
  29358. },
  29359. "required": ["id", "type", "properties"],
  29360. "additionalProperties": false
  29361. },
  29362. "EventPtyCreated": {
  29363. "type": "object",
  29364. "properties": {
  29365. "id": {
  29366. "type": "string",
  29367. "pattern": "^evt_"
  29368. },
  29369. "type": {
  29370. "type": "string",
  29371. "enum": ["pty.created"]
  29372. },
  29373. "properties": {
  29374. "type": "object",
  29375. "properties": {
  29376. "info": {
  29377. "$ref": "#/components/schemas/Pty"
  29378. }
  29379. },
  29380. "required": ["info"],
  29381. "additionalProperties": false
  29382. }
  29383. },
  29384. "required": ["id", "type", "properties"],
  29385. "additionalProperties": false
  29386. },
  29387. "EventPtyUpdated": {
  29388. "type": "object",
  29389. "properties": {
  29390. "id": {
  29391. "type": "string",
  29392. "pattern": "^evt_"
  29393. },
  29394. "type": {
  29395. "type": "string",
  29396. "enum": ["pty.updated"]
  29397. },
  29398. "properties": {
  29399. "type": "object",
  29400. "properties": {
  29401. "info": {
  29402. "$ref": "#/components/schemas/Pty"
  29403. }
  29404. },
  29405. "required": ["info"],
  29406. "additionalProperties": false
  29407. }
  29408. },
  29409. "required": ["id", "type", "properties"],
  29410. "additionalProperties": false
  29411. },
  29412. "EventPtyExited": {
  29413. "type": "object",
  29414. "properties": {
  29415. "id": {
  29416. "type": "string",
  29417. "pattern": "^evt_"
  29418. },
  29419. "type": {
  29420. "type": "string",
  29421. "enum": ["pty.exited"]
  29422. },
  29423. "properties": {
  29424. "type": "object",
  29425. "properties": {
  29426. "id": {
  29427. "type": "string",
  29428. "pattern": "^pty"
  29429. },
  29430. "exitCode": {
  29431. "type": "integer",
  29432. "minimum": 0
  29433. }
  29434. },
  29435. "required": ["id", "exitCode"],
  29436. "additionalProperties": false
  29437. }
  29438. },
  29439. "required": ["id", "type", "properties"],
  29440. "additionalProperties": false
  29441. },
  29442. "EventPtyDeleted": {
  29443. "type": "object",
  29444. "properties": {
  29445. "id": {
  29446. "type": "string",
  29447. "pattern": "^evt_"
  29448. },
  29449. "type": {
  29450. "type": "string",
  29451. "enum": ["pty.deleted"]
  29452. },
  29453. "properties": {
  29454. "type": "object",
  29455. "properties": {
  29456. "id": {
  29457. "type": "string",
  29458. "pattern": "^pty"
  29459. }
  29460. },
  29461. "required": ["id"],
  29462. "additionalProperties": false
  29463. }
  29464. },
  29465. "required": ["id", "type", "properties"],
  29466. "additionalProperties": false
  29467. },
  29468. "EventQuestionV2Asked": {
  29469. "type": "object",
  29470. "properties": {
  29471. "id": {
  29472. "type": "string",
  29473. "pattern": "^evt_"
  29474. },
  29475. "type": {
  29476. "type": "string",
  29477. "enum": ["question.v2.asked"]
  29478. },
  29479. "properties": {
  29480. "type": "object",
  29481. "properties": {
  29482. "id": {
  29483. "type": "string",
  29484. "pattern": "^que"
  29485. },
  29486. "sessionID": {
  29487. "type": "string",
  29488. "pattern": "^ses"
  29489. },
  29490. "questions": {
  29491. "type": "array",
  29492. "items": {
  29493. "$ref": "#/components/schemas/QuestionV2Info"
  29494. },
  29495. "description": "Questions to ask"
  29496. },
  29497. "tool": {
  29498. "$ref": "#/components/schemas/QuestionV2Tool"
  29499. }
  29500. },
  29501. "required": ["id", "sessionID", "questions"],
  29502. "additionalProperties": false
  29503. }
  29504. },
  29505. "required": ["id", "type", "properties"],
  29506. "additionalProperties": false
  29507. },
  29508. "EventQuestionV2Replied": {
  29509. "type": "object",
  29510. "properties": {
  29511. "id": {
  29512. "type": "string",
  29513. "pattern": "^evt_"
  29514. },
  29515. "type": {
  29516. "type": "string",
  29517. "enum": ["question.v2.replied"]
  29518. },
  29519. "properties": {
  29520. "type": "object",
  29521. "properties": {
  29522. "sessionID": {
  29523. "type": "string",
  29524. "pattern": "^ses"
  29525. },
  29526. "requestID": {
  29527. "type": "string",
  29528. "pattern": "^que"
  29529. },
  29530. "answers": {
  29531. "type": "array",
  29532. "items": {
  29533. "$ref": "#/components/schemas/QuestionV2Answer"
  29534. }
  29535. }
  29536. },
  29537. "required": ["sessionID", "requestID", "answers"],
  29538. "additionalProperties": false
  29539. }
  29540. },
  29541. "required": ["id", "type", "properties"],
  29542. "additionalProperties": false
  29543. },
  29544. "EventQuestionV2Rejected": {
  29545. "type": "object",
  29546. "properties": {
  29547. "id": {
  29548. "type": "string",
  29549. "pattern": "^evt_"
  29550. },
  29551. "type": {
  29552. "type": "string",
  29553. "enum": ["question.v2.rejected"]
  29554. },
  29555. "properties": {
  29556. "type": "object",
  29557. "properties": {
  29558. "sessionID": {
  29559. "type": "string",
  29560. "pattern": "^ses"
  29561. },
  29562. "requestID": {
  29563. "type": "string",
  29564. "pattern": "^que"
  29565. }
  29566. },
  29567. "required": ["sessionID", "requestID"],
  29568. "additionalProperties": false
  29569. }
  29570. },
  29571. "required": ["id", "type", "properties"],
  29572. "additionalProperties": false
  29573. },
  29574. "EventTodoUpdated": {
  29575. "type": "object",
  29576. "properties": {
  29577. "id": {
  29578. "type": "string",
  29579. "pattern": "^evt_"
  29580. },
  29581. "type": {
  29582. "type": "string",
  29583. "enum": ["todo.updated"]
  29584. },
  29585. "properties": {
  29586. "type": "object",
  29587. "properties": {
  29588. "sessionID": {
  29589. "type": "string",
  29590. "pattern": "^ses"
  29591. },
  29592. "todos": {
  29593. "type": "array",
  29594. "items": {
  29595. "$ref": "#/components/schemas/Todo"
  29596. }
  29597. }
  29598. },
  29599. "required": ["sessionID", "todos"],
  29600. "additionalProperties": false
  29601. }
  29602. },
  29603. "required": ["id", "type", "properties"],
  29604. "additionalProperties": false
  29605. },
  29606. "EventLspUpdated": {
  29607. "type": "object",
  29608. "properties": {
  29609. "id": {
  29610. "type": "string",
  29611. "pattern": "^evt_"
  29612. },
  29613. "type": {
  29614. "type": "string",
  29615. "enum": ["lsp.updated"]
  29616. },
  29617. "properties": {
  29618. "type": "object",
  29619. "properties": {}
  29620. }
  29621. },
  29622. "required": ["id", "type", "properties"],
  29623. "additionalProperties": false
  29624. },
  29625. "EventPermissionAsked": {
  29626. "type": "object",
  29627. "properties": {
  29628. "id": {
  29629. "type": "string",
  29630. "pattern": "^evt_"
  29631. },
  29632. "type": {
  29633. "type": "string",
  29634. "enum": ["permission.asked"]
  29635. },
  29636. "properties": {
  29637. "type": "object",
  29638. "properties": {
  29639. "id": {
  29640. "type": "string",
  29641. "pattern": "^per"
  29642. },
  29643. "sessionID": {
  29644. "type": "string",
  29645. "pattern": "^ses"
  29646. },
  29647. "permission": {
  29648. "type": "string"
  29649. },
  29650. "patterns": {
  29651. "type": "array",
  29652. "items": {
  29653. "type": "string"
  29654. }
  29655. },
  29656. "metadata": {
  29657. "type": "object"
  29658. },
  29659. "always": {
  29660. "type": "array",
  29661. "items": {
  29662. "type": "string"
  29663. }
  29664. },
  29665. "tool": {
  29666. "type": "object",
  29667. "properties": {
  29668. "messageID": {
  29669. "type": "string"
  29670. },
  29671. "callID": {
  29672. "type": "string"
  29673. }
  29674. },
  29675. "required": ["messageID", "callID"],
  29676. "additionalProperties": false
  29677. }
  29678. },
  29679. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  29680. "additionalProperties": false
  29681. }
  29682. },
  29683. "required": ["id", "type", "properties"],
  29684. "additionalProperties": false
  29685. },
  29686. "EventPermissionReplied": {
  29687. "type": "object",
  29688. "properties": {
  29689. "id": {
  29690. "type": "string",
  29691. "pattern": "^evt_"
  29692. },
  29693. "type": {
  29694. "type": "string",
  29695. "enum": ["permission.replied"]
  29696. },
  29697. "properties": {
  29698. "type": "object",
  29699. "properties": {
  29700. "sessionID": {
  29701. "type": "string",
  29702. "pattern": "^ses"
  29703. },
  29704. "requestID": {
  29705. "type": "string",
  29706. "pattern": "^per"
  29707. },
  29708. "reply": {
  29709. "type": "string",
  29710. "enum": ["once", "always", "reject"]
  29711. }
  29712. },
  29713. "required": ["sessionID", "requestID", "reply"],
  29714. "additionalProperties": false
  29715. }
  29716. },
  29717. "required": ["id", "type", "properties"],
  29718. "additionalProperties": false
  29719. },
  29720. "EventMcpToolsChanged": {
  29721. "type": "object",
  29722. "properties": {
  29723. "id": {
  29724. "type": "string",
  29725. "pattern": "^evt_"
  29726. },
  29727. "type": {
  29728. "type": "string",
  29729. "enum": ["mcp.tools.changed"]
  29730. },
  29731. "properties": {
  29732. "type": "object",
  29733. "properties": {
  29734. "server": {
  29735. "type": "string"
  29736. }
  29737. },
  29738. "required": ["server"],
  29739. "additionalProperties": false
  29740. }
  29741. },
  29742. "required": ["id", "type", "properties"],
  29743. "additionalProperties": false
  29744. },
  29745. "EventMcpBrowserOpenFailed": {
  29746. "type": "object",
  29747. "properties": {
  29748. "id": {
  29749. "type": "string",
  29750. "pattern": "^evt_"
  29751. },
  29752. "type": {
  29753. "type": "string",
  29754. "enum": ["mcp.browser.open.failed"]
  29755. },
  29756. "properties": {
  29757. "type": "object",
  29758. "properties": {
  29759. "mcpName": {
  29760. "type": "string"
  29761. },
  29762. "url": {
  29763. "type": "string"
  29764. }
  29765. },
  29766. "required": ["mcpName", "url"],
  29767. "additionalProperties": false
  29768. }
  29769. },
  29770. "required": ["id", "type", "properties"],
  29771. "additionalProperties": false
  29772. },
  29773. "EventCommandExecuted": {
  29774. "type": "object",
  29775. "properties": {
  29776. "id": {
  29777. "type": "string",
  29778. "pattern": "^evt_"
  29779. },
  29780. "type": {
  29781. "type": "string",
  29782. "enum": ["command.executed"]
  29783. },
  29784. "properties": {
  29785. "type": "object",
  29786. "properties": {
  29787. "name": {
  29788. "type": "string"
  29789. },
  29790. "sessionID": {
  29791. "type": "string",
  29792. "pattern": "^ses"
  29793. },
  29794. "arguments": {
  29795. "type": "string"
  29796. },
  29797. "messageID": {
  29798. "type": "string",
  29799. "pattern": "^msg"
  29800. }
  29801. },
  29802. "required": ["name", "sessionID", "arguments", "messageID"],
  29803. "additionalProperties": false
  29804. }
  29805. },
  29806. "required": ["id", "type", "properties"],
  29807. "additionalProperties": false
  29808. },
  29809. "EventProjectUpdated": {
  29810. "type": "object",
  29811. "properties": {
  29812. "id": {
  29813. "type": "string",
  29814. "pattern": "^evt_"
  29815. },
  29816. "type": {
  29817. "type": "string",
  29818. "enum": ["project.updated"]
  29819. },
  29820. "properties": {
  29821. "type": "object",
  29822. "properties": {
  29823. "id": {
  29824. "type": "string"
  29825. },
  29826. "worktree": {
  29827. "type": "string"
  29828. },
  29829. "vcs": {
  29830. "type": "string",
  29831. "enum": ["git"]
  29832. },
  29833. "name": {
  29834. "type": "string"
  29835. },
  29836. "icon": {
  29837. "type": "object",
  29838. "properties": {
  29839. "url": {
  29840. "type": "string"
  29841. },
  29842. "override": {
  29843. "type": "string"
  29844. },
  29845. "color": {
  29846. "type": "string"
  29847. }
  29848. },
  29849. "additionalProperties": false
  29850. },
  29851. "commands": {
  29852. "type": "object",
  29853. "properties": {
  29854. "start": {
  29855. "type": "string",
  29856. "description": "Startup script to run when creating a new workspace (worktree)"
  29857. }
  29858. },
  29859. "additionalProperties": false
  29860. },
  29861. "time": {
  29862. "type": "object",
  29863. "properties": {
  29864. "created": {
  29865. "type": "integer",
  29866. "minimum": 0
  29867. },
  29868. "updated": {
  29869. "type": "integer",
  29870. "minimum": 0
  29871. },
  29872. "initialized": {
  29873. "type": "integer",
  29874. "minimum": 0
  29875. }
  29876. },
  29877. "required": ["created", "updated"],
  29878. "additionalProperties": false
  29879. },
  29880. "sandboxes": {
  29881. "type": "array",
  29882. "items": {
  29883. "type": "string"
  29884. }
  29885. }
  29886. },
  29887. "required": ["id", "worktree", "time", "sandboxes"],
  29888. "additionalProperties": false
  29889. }
  29890. },
  29891. "required": ["id", "type", "properties"],
  29892. "additionalProperties": false
  29893. },
  29894. "EventSessionStatus": {
  29895. "type": "object",
  29896. "properties": {
  29897. "id": {
  29898. "type": "string",
  29899. "pattern": "^evt_"
  29900. },
  29901. "type": {
  29902. "type": "string",
  29903. "enum": ["session.status"]
  29904. },
  29905. "properties": {
  29906. "type": "object",
  29907. "properties": {
  29908. "sessionID": {
  29909. "type": "string",
  29910. "pattern": "^ses"
  29911. },
  29912. "status": {
  29913. "$ref": "#/components/schemas/SessionStatus"
  29914. }
  29915. },
  29916. "required": ["sessionID", "status"],
  29917. "additionalProperties": false
  29918. }
  29919. },
  29920. "required": ["id", "type", "properties"],
  29921. "additionalProperties": false
  29922. },
  29923. "EventSessionIdle": {
  29924. "type": "object",
  29925. "properties": {
  29926. "id": {
  29927. "type": "string",
  29928. "pattern": "^evt_"
  29929. },
  29930. "type": {
  29931. "type": "string",
  29932. "enum": ["session.idle"]
  29933. },
  29934. "properties": {
  29935. "type": "object",
  29936. "properties": {
  29937. "sessionID": {
  29938. "type": "string",
  29939. "pattern": "^ses"
  29940. }
  29941. },
  29942. "required": ["sessionID"],
  29943. "additionalProperties": false
  29944. }
  29945. },
  29946. "required": ["id", "type", "properties"],
  29947. "additionalProperties": false
  29948. },
  29949. "EventQuestionAsked": {
  29950. "type": "object",
  29951. "properties": {
  29952. "id": {
  29953. "type": "string",
  29954. "pattern": "^evt_"
  29955. },
  29956. "type": {
  29957. "type": "string",
  29958. "enum": ["question.asked"]
  29959. },
  29960. "properties": {
  29961. "type": "object",
  29962. "properties": {
  29963. "id": {
  29964. "type": "string",
  29965. "pattern": "^que"
  29966. },
  29967. "sessionID": {
  29968. "type": "string",
  29969. "pattern": "^ses"
  29970. },
  29971. "questions": {
  29972. "type": "array",
  29973. "items": {
  29974. "$ref": "#/components/schemas/QuestionInfo"
  29975. },
  29976. "description": "Questions to ask"
  29977. },
  29978. "tool": {
  29979. "$ref": "#/components/schemas/QuestionTool"
  29980. }
  29981. },
  29982. "required": ["id", "sessionID", "questions"],
  29983. "additionalProperties": false
  29984. }
  29985. },
  29986. "required": ["id", "type", "properties"],
  29987. "additionalProperties": false
  29988. },
  29989. "EventQuestionReplied": {
  29990. "type": "object",
  29991. "properties": {
  29992. "id": {
  29993. "type": "string",
  29994. "pattern": "^evt_"
  29995. },
  29996. "type": {
  29997. "type": "string",
  29998. "enum": ["question.replied"]
  29999. },
  30000. "properties": {
  30001. "type": "object",
  30002. "properties": {
  30003. "sessionID": {
  30004. "type": "string",
  30005. "pattern": "^ses"
  30006. },
  30007. "requestID": {
  30008. "type": "string",
  30009. "pattern": "^que"
  30010. },
  30011. "answers": {
  30012. "type": "array",
  30013. "items": {
  30014. "$ref": "#/components/schemas/QuestionAnswer"
  30015. }
  30016. }
  30017. },
  30018. "required": ["sessionID", "requestID", "answers"],
  30019. "additionalProperties": false
  30020. }
  30021. },
  30022. "required": ["id", "type", "properties"],
  30023. "additionalProperties": false
  30024. },
  30025. "EventQuestionRejected": {
  30026. "type": "object",
  30027. "properties": {
  30028. "id": {
  30029. "type": "string",
  30030. "pattern": "^evt_"
  30031. },
  30032. "type": {
  30033. "type": "string",
  30034. "enum": ["question.rejected"]
  30035. },
  30036. "properties": {
  30037. "type": "object",
  30038. "properties": {
  30039. "sessionID": {
  30040. "type": "string",
  30041. "pattern": "^ses"
  30042. },
  30043. "requestID": {
  30044. "type": "string",
  30045. "pattern": "^que"
  30046. }
  30047. },
  30048. "required": ["sessionID", "requestID"],
  30049. "additionalProperties": false
  30050. }
  30051. },
  30052. "required": ["id", "type", "properties"],
  30053. "additionalProperties": false
  30054. },
  30055. "EventSessionCompacted": {
  30056. "type": "object",
  30057. "properties": {
  30058. "id": {
  30059. "type": "string",
  30060. "pattern": "^evt_"
  30061. },
  30062. "type": {
  30063. "type": "string",
  30064. "enum": ["session.compacted"]
  30065. },
  30066. "properties": {
  30067. "type": "object",
  30068. "properties": {
  30069. "sessionID": {
  30070. "type": "string",
  30071. "pattern": "^ses"
  30072. }
  30073. },
  30074. "required": ["sessionID"],
  30075. "additionalProperties": false
  30076. }
  30077. },
  30078. "required": ["id", "type", "properties"],
  30079. "additionalProperties": false
  30080. },
  30081. "EventVcsBranchUpdated": {
  30082. "type": "object",
  30083. "properties": {
  30084. "id": {
  30085. "type": "string",
  30086. "pattern": "^evt_"
  30087. },
  30088. "type": {
  30089. "type": "string",
  30090. "enum": ["vcs.branch.updated"]
  30091. },
  30092. "properties": {
  30093. "type": "object",
  30094. "properties": {
  30095. "branch": {
  30096. "type": "string"
  30097. }
  30098. },
  30099. "additionalProperties": false
  30100. }
  30101. },
  30102. "required": ["id", "type", "properties"],
  30103. "additionalProperties": false
  30104. },
  30105. "EventWorkspaceReady": {
  30106. "type": "object",
  30107. "properties": {
  30108. "id": {
  30109. "type": "string",
  30110. "pattern": "^evt_"
  30111. },
  30112. "type": {
  30113. "type": "string",
  30114. "enum": ["workspace.ready"]
  30115. },
  30116. "properties": {
  30117. "type": "object",
  30118. "properties": {
  30119. "name": {
  30120. "type": "string"
  30121. }
  30122. },
  30123. "required": ["name"],
  30124. "additionalProperties": false
  30125. }
  30126. },
  30127. "required": ["id", "type", "properties"],
  30128. "additionalProperties": false
  30129. },
  30130. "EventWorkspaceFailed": {
  30131. "type": "object",
  30132. "properties": {
  30133. "id": {
  30134. "type": "string",
  30135. "pattern": "^evt_"
  30136. },
  30137. "type": {
  30138. "type": "string",
  30139. "enum": ["workspace.failed"]
  30140. },
  30141. "properties": {
  30142. "type": "object",
  30143. "properties": {
  30144. "message": {
  30145. "type": "string"
  30146. }
  30147. },
  30148. "required": ["message"],
  30149. "additionalProperties": false
  30150. }
  30151. },
  30152. "required": ["id", "type", "properties"],
  30153. "additionalProperties": false
  30154. },
  30155. "EventWorkspaceStatus": {
  30156. "type": "object",
  30157. "properties": {
  30158. "id": {
  30159. "type": "string",
  30160. "pattern": "^evt_"
  30161. },
  30162. "type": {
  30163. "type": "string",
  30164. "enum": ["workspace.status"]
  30165. },
  30166. "properties": {
  30167. "type": "object",
  30168. "properties": {
  30169. "workspaceID": {
  30170. "type": "string",
  30171. "pattern": "^wrk"
  30172. },
  30173. "status": {
  30174. "type": "string",
  30175. "enum": ["connected", "connecting", "disconnected", "error"]
  30176. }
  30177. },
  30178. "required": ["workspaceID", "status"],
  30179. "additionalProperties": false
  30180. }
  30181. },
  30182. "required": ["id", "type", "properties"],
  30183. "additionalProperties": false
  30184. },
  30185. "EventWorktreeReady": {
  30186. "type": "object",
  30187. "properties": {
  30188. "id": {
  30189. "type": "string",
  30190. "pattern": "^evt_"
  30191. },
  30192. "type": {
  30193. "type": "string",
  30194. "enum": ["worktree.ready"]
  30195. },
  30196. "properties": {
  30197. "type": "object",
  30198. "properties": {
  30199. "name": {
  30200. "type": "string"
  30201. },
  30202. "branch": {
  30203. "type": "string"
  30204. }
  30205. },
  30206. "required": ["name"],
  30207. "additionalProperties": false
  30208. }
  30209. },
  30210. "required": ["id", "type", "properties"],
  30211. "additionalProperties": false
  30212. },
  30213. "EventWorktreeFailed": {
  30214. "type": "object",
  30215. "properties": {
  30216. "id": {
  30217. "type": "string",
  30218. "pattern": "^evt_"
  30219. },
  30220. "type": {
  30221. "type": "string",
  30222. "enum": ["worktree.failed"]
  30223. },
  30224. "properties": {
  30225. "type": "object",
  30226. "properties": {
  30227. "message": {
  30228. "type": "string"
  30229. }
  30230. },
  30231. "required": ["message"],
  30232. "additionalProperties": false
  30233. }
  30234. },
  30235. "required": ["id", "type", "properties"],
  30236. "additionalProperties": false
  30237. },
  30238. "EventServerConnected": {
  30239. "type": "object",
  30240. "properties": {
  30241. "id": {
  30242. "type": "string",
  30243. "pattern": "^evt_"
  30244. },
  30245. "type": {
  30246. "type": "string",
  30247. "enum": ["server.connected"]
  30248. },
  30249. "properties": {
  30250. "type": "object",
  30251. "properties": {}
  30252. }
  30253. },
  30254. "required": ["id", "type", "properties"],
  30255. "additionalProperties": false
  30256. },
  30257. "EventGlobalDisposed": {
  30258. "type": "object",
  30259. "properties": {
  30260. "id": {
  30261. "type": "string",
  30262. "pattern": "^evt_"
  30263. },
  30264. "type": {
  30265. "type": "string",
  30266. "enum": ["global.disposed"]
  30267. },
  30268. "properties": {
  30269. "type": "object",
  30270. "properties": {}
  30271. }
  30272. },
  30273. "required": ["id", "type", "properties"],
  30274. "additionalProperties": false
  30275. },
  30276. "BadRequestError": {
  30277. "type": "object",
  30278. "required": ["name", "data"],
  30279. "properties": {
  30280. "name": {
  30281. "type": "string",
  30282. "enum": ["BadRequest"]
  30283. },
  30284. "data": {
  30285. "type": "object",
  30286. "required": ["message"],
  30287. "properties": {
  30288. "message": {
  30289. "type": "string"
  30290. },
  30291. "kind": {
  30292. "type": "string",
  30293. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30294. }
  30295. }
  30296. }
  30297. }
  30298. }
  30299. }
  30300. },
  30301. "security": [],
  30302. "tags": [
  30303. {
  30304. "name": "control",
  30305. "description": "Control plane routes."
  30306. },
  30307. {
  30308. "name": "controlPlane",
  30309. "description": "Control-plane orchestration routes."
  30310. },
  30311. {
  30312. "name": "global",
  30313. "description": "Global server routes."
  30314. },
  30315. {
  30316. "name": "event",
  30317. "description": "Instance event stream route."
  30318. },
  30319. {
  30320. "name": "config",
  30321. "description": "Experimental HttpApi config routes."
  30322. },
  30323. {
  30324. "name": "experimental",
  30325. "description": "Experimental HttpApi read-only routes."
  30326. },
  30327. {
  30328. "name": "file",
  30329. "description": "Experimental HttpApi file routes."
  30330. },
  30331. {
  30332. "name": "instance",
  30333. "description": "Experimental HttpApi instance read routes."
  30334. },
  30335. {
  30336. "name": "mcp",
  30337. "description": "Experimental HttpApi MCP routes."
  30338. },
  30339. {
  30340. "name": "project",
  30341. "description": "Experimental HttpApi project routes."
  30342. },
  30343. {
  30344. "name": "projectCopy",
  30345. "description": "Project copy naming routes."
  30346. },
  30347. {
  30348. "name": "pty",
  30349. "description": "Experimental HttpApi PTY routes."
  30350. },
  30351. {
  30352. "name": "question",
  30353. "description": "Question routes."
  30354. },
  30355. {
  30356. "name": "permission",
  30357. "description": "Experimental HttpApi permission routes."
  30358. },
  30359. {
  30360. "name": "provider",
  30361. "description": "Experimental HttpApi provider routes."
  30362. },
  30363. {
  30364. "name": "session",
  30365. "description": "Experimental HttpApi session routes."
  30366. },
  30367. {
  30368. "name": "sync",
  30369. "description": "Experimental HttpApi sync routes."
  30370. },
  30371. {
  30372. "name": "tui",
  30373. "description": "Experimental HttpApi TUI routes."
  30374. },
  30375. {
  30376. "name": "workspace",
  30377. "description": "Experimental HttpApi workspace routes."
  30378. },
  30379. {
  30380. "name": "opencode HttpApi",
  30381. "description": "Experimental HttpApi surface for selected instance routes."
  30382. },
  30383. {
  30384. "name": "opencode HttpApi",
  30385. "description": "Experimental HttpApi surface for selected instance routes."
  30386. },
  30387. {
  30388. "name": "opencode HttpApi",
  30389. "description": "Experimental HttpApi surface for selected instance routes."
  30390. },
  30391. {
  30392. "name": "sessions",
  30393. "description": "Experimental session routes."
  30394. },
  30395. {
  30396. "name": "messages",
  30397. "description": "Experimental message routes."
  30398. },
  30399. {
  30400. "name": "models",
  30401. "description": "Experimental model routes."
  30402. },
  30403. {
  30404. "name": "providers",
  30405. "description": "Experimental provider routes."
  30406. },
  30407. {
  30408. "name": "integrations",
  30409. "description": "Integration discovery and authentication routes."
  30410. },
  30411. {
  30412. "name": "opencode HttpApi",
  30413. "description": "Experimental HttpApi surface for selected instance routes."
  30414. },
  30415. {
  30416. "name": "permissions",
  30417. "description": "Experimental permission routes."
  30418. },
  30419. {
  30420. "name": "filesystem",
  30421. "description": "Experimental location-scoped filesystem routes."
  30422. },
  30423. {
  30424. "name": "commands",
  30425. "description": "Experimental command routes."
  30426. },
  30427. {
  30428. "name": "skills",
  30429. "description": "Experimental skill routes."
  30430. },
  30431. {
  30432. "name": "events",
  30433. "description": "Experimental event stream route."
  30434. },
  30435. {
  30436. "name": "session questions",
  30437. "description": "Experimental session question routes."
  30438. },
  30439. {
  30440. "name": "reference",
  30441. "description": "Location-scoped project references."
  30442. },
  30443. {
  30444. "name": "projectCopy",
  30445. "description": "Project copy management routes."
  30446. },
  30447. {
  30448. "name": "pty",
  30449. "description": "PTY websocket route."
  30450. }
  30451. ]
  30452. }