openapi.json 878 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860
  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/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.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": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  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. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  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": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.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": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  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 the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  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 info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  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 the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get 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({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  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": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  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": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  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": "Current project information",
  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": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "type": "object",
  3850. "properties": {
  3851. "url": {
  3852. "type": "string"
  3853. },
  3854. "override": {
  3855. "type": "string"
  3856. },
  3857. "color": {
  3858. "type": "string"
  3859. }
  3860. },
  3861. "additionalProperties": false
  3862. },
  3863. "commands": {
  3864. "type": "object",
  3865. "properties": {
  3866. "start": {
  3867. "type": "string",
  3868. "description": "Startup script to run when creating a new workspace (worktree)"
  3869. }
  3870. },
  3871. "additionalProperties": false
  3872. }
  3873. },
  3874. "additionalProperties": false
  3875. }
  3876. }
  3877. }
  3878. },
  3879. "x-codeSamples": [
  3880. {
  3881. "lang": "js",
  3882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3883. }
  3884. ]
  3885. }
  3886. },
  3887. "/project/{projectID}/directories": {
  3888. "get": {
  3889. "tags": ["project"],
  3890. "operationId": "project.directories",
  3891. "parameters": [
  3892. {
  3893. "name": "projectID",
  3894. "in": "path",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": true
  3899. },
  3900. {
  3901. "name": "directory",
  3902. "in": "query",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": false
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project directories",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectDirectories"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "Bad request",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "$ref": "#/components/schemas/BadRequestError"
  3934. }
  3935. }
  3936. }
  3937. }
  3938. },
  3939. "description": "List known local absolute directories for a project.",
  3940. "summary": "List project directories",
  3941. "x-codeSamples": [
  3942. {
  3943. "lang": "js",
  3944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3945. }
  3946. ]
  3947. }
  3948. },
  3949. "/experimental/project/{projectID}/copy/generate-name": {
  3950. "post": {
  3951. "tags": ["projectCopy"],
  3952. "operationId": "experimental.projectCopy.generateName",
  3953. "parameters": [
  3954. {
  3955. "name": "projectID",
  3956. "in": "path",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": true
  3961. },
  3962. {
  3963. "name": "directory",
  3964. "in": "query",
  3965. "schema": {
  3966. "type": "string"
  3967. },
  3968. "required": false
  3969. },
  3970. {
  3971. "name": "workspace",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. }
  3978. ],
  3979. "responses": {
  3980. "200": {
  3981. "description": "Success",
  3982. "content": {
  3983. "application/json": {
  3984. "schema": {
  3985. "type": "object",
  3986. "properties": {
  3987. "name": {
  3988. "type": "string"
  3989. }
  3990. },
  3991. "required": ["name"],
  3992. "additionalProperties": false
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "400": {
  3998. "description": "Bad request",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/BadRequestError"
  4003. }
  4004. }
  4005. }
  4006. }
  4007. },
  4008. "description": "Generate a short name for a project copy from task context.",
  4009. "summary": "Generate project copy name",
  4010. "requestBody": {
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "object",
  4015. "properties": {
  4016. "context": {
  4017. "type": "string"
  4018. }
  4019. },
  4020. "additionalProperties": false
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "x-codeSamples": [
  4026. {
  4027. "lang": "js",
  4028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4029. }
  4030. ]
  4031. }
  4032. },
  4033. "/pty/shells": {
  4034. "get": {
  4035. "tags": ["pty"],
  4036. "operationId": "pty.shells",
  4037. "parameters": [
  4038. {
  4039. "name": "directory",
  4040. "in": "query",
  4041. "schema": {
  4042. "type": "string"
  4043. },
  4044. "required": false
  4045. },
  4046. {
  4047. "name": "workspace",
  4048. "in": "query",
  4049. "schema": {
  4050. "type": "string"
  4051. },
  4052. "required": false
  4053. }
  4054. ],
  4055. "responses": {
  4056. "200": {
  4057. "description": "List of shells",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "array",
  4062. "items": {
  4063. "type": "object",
  4064. "properties": {
  4065. "path": {
  4066. "type": "string"
  4067. },
  4068. "name": {
  4069. "type": "string"
  4070. },
  4071. "acceptable": {
  4072. "type": "boolean"
  4073. }
  4074. },
  4075. "required": ["path", "name", "acceptable"],
  4076. "additionalProperties": false
  4077. },
  4078. "description": "List of shells"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "400": {
  4084. "description": "Bad request",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "$ref": "#/components/schemas/BadRequestError"
  4089. }
  4090. }
  4091. }
  4092. }
  4093. },
  4094. "description": "Get a list of available shells on the system.",
  4095. "summary": "List available shells",
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4100. }
  4101. ]
  4102. }
  4103. },
  4104. "/pty": {
  4105. "get": {
  4106. "tags": ["pty"],
  4107. "operationId": "pty.list",
  4108. "parameters": [
  4109. {
  4110. "name": "directory",
  4111. "in": "query",
  4112. "schema": {
  4113. "type": "string"
  4114. },
  4115. "required": false
  4116. },
  4117. {
  4118. "name": "workspace",
  4119. "in": "query",
  4120. "schema": {
  4121. "type": "string"
  4122. },
  4123. "required": false
  4124. }
  4125. ],
  4126. "responses": {
  4127. "200": {
  4128. "description": "List of sessions",
  4129. "content": {
  4130. "application/json": {
  4131. "schema": {
  4132. "type": "array",
  4133. "items": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. },
  4136. "description": "List of sessions"
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "400": {
  4142. "description": "Bad request",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/BadRequestError"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. },
  4152. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4153. "summary": "List PTY sessions",
  4154. "x-codeSamples": [
  4155. {
  4156. "lang": "js",
  4157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4158. }
  4159. ]
  4160. },
  4161. "post": {
  4162. "tags": ["pty"],
  4163. "operationId": "pty.create",
  4164. "parameters": [
  4165. {
  4166. "name": "directory",
  4167. "in": "query",
  4168. "schema": {
  4169. "type": "string"
  4170. },
  4171. "required": false
  4172. },
  4173. {
  4174. "name": "workspace",
  4175. "in": "query",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": false
  4180. }
  4181. ],
  4182. "responses": {
  4183. "200": {
  4184. "description": "Created session",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "$ref": "#/components/schemas/Pty"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "400": {
  4194. "description": "BadRequest | InvalidRequestError",
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "anyOf": [
  4199. {
  4200. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4201. },
  4202. {
  4203. "$ref": "#/components/schemas/InvalidRequestError"
  4204. }
  4205. ]
  4206. }
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4212. "summary": "Create PTY session",
  4213. "requestBody": {
  4214. "content": {
  4215. "application/json": {
  4216. "schema": {
  4217. "type": "object",
  4218. "properties": {
  4219. "command": {
  4220. "type": "string"
  4221. },
  4222. "args": {
  4223. "type": "array",
  4224. "items": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. "cwd": {
  4229. "type": "string"
  4230. },
  4231. "title": {
  4232. "type": "string"
  4233. },
  4234. "env": {
  4235. "type": "object",
  4236. "additionalProperties": {
  4237. "type": "string"
  4238. }
  4239. }
  4240. },
  4241. "additionalProperties": false
  4242. }
  4243. }
  4244. }
  4245. },
  4246. "x-codeSamples": [
  4247. {
  4248. "lang": "js",
  4249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/pty/{ptyID}": {
  4255. "get": {
  4256. "tags": ["pty"],
  4257. "operationId": "pty.get",
  4258. "parameters": [
  4259. {
  4260. "name": "ptyID",
  4261. "in": "path",
  4262. "schema": {
  4263. "type": "string",
  4264. "pattern": "^pty"
  4265. },
  4266. "required": true
  4267. },
  4268. {
  4269. "name": "directory",
  4270. "in": "query",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": false
  4275. },
  4276. {
  4277. "name": "workspace",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. }
  4284. ],
  4285. "responses": {
  4286. "200": {
  4287. "description": "Session info",
  4288. "content": {
  4289. "application/json": {
  4290. "schema": {
  4291. "$ref": "#/components/schemas/Pty"
  4292. }
  4293. }
  4294. }
  4295. },
  4296. "400": {
  4297. "description": "Bad request",
  4298. "content": {
  4299. "application/json": {
  4300. "schema": {
  4301. "$ref": "#/components/schemas/BadRequestError"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "404": {
  4307. "description": "PtyNotFoundError",
  4308. "content": {
  4309. "application/json": {
  4310. "schema": {
  4311. "$ref": "#/components/schemas/PtyNotFoundError"
  4312. }
  4313. }
  4314. }
  4315. }
  4316. },
  4317. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4318. "summary": "Get PTY session",
  4319. "x-codeSamples": [
  4320. {
  4321. "lang": "js",
  4322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4323. }
  4324. ]
  4325. },
  4326. "put": {
  4327. "tags": ["pty"],
  4328. "operationId": "pty.update",
  4329. "parameters": [
  4330. {
  4331. "name": "ptyID",
  4332. "in": "path",
  4333. "schema": {
  4334. "type": "string",
  4335. "pattern": "^pty"
  4336. },
  4337. "required": true
  4338. },
  4339. {
  4340. "name": "directory",
  4341. "in": "query",
  4342. "schema": {
  4343. "type": "string"
  4344. },
  4345. "required": false
  4346. },
  4347. {
  4348. "name": "workspace",
  4349. "in": "query",
  4350. "schema": {
  4351. "type": "string"
  4352. },
  4353. "required": false
  4354. }
  4355. ],
  4356. "responses": {
  4357. "200": {
  4358. "description": "Updated session",
  4359. "content": {
  4360. "application/json": {
  4361. "schema": {
  4362. "$ref": "#/components/schemas/Pty"
  4363. }
  4364. }
  4365. }
  4366. },
  4367. "400": {
  4368. "description": "BadRequest | InvalidRequestError",
  4369. "content": {
  4370. "application/json": {
  4371. "schema": {
  4372. "anyOf": [
  4373. {
  4374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4375. },
  4376. {
  4377. "$ref": "#/components/schemas/InvalidRequestError"
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "PtyNotFoundError",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/PtyNotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4396. "summary": "Update PTY session",
  4397. "requestBody": {
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "title": {
  4404. "type": "string"
  4405. },
  4406. "size": {
  4407. "type": "object",
  4408. "properties": {
  4409. "rows": {
  4410. "type": "integer",
  4411. "exclusiveMinimum": 0
  4412. },
  4413. "cols": {
  4414. "type": "integer",
  4415. "exclusiveMinimum": 0
  4416. }
  4417. },
  4418. "required": ["rows", "cols"],
  4419. "additionalProperties": false
  4420. }
  4421. },
  4422. "additionalProperties": false
  4423. }
  4424. }
  4425. }
  4426. },
  4427. "x-codeSamples": [
  4428. {
  4429. "lang": "js",
  4430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4431. }
  4432. ]
  4433. },
  4434. "delete": {
  4435. "tags": ["pty"],
  4436. "operationId": "pty.remove",
  4437. "parameters": [
  4438. {
  4439. "name": "ptyID",
  4440. "in": "path",
  4441. "schema": {
  4442. "type": "string",
  4443. "pattern": "^pty"
  4444. },
  4445. "required": true
  4446. },
  4447. {
  4448. "name": "directory",
  4449. "in": "query",
  4450. "schema": {
  4451. "type": "string"
  4452. },
  4453. "required": false
  4454. },
  4455. {
  4456. "name": "workspace",
  4457. "in": "query",
  4458. "schema": {
  4459. "type": "string"
  4460. },
  4461. "required": false
  4462. }
  4463. ],
  4464. "responses": {
  4465. "200": {
  4466. "description": "Session removed",
  4467. "content": {
  4468. "application/json": {
  4469. "schema": {
  4470. "type": "boolean",
  4471. "description": "Session removed"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "400": {
  4477. "description": "Bad request",
  4478. "content": {
  4479. "application/json": {
  4480. "schema": {
  4481. "$ref": "#/components/schemas/BadRequestError"
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "404": {
  4487. "description": "PtyNotFoundError",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "$ref": "#/components/schemas/PtyNotFoundError"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. },
  4497. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4498. "summary": "Remove PTY session",
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/pty/{ptyID}/connect-token": {
  4508. "post": {
  4509. "tags": ["pty"],
  4510. "operationId": "pty.connectToken",
  4511. "parameters": [
  4512. {
  4513. "name": "ptyID",
  4514. "in": "path",
  4515. "schema": {
  4516. "type": "string",
  4517. "pattern": "^pty"
  4518. },
  4519. "required": true
  4520. },
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "schema": {
  4525. "type": "string"
  4526. },
  4527. "required": false
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "WebSocket connect token",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "properties": {
  4546. "ticket": {
  4547. "type": "string"
  4548. },
  4549. "expires_in": {
  4550. "type": "integer",
  4551. "exclusiveMinimum": 0
  4552. }
  4553. },
  4554. "required": ["ticket", "expires_in"],
  4555. "additionalProperties": false,
  4556. "description": "WebSocket connect token"
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "400": {
  4562. "description": "Bad request",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "$ref": "#/components/schemas/BadRequestError"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "403": {
  4572. "description": "PtyForbiddenError",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "$ref": "#/components/schemas/PtyForbiddenError"
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "404": {
  4582. "description": "PtyNotFoundError",
  4583. "content": {
  4584. "application/json": {
  4585. "schema": {
  4586. "$ref": "#/components/schemas/PtyNotFoundError"
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4593. "summary": "Create PTY WebSocket token",
  4594. "x-codeSamples": [
  4595. {
  4596. "lang": "js",
  4597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4598. }
  4599. ]
  4600. }
  4601. },
  4602. "/question": {
  4603. "get": {
  4604. "tags": ["question"],
  4605. "operationId": "question.list",
  4606. "parameters": [
  4607. {
  4608. "name": "directory",
  4609. "in": "query",
  4610. "schema": {
  4611. "type": "string"
  4612. },
  4613. "required": false
  4614. },
  4615. {
  4616. "name": "workspace",
  4617. "in": "query",
  4618. "schema": {
  4619. "type": "string"
  4620. },
  4621. "required": false
  4622. }
  4623. ],
  4624. "responses": {
  4625. "200": {
  4626. "description": "List of pending questions",
  4627. "content": {
  4628. "application/json": {
  4629. "schema": {
  4630. "type": "array",
  4631. "items": {
  4632. "$ref": "#/components/schemas/QuestionRequest"
  4633. },
  4634. "description": "List of pending questions"
  4635. }
  4636. }
  4637. }
  4638. },
  4639. "400": {
  4640. "description": "Bad request",
  4641. "content": {
  4642. "application/json": {
  4643. "schema": {
  4644. "$ref": "#/components/schemas/BadRequestError"
  4645. }
  4646. }
  4647. }
  4648. }
  4649. },
  4650. "description": "Get all pending question requests across all sessions.",
  4651. "summary": "List pending questions",
  4652. "x-codeSamples": [
  4653. {
  4654. "lang": "js",
  4655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4656. }
  4657. ]
  4658. }
  4659. },
  4660. "/question/{requestID}/reply": {
  4661. "post": {
  4662. "tags": ["question"],
  4663. "operationId": "question.reply",
  4664. "parameters": [
  4665. {
  4666. "name": "requestID",
  4667. "in": "path",
  4668. "schema": {
  4669. "type": "string",
  4670. "pattern": "^que"
  4671. },
  4672. "required": true
  4673. },
  4674. {
  4675. "name": "directory",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. },
  4682. {
  4683. "name": "workspace",
  4684. "in": "query",
  4685. "schema": {
  4686. "type": "string"
  4687. },
  4688. "required": false
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "description": "Question answered successfully",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "type": "boolean",
  4698. "description": "Question answered successfully"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "400": {
  4704. "description": "BadRequest | InvalidRequestError",
  4705. "content": {
  4706. "application/json": {
  4707. "schema": {
  4708. "anyOf": [
  4709. {
  4710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4711. },
  4712. {
  4713. "$ref": "#/components/schemas/InvalidRequestError"
  4714. }
  4715. ]
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "QuestionNotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/QuestionNotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Provide answers to a question request from the AI assistant.",
  4732. "summary": "Reply to question request",
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "type": "object",
  4738. "properties": {
  4739. "answers": {
  4740. "type": "array",
  4741. "items": {
  4742. "$ref": "#/components/schemas/QuestionAnswer"
  4743. },
  4744. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4745. }
  4746. },
  4747. "required": ["answers"],
  4748. "additionalProperties": false
  4749. }
  4750. }
  4751. }
  4752. },
  4753. "x-codeSamples": [
  4754. {
  4755. "lang": "js",
  4756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4757. }
  4758. ]
  4759. }
  4760. },
  4761. "/question/{requestID}/reject": {
  4762. "post": {
  4763. "tags": ["question"],
  4764. "operationId": "question.reject",
  4765. "parameters": [
  4766. {
  4767. "name": "requestID",
  4768. "in": "path",
  4769. "schema": {
  4770. "type": "string",
  4771. "pattern": "^que"
  4772. },
  4773. "required": true
  4774. },
  4775. {
  4776. "name": "directory",
  4777. "in": "query",
  4778. "schema": {
  4779. "type": "string"
  4780. },
  4781. "required": false
  4782. },
  4783. {
  4784. "name": "workspace",
  4785. "in": "query",
  4786. "schema": {
  4787. "type": "string"
  4788. },
  4789. "required": false
  4790. }
  4791. ],
  4792. "responses": {
  4793. "200": {
  4794. "description": "Question rejected successfully",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "type": "boolean",
  4799. "description": "Question rejected successfully"
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "400": {
  4805. "description": "BadRequest | InvalidRequestError",
  4806. "content": {
  4807. "application/json": {
  4808. "schema": {
  4809. "anyOf": [
  4810. {
  4811. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4812. },
  4813. {
  4814. "$ref": "#/components/schemas/InvalidRequestError"
  4815. }
  4816. ]
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "QuestionNotFoundError",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/QuestionNotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "description": "Reject a question request from the AI assistant.",
  4833. "summary": "Reject question request",
  4834. "x-codeSamples": [
  4835. {
  4836. "lang": "js",
  4837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4838. }
  4839. ]
  4840. }
  4841. },
  4842. "/permission": {
  4843. "get": {
  4844. "tags": ["permission"],
  4845. "operationId": "permission.list",
  4846. "parameters": [
  4847. {
  4848. "name": "directory",
  4849. "in": "query",
  4850. "schema": {
  4851. "type": "string"
  4852. },
  4853. "required": false
  4854. },
  4855. {
  4856. "name": "workspace",
  4857. "in": "query",
  4858. "schema": {
  4859. "type": "string"
  4860. },
  4861. "required": false
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "description": "List of pending permissions",
  4867. "content": {
  4868. "application/json": {
  4869. "schema": {
  4870. "type": "array",
  4871. "items": {
  4872. "$ref": "#/components/schemas/PermissionRequest"
  4873. },
  4874. "description": "List of pending permissions"
  4875. }
  4876. }
  4877. }
  4878. },
  4879. "400": {
  4880. "description": "Bad request",
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {
  4884. "$ref": "#/components/schemas/BadRequestError"
  4885. }
  4886. }
  4887. }
  4888. }
  4889. },
  4890. "description": "Get all pending permission requests across all sessions.",
  4891. "summary": "List pending permissions",
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/permission/{requestID}/reply": {
  4901. "post": {
  4902. "tags": ["permission"],
  4903. "operationId": "permission.reply",
  4904. "parameters": [
  4905. {
  4906. "name": "requestID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string",
  4910. "pattern": "^per"
  4911. },
  4912. "required": true
  4913. },
  4914. {
  4915. "name": "directory",
  4916. "in": "query",
  4917. "schema": {
  4918. "type": "string"
  4919. },
  4920. "required": false
  4921. },
  4922. {
  4923. "name": "workspace",
  4924. "in": "query",
  4925. "schema": {
  4926. "type": "string"
  4927. },
  4928. "required": false
  4929. }
  4930. ],
  4931. "responses": {
  4932. "200": {
  4933. "description": "Permission processed successfully",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "type": "boolean",
  4938. "description": "Permission processed successfully"
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "400": {
  4944. "description": "BadRequest | InvalidRequestError",
  4945. "content": {
  4946. "application/json": {
  4947. "schema": {
  4948. "anyOf": [
  4949. {
  4950. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4951. },
  4952. {
  4953. "$ref": "#/components/schemas/InvalidRequestError"
  4954. }
  4955. ]
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "404": {
  4961. "description": "PermissionNotFoundError",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/PermissionNotFoundError"
  4966. }
  4967. }
  4968. }
  4969. }
  4970. },
  4971. "description": "Approve or deny a permission request from the AI assistant.",
  4972. "summary": "Respond to permission request",
  4973. "requestBody": {
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "type": "object",
  4978. "properties": {
  4979. "reply": {
  4980. "type": "string",
  4981. "enum": ["once", "always", "reject"]
  4982. },
  4983. "message": {
  4984. "type": "string"
  4985. }
  4986. },
  4987. "required": ["reply"],
  4988. "additionalProperties": false
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "x-codeSamples": [
  4994. {
  4995. "lang": "js",
  4996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4997. }
  4998. ]
  4999. }
  5000. },
  5001. "/provider": {
  5002. "get": {
  5003. "tags": ["provider"],
  5004. "operationId": "provider.list",
  5005. "parameters": [
  5006. {
  5007. "name": "directory",
  5008. "in": "query",
  5009. "schema": {
  5010. "type": "string"
  5011. },
  5012. "required": false
  5013. },
  5014. {
  5015. "name": "workspace",
  5016. "in": "query",
  5017. "schema": {
  5018. "type": "string"
  5019. },
  5020. "required": false
  5021. }
  5022. ],
  5023. "responses": {
  5024. "200": {
  5025. "description": "List of providers",
  5026. "content": {
  5027. "application/json": {
  5028. "schema": {
  5029. "type": "object",
  5030. "properties": {
  5031. "all": {
  5032. "type": "array",
  5033. "items": {
  5034. "$ref": "#/components/schemas/Provider"
  5035. }
  5036. },
  5037. "default": {
  5038. "type": "object",
  5039. "additionalProperties": {
  5040. "type": "string"
  5041. }
  5042. },
  5043. "connected": {
  5044. "type": "array",
  5045. "items": {
  5046. "type": "string"
  5047. }
  5048. }
  5049. },
  5050. "required": ["all", "default", "connected"],
  5051. "additionalProperties": false,
  5052. "description": "List of providers"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "400": {
  5058. "description": "Bad request",
  5059. "content": {
  5060. "application/json": {
  5061. "schema": {
  5062. "$ref": "#/components/schemas/BadRequestError"
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5069. "summary": "List providers",
  5070. "x-codeSamples": [
  5071. {
  5072. "lang": "js",
  5073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5074. }
  5075. ]
  5076. }
  5077. },
  5078. "/provider/auth": {
  5079. "get": {
  5080. "tags": ["provider"],
  5081. "operationId": "provider.auth",
  5082. "parameters": [
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. }
  5099. ],
  5100. "responses": {
  5101. "200": {
  5102. "description": "Provider auth methods",
  5103. "content": {
  5104. "application/json": {
  5105. "schema": {
  5106. "type": "object",
  5107. "additionalProperties": {
  5108. "type": "array",
  5109. "items": {
  5110. "$ref": "#/components/schemas/ProviderAuthMethod"
  5111. }
  5112. },
  5113. "description": "Provider auth methods"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "400": {
  5119. "description": "Bad request",
  5120. "content": {
  5121. "application/json": {
  5122. "schema": {
  5123. "$ref": "#/components/schemas/BadRequestError"
  5124. }
  5125. }
  5126. }
  5127. }
  5128. },
  5129. "description": "Retrieve available authentication methods for all AI providers.",
  5130. "summary": "Get provider auth methods",
  5131. "x-codeSamples": [
  5132. {
  5133. "lang": "js",
  5134. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5135. }
  5136. ]
  5137. }
  5138. },
  5139. "/provider/{providerID}/oauth/authorize": {
  5140. "post": {
  5141. "tags": ["provider"],
  5142. "operationId": "provider.oauth.authorize",
  5143. "parameters": [
  5144. {
  5145. "name": "providerID",
  5146. "in": "path",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true
  5151. },
  5152. {
  5153. "name": "directory",
  5154. "in": "query",
  5155. "schema": {
  5156. "type": "string"
  5157. },
  5158. "required": false
  5159. },
  5160. {
  5161. "name": "workspace",
  5162. "in": "query",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": false
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "Authorization URL and method",
  5172. "content": {
  5173. "application/json": {
  5174. "schema": {
  5175. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5176. }
  5177. }
  5178. }
  5179. },
  5180. "400": {
  5181. "description": "ProviderAuthError | InvalidRequestError",
  5182. "content": {
  5183. "application/json": {
  5184. "schema": {
  5185. "anyOf": [
  5186. {
  5187. "$ref": "#/components/schemas/ProviderAuthError1"
  5188. },
  5189. {
  5190. "$ref": "#/components/schemas/InvalidRequestError"
  5191. }
  5192. ]
  5193. }
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "description": "Start the OAuth authorization flow for a provider.",
  5199. "summary": "Start OAuth authorization",
  5200. "requestBody": {
  5201. "content": {
  5202. "application/json": {
  5203. "schema": {
  5204. "type": "object",
  5205. "properties": {
  5206. "method": {
  5207. "type": "number",
  5208. "description": "Auth method index"
  5209. },
  5210. "inputs": {
  5211. "type": "object",
  5212. "additionalProperties": {
  5213. "type": "string"
  5214. }
  5215. }
  5216. },
  5217. "required": ["method"],
  5218. "additionalProperties": false
  5219. }
  5220. }
  5221. }
  5222. },
  5223. "x-codeSamples": [
  5224. {
  5225. "lang": "js",
  5226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5227. }
  5228. ]
  5229. }
  5230. },
  5231. "/provider/{providerID}/oauth/callback": {
  5232. "post": {
  5233. "tags": ["provider"],
  5234. "operationId": "provider.oauth.callback",
  5235. "parameters": [
  5236. {
  5237. "name": "providerID",
  5238. "in": "path",
  5239. "schema": {
  5240. "type": "string"
  5241. },
  5242. "required": true
  5243. },
  5244. {
  5245. "name": "directory",
  5246. "in": "query",
  5247. "schema": {
  5248. "type": "string"
  5249. },
  5250. "required": false
  5251. },
  5252. {
  5253. "name": "workspace",
  5254. "in": "query",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": false
  5259. }
  5260. ],
  5261. "responses": {
  5262. "200": {
  5263. "description": "OAuth callback processed successfully",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "type": "boolean",
  5268. "description": "OAuth callback processed successfully"
  5269. }
  5270. }
  5271. }
  5272. },
  5273. "400": {
  5274. "description": "ProviderAuthError | InvalidRequestError",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "anyOf": [
  5279. {
  5280. "$ref": "#/components/schemas/ProviderAuthError1"
  5281. },
  5282. {
  5283. "$ref": "#/components/schemas/InvalidRequestError"
  5284. }
  5285. ]
  5286. }
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "description": "Handle the OAuth callback from a provider after user authorization.",
  5292. "summary": "Handle OAuth callback",
  5293. "requestBody": {
  5294. "content": {
  5295. "application/json": {
  5296. "schema": {
  5297. "type": "object",
  5298. "properties": {
  5299. "method": {
  5300. "type": "number",
  5301. "description": "Auth method index"
  5302. },
  5303. "code": {
  5304. "type": "string"
  5305. }
  5306. },
  5307. "required": ["method"],
  5308. "additionalProperties": false
  5309. }
  5310. }
  5311. }
  5312. },
  5313. "x-codeSamples": [
  5314. {
  5315. "lang": "js",
  5316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5317. }
  5318. ]
  5319. }
  5320. },
  5321. "/session": {
  5322. "get": {
  5323. "tags": ["session"],
  5324. "operationId": "session.list",
  5325. "parameters": [
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. },
  5342. {
  5343. "name": "scope",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string",
  5347. "enum": ["project"]
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "path",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. },
  5359. {
  5360. "name": "roots",
  5361. "in": "query",
  5362. "schema": {
  5363. "anyOf": [
  5364. {
  5365. "type": "boolean"
  5366. },
  5367. {
  5368. "type": "string",
  5369. "enum": ["true", "false"]
  5370. }
  5371. ]
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "start",
  5377. "in": "query",
  5378. "schema": {
  5379. "type": "number"
  5380. },
  5381. "required": false
  5382. },
  5383. {
  5384. "name": "search",
  5385. "in": "query",
  5386. "schema": {
  5387. "type": "string"
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "limit",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. }
  5399. ],
  5400. "responses": {
  5401. "200": {
  5402. "description": "List of sessions",
  5403. "content": {
  5404. "application/json": {
  5405. "schema": {
  5406. "type": "array",
  5407. "items": {
  5408. "$ref": "#/components/schemas/Session"
  5409. },
  5410. "description": "List of sessions"
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "400": {
  5416. "description": "Bad request",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/BadRequestError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5427. "summary": "List sessions",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "post": {
  5436. "tags": ["session"],
  5437. "operationId": "session.create",
  5438. "parameters": [
  5439. {
  5440. "name": "directory",
  5441. "in": "query",
  5442. "schema": {
  5443. "type": "string"
  5444. },
  5445. "required": false
  5446. },
  5447. {
  5448. "name": "workspace",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "description": "Successfully created session",
  5459. "content": {
  5460. "application/json": {
  5461. "schema": {
  5462. "$ref": "#/components/schemas/Session"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "400": {
  5468. "description": "BadRequest | InvalidRequestError",
  5469. "content": {
  5470. "application/json": {
  5471. "schema": {
  5472. "anyOf": [
  5473. {
  5474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5475. },
  5476. {
  5477. "$ref": "#/components/schemas/InvalidRequestError"
  5478. }
  5479. ]
  5480. }
  5481. }
  5482. }
  5483. }
  5484. },
  5485. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5486. "summary": "Create session",
  5487. "requestBody": {
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "type": "object",
  5492. "properties": {
  5493. "parentID": {
  5494. "type": "string",
  5495. "pattern": "^ses"
  5496. },
  5497. "title": {
  5498. "type": "string"
  5499. },
  5500. "agent": {
  5501. "type": "string"
  5502. },
  5503. "model": {
  5504. "type": "object",
  5505. "properties": {
  5506. "id": {
  5507. "type": "string"
  5508. },
  5509. "providerID": {
  5510. "type": "string"
  5511. },
  5512. "variant": {
  5513. "type": "string"
  5514. }
  5515. },
  5516. "required": ["id", "providerID"],
  5517. "additionalProperties": false
  5518. },
  5519. "metadata": {
  5520. "type": "object"
  5521. },
  5522. "permission": {
  5523. "$ref": "#/components/schemas/PermissionRuleset"
  5524. },
  5525. "workspaceID": {
  5526. "type": "string",
  5527. "pattern": "^wrk"
  5528. }
  5529. },
  5530. "additionalProperties": false
  5531. }
  5532. }
  5533. }
  5534. },
  5535. "x-codeSamples": [
  5536. {
  5537. "lang": "js",
  5538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5539. }
  5540. ]
  5541. }
  5542. },
  5543. "/session/status": {
  5544. "get": {
  5545. "tags": ["session"],
  5546. "operationId": "session.status",
  5547. "parameters": [
  5548. {
  5549. "name": "directory",
  5550. "in": "query",
  5551. "schema": {
  5552. "type": "string"
  5553. },
  5554. "required": false
  5555. },
  5556. {
  5557. "name": "workspace",
  5558. "in": "query",
  5559. "schema": {
  5560. "type": "string"
  5561. },
  5562. "required": false
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "Get session status",
  5568. "content": {
  5569. "application/json": {
  5570. "schema": {
  5571. "type": "object",
  5572. "additionalProperties": {
  5573. "$ref": "#/components/schemas/SessionStatus"
  5574. },
  5575. "description": "Get session status"
  5576. }
  5577. }
  5578. }
  5579. },
  5580. "400": {
  5581. "description": "BadRequest | InvalidRequestError",
  5582. "content": {
  5583. "application/json": {
  5584. "schema": {
  5585. "anyOf": [
  5586. {
  5587. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5588. },
  5589. {
  5590. "$ref": "#/components/schemas/InvalidRequestError"
  5591. }
  5592. ]
  5593. }
  5594. }
  5595. }
  5596. }
  5597. },
  5598. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5599. "summary": "Get session status",
  5600. "x-codeSamples": [
  5601. {
  5602. "lang": "js",
  5603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5604. }
  5605. ]
  5606. }
  5607. },
  5608. "/session/{sessionID}": {
  5609. "get": {
  5610. "tags": ["session"],
  5611. "operationId": "session.get",
  5612. "parameters": [
  5613. {
  5614. "name": "sessionID",
  5615. "in": "path",
  5616. "schema": {
  5617. "type": "string",
  5618. "pattern": "^ses"
  5619. },
  5620. "required": true
  5621. },
  5622. {
  5623. "name": "directory",
  5624. "in": "query",
  5625. "schema": {
  5626. "type": "string"
  5627. },
  5628. "required": false
  5629. },
  5630. {
  5631. "name": "workspace",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. }
  5638. ],
  5639. "responses": {
  5640. "200": {
  5641. "description": "Get session",
  5642. "content": {
  5643. "application/json": {
  5644. "schema": {
  5645. "$ref": "#/components/schemas/Session"
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "400": {
  5651. "description": "BadRequest | InvalidRequestError",
  5652. "content": {
  5653. "application/json": {
  5654. "schema": {
  5655. "anyOf": [
  5656. {
  5657. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5658. },
  5659. {
  5660. "$ref": "#/components/schemas/InvalidRequestError"
  5661. }
  5662. ]
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "404": {
  5668. "description": "NotFoundError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "$ref": "#/components/schemas/NotFoundError"
  5673. }
  5674. }
  5675. }
  5676. }
  5677. },
  5678. "description": "Retrieve detailed information about a specific OpenCode session.",
  5679. "summary": "Get session",
  5680. "x-codeSamples": [
  5681. {
  5682. "lang": "js",
  5683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5684. }
  5685. ]
  5686. },
  5687. "delete": {
  5688. "tags": ["session"],
  5689. "operationId": "session.delete",
  5690. "parameters": [
  5691. {
  5692. "name": "sessionID",
  5693. "in": "path",
  5694. "schema": {
  5695. "type": "string",
  5696. "pattern": "^ses"
  5697. },
  5698. "required": true
  5699. },
  5700. {
  5701. "name": "directory",
  5702. "in": "query",
  5703. "schema": {
  5704. "type": "string"
  5705. },
  5706. "required": false
  5707. },
  5708. {
  5709. "name": "workspace",
  5710. "in": "query",
  5711. "schema": {
  5712. "type": "string"
  5713. },
  5714. "required": false
  5715. }
  5716. ],
  5717. "responses": {
  5718. "200": {
  5719. "description": "Successfully deleted session",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "type": "boolean",
  5724. "description": "Successfully deleted session"
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "400": {
  5730. "description": "BadRequest | InvalidRequestError",
  5731. "content": {
  5732. "application/json": {
  5733. "schema": {
  5734. "anyOf": [
  5735. {
  5736. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5737. },
  5738. {
  5739. "$ref": "#/components/schemas/InvalidRequestError"
  5740. }
  5741. ]
  5742. }
  5743. }
  5744. }
  5745. },
  5746. "404": {
  5747. "description": "NotFoundError",
  5748. "content": {
  5749. "application/json": {
  5750. "schema": {
  5751. "$ref": "#/components/schemas/NotFoundError"
  5752. }
  5753. }
  5754. }
  5755. }
  5756. },
  5757. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5758. "summary": "Delete session",
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5763. }
  5764. ]
  5765. },
  5766. "patch": {
  5767. "tags": ["session"],
  5768. "operationId": "session.update",
  5769. "parameters": [
  5770. {
  5771. "name": "sessionID",
  5772. "in": "path",
  5773. "schema": {
  5774. "type": "string",
  5775. "pattern": "^ses"
  5776. },
  5777. "required": true
  5778. },
  5779. {
  5780. "name": "directory",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. },
  5787. {
  5788. "name": "workspace",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. }
  5795. ],
  5796. "responses": {
  5797. "200": {
  5798. "description": "Successfully updated session",
  5799. "content": {
  5800. "application/json": {
  5801. "schema": {
  5802. "$ref": "#/components/schemas/Session"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "400": {
  5808. "description": "BadRequest | InvalidRequestError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "anyOf": [
  5813. {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5815. },
  5816. {
  5817. "$ref": "#/components/schemas/InvalidRequestError"
  5818. }
  5819. ]
  5820. }
  5821. }
  5822. }
  5823. },
  5824. "404": {
  5825. "description": "NotFoundError",
  5826. "content": {
  5827. "application/json": {
  5828. "schema": {
  5829. "$ref": "#/components/schemas/NotFoundError"
  5830. }
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "description": "Update properties of an existing session, such as title or other metadata.",
  5836. "summary": "Update session",
  5837. "requestBody": {
  5838. "content": {
  5839. "application/json": {
  5840. "schema": {
  5841. "type": "object",
  5842. "properties": {
  5843. "title": {
  5844. "type": "string"
  5845. },
  5846. "metadata": {
  5847. "type": "object"
  5848. },
  5849. "permission": {
  5850. "$ref": "#/components/schemas/PermissionRuleset"
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "archived": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "additionalProperties": false
  5860. }
  5861. },
  5862. "additionalProperties": false
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "x-codeSamples": [
  5868. {
  5869. "lang": "js",
  5870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5871. }
  5872. ]
  5873. }
  5874. },
  5875. "/session/{sessionID}/children": {
  5876. "get": {
  5877. "tags": ["session"],
  5878. "operationId": "session.children",
  5879. "parameters": [
  5880. {
  5881. "name": "sessionID",
  5882. "in": "path",
  5883. "schema": {
  5884. "type": "string",
  5885. "pattern": "^ses"
  5886. },
  5887. "required": true
  5888. },
  5889. {
  5890. "name": "directory",
  5891. "in": "query",
  5892. "schema": {
  5893. "type": "string"
  5894. },
  5895. "required": false
  5896. },
  5897. {
  5898. "name": "workspace",
  5899. "in": "query",
  5900. "schema": {
  5901. "type": "string"
  5902. },
  5903. "required": false
  5904. }
  5905. ],
  5906. "responses": {
  5907. "200": {
  5908. "description": "List of children",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "type": "array",
  5913. "items": {
  5914. "$ref": "#/components/schemas/Session"
  5915. },
  5916. "description": "List of children"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "400": {
  5922. "description": "BadRequest | InvalidRequestError",
  5923. "content": {
  5924. "application/json": {
  5925. "schema": {
  5926. "anyOf": [
  5927. {
  5928. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5929. },
  5930. {
  5931. "$ref": "#/components/schemas/InvalidRequestError"
  5932. }
  5933. ]
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "404": {
  5939. "description": "NotFoundError",
  5940. "content": {
  5941. "application/json": {
  5942. "schema": {
  5943. "$ref": "#/components/schemas/NotFoundError"
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5950. "summary": "Get session children",
  5951. "x-codeSamples": [
  5952. {
  5953. "lang": "js",
  5954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5955. }
  5956. ]
  5957. }
  5958. },
  5959. "/session/{sessionID}/todo": {
  5960. "get": {
  5961. "tags": ["session"],
  5962. "operationId": "session.todo",
  5963. "parameters": [
  5964. {
  5965. "name": "sessionID",
  5966. "in": "path",
  5967. "schema": {
  5968. "type": "string",
  5969. "pattern": "^ses"
  5970. },
  5971. "required": true
  5972. },
  5973. {
  5974. "name": "directory",
  5975. "in": "query",
  5976. "schema": {
  5977. "type": "string"
  5978. },
  5979. "required": false
  5980. },
  5981. {
  5982. "name": "workspace",
  5983. "in": "query",
  5984. "schema": {
  5985. "type": "string"
  5986. },
  5987. "required": false
  5988. }
  5989. ],
  5990. "responses": {
  5991. "200": {
  5992. "description": "Todo list",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "type": "array",
  5997. "items": {
  5998. "$ref": "#/components/schemas/Todo"
  5999. },
  6000. "description": "Todo list"
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "400": {
  6006. "description": "BadRequest | InvalidRequestError",
  6007. "content": {
  6008. "application/json": {
  6009. "schema": {
  6010. "anyOf": [
  6011. {
  6012. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/InvalidRequestError"
  6016. }
  6017. ]
  6018. }
  6019. }
  6020. }
  6021. },
  6022. "404": {
  6023. "description": "NotFoundError",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/NotFoundError"
  6028. }
  6029. }
  6030. }
  6031. }
  6032. },
  6033. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6034. "summary": "Get session todos",
  6035. "x-codeSamples": [
  6036. {
  6037. "lang": "js",
  6038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6039. }
  6040. ]
  6041. }
  6042. },
  6043. "/session/{sessionID}/diff": {
  6044. "get": {
  6045. "tags": ["session"],
  6046. "operationId": "session.diff",
  6047. "parameters": [
  6048. {
  6049. "name": "sessionID",
  6050. "in": "path",
  6051. "schema": {
  6052. "type": "string",
  6053. "pattern": "^ses"
  6054. },
  6055. "required": true
  6056. },
  6057. {
  6058. "name": "directory",
  6059. "in": "query",
  6060. "schema": {
  6061. "type": "string"
  6062. },
  6063. "required": false
  6064. },
  6065. {
  6066. "name": "workspace",
  6067. "in": "query",
  6068. "schema": {
  6069. "type": "string"
  6070. },
  6071. "required": false
  6072. },
  6073. {
  6074. "name": "messageID",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string",
  6078. "pattern": "^msg"
  6079. },
  6080. "required": false
  6081. }
  6082. ],
  6083. "responses": {
  6084. "200": {
  6085. "description": "Successfully retrieved diff",
  6086. "content": {
  6087. "application/json": {
  6088. "schema": {
  6089. "type": "array",
  6090. "items": {
  6091. "$ref": "#/components/schemas/SnapshotFileDiff"
  6092. },
  6093. "description": "Successfully retrieved diff"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "400": {
  6099. "description": "Bad request",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/BadRequestError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6110. "summary": "Get message diff",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6115. }
  6116. ]
  6117. }
  6118. },
  6119. "/session/{sessionID}/message": {
  6120. "get": {
  6121. "tags": ["session"],
  6122. "operationId": "session.messages",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "directory",
  6135. "in": "query",
  6136. "schema": {
  6137. "type": "string"
  6138. },
  6139. "required": false
  6140. },
  6141. {
  6142. "name": "workspace",
  6143. "in": "query",
  6144. "schema": {
  6145. "type": "string"
  6146. },
  6147. "required": false
  6148. },
  6149. {
  6150. "name": "limit",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "integer",
  6154. "minimum": 0,
  6155. "maximum": 9007199254740991
  6156. },
  6157. "required": false
  6158. },
  6159. {
  6160. "name": "before",
  6161. "in": "query",
  6162. "schema": {
  6163. "type": "string"
  6164. },
  6165. "required": false
  6166. }
  6167. ],
  6168. "responses": {
  6169. "200": {
  6170. "description": "List of messages",
  6171. "content": {
  6172. "application/json": {
  6173. "schema": {
  6174. "type": "array",
  6175. "items": {
  6176. "type": "object",
  6177. "properties": {
  6178. "info": {
  6179. "$ref": "#/components/schemas/Message"
  6180. },
  6181. "parts": {
  6182. "type": "array",
  6183. "items": {
  6184. "$ref": "#/components/schemas/Part"
  6185. }
  6186. }
  6187. },
  6188. "required": ["info", "parts"],
  6189. "additionalProperties": false
  6190. },
  6191. "description": "List of messages"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "400": {
  6197. "description": "BadRequest | InvalidRequestError",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "anyOf": [
  6202. {
  6203. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6204. },
  6205. {
  6206. "$ref": "#/components/schemas/InvalidRequestError"
  6207. }
  6208. ]
  6209. }
  6210. }
  6211. }
  6212. },
  6213. "404": {
  6214. "description": "NotFoundError",
  6215. "content": {
  6216. "application/json": {
  6217. "schema": {
  6218. "$ref": "#/components/schemas/NotFoundError"
  6219. }
  6220. }
  6221. }
  6222. }
  6223. },
  6224. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6225. "summary": "Get session messages",
  6226. "x-codeSamples": [
  6227. {
  6228. "lang": "js",
  6229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6230. }
  6231. ]
  6232. },
  6233. "post": {
  6234. "tags": ["session"],
  6235. "operationId": "session.prompt",
  6236. "parameters": [
  6237. {
  6238. "name": "sessionID",
  6239. "in": "path",
  6240. "schema": {
  6241. "type": "string",
  6242. "pattern": "^ses"
  6243. },
  6244. "required": true
  6245. },
  6246. {
  6247. "name": "directory",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. },
  6254. {
  6255. "name": "workspace",
  6256. "in": "query",
  6257. "schema": {
  6258. "type": "string"
  6259. },
  6260. "required": false
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "description": "Created message",
  6266. "content": {
  6267. "application/json": {
  6268. "schema": {
  6269. "type": "object",
  6270. "required": ["info", "parts"],
  6271. "properties": {
  6272. "info": {
  6273. "$ref": "#/components/schemas/AssistantMessage"
  6274. },
  6275. "parts": {
  6276. "type": "array",
  6277. "items": {
  6278. "$ref": "#/components/schemas/Part"
  6279. }
  6280. }
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "400": {
  6287. "description": "BadRequest | InvalidRequestError",
  6288. "content": {
  6289. "application/json": {
  6290. "schema": {
  6291. "anyOf": [
  6292. {
  6293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6294. },
  6295. {
  6296. "$ref": "#/components/schemas/InvalidRequestError"
  6297. }
  6298. ]
  6299. }
  6300. }
  6301. }
  6302. },
  6303. "404": {
  6304. "description": "NotFoundError",
  6305. "content": {
  6306. "application/json": {
  6307. "schema": {
  6308. "$ref": "#/components/schemas/NotFoundError"
  6309. }
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "description": "Create and send a new message to a session, streaming the AI response.",
  6315. "summary": "Send message",
  6316. "requestBody": {
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "object",
  6321. "properties": {
  6322. "messageID": {
  6323. "type": "string",
  6324. "pattern": "^msg"
  6325. },
  6326. "model": {
  6327. "type": "object",
  6328. "properties": {
  6329. "providerID": {
  6330. "type": "string"
  6331. },
  6332. "modelID": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. "required": ["providerID", "modelID"],
  6337. "additionalProperties": false
  6338. },
  6339. "agent": {
  6340. "type": "string"
  6341. },
  6342. "noReply": {
  6343. "type": "boolean"
  6344. },
  6345. "tools": {
  6346. "type": "object",
  6347. "additionalProperties": {
  6348. "type": "boolean"
  6349. }
  6350. },
  6351. "format": {
  6352. "$ref": "#/components/schemas/OutputFormat"
  6353. },
  6354. "system": {
  6355. "type": "string"
  6356. },
  6357. "variant": {
  6358. "type": "string"
  6359. },
  6360. "parts": {
  6361. "type": "array",
  6362. "items": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/TextPartInput"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/FilePartInput"
  6369. },
  6370. {
  6371. "$ref": "#/components/schemas/AgentPartInput"
  6372. },
  6373. {
  6374. "$ref": "#/components/schemas/SubtaskPartInput"
  6375. }
  6376. ]
  6377. }
  6378. }
  6379. },
  6380. "required": ["parts"],
  6381. "additionalProperties": false
  6382. }
  6383. }
  6384. }
  6385. },
  6386. "x-codeSamples": [
  6387. {
  6388. "lang": "js",
  6389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6390. }
  6391. ]
  6392. }
  6393. },
  6394. "/session/{sessionID}/message/{messageID}": {
  6395. "get": {
  6396. "tags": ["session"],
  6397. "operationId": "session.message",
  6398. "parameters": [
  6399. {
  6400. "name": "sessionID",
  6401. "in": "path",
  6402. "schema": {
  6403. "type": "string",
  6404. "pattern": "^ses"
  6405. },
  6406. "required": true
  6407. },
  6408. {
  6409. "name": "messageID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^msg"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Message",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "type": "object",
  6441. "properties": {
  6442. "info": {
  6443. "$ref": "#/components/schemas/Message"
  6444. },
  6445. "parts": {
  6446. "type": "array",
  6447. "items": {
  6448. "$ref": "#/components/schemas/Part"
  6449. }
  6450. }
  6451. },
  6452. "required": ["info", "parts"],
  6453. "additionalProperties": false,
  6454. "description": "Message"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Retrieve a specific message from a session by its message ID.",
  6488. "summary": "Get message",
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6493. }
  6494. ]
  6495. },
  6496. "delete": {
  6497. "tags": ["session"],
  6498. "operationId": "session.deleteMessage",
  6499. "parameters": [
  6500. {
  6501. "name": "sessionID",
  6502. "in": "path",
  6503. "schema": {
  6504. "type": "string",
  6505. "pattern": "^ses"
  6506. },
  6507. "required": true
  6508. },
  6509. {
  6510. "name": "messageID",
  6511. "in": "path",
  6512. "schema": {
  6513. "type": "string",
  6514. "pattern": "^msg"
  6515. },
  6516. "required": true
  6517. },
  6518. {
  6519. "name": "directory",
  6520. "in": "query",
  6521. "schema": {
  6522. "type": "string"
  6523. },
  6524. "required": false
  6525. },
  6526. {
  6527. "name": "workspace",
  6528. "in": "query",
  6529. "schema": {
  6530. "type": "string"
  6531. },
  6532. "required": false
  6533. }
  6534. ],
  6535. "responses": {
  6536. "200": {
  6537. "description": "Successfully deleted message",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "type": "boolean",
  6542. "description": "Successfully deleted message"
  6543. }
  6544. }
  6545. }
  6546. },
  6547. "400": {
  6548. "description": "BadRequest | InvalidRequestError",
  6549. "content": {
  6550. "application/json": {
  6551. "schema": {
  6552. "anyOf": [
  6553. {
  6554. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/InvalidRequestError"
  6558. }
  6559. ]
  6560. }
  6561. }
  6562. }
  6563. },
  6564. "404": {
  6565. "description": "NotFoundError",
  6566. "content": {
  6567. "application/json": {
  6568. "schema": {
  6569. "$ref": "#/components/schemas/NotFoundError"
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "409": {
  6575. "description": "SessionBusyError",
  6576. "content": {
  6577. "application/json": {
  6578. "schema": {
  6579. "$ref": "#/components/schemas/SessionBusyError"
  6580. }
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6586. "summary": "Delete message",
  6587. "x-codeSamples": [
  6588. {
  6589. "lang": "js",
  6590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6591. }
  6592. ]
  6593. }
  6594. },
  6595. "/session/{sessionID}/fork": {
  6596. "post": {
  6597. "tags": ["session"],
  6598. "operationId": "session.fork",
  6599. "parameters": [
  6600. {
  6601. "name": "sessionID",
  6602. "in": "path",
  6603. "schema": {
  6604. "type": "string",
  6605. "pattern": "^ses"
  6606. },
  6607. "required": true
  6608. },
  6609. {
  6610. "name": "directory",
  6611. "in": "query",
  6612. "schema": {
  6613. "type": "string"
  6614. },
  6615. "required": false
  6616. },
  6617. {
  6618. "name": "workspace",
  6619. "in": "query",
  6620. "schema": {
  6621. "type": "string"
  6622. },
  6623. "required": false
  6624. }
  6625. ],
  6626. "responses": {
  6627. "200": {
  6628. "description": "200",
  6629. "content": {
  6630. "application/json": {
  6631. "schema": {
  6632. "$ref": "#/components/schemas/Session"
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "400": {
  6638. "description": "BadRequest | InvalidRequestError",
  6639. "content": {
  6640. "application/json": {
  6641. "schema": {
  6642. "anyOf": [
  6643. {
  6644. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6645. },
  6646. {
  6647. "$ref": "#/components/schemas/InvalidRequestError"
  6648. }
  6649. ]
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "404": {
  6655. "description": "NotFoundError",
  6656. "content": {
  6657. "application/json": {
  6658. "schema": {
  6659. "$ref": "#/components/schemas/NotFoundError"
  6660. }
  6661. }
  6662. }
  6663. }
  6664. },
  6665. "description": "Create a new session by forking an existing session at a specific message point.",
  6666. "summary": "Fork session",
  6667. "requestBody": {
  6668. "content": {
  6669. "application/json": {
  6670. "schema": {
  6671. "type": "object",
  6672. "properties": {
  6673. "messageID": {
  6674. "type": "string",
  6675. "pattern": "^msg"
  6676. }
  6677. },
  6678. "additionalProperties": false
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "x-codeSamples": [
  6684. {
  6685. "lang": "js",
  6686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6687. }
  6688. ]
  6689. }
  6690. },
  6691. "/session/{sessionID}/abort": {
  6692. "post": {
  6693. "tags": ["session"],
  6694. "operationId": "session.abort",
  6695. "parameters": [
  6696. {
  6697. "name": "sessionID",
  6698. "in": "path",
  6699. "schema": {
  6700. "type": "string",
  6701. "pattern": "^ses"
  6702. },
  6703. "required": true
  6704. },
  6705. {
  6706. "name": "directory",
  6707. "in": "query",
  6708. "schema": {
  6709. "type": "string"
  6710. },
  6711. "required": false
  6712. },
  6713. {
  6714. "name": "workspace",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. }
  6721. ],
  6722. "responses": {
  6723. "200": {
  6724. "description": "Aborted session",
  6725. "content": {
  6726. "application/json": {
  6727. "schema": {
  6728. "type": "boolean",
  6729. "description": "Aborted session"
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "400": {
  6735. "description": "BadRequest | InvalidRequestError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "anyOf": [
  6740. {
  6741. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6742. },
  6743. {
  6744. "$ref": "#/components/schemas/InvalidRequestError"
  6745. }
  6746. ]
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6753. "summary": "Abort session",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6758. }
  6759. ]
  6760. }
  6761. },
  6762. "/session/{sessionID}/init": {
  6763. "post": {
  6764. "tags": ["session"],
  6765. "operationId": "session.init",
  6766. "parameters": [
  6767. {
  6768. "name": "sessionID",
  6769. "in": "path",
  6770. "schema": {
  6771. "type": "string",
  6772. "pattern": "^ses"
  6773. },
  6774. "required": true
  6775. },
  6776. {
  6777. "name": "directory",
  6778. "in": "query",
  6779. "schema": {
  6780. "type": "string"
  6781. },
  6782. "required": false
  6783. },
  6784. {
  6785. "name": "workspace",
  6786. "in": "query",
  6787. "schema": {
  6788. "type": "string"
  6789. },
  6790. "required": false
  6791. }
  6792. ],
  6793. "responses": {
  6794. "200": {
  6795. "description": "200",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "type": "boolean",
  6800. "description": "200"
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "400": {
  6806. "description": "BadRequest | InvalidRequestError",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "anyOf": [
  6811. {
  6812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6813. },
  6814. {
  6815. "$ref": "#/components/schemas/InvalidRequestError"
  6816. }
  6817. ]
  6818. }
  6819. }
  6820. }
  6821. },
  6822. "404": {
  6823. "description": "NotFoundError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "$ref": "#/components/schemas/NotFoundError"
  6828. }
  6829. }
  6830. }
  6831. }
  6832. },
  6833. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6834. "summary": "Initialize session",
  6835. "requestBody": {
  6836. "content": {
  6837. "application/json": {
  6838. "schema": {
  6839. "type": "object",
  6840. "properties": {
  6841. "modelID": {
  6842. "type": "string"
  6843. },
  6844. "providerID": {
  6845. "type": "string"
  6846. },
  6847. "messageID": {
  6848. "type": "string",
  6849. "pattern": "^msg"
  6850. }
  6851. },
  6852. "required": ["modelID", "providerID", "messageID"],
  6853. "additionalProperties": false
  6854. }
  6855. }
  6856. }
  6857. },
  6858. "x-codeSamples": [
  6859. {
  6860. "lang": "js",
  6861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6862. }
  6863. ]
  6864. }
  6865. },
  6866. "/session/{sessionID}/share": {
  6867. "post": {
  6868. "tags": ["session"],
  6869. "operationId": "session.share",
  6870. "parameters": [
  6871. {
  6872. "name": "sessionID",
  6873. "in": "path",
  6874. "schema": {
  6875. "type": "string",
  6876. "pattern": "^ses"
  6877. },
  6878. "required": true
  6879. },
  6880. {
  6881. "name": "directory",
  6882. "in": "query",
  6883. "schema": {
  6884. "type": "string"
  6885. },
  6886. "required": false
  6887. },
  6888. {
  6889. "name": "workspace",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. }
  6896. ],
  6897. "responses": {
  6898. "200": {
  6899. "description": "Successfully shared session",
  6900. "content": {
  6901. "application/json": {
  6902. "schema": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "400": {
  6909. "description": "Bad request",
  6910. "content": {
  6911. "application/json": {
  6912. "schema": {
  6913. "$ref": "#/components/schemas/BadRequestError"
  6914. }
  6915. }
  6916. }
  6917. },
  6918. "404": {
  6919. "description": "NotFoundError",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "$ref": "#/components/schemas/NotFoundError"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "500": {
  6929. "description": "InternalServerError",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6934. }
  6935. }
  6936. }
  6937. }
  6938. },
  6939. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6940. "summary": "Share session",
  6941. "x-codeSamples": [
  6942. {
  6943. "lang": "js",
  6944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6945. }
  6946. ]
  6947. },
  6948. "delete": {
  6949. "tags": ["session"],
  6950. "operationId": "session.unshare",
  6951. "parameters": [
  6952. {
  6953. "name": "sessionID",
  6954. "in": "path",
  6955. "schema": {
  6956. "type": "string",
  6957. "pattern": "^ses"
  6958. },
  6959. "required": true
  6960. },
  6961. {
  6962. "name": "directory",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. },
  6969. {
  6970. "name": "workspace",
  6971. "in": "query",
  6972. "schema": {
  6973. "type": "string"
  6974. },
  6975. "required": false
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "description": "Successfully unshared session",
  6981. "content": {
  6982. "application/json": {
  6983. "schema": {
  6984. "$ref": "#/components/schemas/Session"
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "400": {
  6990. "description": "Bad request",
  6991. "content": {
  6992. "application/json": {
  6993. "schema": {
  6994. "$ref": "#/components/schemas/BadRequestError"
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "404": {
  7000. "description": "NotFoundError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "$ref": "#/components/schemas/NotFoundError"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "500": {
  7010. "description": "InternalServerError",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Remove the shareable link for a session, making it private again.",
  7021. "summary": "Unshare session",
  7022. "x-codeSamples": [
  7023. {
  7024. "lang": "js",
  7025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7026. }
  7027. ]
  7028. }
  7029. },
  7030. "/session/{sessionID}/summarize": {
  7031. "post": {
  7032. "tags": ["session"],
  7033. "operationId": "session.summarize",
  7034. "parameters": [
  7035. {
  7036. "name": "sessionID",
  7037. "in": "path",
  7038. "schema": {
  7039. "type": "string",
  7040. "pattern": "^ses"
  7041. },
  7042. "required": true
  7043. },
  7044. {
  7045. "name": "directory",
  7046. "in": "query",
  7047. "schema": {
  7048. "type": "string"
  7049. },
  7050. "required": false
  7051. },
  7052. {
  7053. "name": "workspace",
  7054. "in": "query",
  7055. "schema": {
  7056. "type": "string"
  7057. },
  7058. "required": false
  7059. }
  7060. ],
  7061. "responses": {
  7062. "200": {
  7063. "description": "Summarized session",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "type": "boolean",
  7068. "description": "Summarized session"
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "400": {
  7074. "description": "BadRequest | InvalidRequestError",
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "anyOf": [
  7079. {
  7080. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/InvalidRequestError"
  7084. }
  7085. ]
  7086. }
  7087. }
  7088. }
  7089. },
  7090. "404": {
  7091. "description": "NotFoundError",
  7092. "content": {
  7093. "application/json": {
  7094. "schema": {
  7095. "$ref": "#/components/schemas/NotFoundError"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. },
  7101. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7102. "summary": "Summarize session",
  7103. "requestBody": {
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "object",
  7108. "properties": {
  7109. "providerID": {
  7110. "type": "string"
  7111. },
  7112. "modelID": {
  7113. "type": "string"
  7114. },
  7115. "auto": {
  7116. "type": "boolean"
  7117. }
  7118. },
  7119. "required": ["providerID", "modelID"],
  7120. "additionalProperties": false
  7121. }
  7122. }
  7123. }
  7124. },
  7125. "x-codeSamples": [
  7126. {
  7127. "lang": "js",
  7128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7129. }
  7130. ]
  7131. }
  7132. },
  7133. "/session/{sessionID}/prompt_async": {
  7134. "post": {
  7135. "tags": ["session"],
  7136. "operationId": "session.prompt_async",
  7137. "parameters": [
  7138. {
  7139. "name": "sessionID",
  7140. "in": "path",
  7141. "schema": {
  7142. "type": "string",
  7143. "pattern": "^ses"
  7144. },
  7145. "required": true
  7146. },
  7147. {
  7148. "name": "directory",
  7149. "in": "query",
  7150. "schema": {
  7151. "type": "string"
  7152. },
  7153. "required": false
  7154. },
  7155. {
  7156. "name": "workspace",
  7157. "in": "query",
  7158. "schema": {
  7159. "type": "string"
  7160. },
  7161. "required": false
  7162. }
  7163. ],
  7164. "responses": {
  7165. "204": {
  7166. "description": "Prompt accepted"
  7167. },
  7168. "400": {
  7169. "description": "BadRequest | InvalidRequestError",
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/InvalidRequestError"
  7179. }
  7180. ]
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "404": {
  7186. "description": "NotFoundError",
  7187. "content": {
  7188. "application/json": {
  7189. "schema": {
  7190. "$ref": "#/components/schemas/NotFoundError"
  7191. }
  7192. }
  7193. }
  7194. }
  7195. },
  7196. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7197. "summary": "Send async message",
  7198. "requestBody": {
  7199. "content": {
  7200. "application/json": {
  7201. "schema": {
  7202. "type": "object",
  7203. "properties": {
  7204. "messageID": {
  7205. "type": "string",
  7206. "pattern": "^msg"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "agent": {
  7222. "type": "string"
  7223. },
  7224. "noReply": {
  7225. "type": "boolean"
  7226. },
  7227. "tools": {
  7228. "type": "object",
  7229. "additionalProperties": {
  7230. "type": "boolean"
  7231. }
  7232. },
  7233. "format": {
  7234. "$ref": "#/components/schemas/OutputFormat"
  7235. },
  7236. "system": {
  7237. "type": "string"
  7238. },
  7239. "variant": {
  7240. "type": "string"
  7241. },
  7242. "parts": {
  7243. "type": "array",
  7244. "items": {
  7245. "anyOf": [
  7246. {
  7247. "$ref": "#/components/schemas/TextPartInput"
  7248. },
  7249. {
  7250. "$ref": "#/components/schemas/FilePartInput"
  7251. },
  7252. {
  7253. "$ref": "#/components/schemas/AgentPartInput"
  7254. },
  7255. {
  7256. "$ref": "#/components/schemas/SubtaskPartInput"
  7257. }
  7258. ]
  7259. }
  7260. }
  7261. },
  7262. "required": ["parts"],
  7263. "additionalProperties": false
  7264. }
  7265. }
  7266. }
  7267. },
  7268. "x-codeSamples": [
  7269. {
  7270. "lang": "js",
  7271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7272. }
  7273. ]
  7274. }
  7275. },
  7276. "/session/{sessionID}/command": {
  7277. "post": {
  7278. "tags": ["session"],
  7279. "operationId": "session.command",
  7280. "parameters": [
  7281. {
  7282. "name": "sessionID",
  7283. "in": "path",
  7284. "schema": {
  7285. "type": "string",
  7286. "pattern": "^ses"
  7287. },
  7288. "required": true
  7289. },
  7290. {
  7291. "name": "directory",
  7292. "in": "query",
  7293. "schema": {
  7294. "type": "string"
  7295. },
  7296. "required": false
  7297. },
  7298. {
  7299. "name": "workspace",
  7300. "in": "query",
  7301. "schema": {
  7302. "type": "string"
  7303. },
  7304. "required": false
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "description": "Created message",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "type": "object",
  7314. "required": ["info", "parts"],
  7315. "properties": {
  7316. "info": {
  7317. "$ref": "#/components/schemas/AssistantMessage"
  7318. },
  7319. "parts": {
  7320. "type": "array",
  7321. "items": {
  7322. "$ref": "#/components/schemas/Part"
  7323. }
  7324. }
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "400": {
  7331. "description": "BadRequest | InvalidRequestError",
  7332. "content": {
  7333. "application/json": {
  7334. "schema": {
  7335. "anyOf": [
  7336. {
  7337. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/InvalidRequestError"
  7341. }
  7342. ]
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "404": {
  7348. "description": "NotFoundError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "$ref": "#/components/schemas/NotFoundError"
  7353. }
  7354. }
  7355. }
  7356. }
  7357. },
  7358. "description": "Send a new command to a session for execution by the AI assistant.",
  7359. "summary": "Send command",
  7360. "requestBody": {
  7361. "content": {
  7362. "application/json": {
  7363. "schema": {
  7364. "type": "object",
  7365. "properties": {
  7366. "messageID": {
  7367. "type": "string",
  7368. "pattern": "^msg"
  7369. },
  7370. "agent": {
  7371. "type": "string"
  7372. },
  7373. "model": {
  7374. "type": "string"
  7375. },
  7376. "arguments": {
  7377. "type": "string"
  7378. },
  7379. "command": {
  7380. "type": "string"
  7381. },
  7382. "variant": {
  7383. "type": "string"
  7384. },
  7385. "parts": {
  7386. "type": "array",
  7387. "items": {
  7388. "type": "object",
  7389. "properties": {
  7390. "id": {
  7391. "type": "string",
  7392. "pattern": "^prt"
  7393. },
  7394. "type": {
  7395. "type": "string",
  7396. "enum": ["file"]
  7397. },
  7398. "mime": {
  7399. "type": "string"
  7400. },
  7401. "filename": {
  7402. "type": "string"
  7403. },
  7404. "url": {
  7405. "type": "string"
  7406. },
  7407. "source": {
  7408. "$ref": "#/components/schemas/FilePartSource"
  7409. }
  7410. },
  7411. "required": ["type", "mime", "url"],
  7412. "additionalProperties": false
  7413. }
  7414. }
  7415. },
  7416. "required": ["arguments", "command"],
  7417. "additionalProperties": false
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/session/{sessionID}/shell": {
  7431. "post": {
  7432. "tags": ["session"],
  7433. "operationId": "session.shell",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "responses": {
  7462. "200": {
  7463. "description": "Created message",
  7464. "content": {
  7465. "application/json": {
  7466. "schema": {
  7467. "type": "object",
  7468. "properties": {
  7469. "info": {
  7470. "$ref": "#/components/schemas/Message"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "$ref": "#/components/schemas/Part"
  7476. }
  7477. }
  7478. },
  7479. "required": ["info", "parts"],
  7480. "additionalProperties": false,
  7481. "description": "Created message"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "$ref": "#/components/schemas/NotFoundError"
  7509. }
  7510. }
  7511. }
  7512. },
  7513. "409": {
  7514. "description": "SessionBusyError",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "$ref": "#/components/schemas/SessionBusyError"
  7519. }
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "description": "Execute a shell command within the session context and return the AI's response.",
  7525. "summary": "Run shell command",
  7526. "requestBody": {
  7527. "content": {
  7528. "application/json": {
  7529. "schema": {
  7530. "type": "object",
  7531. "properties": {
  7532. "messageID": {
  7533. "type": "string",
  7534. "pattern": "^msg"
  7535. },
  7536. "agent": {
  7537. "type": "string"
  7538. },
  7539. "model": {
  7540. "type": "object",
  7541. "properties": {
  7542. "providerID": {
  7543. "type": "string"
  7544. },
  7545. "modelID": {
  7546. "type": "string"
  7547. }
  7548. },
  7549. "required": ["providerID", "modelID"],
  7550. "additionalProperties": false
  7551. },
  7552. "command": {
  7553. "type": "string"
  7554. }
  7555. },
  7556. "required": ["agent", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/revert": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.revert",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Updated session",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "$ref": "#/components/schemas/Session"
  7608. }
  7609. }
  7610. }
  7611. },
  7612. "400": {
  7613. "description": "BadRequest | InvalidRequestError",
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "anyOf": [
  7618. {
  7619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7620. },
  7621. {
  7622. "$ref": "#/components/schemas/InvalidRequestError"
  7623. }
  7624. ]
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "404": {
  7630. "description": "NotFoundError",
  7631. "content": {
  7632. "application/json": {
  7633. "schema": {
  7634. "$ref": "#/components/schemas/NotFoundError"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "409": {
  7640. "description": "SessionBusyError",
  7641. "content": {
  7642. "application/json": {
  7643. "schema": {
  7644. "$ref": "#/components/schemas/SessionBusyError"
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7651. "summary": "Revert message",
  7652. "requestBody": {
  7653. "content": {
  7654. "application/json": {
  7655. "schema": {
  7656. "type": "object",
  7657. "properties": {
  7658. "messageID": {
  7659. "type": "string",
  7660. "pattern": "^msg"
  7661. },
  7662. "partID": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. }
  7666. },
  7667. "required": ["messageID"],
  7668. "additionalProperties": false
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "x-codeSamples": [
  7674. {
  7675. "lang": "js",
  7676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7677. }
  7678. ]
  7679. }
  7680. },
  7681. "/session/{sessionID}/unrevert": {
  7682. "post": {
  7683. "tags": ["session"],
  7684. "operationId": "session.unrevert",
  7685. "parameters": [
  7686. {
  7687. "name": "sessionID",
  7688. "in": "path",
  7689. "schema": {
  7690. "type": "string",
  7691. "pattern": "^ses"
  7692. },
  7693. "required": true
  7694. },
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Updated session",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/Session"
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "400": {
  7724. "description": "BadRequest | InvalidRequestError",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "anyOf": [
  7729. {
  7730. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7731. },
  7732. {
  7733. "$ref": "#/components/schemas/InvalidRequestError"
  7734. }
  7735. ]
  7736. }
  7737. }
  7738. }
  7739. },
  7740. "404": {
  7741. "description": "NotFoundError",
  7742. "content": {
  7743. "application/json": {
  7744. "schema": {
  7745. "$ref": "#/components/schemas/NotFoundError"
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "409": {
  7751. "description": "SessionBusyError",
  7752. "content": {
  7753. "application/json": {
  7754. "schema": {
  7755. "$ref": "#/components/schemas/SessionBusyError"
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "description": "Restore all previously reverted messages in a session.",
  7762. "summary": "Restore reverted messages",
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/permissions/{permissionID}": {
  7772. "post": {
  7773. "tags": ["session"],
  7774. "operationId": "permission.respond",
  7775. "parameters": [
  7776. {
  7777. "name": "sessionID",
  7778. "in": "path",
  7779. "schema": {
  7780. "type": "string",
  7781. "pattern": "^ses"
  7782. },
  7783. "required": true
  7784. },
  7785. {
  7786. "name": "permissionID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^per"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "directory",
  7796. "in": "query",
  7797. "schema": {
  7798. "type": "string"
  7799. },
  7800. "required": false
  7801. },
  7802. {
  7803. "name": "workspace",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. }
  7810. ],
  7811. "responses": {
  7812. "200": {
  7813. "description": "Permission processed successfully",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "type": "boolean",
  7818. "description": "Permission processed successfully"
  7819. }
  7820. }
  7821. }
  7822. },
  7823. "400": {
  7824. "description": "BadRequest | InvalidRequestError",
  7825. "content": {
  7826. "application/json": {
  7827. "schema": {
  7828. "anyOf": [
  7829. {
  7830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7831. },
  7832. {
  7833. "$ref": "#/components/schemas/InvalidRequestError"
  7834. }
  7835. ]
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "404": {
  7841. "description": "NotFoundError | PermissionNotFoundError",
  7842. "content": {
  7843. "application/json": {
  7844. "schema": {
  7845. "anyOf": [
  7846. {
  7847. "$ref": "#/components/schemas/NotFoundError"
  7848. },
  7849. {
  7850. "$ref": "#/components/schemas/PermissionNotFoundError"
  7851. }
  7852. ]
  7853. }
  7854. }
  7855. }
  7856. }
  7857. },
  7858. "description": "Approve or deny a permission request from the AI assistant.",
  7859. "summary": "Respond to permission",
  7860. "deprecated": true,
  7861. "requestBody": {
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "object",
  7866. "properties": {
  7867. "response": {
  7868. "type": "string",
  7869. "enum": ["once", "always", "reject"]
  7870. }
  7871. },
  7872. "required": ["response"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7887. "delete": {
  7888. "tags": ["session"],
  7889. "operationId": "part.delete",
  7890. "parameters": [
  7891. {
  7892. "name": "sessionID",
  7893. "in": "path",
  7894. "schema": {
  7895. "type": "string",
  7896. "pattern": "^ses"
  7897. },
  7898. "required": true
  7899. },
  7900. {
  7901. "name": "messageID",
  7902. "in": "path",
  7903. "schema": {
  7904. "type": "string",
  7905. "pattern": "^msg"
  7906. },
  7907. "required": true
  7908. },
  7909. {
  7910. "name": "partID",
  7911. "in": "path",
  7912. "schema": {
  7913. "type": "string",
  7914. "pattern": "^prt"
  7915. },
  7916. "required": true
  7917. },
  7918. {
  7919. "name": "directory",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. },
  7926. {
  7927. "name": "workspace",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. }
  7934. ],
  7935. "responses": {
  7936. "200": {
  7937. "description": "Successfully deleted part",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "type": "boolean",
  7942. "description": "Successfully deleted part"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "400": {
  7948. "description": "BadRequest | InvalidRequestError",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "anyOf": [
  7953. {
  7954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7955. },
  7956. {
  7957. "$ref": "#/components/schemas/InvalidRequestError"
  7958. }
  7959. ]
  7960. }
  7961. }
  7962. }
  7963. },
  7964. "404": {
  7965. "description": "NotFoundError",
  7966. "content": {
  7967. "application/json": {
  7968. "schema": {
  7969. "$ref": "#/components/schemas/NotFoundError"
  7970. }
  7971. }
  7972. }
  7973. }
  7974. },
  7975. "description": "Delete a part from a message.",
  7976. "x-codeSamples": [
  7977. {
  7978. "lang": "js",
  7979. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7980. }
  7981. ]
  7982. },
  7983. "patch": {
  7984. "tags": ["session"],
  7985. "operationId": "part.update",
  7986. "parameters": [
  7987. {
  7988. "name": "sessionID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^ses"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "messageID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^msg"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "partID",
  8007. "in": "path",
  8008. "schema": {
  8009. "type": "string",
  8010. "pattern": "^prt"
  8011. },
  8012. "required": true
  8013. },
  8014. {
  8015. "name": "directory",
  8016. "in": "query",
  8017. "schema": {
  8018. "type": "string"
  8019. },
  8020. "required": false
  8021. },
  8022. {
  8023. "name": "workspace",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. }
  8030. ],
  8031. "responses": {
  8032. "200": {
  8033. "description": "Successfully updated part",
  8034. "content": {
  8035. "application/json": {
  8036. "schema": {
  8037. "$ref": "#/components/schemas/Part"
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "400": {
  8043. "description": "BadRequest | InvalidRequestError",
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "anyOf": [
  8048. {
  8049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8050. },
  8051. {
  8052. "$ref": "#/components/schemas/InvalidRequestError"
  8053. }
  8054. ]
  8055. }
  8056. }
  8057. }
  8058. },
  8059. "404": {
  8060. "description": "NotFoundError",
  8061. "content": {
  8062. "application/json": {
  8063. "schema": {
  8064. "$ref": "#/components/schemas/NotFoundError"
  8065. }
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "description": "Update a part in a message.",
  8071. "requestBody": {
  8072. "content": {
  8073. "application/json": {
  8074. "schema": {
  8075. "$ref": "#/components/schemas/Part"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "x-codeSamples": [
  8081. {
  8082. "lang": "js",
  8083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8084. }
  8085. ]
  8086. }
  8087. },
  8088. "/sync/start": {
  8089. "post": {
  8090. "tags": ["sync"],
  8091. "operationId": "sync.start",
  8092. "parameters": [
  8093. {
  8094. "name": "directory",
  8095. "in": "query",
  8096. "schema": {
  8097. "type": "string"
  8098. },
  8099. "required": false
  8100. },
  8101. {
  8102. "name": "workspace",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. }
  8109. ],
  8110. "responses": {
  8111. "200": {
  8112. "description": "Workspace sync started",
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "boolean",
  8117. "description": "Workspace sync started"
  8118. }
  8119. }
  8120. }
  8121. },
  8122. "400": {
  8123. "description": "Bad request",
  8124. "content": {
  8125. "application/json": {
  8126. "schema": {
  8127. "$ref": "#/components/schemas/BadRequestError"
  8128. }
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8134. "summary": "Start workspace sync",
  8135. "x-codeSamples": [
  8136. {
  8137. "lang": "js",
  8138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8139. }
  8140. ]
  8141. }
  8142. },
  8143. "/sync/replay": {
  8144. "post": {
  8145. "tags": ["sync"],
  8146. "operationId": "sync.replay",
  8147. "parameters": [
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "workspace",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. }
  8164. ],
  8165. "responses": {
  8166. "200": {
  8167. "description": "Replayed sync events",
  8168. "content": {
  8169. "application/json": {
  8170. "schema": {
  8171. "type": "object",
  8172. "properties": {
  8173. "sessionID": {
  8174. "type": "string"
  8175. }
  8176. },
  8177. "required": ["sessionID"],
  8178. "additionalProperties": false,
  8179. "description": "Replayed sync events"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "BadRequest | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. }
  8196. ]
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Validate and replay a complete sync event history.",
  8203. "summary": "Replay sync events",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "directory": {
  8211. "type": "string"
  8212. },
  8213. "events": {
  8214. "type": "array",
  8215. "minItems": 1,
  8216. "items": {
  8217. "type": "object",
  8218. "properties": {
  8219. "id": {
  8220. "type": "string",
  8221. "pattern": "^evt_"
  8222. },
  8223. "aggregateID": {
  8224. "type": "string"
  8225. },
  8226. "seq": {
  8227. "type": "integer",
  8228. "minimum": 0
  8229. },
  8230. "type": {
  8231. "type": "string"
  8232. },
  8233. "data": {
  8234. "type": "object"
  8235. }
  8236. },
  8237. "required": ["id", "aggregateID", "seq", "type", "data"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. },
  8242. "required": ["directory", "events"],
  8243. "additionalProperties": false
  8244. }
  8245. }
  8246. }
  8247. },
  8248. "x-codeSamples": [
  8249. {
  8250. "lang": "js",
  8251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8252. }
  8253. ]
  8254. }
  8255. },
  8256. "/sync/steal": {
  8257. "post": {
  8258. "tags": ["sync"],
  8259. "operationId": "sync.steal",
  8260. "parameters": [
  8261. {
  8262. "name": "directory",
  8263. "in": "query",
  8264. "schema": {
  8265. "type": "string"
  8266. },
  8267. "required": false
  8268. },
  8269. {
  8270. "name": "workspace",
  8271. "in": "query",
  8272. "schema": {
  8273. "type": "string"
  8274. },
  8275. "required": false
  8276. }
  8277. ],
  8278. "responses": {
  8279. "200": {
  8280. "description": "Session stolen into workspace",
  8281. "content": {
  8282. "application/json": {
  8283. "schema": {
  8284. "type": "object",
  8285. "properties": {
  8286. "sessionID": {
  8287. "type": "string",
  8288. "pattern": "^ses"
  8289. }
  8290. },
  8291. "required": ["sessionID"],
  8292. "additionalProperties": false,
  8293. "description": "Session stolen into workspace"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "400": {
  8299. "description": "BadRequest | InvalidRequestError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "anyOf": [
  8304. {
  8305. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/InvalidRequestError"
  8309. }
  8310. ]
  8311. }
  8312. }
  8313. }
  8314. }
  8315. },
  8316. "description": "Update a session to belong to the current workspace through the sync event system.",
  8317. "summary": "Steal session into workspace",
  8318. "requestBody": {
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "object",
  8323. "properties": {
  8324. "sessionID": {
  8325. "type": "string",
  8326. "pattern": "^ses"
  8327. }
  8328. },
  8329. "required": ["sessionID"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/history": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.history.list",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Sync events",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "array",
  8372. "items": {
  8373. "type": "object",
  8374. "properties": {
  8375. "id": {
  8376. "type": "string",
  8377. "pattern": "^evt_"
  8378. },
  8379. "aggregate_id": {
  8380. "type": "string"
  8381. },
  8382. "seq": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. },
  8386. "type": {
  8387. "type": "string"
  8388. },
  8389. "data": {
  8390. "type": "object"
  8391. }
  8392. },
  8393. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8394. "additionalProperties": false
  8395. },
  8396. "description": "Sync events"
  8397. }
  8398. }
  8399. }
  8400. },
  8401. "400": {
  8402. "description": "BadRequest | InvalidRequestError",
  8403. "content": {
  8404. "application/json": {
  8405. "schema": {
  8406. "anyOf": [
  8407. {
  8408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8409. },
  8410. {
  8411. "$ref": "#/components/schemas/InvalidRequestError"
  8412. }
  8413. ]
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "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.",
  8420. "summary": "List sync events",
  8421. "requestBody": {
  8422. "content": {
  8423. "application/json": {
  8424. "schema": {
  8425. "type": "object",
  8426. "additionalProperties": {
  8427. "type": "integer",
  8428. "minimum": 0
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "x-codeSamples": [
  8435. {
  8436. "lang": "js",
  8437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8438. }
  8439. ]
  8440. }
  8441. },
  8442. "/tui/append-prompt": {
  8443. "post": {
  8444. "tags": ["tui"],
  8445. "operationId": "tui.appendPrompt",
  8446. "parameters": [
  8447. {
  8448. "name": "directory",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. },
  8455. {
  8456. "name": "workspace",
  8457. "in": "query",
  8458. "schema": {
  8459. "type": "string"
  8460. },
  8461. "required": false
  8462. }
  8463. ],
  8464. "responses": {
  8465. "200": {
  8466. "description": "Prompt processed successfully",
  8467. "content": {
  8468. "application/json": {
  8469. "schema": {
  8470. "type": "boolean",
  8471. "description": "Prompt processed successfully"
  8472. }
  8473. }
  8474. }
  8475. },
  8476. "400": {
  8477. "description": "BadRequest | InvalidRequestError",
  8478. "content": {
  8479. "application/json": {
  8480. "schema": {
  8481. "anyOf": [
  8482. {
  8483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8484. },
  8485. {
  8486. "$ref": "#/components/schemas/InvalidRequestError"
  8487. }
  8488. ]
  8489. }
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "description": "Append prompt to the TUI.",
  8495. "summary": "Append TUI prompt",
  8496. "requestBody": {
  8497. "content": {
  8498. "application/json": {
  8499. "schema": {
  8500. "type": "object",
  8501. "properties": {
  8502. "text": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["text"],
  8507. "additionalProperties": false
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "x-codeSamples": [
  8513. {
  8514. "lang": "js",
  8515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8516. }
  8517. ]
  8518. }
  8519. },
  8520. "/tui/open-help": {
  8521. "post": {
  8522. "tags": ["tui"],
  8523. "operationId": "tui.openHelp",
  8524. "parameters": [
  8525. {
  8526. "name": "directory",
  8527. "in": "query",
  8528. "schema": {
  8529. "type": "string"
  8530. },
  8531. "required": false
  8532. },
  8533. {
  8534. "name": "workspace",
  8535. "in": "query",
  8536. "schema": {
  8537. "type": "string"
  8538. },
  8539. "required": false
  8540. }
  8541. ],
  8542. "responses": {
  8543. "200": {
  8544. "description": "Help dialog opened successfully",
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {
  8548. "type": "boolean",
  8549. "description": "Help dialog opened successfully"
  8550. }
  8551. }
  8552. }
  8553. },
  8554. "400": {
  8555. "description": "Bad request",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "$ref": "#/components/schemas/BadRequestError"
  8560. }
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "description": "Open the help dialog in the TUI to display user assistance information.",
  8566. "summary": "Open help dialog",
  8567. "x-codeSamples": [
  8568. {
  8569. "lang": "js",
  8570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8571. }
  8572. ]
  8573. }
  8574. },
  8575. "/tui/open-sessions": {
  8576. "post": {
  8577. "tags": ["tui"],
  8578. "operationId": "tui.openSessions",
  8579. "parameters": [
  8580. {
  8581. "name": "directory",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. },
  8588. {
  8589. "name": "workspace",
  8590. "in": "query",
  8591. "schema": {
  8592. "type": "string"
  8593. },
  8594. "required": false
  8595. }
  8596. ],
  8597. "responses": {
  8598. "200": {
  8599. "description": "Session dialog opened successfully",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "type": "boolean",
  8604. "description": "Session dialog opened successfully"
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "Bad request",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/BadRequestError"
  8615. }
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "description": "Open the session dialog.",
  8621. "summary": "Open sessions dialog",
  8622. "x-codeSamples": [
  8623. {
  8624. "lang": "js",
  8625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8626. }
  8627. ]
  8628. }
  8629. },
  8630. "/tui/open-themes": {
  8631. "post": {
  8632. "tags": ["tui"],
  8633. "operationId": "tui.openThemes",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Theme dialog opened successfully",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "type": "boolean",
  8659. "description": "Theme dialog opened successfully"
  8660. }
  8661. }
  8662. }
  8663. },
  8664. "400": {
  8665. "description": "Bad request",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "$ref": "#/components/schemas/BadRequestError"
  8670. }
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "description": "Open the theme dialog.",
  8676. "summary": "Open themes dialog",
  8677. "x-codeSamples": [
  8678. {
  8679. "lang": "js",
  8680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8681. }
  8682. ]
  8683. }
  8684. },
  8685. "/tui/open-models": {
  8686. "post": {
  8687. "tags": ["tui"],
  8688. "operationId": "tui.openModels",
  8689. "parameters": [
  8690. {
  8691. "name": "directory",
  8692. "in": "query",
  8693. "schema": {
  8694. "type": "string"
  8695. },
  8696. "required": false
  8697. },
  8698. {
  8699. "name": "workspace",
  8700. "in": "query",
  8701. "schema": {
  8702. "type": "string"
  8703. },
  8704. "required": false
  8705. }
  8706. ],
  8707. "responses": {
  8708. "200": {
  8709. "description": "Model dialog opened successfully",
  8710. "content": {
  8711. "application/json": {
  8712. "schema": {
  8713. "type": "boolean",
  8714. "description": "Model dialog opened successfully"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "400": {
  8720. "description": "Bad request",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/BadRequestError"
  8725. }
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "description": "Open the model dialog.",
  8731. "summary": "Open models dialog",
  8732. "x-codeSamples": [
  8733. {
  8734. "lang": "js",
  8735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8736. }
  8737. ]
  8738. }
  8739. },
  8740. "/tui/submit-prompt": {
  8741. "post": {
  8742. "tags": ["tui"],
  8743. "operationId": "tui.submitPrompt",
  8744. "parameters": [
  8745. {
  8746. "name": "directory",
  8747. "in": "query",
  8748. "schema": {
  8749. "type": "string"
  8750. },
  8751. "required": false
  8752. },
  8753. {
  8754. "name": "workspace",
  8755. "in": "query",
  8756. "schema": {
  8757. "type": "string"
  8758. },
  8759. "required": false
  8760. }
  8761. ],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Prompt submitted successfully",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "boolean",
  8769. "description": "Prompt submitted successfully"
  8770. }
  8771. }
  8772. }
  8773. },
  8774. "400": {
  8775. "description": "Bad request",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "$ref": "#/components/schemas/BadRequestError"
  8780. }
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "description": "Submit the prompt.",
  8786. "summary": "Submit TUI prompt",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/tui/clear-prompt": {
  8796. "post": {
  8797. "tags": ["tui"],
  8798. "operationId": "tui.clearPrompt",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Prompt cleared successfully",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "boolean",
  8824. "description": "Prompt cleared successfully"
  8825. }
  8826. }
  8827. }
  8828. },
  8829. "400": {
  8830. "description": "Bad request",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "$ref": "#/components/schemas/BadRequestError"
  8835. }
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "description": "Clear the prompt.",
  8841. "summary": "Clear TUI prompt",
  8842. "x-codeSamples": [
  8843. {
  8844. "lang": "js",
  8845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8846. }
  8847. ]
  8848. }
  8849. },
  8850. "/tui/execute-command": {
  8851. "post": {
  8852. "tags": ["tui"],
  8853. "operationId": "tui.executeCommand",
  8854. "parameters": [
  8855. {
  8856. "name": "directory",
  8857. "in": "query",
  8858. "schema": {
  8859. "type": "string"
  8860. },
  8861. "required": false
  8862. },
  8863. {
  8864. "name": "workspace",
  8865. "in": "query",
  8866. "schema": {
  8867. "type": "string"
  8868. },
  8869. "required": false
  8870. }
  8871. ],
  8872. "responses": {
  8873. "200": {
  8874. "description": "Command executed successfully",
  8875. "content": {
  8876. "application/json": {
  8877. "schema": {
  8878. "type": "boolean",
  8879. "description": "Command executed successfully"
  8880. }
  8881. }
  8882. }
  8883. },
  8884. "400": {
  8885. "description": "BadRequest | InvalidRequestError",
  8886. "content": {
  8887. "application/json": {
  8888. "schema": {
  8889. "anyOf": [
  8890. {
  8891. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/InvalidRequestError"
  8895. }
  8896. ]
  8897. }
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "description": "Execute a TUI command.",
  8903. "summary": "Execute TUI command",
  8904. "requestBody": {
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "object",
  8909. "properties": {
  8910. "command": {
  8911. "type": "string"
  8912. }
  8913. },
  8914. "required": ["command"],
  8915. "additionalProperties": false
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "x-codeSamples": [
  8921. {
  8922. "lang": "js",
  8923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8924. }
  8925. ]
  8926. }
  8927. },
  8928. "/tui/show-toast": {
  8929. "post": {
  8930. "tags": ["tui"],
  8931. "operationId": "tui.showToast",
  8932. "parameters": [
  8933. {
  8934. "name": "directory",
  8935. "in": "query",
  8936. "schema": {
  8937. "type": "string"
  8938. },
  8939. "required": false
  8940. },
  8941. {
  8942. "name": "workspace",
  8943. "in": "query",
  8944. "schema": {
  8945. "type": "string"
  8946. },
  8947. "required": false
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "description": "Toast notification shown successfully",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "type": "boolean",
  8957. "description": "Toast notification shown successfully"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "Bad request",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/BadRequestError"
  8968. }
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "description": "Show a toast notification in the TUI.",
  8974. "summary": "Show TUI toast",
  8975. "requestBody": {
  8976. "content": {
  8977. "application/json": {
  8978. "schema": {
  8979. "type": "object",
  8980. "properties": {
  8981. "title": {
  8982. "type": "string"
  8983. },
  8984. "message": {
  8985. "type": "string"
  8986. },
  8987. "variant": {
  8988. "type": "string",
  8989. "enum": ["info", "success", "warning", "error"]
  8990. },
  8991. "duration": {
  8992. "type": "integer",
  8993. "exclusiveMinimum": 0
  8994. }
  8995. },
  8996. "required": ["message", "variant"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/publish": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.publish",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Event published successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Event published successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "BadRequest | InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "anyOf": [
  9050. {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/InvalidRequestError"
  9055. }
  9056. ]
  9057. }
  9058. }
  9059. }
  9060. }
  9061. },
  9062. "description": "Publish a TUI event.",
  9063. "summary": "Publish TUI event",
  9064. "requestBody": {
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "anyOf": [
  9069. {
  9070. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventTuiToastShow"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9080. }
  9081. ]
  9082. }
  9083. }
  9084. }
  9085. },
  9086. "x-codeSamples": [
  9087. {
  9088. "lang": "js",
  9089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9090. }
  9091. ]
  9092. }
  9093. },
  9094. "/tui/select-session": {
  9095. "post": {
  9096. "tags": ["tui"],
  9097. "operationId": "tui.selectSession",
  9098. "parameters": [
  9099. {
  9100. "name": "directory",
  9101. "in": "query",
  9102. "schema": {
  9103. "type": "string"
  9104. },
  9105. "required": false
  9106. },
  9107. {
  9108. "name": "workspace",
  9109. "in": "query",
  9110. "schema": {
  9111. "type": "string"
  9112. },
  9113. "required": false
  9114. }
  9115. ],
  9116. "responses": {
  9117. "200": {
  9118. "description": "Session selected successfully",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "type": "boolean",
  9123. "description": "Session selected successfully"
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "400": {
  9129. "description": "BadRequest | InvalidRequestError",
  9130. "content": {
  9131. "application/json": {
  9132. "schema": {
  9133. "anyOf": [
  9134. {
  9135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/InvalidRequestError"
  9139. }
  9140. ]
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "404": {
  9146. "description": "NotFoundError",
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "$ref": "#/components/schemas/NotFoundError"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "description": "Navigate the TUI to display the specified session.",
  9157. "summary": "Select session",
  9158. "requestBody": {
  9159. "content": {
  9160. "application/json": {
  9161. "schema": {
  9162. "type": "object",
  9163. "properties": {
  9164. "sessionID": {
  9165. "type": "string",
  9166. "pattern": "^ses",
  9167. "description": "Session ID to navigate to"
  9168. }
  9169. },
  9170. "required": ["sessionID"],
  9171. "additionalProperties": false
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "x-codeSamples": [
  9177. {
  9178. "lang": "js",
  9179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9180. }
  9181. ]
  9182. }
  9183. },
  9184. "/tui/control/next": {
  9185. "get": {
  9186. "tags": ["tui"],
  9187. "operationId": "tui.control.next",
  9188. "parameters": [
  9189. {
  9190. "name": "directory",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. },
  9197. {
  9198. "name": "workspace",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. }
  9205. ],
  9206. "responses": {
  9207. "200": {
  9208. "description": "Next TUI request",
  9209. "content": {
  9210. "application/json": {
  9211. "schema": {
  9212. "type": "object",
  9213. "properties": {
  9214. "path": {
  9215. "type": "string"
  9216. },
  9217. "body": {}
  9218. },
  9219. "required": ["path", "body"],
  9220. "additionalProperties": false,
  9221. "description": "Next TUI request"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Retrieve the next TUI request from the queue for processing.",
  9238. "summary": "Get next TUI request",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/control/response": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.control.response",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Response submitted successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Response submitted successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9293. "summary": "Submit TUI response",
  9294. "requestBody": {
  9295. "content": {
  9296. "application/json": {
  9297. "schema": {}
  9298. }
  9299. }
  9300. },
  9301. "x-codeSamples": [
  9302. {
  9303. "lang": "js",
  9304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9305. }
  9306. ]
  9307. }
  9308. },
  9309. "/experimental/workspace/adapter": {
  9310. "get": {
  9311. "tags": ["workspace"],
  9312. "operationId": "experimental.workspace.adapter.list",
  9313. "parameters": [
  9314. {
  9315. "name": "directory",
  9316. "in": "query",
  9317. "schema": {
  9318. "type": "string"
  9319. },
  9320. "required": false
  9321. },
  9322. {
  9323. "name": "workspace",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. }
  9330. ],
  9331. "responses": {
  9332. "200": {
  9333. "description": "Workspace adapters",
  9334. "content": {
  9335. "application/json": {
  9336. "schema": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "object",
  9340. "properties": {
  9341. "type": {
  9342. "type": "string"
  9343. },
  9344. "name": {
  9345. "type": "string"
  9346. },
  9347. "description": {
  9348. "type": "string"
  9349. }
  9350. },
  9351. "required": ["type", "name", "description"],
  9352. "additionalProperties": false
  9353. },
  9354. "description": "Workspace adapters"
  9355. }
  9356. }
  9357. }
  9358. },
  9359. "400": {
  9360. "description": "Bad request",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "$ref": "#/components/schemas/BadRequestError"
  9365. }
  9366. }
  9367. }
  9368. }
  9369. },
  9370. "description": "List all available workspace adapters for the current project.",
  9371. "summary": "List workspace adapters",
  9372. "x-codeSamples": [
  9373. {
  9374. "lang": "js",
  9375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9376. }
  9377. ]
  9378. }
  9379. },
  9380. "/experimental/workspace": {
  9381. "get": {
  9382. "tags": ["workspace"],
  9383. "operationId": "experimental.workspace.list",
  9384. "parameters": [
  9385. {
  9386. "name": "directory",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. },
  9393. {
  9394. "name": "workspace",
  9395. "in": "query",
  9396. "schema": {
  9397. "type": "string"
  9398. },
  9399. "required": false
  9400. }
  9401. ],
  9402. "responses": {
  9403. "200": {
  9404. "description": "Workspaces",
  9405. "content": {
  9406. "application/json": {
  9407. "schema": {
  9408. "type": "array",
  9409. "items": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. },
  9412. "description": "Workspaces"
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "400": {
  9418. "description": "Bad request",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "$ref": "#/components/schemas/BadRequestError"
  9423. }
  9424. }
  9425. }
  9426. }
  9427. },
  9428. "description": "List all workspaces.",
  9429. "summary": "List workspaces",
  9430. "x-codeSamples": [
  9431. {
  9432. "lang": "js",
  9433. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9434. }
  9435. ]
  9436. },
  9437. "post": {
  9438. "tags": ["workspace"],
  9439. "operationId": "experimental.workspace.create",
  9440. "parameters": [
  9441. {
  9442. "name": "directory",
  9443. "in": "query",
  9444. "schema": {
  9445. "type": "string"
  9446. },
  9447. "required": false
  9448. },
  9449. {
  9450. "name": "workspace",
  9451. "in": "query",
  9452. "schema": {
  9453. "type": "string"
  9454. },
  9455. "required": false
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "description": "Workspace created",
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "$ref": "#/components/schemas/Workspace"
  9465. }
  9466. }
  9467. }
  9468. },
  9469. "400": {
  9470. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9471. "content": {
  9472. "application/json": {
  9473. "schema": {
  9474. "anyOf": [
  9475. {
  9476. "$ref": "#/components/schemas/WorkspaceCreateError"
  9477. },
  9478. {
  9479. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9480. },
  9481. {
  9482. "$ref": "#/components/schemas/InvalidRequestError"
  9483. }
  9484. ]
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Create a workspace for the current project.",
  9491. "summary": "Create workspace",
  9492. "requestBody": {
  9493. "content": {
  9494. "application/json": {
  9495. "schema": {
  9496. "type": "object",
  9497. "properties": {
  9498. "id": {
  9499. "type": "string",
  9500. "pattern": "^wrk"
  9501. },
  9502. "type": {
  9503. "type": "string"
  9504. },
  9505. "branch": {
  9506. "anyOf": [
  9507. {
  9508. "type": "string"
  9509. },
  9510. {
  9511. "type": "null"
  9512. }
  9513. ]
  9514. },
  9515. "extra": {
  9516. "anyOf": [
  9517. {},
  9518. {
  9519. "type": "null"
  9520. }
  9521. ]
  9522. }
  9523. },
  9524. "required": ["type"],
  9525. "additionalProperties": false
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "x-codeSamples": [
  9531. {
  9532. "lang": "js",
  9533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "/experimental/workspace/sync-list": {
  9539. "post": {
  9540. "tags": ["workspace"],
  9541. "operationId": "experimental.workspace.syncList",
  9542. "parameters": [
  9543. {
  9544. "name": "directory",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. },
  9551. {
  9552. "name": "workspace",
  9553. "in": "query",
  9554. "schema": {
  9555. "type": "string"
  9556. },
  9557. "required": false
  9558. }
  9559. ],
  9560. "responses": {
  9561. "204": {
  9562. "description": "Workspace list synced"
  9563. },
  9564. "400": {
  9565. "description": "Bad request",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "$ref": "#/components/schemas/BadRequestError"
  9570. }
  9571. }
  9572. }
  9573. }
  9574. },
  9575. "description": "Register missing workspaces returned by workspace adapters.",
  9576. "summary": "Sync workspace list",
  9577. "x-codeSamples": [
  9578. {
  9579. "lang": "js",
  9580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9581. }
  9582. ]
  9583. }
  9584. },
  9585. "/experimental/workspace/status": {
  9586. "get": {
  9587. "tags": ["workspace"],
  9588. "operationId": "experimental.workspace.status",
  9589. "parameters": [
  9590. {
  9591. "name": "directory",
  9592. "in": "query",
  9593. "schema": {
  9594. "type": "string"
  9595. },
  9596. "required": false
  9597. },
  9598. {
  9599. "name": "workspace",
  9600. "in": "query",
  9601. "schema": {
  9602. "type": "string"
  9603. },
  9604. "required": false
  9605. }
  9606. ],
  9607. "responses": {
  9608. "200": {
  9609. "description": "Workspace status",
  9610. "content": {
  9611. "application/json": {
  9612. "schema": {
  9613. "type": "array",
  9614. "items": {
  9615. "type": "object",
  9616. "properties": {
  9617. "workspaceID": {
  9618. "type": "string",
  9619. "pattern": "^wrk"
  9620. },
  9621. "status": {
  9622. "type": "string",
  9623. "enum": ["connected", "connecting", "disconnected", "error"]
  9624. }
  9625. },
  9626. "required": ["workspaceID", "status"],
  9627. "additionalProperties": false
  9628. },
  9629. "description": "Workspace status"
  9630. }
  9631. }
  9632. }
  9633. },
  9634. "400": {
  9635. "description": "Bad request",
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "$ref": "#/components/schemas/BadRequestError"
  9640. }
  9641. }
  9642. }
  9643. }
  9644. },
  9645. "description": "Get connection status for workspaces in the current project.",
  9646. "summary": "Workspace status",
  9647. "x-codeSamples": [
  9648. {
  9649. "lang": "js",
  9650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9651. }
  9652. ]
  9653. }
  9654. },
  9655. "/experimental/workspace/{id}": {
  9656. "delete": {
  9657. "tags": ["workspace"],
  9658. "operationId": "experimental.workspace.remove",
  9659. "parameters": [
  9660. {
  9661. "name": "id",
  9662. "in": "path",
  9663. "schema": {
  9664. "type": "string",
  9665. "pattern": "^wrk"
  9666. },
  9667. "required": true
  9668. },
  9669. {
  9670. "name": "directory",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. },
  9677. {
  9678. "name": "workspace",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. }
  9685. ],
  9686. "responses": {
  9687. "200": {
  9688. "description": "Workspace removed",
  9689. "content": {
  9690. "application/json": {
  9691. "schema": {
  9692. "$ref": "#/components/schemas/Workspace"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "BadRequest | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/InvalidRequestError"
  9708. }
  9709. ]
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Remove an existing workspace.",
  9716. "summary": "Remove workspace",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/warp": {
  9726. "post": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.warp",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "204": {
  9749. "description": "Session warped"
  9750. },
  9751. "400": {
  9752. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "anyOf": [
  9757. {
  9758. "$ref": "#/components/schemas/WorkspaceWarpError"
  9759. },
  9760. {
  9761. "$ref": "#/components/schemas/VcsApplyError"
  9762. },
  9763. {
  9764. "$ref": "#/components/schemas/InvalidRequestError"
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "404": {
  9772. "description": "NotFoundError",
  9773. "content": {
  9774. "application/json": {
  9775. "schema": {
  9776. "$ref": "#/components/schemas/NotFoundError"
  9777. }
  9778. }
  9779. }
  9780. }
  9781. },
  9782. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9783. "summary": "Warp session into workspace",
  9784. "requestBody": {
  9785. "content": {
  9786. "application/json": {
  9787. "schema": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "anyOf": [
  9792. {
  9793. "type": "string",
  9794. "pattern": "^wrk"
  9795. },
  9796. {
  9797. "type": "null"
  9798. }
  9799. ]
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses"
  9804. },
  9805. "copyChanges": {
  9806. "type": "boolean"
  9807. }
  9808. },
  9809. "required": ["id", "sessionID"],
  9810. "additionalProperties": false
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9819. }
  9820. ]
  9821. }
  9822. },
  9823. "/api/health": {
  9824. "get": {
  9825. "tags": ["opencode HttpApi"],
  9826. "operationId": "v2.health.get",
  9827. "parameters": [],
  9828. "security": [],
  9829. "responses": {
  9830. "200": {
  9831. "description": "Success",
  9832. "content": {
  9833. "application/json": {
  9834. "schema": {
  9835. "type": "object",
  9836. "properties": {
  9837. "healthy": {
  9838. "type": "boolean",
  9839. "enum": [true]
  9840. }
  9841. },
  9842. "required": ["healthy"],
  9843. "additionalProperties": false
  9844. }
  9845. }
  9846. }
  9847. },
  9848. "400": {
  9849. "description": "InvalidRequestError",
  9850. "content": {
  9851. "application/json": {
  9852. "schema": {
  9853. "$ref": "#/components/schemas/InvalidRequestError"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "401": {
  9859. "description": "UnauthorizedError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/UnauthorizedError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Check whether the API server is ready to accept requests.",
  9870. "summary": "Check server health",
  9871. "x-codeSamples": [
  9872. {
  9873. "lang": "js",
  9874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9875. }
  9876. ]
  9877. }
  9878. },
  9879. "/api/location": {
  9880. "get": {
  9881. "tags": ["opencode HttpApi"],
  9882. "operationId": "v2.location.get",
  9883. "parameters": [
  9884. {
  9885. "name": "location",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "directory": {
  9891. "type": "string"
  9892. },
  9893. "workspace": {
  9894. "type": "string"
  9895. }
  9896. },
  9897. "additionalProperties": false
  9898. },
  9899. "required": false,
  9900. "style": "deepObject",
  9901. "explode": true
  9902. }
  9903. ],
  9904. "security": [],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Location.Info",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "$ref": "#/components/schemas/LocationInfo"
  9912. }
  9913. }
  9914. }
  9915. },
  9916. "400": {
  9917. "description": "InvalidRequestError",
  9918. "content": {
  9919. "application/json": {
  9920. "schema": {
  9921. "$ref": "#/components/schemas/InvalidRequestError"
  9922. }
  9923. }
  9924. }
  9925. },
  9926. "401": {
  9927. "description": "UnauthorizedError",
  9928. "content": {
  9929. "application/json": {
  9930. "schema": {
  9931. "$ref": "#/components/schemas/UnauthorizedError"
  9932. }
  9933. }
  9934. }
  9935. }
  9936. },
  9937. "description": "Resolve the requested location or the server default location.",
  9938. "summary": "Get location",
  9939. "x-codeSamples": [
  9940. {
  9941. "lang": "js",
  9942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "/api/agent": {
  9948. "get": {
  9949. "tags": ["opencode HttpApi"],
  9950. "operationId": "v2.agent.list",
  9951. "parameters": [
  9952. {
  9953. "name": "location",
  9954. "in": "query",
  9955. "schema": {
  9956. "type": "object",
  9957. "properties": {
  9958. "directory": {
  9959. "type": "string"
  9960. },
  9961. "workspace": {
  9962. "type": "string"
  9963. }
  9964. },
  9965. "additionalProperties": false
  9966. },
  9967. "required": false,
  9968. "style": "deepObject",
  9969. "explode": true
  9970. }
  9971. ],
  9972. "security": [],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Success",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "object",
  9980. "properties": {
  9981. "location": {
  9982. "$ref": "#/components/schemas/LocationInfo"
  9983. },
  9984. "data": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/AgentV2Info"
  9988. }
  9989. }
  9990. },
  9991. "required": ["location", "data"],
  9992. "additionalProperties": false
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "400": {
  9998. "description": "InvalidRequestError",
  9999. "content": {
  10000. "application/json": {
  10001. "schema": {
  10002. "$ref": "#/components/schemas/InvalidRequestError"
  10003. }
  10004. }
  10005. }
  10006. },
  10007. "401": {
  10008. "description": "UnauthorizedError",
  10009. "content": {
  10010. "application/json": {
  10011. "schema": {
  10012. "$ref": "#/components/schemas/UnauthorizedError"
  10013. }
  10014. }
  10015. }
  10016. }
  10017. },
  10018. "description": "Retrieve currently registered agents.",
  10019. "summary": "List agents",
  10020. "x-codeSamples": [
  10021. {
  10022. "lang": "js",
  10023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10024. }
  10025. ]
  10026. }
  10027. },
  10028. "/api/session": {
  10029. "get": {
  10030. "tags": ["sessions"],
  10031. "operationId": "v2.session.list",
  10032. "parameters": [
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string",
  10038. "pattern": "^wrk"
  10039. },
  10040. "required": false
  10041. },
  10042. {
  10043. "name": "limit",
  10044. "in": "query",
  10045. "schema": {
  10046. "type": "number"
  10047. },
  10048. "required": false
  10049. },
  10050. {
  10051. "name": "order",
  10052. "in": "query",
  10053. "schema": {
  10054. "type": "string",
  10055. "enum": ["asc", "desc"]
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "search",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. },
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "project",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. },
  10083. {
  10084. "name": "subpath",
  10085. "in": "query",
  10086. "schema": {
  10087. "type": "string"
  10088. },
  10089. "required": false
  10090. },
  10091. {
  10092. "name": "cursor",
  10093. "in": "query",
  10094. "schema": {
  10095. "type": "string",
  10096. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10097. },
  10098. "required": false
  10099. }
  10100. ],
  10101. "security": [],
  10102. "responses": {
  10103. "200": {
  10104. "description": "SessionsResponse",
  10105. "content": {
  10106. "application/json": {
  10107. "schema": {
  10108. "$ref": "#/components/schemas/SessionsResponse"
  10109. }
  10110. }
  10111. }
  10112. },
  10113. "400": {
  10114. "description": "InvalidCursorError | InvalidRequestError",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "anyOf": [
  10119. {
  10120. "$ref": "#/components/schemas/InvalidCursorError"
  10121. },
  10122. {
  10123. "$ref": "#/components/schemas/InvalidRequestError"
  10124. },
  10125. {
  10126. "$ref": "#/components/schemas/InvalidRequestError"
  10127. }
  10128. ]
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "401": {
  10134. "description": "UnauthorizedError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/UnauthorizedError"
  10139. }
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "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.",
  10145. "summary": "List sessions",
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10150. }
  10151. ]
  10152. },
  10153. "post": {
  10154. "tags": ["sessions"],
  10155. "operationId": "v2.session.create",
  10156. "parameters": [],
  10157. "security": [],
  10158. "responses": {
  10159. "200": {
  10160. "description": "Success",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "type": "object",
  10165. "properties": {
  10166. "data": {
  10167. "$ref": "#/components/schemas/SessionV2Info"
  10168. }
  10169. },
  10170. "required": ["data"],
  10171. "additionalProperties": false
  10172. }
  10173. }
  10174. }
  10175. },
  10176. "400": {
  10177. "description": "InvalidRequestError",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "$ref": "#/components/schemas/InvalidRequestError"
  10182. }
  10183. }
  10184. }
  10185. },
  10186. "401": {
  10187. "description": "UnauthorizedError",
  10188. "content": {
  10189. "application/json": {
  10190. "schema": {
  10191. "$ref": "#/components/schemas/UnauthorizedError"
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Create a session at the requested location.",
  10198. "summary": "Create session",
  10199. "requestBody": {
  10200. "content": {
  10201. "application/json": {
  10202. "schema": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string",
  10207. "pattern": "^ses"
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "id": {
  10216. "type": "string"
  10217. },
  10218. "providerID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["id", "providerID"],
  10226. "additionalProperties": false
  10227. },
  10228. "location": {
  10229. "$ref": "#/components/schemas/LocationRef"
  10230. }
  10231. },
  10232. "additionalProperties": false
  10233. }
  10234. }
  10235. },
  10236. "required": true
  10237. },
  10238. "x-codeSamples": [
  10239. {
  10240. "lang": "js",
  10241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10242. }
  10243. ]
  10244. }
  10245. },
  10246. "/api/session/{sessionID}": {
  10247. "get": {
  10248. "tags": ["sessions"],
  10249. "operationId": "v2.session.get",
  10250. "parameters": [
  10251. {
  10252. "name": "sessionID",
  10253. "in": "path",
  10254. "schema": {
  10255. "type": "string",
  10256. "pattern": "^ses"
  10257. },
  10258. "required": true
  10259. }
  10260. ],
  10261. "security": [],
  10262. "responses": {
  10263. "200": {
  10264. "description": "Success",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "type": "object",
  10269. "properties": {
  10270. "data": {
  10271. "$ref": "#/components/schemas/SessionV2Info"
  10272. }
  10273. },
  10274. "required": ["data"],
  10275. "additionalProperties": false
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "400": {
  10281. "description": "InvalidRequestError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "$ref": "#/components/schemas/InvalidRequestError"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "401": {
  10291. "description": "UnauthorizedError",
  10292. "content": {
  10293. "application/json": {
  10294. "schema": {
  10295. "$ref": "#/components/schemas/UnauthorizedError"
  10296. }
  10297. }
  10298. }
  10299. },
  10300. "404": {
  10301. "description": "SessionNotFoundError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/SessionNotFoundError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/SessionNotFoundError"
  10311. }
  10312. ]
  10313. }
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "description": "Retrieve a session by ID.",
  10319. "summary": "Get session",
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}/agent": {
  10329. "post": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.switchAgent",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "204": {
  10346. "description": "<No Content>"
  10347. },
  10348. "400": {
  10349. "description": "InvalidRequestError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/InvalidRequestError"
  10354. }
  10355. }
  10356. }
  10357. },
  10358. "401": {
  10359. "description": "UnauthorizedError",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "$ref": "#/components/schemas/UnauthorizedError"
  10364. }
  10365. }
  10366. }
  10367. },
  10368. "404": {
  10369. "description": "SessionNotFoundError",
  10370. "content": {
  10371. "application/json": {
  10372. "schema": {
  10373. "anyOf": [
  10374. {
  10375. "$ref": "#/components/schemas/SessionNotFoundError"
  10376. },
  10377. {
  10378. "$ref": "#/components/schemas/SessionNotFoundError"
  10379. }
  10380. ]
  10381. }
  10382. }
  10383. }
  10384. }
  10385. },
  10386. "description": "Switch the agent used by subsequent session activity.",
  10387. "summary": "Switch session agent",
  10388. "requestBody": {
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "type": "object",
  10393. "properties": {
  10394. "agent": {
  10395. "type": "string"
  10396. }
  10397. },
  10398. "required": ["agent"],
  10399. "additionalProperties": false
  10400. }
  10401. }
  10402. },
  10403. "required": true
  10404. },
  10405. "x-codeSamples": [
  10406. {
  10407. "lang": "js",
  10408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10409. }
  10410. ]
  10411. }
  10412. },
  10413. "/api/session/{sessionID}/model": {
  10414. "post": {
  10415. "tags": ["sessions"],
  10416. "operationId": "v2.session.switchModel",
  10417. "parameters": [
  10418. {
  10419. "name": "sessionID",
  10420. "in": "path",
  10421. "schema": {
  10422. "type": "string",
  10423. "pattern": "^ses"
  10424. },
  10425. "required": true
  10426. }
  10427. ],
  10428. "security": [],
  10429. "responses": {
  10430. "204": {
  10431. "description": "<No Content>"
  10432. },
  10433. "400": {
  10434. "description": "InvalidRequestError",
  10435. "content": {
  10436. "application/json": {
  10437. "schema": {
  10438. "$ref": "#/components/schemas/InvalidRequestError"
  10439. }
  10440. }
  10441. }
  10442. },
  10443. "401": {
  10444. "description": "UnauthorizedError",
  10445. "content": {
  10446. "application/json": {
  10447. "schema": {
  10448. "$ref": "#/components/schemas/UnauthorizedError"
  10449. }
  10450. }
  10451. }
  10452. },
  10453. "404": {
  10454. "description": "SessionNotFoundError",
  10455. "content": {
  10456. "application/json": {
  10457. "schema": {
  10458. "anyOf": [
  10459. {
  10460. "$ref": "#/components/schemas/SessionNotFoundError"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/SessionNotFoundError"
  10464. }
  10465. ]
  10466. }
  10467. }
  10468. }
  10469. }
  10470. },
  10471. "description": "Switch the model used by subsequent session activity.",
  10472. "summary": "Switch session model",
  10473. "requestBody": {
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "type": "object",
  10478. "properties": {
  10479. "model": {
  10480. "type": "object",
  10481. "properties": {
  10482. "id": {
  10483. "type": "string"
  10484. },
  10485. "providerID": {
  10486. "type": "string"
  10487. },
  10488. "variant": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "providerID"],
  10493. "additionalProperties": false
  10494. }
  10495. },
  10496. "required": ["model"],
  10497. "additionalProperties": false
  10498. }
  10499. }
  10500. },
  10501. "required": true
  10502. },
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/prompt": {
  10512. "post": {
  10513. "tags": ["sessions"],
  10514. "operationId": "v2.session.prompt",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. }
  10525. ],
  10526. "security": [],
  10527. "responses": {
  10528. "200": {
  10529. "description": "Success",
  10530. "content": {
  10531. "application/json": {
  10532. "schema": {
  10533. "type": "object",
  10534. "properties": {
  10535. "data": {
  10536. "$ref": "#/components/schemas/SessionInputAdmitted"
  10537. }
  10538. },
  10539. "required": ["data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "404": {
  10566. "description": "SessionNotFoundError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "anyOf": [
  10571. {
  10572. "$ref": "#/components/schemas/SessionNotFoundError"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/SessionNotFoundError"
  10576. }
  10577. ]
  10578. }
  10579. }
  10580. }
  10581. },
  10582. "409": {
  10583. "description": "ConflictError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/ConflictError"
  10588. }
  10589. }
  10590. }
  10591. }
  10592. },
  10593. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10594. "summary": "Send message",
  10595. "requestBody": {
  10596. "content": {
  10597. "application/json": {
  10598. "schema": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^msg_"
  10604. },
  10605. "prompt": {
  10606. "$ref": "#/components/schemas/Prompt"
  10607. },
  10608. "delivery": {
  10609. "type": "string",
  10610. "enum": ["steer", "queue"]
  10611. },
  10612. "resume": {
  10613. "type": "boolean"
  10614. }
  10615. },
  10616. "required": ["prompt"],
  10617. "additionalProperties": false
  10618. }
  10619. }
  10620. },
  10621. "required": true
  10622. },
  10623. "x-codeSamples": [
  10624. {
  10625. "lang": "js",
  10626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10627. }
  10628. ]
  10629. }
  10630. },
  10631. "/api/session/{sessionID}/compact": {
  10632. "post": {
  10633. "tags": ["sessions"],
  10634. "operationId": "v2.session.compact",
  10635. "parameters": [
  10636. {
  10637. "name": "sessionID",
  10638. "in": "path",
  10639. "schema": {
  10640. "type": "string",
  10641. "pattern": "^ses"
  10642. },
  10643. "required": true
  10644. }
  10645. ],
  10646. "security": [],
  10647. "responses": {
  10648. "204": {
  10649. "description": "<No Content>"
  10650. },
  10651. "400": {
  10652. "description": "InvalidRequestError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/InvalidRequestError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "401": {
  10662. "description": "UnauthorizedError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "$ref": "#/components/schemas/UnauthorizedError"
  10667. }
  10668. }
  10669. }
  10670. },
  10671. "404": {
  10672. "description": "SessionNotFoundError",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "anyOf": [
  10677. {
  10678. "$ref": "#/components/schemas/SessionNotFoundError"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/SessionNotFoundError"
  10682. }
  10683. ]
  10684. }
  10685. }
  10686. }
  10687. },
  10688. "503": {
  10689. "description": "ServiceUnavailableError",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/ServiceUnavailableError"
  10694. }
  10695. }
  10696. }
  10697. }
  10698. },
  10699. "description": "Compact a session conversation.",
  10700. "summary": "Compact session",
  10701. "x-codeSamples": [
  10702. {
  10703. "lang": "js",
  10704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10705. }
  10706. ]
  10707. }
  10708. },
  10709. "/api/session/{sessionID}/wait": {
  10710. "post": {
  10711. "tags": ["sessions"],
  10712. "operationId": "v2.session.wait",
  10713. "parameters": [
  10714. {
  10715. "name": "sessionID",
  10716. "in": "path",
  10717. "schema": {
  10718. "type": "string",
  10719. "pattern": "^ses"
  10720. },
  10721. "required": true
  10722. }
  10723. ],
  10724. "security": [],
  10725. "responses": {
  10726. "204": {
  10727. "description": "<No Content>"
  10728. },
  10729. "400": {
  10730. "description": "InvalidRequestError",
  10731. "content": {
  10732. "application/json": {
  10733. "schema": {
  10734. "$ref": "#/components/schemas/InvalidRequestError"
  10735. }
  10736. }
  10737. }
  10738. },
  10739. "401": {
  10740. "description": "UnauthorizedError",
  10741. "content": {
  10742. "application/json": {
  10743. "schema": {
  10744. "$ref": "#/components/schemas/UnauthorizedError"
  10745. }
  10746. }
  10747. }
  10748. },
  10749. "404": {
  10750. "description": "SessionNotFoundError",
  10751. "content": {
  10752. "application/json": {
  10753. "schema": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/SessionNotFoundError"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/SessionNotFoundError"
  10760. }
  10761. ]
  10762. }
  10763. }
  10764. }
  10765. },
  10766. "503": {
  10767. "description": "ServiceUnavailableError",
  10768. "content": {
  10769. "application/json": {
  10770. "schema": {
  10771. "$ref": "#/components/schemas/ServiceUnavailableError"
  10772. }
  10773. }
  10774. }
  10775. }
  10776. },
  10777. "description": "Wait for a session agent loop to become idle.",
  10778. "summary": "Wait for session",
  10779. "x-codeSamples": [
  10780. {
  10781. "lang": "js",
  10782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10783. }
  10784. ]
  10785. }
  10786. },
  10787. "/api/session/{sessionID}/context": {
  10788. "get": {
  10789. "tags": ["sessions"],
  10790. "operationId": "v2.session.context",
  10791. "parameters": [
  10792. {
  10793. "name": "sessionID",
  10794. "in": "path",
  10795. "schema": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "required": true
  10800. }
  10801. ],
  10802. "security": [],
  10803. "responses": {
  10804. "200": {
  10805. "description": "Success",
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "data": {
  10812. "type": "array",
  10813. "items": {
  10814. "$ref": "#/components/schemas/SessionMessage"
  10815. }
  10816. }
  10817. },
  10818. "required": ["data"],
  10819. "additionalProperties": false
  10820. }
  10821. }
  10822. }
  10823. },
  10824. "400": {
  10825. "description": "InvalidRequestError",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/InvalidRequestError"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "401": {
  10835. "description": "UnauthorizedError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "$ref": "#/components/schemas/UnauthorizedError"
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "404": {
  10845. "description": "SessionNotFoundError",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "anyOf": [
  10850. {
  10851. "$ref": "#/components/schemas/SessionNotFoundError"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/SessionNotFoundError"
  10855. }
  10856. ]
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "500": {
  10862. "description": "UnknownError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "$ref": "#/components/schemas/UnknownError1"
  10867. }
  10868. }
  10869. }
  10870. }
  10871. },
  10872. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10873. "summary": "Get session context",
  10874. "x-codeSamples": [
  10875. {
  10876. "lang": "js",
  10877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10878. }
  10879. ]
  10880. }
  10881. },
  10882. "/api/session/{sessionID}/message": {
  10883. "get": {
  10884. "tags": ["messages"],
  10885. "operationId": "v2.session.messages",
  10886. "parameters": [
  10887. {
  10888. "name": "sessionID",
  10889. "in": "path",
  10890. "schema": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "required": true
  10895. },
  10896. {
  10897. "name": "limit",
  10898. "in": "query",
  10899. "schema": {
  10900. "type": "number"
  10901. },
  10902. "required": false
  10903. },
  10904. {
  10905. "name": "order",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "string",
  10909. "enum": ["asc", "desc"]
  10910. },
  10911. "required": false
  10912. },
  10913. {
  10914. "name": "cursor",
  10915. "in": "query",
  10916. "schema": {
  10917. "type": "string",
  10918. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10919. },
  10920. "required": false
  10921. }
  10922. ],
  10923. "security": [],
  10924. "responses": {
  10925. "200": {
  10926. "description": "SessionMessagesResponse",
  10927. "content": {
  10928. "application/json": {
  10929. "schema": {
  10930. "$ref": "#/components/schemas/SessionMessagesResponse"
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "400": {
  10936. "description": "InvalidCursorError | InvalidRequestError",
  10937. "content": {
  10938. "application/json": {
  10939. "schema": {
  10940. "anyOf": [
  10941. {
  10942. "$ref": "#/components/schemas/InvalidCursorError"
  10943. },
  10944. {
  10945. "$ref": "#/components/schemas/InvalidRequestError"
  10946. }
  10947. ]
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "401": {
  10953. "description": "UnauthorizedError",
  10954. "content": {
  10955. "application/json": {
  10956. "schema": {
  10957. "$ref": "#/components/schemas/UnauthorizedError"
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "404": {
  10963. "description": "SessionNotFoundError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "anyOf": [
  10968. {
  10969. "$ref": "#/components/schemas/SessionNotFoundError"
  10970. },
  10971. {
  10972. "$ref": "#/components/schemas/SessionNotFoundError"
  10973. }
  10974. ]
  10975. }
  10976. }
  10977. }
  10978. },
  10979. "500": {
  10980. "description": "UnknownError",
  10981. "content": {
  10982. "application/json": {
  10983. "schema": {
  10984. "$ref": "#/components/schemas/UnknownError1"
  10985. }
  10986. }
  10987. }
  10988. }
  10989. },
  10990. "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.",
  10991. "summary": "Get session messages",
  10992. "x-codeSamples": [
  10993. {
  10994. "lang": "js",
  10995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10996. }
  10997. ]
  10998. }
  10999. },
  11000. "/api/model": {
  11001. "get": {
  11002. "tags": ["models"],
  11003. "operationId": "v2.model.list",
  11004. "parameters": [
  11005. {
  11006. "name": "location",
  11007. "in": "query",
  11008. "schema": {
  11009. "type": "object",
  11010. "properties": {
  11011. "directory": {
  11012. "type": "string"
  11013. },
  11014. "workspace": {
  11015. "type": "string"
  11016. }
  11017. },
  11018. "additionalProperties": false
  11019. },
  11020. "required": false,
  11021. "style": "deepObject",
  11022. "explode": true
  11023. }
  11024. ],
  11025. "security": [],
  11026. "responses": {
  11027. "200": {
  11028. "description": "Success",
  11029. "content": {
  11030. "application/json": {
  11031. "schema": {
  11032. "type": "object",
  11033. "properties": {
  11034. "location": {
  11035. "$ref": "#/components/schemas/LocationInfo"
  11036. },
  11037. "data": {
  11038. "type": "array",
  11039. "items": {
  11040. "$ref": "#/components/schemas/ModelV2Info"
  11041. }
  11042. }
  11043. },
  11044. "required": ["location", "data"],
  11045. "additionalProperties": false
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "400": {
  11051. "description": "InvalidRequestError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/InvalidRequestError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "401": {
  11061. "description": "UnauthorizedError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/UnauthorizedError"
  11066. }
  11067. }
  11068. }
  11069. },
  11070. "503": {
  11071. "description": "ServiceUnavailableError",
  11072. "content": {
  11073. "application/json": {
  11074. "schema": {
  11075. "$ref": "#/components/schemas/ServiceUnavailableError"
  11076. }
  11077. }
  11078. }
  11079. }
  11080. },
  11081. "description": "Retrieve available models ordered by release date.",
  11082. "summary": "List models",
  11083. "x-codeSamples": [
  11084. {
  11085. "lang": "js",
  11086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11087. }
  11088. ]
  11089. }
  11090. },
  11091. "/api/provider": {
  11092. "get": {
  11093. "tags": ["providers"],
  11094. "operationId": "v2.provider.list",
  11095. "parameters": [
  11096. {
  11097. "name": "location",
  11098. "in": "query",
  11099. "schema": {
  11100. "type": "object",
  11101. "properties": {
  11102. "directory": {
  11103. "type": "string"
  11104. },
  11105. "workspace": {
  11106. "type": "string"
  11107. }
  11108. },
  11109. "additionalProperties": false
  11110. },
  11111. "required": false,
  11112. "style": "deepObject",
  11113. "explode": true
  11114. }
  11115. ],
  11116. "security": [],
  11117. "responses": {
  11118. "200": {
  11119. "description": "Success",
  11120. "content": {
  11121. "application/json": {
  11122. "schema": {
  11123. "type": "object",
  11124. "properties": {
  11125. "location": {
  11126. "$ref": "#/components/schemas/LocationInfo"
  11127. },
  11128. "data": {
  11129. "type": "array",
  11130. "items": {
  11131. "$ref": "#/components/schemas/ProviderV2Info"
  11132. }
  11133. }
  11134. },
  11135. "required": ["location", "data"],
  11136. "additionalProperties": false
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "400": {
  11142. "description": "InvalidRequestError",
  11143. "content": {
  11144. "application/json": {
  11145. "schema": {
  11146. "$ref": "#/components/schemas/InvalidRequestError"
  11147. }
  11148. }
  11149. }
  11150. },
  11151. "401": {
  11152. "description": "UnauthorizedError",
  11153. "content": {
  11154. "application/json": {
  11155. "schema": {
  11156. "$ref": "#/components/schemas/UnauthorizedError"
  11157. }
  11158. }
  11159. }
  11160. },
  11161. "503": {
  11162. "description": "ServiceUnavailableError",
  11163. "content": {
  11164. "application/json": {
  11165. "schema": {
  11166. "$ref": "#/components/schemas/ServiceUnavailableError"
  11167. }
  11168. }
  11169. }
  11170. }
  11171. },
  11172. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11173. "summary": "List providers",
  11174. "x-codeSamples": [
  11175. {
  11176. "lang": "js",
  11177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11178. }
  11179. ]
  11180. }
  11181. },
  11182. "/api/provider/{providerID}": {
  11183. "get": {
  11184. "tags": ["providers"],
  11185. "operationId": "v2.provider.get",
  11186. "parameters": [
  11187. {
  11188. "name": "providerID",
  11189. "in": "path",
  11190. "schema": {
  11191. "type": "string"
  11192. },
  11193. "required": true
  11194. },
  11195. {
  11196. "name": "location",
  11197. "in": "query",
  11198. "schema": {
  11199. "type": "object",
  11200. "properties": {
  11201. "directory": {
  11202. "type": "string"
  11203. },
  11204. "workspace": {
  11205. "type": "string"
  11206. }
  11207. },
  11208. "additionalProperties": false
  11209. },
  11210. "required": false,
  11211. "style": "deepObject",
  11212. "explode": true
  11213. }
  11214. ],
  11215. "security": [],
  11216. "responses": {
  11217. "200": {
  11218. "description": "Success",
  11219. "content": {
  11220. "application/json": {
  11221. "schema": {
  11222. "type": "object",
  11223. "properties": {
  11224. "location": {
  11225. "$ref": "#/components/schemas/LocationInfo"
  11226. },
  11227. "data": {
  11228. "$ref": "#/components/schemas/ProviderV2Info"
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. },
  11257. "404": {
  11258. "description": "ProviderNotFoundError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/ProviderNotFoundError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "503": {
  11268. "description": "ServiceUnavailableError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/ServiceUnavailableError"
  11273. }
  11274. }
  11275. }
  11276. }
  11277. },
  11278. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11279. "summary": "Get provider",
  11280. "x-codeSamples": [
  11281. {
  11282. "lang": "js",
  11283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11284. }
  11285. ]
  11286. }
  11287. },
  11288. "/api/integration": {
  11289. "get": {
  11290. "tags": ["integrations"],
  11291. "operationId": "v2.integration.list",
  11292. "parameters": [
  11293. {
  11294. "name": "location",
  11295. "in": "query",
  11296. "schema": {
  11297. "type": "object",
  11298. "properties": {
  11299. "directory": {
  11300. "type": "string"
  11301. },
  11302. "workspace": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "additionalProperties": false
  11307. },
  11308. "required": false,
  11309. "style": "deepObject",
  11310. "explode": true
  11311. }
  11312. ],
  11313. "security": [],
  11314. "responses": {
  11315. "200": {
  11316. "description": "Success",
  11317. "content": {
  11318. "application/json": {
  11319. "schema": {
  11320. "type": "object",
  11321. "properties": {
  11322. "location": {
  11323. "$ref": "#/components/schemas/LocationInfo"
  11324. },
  11325. "data": {
  11326. "type": "array",
  11327. "items": {
  11328. "$ref": "#/components/schemas/IntegrationInfo"
  11329. }
  11330. }
  11331. },
  11332. "required": ["location", "data"],
  11333. "additionalProperties": false
  11334. }
  11335. }
  11336. }
  11337. },
  11338. "400": {
  11339. "description": "InvalidRequestError",
  11340. "content": {
  11341. "application/json": {
  11342. "schema": {
  11343. "$ref": "#/components/schemas/InvalidRequestError"
  11344. }
  11345. }
  11346. }
  11347. },
  11348. "401": {
  11349. "description": "UnauthorizedError",
  11350. "content": {
  11351. "application/json": {
  11352. "schema": {
  11353. "$ref": "#/components/schemas/UnauthorizedError"
  11354. }
  11355. }
  11356. }
  11357. }
  11358. },
  11359. "description": "Retrieve available integrations and their authentication methods.",
  11360. "summary": "List integrations",
  11361. "x-codeSamples": [
  11362. {
  11363. "lang": "js",
  11364. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11365. }
  11366. ]
  11367. }
  11368. },
  11369. "/api/integration/{integrationID}": {
  11370. "get": {
  11371. "tags": ["integrations"],
  11372. "operationId": "v2.integration.get",
  11373. "parameters": [
  11374. {
  11375. "name": "integrationID",
  11376. "in": "path",
  11377. "schema": {
  11378. "type": "string"
  11379. },
  11380. "required": true
  11381. },
  11382. {
  11383. "name": "location",
  11384. "in": "query",
  11385. "schema": {
  11386. "type": "object",
  11387. "properties": {
  11388. "directory": {
  11389. "type": "string"
  11390. },
  11391. "workspace": {
  11392. "type": "string"
  11393. }
  11394. },
  11395. "additionalProperties": false
  11396. },
  11397. "required": false,
  11398. "style": "deepObject",
  11399. "explode": true
  11400. }
  11401. ],
  11402. "security": [],
  11403. "responses": {
  11404. "200": {
  11405. "description": "Success",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "type": "object",
  11410. "properties": {
  11411. "location": {
  11412. "$ref": "#/components/schemas/LocationInfo"
  11413. },
  11414. "data": {
  11415. "$ref": "#/components/schemas/IntegrationInfo"
  11416. }
  11417. },
  11418. "required": ["location", "data"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "400": {
  11425. "description": "InvalidRequestError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "$ref": "#/components/schemas/InvalidRequestError"
  11430. }
  11431. }
  11432. }
  11433. },
  11434. "401": {
  11435. "description": "UnauthorizedError",
  11436. "content": {
  11437. "application/json": {
  11438. "schema": {
  11439. "$ref": "#/components/schemas/UnauthorizedError"
  11440. }
  11441. }
  11442. }
  11443. }
  11444. },
  11445. "description": "Retrieve one integration and its authentication methods.",
  11446. "summary": "Get integration",
  11447. "x-codeSamples": [
  11448. {
  11449. "lang": "js",
  11450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11451. }
  11452. ]
  11453. }
  11454. },
  11455. "/api/integration/{integrationID}/connect/key": {
  11456. "post": {
  11457. "tags": ["integrations"],
  11458. "operationId": "v2.integration.connect.key",
  11459. "parameters": [
  11460. {
  11461. "name": "integrationID",
  11462. "in": "path",
  11463. "schema": {
  11464. "type": "string"
  11465. },
  11466. "required": true
  11467. },
  11468. {
  11469. "name": "location",
  11470. "in": "query",
  11471. "schema": {
  11472. "type": "object",
  11473. "properties": {
  11474. "directory": {
  11475. "type": "string"
  11476. },
  11477. "workspace": {
  11478. "type": "string"
  11479. }
  11480. },
  11481. "additionalProperties": false
  11482. },
  11483. "required": false,
  11484. "style": "deepObject",
  11485. "explode": true
  11486. }
  11487. ],
  11488. "security": [],
  11489. "responses": {
  11490. "204": {
  11491. "description": "<No Content>"
  11492. },
  11493. "400": {
  11494. "description": "InvalidRequestError",
  11495. "content": {
  11496. "application/json": {
  11497. "schema": {
  11498. "anyOf": [
  11499. {
  11500. "$ref": "#/components/schemas/InvalidRequestError"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/InvalidRequestError"
  11504. }
  11505. ]
  11506. }
  11507. }
  11508. }
  11509. },
  11510. "401": {
  11511. "description": "UnauthorizedError",
  11512. "content": {
  11513. "application/json": {
  11514. "schema": {
  11515. "$ref": "#/components/schemas/UnauthorizedError"
  11516. }
  11517. }
  11518. }
  11519. }
  11520. },
  11521. "description": "Run a key authentication method and store the resulting credential.",
  11522. "summary": "Connect with key",
  11523. "requestBody": {
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "type": "object",
  11528. "properties": {
  11529. "key": {
  11530. "type": "string"
  11531. },
  11532. "label": {
  11533. "type": "string"
  11534. }
  11535. },
  11536. "required": ["key"],
  11537. "additionalProperties": false
  11538. }
  11539. }
  11540. },
  11541. "required": true
  11542. },
  11543. "x-codeSamples": [
  11544. {
  11545. "lang": "js",
  11546. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11547. }
  11548. ]
  11549. }
  11550. },
  11551. "/api/integration/{integrationID}/connect/oauth": {
  11552. "post": {
  11553. "tags": ["integrations"],
  11554. "operationId": "v2.integration.connect.oauth",
  11555. "parameters": [
  11556. {
  11557. "name": "integrationID",
  11558. "in": "path",
  11559. "schema": {
  11560. "type": "string"
  11561. },
  11562. "required": true
  11563. },
  11564. {
  11565. "name": "location",
  11566. "in": "query",
  11567. "schema": {
  11568. "type": "object",
  11569. "properties": {
  11570. "directory": {
  11571. "type": "string"
  11572. },
  11573. "workspace": {
  11574. "type": "string"
  11575. }
  11576. },
  11577. "additionalProperties": false
  11578. },
  11579. "required": false,
  11580. "style": "deepObject",
  11581. "explode": true
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "Success",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "type": "object",
  11592. "properties": {
  11593. "location": {
  11594. "$ref": "#/components/schemas/LocationInfo"
  11595. },
  11596. "data": {
  11597. "$ref": "#/components/schemas/IntegrationAttempt"
  11598. }
  11599. },
  11600. "required": ["location", "data"],
  11601. "additionalProperties": false
  11602. }
  11603. }
  11604. }
  11605. },
  11606. "400": {
  11607. "description": "InvalidRequestError",
  11608. "content": {
  11609. "application/json": {
  11610. "schema": {
  11611. "anyOf": [
  11612. {
  11613. "$ref": "#/components/schemas/InvalidRequestError"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/InvalidRequestError"
  11617. }
  11618. ]
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "401": {
  11624. "description": "UnauthorizedError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "$ref": "#/components/schemas/UnauthorizedError"
  11629. }
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "description": "Start an OAuth attempt and return the authorization details.",
  11635. "summary": "Begin OAuth connection",
  11636. "requestBody": {
  11637. "content": {
  11638. "application/json": {
  11639. "schema": {
  11640. "type": "object",
  11641. "properties": {
  11642. "methodID": {
  11643. "type": "string"
  11644. },
  11645. "inputs": {
  11646. "type": "object",
  11647. "additionalProperties": {
  11648. "type": "string"
  11649. }
  11650. },
  11651. "label": {
  11652. "type": "string"
  11653. }
  11654. },
  11655. "required": ["methodID", "inputs"],
  11656. "additionalProperties": false
  11657. }
  11658. }
  11659. },
  11660. "required": true
  11661. },
  11662. "x-codeSamples": [
  11663. {
  11664. "lang": "js",
  11665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11666. }
  11667. ]
  11668. }
  11669. },
  11670. "/api/integration/attempt/{attemptID}": {
  11671. "get": {
  11672. "tags": ["integrations"],
  11673. "operationId": "v2.integration.attempt.status",
  11674. "parameters": [
  11675. {
  11676. "name": "attemptID",
  11677. "in": "path",
  11678. "schema": {
  11679. "type": "string"
  11680. },
  11681. "required": true
  11682. },
  11683. {
  11684. "name": "location",
  11685. "in": "query",
  11686. "schema": {
  11687. "type": "object",
  11688. "properties": {
  11689. "directory": {
  11690. "type": "string"
  11691. },
  11692. "workspace": {
  11693. "type": "string"
  11694. }
  11695. },
  11696. "additionalProperties": false
  11697. },
  11698. "required": false,
  11699. "style": "deepObject",
  11700. "explode": true
  11701. }
  11702. ],
  11703. "security": [],
  11704. "responses": {
  11705. "200": {
  11706. "description": "Success",
  11707. "content": {
  11708. "application/json": {
  11709. "schema": {
  11710. "type": "object",
  11711. "properties": {
  11712. "location": {
  11713. "$ref": "#/components/schemas/LocationInfo"
  11714. },
  11715. "data": {
  11716. "anyOf": [
  11717. {
  11718. "type": "object",
  11719. "properties": {
  11720. "status": {
  11721. "type": "string",
  11722. "enum": ["pending"]
  11723. },
  11724. "time": {
  11725. "type": "object",
  11726. "properties": {
  11727. "created": {
  11728. "anyOf": [
  11729. {
  11730. "type": "number"
  11731. },
  11732. {
  11733. "type": "string",
  11734. "enum": ["NaN"]
  11735. },
  11736. {
  11737. "type": "string",
  11738. "enum": ["Infinity"]
  11739. },
  11740. {
  11741. "type": "string",
  11742. "enum": ["-Infinity"]
  11743. },
  11744. {
  11745. "type": "string",
  11746. "enum": ["Infinity", "-Infinity", "NaN"]
  11747. }
  11748. ]
  11749. },
  11750. "expires": {
  11751. "anyOf": [
  11752. {
  11753. "type": "number"
  11754. },
  11755. {
  11756. "type": "string",
  11757. "enum": ["NaN"]
  11758. },
  11759. {
  11760. "type": "string",
  11761. "enum": ["Infinity"]
  11762. },
  11763. {
  11764. "type": "string",
  11765. "enum": ["-Infinity"]
  11766. },
  11767. {
  11768. "type": "string",
  11769. "enum": ["Infinity", "-Infinity", "NaN"]
  11770. }
  11771. ]
  11772. }
  11773. },
  11774. "required": ["created", "expires"],
  11775. "additionalProperties": false
  11776. }
  11777. },
  11778. "required": ["status", "time"],
  11779. "additionalProperties": false
  11780. },
  11781. {
  11782. "type": "object",
  11783. "properties": {
  11784. "status": {
  11785. "type": "string",
  11786. "enum": ["complete"]
  11787. },
  11788. "time": {
  11789. "type": "object",
  11790. "properties": {
  11791. "created": {
  11792. "anyOf": [
  11793. {
  11794. "type": "number"
  11795. },
  11796. {
  11797. "type": "string",
  11798. "enum": ["NaN"]
  11799. },
  11800. {
  11801. "type": "string",
  11802. "enum": ["Infinity"]
  11803. },
  11804. {
  11805. "type": "string",
  11806. "enum": ["-Infinity"]
  11807. },
  11808. {
  11809. "type": "string",
  11810. "enum": ["Infinity", "-Infinity", "NaN"]
  11811. }
  11812. ]
  11813. },
  11814. "expires": {
  11815. "anyOf": [
  11816. {
  11817. "type": "number"
  11818. },
  11819. {
  11820. "type": "string",
  11821. "enum": ["NaN"]
  11822. },
  11823. {
  11824. "type": "string",
  11825. "enum": ["Infinity"]
  11826. },
  11827. {
  11828. "type": "string",
  11829. "enum": ["-Infinity"]
  11830. },
  11831. {
  11832. "type": "string",
  11833. "enum": ["Infinity", "-Infinity", "NaN"]
  11834. }
  11835. ]
  11836. }
  11837. },
  11838. "required": ["created", "expires"],
  11839. "additionalProperties": false
  11840. }
  11841. },
  11842. "required": ["status", "time"],
  11843. "additionalProperties": false
  11844. },
  11845. {
  11846. "type": "object",
  11847. "properties": {
  11848. "status": {
  11849. "type": "string",
  11850. "enum": ["failed"]
  11851. },
  11852. "message": {
  11853. "type": "string"
  11854. },
  11855. "time": {
  11856. "type": "object",
  11857. "properties": {
  11858. "created": {
  11859. "anyOf": [
  11860. {
  11861. "type": "number"
  11862. },
  11863. {
  11864. "type": "string",
  11865. "enum": ["NaN"]
  11866. },
  11867. {
  11868. "type": "string",
  11869. "enum": ["Infinity"]
  11870. },
  11871. {
  11872. "type": "string",
  11873. "enum": ["-Infinity"]
  11874. },
  11875. {
  11876. "type": "string",
  11877. "enum": ["Infinity", "-Infinity", "NaN"]
  11878. }
  11879. ]
  11880. },
  11881. "expires": {
  11882. "anyOf": [
  11883. {
  11884. "type": "number"
  11885. },
  11886. {
  11887. "type": "string",
  11888. "enum": ["NaN"]
  11889. },
  11890. {
  11891. "type": "string",
  11892. "enum": ["Infinity"]
  11893. },
  11894. {
  11895. "type": "string",
  11896. "enum": ["-Infinity"]
  11897. },
  11898. {
  11899. "type": "string",
  11900. "enum": ["Infinity", "-Infinity", "NaN"]
  11901. }
  11902. ]
  11903. }
  11904. },
  11905. "required": ["created", "expires"],
  11906. "additionalProperties": false
  11907. }
  11908. },
  11909. "required": ["status", "message", "time"],
  11910. "additionalProperties": false
  11911. },
  11912. {
  11913. "type": "object",
  11914. "properties": {
  11915. "status": {
  11916. "type": "string",
  11917. "enum": ["expired"]
  11918. },
  11919. "time": {
  11920. "type": "object",
  11921. "properties": {
  11922. "created": {
  11923. "anyOf": [
  11924. {
  11925. "type": "number"
  11926. },
  11927. {
  11928. "type": "string",
  11929. "enum": ["NaN"]
  11930. },
  11931. {
  11932. "type": "string",
  11933. "enum": ["Infinity"]
  11934. },
  11935. {
  11936. "type": "string",
  11937. "enum": ["-Infinity"]
  11938. },
  11939. {
  11940. "type": "string",
  11941. "enum": ["Infinity", "-Infinity", "NaN"]
  11942. }
  11943. ]
  11944. },
  11945. "expires": {
  11946. "anyOf": [
  11947. {
  11948. "type": "number"
  11949. },
  11950. {
  11951. "type": "string",
  11952. "enum": ["NaN"]
  11953. },
  11954. {
  11955. "type": "string",
  11956. "enum": ["Infinity"]
  11957. },
  11958. {
  11959. "type": "string",
  11960. "enum": ["-Infinity"]
  11961. },
  11962. {
  11963. "type": "string",
  11964. "enum": ["Infinity", "-Infinity", "NaN"]
  11965. }
  11966. ]
  11967. }
  11968. },
  11969. "required": ["created", "expires"],
  11970. "additionalProperties": false
  11971. }
  11972. },
  11973. "required": ["status", "time"],
  11974. "additionalProperties": false
  11975. }
  11976. ]
  11977. }
  11978. },
  11979. "required": ["location", "data"],
  11980. "additionalProperties": false
  11981. }
  11982. }
  11983. }
  11984. },
  11985. "400": {
  11986. "description": "InvalidRequestError",
  11987. "content": {
  11988. "application/json": {
  11989. "schema": {
  11990. "$ref": "#/components/schemas/InvalidRequestError"
  11991. }
  11992. }
  11993. }
  11994. },
  11995. "401": {
  11996. "description": "UnauthorizedError",
  11997. "content": {
  11998. "application/json": {
  11999. "schema": {
  12000. "$ref": "#/components/schemas/UnauthorizedError"
  12001. }
  12002. }
  12003. }
  12004. }
  12005. },
  12006. "description": "Poll the current status of an OAuth attempt.",
  12007. "summary": "Get OAuth attempt status",
  12008. "x-codeSamples": [
  12009. {
  12010. "lang": "js",
  12011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12012. }
  12013. ]
  12014. },
  12015. "delete": {
  12016. "tags": ["integrations"],
  12017. "operationId": "v2.integration.attempt.cancel",
  12018. "parameters": [
  12019. {
  12020. "name": "attemptID",
  12021. "in": "path",
  12022. "schema": {
  12023. "type": "string"
  12024. },
  12025. "required": true
  12026. },
  12027. {
  12028. "name": "location",
  12029. "in": "query",
  12030. "schema": {
  12031. "type": "object",
  12032. "properties": {
  12033. "directory": {
  12034. "type": "string"
  12035. },
  12036. "workspace": {
  12037. "type": "string"
  12038. }
  12039. },
  12040. "additionalProperties": false
  12041. },
  12042. "required": false,
  12043. "style": "deepObject",
  12044. "explode": true
  12045. }
  12046. ],
  12047. "security": [],
  12048. "responses": {
  12049. "204": {
  12050. "description": "<No Content>"
  12051. },
  12052. "400": {
  12053. "description": "InvalidRequestError",
  12054. "content": {
  12055. "application/json": {
  12056. "schema": {
  12057. "$ref": "#/components/schemas/InvalidRequestError"
  12058. }
  12059. }
  12060. }
  12061. },
  12062. "401": {
  12063. "description": "UnauthorizedError",
  12064. "content": {
  12065. "application/json": {
  12066. "schema": {
  12067. "$ref": "#/components/schemas/UnauthorizedError"
  12068. }
  12069. }
  12070. }
  12071. }
  12072. },
  12073. "description": "Cancel an OAuth attempt and release its resources.",
  12074. "summary": "Cancel OAuth connection",
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/integration/attempt/{attemptID}/complete": {
  12084. "post": {
  12085. "tags": ["integrations"],
  12086. "operationId": "v2.integration.attempt.complete",
  12087. "parameters": [
  12088. {
  12089. "name": "attemptID",
  12090. "in": "path",
  12091. "schema": {
  12092. "type": "string"
  12093. },
  12094. "required": true
  12095. },
  12096. {
  12097. "name": "location",
  12098. "in": "query",
  12099. "schema": {
  12100. "type": "object",
  12101. "properties": {
  12102. "directory": {
  12103. "type": "string"
  12104. },
  12105. "workspace": {
  12106. "type": "string"
  12107. }
  12108. },
  12109. "additionalProperties": false
  12110. },
  12111. "required": false,
  12112. "style": "deepObject",
  12113. "explode": true
  12114. }
  12115. ],
  12116. "security": [],
  12117. "responses": {
  12118. "204": {
  12119. "description": "<No Content>"
  12120. },
  12121. "400": {
  12122. "description": "InvalidRequestError",
  12123. "content": {
  12124. "application/json": {
  12125. "schema": {
  12126. "anyOf": [
  12127. {
  12128. "$ref": "#/components/schemas/InvalidRequestError"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/InvalidRequestError"
  12132. }
  12133. ]
  12134. }
  12135. }
  12136. }
  12137. },
  12138. "401": {
  12139. "description": "UnauthorizedError",
  12140. "content": {
  12141. "application/json": {
  12142. "schema": {
  12143. "$ref": "#/components/schemas/UnauthorizedError"
  12144. }
  12145. }
  12146. }
  12147. }
  12148. },
  12149. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12150. "summary": "Complete OAuth connection",
  12151. "requestBody": {
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "code": {
  12158. "type": "string"
  12159. }
  12160. },
  12161. "additionalProperties": false
  12162. }
  12163. }
  12164. },
  12165. "required": true
  12166. },
  12167. "x-codeSamples": [
  12168. {
  12169. "lang": "js",
  12170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12171. }
  12172. ]
  12173. }
  12174. },
  12175. "/api/credential/{credentialID}": {
  12176. "patch": {
  12177. "tags": ["opencode HttpApi"],
  12178. "operationId": "v2.credential.update",
  12179. "parameters": [
  12180. {
  12181. "name": "credentialID",
  12182. "in": "path",
  12183. "schema": {
  12184. "type": "string"
  12185. },
  12186. "required": true
  12187. },
  12188. {
  12189. "name": "location",
  12190. "in": "query",
  12191. "schema": {
  12192. "type": "object",
  12193. "properties": {
  12194. "directory": {
  12195. "type": "string"
  12196. },
  12197. "workspace": {
  12198. "type": "string"
  12199. }
  12200. },
  12201. "additionalProperties": false
  12202. },
  12203. "required": false,
  12204. "style": "deepObject",
  12205. "explode": true
  12206. }
  12207. ],
  12208. "security": [],
  12209. "responses": {
  12210. "204": {
  12211. "description": "<No Content>"
  12212. },
  12213. "400": {
  12214. "description": "InvalidRequestError",
  12215. "content": {
  12216. "application/json": {
  12217. "schema": {
  12218. "$ref": "#/components/schemas/InvalidRequestError"
  12219. }
  12220. }
  12221. }
  12222. },
  12223. "401": {
  12224. "description": "UnauthorizedError",
  12225. "content": {
  12226. "application/json": {
  12227. "schema": {
  12228. "$ref": "#/components/schemas/UnauthorizedError"
  12229. }
  12230. }
  12231. }
  12232. }
  12233. },
  12234. "description": "Update a stored credential label.",
  12235. "summary": "Update credential",
  12236. "requestBody": {
  12237. "content": {
  12238. "application/json": {
  12239. "schema": {
  12240. "type": "object",
  12241. "properties": {
  12242. "label": {
  12243. "type": "string"
  12244. }
  12245. },
  12246. "required": ["label"],
  12247. "additionalProperties": false
  12248. }
  12249. }
  12250. },
  12251. "required": true
  12252. },
  12253. "x-codeSamples": [
  12254. {
  12255. "lang": "js",
  12256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12257. }
  12258. ]
  12259. },
  12260. "delete": {
  12261. "tags": ["opencode HttpApi"],
  12262. "operationId": "v2.credential.remove",
  12263. "parameters": [
  12264. {
  12265. "name": "credentialID",
  12266. "in": "path",
  12267. "schema": {
  12268. "type": "string"
  12269. },
  12270. "required": true
  12271. },
  12272. {
  12273. "name": "location",
  12274. "in": "query",
  12275. "schema": {
  12276. "type": "object",
  12277. "properties": {
  12278. "directory": {
  12279. "type": "string"
  12280. },
  12281. "workspace": {
  12282. "type": "string"
  12283. }
  12284. },
  12285. "additionalProperties": false
  12286. },
  12287. "required": false,
  12288. "style": "deepObject",
  12289. "explode": true
  12290. }
  12291. ],
  12292. "security": [],
  12293. "responses": {
  12294. "204": {
  12295. "description": "<No Content>"
  12296. },
  12297. "400": {
  12298. "description": "InvalidRequestError",
  12299. "content": {
  12300. "application/json": {
  12301. "schema": {
  12302. "$ref": "#/components/schemas/InvalidRequestError"
  12303. }
  12304. }
  12305. }
  12306. },
  12307. "401": {
  12308. "description": "UnauthorizedError",
  12309. "content": {
  12310. "application/json": {
  12311. "schema": {
  12312. "$ref": "#/components/schemas/UnauthorizedError"
  12313. }
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "description": "Remove a stored integration credential.",
  12319. "summary": "Remove credential",
  12320. "x-codeSamples": [
  12321. {
  12322. "lang": "js",
  12323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12324. }
  12325. ]
  12326. }
  12327. },
  12328. "/api/permission/request": {
  12329. "get": {
  12330. "tags": ["permissions"],
  12331. "operationId": "v2.permission.request.list",
  12332. "parameters": [
  12333. {
  12334. "name": "location",
  12335. "in": "query",
  12336. "schema": {
  12337. "type": "object",
  12338. "properties": {
  12339. "directory": {
  12340. "type": "string"
  12341. },
  12342. "workspace": {
  12343. "type": "string"
  12344. }
  12345. },
  12346. "additionalProperties": false
  12347. },
  12348. "required": false,
  12349. "style": "deepObject",
  12350. "explode": true
  12351. }
  12352. ],
  12353. "security": [],
  12354. "responses": {
  12355. "200": {
  12356. "description": "Success",
  12357. "content": {
  12358. "application/json": {
  12359. "schema": {
  12360. "type": "object",
  12361. "properties": {
  12362. "location": {
  12363. "$ref": "#/components/schemas/LocationInfo"
  12364. },
  12365. "data": {
  12366. "type": "array",
  12367. "items": {
  12368. "$ref": "#/components/schemas/PermissionV2Request"
  12369. }
  12370. }
  12371. },
  12372. "required": ["location", "data"],
  12373. "additionalProperties": false
  12374. }
  12375. }
  12376. }
  12377. },
  12378. "400": {
  12379. "description": "InvalidRequestError",
  12380. "content": {
  12381. "application/json": {
  12382. "schema": {
  12383. "$ref": "#/components/schemas/InvalidRequestError"
  12384. }
  12385. }
  12386. }
  12387. },
  12388. "401": {
  12389. "description": "UnauthorizedError",
  12390. "content": {
  12391. "application/json": {
  12392. "schema": {
  12393. "$ref": "#/components/schemas/UnauthorizedError"
  12394. }
  12395. }
  12396. }
  12397. }
  12398. },
  12399. "description": "Retrieve pending permission requests for a location.",
  12400. "summary": "List pending permission requests",
  12401. "x-codeSamples": [
  12402. {
  12403. "lang": "js",
  12404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12405. }
  12406. ]
  12407. }
  12408. },
  12409. "/api/permission/saved": {
  12410. "get": {
  12411. "tags": ["permissions"],
  12412. "operationId": "v2.permission.saved.list",
  12413. "parameters": [
  12414. {
  12415. "name": "projectID",
  12416. "in": "query",
  12417. "schema": {
  12418. "type": "string"
  12419. },
  12420. "required": false
  12421. }
  12422. ],
  12423. "security": [],
  12424. "responses": {
  12425. "200": {
  12426. "description": "Success",
  12427. "content": {
  12428. "application/json": {
  12429. "schema": {
  12430. "type": "object",
  12431. "properties": {
  12432. "data": {
  12433. "type": "array",
  12434. "items": {
  12435. "$ref": "#/components/schemas/PermissionSavedInfo"
  12436. }
  12437. }
  12438. },
  12439. "required": ["data"],
  12440. "additionalProperties": false
  12441. }
  12442. }
  12443. }
  12444. },
  12445. "400": {
  12446. "description": "InvalidRequestError",
  12447. "content": {
  12448. "application/json": {
  12449. "schema": {
  12450. "$ref": "#/components/schemas/InvalidRequestError"
  12451. }
  12452. }
  12453. }
  12454. },
  12455. "401": {
  12456. "description": "UnauthorizedError",
  12457. "content": {
  12458. "application/json": {
  12459. "schema": {
  12460. "$ref": "#/components/schemas/UnauthorizedError"
  12461. }
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "description": "Retrieve saved permissions, optionally filtered by project.",
  12467. "summary": "List saved permissions",
  12468. "x-codeSamples": [
  12469. {
  12470. "lang": "js",
  12471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12472. }
  12473. ]
  12474. }
  12475. },
  12476. "/api/permission/saved/{id}": {
  12477. "delete": {
  12478. "tags": ["permissions"],
  12479. "operationId": "v2.permission.saved.remove",
  12480. "parameters": [
  12481. {
  12482. "name": "id",
  12483. "in": "path",
  12484. "schema": {
  12485. "type": "string"
  12486. },
  12487. "required": true
  12488. }
  12489. ],
  12490. "security": [],
  12491. "responses": {
  12492. "204": {
  12493. "description": "<No Content>"
  12494. },
  12495. "400": {
  12496. "description": "InvalidRequestError",
  12497. "content": {
  12498. "application/json": {
  12499. "schema": {
  12500. "$ref": "#/components/schemas/InvalidRequestError"
  12501. }
  12502. }
  12503. }
  12504. },
  12505. "401": {
  12506. "description": "UnauthorizedError",
  12507. "content": {
  12508. "application/json": {
  12509. "schema": {
  12510. "$ref": "#/components/schemas/UnauthorizedError"
  12511. }
  12512. }
  12513. }
  12514. }
  12515. },
  12516. "description": "Remove a saved permission by ID.",
  12517. "summary": "Remove saved permission",
  12518. "x-codeSamples": [
  12519. {
  12520. "lang": "js",
  12521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12522. }
  12523. ]
  12524. }
  12525. },
  12526. "/api/session/{sessionID}/permission": {
  12527. "get": {
  12528. "tags": ["permissions"],
  12529. "operationId": "v2.session.permission.list",
  12530. "parameters": [
  12531. {
  12532. "name": "sessionID",
  12533. "in": "path",
  12534. "schema": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "required": true
  12539. }
  12540. ],
  12541. "security": [],
  12542. "responses": {
  12543. "200": {
  12544. "description": "Success",
  12545. "content": {
  12546. "application/json": {
  12547. "schema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/PermissionV2Request"
  12554. }
  12555. }
  12556. },
  12557. "required": ["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. "404": {
  12584. "description": "SessionNotFoundError",
  12585. "content": {
  12586. "application/json": {
  12587. "schema": {
  12588. "anyOf": [
  12589. {
  12590. "$ref": "#/components/schemas/SessionNotFoundError"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/SessionNotFoundError"
  12594. }
  12595. ]
  12596. }
  12597. }
  12598. }
  12599. }
  12600. },
  12601. "description": "Retrieve pending permission requests owned by a session.",
  12602. "summary": "List session permission requests",
  12603. "x-codeSamples": [
  12604. {
  12605. "lang": "js",
  12606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12612. "post": {
  12613. "tags": ["permissions"],
  12614. "operationId": "v2.session.permission.reply",
  12615. "parameters": [
  12616. {
  12617. "name": "sessionID",
  12618. "in": "path",
  12619. "schema": {
  12620. "type": "string",
  12621. "pattern": "^ses"
  12622. },
  12623. "required": true
  12624. },
  12625. {
  12626. "name": "requestID",
  12627. "in": "path",
  12628. "schema": {
  12629. "type": "string",
  12630. "pattern": "^per"
  12631. },
  12632. "required": true
  12633. }
  12634. ],
  12635. "security": [],
  12636. "responses": {
  12637. "204": {
  12638. "description": "<No Content>"
  12639. },
  12640. "400": {
  12641. "description": "InvalidRequestError",
  12642. "content": {
  12643. "application/json": {
  12644. "schema": {
  12645. "$ref": "#/components/schemas/InvalidRequestError"
  12646. }
  12647. }
  12648. }
  12649. },
  12650. "401": {
  12651. "description": "UnauthorizedError",
  12652. "content": {
  12653. "application/json": {
  12654. "schema": {
  12655. "$ref": "#/components/schemas/UnauthorizedError"
  12656. }
  12657. }
  12658. }
  12659. },
  12660. "404": {
  12661. "description": "SessionNotFoundError | PermissionNotFoundError",
  12662. "content": {
  12663. "application/json": {
  12664. "schema": {
  12665. "anyOf": [
  12666. {
  12667. "$ref": "#/components/schemas/PermissionNotFoundError"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/SessionNotFoundError"
  12671. },
  12672. {
  12673. "$ref": "#/components/schemas/SessionNotFoundError"
  12674. }
  12675. ]
  12676. }
  12677. }
  12678. }
  12679. }
  12680. },
  12681. "description": "Respond to a pending permission request owned by a session.",
  12682. "summary": "Reply to pending permission request",
  12683. "requestBody": {
  12684. "content": {
  12685. "application/json": {
  12686. "schema": {
  12687. "type": "object",
  12688. "properties": {
  12689. "reply": {
  12690. "$ref": "#/components/schemas/PermissionV2Reply"
  12691. },
  12692. "message": {
  12693. "type": "string"
  12694. }
  12695. },
  12696. "required": ["reply"],
  12697. "additionalProperties": false
  12698. }
  12699. }
  12700. },
  12701. "required": true
  12702. },
  12703. "x-codeSamples": [
  12704. {
  12705. "lang": "js",
  12706. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12707. }
  12708. ]
  12709. }
  12710. },
  12711. "/api/fs/read/*": {
  12712. "get": {
  12713. "tags": ["filesystem"],
  12714. "operationId": "v2.fs.read",
  12715. "parameters": [
  12716. {
  12717. "name": "location",
  12718. "in": "query",
  12719. "schema": {
  12720. "type": "object",
  12721. "properties": {
  12722. "directory": {
  12723. "type": "string"
  12724. },
  12725. "workspace": {
  12726. "type": "string"
  12727. }
  12728. },
  12729. "additionalProperties": false
  12730. },
  12731. "required": false,
  12732. "style": "deepObject",
  12733. "explode": true
  12734. }
  12735. ],
  12736. "security": [],
  12737. "responses": {
  12738. "200": {
  12739. "description": "Success",
  12740. "content": {
  12741. "application/octet-stream": {
  12742. "schema": {
  12743. "type": "string",
  12744. "format": "binary"
  12745. }
  12746. }
  12747. }
  12748. },
  12749. "400": {
  12750. "description": "InvalidRequestError",
  12751. "content": {
  12752. "application/json": {
  12753. "schema": {
  12754. "$ref": "#/components/schemas/InvalidRequestError"
  12755. }
  12756. }
  12757. }
  12758. },
  12759. "401": {
  12760. "description": "UnauthorizedError",
  12761. "content": {
  12762. "application/json": {
  12763. "schema": {
  12764. "$ref": "#/components/schemas/UnauthorizedError"
  12765. }
  12766. }
  12767. }
  12768. }
  12769. },
  12770. "description": "Serve one file relative to the requested location.",
  12771. "summary": "Read file",
  12772. "x-codeSamples": [
  12773. {
  12774. "lang": "js",
  12775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12776. }
  12777. ]
  12778. }
  12779. },
  12780. "/api/fs/list": {
  12781. "get": {
  12782. "tags": ["filesystem"],
  12783. "operationId": "v2.fs.list",
  12784. "parameters": [
  12785. {
  12786. "name": "location",
  12787. "in": "query",
  12788. "schema": {
  12789. "type": "object",
  12790. "properties": {
  12791. "directory": {
  12792. "type": "string"
  12793. },
  12794. "workspace": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "additionalProperties": false
  12799. },
  12800. "required": false,
  12801. "style": "deepObject",
  12802. "explode": true
  12803. },
  12804. {
  12805. "name": "path",
  12806. "in": "query",
  12807. "schema": {
  12808. "type": "string"
  12809. },
  12810. "required": false
  12811. }
  12812. ],
  12813. "security": [],
  12814. "responses": {
  12815. "200": {
  12816. "description": "Success",
  12817. "content": {
  12818. "application/json": {
  12819. "schema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "location": {
  12823. "$ref": "#/components/schemas/LocationInfo"
  12824. },
  12825. "data": {
  12826. "type": "array",
  12827. "items": {
  12828. "$ref": "#/components/schemas/FileSystemEntry"
  12829. }
  12830. }
  12831. },
  12832. "required": ["location", "data"],
  12833. "additionalProperties": false
  12834. }
  12835. }
  12836. }
  12837. },
  12838. "400": {
  12839. "description": "InvalidRequestError",
  12840. "content": {
  12841. "application/json": {
  12842. "schema": {
  12843. "$ref": "#/components/schemas/InvalidRequestError"
  12844. }
  12845. }
  12846. }
  12847. },
  12848. "401": {
  12849. "description": "UnauthorizedError",
  12850. "content": {
  12851. "application/json": {
  12852. "schema": {
  12853. "$ref": "#/components/schemas/UnauthorizedError"
  12854. }
  12855. }
  12856. }
  12857. }
  12858. },
  12859. "description": "List direct children of one directory relative to the requested location.",
  12860. "summary": "List directory",
  12861. "x-codeSamples": [
  12862. {
  12863. "lang": "js",
  12864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12865. }
  12866. ]
  12867. }
  12868. },
  12869. "/api/fs/find": {
  12870. "get": {
  12871. "tags": ["filesystem"],
  12872. "operationId": "v2.fs.find",
  12873. "parameters": [
  12874. {
  12875. "name": "location",
  12876. "in": "query",
  12877. "schema": {
  12878. "type": "object",
  12879. "properties": {
  12880. "directory": {
  12881. "type": "string"
  12882. },
  12883. "workspace": {
  12884. "type": "string"
  12885. }
  12886. },
  12887. "additionalProperties": false
  12888. },
  12889. "required": false,
  12890. "style": "deepObject",
  12891. "explode": true
  12892. },
  12893. {
  12894. "name": "query",
  12895. "in": "query",
  12896. "schema": {
  12897. "type": "string"
  12898. },
  12899. "required": true
  12900. },
  12901. {
  12902. "name": "type",
  12903. "in": "query",
  12904. "schema": {
  12905. "type": "string",
  12906. "enum": ["file", "directory"]
  12907. },
  12908. "required": false
  12909. },
  12910. {
  12911. "name": "limit",
  12912. "in": "query",
  12913. "schema": {
  12914. "type": "string"
  12915. },
  12916. "required": false
  12917. }
  12918. ],
  12919. "security": [],
  12920. "responses": {
  12921. "200": {
  12922. "description": "Success",
  12923. "content": {
  12924. "application/json": {
  12925. "schema": {
  12926. "type": "object",
  12927. "properties": {
  12928. "location": {
  12929. "$ref": "#/components/schemas/LocationInfo"
  12930. },
  12931. "data": {
  12932. "type": "array",
  12933. "items": {
  12934. "$ref": "#/components/schemas/FileSystemEntry"
  12935. }
  12936. }
  12937. },
  12938. "required": ["location", "data"],
  12939. "additionalProperties": false
  12940. }
  12941. }
  12942. }
  12943. },
  12944. "400": {
  12945. "description": "InvalidRequestError",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "$ref": "#/components/schemas/InvalidRequestError"
  12950. }
  12951. }
  12952. }
  12953. },
  12954. "401": {
  12955. "description": "UnauthorizedError",
  12956. "content": {
  12957. "application/json": {
  12958. "schema": {
  12959. "$ref": "#/components/schemas/UnauthorizedError"
  12960. }
  12961. }
  12962. }
  12963. }
  12964. },
  12965. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12966. "summary": "Find files",
  12967. "x-codeSamples": [
  12968. {
  12969. "lang": "js",
  12970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12971. }
  12972. ]
  12973. }
  12974. },
  12975. "/api/command": {
  12976. "get": {
  12977. "tags": ["commands"],
  12978. "operationId": "v2.command.list",
  12979. "parameters": [
  12980. {
  12981. "name": "location",
  12982. "in": "query",
  12983. "schema": {
  12984. "type": "object",
  12985. "properties": {
  12986. "directory": {
  12987. "type": "string"
  12988. },
  12989. "workspace": {
  12990. "type": "string"
  12991. }
  12992. },
  12993. "additionalProperties": false
  12994. },
  12995. "required": false,
  12996. "style": "deepObject",
  12997. "explode": true
  12998. }
  12999. ],
  13000. "security": [],
  13001. "responses": {
  13002. "200": {
  13003. "description": "Success",
  13004. "content": {
  13005. "application/json": {
  13006. "schema": {
  13007. "type": "object",
  13008. "properties": {
  13009. "location": {
  13010. "$ref": "#/components/schemas/LocationInfo"
  13011. },
  13012. "data": {
  13013. "type": "array",
  13014. "items": {
  13015. "$ref": "#/components/schemas/CommandV2Info"
  13016. }
  13017. }
  13018. },
  13019. "required": ["location", "data"],
  13020. "additionalProperties": false
  13021. }
  13022. }
  13023. }
  13024. },
  13025. "400": {
  13026. "description": "InvalidRequestError",
  13027. "content": {
  13028. "application/json": {
  13029. "schema": {
  13030. "$ref": "#/components/schemas/InvalidRequestError"
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "401": {
  13036. "description": "UnauthorizedError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/UnauthorizedError"
  13041. }
  13042. }
  13043. }
  13044. }
  13045. },
  13046. "description": "Retrieve currently registered commands.",
  13047. "summary": "List commands",
  13048. "x-codeSamples": [
  13049. {
  13050. "lang": "js",
  13051. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13052. }
  13053. ]
  13054. }
  13055. },
  13056. "/api/skill": {
  13057. "get": {
  13058. "tags": ["skills"],
  13059. "operationId": "v2.skill.list",
  13060. "parameters": [
  13061. {
  13062. "name": "location",
  13063. "in": "query",
  13064. "schema": {
  13065. "type": "object",
  13066. "properties": {
  13067. "directory": {
  13068. "type": "string"
  13069. },
  13070. "workspace": {
  13071. "type": "string"
  13072. }
  13073. },
  13074. "additionalProperties": false
  13075. },
  13076. "required": false,
  13077. "style": "deepObject",
  13078. "explode": true
  13079. }
  13080. ],
  13081. "security": [],
  13082. "responses": {
  13083. "200": {
  13084. "description": "Success",
  13085. "content": {
  13086. "application/json": {
  13087. "schema": {
  13088. "type": "object",
  13089. "properties": {
  13090. "location": {
  13091. "$ref": "#/components/schemas/LocationInfo"
  13092. },
  13093. "data": {
  13094. "type": "array",
  13095. "items": {
  13096. "$ref": "#/components/schemas/SkillV2Info"
  13097. }
  13098. }
  13099. },
  13100. "required": ["location", "data"],
  13101. "additionalProperties": false
  13102. }
  13103. }
  13104. }
  13105. },
  13106. "400": {
  13107. "description": "InvalidRequestError",
  13108. "content": {
  13109. "application/json": {
  13110. "schema": {
  13111. "$ref": "#/components/schemas/InvalidRequestError"
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "401": {
  13117. "description": "UnauthorizedError",
  13118. "content": {
  13119. "application/json": {
  13120. "schema": {
  13121. "$ref": "#/components/schemas/UnauthorizedError"
  13122. }
  13123. }
  13124. }
  13125. }
  13126. },
  13127. "description": "Retrieve currently registered skills.",
  13128. "summary": "List skills",
  13129. "x-codeSamples": [
  13130. {
  13131. "lang": "js",
  13132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13133. }
  13134. ]
  13135. }
  13136. },
  13137. "/api/event": {
  13138. "get": {
  13139. "tags": ["events"],
  13140. "operationId": "v2.event.subscribe",
  13141. "parameters": [
  13142. {
  13143. "name": "location",
  13144. "in": "query",
  13145. "schema": {
  13146. "type": "object",
  13147. "properties": {
  13148. "directory": {
  13149. "type": "string"
  13150. },
  13151. "workspace": {
  13152. "type": "string"
  13153. }
  13154. },
  13155. "additionalProperties": false
  13156. },
  13157. "required": false,
  13158. "style": "deepObject",
  13159. "explode": true
  13160. }
  13161. ],
  13162. "security": [],
  13163. "responses": {
  13164. "200": {
  13165. "description": "Success",
  13166. "content": {
  13167. "text/event-stream": {
  13168. "schema": {
  13169. "type": "string"
  13170. }
  13171. }
  13172. }
  13173. },
  13174. "400": {
  13175. "description": "InvalidRequestError",
  13176. "content": {
  13177. "application/json": {
  13178. "schema": {
  13179. "$ref": "#/components/schemas/InvalidRequestError"
  13180. }
  13181. }
  13182. }
  13183. },
  13184. "401": {
  13185. "description": "UnauthorizedError",
  13186. "content": {
  13187. "application/json": {
  13188. "schema": {
  13189. "$ref": "#/components/schemas/UnauthorizedError"
  13190. }
  13191. }
  13192. }
  13193. }
  13194. },
  13195. "description": "Subscribe to native event payloads for a location.",
  13196. "summary": "Subscribe to events",
  13197. "x-codeSamples": [
  13198. {
  13199. "lang": "js",
  13200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13201. }
  13202. ]
  13203. }
  13204. },
  13205. "/api/pty": {
  13206. "get": {
  13207. "tags": ["pty"],
  13208. "operationId": "v2.pty.list",
  13209. "parameters": [
  13210. {
  13211. "name": "location",
  13212. "in": "query",
  13213. "schema": {
  13214. "type": "object",
  13215. "properties": {
  13216. "directory": {
  13217. "type": "string"
  13218. },
  13219. "workspace": {
  13220. "type": "string"
  13221. }
  13222. },
  13223. "additionalProperties": false
  13224. },
  13225. "required": false,
  13226. "style": "deepObject",
  13227. "explode": true
  13228. }
  13229. ],
  13230. "security": [],
  13231. "responses": {
  13232. "200": {
  13233. "description": "Success",
  13234. "content": {
  13235. "application/json": {
  13236. "schema": {
  13237. "type": "object",
  13238. "properties": {
  13239. "location": {
  13240. "$ref": "#/components/schemas/LocationInfo"
  13241. },
  13242. "data": {
  13243. "type": "array",
  13244. "items": {
  13245. "$ref": "#/components/schemas/Pty"
  13246. }
  13247. }
  13248. },
  13249. "required": ["location", "data"],
  13250. "additionalProperties": false
  13251. }
  13252. }
  13253. }
  13254. },
  13255. "400": {
  13256. "description": "InvalidRequestError",
  13257. "content": {
  13258. "application/json": {
  13259. "schema": {
  13260. "$ref": "#/components/schemas/InvalidRequestError"
  13261. }
  13262. }
  13263. }
  13264. },
  13265. "401": {
  13266. "description": "UnauthorizedError",
  13267. "content": {
  13268. "application/json": {
  13269. "schema": {
  13270. "$ref": "#/components/schemas/UnauthorizedError"
  13271. }
  13272. }
  13273. }
  13274. }
  13275. },
  13276. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13277. "summary": "List PTY sessions",
  13278. "x-codeSamples": [
  13279. {
  13280. "lang": "js",
  13281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13282. }
  13283. ]
  13284. },
  13285. "post": {
  13286. "tags": ["pty"],
  13287. "operationId": "v2.pty.create",
  13288. "parameters": [
  13289. {
  13290. "name": "location",
  13291. "in": "query",
  13292. "schema": {
  13293. "type": "object",
  13294. "properties": {
  13295. "directory": {
  13296. "type": "string"
  13297. },
  13298. "workspace": {
  13299. "type": "string"
  13300. }
  13301. },
  13302. "additionalProperties": false
  13303. },
  13304. "required": false,
  13305. "style": "deepObject",
  13306. "explode": true
  13307. }
  13308. ],
  13309. "security": [],
  13310. "responses": {
  13311. "200": {
  13312. "description": "Success",
  13313. "content": {
  13314. "application/json": {
  13315. "schema": {
  13316. "type": "object",
  13317. "properties": {
  13318. "location": {
  13319. "$ref": "#/components/schemas/LocationInfo"
  13320. },
  13321. "data": {
  13322. "$ref": "#/components/schemas/Pty"
  13323. }
  13324. },
  13325. "required": ["location", "data"],
  13326. "additionalProperties": false
  13327. }
  13328. }
  13329. }
  13330. },
  13331. "400": {
  13332. "description": "InvalidRequestError",
  13333. "content": {
  13334. "application/json": {
  13335. "schema": {
  13336. "$ref": "#/components/schemas/InvalidRequestError"
  13337. }
  13338. }
  13339. }
  13340. },
  13341. "401": {
  13342. "description": "UnauthorizedError",
  13343. "content": {
  13344. "application/json": {
  13345. "schema": {
  13346. "$ref": "#/components/schemas/UnauthorizedError"
  13347. }
  13348. }
  13349. }
  13350. }
  13351. },
  13352. "description": "Create a pseudo-terminal session for a location.",
  13353. "summary": "Create PTY session",
  13354. "requestBody": {
  13355. "content": {
  13356. "application/json": {
  13357. "schema": {
  13358. "type": "object",
  13359. "properties": {
  13360. "command": {
  13361. "type": "string"
  13362. },
  13363. "args": {
  13364. "type": "array",
  13365. "items": {
  13366. "type": "string"
  13367. }
  13368. },
  13369. "cwd": {
  13370. "type": "string"
  13371. },
  13372. "title": {
  13373. "type": "string"
  13374. },
  13375. "env": {
  13376. "type": "object",
  13377. "additionalProperties": {
  13378. "type": "string"
  13379. }
  13380. }
  13381. },
  13382. "additionalProperties": false
  13383. }
  13384. }
  13385. },
  13386. "required": true
  13387. },
  13388. "x-codeSamples": [
  13389. {
  13390. "lang": "js",
  13391. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13392. }
  13393. ]
  13394. }
  13395. },
  13396. "/api/pty/{ptyID}": {
  13397. "get": {
  13398. "tags": ["pty"],
  13399. "operationId": "v2.pty.get",
  13400. "parameters": [
  13401. {
  13402. "name": "ptyID",
  13403. "in": "path",
  13404. "schema": {
  13405. "type": "string",
  13406. "pattern": "^pty"
  13407. },
  13408. "required": true
  13409. },
  13410. {
  13411. "name": "location",
  13412. "in": "query",
  13413. "schema": {
  13414. "type": "object",
  13415. "properties": {
  13416. "directory": {
  13417. "type": "string"
  13418. },
  13419. "workspace": {
  13420. "type": "string"
  13421. }
  13422. },
  13423. "additionalProperties": false
  13424. },
  13425. "required": false,
  13426. "style": "deepObject",
  13427. "explode": true
  13428. }
  13429. ],
  13430. "security": [],
  13431. "responses": {
  13432. "200": {
  13433. "description": "Success",
  13434. "content": {
  13435. "application/json": {
  13436. "schema": {
  13437. "type": "object",
  13438. "properties": {
  13439. "location": {
  13440. "$ref": "#/components/schemas/LocationInfo"
  13441. },
  13442. "data": {
  13443. "$ref": "#/components/schemas/Pty"
  13444. }
  13445. },
  13446. "required": ["location", "data"],
  13447. "additionalProperties": false
  13448. }
  13449. }
  13450. }
  13451. },
  13452. "400": {
  13453. "description": "InvalidRequestError",
  13454. "content": {
  13455. "application/json": {
  13456. "schema": {
  13457. "$ref": "#/components/schemas/InvalidRequestError"
  13458. }
  13459. }
  13460. }
  13461. },
  13462. "401": {
  13463. "description": "UnauthorizedError",
  13464. "content": {
  13465. "application/json": {
  13466. "schema": {
  13467. "$ref": "#/components/schemas/UnauthorizedError"
  13468. }
  13469. }
  13470. }
  13471. },
  13472. "404": {
  13473. "description": "PtyNotFoundError",
  13474. "content": {
  13475. "application/json": {
  13476. "schema": {
  13477. "$ref": "#/components/schemas/PtyNotFoundError"
  13478. }
  13479. }
  13480. }
  13481. }
  13482. },
  13483. "description": "Get one PTY session, including its exit code once exited.",
  13484. "summary": "Get PTY session",
  13485. "x-codeSamples": [
  13486. {
  13487. "lang": "js",
  13488. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13489. }
  13490. ]
  13491. },
  13492. "put": {
  13493. "tags": ["pty"],
  13494. "operationId": "v2.pty.update",
  13495. "parameters": [
  13496. {
  13497. "name": "ptyID",
  13498. "in": "path",
  13499. "schema": {
  13500. "type": "string",
  13501. "pattern": "^pty"
  13502. },
  13503. "required": true
  13504. },
  13505. {
  13506. "name": "location",
  13507. "in": "query",
  13508. "schema": {
  13509. "type": "object",
  13510. "properties": {
  13511. "directory": {
  13512. "type": "string"
  13513. },
  13514. "workspace": {
  13515. "type": "string"
  13516. }
  13517. },
  13518. "additionalProperties": false
  13519. },
  13520. "required": false,
  13521. "style": "deepObject",
  13522. "explode": true
  13523. }
  13524. ],
  13525. "security": [],
  13526. "responses": {
  13527. "200": {
  13528. "description": "Success",
  13529. "content": {
  13530. "application/json": {
  13531. "schema": {
  13532. "type": "object",
  13533. "properties": {
  13534. "location": {
  13535. "$ref": "#/components/schemas/LocationInfo"
  13536. },
  13537. "data": {
  13538. "$ref": "#/components/schemas/Pty"
  13539. }
  13540. },
  13541. "required": ["location", "data"],
  13542. "additionalProperties": false
  13543. }
  13544. }
  13545. }
  13546. },
  13547. "400": {
  13548. "description": "InvalidRequestError",
  13549. "content": {
  13550. "application/json": {
  13551. "schema": {
  13552. "$ref": "#/components/schemas/InvalidRequestError"
  13553. }
  13554. }
  13555. }
  13556. },
  13557. "401": {
  13558. "description": "UnauthorizedError",
  13559. "content": {
  13560. "application/json": {
  13561. "schema": {
  13562. "$ref": "#/components/schemas/UnauthorizedError"
  13563. }
  13564. }
  13565. }
  13566. },
  13567. "404": {
  13568. "description": "PtyNotFoundError",
  13569. "content": {
  13570. "application/json": {
  13571. "schema": {
  13572. "$ref": "#/components/schemas/PtyNotFoundError"
  13573. }
  13574. }
  13575. }
  13576. }
  13577. },
  13578. "description": "Update the title or viewport size of one PTY session.",
  13579. "summary": "Update PTY session",
  13580. "requestBody": {
  13581. "content": {
  13582. "application/json": {
  13583. "schema": {
  13584. "type": "object",
  13585. "properties": {
  13586. "title": {
  13587. "type": "string"
  13588. },
  13589. "size": {
  13590. "type": "object",
  13591. "properties": {
  13592. "rows": {
  13593. "type": "integer",
  13594. "exclusiveMinimum": 0
  13595. },
  13596. "cols": {
  13597. "type": "integer",
  13598. "exclusiveMinimum": 0
  13599. }
  13600. },
  13601. "required": ["rows", "cols"],
  13602. "additionalProperties": false
  13603. }
  13604. },
  13605. "additionalProperties": false
  13606. }
  13607. }
  13608. },
  13609. "required": true
  13610. },
  13611. "x-codeSamples": [
  13612. {
  13613. "lang": "js",
  13614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13615. }
  13616. ]
  13617. },
  13618. "delete": {
  13619. "tags": ["pty"],
  13620. "operationId": "v2.pty.remove",
  13621. "parameters": [
  13622. {
  13623. "name": "ptyID",
  13624. "in": "path",
  13625. "schema": {
  13626. "type": "string",
  13627. "pattern": "^pty"
  13628. },
  13629. "required": true
  13630. },
  13631. {
  13632. "name": "location",
  13633. "in": "query",
  13634. "schema": {
  13635. "type": "object",
  13636. "properties": {
  13637. "directory": {
  13638. "type": "string"
  13639. },
  13640. "workspace": {
  13641. "type": "string"
  13642. }
  13643. },
  13644. "additionalProperties": false
  13645. },
  13646. "required": false,
  13647. "style": "deepObject",
  13648. "explode": true
  13649. }
  13650. ],
  13651. "security": [],
  13652. "responses": {
  13653. "204": {
  13654. "description": "<No Content>"
  13655. },
  13656. "400": {
  13657. "description": "InvalidRequestError",
  13658. "content": {
  13659. "application/json": {
  13660. "schema": {
  13661. "$ref": "#/components/schemas/InvalidRequestError"
  13662. }
  13663. }
  13664. }
  13665. },
  13666. "401": {
  13667. "description": "UnauthorizedError",
  13668. "content": {
  13669. "application/json": {
  13670. "schema": {
  13671. "$ref": "#/components/schemas/UnauthorizedError"
  13672. }
  13673. }
  13674. }
  13675. },
  13676. "404": {
  13677. "description": "PtyNotFoundError",
  13678. "content": {
  13679. "application/json": {
  13680. "schema": {
  13681. "$ref": "#/components/schemas/PtyNotFoundError"
  13682. }
  13683. }
  13684. }
  13685. }
  13686. },
  13687. "description": "Terminate and remove one PTY session.",
  13688. "summary": "Remove PTY session",
  13689. "x-codeSamples": [
  13690. {
  13691. "lang": "js",
  13692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13693. }
  13694. ]
  13695. }
  13696. },
  13697. "/api/pty/{ptyID}/connect-token": {
  13698. "post": {
  13699. "tags": ["pty"],
  13700. "operationId": "v2.pty.connectToken",
  13701. "parameters": [
  13702. {
  13703. "name": "ptyID",
  13704. "in": "path",
  13705. "schema": {
  13706. "type": "string",
  13707. "pattern": "^pty"
  13708. },
  13709. "required": true
  13710. },
  13711. {
  13712. "name": "location",
  13713. "in": "query",
  13714. "schema": {
  13715. "type": "object",
  13716. "properties": {
  13717. "directory": {
  13718. "type": "string"
  13719. },
  13720. "workspace": {
  13721. "type": "string"
  13722. }
  13723. },
  13724. "additionalProperties": false
  13725. },
  13726. "required": false,
  13727. "style": "deepObject",
  13728. "explode": true
  13729. }
  13730. ],
  13731. "security": [],
  13732. "responses": {
  13733. "200": {
  13734. "description": "Success",
  13735. "content": {
  13736. "application/json": {
  13737. "schema": {
  13738. "type": "object",
  13739. "properties": {
  13740. "location": {
  13741. "$ref": "#/components/schemas/LocationInfo"
  13742. },
  13743. "data": {
  13744. "type": "object",
  13745. "properties": {
  13746. "ticket": {
  13747. "type": "string"
  13748. },
  13749. "expires_in": {
  13750. "type": "integer",
  13751. "exclusiveMinimum": 0
  13752. }
  13753. },
  13754. "required": ["ticket", "expires_in"],
  13755. "additionalProperties": false
  13756. }
  13757. },
  13758. "required": ["location", "data"],
  13759. "additionalProperties": false
  13760. }
  13761. }
  13762. }
  13763. },
  13764. "400": {
  13765. "description": "InvalidRequestError",
  13766. "content": {
  13767. "application/json": {
  13768. "schema": {
  13769. "$ref": "#/components/schemas/InvalidRequestError"
  13770. }
  13771. }
  13772. }
  13773. },
  13774. "401": {
  13775. "description": "UnauthorizedError",
  13776. "content": {
  13777. "application/json": {
  13778. "schema": {
  13779. "$ref": "#/components/schemas/UnauthorizedError"
  13780. }
  13781. }
  13782. }
  13783. },
  13784. "403": {
  13785. "description": "ForbiddenError",
  13786. "content": {
  13787. "application/json": {
  13788. "schema": {
  13789. "$ref": "#/components/schemas/ForbiddenError"
  13790. }
  13791. }
  13792. }
  13793. },
  13794. "404": {
  13795. "description": "PtyNotFoundError",
  13796. "content": {
  13797. "application/json": {
  13798. "schema": {
  13799. "$ref": "#/components/schemas/PtyNotFoundError"
  13800. }
  13801. }
  13802. }
  13803. }
  13804. },
  13805. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13806. "summary": "Create PTY WebSocket token",
  13807. "x-codeSamples": [
  13808. {
  13809. "lang": "js",
  13810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13811. }
  13812. ]
  13813. }
  13814. },
  13815. "/api/pty/{ptyID}/connect": {
  13816. "get": {
  13817. "tags": ["pty"],
  13818. "operationId": "v2.pty.connect",
  13819. "parameters": [
  13820. {
  13821. "name": "ptyID",
  13822. "in": "path",
  13823. "schema": {
  13824. "type": "string",
  13825. "pattern": "^pty"
  13826. },
  13827. "required": true
  13828. },
  13829. {
  13830. "in": "query",
  13831. "name": "location[directory]",
  13832. "schema": {
  13833. "type": "string"
  13834. }
  13835. },
  13836. {
  13837. "in": "query",
  13838. "name": "location[workspace]",
  13839. "schema": {
  13840. "type": "string"
  13841. }
  13842. },
  13843. {
  13844. "in": "query",
  13845. "name": "cursor",
  13846. "schema": {
  13847. "type": "string"
  13848. }
  13849. },
  13850. {
  13851. "in": "query",
  13852. "name": "ticket",
  13853. "schema": {
  13854. "type": "string"
  13855. }
  13856. }
  13857. ],
  13858. "security": [],
  13859. "responses": {
  13860. "200": {
  13861. "description": "Success",
  13862. "content": {
  13863. "application/json": {
  13864. "schema": {
  13865. "type": "boolean"
  13866. }
  13867. }
  13868. }
  13869. },
  13870. "400": {
  13871. "description": "InvalidRequestError",
  13872. "content": {
  13873. "application/json": {
  13874. "schema": {
  13875. "$ref": "#/components/schemas/InvalidRequestError"
  13876. }
  13877. }
  13878. }
  13879. },
  13880. "401": {
  13881. "description": "UnauthorizedError",
  13882. "content": {
  13883. "application/json": {
  13884. "schema": {
  13885. "$ref": "#/components/schemas/UnauthorizedError"
  13886. }
  13887. }
  13888. }
  13889. },
  13890. "403": {
  13891. "description": "ForbiddenError",
  13892. "content": {
  13893. "application/json": {
  13894. "schema": {
  13895. "$ref": "#/components/schemas/ForbiddenError"
  13896. }
  13897. }
  13898. }
  13899. },
  13900. "404": {
  13901. "description": "PtyNotFoundError",
  13902. "content": {
  13903. "application/json": {
  13904. "schema": {
  13905. "$ref": "#/components/schemas/PtyNotFoundError"
  13906. }
  13907. }
  13908. }
  13909. }
  13910. },
  13911. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13912. "summary": "Connect to PTY session",
  13913. "x-codeSamples": [
  13914. {
  13915. "lang": "js",
  13916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13917. }
  13918. ]
  13919. }
  13920. },
  13921. "/api/question/request": {
  13922. "get": {
  13923. "tags": ["session questions"],
  13924. "operationId": "v2.question.request.list",
  13925. "parameters": [
  13926. {
  13927. "name": "location",
  13928. "in": "query",
  13929. "schema": {
  13930. "type": "object",
  13931. "properties": {
  13932. "directory": {
  13933. "type": "string"
  13934. },
  13935. "workspace": {
  13936. "type": "string"
  13937. }
  13938. },
  13939. "additionalProperties": false
  13940. },
  13941. "required": false,
  13942. "style": "deepObject",
  13943. "explode": true
  13944. }
  13945. ],
  13946. "security": [],
  13947. "responses": {
  13948. "200": {
  13949. "description": "Success",
  13950. "content": {
  13951. "application/json": {
  13952. "schema": {
  13953. "type": "object",
  13954. "properties": {
  13955. "location": {
  13956. "$ref": "#/components/schemas/LocationInfo"
  13957. },
  13958. "data": {
  13959. "type": "array",
  13960. "items": {
  13961. "$ref": "#/components/schemas/QuestionV2Request"
  13962. }
  13963. }
  13964. },
  13965. "required": ["location", "data"],
  13966. "additionalProperties": false
  13967. }
  13968. }
  13969. }
  13970. },
  13971. "400": {
  13972. "description": "InvalidRequestError",
  13973. "content": {
  13974. "application/json": {
  13975. "schema": {
  13976. "$ref": "#/components/schemas/InvalidRequestError"
  13977. }
  13978. }
  13979. }
  13980. },
  13981. "401": {
  13982. "description": "UnauthorizedError",
  13983. "content": {
  13984. "application/json": {
  13985. "schema": {
  13986. "$ref": "#/components/schemas/UnauthorizedError"
  13987. }
  13988. }
  13989. }
  13990. }
  13991. },
  13992. "description": "Retrieve pending question requests for a location.",
  13993. "summary": "List pending question requests",
  13994. "x-codeSamples": [
  13995. {
  13996. "lang": "js",
  13997. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13998. }
  13999. ]
  14000. }
  14001. },
  14002. "/api/session/{sessionID}/question": {
  14003. "get": {
  14004. "tags": ["session questions"],
  14005. "operationId": "v2.session.question.list",
  14006. "parameters": [
  14007. {
  14008. "name": "sessionID",
  14009. "in": "path",
  14010. "schema": {
  14011. "type": "string",
  14012. "pattern": "^ses"
  14013. },
  14014. "required": true
  14015. }
  14016. ],
  14017. "security": [],
  14018. "responses": {
  14019. "200": {
  14020. "description": "Success",
  14021. "content": {
  14022. "application/json": {
  14023. "schema": {
  14024. "type": "object",
  14025. "properties": {
  14026. "data": {
  14027. "type": "array",
  14028. "items": {
  14029. "$ref": "#/components/schemas/QuestionV2Request"
  14030. }
  14031. }
  14032. },
  14033. "required": ["data"],
  14034. "additionalProperties": false
  14035. }
  14036. }
  14037. }
  14038. },
  14039. "400": {
  14040. "description": "InvalidRequestError",
  14041. "content": {
  14042. "application/json": {
  14043. "schema": {
  14044. "$ref": "#/components/schemas/InvalidRequestError"
  14045. }
  14046. }
  14047. }
  14048. },
  14049. "401": {
  14050. "description": "UnauthorizedError",
  14051. "content": {
  14052. "application/json": {
  14053. "schema": {
  14054. "$ref": "#/components/schemas/UnauthorizedError"
  14055. }
  14056. }
  14057. }
  14058. },
  14059. "404": {
  14060. "description": "SessionNotFoundError",
  14061. "content": {
  14062. "application/json": {
  14063. "schema": {
  14064. "anyOf": [
  14065. {
  14066. "$ref": "#/components/schemas/SessionNotFoundError"
  14067. },
  14068. {
  14069. "$ref": "#/components/schemas/SessionNotFoundError"
  14070. }
  14071. ]
  14072. }
  14073. }
  14074. }
  14075. }
  14076. },
  14077. "description": "Retrieve pending question requests owned by a session.",
  14078. "summary": "List session question requests",
  14079. "x-codeSamples": [
  14080. {
  14081. "lang": "js",
  14082. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14083. }
  14084. ]
  14085. }
  14086. },
  14087. "/api/session/{sessionID}/question/{requestID}/reply": {
  14088. "post": {
  14089. "tags": ["session questions"],
  14090. "operationId": "v2.session.question.reply",
  14091. "parameters": [
  14092. {
  14093. "name": "sessionID",
  14094. "in": "path",
  14095. "schema": {
  14096. "type": "string",
  14097. "pattern": "^ses"
  14098. },
  14099. "required": true
  14100. },
  14101. {
  14102. "name": "requestID",
  14103. "in": "path",
  14104. "schema": {
  14105. "type": "string",
  14106. "pattern": "^que"
  14107. },
  14108. "required": true
  14109. }
  14110. ],
  14111. "security": [],
  14112. "responses": {
  14113. "204": {
  14114. "description": "<No Content>"
  14115. },
  14116. "400": {
  14117. "description": "InvalidRequestError",
  14118. "content": {
  14119. "application/json": {
  14120. "schema": {
  14121. "$ref": "#/components/schemas/InvalidRequestError"
  14122. }
  14123. }
  14124. }
  14125. },
  14126. "401": {
  14127. "description": "UnauthorizedError",
  14128. "content": {
  14129. "application/json": {
  14130. "schema": {
  14131. "$ref": "#/components/schemas/UnauthorizedError"
  14132. }
  14133. }
  14134. }
  14135. },
  14136. "404": {
  14137. "description": "SessionNotFoundError | QuestionNotFoundError",
  14138. "content": {
  14139. "application/json": {
  14140. "schema": {
  14141. "anyOf": [
  14142. {
  14143. "$ref": "#/components/schemas/QuestionNotFoundError"
  14144. },
  14145. {
  14146. "$ref": "#/components/schemas/SessionNotFoundError"
  14147. },
  14148. {
  14149. "$ref": "#/components/schemas/SessionNotFoundError"
  14150. }
  14151. ]
  14152. }
  14153. }
  14154. }
  14155. }
  14156. },
  14157. "description": "Answer a pending question request owned by a session.",
  14158. "summary": "Reply to pending question request",
  14159. "requestBody": {
  14160. "content": {
  14161. "application/json": {
  14162. "schema": {
  14163. "$ref": "#/components/schemas/QuestionV2Reply"
  14164. }
  14165. }
  14166. },
  14167. "required": true
  14168. },
  14169. "x-codeSamples": [
  14170. {
  14171. "lang": "js",
  14172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14173. }
  14174. ]
  14175. }
  14176. },
  14177. "/api/session/{sessionID}/question/{requestID}/reject": {
  14178. "post": {
  14179. "tags": ["session questions"],
  14180. "operationId": "v2.session.question.reject",
  14181. "parameters": [
  14182. {
  14183. "name": "sessionID",
  14184. "in": "path",
  14185. "schema": {
  14186. "type": "string",
  14187. "pattern": "^ses"
  14188. },
  14189. "required": true
  14190. },
  14191. {
  14192. "name": "requestID",
  14193. "in": "path",
  14194. "schema": {
  14195. "type": "string",
  14196. "pattern": "^que"
  14197. },
  14198. "required": true
  14199. }
  14200. ],
  14201. "security": [],
  14202. "responses": {
  14203. "204": {
  14204. "description": "<No Content>"
  14205. },
  14206. "400": {
  14207. "description": "InvalidRequestError",
  14208. "content": {
  14209. "application/json": {
  14210. "schema": {
  14211. "$ref": "#/components/schemas/InvalidRequestError"
  14212. }
  14213. }
  14214. }
  14215. },
  14216. "401": {
  14217. "description": "UnauthorizedError",
  14218. "content": {
  14219. "application/json": {
  14220. "schema": {
  14221. "$ref": "#/components/schemas/UnauthorizedError"
  14222. }
  14223. }
  14224. }
  14225. },
  14226. "404": {
  14227. "description": "SessionNotFoundError | QuestionNotFoundError",
  14228. "content": {
  14229. "application/json": {
  14230. "schema": {
  14231. "anyOf": [
  14232. {
  14233. "$ref": "#/components/schemas/QuestionNotFoundError"
  14234. },
  14235. {
  14236. "$ref": "#/components/schemas/SessionNotFoundError"
  14237. },
  14238. {
  14239. "$ref": "#/components/schemas/SessionNotFoundError"
  14240. }
  14241. ]
  14242. }
  14243. }
  14244. }
  14245. }
  14246. },
  14247. "description": "Reject a pending question request owned by a session.",
  14248. "summary": "Reject pending question request",
  14249. "x-codeSamples": [
  14250. {
  14251. "lang": "js",
  14252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14253. }
  14254. ]
  14255. }
  14256. },
  14257. "/api/reference": {
  14258. "get": {
  14259. "tags": ["reference"],
  14260. "operationId": "v2.reference.list",
  14261. "parameters": [
  14262. {
  14263. "name": "location",
  14264. "in": "query",
  14265. "schema": {
  14266. "type": "object",
  14267. "properties": {
  14268. "directory": {
  14269. "type": "string"
  14270. },
  14271. "workspace": {
  14272. "type": "string"
  14273. }
  14274. },
  14275. "additionalProperties": false
  14276. },
  14277. "required": false,
  14278. "style": "deepObject",
  14279. "explode": true
  14280. }
  14281. ],
  14282. "security": [],
  14283. "responses": {
  14284. "200": {
  14285. "description": "Success",
  14286. "content": {
  14287. "application/json": {
  14288. "schema": {
  14289. "type": "object",
  14290. "properties": {
  14291. "location": {
  14292. "$ref": "#/components/schemas/LocationInfo"
  14293. },
  14294. "data": {
  14295. "type": "array",
  14296. "items": {
  14297. "$ref": "#/components/schemas/ReferenceInfo"
  14298. }
  14299. }
  14300. },
  14301. "required": ["location", "data"],
  14302. "additionalProperties": false
  14303. }
  14304. }
  14305. }
  14306. },
  14307. "400": {
  14308. "description": "InvalidRequestError",
  14309. "content": {
  14310. "application/json": {
  14311. "schema": {
  14312. "$ref": "#/components/schemas/InvalidRequestError"
  14313. }
  14314. }
  14315. }
  14316. },
  14317. "401": {
  14318. "description": "UnauthorizedError",
  14319. "content": {
  14320. "application/json": {
  14321. "schema": {
  14322. "$ref": "#/components/schemas/UnauthorizedError"
  14323. }
  14324. }
  14325. }
  14326. }
  14327. },
  14328. "description": "List references available in the requested location.",
  14329. "summary": "List references",
  14330. "x-codeSamples": [
  14331. {
  14332. "lang": "js",
  14333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14334. }
  14335. ]
  14336. }
  14337. },
  14338. "/experimental/project/{projectID}/copy": {
  14339. "post": {
  14340. "tags": ["projectCopy"],
  14341. "operationId": "v2.projectCopy.create",
  14342. "parameters": [
  14343. {
  14344. "name": "projectID",
  14345. "in": "path",
  14346. "schema": {
  14347. "type": "string"
  14348. },
  14349. "required": true
  14350. },
  14351. {
  14352. "name": "location",
  14353. "in": "query",
  14354. "schema": {
  14355. "type": "object",
  14356. "properties": {
  14357. "directory": {
  14358. "type": "string"
  14359. },
  14360. "workspace": {
  14361. "type": "string"
  14362. }
  14363. },
  14364. "additionalProperties": false
  14365. },
  14366. "required": false,
  14367. "style": "deepObject",
  14368. "explode": true
  14369. }
  14370. ],
  14371. "responses": {
  14372. "200": {
  14373. "description": "ProjectCopy.Copy",
  14374. "content": {
  14375. "application/json": {
  14376. "schema": {
  14377. "$ref": "#/components/schemas/ProjectCopyCopy"
  14378. }
  14379. }
  14380. }
  14381. },
  14382. "400": {
  14383. "description": "ProjectCopyError | InvalidRequestError",
  14384. "content": {
  14385. "application/json": {
  14386. "schema": {
  14387. "anyOf": [
  14388. {
  14389. "$ref": "#/components/schemas/ProjectCopyError"
  14390. },
  14391. {
  14392. "$ref": "#/components/schemas/InvalidRequestError"
  14393. }
  14394. ]
  14395. }
  14396. }
  14397. }
  14398. }
  14399. },
  14400. "requestBody": {
  14401. "content": {
  14402. "application/json": {
  14403. "schema": {
  14404. "type": "object",
  14405. "properties": {
  14406. "strategy": {
  14407. "type": "string"
  14408. },
  14409. "directory": {
  14410. "type": "string"
  14411. },
  14412. "name": {
  14413. "type": "string"
  14414. }
  14415. },
  14416. "required": ["strategy", "directory"],
  14417. "additionalProperties": false
  14418. }
  14419. }
  14420. }
  14421. },
  14422. "x-codeSamples": [
  14423. {
  14424. "lang": "js",
  14425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14426. }
  14427. ]
  14428. },
  14429. "delete": {
  14430. "tags": ["projectCopy"],
  14431. "operationId": "v2.projectCopy.remove",
  14432. "parameters": [
  14433. {
  14434. "name": "projectID",
  14435. "in": "path",
  14436. "schema": {
  14437. "type": "string"
  14438. },
  14439. "required": true
  14440. },
  14441. {
  14442. "name": "location",
  14443. "in": "query",
  14444. "schema": {
  14445. "type": "object",
  14446. "properties": {
  14447. "directory": {
  14448. "type": "string"
  14449. },
  14450. "workspace": {
  14451. "type": "string"
  14452. }
  14453. },
  14454. "additionalProperties": false
  14455. },
  14456. "required": false,
  14457. "style": "deepObject",
  14458. "explode": true
  14459. }
  14460. ],
  14461. "responses": {
  14462. "204": {
  14463. "description": "<No Content>"
  14464. },
  14465. "400": {
  14466. "description": "ProjectCopyError | InvalidRequestError",
  14467. "content": {
  14468. "application/json": {
  14469. "schema": {
  14470. "anyOf": [
  14471. {
  14472. "$ref": "#/components/schemas/ProjectCopyError"
  14473. },
  14474. {
  14475. "$ref": "#/components/schemas/InvalidRequestError"
  14476. }
  14477. ]
  14478. }
  14479. }
  14480. }
  14481. }
  14482. },
  14483. "requestBody": {
  14484. "content": {
  14485. "application/json": {
  14486. "schema": {
  14487. "type": "object",
  14488. "properties": {
  14489. "directory": {
  14490. "type": "string"
  14491. },
  14492. "force": {
  14493. "type": "boolean"
  14494. }
  14495. },
  14496. "required": ["directory", "force"],
  14497. "additionalProperties": false
  14498. }
  14499. }
  14500. }
  14501. },
  14502. "x-codeSamples": [
  14503. {
  14504. "lang": "js",
  14505. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14506. }
  14507. ]
  14508. }
  14509. },
  14510. "/experimental/project/{projectID}/copy/refresh": {
  14511. "post": {
  14512. "tags": ["projectCopy"],
  14513. "operationId": "v2.projectCopy.refresh",
  14514. "parameters": [
  14515. {
  14516. "name": "projectID",
  14517. "in": "path",
  14518. "schema": {
  14519. "type": "string"
  14520. },
  14521. "required": true
  14522. },
  14523. {
  14524. "name": "location",
  14525. "in": "query",
  14526. "schema": {
  14527. "type": "object",
  14528. "properties": {
  14529. "directory": {
  14530. "type": "string"
  14531. },
  14532. "workspace": {
  14533. "type": "string"
  14534. }
  14535. },
  14536. "additionalProperties": false
  14537. },
  14538. "required": false,
  14539. "style": "deepObject",
  14540. "explode": true
  14541. }
  14542. ],
  14543. "responses": {
  14544. "204": {
  14545. "description": "<No Content>"
  14546. },
  14547. "400": {
  14548. "description": "ProjectCopyError | InvalidRequestError",
  14549. "content": {
  14550. "application/json": {
  14551. "schema": {
  14552. "anyOf": [
  14553. {
  14554. "$ref": "#/components/schemas/ProjectCopyError"
  14555. },
  14556. {
  14557. "$ref": "#/components/schemas/InvalidRequestError"
  14558. }
  14559. ]
  14560. }
  14561. }
  14562. }
  14563. }
  14564. },
  14565. "x-codeSamples": [
  14566. {
  14567. "lang": "js",
  14568. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14569. }
  14570. ]
  14571. }
  14572. },
  14573. "/pty/{ptyID}/connect": {
  14574. "get": {
  14575. "tags": ["pty"],
  14576. "operationId": "pty.connect",
  14577. "parameters": [
  14578. {
  14579. "name": "ptyID",
  14580. "in": "path",
  14581. "schema": {
  14582. "type": "string",
  14583. "pattern": "^pty"
  14584. },
  14585. "required": true
  14586. },
  14587. {
  14588. "in": "query",
  14589. "name": "directory",
  14590. "schema": {
  14591. "type": "string"
  14592. }
  14593. },
  14594. {
  14595. "in": "query",
  14596. "name": "workspace",
  14597. "schema": {
  14598. "type": "string"
  14599. }
  14600. },
  14601. {
  14602. "in": "query",
  14603. "name": "cursor",
  14604. "schema": {
  14605. "type": "string"
  14606. }
  14607. },
  14608. {
  14609. "in": "query",
  14610. "name": "ticket",
  14611. "schema": {
  14612. "type": "string"
  14613. }
  14614. }
  14615. ],
  14616. "responses": {
  14617. "200": {
  14618. "description": "Connected session",
  14619. "content": {
  14620. "application/json": {
  14621. "schema": {
  14622. "type": "boolean",
  14623. "description": "Connected session"
  14624. }
  14625. }
  14626. }
  14627. },
  14628. "403": {
  14629. "description": "Forbidden",
  14630. "content": {
  14631. "application/json": {
  14632. "schema": {
  14633. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14634. }
  14635. }
  14636. }
  14637. },
  14638. "404": {
  14639. "description": "Not found",
  14640. "content": {
  14641. "application/json": {
  14642. "schema": {
  14643. "$ref": "#/components/schemas/NotFoundError"
  14644. }
  14645. }
  14646. }
  14647. }
  14648. },
  14649. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14650. "summary": "Connect to PTY session",
  14651. "x-codeSamples": [
  14652. {
  14653. "lang": "js",
  14654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14655. }
  14656. ]
  14657. }
  14658. }
  14659. },
  14660. "components": {
  14661. "schemas": {
  14662. "Event": {
  14663. "anyOf": [
  14664. {
  14665. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14666. },
  14667. {
  14668. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14669. },
  14670. {
  14671. "$ref": "#/components/schemas/EventCatalogUpdated"
  14672. },
  14673. {
  14674. "$ref": "#/components/schemas/EventSessionCreated"
  14675. },
  14676. {
  14677. "$ref": "#/components/schemas/EventSessionUpdated"
  14678. },
  14679. {
  14680. "$ref": "#/components/schemas/EventSessionDeleted"
  14681. },
  14682. {
  14683. "$ref": "#/components/schemas/EventMessageUpdated"
  14684. },
  14685. {
  14686. "$ref": "#/components/schemas/EventMessageRemoved"
  14687. },
  14688. {
  14689. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14690. },
  14691. {
  14692. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14693. },
  14694. {
  14695. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14696. },
  14697. {
  14698. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14699. },
  14700. {
  14701. "$ref": "#/components/schemas/EventSessionNextMoved"
  14702. },
  14703. {
  14704. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14705. },
  14706. {
  14707. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14708. },
  14709. {
  14710. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  14711. },
  14712. {
  14713. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  14714. },
  14715. {
  14716. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14717. },
  14718. {
  14719. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14720. },
  14721. {
  14722. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14723. },
  14724. {
  14725. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14726. },
  14727. {
  14728. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14729. },
  14730. {
  14731. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14732. },
  14733. {
  14734. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14735. },
  14736. {
  14737. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14738. },
  14739. {
  14740. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14741. },
  14742. {
  14743. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14744. },
  14745. {
  14746. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14747. },
  14748. {
  14749. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14750. },
  14751. {
  14752. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14753. },
  14754. {
  14755. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14756. },
  14757. {
  14758. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14759. },
  14760. {
  14761. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14762. },
  14763. {
  14764. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14765. },
  14766. {
  14767. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14768. },
  14769. {
  14770. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14771. },
  14772. {
  14773. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14774. },
  14775. {
  14776. "$ref": "#/components/schemas/EventSessionNextRetried"
  14777. },
  14778. {
  14779. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14780. },
  14781. {
  14782. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14783. },
  14784. {
  14785. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14786. },
  14787. {
  14788. "$ref": "#/components/schemas/EventMessagePartDelta"
  14789. },
  14790. {
  14791. "$ref": "#/components/schemas/EventSessionDiff"
  14792. },
  14793. {
  14794. "$ref": "#/components/schemas/EventSessionError"
  14795. },
  14796. {
  14797. "$ref": "#/components/schemas/EventInstallationUpdated"
  14798. },
  14799. {
  14800. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14801. },
  14802. {
  14803. "$ref": "#/components/schemas/EventFileEdited"
  14804. },
  14805. {
  14806. "$ref": "#/components/schemas/EventPluginAdded"
  14807. },
  14808. {
  14809. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14810. },
  14811. {
  14812. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14813. },
  14814. {
  14815. "$ref": "#/components/schemas/EventReferenceUpdated"
  14816. },
  14817. {
  14818. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14819. },
  14820. {
  14821. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14822. },
  14823. {
  14824. "$ref": "#/components/schemas/EventPtyCreated"
  14825. },
  14826. {
  14827. "$ref": "#/components/schemas/EventPtyUpdated"
  14828. },
  14829. {
  14830. "$ref": "#/components/schemas/EventPtyExited"
  14831. },
  14832. {
  14833. "$ref": "#/components/schemas/EventPtyDeleted"
  14834. },
  14835. {
  14836. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14837. },
  14838. {
  14839. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14840. },
  14841. {
  14842. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14843. },
  14844. {
  14845. "$ref": "#/components/schemas/EventTodoUpdated"
  14846. },
  14847. {
  14848. "$ref": "#/components/schemas/EventLspUpdated"
  14849. },
  14850. {
  14851. "$ref": "#/components/schemas/EventPermissionAsked"
  14852. },
  14853. {
  14854. "$ref": "#/components/schemas/EventPermissionReplied"
  14855. },
  14856. {
  14857. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14858. },
  14859. {
  14860. "$ref": "#/components/schemas/Event.tui.command.execute"
  14861. },
  14862. {
  14863. "$ref": "#/components/schemas/Event.tui.toast.show"
  14864. },
  14865. {
  14866. "$ref": "#/components/schemas/Event.tui.session.select"
  14867. },
  14868. {
  14869. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14870. },
  14871. {
  14872. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14873. },
  14874. {
  14875. "$ref": "#/components/schemas/EventCommandExecuted"
  14876. },
  14877. {
  14878. "$ref": "#/components/schemas/EventProjectUpdated"
  14879. },
  14880. {
  14881. "$ref": "#/components/schemas/EventSessionStatus"
  14882. },
  14883. {
  14884. "$ref": "#/components/schemas/EventSessionIdle"
  14885. },
  14886. {
  14887. "$ref": "#/components/schemas/EventQuestionAsked"
  14888. },
  14889. {
  14890. "$ref": "#/components/schemas/EventQuestionReplied"
  14891. },
  14892. {
  14893. "$ref": "#/components/schemas/EventQuestionRejected"
  14894. },
  14895. {
  14896. "$ref": "#/components/schemas/EventSessionCompacted"
  14897. },
  14898. {
  14899. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14900. },
  14901. {
  14902. "$ref": "#/components/schemas/EventWorkspaceReady"
  14903. },
  14904. {
  14905. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14906. },
  14907. {
  14908. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14909. },
  14910. {
  14911. "$ref": "#/components/schemas/EventWorktreeReady"
  14912. },
  14913. {
  14914. "$ref": "#/components/schemas/EventWorktreeFailed"
  14915. },
  14916. {
  14917. "$ref": "#/components/schemas/EventServerConnected"
  14918. },
  14919. {
  14920. "$ref": "#/components/schemas/EventGlobalDisposed"
  14921. },
  14922. {
  14923. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14924. }
  14925. ]
  14926. },
  14927. "QuestionReplied": {
  14928. "type": "object",
  14929. "properties": {
  14930. "sessionID": {
  14931. "type": "string",
  14932. "pattern": "^ses"
  14933. },
  14934. "requestID": {
  14935. "type": "string",
  14936. "pattern": "^que"
  14937. },
  14938. "answers": {
  14939. "type": "array",
  14940. "items": {
  14941. "$ref": "#/components/schemas/QuestionAnswer"
  14942. }
  14943. }
  14944. },
  14945. "required": ["sessionID", "requestID", "answers"],
  14946. "additionalProperties": false
  14947. },
  14948. "QuestionRejected": {
  14949. "type": "object",
  14950. "properties": {
  14951. "sessionID": {
  14952. "type": "string",
  14953. "pattern": "^ses"
  14954. },
  14955. "requestID": {
  14956. "type": "string",
  14957. "pattern": "^que"
  14958. }
  14959. },
  14960. "required": ["sessionID", "requestID"],
  14961. "additionalProperties": false
  14962. },
  14963. "OAuth": {
  14964. "type": "object",
  14965. "properties": {
  14966. "type": {
  14967. "type": "string",
  14968. "enum": ["oauth"]
  14969. },
  14970. "refresh": {
  14971. "type": "string"
  14972. },
  14973. "access": {
  14974. "type": "string"
  14975. },
  14976. "expires": {
  14977. "type": "integer",
  14978. "minimum": 0
  14979. },
  14980. "accountId": {
  14981. "type": "string"
  14982. },
  14983. "enterpriseUrl": {
  14984. "type": "string"
  14985. }
  14986. },
  14987. "required": ["type", "refresh", "access", "expires"],
  14988. "additionalProperties": false
  14989. },
  14990. "ApiAuth": {
  14991. "type": "object",
  14992. "properties": {
  14993. "type": {
  14994. "type": "string",
  14995. "enum": ["api"]
  14996. },
  14997. "key": {
  14998. "type": "string"
  14999. },
  15000. "metadata": {
  15001. "type": "object",
  15002. "additionalProperties": {
  15003. "type": "string"
  15004. }
  15005. }
  15006. },
  15007. "required": ["type", "key"],
  15008. "additionalProperties": false
  15009. },
  15010. "WellKnownAuth": {
  15011. "type": "object",
  15012. "properties": {
  15013. "type": {
  15014. "type": "string",
  15015. "enum": ["wellknown"]
  15016. },
  15017. "key": {
  15018. "type": "string"
  15019. },
  15020. "token": {
  15021. "type": "string"
  15022. }
  15023. },
  15024. "required": ["type", "key", "token"],
  15025. "additionalProperties": false
  15026. },
  15027. "Auth": {
  15028. "anyOf": [
  15029. {
  15030. "$ref": "#/components/schemas/OAuth"
  15031. },
  15032. {
  15033. "$ref": "#/components/schemas/ApiAuth"
  15034. },
  15035. {
  15036. "$ref": "#/components/schemas/WellKnownAuth"
  15037. }
  15038. ]
  15039. },
  15040. "effect_HttpApiError_BadRequest": {
  15041. "type": "object",
  15042. "properties": {
  15043. "_tag": {
  15044. "type": "string",
  15045. "enum": ["BadRequest"]
  15046. }
  15047. },
  15048. "required": ["_tag"],
  15049. "additionalProperties": false
  15050. },
  15051. "InvalidRequestError": {
  15052. "type": "object",
  15053. "properties": {
  15054. "_tag": {
  15055. "type": "string",
  15056. "enum": ["InvalidRequestError"]
  15057. },
  15058. "message": {
  15059. "type": "string"
  15060. },
  15061. "kind": {
  15062. "type": "string"
  15063. },
  15064. "field": {
  15065. "type": "string"
  15066. }
  15067. },
  15068. "required": ["_tag", "message"],
  15069. "additionalProperties": false
  15070. },
  15071. "MoveSessionError": {
  15072. "type": "object",
  15073. "properties": {
  15074. "name": {
  15075. "type": "string",
  15076. "enum": ["MoveSessionError"]
  15077. },
  15078. "data": {
  15079. "type": "object",
  15080. "properties": {
  15081. "message": {
  15082. "type": "string"
  15083. }
  15084. },
  15085. "required": ["message"],
  15086. "additionalProperties": false
  15087. }
  15088. },
  15089. "required": ["name", "data"],
  15090. "additionalProperties": false
  15091. },
  15092. "SnapshotFileDiff": {
  15093. "type": "object",
  15094. "properties": {
  15095. "file": {
  15096. "type": "string"
  15097. },
  15098. "patch": {
  15099. "type": "string"
  15100. },
  15101. "additions": {
  15102. "type": "number"
  15103. },
  15104. "deletions": {
  15105. "type": "number"
  15106. },
  15107. "status": {
  15108. "type": "string",
  15109. "enum": ["added", "deleted", "modified"]
  15110. }
  15111. },
  15112. "required": ["additions", "deletions"],
  15113. "additionalProperties": false
  15114. },
  15115. "PermissionAction": {
  15116. "type": "string",
  15117. "enum": ["allow", "deny", "ask"]
  15118. },
  15119. "PermissionRule": {
  15120. "type": "object",
  15121. "properties": {
  15122. "permission": {
  15123. "type": "string"
  15124. },
  15125. "pattern": {
  15126. "type": "string"
  15127. },
  15128. "action": {
  15129. "$ref": "#/components/schemas/PermissionAction"
  15130. }
  15131. },
  15132. "required": ["permission", "pattern", "action"],
  15133. "additionalProperties": false
  15134. },
  15135. "PermissionRuleset": {
  15136. "type": "array",
  15137. "items": {
  15138. "$ref": "#/components/schemas/PermissionRule"
  15139. }
  15140. },
  15141. "Session": {
  15142. "type": "object",
  15143. "properties": {
  15144. "id": {
  15145. "type": "string",
  15146. "pattern": "^ses"
  15147. },
  15148. "slug": {
  15149. "type": "string"
  15150. },
  15151. "projectID": {
  15152. "type": "string"
  15153. },
  15154. "workspaceID": {
  15155. "type": "string",
  15156. "pattern": "^wrk"
  15157. },
  15158. "directory": {
  15159. "type": "string"
  15160. },
  15161. "path": {
  15162. "type": "string"
  15163. },
  15164. "parentID": {
  15165. "type": "string",
  15166. "pattern": "^ses"
  15167. },
  15168. "summary": {
  15169. "type": "object",
  15170. "properties": {
  15171. "additions": {
  15172. "type": "number"
  15173. },
  15174. "deletions": {
  15175. "type": "number"
  15176. },
  15177. "files": {
  15178. "type": "number"
  15179. },
  15180. "diffs": {
  15181. "type": "array",
  15182. "items": {
  15183. "$ref": "#/components/schemas/SnapshotFileDiff"
  15184. }
  15185. }
  15186. },
  15187. "required": ["additions", "deletions", "files"],
  15188. "additionalProperties": false
  15189. },
  15190. "cost": {
  15191. "type": "number"
  15192. },
  15193. "tokens": {
  15194. "type": "object",
  15195. "properties": {
  15196. "input": {
  15197. "type": "number"
  15198. },
  15199. "output": {
  15200. "type": "number"
  15201. },
  15202. "reasoning": {
  15203. "type": "number"
  15204. },
  15205. "cache": {
  15206. "type": "object",
  15207. "properties": {
  15208. "read": {
  15209. "type": "number"
  15210. },
  15211. "write": {
  15212. "type": "number"
  15213. }
  15214. },
  15215. "required": ["read", "write"],
  15216. "additionalProperties": false
  15217. }
  15218. },
  15219. "required": ["input", "output", "reasoning", "cache"],
  15220. "additionalProperties": false
  15221. },
  15222. "share": {
  15223. "type": "object",
  15224. "properties": {
  15225. "url": {
  15226. "type": "string"
  15227. }
  15228. },
  15229. "required": ["url"],
  15230. "additionalProperties": false
  15231. },
  15232. "title": {
  15233. "type": "string"
  15234. },
  15235. "agent": {
  15236. "type": "string"
  15237. },
  15238. "model": {
  15239. "type": "object",
  15240. "properties": {
  15241. "id": {
  15242. "type": "string"
  15243. },
  15244. "providerID": {
  15245. "type": "string"
  15246. },
  15247. "variant": {
  15248. "type": "string"
  15249. }
  15250. },
  15251. "required": ["id", "providerID"],
  15252. "additionalProperties": false
  15253. },
  15254. "version": {
  15255. "type": "string"
  15256. },
  15257. "metadata": {
  15258. "type": "object"
  15259. },
  15260. "time": {
  15261. "type": "object",
  15262. "properties": {
  15263. "created": {
  15264. "type": "integer",
  15265. "minimum": 0
  15266. },
  15267. "updated": {
  15268. "type": "integer",
  15269. "minimum": 0
  15270. },
  15271. "compacting": {
  15272. "type": "integer",
  15273. "minimum": 0
  15274. },
  15275. "archived": {
  15276. "type": "number"
  15277. }
  15278. },
  15279. "required": ["created", "updated"],
  15280. "additionalProperties": false
  15281. },
  15282. "permission": {
  15283. "$ref": "#/components/schemas/PermissionRuleset"
  15284. },
  15285. "revert": {
  15286. "type": "object",
  15287. "properties": {
  15288. "messageID": {
  15289. "type": "string",
  15290. "pattern": "^msg"
  15291. },
  15292. "partID": {
  15293. "type": "string",
  15294. "pattern": "^prt"
  15295. },
  15296. "snapshot": {
  15297. "type": "string"
  15298. },
  15299. "diff": {
  15300. "type": "string"
  15301. }
  15302. },
  15303. "required": ["messageID"],
  15304. "additionalProperties": false
  15305. }
  15306. },
  15307. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15308. "additionalProperties": false
  15309. },
  15310. "OutputFormatText": {
  15311. "type": "object",
  15312. "properties": {
  15313. "type": {
  15314. "type": "string",
  15315. "enum": ["text"]
  15316. }
  15317. },
  15318. "required": ["type"],
  15319. "additionalProperties": false
  15320. },
  15321. "JSONSchema": {
  15322. "type": "object"
  15323. },
  15324. "OutputFormatJsonSchema": {
  15325. "type": "object",
  15326. "properties": {
  15327. "type": {
  15328. "type": "string",
  15329. "enum": ["json_schema"]
  15330. },
  15331. "schema": {
  15332. "$ref": "#/components/schemas/JSONSchema"
  15333. },
  15334. "retryCount": {
  15335. "type": "integer",
  15336. "minimum": 0
  15337. }
  15338. },
  15339. "required": ["type", "schema"],
  15340. "additionalProperties": false
  15341. },
  15342. "OutputFormat": {
  15343. "anyOf": [
  15344. {
  15345. "$ref": "#/components/schemas/OutputFormatText"
  15346. },
  15347. {
  15348. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15349. }
  15350. ]
  15351. },
  15352. "UserMessage": {
  15353. "type": "object",
  15354. "properties": {
  15355. "id": {
  15356. "type": "string",
  15357. "pattern": "^msg"
  15358. },
  15359. "sessionID": {
  15360. "type": "string",
  15361. "pattern": "^ses"
  15362. },
  15363. "role": {
  15364. "type": "string",
  15365. "enum": ["user"]
  15366. },
  15367. "time": {
  15368. "type": "object",
  15369. "properties": {
  15370. "created": {
  15371. "type": "number",
  15372. "minimum": 0
  15373. }
  15374. },
  15375. "required": ["created"],
  15376. "additionalProperties": false
  15377. },
  15378. "format": {
  15379. "$ref": "#/components/schemas/OutputFormat"
  15380. },
  15381. "summary": {
  15382. "type": "object",
  15383. "properties": {
  15384. "title": {
  15385. "type": "string"
  15386. },
  15387. "body": {
  15388. "type": "string"
  15389. },
  15390. "diffs": {
  15391. "type": "array",
  15392. "items": {
  15393. "$ref": "#/components/schemas/SnapshotFileDiff"
  15394. }
  15395. }
  15396. },
  15397. "required": ["diffs"],
  15398. "additionalProperties": false
  15399. },
  15400. "agent": {
  15401. "type": "string"
  15402. },
  15403. "model": {
  15404. "type": "object",
  15405. "properties": {
  15406. "providerID": {
  15407. "type": "string"
  15408. },
  15409. "modelID": {
  15410. "type": "string"
  15411. },
  15412. "variant": {
  15413. "type": "string"
  15414. }
  15415. },
  15416. "required": ["providerID", "modelID"],
  15417. "additionalProperties": false
  15418. },
  15419. "system": {
  15420. "type": "string"
  15421. },
  15422. "tools": {
  15423. "type": "object",
  15424. "additionalProperties": {
  15425. "type": "boolean"
  15426. }
  15427. }
  15428. },
  15429. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15430. "additionalProperties": false
  15431. },
  15432. "ProviderAuthError": {
  15433. "type": "object",
  15434. "properties": {
  15435. "name": {
  15436. "type": "string",
  15437. "enum": ["ProviderAuthError"]
  15438. },
  15439. "data": {
  15440. "type": "object",
  15441. "properties": {
  15442. "providerID": {
  15443. "type": "string"
  15444. },
  15445. "message": {
  15446. "type": "string"
  15447. }
  15448. },
  15449. "required": ["providerID", "message"],
  15450. "additionalProperties": false
  15451. }
  15452. },
  15453. "required": ["name", "data"],
  15454. "additionalProperties": false
  15455. },
  15456. "UnknownError": {
  15457. "type": "object",
  15458. "properties": {
  15459. "name": {
  15460. "type": "string",
  15461. "enum": ["UnknownError"]
  15462. },
  15463. "data": {
  15464. "type": "object",
  15465. "properties": {
  15466. "message": {
  15467. "type": "string"
  15468. },
  15469. "ref": {
  15470. "type": "string"
  15471. }
  15472. },
  15473. "required": ["message"],
  15474. "additionalProperties": false
  15475. }
  15476. },
  15477. "required": ["name", "data"],
  15478. "additionalProperties": false
  15479. },
  15480. "MessageOutputLengthError": {
  15481. "type": "object",
  15482. "properties": {
  15483. "name": {
  15484. "type": "string",
  15485. "enum": ["MessageOutputLengthError"]
  15486. },
  15487. "data": {
  15488. "type": "object",
  15489. "properties": {}
  15490. }
  15491. },
  15492. "required": ["name", "data"],
  15493. "additionalProperties": false
  15494. },
  15495. "MessageAbortedError": {
  15496. "type": "object",
  15497. "properties": {
  15498. "name": {
  15499. "type": "string",
  15500. "enum": ["MessageAbortedError"]
  15501. },
  15502. "data": {
  15503. "type": "object",
  15504. "properties": {
  15505. "message": {
  15506. "type": "string"
  15507. }
  15508. },
  15509. "required": ["message"],
  15510. "additionalProperties": false
  15511. }
  15512. },
  15513. "required": ["name", "data"],
  15514. "additionalProperties": false
  15515. },
  15516. "StructuredOutputError": {
  15517. "type": "object",
  15518. "properties": {
  15519. "name": {
  15520. "type": "string",
  15521. "enum": ["StructuredOutputError"]
  15522. },
  15523. "data": {
  15524. "type": "object",
  15525. "properties": {
  15526. "message": {
  15527. "type": "string"
  15528. },
  15529. "retries": {
  15530. "type": "integer",
  15531. "minimum": 0
  15532. }
  15533. },
  15534. "required": ["message", "retries"],
  15535. "additionalProperties": false
  15536. }
  15537. },
  15538. "required": ["name", "data"],
  15539. "additionalProperties": false
  15540. },
  15541. "ContextOverflowError": {
  15542. "type": "object",
  15543. "properties": {
  15544. "name": {
  15545. "type": "string",
  15546. "enum": ["ContextOverflowError"]
  15547. },
  15548. "data": {
  15549. "type": "object",
  15550. "properties": {
  15551. "message": {
  15552. "type": "string"
  15553. },
  15554. "responseBody": {
  15555. "type": "string"
  15556. }
  15557. },
  15558. "required": ["message"],
  15559. "additionalProperties": false
  15560. }
  15561. },
  15562. "required": ["name", "data"],
  15563. "additionalProperties": false
  15564. },
  15565. "ContentFilterError": {
  15566. "type": "object",
  15567. "properties": {
  15568. "name": {
  15569. "type": "string",
  15570. "enum": ["ContentFilterError"]
  15571. },
  15572. "data": {
  15573. "type": "object",
  15574. "properties": {
  15575. "message": {
  15576. "type": "string"
  15577. }
  15578. },
  15579. "required": ["message"],
  15580. "additionalProperties": false
  15581. }
  15582. },
  15583. "required": ["name", "data"],
  15584. "additionalProperties": false
  15585. },
  15586. "APIError": {
  15587. "type": "object",
  15588. "properties": {
  15589. "name": {
  15590. "type": "string",
  15591. "enum": ["APIError"]
  15592. },
  15593. "data": {
  15594. "type": "object",
  15595. "properties": {
  15596. "message": {
  15597. "type": "string"
  15598. },
  15599. "statusCode": {
  15600. "type": "integer",
  15601. "minimum": 0
  15602. },
  15603. "isRetryable": {
  15604. "type": "boolean"
  15605. },
  15606. "responseHeaders": {
  15607. "type": "object",
  15608. "additionalProperties": {
  15609. "type": "string"
  15610. }
  15611. },
  15612. "responseBody": {
  15613. "type": "string"
  15614. },
  15615. "metadata": {
  15616. "type": "object",
  15617. "additionalProperties": {
  15618. "type": "string"
  15619. }
  15620. }
  15621. },
  15622. "required": ["message", "isRetryable"],
  15623. "additionalProperties": false
  15624. }
  15625. },
  15626. "required": ["name", "data"],
  15627. "additionalProperties": false
  15628. },
  15629. "AssistantMessage": {
  15630. "type": "object",
  15631. "properties": {
  15632. "id": {
  15633. "type": "string",
  15634. "pattern": "^msg"
  15635. },
  15636. "sessionID": {
  15637. "type": "string",
  15638. "pattern": "^ses"
  15639. },
  15640. "role": {
  15641. "type": "string",
  15642. "enum": ["assistant"]
  15643. },
  15644. "time": {
  15645. "type": "object",
  15646. "properties": {
  15647. "created": {
  15648. "type": "integer",
  15649. "minimum": 0
  15650. },
  15651. "completed": {
  15652. "type": "integer",
  15653. "minimum": 0
  15654. }
  15655. },
  15656. "required": ["created"],
  15657. "additionalProperties": false
  15658. },
  15659. "error": {
  15660. "anyOf": [
  15661. {
  15662. "$ref": "#/components/schemas/ProviderAuthError"
  15663. },
  15664. {
  15665. "$ref": "#/components/schemas/UnknownError"
  15666. },
  15667. {
  15668. "$ref": "#/components/schemas/MessageOutputLengthError"
  15669. },
  15670. {
  15671. "$ref": "#/components/schemas/MessageAbortedError"
  15672. },
  15673. {
  15674. "$ref": "#/components/schemas/StructuredOutputError"
  15675. },
  15676. {
  15677. "$ref": "#/components/schemas/ContextOverflowError"
  15678. },
  15679. {
  15680. "$ref": "#/components/schemas/ContentFilterError"
  15681. },
  15682. {
  15683. "$ref": "#/components/schemas/APIError"
  15684. }
  15685. ]
  15686. },
  15687. "parentID": {
  15688. "type": "string",
  15689. "pattern": "^msg"
  15690. },
  15691. "modelID": {
  15692. "type": "string"
  15693. },
  15694. "providerID": {
  15695. "type": "string"
  15696. },
  15697. "mode": {
  15698. "type": "string"
  15699. },
  15700. "agent": {
  15701. "type": "string"
  15702. },
  15703. "path": {
  15704. "type": "object",
  15705. "properties": {
  15706. "cwd": {
  15707. "type": "string"
  15708. },
  15709. "root": {
  15710. "type": "string"
  15711. }
  15712. },
  15713. "required": ["cwd", "root"],
  15714. "additionalProperties": false
  15715. },
  15716. "summary": {
  15717. "type": "boolean"
  15718. },
  15719. "cost": {
  15720. "type": "number"
  15721. },
  15722. "tokens": {
  15723. "type": "object",
  15724. "properties": {
  15725. "total": {
  15726. "type": "number"
  15727. },
  15728. "input": {
  15729. "type": "number"
  15730. },
  15731. "output": {
  15732. "type": "number"
  15733. },
  15734. "reasoning": {
  15735. "type": "number"
  15736. },
  15737. "cache": {
  15738. "type": "object",
  15739. "properties": {
  15740. "read": {
  15741. "type": "number"
  15742. },
  15743. "write": {
  15744. "type": "number"
  15745. }
  15746. },
  15747. "required": ["read", "write"],
  15748. "additionalProperties": false
  15749. }
  15750. },
  15751. "required": ["input", "output", "reasoning", "cache"],
  15752. "additionalProperties": false
  15753. },
  15754. "structured": {},
  15755. "variant": {
  15756. "type": "string"
  15757. },
  15758. "finish": {
  15759. "type": "string"
  15760. }
  15761. },
  15762. "required": [
  15763. "id",
  15764. "sessionID",
  15765. "role",
  15766. "time",
  15767. "parentID",
  15768. "modelID",
  15769. "providerID",
  15770. "mode",
  15771. "agent",
  15772. "path",
  15773. "cost",
  15774. "tokens"
  15775. ],
  15776. "additionalProperties": false
  15777. },
  15778. "Message": {
  15779. "anyOf": [
  15780. {
  15781. "$ref": "#/components/schemas/UserMessage"
  15782. },
  15783. {
  15784. "$ref": "#/components/schemas/AssistantMessage"
  15785. }
  15786. ]
  15787. },
  15788. "TextPart": {
  15789. "type": "object",
  15790. "properties": {
  15791. "id": {
  15792. "type": "string",
  15793. "pattern": "^prt"
  15794. },
  15795. "sessionID": {
  15796. "type": "string",
  15797. "pattern": "^ses"
  15798. },
  15799. "messageID": {
  15800. "type": "string",
  15801. "pattern": "^msg"
  15802. },
  15803. "type": {
  15804. "type": "string",
  15805. "enum": ["text"]
  15806. },
  15807. "text": {
  15808. "type": "string"
  15809. },
  15810. "synthetic": {
  15811. "type": "boolean"
  15812. },
  15813. "ignored": {
  15814. "type": "boolean"
  15815. },
  15816. "time": {
  15817. "type": "object",
  15818. "properties": {
  15819. "start": {
  15820. "type": "integer",
  15821. "minimum": 0
  15822. },
  15823. "end": {
  15824. "type": "integer",
  15825. "minimum": 0
  15826. }
  15827. },
  15828. "required": ["start"],
  15829. "additionalProperties": false
  15830. },
  15831. "metadata": {
  15832. "type": "object"
  15833. }
  15834. },
  15835. "required": ["id", "sessionID", "messageID", "type", "text"],
  15836. "additionalProperties": false
  15837. },
  15838. "SubtaskPart": {
  15839. "type": "object",
  15840. "properties": {
  15841. "id": {
  15842. "type": "string",
  15843. "pattern": "^prt"
  15844. },
  15845. "sessionID": {
  15846. "type": "string",
  15847. "pattern": "^ses"
  15848. },
  15849. "messageID": {
  15850. "type": "string",
  15851. "pattern": "^msg"
  15852. },
  15853. "type": {
  15854. "type": "string",
  15855. "enum": ["subtask"]
  15856. },
  15857. "prompt": {
  15858. "type": "string"
  15859. },
  15860. "description": {
  15861. "type": "string"
  15862. },
  15863. "agent": {
  15864. "type": "string"
  15865. },
  15866. "model": {
  15867. "type": "object",
  15868. "properties": {
  15869. "providerID": {
  15870. "type": "string"
  15871. },
  15872. "modelID": {
  15873. "type": "string"
  15874. }
  15875. },
  15876. "required": ["providerID", "modelID"],
  15877. "additionalProperties": false
  15878. },
  15879. "command": {
  15880. "type": "string"
  15881. }
  15882. },
  15883. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15884. "additionalProperties": false
  15885. },
  15886. "ReasoningPart": {
  15887. "type": "object",
  15888. "properties": {
  15889. "id": {
  15890. "type": "string",
  15891. "pattern": "^prt"
  15892. },
  15893. "sessionID": {
  15894. "type": "string",
  15895. "pattern": "^ses"
  15896. },
  15897. "messageID": {
  15898. "type": "string",
  15899. "pattern": "^msg"
  15900. },
  15901. "type": {
  15902. "type": "string",
  15903. "enum": ["reasoning"]
  15904. },
  15905. "text": {
  15906. "type": "string"
  15907. },
  15908. "metadata": {
  15909. "type": "object"
  15910. },
  15911. "time": {
  15912. "type": "object",
  15913. "properties": {
  15914. "start": {
  15915. "type": "integer",
  15916. "minimum": 0
  15917. },
  15918. "end": {
  15919. "type": "integer",
  15920. "minimum": 0
  15921. }
  15922. },
  15923. "required": ["start"],
  15924. "additionalProperties": false
  15925. }
  15926. },
  15927. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15928. "additionalProperties": false
  15929. },
  15930. "FilePartSourceText": {
  15931. "type": "object",
  15932. "properties": {
  15933. "value": {
  15934. "type": "string"
  15935. },
  15936. "start": {
  15937. "type": "number"
  15938. },
  15939. "end": {
  15940. "type": "number"
  15941. }
  15942. },
  15943. "required": ["value", "start", "end"],
  15944. "additionalProperties": false
  15945. },
  15946. "FileSource": {
  15947. "type": "object",
  15948. "properties": {
  15949. "text": {
  15950. "$ref": "#/components/schemas/FilePartSourceText"
  15951. },
  15952. "type": {
  15953. "type": "string",
  15954. "enum": ["file"]
  15955. },
  15956. "path": {
  15957. "type": "string"
  15958. }
  15959. },
  15960. "required": ["text", "type", "path"],
  15961. "additionalProperties": false
  15962. },
  15963. "Range": {
  15964. "type": "object",
  15965. "properties": {
  15966. "start": {
  15967. "type": "object",
  15968. "properties": {
  15969. "line": {
  15970. "type": "integer",
  15971. "minimum": 0
  15972. },
  15973. "character": {
  15974. "type": "integer",
  15975. "minimum": 0
  15976. }
  15977. },
  15978. "required": ["line", "character"],
  15979. "additionalProperties": false
  15980. },
  15981. "end": {
  15982. "type": "object",
  15983. "properties": {
  15984. "line": {
  15985. "type": "integer",
  15986. "minimum": 0
  15987. },
  15988. "character": {
  15989. "type": "integer",
  15990. "minimum": 0
  15991. }
  15992. },
  15993. "required": ["line", "character"],
  15994. "additionalProperties": false
  15995. }
  15996. },
  15997. "required": ["start", "end"],
  15998. "additionalProperties": false
  15999. },
  16000. "SymbolSource": {
  16001. "type": "object",
  16002. "properties": {
  16003. "text": {
  16004. "$ref": "#/components/schemas/FilePartSourceText"
  16005. },
  16006. "type": {
  16007. "type": "string",
  16008. "enum": ["symbol"]
  16009. },
  16010. "path": {
  16011. "type": "string"
  16012. },
  16013. "range": {
  16014. "$ref": "#/components/schemas/Range"
  16015. },
  16016. "name": {
  16017. "type": "string"
  16018. },
  16019. "kind": {
  16020. "type": "integer",
  16021. "minimum": 0
  16022. }
  16023. },
  16024. "required": ["text", "type", "path", "range", "name", "kind"],
  16025. "additionalProperties": false
  16026. },
  16027. "ResourceSource": {
  16028. "type": "object",
  16029. "properties": {
  16030. "text": {
  16031. "$ref": "#/components/schemas/FilePartSourceText"
  16032. },
  16033. "type": {
  16034. "type": "string",
  16035. "enum": ["resource"]
  16036. },
  16037. "clientName": {
  16038. "type": "string"
  16039. },
  16040. "uri": {
  16041. "type": "string"
  16042. }
  16043. },
  16044. "required": ["text", "type", "clientName", "uri"],
  16045. "additionalProperties": false
  16046. },
  16047. "FilePartSource": {
  16048. "anyOf": [
  16049. {
  16050. "$ref": "#/components/schemas/FileSource"
  16051. },
  16052. {
  16053. "$ref": "#/components/schemas/SymbolSource"
  16054. },
  16055. {
  16056. "$ref": "#/components/schemas/ResourceSource"
  16057. }
  16058. ]
  16059. },
  16060. "FilePart": {
  16061. "type": "object",
  16062. "properties": {
  16063. "id": {
  16064. "type": "string",
  16065. "pattern": "^prt"
  16066. },
  16067. "sessionID": {
  16068. "type": "string",
  16069. "pattern": "^ses"
  16070. },
  16071. "messageID": {
  16072. "type": "string",
  16073. "pattern": "^msg"
  16074. },
  16075. "type": {
  16076. "type": "string",
  16077. "enum": ["file"]
  16078. },
  16079. "mime": {
  16080. "type": "string"
  16081. },
  16082. "filename": {
  16083. "type": "string"
  16084. },
  16085. "url": {
  16086. "type": "string"
  16087. },
  16088. "source": {
  16089. "$ref": "#/components/schemas/FilePartSource"
  16090. }
  16091. },
  16092. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16093. "additionalProperties": false
  16094. },
  16095. "ToolStatePending": {
  16096. "type": "object",
  16097. "properties": {
  16098. "status": {
  16099. "type": "string",
  16100. "enum": ["pending"]
  16101. },
  16102. "input": {
  16103. "type": "object"
  16104. },
  16105. "raw": {
  16106. "type": "string"
  16107. }
  16108. },
  16109. "required": ["status", "input", "raw"],
  16110. "additionalProperties": false
  16111. },
  16112. "ToolStateRunning": {
  16113. "type": "object",
  16114. "properties": {
  16115. "status": {
  16116. "type": "string",
  16117. "enum": ["running"]
  16118. },
  16119. "input": {
  16120. "type": "object"
  16121. },
  16122. "title": {
  16123. "type": "string"
  16124. },
  16125. "metadata": {
  16126. "type": "object"
  16127. },
  16128. "time": {
  16129. "type": "object",
  16130. "properties": {
  16131. "start": {
  16132. "type": "integer",
  16133. "minimum": 0
  16134. }
  16135. },
  16136. "required": ["start"],
  16137. "additionalProperties": false
  16138. }
  16139. },
  16140. "required": ["status", "input", "time"],
  16141. "additionalProperties": false
  16142. },
  16143. "ToolStateCompleted": {
  16144. "type": "object",
  16145. "properties": {
  16146. "status": {
  16147. "type": "string",
  16148. "enum": ["completed"]
  16149. },
  16150. "input": {
  16151. "type": "object"
  16152. },
  16153. "output": {
  16154. "type": "string"
  16155. },
  16156. "title": {
  16157. "type": "string"
  16158. },
  16159. "metadata": {
  16160. "type": "object"
  16161. },
  16162. "time": {
  16163. "type": "object",
  16164. "properties": {
  16165. "start": {
  16166. "type": "integer",
  16167. "minimum": 0
  16168. },
  16169. "end": {
  16170. "type": "integer",
  16171. "minimum": 0
  16172. },
  16173. "compacted": {
  16174. "type": "integer",
  16175. "minimum": 0
  16176. }
  16177. },
  16178. "required": ["start", "end"],
  16179. "additionalProperties": false
  16180. },
  16181. "attachments": {
  16182. "type": "array",
  16183. "items": {
  16184. "$ref": "#/components/schemas/FilePart"
  16185. }
  16186. }
  16187. },
  16188. "required": ["status", "input", "output", "title", "metadata", "time"],
  16189. "additionalProperties": false
  16190. },
  16191. "ToolStateError": {
  16192. "type": "object",
  16193. "properties": {
  16194. "status": {
  16195. "type": "string",
  16196. "enum": ["error"]
  16197. },
  16198. "input": {
  16199. "type": "object"
  16200. },
  16201. "error": {
  16202. "type": "string"
  16203. },
  16204. "metadata": {
  16205. "type": "object"
  16206. },
  16207. "time": {
  16208. "type": "object",
  16209. "properties": {
  16210. "start": {
  16211. "type": "integer",
  16212. "minimum": 0
  16213. },
  16214. "end": {
  16215. "type": "integer",
  16216. "minimum": 0
  16217. }
  16218. },
  16219. "required": ["start", "end"],
  16220. "additionalProperties": false
  16221. }
  16222. },
  16223. "required": ["status", "input", "error", "time"],
  16224. "additionalProperties": false
  16225. },
  16226. "ToolState": {
  16227. "anyOf": [
  16228. {
  16229. "$ref": "#/components/schemas/ToolStatePending"
  16230. },
  16231. {
  16232. "$ref": "#/components/schemas/ToolStateRunning"
  16233. },
  16234. {
  16235. "$ref": "#/components/schemas/ToolStateCompleted"
  16236. },
  16237. {
  16238. "$ref": "#/components/schemas/ToolStateError"
  16239. }
  16240. ]
  16241. },
  16242. "ToolPart": {
  16243. "type": "object",
  16244. "properties": {
  16245. "id": {
  16246. "type": "string",
  16247. "pattern": "^prt"
  16248. },
  16249. "sessionID": {
  16250. "type": "string",
  16251. "pattern": "^ses"
  16252. },
  16253. "messageID": {
  16254. "type": "string",
  16255. "pattern": "^msg"
  16256. },
  16257. "type": {
  16258. "type": "string",
  16259. "enum": ["tool"]
  16260. },
  16261. "callID": {
  16262. "type": "string"
  16263. },
  16264. "tool": {
  16265. "type": "string"
  16266. },
  16267. "state": {
  16268. "$ref": "#/components/schemas/ToolState"
  16269. },
  16270. "metadata": {
  16271. "type": "object"
  16272. }
  16273. },
  16274. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16275. "additionalProperties": false
  16276. },
  16277. "StepStartPart": {
  16278. "type": "object",
  16279. "properties": {
  16280. "id": {
  16281. "type": "string",
  16282. "pattern": "^prt"
  16283. },
  16284. "sessionID": {
  16285. "type": "string",
  16286. "pattern": "^ses"
  16287. },
  16288. "messageID": {
  16289. "type": "string",
  16290. "pattern": "^msg"
  16291. },
  16292. "type": {
  16293. "type": "string",
  16294. "enum": ["step-start"]
  16295. },
  16296. "snapshot": {
  16297. "type": "string"
  16298. }
  16299. },
  16300. "required": ["id", "sessionID", "messageID", "type"],
  16301. "additionalProperties": false
  16302. },
  16303. "StepFinishPart": {
  16304. "type": "object",
  16305. "properties": {
  16306. "id": {
  16307. "type": "string",
  16308. "pattern": "^prt"
  16309. },
  16310. "sessionID": {
  16311. "type": "string",
  16312. "pattern": "^ses"
  16313. },
  16314. "messageID": {
  16315. "type": "string",
  16316. "pattern": "^msg"
  16317. },
  16318. "type": {
  16319. "type": "string",
  16320. "enum": ["step-finish"]
  16321. },
  16322. "reason": {
  16323. "type": "string"
  16324. },
  16325. "snapshot": {
  16326. "type": "string"
  16327. },
  16328. "cost": {
  16329. "type": "number"
  16330. },
  16331. "tokens": {
  16332. "type": "object",
  16333. "properties": {
  16334. "total": {
  16335. "type": "number"
  16336. },
  16337. "input": {
  16338. "type": "number"
  16339. },
  16340. "output": {
  16341. "type": "number"
  16342. },
  16343. "reasoning": {
  16344. "type": "number"
  16345. },
  16346. "cache": {
  16347. "type": "object",
  16348. "properties": {
  16349. "read": {
  16350. "type": "number"
  16351. },
  16352. "write": {
  16353. "type": "number"
  16354. }
  16355. },
  16356. "required": ["read", "write"],
  16357. "additionalProperties": false
  16358. }
  16359. },
  16360. "required": ["input", "output", "reasoning", "cache"],
  16361. "additionalProperties": false
  16362. }
  16363. },
  16364. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16365. "additionalProperties": false
  16366. },
  16367. "SnapshotPart": {
  16368. "type": "object",
  16369. "properties": {
  16370. "id": {
  16371. "type": "string",
  16372. "pattern": "^prt"
  16373. },
  16374. "sessionID": {
  16375. "type": "string",
  16376. "pattern": "^ses"
  16377. },
  16378. "messageID": {
  16379. "type": "string",
  16380. "pattern": "^msg"
  16381. },
  16382. "type": {
  16383. "type": "string",
  16384. "enum": ["snapshot"]
  16385. },
  16386. "snapshot": {
  16387. "type": "string"
  16388. }
  16389. },
  16390. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16391. "additionalProperties": false
  16392. },
  16393. "PatchPart": {
  16394. "type": "object",
  16395. "properties": {
  16396. "id": {
  16397. "type": "string",
  16398. "pattern": "^prt"
  16399. },
  16400. "sessionID": {
  16401. "type": "string",
  16402. "pattern": "^ses"
  16403. },
  16404. "messageID": {
  16405. "type": "string",
  16406. "pattern": "^msg"
  16407. },
  16408. "type": {
  16409. "type": "string",
  16410. "enum": ["patch"]
  16411. },
  16412. "hash": {
  16413. "type": "string"
  16414. },
  16415. "files": {
  16416. "type": "array",
  16417. "items": {
  16418. "type": "string"
  16419. }
  16420. }
  16421. },
  16422. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16423. "additionalProperties": false
  16424. },
  16425. "AgentPart": {
  16426. "type": "object",
  16427. "properties": {
  16428. "id": {
  16429. "type": "string",
  16430. "pattern": "^prt"
  16431. },
  16432. "sessionID": {
  16433. "type": "string",
  16434. "pattern": "^ses"
  16435. },
  16436. "messageID": {
  16437. "type": "string",
  16438. "pattern": "^msg"
  16439. },
  16440. "type": {
  16441. "type": "string",
  16442. "enum": ["agent"]
  16443. },
  16444. "name": {
  16445. "type": "string"
  16446. },
  16447. "source": {
  16448. "type": "object",
  16449. "properties": {
  16450. "value": {
  16451. "type": "string"
  16452. },
  16453. "start": {
  16454. "type": "integer",
  16455. "minimum": 0
  16456. },
  16457. "end": {
  16458. "type": "integer",
  16459. "minimum": 0
  16460. }
  16461. },
  16462. "required": ["value", "start", "end"],
  16463. "additionalProperties": false
  16464. }
  16465. },
  16466. "required": ["id", "sessionID", "messageID", "type", "name"],
  16467. "additionalProperties": false
  16468. },
  16469. "RetryPart": {
  16470. "type": "object",
  16471. "properties": {
  16472. "id": {
  16473. "type": "string",
  16474. "pattern": "^prt"
  16475. },
  16476. "sessionID": {
  16477. "type": "string",
  16478. "pattern": "^ses"
  16479. },
  16480. "messageID": {
  16481. "type": "string",
  16482. "pattern": "^msg"
  16483. },
  16484. "type": {
  16485. "type": "string",
  16486. "enum": ["retry"]
  16487. },
  16488. "attempt": {
  16489. "type": "integer",
  16490. "minimum": 0
  16491. },
  16492. "error": {
  16493. "$ref": "#/components/schemas/APIError"
  16494. },
  16495. "time": {
  16496. "type": "object",
  16497. "properties": {
  16498. "created": {
  16499. "type": "integer",
  16500. "minimum": 0
  16501. }
  16502. },
  16503. "required": ["created"],
  16504. "additionalProperties": false
  16505. }
  16506. },
  16507. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16508. "additionalProperties": false
  16509. },
  16510. "CompactionPart": {
  16511. "type": "object",
  16512. "properties": {
  16513. "id": {
  16514. "type": "string",
  16515. "pattern": "^prt"
  16516. },
  16517. "sessionID": {
  16518. "type": "string",
  16519. "pattern": "^ses"
  16520. },
  16521. "messageID": {
  16522. "type": "string",
  16523. "pattern": "^msg"
  16524. },
  16525. "type": {
  16526. "type": "string",
  16527. "enum": ["compaction"]
  16528. },
  16529. "auto": {
  16530. "type": "boolean"
  16531. },
  16532. "overflow": {
  16533. "type": "boolean"
  16534. },
  16535. "tail_start_id": {
  16536. "type": "string",
  16537. "pattern": "^msg"
  16538. }
  16539. },
  16540. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16541. "additionalProperties": false
  16542. },
  16543. "Part": {
  16544. "anyOf": [
  16545. {
  16546. "$ref": "#/components/schemas/TextPart"
  16547. },
  16548. {
  16549. "$ref": "#/components/schemas/SubtaskPart"
  16550. },
  16551. {
  16552. "$ref": "#/components/schemas/ReasoningPart"
  16553. },
  16554. {
  16555. "$ref": "#/components/schemas/FilePart"
  16556. },
  16557. {
  16558. "$ref": "#/components/schemas/ToolPart"
  16559. },
  16560. {
  16561. "$ref": "#/components/schemas/StepStartPart"
  16562. },
  16563. {
  16564. "$ref": "#/components/schemas/StepFinishPart"
  16565. },
  16566. {
  16567. "$ref": "#/components/schemas/SnapshotPart"
  16568. },
  16569. {
  16570. "$ref": "#/components/schemas/PatchPart"
  16571. },
  16572. {
  16573. "$ref": "#/components/schemas/AgentPart"
  16574. },
  16575. {
  16576. "$ref": "#/components/schemas/RetryPart"
  16577. },
  16578. {
  16579. "$ref": "#/components/schemas/CompactionPart"
  16580. }
  16581. ]
  16582. },
  16583. "Prompt": {
  16584. "type": "object",
  16585. "properties": {
  16586. "text": {
  16587. "type": "string"
  16588. },
  16589. "files": {
  16590. "type": "array",
  16591. "items": {
  16592. "$ref": "#/components/schemas/PromptFileAttachment"
  16593. }
  16594. },
  16595. "agents": {
  16596. "type": "array",
  16597. "items": {
  16598. "$ref": "#/components/schemas/PromptAgentAttachment"
  16599. }
  16600. }
  16601. },
  16602. "required": ["text"],
  16603. "additionalProperties": false
  16604. },
  16605. "Pty": {
  16606. "type": "object",
  16607. "properties": {
  16608. "id": {
  16609. "type": "string",
  16610. "pattern": "^pty"
  16611. },
  16612. "title": {
  16613. "type": "string"
  16614. },
  16615. "command": {
  16616. "type": "string"
  16617. },
  16618. "args": {
  16619. "type": "array",
  16620. "items": {
  16621. "type": "string"
  16622. }
  16623. },
  16624. "cwd": {
  16625. "type": "string"
  16626. },
  16627. "status": {
  16628. "type": "string",
  16629. "enum": ["running", "exited"]
  16630. },
  16631. "pid": {
  16632. "type": "integer",
  16633. "minimum": 0
  16634. },
  16635. "exitCode": {
  16636. "type": "integer",
  16637. "minimum": 0
  16638. }
  16639. },
  16640. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16641. "additionalProperties": false
  16642. },
  16643. "Todo": {
  16644. "type": "object",
  16645. "properties": {
  16646. "content": {
  16647. "type": "string",
  16648. "description": "Brief description of the task"
  16649. },
  16650. "status": {
  16651. "type": "string",
  16652. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16653. },
  16654. "priority": {
  16655. "type": "string",
  16656. "description": "Priority level of the task: high, medium, low"
  16657. }
  16658. },
  16659. "required": ["content", "status", "priority"],
  16660. "additionalProperties": false
  16661. },
  16662. "SessionStatus": {
  16663. "anyOf": [
  16664. {
  16665. "type": "object",
  16666. "properties": {
  16667. "type": {
  16668. "type": "string",
  16669. "enum": ["idle"]
  16670. }
  16671. },
  16672. "required": ["type"],
  16673. "additionalProperties": false
  16674. },
  16675. {
  16676. "type": "object",
  16677. "properties": {
  16678. "type": {
  16679. "type": "string",
  16680. "enum": ["retry"]
  16681. },
  16682. "attempt": {
  16683. "type": "integer",
  16684. "minimum": 0
  16685. },
  16686. "message": {
  16687. "type": "string"
  16688. },
  16689. "action": {
  16690. "type": "object",
  16691. "properties": {
  16692. "reason": {
  16693. "type": "string"
  16694. },
  16695. "provider": {
  16696. "type": "string"
  16697. },
  16698. "title": {
  16699. "type": "string"
  16700. },
  16701. "message": {
  16702. "type": "string"
  16703. },
  16704. "label": {
  16705. "type": "string"
  16706. },
  16707. "link": {
  16708. "type": "string"
  16709. }
  16710. },
  16711. "required": ["reason", "provider", "title", "message", "label"],
  16712. "additionalProperties": false
  16713. },
  16714. "next": {
  16715. "type": "integer",
  16716. "minimum": 0
  16717. }
  16718. },
  16719. "required": ["type", "attempt", "message", "next"],
  16720. "additionalProperties": false
  16721. },
  16722. {
  16723. "type": "object",
  16724. "properties": {
  16725. "type": {
  16726. "type": "string",
  16727. "enum": ["busy"]
  16728. }
  16729. },
  16730. "required": ["type"],
  16731. "additionalProperties": false
  16732. }
  16733. ]
  16734. },
  16735. "QuestionOption": {
  16736. "type": "object",
  16737. "properties": {
  16738. "label": {
  16739. "type": "string",
  16740. "description": "Display text (1-5 words, concise)"
  16741. },
  16742. "description": {
  16743. "type": "string",
  16744. "description": "Explanation of choice"
  16745. }
  16746. },
  16747. "required": ["label", "description"],
  16748. "additionalProperties": false
  16749. },
  16750. "QuestionInfo": {
  16751. "type": "object",
  16752. "properties": {
  16753. "question": {
  16754. "type": "string",
  16755. "description": "Complete question"
  16756. },
  16757. "header": {
  16758. "type": "string",
  16759. "description": "Very short label (max 30 chars)"
  16760. },
  16761. "options": {
  16762. "type": "array",
  16763. "items": {
  16764. "$ref": "#/components/schemas/QuestionOption"
  16765. },
  16766. "description": "Available choices"
  16767. },
  16768. "multiple": {
  16769. "type": "boolean"
  16770. },
  16771. "custom": {
  16772. "type": "boolean"
  16773. }
  16774. },
  16775. "required": ["question", "header", "options"],
  16776. "additionalProperties": false
  16777. },
  16778. "QuestionTool": {
  16779. "type": "object",
  16780. "properties": {
  16781. "messageID": {
  16782. "type": "string",
  16783. "pattern": "^msg"
  16784. },
  16785. "callID": {
  16786. "type": "string"
  16787. }
  16788. },
  16789. "required": ["messageID", "callID"],
  16790. "additionalProperties": false
  16791. },
  16792. "QuestionAnswer": {
  16793. "type": "array",
  16794. "items": {
  16795. "type": "string"
  16796. }
  16797. },
  16798. "GlobalEvent": {
  16799. "type": "object",
  16800. "properties": {
  16801. "directory": {
  16802. "type": "string"
  16803. },
  16804. "project": {
  16805. "type": "string"
  16806. },
  16807. "workspace": {
  16808. "type": "string"
  16809. },
  16810. "payload": {
  16811. "anyOf": [
  16812. {
  16813. "type": "object",
  16814. "properties": {
  16815. "id": {
  16816. "type": "string",
  16817. "pattern": "^evt_"
  16818. },
  16819. "type": {
  16820. "type": "string",
  16821. "enum": ["models-dev.refreshed"]
  16822. },
  16823. "properties": {
  16824. "type": "object",
  16825. "properties": {}
  16826. }
  16827. },
  16828. "required": ["id", "type", "properties"],
  16829. "additionalProperties": false
  16830. },
  16831. {
  16832. "type": "object",
  16833. "properties": {
  16834. "id": {
  16835. "type": "string",
  16836. "pattern": "^evt_"
  16837. },
  16838. "type": {
  16839. "type": "string",
  16840. "enum": ["integration.updated"]
  16841. },
  16842. "properties": {
  16843. "type": "object",
  16844. "properties": {}
  16845. }
  16846. },
  16847. "required": ["id", "type", "properties"],
  16848. "additionalProperties": false
  16849. },
  16850. {
  16851. "type": "object",
  16852. "properties": {
  16853. "id": {
  16854. "type": "string",
  16855. "pattern": "^evt_"
  16856. },
  16857. "type": {
  16858. "type": "string",
  16859. "enum": ["catalog.updated"]
  16860. },
  16861. "properties": {
  16862. "type": "object",
  16863. "properties": {}
  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.created"]
  16879. },
  16880. "properties": {
  16881. "type": "object",
  16882. "properties": {
  16883. "sessionID": {
  16884. "type": "string",
  16885. "pattern": "^ses"
  16886. },
  16887. "info": {
  16888. "$ref": "#/components/schemas/Session"
  16889. }
  16890. },
  16891. "required": ["sessionID", "info"],
  16892. "additionalProperties": false
  16893. }
  16894. },
  16895. "required": ["id", "type", "properties"],
  16896. "additionalProperties": false
  16897. },
  16898. {
  16899. "type": "object",
  16900. "properties": {
  16901. "id": {
  16902. "type": "string",
  16903. "pattern": "^evt_"
  16904. },
  16905. "type": {
  16906. "type": "string",
  16907. "enum": ["session.updated"]
  16908. },
  16909. "properties": {
  16910. "type": "object",
  16911. "properties": {
  16912. "sessionID": {
  16913. "type": "string",
  16914. "pattern": "^ses"
  16915. },
  16916. "info": {
  16917. "$ref": "#/components/schemas/Session"
  16918. }
  16919. },
  16920. "required": ["sessionID", "info"],
  16921. "additionalProperties": false
  16922. }
  16923. },
  16924. "required": ["id", "type", "properties"],
  16925. "additionalProperties": false
  16926. },
  16927. {
  16928. "type": "object",
  16929. "properties": {
  16930. "id": {
  16931. "type": "string",
  16932. "pattern": "^evt_"
  16933. },
  16934. "type": {
  16935. "type": "string",
  16936. "enum": ["session.deleted"]
  16937. },
  16938. "properties": {
  16939. "type": "object",
  16940. "properties": {
  16941. "sessionID": {
  16942. "type": "string",
  16943. "pattern": "^ses"
  16944. },
  16945. "info": {
  16946. "$ref": "#/components/schemas/Session"
  16947. }
  16948. },
  16949. "required": ["sessionID", "info"],
  16950. "additionalProperties": false
  16951. }
  16952. },
  16953. "required": ["id", "type", "properties"],
  16954. "additionalProperties": false
  16955. },
  16956. {
  16957. "type": "object",
  16958. "properties": {
  16959. "id": {
  16960. "type": "string",
  16961. "pattern": "^evt_"
  16962. },
  16963. "type": {
  16964. "type": "string",
  16965. "enum": ["message.updated"]
  16966. },
  16967. "properties": {
  16968. "type": "object",
  16969. "properties": {
  16970. "sessionID": {
  16971. "type": "string",
  16972. "pattern": "^ses"
  16973. },
  16974. "info": {
  16975. "$ref": "#/components/schemas/Message"
  16976. }
  16977. },
  16978. "required": ["sessionID", "info"],
  16979. "additionalProperties": false
  16980. }
  16981. },
  16982. "required": ["id", "type", "properties"],
  16983. "additionalProperties": false
  16984. },
  16985. {
  16986. "type": "object",
  16987. "properties": {
  16988. "id": {
  16989. "type": "string",
  16990. "pattern": "^evt_"
  16991. },
  16992. "type": {
  16993. "type": "string",
  16994. "enum": ["message.removed"]
  16995. },
  16996. "properties": {
  16997. "type": "object",
  16998. "properties": {
  16999. "sessionID": {
  17000. "type": "string",
  17001. "pattern": "^ses"
  17002. },
  17003. "messageID": {
  17004. "type": "string",
  17005. "pattern": "^msg"
  17006. }
  17007. },
  17008. "required": ["sessionID", "messageID"],
  17009. "additionalProperties": false
  17010. }
  17011. },
  17012. "required": ["id", "type", "properties"],
  17013. "additionalProperties": false
  17014. },
  17015. {
  17016. "type": "object",
  17017. "properties": {
  17018. "id": {
  17019. "type": "string",
  17020. "pattern": "^evt_"
  17021. },
  17022. "type": {
  17023. "type": "string",
  17024. "enum": ["message.part.updated"]
  17025. },
  17026. "properties": {
  17027. "type": "object",
  17028. "properties": {
  17029. "sessionID": {
  17030. "type": "string",
  17031. "pattern": "^ses"
  17032. },
  17033. "part": {
  17034. "$ref": "#/components/schemas/Part"
  17035. },
  17036. "time": {
  17037. "type": "number"
  17038. }
  17039. },
  17040. "required": ["sessionID", "part", "time"],
  17041. "additionalProperties": false
  17042. }
  17043. },
  17044. "required": ["id", "type", "properties"],
  17045. "additionalProperties": false
  17046. },
  17047. {
  17048. "type": "object",
  17049. "properties": {
  17050. "id": {
  17051. "type": "string",
  17052. "pattern": "^evt_"
  17053. },
  17054. "type": {
  17055. "type": "string",
  17056. "enum": ["message.part.removed"]
  17057. },
  17058. "properties": {
  17059. "type": "object",
  17060. "properties": {
  17061. "sessionID": {
  17062. "type": "string",
  17063. "pattern": "^ses"
  17064. },
  17065. "messageID": {
  17066. "type": "string",
  17067. "pattern": "^msg"
  17068. },
  17069. "partID": {
  17070. "type": "string",
  17071. "pattern": "^prt"
  17072. }
  17073. },
  17074. "required": ["sessionID", "messageID", "partID"],
  17075. "additionalProperties": false
  17076. }
  17077. },
  17078. "required": ["id", "type", "properties"],
  17079. "additionalProperties": false
  17080. },
  17081. {
  17082. "type": "object",
  17083. "properties": {
  17084. "id": {
  17085. "type": "string",
  17086. "pattern": "^evt_"
  17087. },
  17088. "type": {
  17089. "type": "string",
  17090. "enum": ["session.next.agent.switched"]
  17091. },
  17092. "properties": {
  17093. "type": "object",
  17094. "properties": {
  17095. "timestamp": {
  17096. "type": "number"
  17097. },
  17098. "sessionID": {
  17099. "type": "string",
  17100. "pattern": "^ses"
  17101. },
  17102. "messageID": {
  17103. "type": "string",
  17104. "pattern": "^msg_"
  17105. },
  17106. "agent": {
  17107. "type": "string"
  17108. }
  17109. },
  17110. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17111. "additionalProperties": false
  17112. }
  17113. },
  17114. "required": ["id", "type", "properties"],
  17115. "additionalProperties": false
  17116. },
  17117. {
  17118. "type": "object",
  17119. "properties": {
  17120. "id": {
  17121. "type": "string",
  17122. "pattern": "^evt_"
  17123. },
  17124. "type": {
  17125. "type": "string",
  17126. "enum": ["session.next.model.switched"]
  17127. },
  17128. "properties": {
  17129. "type": "object",
  17130. "properties": {
  17131. "timestamp": {
  17132. "type": "number"
  17133. },
  17134. "sessionID": {
  17135. "type": "string",
  17136. "pattern": "^ses"
  17137. },
  17138. "messageID": {
  17139. "type": "string",
  17140. "pattern": "^msg_"
  17141. },
  17142. "model": {
  17143. "type": "object",
  17144. "properties": {
  17145. "id": {
  17146. "type": "string"
  17147. },
  17148. "providerID": {
  17149. "type": "string"
  17150. },
  17151. "variant": {
  17152. "type": "string"
  17153. }
  17154. },
  17155. "required": ["id", "providerID"],
  17156. "additionalProperties": false
  17157. }
  17158. },
  17159. "required": ["timestamp", "sessionID", "messageID", "model"],
  17160. "additionalProperties": false
  17161. }
  17162. },
  17163. "required": ["id", "type", "properties"],
  17164. "additionalProperties": false
  17165. },
  17166. {
  17167. "type": "object",
  17168. "properties": {
  17169. "id": {
  17170. "type": "string",
  17171. "pattern": "^evt_"
  17172. },
  17173. "type": {
  17174. "type": "string",
  17175. "enum": ["session.next.moved"]
  17176. },
  17177. "properties": {
  17178. "type": "object",
  17179. "properties": {
  17180. "timestamp": {
  17181. "type": "number"
  17182. },
  17183. "sessionID": {
  17184. "type": "string",
  17185. "pattern": "^ses"
  17186. },
  17187. "location": {
  17188. "$ref": "#/components/schemas/LocationRef"
  17189. },
  17190. "subdirectory": {
  17191. "type": "string"
  17192. }
  17193. },
  17194. "required": ["timestamp", "sessionID", "location"],
  17195. "additionalProperties": false
  17196. }
  17197. },
  17198. "required": ["id", "type", "properties"],
  17199. "additionalProperties": false
  17200. },
  17201. {
  17202. "type": "object",
  17203. "properties": {
  17204. "id": {
  17205. "type": "string",
  17206. "pattern": "^evt_"
  17207. },
  17208. "type": {
  17209. "type": "string",
  17210. "enum": ["session.next.prompted"]
  17211. },
  17212. "properties": {
  17213. "type": "object",
  17214. "properties": {
  17215. "timestamp": {
  17216. "type": "number"
  17217. },
  17218. "sessionID": {
  17219. "type": "string",
  17220. "pattern": "^ses"
  17221. },
  17222. "messageID": {
  17223. "type": "string",
  17224. "pattern": "^msg_"
  17225. },
  17226. "prompt": {
  17227. "$ref": "#/components/schemas/Prompt"
  17228. },
  17229. "delivery": {
  17230. "type": "string",
  17231. "enum": ["steer", "queue"]
  17232. }
  17233. },
  17234. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17235. "additionalProperties": false
  17236. }
  17237. },
  17238. "required": ["id", "type", "properties"],
  17239. "additionalProperties": false
  17240. },
  17241. {
  17242. "type": "object",
  17243. "properties": {
  17244. "id": {
  17245. "type": "string",
  17246. "pattern": "^evt_"
  17247. },
  17248. "type": {
  17249. "type": "string",
  17250. "enum": ["session.next.prompt.admitted"]
  17251. },
  17252. "properties": {
  17253. "type": "object",
  17254. "properties": {
  17255. "timestamp": {
  17256. "type": "number"
  17257. },
  17258. "sessionID": {
  17259. "type": "string",
  17260. "pattern": "^ses"
  17261. },
  17262. "messageID": {
  17263. "type": "string",
  17264. "pattern": "^msg_"
  17265. },
  17266. "prompt": {
  17267. "$ref": "#/components/schemas/Prompt"
  17268. },
  17269. "delivery": {
  17270. "type": "string",
  17271. "enum": ["steer", "queue"]
  17272. }
  17273. },
  17274. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17275. "additionalProperties": false
  17276. }
  17277. },
  17278. "required": ["id", "type", "properties"],
  17279. "additionalProperties": false
  17280. },
  17281. {
  17282. "type": "object",
  17283. "properties": {
  17284. "id": {
  17285. "type": "string",
  17286. "pattern": "^evt_"
  17287. },
  17288. "type": {
  17289. "type": "string",
  17290. "enum": ["session.next.prompt.promoted"]
  17291. },
  17292. "properties": {
  17293. "type": "object",
  17294. "properties": {
  17295. "timestamp": {
  17296. "type": "number"
  17297. },
  17298. "sessionID": {
  17299. "type": "string",
  17300. "pattern": "^ses"
  17301. },
  17302. "messageID": {
  17303. "type": "string",
  17304. "pattern": "^msg_"
  17305. },
  17306. "prompt": {
  17307. "$ref": "#/components/schemas/Prompt"
  17308. },
  17309. "timeCreated": {
  17310. "type": "number"
  17311. }
  17312. },
  17313. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  17314. "additionalProperties": false
  17315. }
  17316. },
  17317. "required": ["id", "type", "properties"],
  17318. "additionalProperties": false
  17319. },
  17320. {
  17321. "type": "object",
  17322. "properties": {
  17323. "id": {
  17324. "type": "string",
  17325. "pattern": "^evt_"
  17326. },
  17327. "type": {
  17328. "type": "string",
  17329. "enum": ["session.next.interrupt.requested"]
  17330. },
  17331. "properties": {
  17332. "type": "object",
  17333. "properties": {
  17334. "timestamp": {
  17335. "type": "number"
  17336. },
  17337. "sessionID": {
  17338. "type": "string",
  17339. "pattern": "^ses"
  17340. }
  17341. },
  17342. "required": ["timestamp", "sessionID"],
  17343. "additionalProperties": false
  17344. }
  17345. },
  17346. "required": ["id", "type", "properties"],
  17347. "additionalProperties": false
  17348. },
  17349. {
  17350. "type": "object",
  17351. "properties": {
  17352. "id": {
  17353. "type": "string",
  17354. "pattern": "^evt_"
  17355. },
  17356. "type": {
  17357. "type": "string",
  17358. "enum": ["session.next.context.updated"]
  17359. },
  17360. "properties": {
  17361. "type": "object",
  17362. "properties": {
  17363. "timestamp": {
  17364. "type": "number"
  17365. },
  17366. "sessionID": {
  17367. "type": "string",
  17368. "pattern": "^ses"
  17369. },
  17370. "messageID": {
  17371. "type": "string",
  17372. "pattern": "^msg_"
  17373. },
  17374. "text": {
  17375. "type": "string"
  17376. }
  17377. },
  17378. "required": ["timestamp", "sessionID", "messageID", "text"],
  17379. "additionalProperties": false
  17380. }
  17381. },
  17382. "required": ["id", "type", "properties"],
  17383. "additionalProperties": false
  17384. },
  17385. {
  17386. "type": "object",
  17387. "properties": {
  17388. "id": {
  17389. "type": "string",
  17390. "pattern": "^evt_"
  17391. },
  17392. "type": {
  17393. "type": "string",
  17394. "enum": ["session.next.synthetic"]
  17395. },
  17396. "properties": {
  17397. "type": "object",
  17398. "properties": {
  17399. "timestamp": {
  17400. "type": "number"
  17401. },
  17402. "sessionID": {
  17403. "type": "string",
  17404. "pattern": "^ses"
  17405. },
  17406. "messageID": {
  17407. "type": "string",
  17408. "pattern": "^msg_"
  17409. },
  17410. "text": {
  17411. "type": "string"
  17412. }
  17413. },
  17414. "required": ["timestamp", "sessionID", "messageID", "text"],
  17415. "additionalProperties": false
  17416. }
  17417. },
  17418. "required": ["id", "type", "properties"],
  17419. "additionalProperties": false
  17420. },
  17421. {
  17422. "type": "object",
  17423. "properties": {
  17424. "id": {
  17425. "type": "string",
  17426. "pattern": "^evt_"
  17427. },
  17428. "type": {
  17429. "type": "string",
  17430. "enum": ["session.next.shell.started"]
  17431. },
  17432. "properties": {
  17433. "type": "object",
  17434. "properties": {
  17435. "timestamp": {
  17436. "type": "number"
  17437. },
  17438. "sessionID": {
  17439. "type": "string",
  17440. "pattern": "^ses"
  17441. },
  17442. "messageID": {
  17443. "type": "string",
  17444. "pattern": "^msg_"
  17445. },
  17446. "callID": {
  17447. "type": "string"
  17448. },
  17449. "command": {
  17450. "type": "string"
  17451. }
  17452. },
  17453. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17454. "additionalProperties": false
  17455. }
  17456. },
  17457. "required": ["id", "type", "properties"],
  17458. "additionalProperties": false
  17459. },
  17460. {
  17461. "type": "object",
  17462. "properties": {
  17463. "id": {
  17464. "type": "string",
  17465. "pattern": "^evt_"
  17466. },
  17467. "type": {
  17468. "type": "string",
  17469. "enum": ["session.next.shell.ended"]
  17470. },
  17471. "properties": {
  17472. "type": "object",
  17473. "properties": {
  17474. "timestamp": {
  17475. "type": "number"
  17476. },
  17477. "sessionID": {
  17478. "type": "string",
  17479. "pattern": "^ses"
  17480. },
  17481. "callID": {
  17482. "type": "string"
  17483. },
  17484. "output": {
  17485. "type": "string"
  17486. }
  17487. },
  17488. "required": ["timestamp", "sessionID", "callID", "output"],
  17489. "additionalProperties": false
  17490. }
  17491. },
  17492. "required": ["id", "type", "properties"],
  17493. "additionalProperties": false
  17494. },
  17495. {
  17496. "type": "object",
  17497. "properties": {
  17498. "id": {
  17499. "type": "string",
  17500. "pattern": "^evt_"
  17501. },
  17502. "type": {
  17503. "type": "string",
  17504. "enum": ["session.next.step.started"]
  17505. },
  17506. "properties": {
  17507. "type": "object",
  17508. "properties": {
  17509. "timestamp": {
  17510. "type": "number"
  17511. },
  17512. "sessionID": {
  17513. "type": "string",
  17514. "pattern": "^ses"
  17515. },
  17516. "assistantMessageID": {
  17517. "type": "string",
  17518. "pattern": "^msg_"
  17519. },
  17520. "agent": {
  17521. "type": "string"
  17522. },
  17523. "model": {
  17524. "type": "object",
  17525. "properties": {
  17526. "id": {
  17527. "type": "string"
  17528. },
  17529. "providerID": {
  17530. "type": "string"
  17531. },
  17532. "variant": {
  17533. "type": "string"
  17534. }
  17535. },
  17536. "required": ["id", "providerID"],
  17537. "additionalProperties": false
  17538. },
  17539. "snapshot": {
  17540. "type": "string"
  17541. }
  17542. },
  17543. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17544. "additionalProperties": false
  17545. }
  17546. },
  17547. "required": ["id", "type", "properties"],
  17548. "additionalProperties": false
  17549. },
  17550. {
  17551. "type": "object",
  17552. "properties": {
  17553. "id": {
  17554. "type": "string",
  17555. "pattern": "^evt_"
  17556. },
  17557. "type": {
  17558. "type": "string",
  17559. "enum": ["session.next.step.ended"]
  17560. },
  17561. "properties": {
  17562. "type": "object",
  17563. "properties": {
  17564. "timestamp": {
  17565. "type": "number"
  17566. },
  17567. "sessionID": {
  17568. "type": "string",
  17569. "pattern": "^ses"
  17570. },
  17571. "assistantMessageID": {
  17572. "type": "string",
  17573. "pattern": "^msg_"
  17574. },
  17575. "finish": {
  17576. "type": "string"
  17577. },
  17578. "cost": {
  17579. "type": "number"
  17580. },
  17581. "tokens": {
  17582. "type": "object",
  17583. "properties": {
  17584. "input": {
  17585. "type": "number"
  17586. },
  17587. "output": {
  17588. "type": "number"
  17589. },
  17590. "reasoning": {
  17591. "type": "number"
  17592. },
  17593. "cache": {
  17594. "type": "object",
  17595. "properties": {
  17596. "read": {
  17597. "type": "number"
  17598. },
  17599. "write": {
  17600. "type": "number"
  17601. }
  17602. },
  17603. "required": ["read", "write"],
  17604. "additionalProperties": false
  17605. }
  17606. },
  17607. "required": ["input", "output", "reasoning", "cache"],
  17608. "additionalProperties": false
  17609. },
  17610. "snapshot": {
  17611. "type": "string"
  17612. }
  17613. },
  17614. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17615. "additionalProperties": false
  17616. }
  17617. },
  17618. "required": ["id", "type", "properties"],
  17619. "additionalProperties": false
  17620. },
  17621. {
  17622. "type": "object",
  17623. "properties": {
  17624. "id": {
  17625. "type": "string",
  17626. "pattern": "^evt_"
  17627. },
  17628. "type": {
  17629. "type": "string",
  17630. "enum": ["session.next.step.failed"]
  17631. },
  17632. "properties": {
  17633. "type": "object",
  17634. "properties": {
  17635. "timestamp": {
  17636. "type": "number"
  17637. },
  17638. "sessionID": {
  17639. "type": "string",
  17640. "pattern": "^ses"
  17641. },
  17642. "assistantMessageID": {
  17643. "type": "string",
  17644. "pattern": "^msg_"
  17645. },
  17646. "error": {
  17647. "$ref": "#/components/schemas/SessionErrorUnknown"
  17648. }
  17649. },
  17650. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17651. "additionalProperties": false
  17652. }
  17653. },
  17654. "required": ["id", "type", "properties"],
  17655. "additionalProperties": false
  17656. },
  17657. {
  17658. "type": "object",
  17659. "properties": {
  17660. "id": {
  17661. "type": "string",
  17662. "pattern": "^evt_"
  17663. },
  17664. "type": {
  17665. "type": "string",
  17666. "enum": ["session.next.text.started"]
  17667. },
  17668. "properties": {
  17669. "type": "object",
  17670. "properties": {
  17671. "timestamp": {
  17672. "type": "number"
  17673. },
  17674. "sessionID": {
  17675. "type": "string",
  17676. "pattern": "^ses"
  17677. },
  17678. "assistantMessageID": {
  17679. "type": "string",
  17680. "pattern": "^msg_"
  17681. },
  17682. "textID": {
  17683. "type": "string"
  17684. }
  17685. },
  17686. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17687. "additionalProperties": false
  17688. }
  17689. },
  17690. "required": ["id", "type", "properties"],
  17691. "additionalProperties": false
  17692. },
  17693. {
  17694. "type": "object",
  17695. "properties": {
  17696. "id": {
  17697. "type": "string",
  17698. "pattern": "^evt_"
  17699. },
  17700. "type": {
  17701. "type": "string",
  17702. "enum": ["session.next.text.delta"]
  17703. },
  17704. "properties": {
  17705. "type": "object",
  17706. "properties": {
  17707. "timestamp": {
  17708. "type": "number"
  17709. },
  17710. "sessionID": {
  17711. "type": "string",
  17712. "pattern": "^ses"
  17713. },
  17714. "assistantMessageID": {
  17715. "type": "string",
  17716. "pattern": "^msg_"
  17717. },
  17718. "textID": {
  17719. "type": "string"
  17720. },
  17721. "delta": {
  17722. "type": "string"
  17723. }
  17724. },
  17725. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17726. "additionalProperties": false
  17727. }
  17728. },
  17729. "required": ["id", "type", "properties"],
  17730. "additionalProperties": false
  17731. },
  17732. {
  17733. "type": "object",
  17734. "properties": {
  17735. "id": {
  17736. "type": "string",
  17737. "pattern": "^evt_"
  17738. },
  17739. "type": {
  17740. "type": "string",
  17741. "enum": ["session.next.text.ended"]
  17742. },
  17743. "properties": {
  17744. "type": "object",
  17745. "properties": {
  17746. "timestamp": {
  17747. "type": "number"
  17748. },
  17749. "sessionID": {
  17750. "type": "string",
  17751. "pattern": "^ses"
  17752. },
  17753. "assistantMessageID": {
  17754. "type": "string",
  17755. "pattern": "^msg_"
  17756. },
  17757. "textID": {
  17758. "type": "string"
  17759. },
  17760. "text": {
  17761. "type": "string"
  17762. }
  17763. },
  17764. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17765. "additionalProperties": false
  17766. }
  17767. },
  17768. "required": ["id", "type", "properties"],
  17769. "additionalProperties": false
  17770. },
  17771. {
  17772. "type": "object",
  17773. "properties": {
  17774. "id": {
  17775. "type": "string",
  17776. "pattern": "^evt_"
  17777. },
  17778. "type": {
  17779. "type": "string",
  17780. "enum": ["session.next.reasoning.started"]
  17781. },
  17782. "properties": {
  17783. "type": "object",
  17784. "properties": {
  17785. "timestamp": {
  17786. "type": "number"
  17787. },
  17788. "sessionID": {
  17789. "type": "string",
  17790. "pattern": "^ses"
  17791. },
  17792. "assistantMessageID": {
  17793. "type": "string",
  17794. "pattern": "^msg_"
  17795. },
  17796. "reasoningID": {
  17797. "type": "string"
  17798. },
  17799. "providerMetadata": {
  17800. "type": "object",
  17801. "additionalProperties": {
  17802. "type": "object"
  17803. }
  17804. }
  17805. },
  17806. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17807. "additionalProperties": false
  17808. }
  17809. },
  17810. "required": ["id", "type", "properties"],
  17811. "additionalProperties": false
  17812. },
  17813. {
  17814. "type": "object",
  17815. "properties": {
  17816. "id": {
  17817. "type": "string",
  17818. "pattern": "^evt_"
  17819. },
  17820. "type": {
  17821. "type": "string",
  17822. "enum": ["session.next.reasoning.delta"]
  17823. },
  17824. "properties": {
  17825. "type": "object",
  17826. "properties": {
  17827. "timestamp": {
  17828. "type": "number"
  17829. },
  17830. "sessionID": {
  17831. "type": "string",
  17832. "pattern": "^ses"
  17833. },
  17834. "assistantMessageID": {
  17835. "type": "string",
  17836. "pattern": "^msg_"
  17837. },
  17838. "reasoningID": {
  17839. "type": "string"
  17840. },
  17841. "delta": {
  17842. "type": "string"
  17843. }
  17844. },
  17845. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17846. "additionalProperties": false
  17847. }
  17848. },
  17849. "required": ["id", "type", "properties"],
  17850. "additionalProperties": false
  17851. },
  17852. {
  17853. "type": "object",
  17854. "properties": {
  17855. "id": {
  17856. "type": "string",
  17857. "pattern": "^evt_"
  17858. },
  17859. "type": {
  17860. "type": "string",
  17861. "enum": ["session.next.reasoning.ended"]
  17862. },
  17863. "properties": {
  17864. "type": "object",
  17865. "properties": {
  17866. "timestamp": {
  17867. "type": "number"
  17868. },
  17869. "sessionID": {
  17870. "type": "string",
  17871. "pattern": "^ses"
  17872. },
  17873. "assistantMessageID": {
  17874. "type": "string",
  17875. "pattern": "^msg_"
  17876. },
  17877. "reasoningID": {
  17878. "type": "string"
  17879. },
  17880. "text": {
  17881. "type": "string"
  17882. },
  17883. "providerMetadata": {
  17884. "type": "object",
  17885. "additionalProperties": {
  17886. "type": "object"
  17887. }
  17888. }
  17889. },
  17890. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17891. "additionalProperties": false
  17892. }
  17893. },
  17894. "required": ["id", "type", "properties"],
  17895. "additionalProperties": false
  17896. },
  17897. {
  17898. "type": "object",
  17899. "properties": {
  17900. "id": {
  17901. "type": "string",
  17902. "pattern": "^evt_"
  17903. },
  17904. "type": {
  17905. "type": "string",
  17906. "enum": ["session.next.tool.input.started"]
  17907. },
  17908. "properties": {
  17909. "type": "object",
  17910. "properties": {
  17911. "timestamp": {
  17912. "type": "number"
  17913. },
  17914. "sessionID": {
  17915. "type": "string",
  17916. "pattern": "^ses"
  17917. },
  17918. "assistantMessageID": {
  17919. "type": "string",
  17920. "pattern": "^msg_"
  17921. },
  17922. "callID": {
  17923. "type": "string"
  17924. },
  17925. "name": {
  17926. "type": "string"
  17927. }
  17928. },
  17929. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17930. "additionalProperties": false
  17931. }
  17932. },
  17933. "required": ["id", "type", "properties"],
  17934. "additionalProperties": false
  17935. },
  17936. {
  17937. "type": "object",
  17938. "properties": {
  17939. "id": {
  17940. "type": "string",
  17941. "pattern": "^evt_"
  17942. },
  17943. "type": {
  17944. "type": "string",
  17945. "enum": ["session.next.tool.input.delta"]
  17946. },
  17947. "properties": {
  17948. "type": "object",
  17949. "properties": {
  17950. "timestamp": {
  17951. "type": "number"
  17952. },
  17953. "sessionID": {
  17954. "type": "string",
  17955. "pattern": "^ses"
  17956. },
  17957. "assistantMessageID": {
  17958. "type": "string",
  17959. "pattern": "^msg_"
  17960. },
  17961. "callID": {
  17962. "type": "string"
  17963. },
  17964. "delta": {
  17965. "type": "string"
  17966. }
  17967. },
  17968. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17969. "additionalProperties": false
  17970. }
  17971. },
  17972. "required": ["id", "type", "properties"],
  17973. "additionalProperties": false
  17974. },
  17975. {
  17976. "type": "object",
  17977. "properties": {
  17978. "id": {
  17979. "type": "string",
  17980. "pattern": "^evt_"
  17981. },
  17982. "type": {
  17983. "type": "string",
  17984. "enum": ["session.next.tool.input.ended"]
  17985. },
  17986. "properties": {
  17987. "type": "object",
  17988. "properties": {
  17989. "timestamp": {
  17990. "type": "number"
  17991. },
  17992. "sessionID": {
  17993. "type": "string",
  17994. "pattern": "^ses"
  17995. },
  17996. "assistantMessageID": {
  17997. "type": "string",
  17998. "pattern": "^msg_"
  17999. },
  18000. "callID": {
  18001. "type": "string"
  18002. },
  18003. "text": {
  18004. "type": "string"
  18005. }
  18006. },
  18007. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18008. "additionalProperties": false
  18009. }
  18010. },
  18011. "required": ["id", "type", "properties"],
  18012. "additionalProperties": false
  18013. },
  18014. {
  18015. "type": "object",
  18016. "properties": {
  18017. "id": {
  18018. "type": "string",
  18019. "pattern": "^evt_"
  18020. },
  18021. "type": {
  18022. "type": "string",
  18023. "enum": ["session.next.tool.called"]
  18024. },
  18025. "properties": {
  18026. "type": "object",
  18027. "properties": {
  18028. "timestamp": {
  18029. "type": "number"
  18030. },
  18031. "sessionID": {
  18032. "type": "string",
  18033. "pattern": "^ses"
  18034. },
  18035. "assistantMessageID": {
  18036. "type": "string",
  18037. "pattern": "^msg_"
  18038. },
  18039. "callID": {
  18040. "type": "string"
  18041. },
  18042. "tool": {
  18043. "type": "string"
  18044. },
  18045. "input": {
  18046. "type": "object"
  18047. },
  18048. "provider": {
  18049. "type": "object",
  18050. "properties": {
  18051. "executed": {
  18052. "type": "boolean"
  18053. },
  18054. "metadata": {
  18055. "type": "object",
  18056. "additionalProperties": {
  18057. "type": "object"
  18058. }
  18059. }
  18060. },
  18061. "required": ["executed"],
  18062. "additionalProperties": false
  18063. }
  18064. },
  18065. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18066. "additionalProperties": false
  18067. }
  18068. },
  18069. "required": ["id", "type", "properties"],
  18070. "additionalProperties": false
  18071. },
  18072. {
  18073. "type": "object",
  18074. "properties": {
  18075. "id": {
  18076. "type": "string",
  18077. "pattern": "^evt_"
  18078. },
  18079. "type": {
  18080. "type": "string",
  18081. "enum": ["session.next.tool.progress"]
  18082. },
  18083. "properties": {
  18084. "type": "object",
  18085. "properties": {
  18086. "timestamp": {
  18087. "type": "number"
  18088. },
  18089. "sessionID": {
  18090. "type": "string",
  18091. "pattern": "^ses"
  18092. },
  18093. "assistantMessageID": {
  18094. "type": "string",
  18095. "pattern": "^msg_"
  18096. },
  18097. "callID": {
  18098. "type": "string"
  18099. },
  18100. "structured": {
  18101. "type": "object"
  18102. },
  18103. "content": {
  18104. "type": "array",
  18105. "items": {
  18106. "anyOf": [
  18107. {
  18108. "$ref": "#/components/schemas/ToolTextContent"
  18109. },
  18110. {
  18111. "$ref": "#/components/schemas/ToolFileContent"
  18112. }
  18113. ]
  18114. }
  18115. }
  18116. },
  18117. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18118. "additionalProperties": false
  18119. }
  18120. },
  18121. "required": ["id", "type", "properties"],
  18122. "additionalProperties": false
  18123. },
  18124. {
  18125. "type": "object",
  18126. "properties": {
  18127. "id": {
  18128. "type": "string",
  18129. "pattern": "^evt_"
  18130. },
  18131. "type": {
  18132. "type": "string",
  18133. "enum": ["session.next.tool.success"]
  18134. },
  18135. "properties": {
  18136. "type": "object",
  18137. "properties": {
  18138. "timestamp": {
  18139. "type": "number"
  18140. },
  18141. "sessionID": {
  18142. "type": "string",
  18143. "pattern": "^ses"
  18144. },
  18145. "assistantMessageID": {
  18146. "type": "string",
  18147. "pattern": "^msg_"
  18148. },
  18149. "callID": {
  18150. "type": "string"
  18151. },
  18152. "structured": {
  18153. "type": "object"
  18154. },
  18155. "content": {
  18156. "type": "array",
  18157. "items": {
  18158. "anyOf": [
  18159. {
  18160. "$ref": "#/components/schemas/ToolTextContent"
  18161. },
  18162. {
  18163. "$ref": "#/components/schemas/ToolFileContent"
  18164. }
  18165. ]
  18166. }
  18167. },
  18168. "outputPaths": {
  18169. "type": "array",
  18170. "items": {
  18171. "type": "string"
  18172. }
  18173. },
  18174. "result": {},
  18175. "provider": {
  18176. "type": "object",
  18177. "properties": {
  18178. "executed": {
  18179. "type": "boolean"
  18180. },
  18181. "metadata": {
  18182. "type": "object",
  18183. "additionalProperties": {
  18184. "type": "object"
  18185. }
  18186. }
  18187. },
  18188. "required": ["executed"],
  18189. "additionalProperties": false
  18190. }
  18191. },
  18192. "required": [
  18193. "timestamp",
  18194. "sessionID",
  18195. "assistantMessageID",
  18196. "callID",
  18197. "structured",
  18198. "content",
  18199. "provider"
  18200. ],
  18201. "additionalProperties": false
  18202. }
  18203. },
  18204. "required": ["id", "type", "properties"],
  18205. "additionalProperties": false
  18206. },
  18207. {
  18208. "type": "object",
  18209. "properties": {
  18210. "id": {
  18211. "type": "string",
  18212. "pattern": "^evt_"
  18213. },
  18214. "type": {
  18215. "type": "string",
  18216. "enum": ["session.next.tool.failed"]
  18217. },
  18218. "properties": {
  18219. "type": "object",
  18220. "properties": {
  18221. "timestamp": {
  18222. "type": "number"
  18223. },
  18224. "sessionID": {
  18225. "type": "string",
  18226. "pattern": "^ses"
  18227. },
  18228. "assistantMessageID": {
  18229. "type": "string",
  18230. "pattern": "^msg_"
  18231. },
  18232. "callID": {
  18233. "type": "string"
  18234. },
  18235. "error": {
  18236. "$ref": "#/components/schemas/SessionErrorUnknown"
  18237. },
  18238. "result": {},
  18239. "provider": {
  18240. "type": "object",
  18241. "properties": {
  18242. "executed": {
  18243. "type": "boolean"
  18244. },
  18245. "metadata": {
  18246. "type": "object",
  18247. "additionalProperties": {
  18248. "type": "object"
  18249. }
  18250. }
  18251. },
  18252. "required": ["executed"],
  18253. "additionalProperties": false
  18254. }
  18255. },
  18256. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18257. "additionalProperties": false
  18258. }
  18259. },
  18260. "required": ["id", "type", "properties"],
  18261. "additionalProperties": false
  18262. },
  18263. {
  18264. "type": "object",
  18265. "properties": {
  18266. "id": {
  18267. "type": "string",
  18268. "pattern": "^evt_"
  18269. },
  18270. "type": {
  18271. "type": "string",
  18272. "enum": ["session.next.retried"]
  18273. },
  18274. "properties": {
  18275. "type": "object",
  18276. "properties": {
  18277. "timestamp": {
  18278. "type": "number"
  18279. },
  18280. "sessionID": {
  18281. "type": "string",
  18282. "pattern": "^ses"
  18283. },
  18284. "attempt": {
  18285. "type": "number"
  18286. },
  18287. "error": {
  18288. "$ref": "#/components/schemas/SessionNextRetry_error"
  18289. }
  18290. },
  18291. "required": ["timestamp", "sessionID", "attempt", "error"],
  18292. "additionalProperties": false
  18293. }
  18294. },
  18295. "required": ["id", "type", "properties"],
  18296. "additionalProperties": false
  18297. },
  18298. {
  18299. "type": "object",
  18300. "properties": {
  18301. "id": {
  18302. "type": "string",
  18303. "pattern": "^evt_"
  18304. },
  18305. "type": {
  18306. "type": "string",
  18307. "enum": ["session.next.compaction.started"]
  18308. },
  18309. "properties": {
  18310. "type": "object",
  18311. "properties": {
  18312. "timestamp": {
  18313. "type": "number"
  18314. },
  18315. "sessionID": {
  18316. "type": "string",
  18317. "pattern": "^ses"
  18318. },
  18319. "messageID": {
  18320. "type": "string",
  18321. "pattern": "^msg_"
  18322. },
  18323. "reason": {
  18324. "type": "string",
  18325. "enum": ["auto", "manual"]
  18326. }
  18327. },
  18328. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18329. "additionalProperties": false
  18330. }
  18331. },
  18332. "required": ["id", "type", "properties"],
  18333. "additionalProperties": false
  18334. },
  18335. {
  18336. "type": "object",
  18337. "properties": {
  18338. "id": {
  18339. "type": "string",
  18340. "pattern": "^evt_"
  18341. },
  18342. "type": {
  18343. "type": "string",
  18344. "enum": ["session.next.compaction.delta"]
  18345. },
  18346. "properties": {
  18347. "type": "object",
  18348. "properties": {
  18349. "timestamp": {
  18350. "type": "number"
  18351. },
  18352. "sessionID": {
  18353. "type": "string",
  18354. "pattern": "^ses"
  18355. },
  18356. "messageID": {
  18357. "type": "string",
  18358. "pattern": "^msg_"
  18359. },
  18360. "text": {
  18361. "type": "string"
  18362. }
  18363. },
  18364. "required": ["timestamp", "sessionID", "messageID", "text"],
  18365. "additionalProperties": false
  18366. }
  18367. },
  18368. "required": ["id", "type", "properties"],
  18369. "additionalProperties": false
  18370. },
  18371. {
  18372. "type": "object",
  18373. "properties": {
  18374. "id": {
  18375. "type": "string",
  18376. "pattern": "^evt_"
  18377. },
  18378. "type": {
  18379. "type": "string",
  18380. "enum": ["session.next.compaction.ended"]
  18381. },
  18382. "properties": {
  18383. "type": "object",
  18384. "properties": {
  18385. "timestamp": {
  18386. "type": "number"
  18387. },
  18388. "sessionID": {
  18389. "type": "string",
  18390. "pattern": "^ses"
  18391. },
  18392. "messageID": {
  18393. "type": "string",
  18394. "pattern": "^msg_"
  18395. },
  18396. "reason": {
  18397. "type": "string",
  18398. "enum": ["auto", "manual"]
  18399. },
  18400. "text": {
  18401. "type": "string"
  18402. },
  18403. "recent": {
  18404. "type": "string"
  18405. }
  18406. },
  18407. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18408. "additionalProperties": false
  18409. }
  18410. },
  18411. "required": ["id", "type", "properties"],
  18412. "additionalProperties": false
  18413. },
  18414. {
  18415. "type": "object",
  18416. "properties": {
  18417. "id": {
  18418. "type": "string",
  18419. "pattern": "^evt_"
  18420. },
  18421. "type": {
  18422. "type": "string",
  18423. "enum": ["message.part.delta"]
  18424. },
  18425. "properties": {
  18426. "type": "object",
  18427. "properties": {
  18428. "sessionID": {
  18429. "type": "string",
  18430. "pattern": "^ses"
  18431. },
  18432. "messageID": {
  18433. "type": "string",
  18434. "pattern": "^msg"
  18435. },
  18436. "partID": {
  18437. "type": "string",
  18438. "pattern": "^prt"
  18439. },
  18440. "field": {
  18441. "type": "string"
  18442. },
  18443. "delta": {
  18444. "type": "string"
  18445. }
  18446. },
  18447. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18448. "additionalProperties": false
  18449. }
  18450. },
  18451. "required": ["id", "type", "properties"],
  18452. "additionalProperties": false
  18453. },
  18454. {
  18455. "type": "object",
  18456. "properties": {
  18457. "id": {
  18458. "type": "string",
  18459. "pattern": "^evt_"
  18460. },
  18461. "type": {
  18462. "type": "string",
  18463. "enum": ["session.diff"]
  18464. },
  18465. "properties": {
  18466. "type": "object",
  18467. "properties": {
  18468. "sessionID": {
  18469. "type": "string",
  18470. "pattern": "^ses"
  18471. },
  18472. "diff": {
  18473. "type": "array",
  18474. "items": {
  18475. "$ref": "#/components/schemas/SnapshotFileDiff"
  18476. }
  18477. }
  18478. },
  18479. "required": ["sessionID", "diff"],
  18480. "additionalProperties": false
  18481. }
  18482. },
  18483. "required": ["id", "type", "properties"],
  18484. "additionalProperties": false
  18485. },
  18486. {
  18487. "type": "object",
  18488. "properties": {
  18489. "id": {
  18490. "type": "string",
  18491. "pattern": "^evt_"
  18492. },
  18493. "type": {
  18494. "type": "string",
  18495. "enum": ["session.error"]
  18496. },
  18497. "properties": {
  18498. "type": "object",
  18499. "properties": {
  18500. "sessionID": {
  18501. "type": "string",
  18502. "pattern": "^ses"
  18503. },
  18504. "error": {
  18505. "anyOf": [
  18506. {
  18507. "$ref": "#/components/schemas/ProviderAuthError"
  18508. },
  18509. {
  18510. "$ref": "#/components/schemas/UnknownError"
  18511. },
  18512. {
  18513. "$ref": "#/components/schemas/MessageOutputLengthError"
  18514. },
  18515. {
  18516. "$ref": "#/components/schemas/MessageAbortedError"
  18517. },
  18518. {
  18519. "$ref": "#/components/schemas/StructuredOutputError"
  18520. },
  18521. {
  18522. "$ref": "#/components/schemas/ContextOverflowError"
  18523. },
  18524. {
  18525. "$ref": "#/components/schemas/ContentFilterError"
  18526. },
  18527. {
  18528. "$ref": "#/components/schemas/APIError"
  18529. }
  18530. ]
  18531. }
  18532. },
  18533. "additionalProperties": false
  18534. }
  18535. },
  18536. "required": ["id", "type", "properties"],
  18537. "additionalProperties": false
  18538. },
  18539. {
  18540. "type": "object",
  18541. "properties": {
  18542. "id": {
  18543. "type": "string",
  18544. "pattern": "^evt_"
  18545. },
  18546. "type": {
  18547. "type": "string",
  18548. "enum": ["installation.updated"]
  18549. },
  18550. "properties": {
  18551. "type": "object",
  18552. "properties": {
  18553. "version": {
  18554. "type": "string"
  18555. }
  18556. },
  18557. "required": ["version"],
  18558. "additionalProperties": false
  18559. }
  18560. },
  18561. "required": ["id", "type", "properties"],
  18562. "additionalProperties": false
  18563. },
  18564. {
  18565. "type": "object",
  18566. "properties": {
  18567. "id": {
  18568. "type": "string",
  18569. "pattern": "^evt_"
  18570. },
  18571. "type": {
  18572. "type": "string",
  18573. "enum": ["installation.update-available"]
  18574. },
  18575. "properties": {
  18576. "type": "object",
  18577. "properties": {
  18578. "version": {
  18579. "type": "string"
  18580. }
  18581. },
  18582. "required": ["version"],
  18583. "additionalProperties": false
  18584. }
  18585. },
  18586. "required": ["id", "type", "properties"],
  18587. "additionalProperties": false
  18588. },
  18589. {
  18590. "type": "object",
  18591. "properties": {
  18592. "id": {
  18593. "type": "string",
  18594. "pattern": "^evt_"
  18595. },
  18596. "type": {
  18597. "type": "string",
  18598. "enum": ["file.edited"]
  18599. },
  18600. "properties": {
  18601. "type": "object",
  18602. "properties": {
  18603. "file": {
  18604. "type": "string"
  18605. }
  18606. },
  18607. "required": ["file"],
  18608. "additionalProperties": false
  18609. }
  18610. },
  18611. "required": ["id", "type", "properties"],
  18612. "additionalProperties": false
  18613. },
  18614. {
  18615. "type": "object",
  18616. "properties": {
  18617. "id": {
  18618. "type": "string",
  18619. "pattern": "^evt_"
  18620. },
  18621. "type": {
  18622. "type": "string",
  18623. "enum": ["plugin.added"]
  18624. },
  18625. "properties": {
  18626. "type": "object",
  18627. "properties": {
  18628. "id": {
  18629. "type": "string"
  18630. }
  18631. },
  18632. "required": ["id"],
  18633. "additionalProperties": false
  18634. }
  18635. },
  18636. "required": ["id", "type", "properties"],
  18637. "additionalProperties": false
  18638. },
  18639. {
  18640. "type": "object",
  18641. "properties": {
  18642. "id": {
  18643. "type": "string",
  18644. "pattern": "^evt_"
  18645. },
  18646. "type": {
  18647. "type": "string",
  18648. "enum": ["permission.v2.asked"]
  18649. },
  18650. "properties": {
  18651. "type": "object",
  18652. "properties": {
  18653. "id": {
  18654. "type": "string",
  18655. "pattern": "^per"
  18656. },
  18657. "sessionID": {
  18658. "type": "string",
  18659. "pattern": "^ses"
  18660. },
  18661. "action": {
  18662. "type": "string"
  18663. },
  18664. "resources": {
  18665. "type": "array",
  18666. "items": {
  18667. "type": "string"
  18668. }
  18669. },
  18670. "save": {
  18671. "type": "array",
  18672. "items": {
  18673. "type": "string"
  18674. }
  18675. },
  18676. "metadata": {
  18677. "type": "object"
  18678. },
  18679. "source": {
  18680. "$ref": "#/components/schemas/PermissionV2Source"
  18681. }
  18682. },
  18683. "required": ["id", "sessionID", "action", "resources"],
  18684. "additionalProperties": false
  18685. }
  18686. },
  18687. "required": ["id", "type", "properties"],
  18688. "additionalProperties": false
  18689. },
  18690. {
  18691. "type": "object",
  18692. "properties": {
  18693. "id": {
  18694. "type": "string",
  18695. "pattern": "^evt_"
  18696. },
  18697. "type": {
  18698. "type": "string",
  18699. "enum": ["permission.v2.replied"]
  18700. },
  18701. "properties": {
  18702. "type": "object",
  18703. "properties": {
  18704. "sessionID": {
  18705. "type": "string",
  18706. "pattern": "^ses"
  18707. },
  18708. "requestID": {
  18709. "type": "string",
  18710. "pattern": "^per"
  18711. },
  18712. "reply": {
  18713. "$ref": "#/components/schemas/PermissionV2Reply"
  18714. }
  18715. },
  18716. "required": ["sessionID", "requestID", "reply"],
  18717. "additionalProperties": false
  18718. }
  18719. },
  18720. "required": ["id", "type", "properties"],
  18721. "additionalProperties": false
  18722. },
  18723. {
  18724. "type": "object",
  18725. "properties": {
  18726. "id": {
  18727. "type": "string",
  18728. "pattern": "^evt_"
  18729. },
  18730. "type": {
  18731. "type": "string",
  18732. "enum": ["reference.updated"]
  18733. },
  18734. "properties": {
  18735. "type": "object",
  18736. "properties": {}
  18737. }
  18738. },
  18739. "required": ["id", "type", "properties"],
  18740. "additionalProperties": false
  18741. },
  18742. {
  18743. "type": "object",
  18744. "properties": {
  18745. "id": {
  18746. "type": "string",
  18747. "pattern": "^evt_"
  18748. },
  18749. "type": {
  18750. "type": "string",
  18751. "enum": ["project.directories.updated"]
  18752. },
  18753. "properties": {
  18754. "type": "object",
  18755. "properties": {
  18756. "projectID": {
  18757. "type": "string"
  18758. }
  18759. },
  18760. "required": ["projectID"],
  18761. "additionalProperties": false
  18762. }
  18763. },
  18764. "required": ["id", "type", "properties"],
  18765. "additionalProperties": false
  18766. },
  18767. {
  18768. "type": "object",
  18769. "properties": {
  18770. "id": {
  18771. "type": "string",
  18772. "pattern": "^evt_"
  18773. },
  18774. "type": {
  18775. "type": "string",
  18776. "enum": ["file.watcher.updated"]
  18777. },
  18778. "properties": {
  18779. "type": "object",
  18780. "properties": {
  18781. "file": {
  18782. "type": "string"
  18783. },
  18784. "event": {
  18785. "type": "string",
  18786. "enum": ["add", "change", "unlink"]
  18787. }
  18788. },
  18789. "required": ["file", "event"],
  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": ["pty.created"]
  18806. },
  18807. "properties": {
  18808. "type": "object",
  18809. "properties": {
  18810. "info": {
  18811. "$ref": "#/components/schemas/Pty"
  18812. }
  18813. },
  18814. "required": ["info"],
  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": ["pty.updated"]
  18831. },
  18832. "properties": {
  18833. "type": "object",
  18834. "properties": {
  18835. "info": {
  18836. "$ref": "#/components/schemas/Pty"
  18837. }
  18838. },
  18839. "required": ["info"],
  18840. "additionalProperties": false
  18841. }
  18842. },
  18843. "required": ["id", "type", "properties"],
  18844. "additionalProperties": false
  18845. },
  18846. {
  18847. "type": "object",
  18848. "properties": {
  18849. "id": {
  18850. "type": "string",
  18851. "pattern": "^evt_"
  18852. },
  18853. "type": {
  18854. "type": "string",
  18855. "enum": ["pty.exited"]
  18856. },
  18857. "properties": {
  18858. "type": "object",
  18859. "properties": {
  18860. "id": {
  18861. "type": "string",
  18862. "pattern": "^pty"
  18863. },
  18864. "exitCode": {
  18865. "type": "integer",
  18866. "minimum": 0
  18867. }
  18868. },
  18869. "required": ["id", "exitCode"],
  18870. "additionalProperties": false
  18871. }
  18872. },
  18873. "required": ["id", "type", "properties"],
  18874. "additionalProperties": false
  18875. },
  18876. {
  18877. "type": "object",
  18878. "properties": {
  18879. "id": {
  18880. "type": "string",
  18881. "pattern": "^evt_"
  18882. },
  18883. "type": {
  18884. "type": "string",
  18885. "enum": ["pty.deleted"]
  18886. },
  18887. "properties": {
  18888. "type": "object",
  18889. "properties": {
  18890. "id": {
  18891. "type": "string",
  18892. "pattern": "^pty"
  18893. }
  18894. },
  18895. "required": ["id"],
  18896. "additionalProperties": false
  18897. }
  18898. },
  18899. "required": ["id", "type", "properties"],
  18900. "additionalProperties": false
  18901. },
  18902. {
  18903. "type": "object",
  18904. "properties": {
  18905. "id": {
  18906. "type": "string",
  18907. "pattern": "^evt_"
  18908. },
  18909. "type": {
  18910. "type": "string",
  18911. "enum": ["question.v2.asked"]
  18912. },
  18913. "properties": {
  18914. "type": "object",
  18915. "properties": {
  18916. "id": {
  18917. "type": "string",
  18918. "pattern": "^que"
  18919. },
  18920. "sessionID": {
  18921. "type": "string",
  18922. "pattern": "^ses"
  18923. },
  18924. "questions": {
  18925. "type": "array",
  18926. "items": {
  18927. "$ref": "#/components/schemas/QuestionV2Info"
  18928. },
  18929. "description": "Questions to ask"
  18930. },
  18931. "tool": {
  18932. "$ref": "#/components/schemas/QuestionV2Tool"
  18933. }
  18934. },
  18935. "required": ["id", "sessionID", "questions"],
  18936. "additionalProperties": false
  18937. }
  18938. },
  18939. "required": ["id", "type", "properties"],
  18940. "additionalProperties": false
  18941. },
  18942. {
  18943. "type": "object",
  18944. "properties": {
  18945. "id": {
  18946. "type": "string",
  18947. "pattern": "^evt_"
  18948. },
  18949. "type": {
  18950. "type": "string",
  18951. "enum": ["question.v2.replied"]
  18952. },
  18953. "properties": {
  18954. "type": "object",
  18955. "properties": {
  18956. "sessionID": {
  18957. "type": "string",
  18958. "pattern": "^ses"
  18959. },
  18960. "requestID": {
  18961. "type": "string",
  18962. "pattern": "^que"
  18963. },
  18964. "answers": {
  18965. "type": "array",
  18966. "items": {
  18967. "$ref": "#/components/schemas/QuestionV2Answer"
  18968. }
  18969. }
  18970. },
  18971. "required": ["sessionID", "requestID", "answers"],
  18972. "additionalProperties": false
  18973. }
  18974. },
  18975. "required": ["id", "type", "properties"],
  18976. "additionalProperties": false
  18977. },
  18978. {
  18979. "type": "object",
  18980. "properties": {
  18981. "id": {
  18982. "type": "string",
  18983. "pattern": "^evt_"
  18984. },
  18985. "type": {
  18986. "type": "string",
  18987. "enum": ["question.v2.rejected"]
  18988. },
  18989. "properties": {
  18990. "type": "object",
  18991. "properties": {
  18992. "sessionID": {
  18993. "type": "string",
  18994. "pattern": "^ses"
  18995. },
  18996. "requestID": {
  18997. "type": "string",
  18998. "pattern": "^que"
  18999. }
  19000. },
  19001. "required": ["sessionID", "requestID"],
  19002. "additionalProperties": false
  19003. }
  19004. },
  19005. "required": ["id", "type", "properties"],
  19006. "additionalProperties": false
  19007. },
  19008. {
  19009. "type": "object",
  19010. "properties": {
  19011. "id": {
  19012. "type": "string",
  19013. "pattern": "^evt_"
  19014. },
  19015. "type": {
  19016. "type": "string",
  19017. "enum": ["todo.updated"]
  19018. },
  19019. "properties": {
  19020. "type": "object",
  19021. "properties": {
  19022. "sessionID": {
  19023. "type": "string",
  19024. "pattern": "^ses"
  19025. },
  19026. "todos": {
  19027. "type": "array",
  19028. "items": {
  19029. "$ref": "#/components/schemas/Todo"
  19030. }
  19031. }
  19032. },
  19033. "required": ["sessionID", "todos"],
  19034. "additionalProperties": false
  19035. }
  19036. },
  19037. "required": ["id", "type", "properties"],
  19038. "additionalProperties": false
  19039. },
  19040. {
  19041. "type": "object",
  19042. "properties": {
  19043. "id": {
  19044. "type": "string",
  19045. "pattern": "^evt_"
  19046. },
  19047. "type": {
  19048. "type": "string",
  19049. "enum": ["lsp.updated"]
  19050. },
  19051. "properties": {
  19052. "type": "object",
  19053. "properties": {}
  19054. }
  19055. },
  19056. "required": ["id", "type", "properties"],
  19057. "additionalProperties": false
  19058. },
  19059. {
  19060. "type": "object",
  19061. "properties": {
  19062. "id": {
  19063. "type": "string",
  19064. "pattern": "^evt_"
  19065. },
  19066. "type": {
  19067. "type": "string",
  19068. "enum": ["permission.asked"]
  19069. },
  19070. "properties": {
  19071. "type": "object",
  19072. "properties": {
  19073. "id": {
  19074. "type": "string",
  19075. "pattern": "^per"
  19076. },
  19077. "sessionID": {
  19078. "type": "string",
  19079. "pattern": "^ses"
  19080. },
  19081. "permission": {
  19082. "type": "string"
  19083. },
  19084. "patterns": {
  19085. "type": "array",
  19086. "items": {
  19087. "type": "string"
  19088. }
  19089. },
  19090. "metadata": {
  19091. "type": "object"
  19092. },
  19093. "always": {
  19094. "type": "array",
  19095. "items": {
  19096. "type": "string"
  19097. }
  19098. },
  19099. "tool": {
  19100. "type": "object",
  19101. "properties": {
  19102. "messageID": {
  19103. "type": "string"
  19104. },
  19105. "callID": {
  19106. "type": "string"
  19107. }
  19108. },
  19109. "required": ["messageID", "callID"],
  19110. "additionalProperties": false
  19111. }
  19112. },
  19113. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19114. "additionalProperties": false
  19115. }
  19116. },
  19117. "required": ["id", "type", "properties"],
  19118. "additionalProperties": false
  19119. },
  19120. {
  19121. "type": "object",
  19122. "properties": {
  19123. "id": {
  19124. "type": "string",
  19125. "pattern": "^evt_"
  19126. },
  19127. "type": {
  19128. "type": "string",
  19129. "enum": ["permission.replied"]
  19130. },
  19131. "properties": {
  19132. "type": "object",
  19133. "properties": {
  19134. "sessionID": {
  19135. "type": "string",
  19136. "pattern": "^ses"
  19137. },
  19138. "requestID": {
  19139. "type": "string",
  19140. "pattern": "^per"
  19141. },
  19142. "reply": {
  19143. "type": "string",
  19144. "enum": ["once", "always", "reject"]
  19145. }
  19146. },
  19147. "required": ["sessionID", "requestID", "reply"],
  19148. "additionalProperties": false
  19149. }
  19150. },
  19151. "required": ["id", "type", "properties"],
  19152. "additionalProperties": false
  19153. },
  19154. {
  19155. "type": "object",
  19156. "properties": {
  19157. "id": {
  19158. "type": "string",
  19159. "pattern": "^evt_"
  19160. },
  19161. "type": {
  19162. "type": "string",
  19163. "enum": ["tui.prompt.append"]
  19164. },
  19165. "properties": {
  19166. "type": "object",
  19167. "properties": {
  19168. "text": {
  19169. "type": "string"
  19170. }
  19171. },
  19172. "required": ["text"],
  19173. "additionalProperties": false
  19174. }
  19175. },
  19176. "required": ["id", "type", "properties"],
  19177. "additionalProperties": false
  19178. },
  19179. {
  19180. "type": "object",
  19181. "properties": {
  19182. "id": {
  19183. "type": "string",
  19184. "pattern": "^evt_"
  19185. },
  19186. "type": {
  19187. "type": "string",
  19188. "enum": ["tui.command.execute"]
  19189. },
  19190. "properties": {
  19191. "type": "object",
  19192. "properties": {
  19193. "command": {
  19194. "anyOf": [
  19195. {
  19196. "type": "string",
  19197. "enum": [
  19198. "session.list",
  19199. "session.new",
  19200. "session.share",
  19201. "session.interrupt",
  19202. "session.compact",
  19203. "session.page.up",
  19204. "session.page.down",
  19205. "session.line.up",
  19206. "session.line.down",
  19207. "session.half.page.up",
  19208. "session.half.page.down",
  19209. "session.first",
  19210. "session.last",
  19211. "prompt.clear",
  19212. "prompt.submit",
  19213. "agent.cycle"
  19214. ]
  19215. },
  19216. {
  19217. "type": "string"
  19218. }
  19219. ]
  19220. }
  19221. },
  19222. "required": ["command"],
  19223. "additionalProperties": false
  19224. }
  19225. },
  19226. "required": ["id", "type", "properties"],
  19227. "additionalProperties": false
  19228. },
  19229. {
  19230. "type": "object",
  19231. "properties": {
  19232. "id": {
  19233. "type": "string",
  19234. "pattern": "^evt_"
  19235. },
  19236. "type": {
  19237. "type": "string",
  19238. "enum": ["tui.toast.show"]
  19239. },
  19240. "properties": {
  19241. "type": "object",
  19242. "properties": {
  19243. "title": {
  19244. "type": "string"
  19245. },
  19246. "message": {
  19247. "type": "string"
  19248. },
  19249. "variant": {
  19250. "type": "string",
  19251. "enum": ["info", "success", "warning", "error"]
  19252. },
  19253. "duration": {
  19254. "type": "integer",
  19255. "exclusiveMinimum": 0
  19256. }
  19257. },
  19258. "required": ["message", "variant"],
  19259. "additionalProperties": false
  19260. }
  19261. },
  19262. "required": ["id", "type", "properties"],
  19263. "additionalProperties": false
  19264. },
  19265. {
  19266. "type": "object",
  19267. "properties": {
  19268. "id": {
  19269. "type": "string",
  19270. "pattern": "^evt_"
  19271. },
  19272. "type": {
  19273. "type": "string",
  19274. "enum": ["tui.session.select"]
  19275. },
  19276. "properties": {
  19277. "type": "object",
  19278. "properties": {
  19279. "sessionID": {
  19280. "type": "string",
  19281. "pattern": "^ses",
  19282. "description": "Session ID to navigate to"
  19283. }
  19284. },
  19285. "required": ["sessionID"],
  19286. "additionalProperties": false
  19287. }
  19288. },
  19289. "required": ["id", "type", "properties"],
  19290. "additionalProperties": false
  19291. },
  19292. {
  19293. "type": "object",
  19294. "properties": {
  19295. "id": {
  19296. "type": "string",
  19297. "pattern": "^evt_"
  19298. },
  19299. "type": {
  19300. "type": "string",
  19301. "enum": ["mcp.tools.changed"]
  19302. },
  19303. "properties": {
  19304. "type": "object",
  19305. "properties": {
  19306. "server": {
  19307. "type": "string"
  19308. }
  19309. },
  19310. "required": ["server"],
  19311. "additionalProperties": false
  19312. }
  19313. },
  19314. "required": ["id", "type", "properties"],
  19315. "additionalProperties": false
  19316. },
  19317. {
  19318. "type": "object",
  19319. "properties": {
  19320. "id": {
  19321. "type": "string",
  19322. "pattern": "^evt_"
  19323. },
  19324. "type": {
  19325. "type": "string",
  19326. "enum": ["mcp.browser.open.failed"]
  19327. },
  19328. "properties": {
  19329. "type": "object",
  19330. "properties": {
  19331. "mcpName": {
  19332. "type": "string"
  19333. },
  19334. "url": {
  19335. "type": "string"
  19336. }
  19337. },
  19338. "required": ["mcpName", "url"],
  19339. "additionalProperties": false
  19340. }
  19341. },
  19342. "required": ["id", "type", "properties"],
  19343. "additionalProperties": false
  19344. },
  19345. {
  19346. "type": "object",
  19347. "properties": {
  19348. "id": {
  19349. "type": "string",
  19350. "pattern": "^evt_"
  19351. },
  19352. "type": {
  19353. "type": "string",
  19354. "enum": ["command.executed"]
  19355. },
  19356. "properties": {
  19357. "type": "object",
  19358. "properties": {
  19359. "name": {
  19360. "type": "string"
  19361. },
  19362. "sessionID": {
  19363. "type": "string",
  19364. "pattern": "^ses"
  19365. },
  19366. "arguments": {
  19367. "type": "string"
  19368. },
  19369. "messageID": {
  19370. "type": "string",
  19371. "pattern": "^msg"
  19372. }
  19373. },
  19374. "required": ["name", "sessionID", "arguments", "messageID"],
  19375. "additionalProperties": false
  19376. }
  19377. },
  19378. "required": ["id", "type", "properties"],
  19379. "additionalProperties": false
  19380. },
  19381. {
  19382. "type": "object",
  19383. "properties": {
  19384. "id": {
  19385. "type": "string",
  19386. "pattern": "^evt_"
  19387. },
  19388. "type": {
  19389. "type": "string",
  19390. "enum": ["project.updated"]
  19391. },
  19392. "properties": {
  19393. "type": "object",
  19394. "properties": {
  19395. "id": {
  19396. "type": "string"
  19397. },
  19398. "worktree": {
  19399. "type": "string"
  19400. },
  19401. "vcs": {
  19402. "type": "string",
  19403. "enum": ["git"]
  19404. },
  19405. "name": {
  19406. "type": "string"
  19407. },
  19408. "icon": {
  19409. "type": "object",
  19410. "properties": {
  19411. "url": {
  19412. "type": "string"
  19413. },
  19414. "override": {
  19415. "type": "string"
  19416. },
  19417. "color": {
  19418. "type": "string"
  19419. }
  19420. },
  19421. "additionalProperties": false
  19422. },
  19423. "commands": {
  19424. "type": "object",
  19425. "properties": {
  19426. "start": {
  19427. "type": "string",
  19428. "description": "Startup script to run when creating a new workspace (worktree)"
  19429. }
  19430. },
  19431. "additionalProperties": false
  19432. },
  19433. "time": {
  19434. "type": "object",
  19435. "properties": {
  19436. "created": {
  19437. "type": "integer",
  19438. "minimum": 0
  19439. },
  19440. "updated": {
  19441. "type": "integer",
  19442. "minimum": 0
  19443. },
  19444. "initialized": {
  19445. "type": "integer",
  19446. "minimum": 0
  19447. }
  19448. },
  19449. "required": ["created", "updated"],
  19450. "additionalProperties": false
  19451. },
  19452. "sandboxes": {
  19453. "type": "array",
  19454. "items": {
  19455. "type": "string"
  19456. }
  19457. }
  19458. },
  19459. "required": ["id", "worktree", "time", "sandboxes"],
  19460. "additionalProperties": false
  19461. }
  19462. },
  19463. "required": ["id", "type", "properties"],
  19464. "additionalProperties": false
  19465. },
  19466. {
  19467. "type": "object",
  19468. "properties": {
  19469. "id": {
  19470. "type": "string",
  19471. "pattern": "^evt_"
  19472. },
  19473. "type": {
  19474. "type": "string",
  19475. "enum": ["session.status"]
  19476. },
  19477. "properties": {
  19478. "type": "object",
  19479. "properties": {
  19480. "sessionID": {
  19481. "type": "string",
  19482. "pattern": "^ses"
  19483. },
  19484. "status": {
  19485. "$ref": "#/components/schemas/SessionStatus"
  19486. }
  19487. },
  19488. "required": ["sessionID", "status"],
  19489. "additionalProperties": false
  19490. }
  19491. },
  19492. "required": ["id", "type", "properties"],
  19493. "additionalProperties": false
  19494. },
  19495. {
  19496. "type": "object",
  19497. "properties": {
  19498. "id": {
  19499. "type": "string",
  19500. "pattern": "^evt_"
  19501. },
  19502. "type": {
  19503. "type": "string",
  19504. "enum": ["session.idle"]
  19505. },
  19506. "properties": {
  19507. "type": "object",
  19508. "properties": {
  19509. "sessionID": {
  19510. "type": "string",
  19511. "pattern": "^ses"
  19512. }
  19513. },
  19514. "required": ["sessionID"],
  19515. "additionalProperties": false
  19516. }
  19517. },
  19518. "required": ["id", "type", "properties"],
  19519. "additionalProperties": false
  19520. },
  19521. {
  19522. "type": "object",
  19523. "properties": {
  19524. "id": {
  19525. "type": "string",
  19526. "pattern": "^evt_"
  19527. },
  19528. "type": {
  19529. "type": "string",
  19530. "enum": ["question.asked"]
  19531. },
  19532. "properties": {
  19533. "type": "object",
  19534. "properties": {
  19535. "id": {
  19536. "type": "string",
  19537. "pattern": "^que"
  19538. },
  19539. "sessionID": {
  19540. "type": "string",
  19541. "pattern": "^ses"
  19542. },
  19543. "questions": {
  19544. "type": "array",
  19545. "items": {
  19546. "$ref": "#/components/schemas/QuestionInfo"
  19547. },
  19548. "description": "Questions to ask"
  19549. },
  19550. "tool": {
  19551. "$ref": "#/components/schemas/QuestionTool"
  19552. }
  19553. },
  19554. "required": ["id", "sessionID", "questions"],
  19555. "additionalProperties": false
  19556. }
  19557. },
  19558. "required": ["id", "type", "properties"],
  19559. "additionalProperties": false
  19560. },
  19561. {
  19562. "type": "object",
  19563. "properties": {
  19564. "id": {
  19565. "type": "string",
  19566. "pattern": "^evt_"
  19567. },
  19568. "type": {
  19569. "type": "string",
  19570. "enum": ["question.replied"]
  19571. },
  19572. "properties": {
  19573. "type": "object",
  19574. "properties": {
  19575. "sessionID": {
  19576. "type": "string",
  19577. "pattern": "^ses"
  19578. },
  19579. "requestID": {
  19580. "type": "string",
  19581. "pattern": "^que"
  19582. },
  19583. "answers": {
  19584. "type": "array",
  19585. "items": {
  19586. "$ref": "#/components/schemas/QuestionAnswer"
  19587. }
  19588. }
  19589. },
  19590. "required": ["sessionID", "requestID", "answers"],
  19591. "additionalProperties": false
  19592. }
  19593. },
  19594. "required": ["id", "type", "properties"],
  19595. "additionalProperties": false
  19596. },
  19597. {
  19598. "type": "object",
  19599. "properties": {
  19600. "id": {
  19601. "type": "string",
  19602. "pattern": "^evt_"
  19603. },
  19604. "type": {
  19605. "type": "string",
  19606. "enum": ["question.rejected"]
  19607. },
  19608. "properties": {
  19609. "type": "object",
  19610. "properties": {
  19611. "sessionID": {
  19612. "type": "string",
  19613. "pattern": "^ses"
  19614. },
  19615. "requestID": {
  19616. "type": "string",
  19617. "pattern": "^que"
  19618. }
  19619. },
  19620. "required": ["sessionID", "requestID"],
  19621. "additionalProperties": false
  19622. }
  19623. },
  19624. "required": ["id", "type", "properties"],
  19625. "additionalProperties": false
  19626. },
  19627. {
  19628. "type": "object",
  19629. "properties": {
  19630. "id": {
  19631. "type": "string",
  19632. "pattern": "^evt_"
  19633. },
  19634. "type": {
  19635. "type": "string",
  19636. "enum": ["session.compacted"]
  19637. },
  19638. "properties": {
  19639. "type": "object",
  19640. "properties": {
  19641. "sessionID": {
  19642. "type": "string",
  19643. "pattern": "^ses"
  19644. }
  19645. },
  19646. "required": ["sessionID"],
  19647. "additionalProperties": false
  19648. }
  19649. },
  19650. "required": ["id", "type", "properties"],
  19651. "additionalProperties": false
  19652. },
  19653. {
  19654. "type": "object",
  19655. "properties": {
  19656. "id": {
  19657. "type": "string",
  19658. "pattern": "^evt_"
  19659. },
  19660. "type": {
  19661. "type": "string",
  19662. "enum": ["vcs.branch.updated"]
  19663. },
  19664. "properties": {
  19665. "type": "object",
  19666. "properties": {
  19667. "branch": {
  19668. "type": "string"
  19669. }
  19670. },
  19671. "additionalProperties": false
  19672. }
  19673. },
  19674. "required": ["id", "type", "properties"],
  19675. "additionalProperties": false
  19676. },
  19677. {
  19678. "type": "object",
  19679. "properties": {
  19680. "id": {
  19681. "type": "string",
  19682. "pattern": "^evt_"
  19683. },
  19684. "type": {
  19685. "type": "string",
  19686. "enum": ["workspace.ready"]
  19687. },
  19688. "properties": {
  19689. "type": "object",
  19690. "properties": {
  19691. "name": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "required": ["name"],
  19696. "additionalProperties": false
  19697. }
  19698. },
  19699. "required": ["id", "type", "properties"],
  19700. "additionalProperties": false
  19701. },
  19702. {
  19703. "type": "object",
  19704. "properties": {
  19705. "id": {
  19706. "type": "string",
  19707. "pattern": "^evt_"
  19708. },
  19709. "type": {
  19710. "type": "string",
  19711. "enum": ["workspace.failed"]
  19712. },
  19713. "properties": {
  19714. "type": "object",
  19715. "properties": {
  19716. "message": {
  19717. "type": "string"
  19718. }
  19719. },
  19720. "required": ["message"],
  19721. "additionalProperties": false
  19722. }
  19723. },
  19724. "required": ["id", "type", "properties"],
  19725. "additionalProperties": false
  19726. },
  19727. {
  19728. "type": "object",
  19729. "properties": {
  19730. "id": {
  19731. "type": "string",
  19732. "pattern": "^evt_"
  19733. },
  19734. "type": {
  19735. "type": "string",
  19736. "enum": ["workspace.status"]
  19737. },
  19738. "properties": {
  19739. "type": "object",
  19740. "properties": {
  19741. "workspaceID": {
  19742. "type": "string",
  19743. "pattern": "^wrk"
  19744. },
  19745. "status": {
  19746. "type": "string",
  19747. "enum": ["connected", "connecting", "disconnected", "error"]
  19748. }
  19749. },
  19750. "required": ["workspaceID", "status"],
  19751. "additionalProperties": false
  19752. }
  19753. },
  19754. "required": ["id", "type", "properties"],
  19755. "additionalProperties": false
  19756. },
  19757. {
  19758. "type": "object",
  19759. "properties": {
  19760. "id": {
  19761. "type": "string",
  19762. "pattern": "^evt_"
  19763. },
  19764. "type": {
  19765. "type": "string",
  19766. "enum": ["worktree.ready"]
  19767. },
  19768. "properties": {
  19769. "type": "object",
  19770. "properties": {
  19771. "name": {
  19772. "type": "string"
  19773. },
  19774. "branch": {
  19775. "type": "string"
  19776. }
  19777. },
  19778. "required": ["name"],
  19779. "additionalProperties": false
  19780. }
  19781. },
  19782. "required": ["id", "type", "properties"],
  19783. "additionalProperties": false
  19784. },
  19785. {
  19786. "type": "object",
  19787. "properties": {
  19788. "id": {
  19789. "type": "string",
  19790. "pattern": "^evt_"
  19791. },
  19792. "type": {
  19793. "type": "string",
  19794. "enum": ["worktree.failed"]
  19795. },
  19796. "properties": {
  19797. "type": "object",
  19798. "properties": {
  19799. "message": {
  19800. "type": "string"
  19801. }
  19802. },
  19803. "required": ["message"],
  19804. "additionalProperties": false
  19805. }
  19806. },
  19807. "required": ["id", "type", "properties"],
  19808. "additionalProperties": false
  19809. },
  19810. {
  19811. "type": "object",
  19812. "properties": {
  19813. "id": {
  19814. "type": "string",
  19815. "pattern": "^evt_"
  19816. },
  19817. "type": {
  19818. "type": "string",
  19819. "enum": ["server.connected"]
  19820. },
  19821. "properties": {
  19822. "type": "object",
  19823. "properties": {}
  19824. }
  19825. },
  19826. "required": ["id", "type", "properties"],
  19827. "additionalProperties": false
  19828. },
  19829. {
  19830. "type": "object",
  19831. "properties": {
  19832. "id": {
  19833. "type": "string",
  19834. "pattern": "^evt_"
  19835. },
  19836. "type": {
  19837. "type": "string",
  19838. "enum": ["global.disposed"]
  19839. },
  19840. "properties": {
  19841. "type": "object",
  19842. "properties": {}
  19843. }
  19844. },
  19845. "required": ["id", "type", "properties"],
  19846. "additionalProperties": false
  19847. },
  19848. {
  19849. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19850. },
  19851. {
  19852. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19853. },
  19854. {
  19855. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19856. },
  19857. {
  19858. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19859. },
  19860. {
  19861. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19862. },
  19863. {
  19864. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19865. },
  19866. {
  19867. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19868. },
  19869. {
  19870. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19871. },
  19872. {
  19873. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19874. },
  19875. {
  19876. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19877. },
  19878. {
  19879. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19880. },
  19881. {
  19882. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19883. },
  19884. {
  19885. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19886. },
  19887. {
  19888. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  19889. },
  19890. {
  19891. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  19892. },
  19893. {
  19894. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19895. },
  19896. {
  19897. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19898. },
  19899. {
  19900. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19901. },
  19902. {
  19903. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19904. },
  19905. {
  19906. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19907. },
  19908. {
  19909. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19910. },
  19911. {
  19912. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19913. },
  19914. {
  19915. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19916. },
  19917. {
  19918. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19919. },
  19920. {
  19921. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19922. },
  19923. {
  19924. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19925. },
  19926. {
  19927. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19928. },
  19929. {
  19930. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19931. },
  19932. {
  19933. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19934. },
  19935. {
  19936. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19937. },
  19938. {
  19939. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19940. },
  19941. {
  19942. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19943. },
  19944. {
  19945. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19946. },
  19947. {
  19948. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19949. },
  19950. {
  19951. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19952. }
  19953. ]
  19954. }
  19955. },
  19956. "required": ["directory", "payload"],
  19957. "additionalProperties": false
  19958. },
  19959. "LogLevel": {
  19960. "type": "string",
  19961. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19962. "description": "Log level"
  19963. },
  19964. "ServerConfig": {
  19965. "type": "object",
  19966. "properties": {
  19967. "port": {
  19968. "type": "integer",
  19969. "exclusiveMinimum": 0
  19970. },
  19971. "hostname": {
  19972. "type": "string"
  19973. },
  19974. "mdns": {
  19975. "type": "boolean"
  19976. },
  19977. "mdnsDomain": {
  19978. "type": "string"
  19979. },
  19980. "cors": {
  19981. "type": "array",
  19982. "items": {
  19983. "type": "string"
  19984. }
  19985. }
  19986. },
  19987. "additionalProperties": false,
  19988. "description": "Server configuration for opencode serve and web commands"
  19989. },
  19990. "PermissionActionConfig": {
  19991. "type": "string",
  19992. "enum": ["ask", "allow", "deny"]
  19993. },
  19994. "PermissionObjectConfig": {
  19995. "type": "object",
  19996. "additionalProperties": {
  19997. "$ref": "#/components/schemas/PermissionActionConfig"
  19998. }
  19999. },
  20000. "PermissionRuleConfig": {
  20001. "anyOf": [
  20002. {
  20003. "$ref": "#/components/schemas/PermissionActionConfig"
  20004. },
  20005. {
  20006. "$ref": "#/components/schemas/PermissionObjectConfig"
  20007. }
  20008. ]
  20009. },
  20010. "PermissionConfig": {
  20011. "anyOf": [
  20012. {
  20013. "$ref": "#/components/schemas/PermissionActionConfig"
  20014. },
  20015. {
  20016. "type": "object",
  20017. "properties": {
  20018. "read": {
  20019. "$ref": "#/components/schemas/PermissionRuleConfig"
  20020. },
  20021. "edit": {
  20022. "$ref": "#/components/schemas/PermissionRuleConfig"
  20023. },
  20024. "glob": {
  20025. "$ref": "#/components/schemas/PermissionRuleConfig"
  20026. },
  20027. "grep": {
  20028. "$ref": "#/components/schemas/PermissionRuleConfig"
  20029. },
  20030. "list": {
  20031. "$ref": "#/components/schemas/PermissionRuleConfig"
  20032. },
  20033. "bash": {
  20034. "$ref": "#/components/schemas/PermissionRuleConfig"
  20035. },
  20036. "task": {
  20037. "$ref": "#/components/schemas/PermissionRuleConfig"
  20038. },
  20039. "external_directory": {
  20040. "$ref": "#/components/schemas/PermissionRuleConfig"
  20041. },
  20042. "todowrite": {
  20043. "$ref": "#/components/schemas/PermissionActionConfig"
  20044. },
  20045. "question": {
  20046. "$ref": "#/components/schemas/PermissionActionConfig"
  20047. },
  20048. "webfetch": {
  20049. "$ref": "#/components/schemas/PermissionActionConfig"
  20050. },
  20051. "websearch": {
  20052. "$ref": "#/components/schemas/PermissionActionConfig"
  20053. },
  20054. "lsp": {
  20055. "$ref": "#/components/schemas/PermissionRuleConfig"
  20056. },
  20057. "doom_loop": {
  20058. "$ref": "#/components/schemas/PermissionActionConfig"
  20059. },
  20060. "skill": {
  20061. "$ref": "#/components/schemas/PermissionRuleConfig"
  20062. }
  20063. },
  20064. "additionalProperties": {
  20065. "$ref": "#/components/schemas/PermissionRuleConfig"
  20066. }
  20067. }
  20068. ]
  20069. },
  20070. "AgentConfig": {
  20071. "type": "object",
  20072. "properties": {
  20073. "model": {
  20074. "type": "string"
  20075. },
  20076. "variant": {
  20077. "type": "string"
  20078. },
  20079. "temperature": {
  20080. "type": "number"
  20081. },
  20082. "top_p": {
  20083. "type": "number"
  20084. },
  20085. "prompt": {
  20086. "type": "string"
  20087. },
  20088. "tools": {
  20089. "type": "object",
  20090. "additionalProperties": {
  20091. "type": "boolean"
  20092. }
  20093. },
  20094. "disable": {
  20095. "type": "boolean"
  20096. },
  20097. "description": {
  20098. "type": "string"
  20099. },
  20100. "mode": {
  20101. "type": "string",
  20102. "enum": ["subagent", "primary", "all"]
  20103. },
  20104. "hidden": {
  20105. "type": "boolean"
  20106. },
  20107. "options": {
  20108. "type": "object"
  20109. },
  20110. "color": {
  20111. "anyOf": [
  20112. {
  20113. "type": "string",
  20114. "pattern": "^#[0-9a-fA-F]{6}$"
  20115. },
  20116. {
  20117. "type": "string",
  20118. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20119. }
  20120. ],
  20121. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20122. },
  20123. "steps": {
  20124. "type": "integer",
  20125. "exclusiveMinimum": 0
  20126. },
  20127. "maxSteps": {
  20128. "type": "integer",
  20129. "exclusiveMinimum": 0
  20130. },
  20131. "permission": {
  20132. "$ref": "#/components/schemas/PermissionConfig"
  20133. }
  20134. },
  20135. "additionalProperties": {}
  20136. },
  20137. "ProviderConfig": {
  20138. "type": "object",
  20139. "properties": {
  20140. "api": {
  20141. "type": "string"
  20142. },
  20143. "name": {
  20144. "type": "string"
  20145. },
  20146. "env": {
  20147. "type": "array",
  20148. "items": {
  20149. "type": "string"
  20150. }
  20151. },
  20152. "id": {
  20153. "type": "string"
  20154. },
  20155. "npm": {
  20156. "type": "string"
  20157. },
  20158. "whitelist": {
  20159. "type": "array",
  20160. "items": {
  20161. "type": "string"
  20162. }
  20163. },
  20164. "blacklist": {
  20165. "type": "array",
  20166. "items": {
  20167. "type": "string"
  20168. }
  20169. },
  20170. "options": {
  20171. "type": "object",
  20172. "properties": {
  20173. "apiKey": {
  20174. "type": "string"
  20175. },
  20176. "baseURL": {
  20177. "type": "string"
  20178. },
  20179. "enterpriseUrl": {
  20180. "type": "string"
  20181. },
  20182. "setCacheKey": {
  20183. "type": "boolean"
  20184. },
  20185. "timeout": {
  20186. "anyOf": [
  20187. {
  20188. "type": "integer",
  20189. "exclusiveMinimum": 0
  20190. },
  20191. {
  20192. "type": "boolean",
  20193. "enum": [false]
  20194. }
  20195. ],
  20196. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20197. },
  20198. "headerTimeout": {
  20199. "anyOf": [
  20200. {
  20201. "type": "integer",
  20202. "exclusiveMinimum": 0
  20203. },
  20204. {
  20205. "type": "boolean",
  20206. "enum": [false]
  20207. }
  20208. ],
  20209. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20210. },
  20211. "chunkTimeout": {
  20212. "type": "integer",
  20213. "exclusiveMinimum": 0
  20214. }
  20215. },
  20216. "additionalProperties": {}
  20217. },
  20218. "models": {
  20219. "type": "object",
  20220. "additionalProperties": {
  20221. "type": "object",
  20222. "properties": {
  20223. "id": {
  20224. "type": "string"
  20225. },
  20226. "name": {
  20227. "type": "string"
  20228. },
  20229. "family": {
  20230. "type": "string"
  20231. },
  20232. "release_date": {
  20233. "type": "string"
  20234. },
  20235. "attachment": {
  20236. "type": "boolean"
  20237. },
  20238. "reasoning": {
  20239. "type": "boolean"
  20240. },
  20241. "temperature": {
  20242. "type": "boolean"
  20243. },
  20244. "tool_call": {
  20245. "type": "boolean"
  20246. },
  20247. "interleaved": {
  20248. "anyOf": [
  20249. {
  20250. "type": "boolean",
  20251. "enum": [true]
  20252. },
  20253. {
  20254. "type": "object",
  20255. "properties": {
  20256. "field": {
  20257. "type": "string",
  20258. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20259. }
  20260. },
  20261. "required": ["field"],
  20262. "additionalProperties": false
  20263. }
  20264. ]
  20265. },
  20266. "cost": {
  20267. "type": "object",
  20268. "properties": {
  20269. "input": {
  20270. "type": "number"
  20271. },
  20272. "output": {
  20273. "type": "number"
  20274. },
  20275. "cache_read": {
  20276. "type": "number"
  20277. },
  20278. "cache_write": {
  20279. "type": "number"
  20280. },
  20281. "context_over_200k": {
  20282. "type": "object",
  20283. "properties": {
  20284. "input": {
  20285. "type": "number"
  20286. },
  20287. "output": {
  20288. "type": "number"
  20289. },
  20290. "cache_read": {
  20291. "type": "number"
  20292. },
  20293. "cache_write": {
  20294. "type": "number"
  20295. }
  20296. },
  20297. "required": ["input", "output"],
  20298. "additionalProperties": false
  20299. }
  20300. },
  20301. "required": ["input", "output"],
  20302. "additionalProperties": false
  20303. },
  20304. "limit": {
  20305. "type": "object",
  20306. "properties": {
  20307. "context": {
  20308. "type": "number"
  20309. },
  20310. "input": {
  20311. "type": "number"
  20312. },
  20313. "output": {
  20314. "type": "number"
  20315. }
  20316. },
  20317. "required": ["context", "output"],
  20318. "additionalProperties": false
  20319. },
  20320. "modalities": {
  20321. "type": "object",
  20322. "properties": {
  20323. "input": {
  20324. "type": "array",
  20325. "items": {
  20326. "type": "string",
  20327. "enum": ["text", "audio", "image", "video", "pdf"]
  20328. }
  20329. },
  20330. "output": {
  20331. "type": "array",
  20332. "items": {
  20333. "type": "string",
  20334. "enum": ["text", "audio", "image", "video", "pdf"]
  20335. }
  20336. }
  20337. },
  20338. "additionalProperties": false
  20339. },
  20340. "experimental": {
  20341. "type": "boolean"
  20342. },
  20343. "status": {
  20344. "type": "string",
  20345. "enum": ["alpha", "beta", "deprecated", "active"]
  20346. },
  20347. "provider": {
  20348. "type": "object",
  20349. "properties": {
  20350. "npm": {
  20351. "type": "string"
  20352. },
  20353. "api": {
  20354. "type": "string"
  20355. }
  20356. },
  20357. "additionalProperties": false
  20358. },
  20359. "options": {
  20360. "type": "object"
  20361. },
  20362. "headers": {
  20363. "type": "object",
  20364. "additionalProperties": {
  20365. "type": "string"
  20366. }
  20367. },
  20368. "variants": {
  20369. "type": "object",
  20370. "additionalProperties": {
  20371. "type": "object",
  20372. "properties": {
  20373. "disabled": {
  20374. "type": "boolean"
  20375. }
  20376. },
  20377. "additionalProperties": {}
  20378. },
  20379. "description": "Variant-specific configuration"
  20380. }
  20381. },
  20382. "additionalProperties": false
  20383. }
  20384. }
  20385. },
  20386. "additionalProperties": false
  20387. },
  20388. "McpLocalConfig": {
  20389. "type": "object",
  20390. "properties": {
  20391. "type": {
  20392. "type": "string",
  20393. "enum": ["local"],
  20394. "description": "Type of MCP server connection"
  20395. },
  20396. "command": {
  20397. "type": "array",
  20398. "items": {
  20399. "type": "string"
  20400. },
  20401. "description": "Command and arguments to run the MCP server"
  20402. },
  20403. "cwd": {
  20404. "type": "string"
  20405. },
  20406. "environment": {
  20407. "type": "object",
  20408. "additionalProperties": {
  20409. "type": "string"
  20410. }
  20411. },
  20412. "enabled": {
  20413. "type": "boolean"
  20414. },
  20415. "timeout": {
  20416. "type": "integer",
  20417. "exclusiveMinimum": 0
  20418. }
  20419. },
  20420. "required": ["type", "command"],
  20421. "additionalProperties": false
  20422. },
  20423. "McpOAuthConfig": {
  20424. "type": "object",
  20425. "properties": {
  20426. "clientId": {
  20427. "type": "string"
  20428. },
  20429. "clientSecret": {
  20430. "type": "string"
  20431. },
  20432. "scope": {
  20433. "type": "string"
  20434. },
  20435. "callbackPort": {
  20436. "type": "integer",
  20437. "minimum": 1,
  20438. "maximum": 65535
  20439. },
  20440. "redirectUri": {
  20441. "type": "string"
  20442. }
  20443. },
  20444. "additionalProperties": false
  20445. },
  20446. "McpRemoteConfig": {
  20447. "type": "object",
  20448. "properties": {
  20449. "type": {
  20450. "type": "string",
  20451. "enum": ["remote"],
  20452. "description": "Type of MCP server connection"
  20453. },
  20454. "url": {
  20455. "type": "string",
  20456. "description": "URL of the remote MCP server"
  20457. },
  20458. "enabled": {
  20459. "type": "boolean"
  20460. },
  20461. "headers": {
  20462. "type": "object",
  20463. "additionalProperties": {
  20464. "type": "string"
  20465. }
  20466. },
  20467. "oauth": {
  20468. "anyOf": [
  20469. {
  20470. "$ref": "#/components/schemas/McpOAuthConfig"
  20471. },
  20472. {
  20473. "type": "boolean",
  20474. "enum": [false]
  20475. }
  20476. ],
  20477. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20478. },
  20479. "timeout": {
  20480. "type": "integer",
  20481. "exclusiveMinimum": 0
  20482. }
  20483. },
  20484. "required": ["type", "url"],
  20485. "additionalProperties": false
  20486. },
  20487. "LayoutConfig": {
  20488. "type": "string",
  20489. "enum": ["auto", "stretch"],
  20490. "description": "@deprecated Always uses stretch layout."
  20491. },
  20492. "ImageAttachmentConfig": {
  20493. "type": "object",
  20494. "properties": {
  20495. "auto_resize": {
  20496. "type": "boolean"
  20497. },
  20498. "max_width": {
  20499. "type": "integer",
  20500. "exclusiveMinimum": 0
  20501. },
  20502. "max_height": {
  20503. "type": "integer",
  20504. "exclusiveMinimum": 0
  20505. },
  20506. "max_base64_bytes": {
  20507. "type": "integer",
  20508. "exclusiveMinimum": 0
  20509. }
  20510. },
  20511. "additionalProperties": false
  20512. },
  20513. "AttachmentConfig": {
  20514. "type": "object",
  20515. "properties": {
  20516. "image": {
  20517. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20518. }
  20519. },
  20520. "additionalProperties": false
  20521. },
  20522. "Config": {
  20523. "type": "object",
  20524. "properties": {
  20525. "$schema": {
  20526. "type": "string"
  20527. },
  20528. "shell": {
  20529. "type": "string"
  20530. },
  20531. "logLevel": {
  20532. "$ref": "#/components/schemas/LogLevel"
  20533. },
  20534. "server": {
  20535. "$ref": "#/components/schemas/ServerConfig"
  20536. },
  20537. "command": {
  20538. "type": "object",
  20539. "additionalProperties": {
  20540. "type": "object",
  20541. "properties": {
  20542. "template": {
  20543. "type": "string"
  20544. },
  20545. "description": {
  20546. "type": "string"
  20547. },
  20548. "agent": {
  20549. "type": "string"
  20550. },
  20551. "model": {
  20552. "type": "string"
  20553. },
  20554. "variant": {
  20555. "type": "string"
  20556. },
  20557. "subtask": {
  20558. "type": "boolean"
  20559. }
  20560. },
  20561. "required": ["template"],
  20562. "additionalProperties": false
  20563. }
  20564. },
  20565. "skills": {
  20566. "type": "object",
  20567. "properties": {
  20568. "paths": {
  20569. "type": "array",
  20570. "items": {
  20571. "type": "string"
  20572. }
  20573. },
  20574. "urls": {
  20575. "type": "array",
  20576. "items": {
  20577. "type": "string"
  20578. }
  20579. }
  20580. },
  20581. "additionalProperties": false
  20582. },
  20583. "references": {
  20584. "type": "object",
  20585. "additionalProperties": {
  20586. "anyOf": [
  20587. {
  20588. "type": "string"
  20589. },
  20590. {
  20591. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20592. },
  20593. {
  20594. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20595. }
  20596. ]
  20597. }
  20598. },
  20599. "reference": {
  20600. "type": "object",
  20601. "additionalProperties": {
  20602. "anyOf": [
  20603. {
  20604. "type": "string"
  20605. },
  20606. {
  20607. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20608. },
  20609. {
  20610. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20611. }
  20612. ]
  20613. }
  20614. },
  20615. "watcher": {
  20616. "type": "object",
  20617. "properties": {
  20618. "ignore": {
  20619. "type": "array",
  20620. "items": {
  20621. "type": "string"
  20622. }
  20623. }
  20624. },
  20625. "additionalProperties": false
  20626. },
  20627. "snapshot": {
  20628. "type": "boolean"
  20629. },
  20630. "plugin": {
  20631. "type": "array",
  20632. "items": {
  20633. "anyOf": [
  20634. {
  20635. "type": "string"
  20636. },
  20637. {
  20638. "type": "array",
  20639. "prefixItems": [
  20640. {
  20641. "type": "string"
  20642. },
  20643. {
  20644. "type": "object"
  20645. }
  20646. ],
  20647. "maxItems": 2,
  20648. "minItems": 2
  20649. }
  20650. ]
  20651. }
  20652. },
  20653. "share": {
  20654. "type": "string",
  20655. "enum": ["manual", "auto", "disabled"]
  20656. },
  20657. "autoshare": {
  20658. "type": "boolean"
  20659. },
  20660. "autoupdate": {
  20661. "anyOf": [
  20662. {
  20663. "type": "boolean"
  20664. },
  20665. {
  20666. "type": "string",
  20667. "enum": ["notify"]
  20668. }
  20669. ],
  20670. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20671. },
  20672. "disabled_providers": {
  20673. "type": "array",
  20674. "items": {
  20675. "type": "string"
  20676. }
  20677. },
  20678. "enabled_providers": {
  20679. "type": "array",
  20680. "items": {
  20681. "type": "string"
  20682. }
  20683. },
  20684. "model": {
  20685. "type": "string"
  20686. },
  20687. "small_model": {
  20688. "type": "string"
  20689. },
  20690. "default_agent": {
  20691. "type": "string"
  20692. },
  20693. "username": {
  20694. "type": "string"
  20695. },
  20696. "mode": {
  20697. "type": "object",
  20698. "properties": {
  20699. "build": {
  20700. "$ref": "#/components/schemas/AgentConfig"
  20701. },
  20702. "plan": {
  20703. "$ref": "#/components/schemas/AgentConfig"
  20704. }
  20705. },
  20706. "additionalProperties": {
  20707. "$ref": "#/components/schemas/AgentConfig"
  20708. }
  20709. },
  20710. "agent": {
  20711. "type": "object",
  20712. "properties": {
  20713. "plan": {
  20714. "$ref": "#/components/schemas/AgentConfig"
  20715. },
  20716. "build": {
  20717. "$ref": "#/components/schemas/AgentConfig"
  20718. },
  20719. "general": {
  20720. "$ref": "#/components/schemas/AgentConfig"
  20721. },
  20722. "explore": {
  20723. "$ref": "#/components/schemas/AgentConfig"
  20724. },
  20725. "title": {
  20726. "$ref": "#/components/schemas/AgentConfig"
  20727. },
  20728. "summary": {
  20729. "$ref": "#/components/schemas/AgentConfig"
  20730. },
  20731. "compaction": {
  20732. "$ref": "#/components/schemas/AgentConfig"
  20733. }
  20734. },
  20735. "additionalProperties": {
  20736. "$ref": "#/components/schemas/AgentConfig"
  20737. }
  20738. },
  20739. "provider": {
  20740. "type": "object",
  20741. "additionalProperties": {
  20742. "$ref": "#/components/schemas/ProviderConfig"
  20743. }
  20744. },
  20745. "mcp": {
  20746. "type": "object",
  20747. "additionalProperties": {
  20748. "anyOf": [
  20749. {
  20750. "$ref": "#/components/schemas/McpLocalConfig"
  20751. },
  20752. {
  20753. "$ref": "#/components/schemas/McpRemoteConfig"
  20754. },
  20755. {
  20756. "type": "object",
  20757. "properties": {
  20758. "enabled": {
  20759. "type": "boolean"
  20760. }
  20761. },
  20762. "required": ["enabled"],
  20763. "additionalProperties": false
  20764. }
  20765. ]
  20766. }
  20767. },
  20768. "formatter": {
  20769. "anyOf": [
  20770. {
  20771. "type": "boolean"
  20772. },
  20773. {
  20774. "type": "object",
  20775. "additionalProperties": {
  20776. "type": "object",
  20777. "properties": {
  20778. "disabled": {
  20779. "type": "boolean"
  20780. },
  20781. "command": {
  20782. "type": "array",
  20783. "items": {
  20784. "type": "string"
  20785. }
  20786. },
  20787. "environment": {
  20788. "type": "object",
  20789. "additionalProperties": {
  20790. "type": "string"
  20791. }
  20792. },
  20793. "extensions": {
  20794. "type": "array",
  20795. "items": {
  20796. "type": "string"
  20797. }
  20798. }
  20799. },
  20800. "additionalProperties": false
  20801. }
  20802. }
  20803. ],
  20804. "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."
  20805. },
  20806. "lsp": {
  20807. "anyOf": [
  20808. {
  20809. "type": "boolean"
  20810. },
  20811. {
  20812. "type": "object",
  20813. "additionalProperties": {
  20814. "anyOf": [
  20815. {
  20816. "type": "object",
  20817. "properties": {
  20818. "disabled": {
  20819. "type": "boolean",
  20820. "enum": [true]
  20821. }
  20822. },
  20823. "required": ["disabled"],
  20824. "additionalProperties": false
  20825. },
  20826. {
  20827. "type": "object",
  20828. "properties": {
  20829. "command": {
  20830. "type": "array",
  20831. "items": {
  20832. "type": "string"
  20833. }
  20834. },
  20835. "extensions": {
  20836. "type": "array",
  20837. "items": {
  20838. "type": "string"
  20839. }
  20840. },
  20841. "disabled": {
  20842. "type": "boolean"
  20843. },
  20844. "env": {
  20845. "type": "object",
  20846. "additionalProperties": {
  20847. "type": "string"
  20848. }
  20849. },
  20850. "initialization": {
  20851. "type": "object"
  20852. }
  20853. },
  20854. "required": ["command"],
  20855. "additionalProperties": false
  20856. }
  20857. ]
  20858. }
  20859. }
  20860. ],
  20861. "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."
  20862. },
  20863. "instructions": {
  20864. "type": "array",
  20865. "items": {
  20866. "type": "string"
  20867. }
  20868. },
  20869. "layout": {
  20870. "$ref": "#/components/schemas/LayoutConfig"
  20871. },
  20872. "permission": {
  20873. "$ref": "#/components/schemas/PermissionConfig"
  20874. },
  20875. "tools": {
  20876. "type": "object",
  20877. "additionalProperties": {
  20878. "type": "boolean"
  20879. }
  20880. },
  20881. "attachment": {
  20882. "$ref": "#/components/schemas/AttachmentConfig"
  20883. },
  20884. "enterprise": {
  20885. "type": "object",
  20886. "properties": {
  20887. "url": {
  20888. "type": "string"
  20889. }
  20890. },
  20891. "additionalProperties": false
  20892. },
  20893. "tool_output": {
  20894. "type": "object",
  20895. "properties": {
  20896. "max_lines": {
  20897. "type": "integer",
  20898. "exclusiveMinimum": 0
  20899. },
  20900. "max_bytes": {
  20901. "type": "integer",
  20902. "exclusiveMinimum": 0
  20903. }
  20904. },
  20905. "additionalProperties": false
  20906. },
  20907. "compaction": {
  20908. "type": "object",
  20909. "properties": {
  20910. "auto": {
  20911. "type": "boolean"
  20912. },
  20913. "prune": {
  20914. "type": "boolean"
  20915. },
  20916. "tail_turns": {
  20917. "type": "integer",
  20918. "minimum": 0
  20919. },
  20920. "preserve_recent_tokens": {
  20921. "type": "integer",
  20922. "minimum": 0
  20923. },
  20924. "reserved": {
  20925. "type": "integer",
  20926. "minimum": 0
  20927. }
  20928. },
  20929. "additionalProperties": false
  20930. },
  20931. "experimental": {
  20932. "type": "object",
  20933. "properties": {
  20934. "disable_paste_summary": {
  20935. "type": "boolean"
  20936. },
  20937. "batch_tool": {
  20938. "type": "boolean"
  20939. },
  20940. "openTelemetry": {
  20941. "type": "boolean"
  20942. },
  20943. "primary_tools": {
  20944. "type": "array",
  20945. "items": {
  20946. "type": "string"
  20947. }
  20948. },
  20949. "continue_loop_on_deny": {
  20950. "type": "boolean"
  20951. },
  20952. "mcp_timeout": {
  20953. "type": "integer",
  20954. "exclusiveMinimum": 0
  20955. },
  20956. "policies": {
  20957. "type": "array",
  20958. "items": {
  20959. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20960. }
  20961. }
  20962. },
  20963. "additionalProperties": false
  20964. }
  20965. },
  20966. "additionalProperties": false
  20967. },
  20968. "Model": {
  20969. "type": "object",
  20970. "properties": {
  20971. "id": {
  20972. "type": "string"
  20973. },
  20974. "providerID": {
  20975. "type": "string"
  20976. },
  20977. "api": {
  20978. "type": "object",
  20979. "properties": {
  20980. "id": {
  20981. "type": "string"
  20982. },
  20983. "url": {
  20984. "type": "string"
  20985. },
  20986. "npm": {
  20987. "type": "string"
  20988. }
  20989. },
  20990. "required": ["id", "url", "npm"],
  20991. "additionalProperties": false
  20992. },
  20993. "name": {
  20994. "type": "string"
  20995. },
  20996. "family": {
  20997. "type": "string"
  20998. },
  20999. "capabilities": {
  21000. "type": "object",
  21001. "properties": {
  21002. "temperature": {
  21003. "type": "boolean"
  21004. },
  21005. "reasoning": {
  21006. "type": "boolean"
  21007. },
  21008. "attachment": {
  21009. "type": "boolean"
  21010. },
  21011. "toolcall": {
  21012. "type": "boolean"
  21013. },
  21014. "input": {
  21015. "type": "object",
  21016. "properties": {
  21017. "text": {
  21018. "type": "boolean"
  21019. },
  21020. "audio": {
  21021. "type": "boolean"
  21022. },
  21023. "image": {
  21024. "type": "boolean"
  21025. },
  21026. "video": {
  21027. "type": "boolean"
  21028. },
  21029. "pdf": {
  21030. "type": "boolean"
  21031. }
  21032. },
  21033. "required": ["text", "audio", "image", "video", "pdf"],
  21034. "additionalProperties": false
  21035. },
  21036. "output": {
  21037. "type": "object",
  21038. "properties": {
  21039. "text": {
  21040. "type": "boolean"
  21041. },
  21042. "audio": {
  21043. "type": "boolean"
  21044. },
  21045. "image": {
  21046. "type": "boolean"
  21047. },
  21048. "video": {
  21049. "type": "boolean"
  21050. },
  21051. "pdf": {
  21052. "type": "boolean"
  21053. }
  21054. },
  21055. "required": ["text", "audio", "image", "video", "pdf"],
  21056. "additionalProperties": false
  21057. },
  21058. "interleaved": {
  21059. "anyOf": [
  21060. {
  21061. "type": "boolean"
  21062. },
  21063. {
  21064. "type": "object",
  21065. "properties": {
  21066. "field": {
  21067. "type": "string",
  21068. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21069. }
  21070. },
  21071. "required": ["field"],
  21072. "additionalProperties": false
  21073. }
  21074. ]
  21075. }
  21076. },
  21077. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21078. "additionalProperties": false
  21079. },
  21080. "cost": {
  21081. "type": "object",
  21082. "properties": {
  21083. "input": {
  21084. "type": "number"
  21085. },
  21086. "output": {
  21087. "type": "number"
  21088. },
  21089. "cache": {
  21090. "type": "object",
  21091. "properties": {
  21092. "read": {
  21093. "type": "number"
  21094. },
  21095. "write": {
  21096. "type": "number"
  21097. }
  21098. },
  21099. "required": ["read", "write"],
  21100. "additionalProperties": false
  21101. },
  21102. "tiers": {
  21103. "type": "array",
  21104. "items": {
  21105. "type": "object",
  21106. "properties": {
  21107. "input": {
  21108. "type": "number"
  21109. },
  21110. "output": {
  21111. "type": "number"
  21112. },
  21113. "cache": {
  21114. "type": "object",
  21115. "properties": {
  21116. "read": {
  21117. "type": "number"
  21118. },
  21119. "write": {
  21120. "type": "number"
  21121. }
  21122. },
  21123. "required": ["read", "write"],
  21124. "additionalProperties": false
  21125. },
  21126. "tier": {
  21127. "type": "object",
  21128. "properties": {
  21129. "type": {
  21130. "type": "string",
  21131. "enum": ["context"]
  21132. },
  21133. "size": {
  21134. "type": "number"
  21135. }
  21136. },
  21137. "required": ["type", "size"],
  21138. "additionalProperties": false
  21139. }
  21140. },
  21141. "required": ["input", "output", "cache", "tier"],
  21142. "additionalProperties": false
  21143. }
  21144. },
  21145. "experimentalOver200K": {
  21146. "type": "object",
  21147. "properties": {
  21148. "input": {
  21149. "type": "number"
  21150. },
  21151. "output": {
  21152. "type": "number"
  21153. },
  21154. "cache": {
  21155. "type": "object",
  21156. "properties": {
  21157. "read": {
  21158. "type": "number"
  21159. },
  21160. "write": {
  21161. "type": "number"
  21162. }
  21163. },
  21164. "required": ["read", "write"],
  21165. "additionalProperties": false
  21166. }
  21167. },
  21168. "required": ["input", "output", "cache"],
  21169. "additionalProperties": false
  21170. }
  21171. },
  21172. "required": ["input", "output", "cache"],
  21173. "additionalProperties": false
  21174. },
  21175. "limit": {
  21176. "type": "object",
  21177. "properties": {
  21178. "context": {
  21179. "type": "number"
  21180. },
  21181. "input": {
  21182. "type": "number"
  21183. },
  21184. "output": {
  21185. "type": "number"
  21186. }
  21187. },
  21188. "required": ["context", "output"],
  21189. "additionalProperties": false
  21190. },
  21191. "status": {
  21192. "type": "string",
  21193. "enum": ["alpha", "beta", "deprecated", "active"]
  21194. },
  21195. "options": {
  21196. "type": "object"
  21197. },
  21198. "headers": {
  21199. "type": "object",
  21200. "additionalProperties": {
  21201. "type": "string"
  21202. }
  21203. },
  21204. "release_date": {
  21205. "type": "string"
  21206. },
  21207. "variants": {
  21208. "type": "object",
  21209. "additionalProperties": {
  21210. "type": "object"
  21211. }
  21212. }
  21213. },
  21214. "required": [
  21215. "id",
  21216. "providerID",
  21217. "api",
  21218. "name",
  21219. "capabilities",
  21220. "cost",
  21221. "limit",
  21222. "status",
  21223. "options",
  21224. "headers",
  21225. "release_date"
  21226. ],
  21227. "additionalProperties": false
  21228. },
  21229. "Provider": {
  21230. "type": "object",
  21231. "properties": {
  21232. "id": {
  21233. "type": "string"
  21234. },
  21235. "name": {
  21236. "type": "string"
  21237. },
  21238. "source": {
  21239. "type": "string",
  21240. "enum": ["env", "config", "custom", "api"]
  21241. },
  21242. "env": {
  21243. "type": "array",
  21244. "items": {
  21245. "type": "string"
  21246. }
  21247. },
  21248. "key": {
  21249. "type": "string"
  21250. },
  21251. "options": {
  21252. "type": "object"
  21253. },
  21254. "models": {
  21255. "type": "object",
  21256. "additionalProperties": {
  21257. "$ref": "#/components/schemas/Model"
  21258. }
  21259. }
  21260. },
  21261. "required": ["id", "name", "source", "env", "options", "models"],
  21262. "additionalProperties": false
  21263. },
  21264. "ExperimentalCapabilities": {
  21265. "type": "object",
  21266. "properties": {
  21267. "backgroundSubagents": {
  21268. "type": "boolean"
  21269. }
  21270. },
  21271. "required": ["backgroundSubagents"],
  21272. "additionalProperties": false
  21273. },
  21274. "ConsoleState": {
  21275. "type": "object",
  21276. "properties": {
  21277. "consoleManagedProviders": {
  21278. "type": "array",
  21279. "items": {
  21280. "type": "string"
  21281. }
  21282. },
  21283. "activeOrgName": {
  21284. "type": "string"
  21285. },
  21286. "switchableOrgCount": {
  21287. "type": "integer",
  21288. "minimum": 0
  21289. }
  21290. },
  21291. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21292. "additionalProperties": false
  21293. },
  21294. "effect_HttpApiError_InternalServerError": {
  21295. "type": "object",
  21296. "properties": {
  21297. "_tag": {
  21298. "type": "string",
  21299. "enum": ["InternalServerError"]
  21300. }
  21301. },
  21302. "required": ["_tag"],
  21303. "additionalProperties": false
  21304. },
  21305. "ToolListItem": {
  21306. "type": "object",
  21307. "properties": {
  21308. "id": {
  21309. "type": "string"
  21310. },
  21311. "description": {
  21312. "type": "string"
  21313. },
  21314. "parameters": {}
  21315. },
  21316. "required": ["id", "description", "parameters"],
  21317. "additionalProperties": false
  21318. },
  21319. "ToolList": {
  21320. "type": "array",
  21321. "items": {
  21322. "$ref": "#/components/schemas/ToolListItem"
  21323. }
  21324. },
  21325. "ToolIDs": {
  21326. "type": "array",
  21327. "items": {
  21328. "type": "string"
  21329. }
  21330. },
  21331. "WorktreeError": {
  21332. "type": "object",
  21333. "properties": {
  21334. "name": {
  21335. "type": "string",
  21336. "enum": [
  21337. "WorktreeNotGitError",
  21338. "WorktreeNameGenerationFailedError",
  21339. "WorktreeCreateFailedError",
  21340. "WorktreeStartCommandFailedError",
  21341. "WorktreeRemoveFailedError",
  21342. "WorktreeResetFailedError",
  21343. "WorktreeListFailedError"
  21344. ]
  21345. },
  21346. "data": {
  21347. "type": "object",
  21348. "properties": {
  21349. "message": {
  21350. "type": "string"
  21351. }
  21352. },
  21353. "required": ["message"],
  21354. "additionalProperties": false
  21355. }
  21356. },
  21357. "required": ["name", "data"],
  21358. "additionalProperties": false
  21359. },
  21360. "WorktreeCreateInput": {
  21361. "type": "object",
  21362. "properties": {
  21363. "name": {
  21364. "type": "string"
  21365. },
  21366. "startCommand": {
  21367. "type": "string",
  21368. "description": "Additional startup script to run after the project's start command"
  21369. }
  21370. },
  21371. "additionalProperties": false
  21372. },
  21373. "Worktree": {
  21374. "type": "object",
  21375. "properties": {
  21376. "name": {
  21377. "type": "string"
  21378. },
  21379. "branch": {
  21380. "type": "string"
  21381. },
  21382. "directory": {
  21383. "type": "string"
  21384. }
  21385. },
  21386. "required": ["name", "directory"],
  21387. "additionalProperties": false
  21388. },
  21389. "WorktreeRemoveInput": {
  21390. "type": "object",
  21391. "properties": {
  21392. "directory": {
  21393. "type": "string"
  21394. }
  21395. },
  21396. "required": ["directory"],
  21397. "additionalProperties": false
  21398. },
  21399. "WorktreeResetInput": {
  21400. "type": "object",
  21401. "properties": {
  21402. "directory": {
  21403. "type": "string"
  21404. }
  21405. },
  21406. "required": ["directory"],
  21407. "additionalProperties": false
  21408. },
  21409. "ProjectSummary": {
  21410. "type": "object",
  21411. "properties": {
  21412. "id": {
  21413. "type": "string"
  21414. },
  21415. "name": {
  21416. "type": "string"
  21417. },
  21418. "worktree": {
  21419. "type": "string"
  21420. }
  21421. },
  21422. "required": ["id", "worktree"],
  21423. "additionalProperties": false
  21424. },
  21425. "GlobalSession": {
  21426. "type": "object",
  21427. "properties": {
  21428. "id": {
  21429. "type": "string",
  21430. "pattern": "^ses"
  21431. },
  21432. "slug": {
  21433. "type": "string"
  21434. },
  21435. "projectID": {
  21436. "type": "string"
  21437. },
  21438. "workspaceID": {
  21439. "type": "string",
  21440. "pattern": "^wrk"
  21441. },
  21442. "directory": {
  21443. "type": "string"
  21444. },
  21445. "path": {
  21446. "type": "string"
  21447. },
  21448. "parentID": {
  21449. "type": "string",
  21450. "pattern": "^ses"
  21451. },
  21452. "summary": {
  21453. "type": "object",
  21454. "properties": {
  21455. "additions": {
  21456. "type": "number"
  21457. },
  21458. "deletions": {
  21459. "type": "number"
  21460. },
  21461. "files": {
  21462. "type": "number"
  21463. },
  21464. "diffs": {
  21465. "type": "array",
  21466. "items": {
  21467. "$ref": "#/components/schemas/SnapshotFileDiff"
  21468. }
  21469. }
  21470. },
  21471. "required": ["additions", "deletions", "files"],
  21472. "additionalProperties": false
  21473. },
  21474. "cost": {
  21475. "type": "number"
  21476. },
  21477. "tokens": {
  21478. "type": "object",
  21479. "properties": {
  21480. "input": {
  21481. "type": "number"
  21482. },
  21483. "output": {
  21484. "type": "number"
  21485. },
  21486. "reasoning": {
  21487. "type": "number"
  21488. },
  21489. "cache": {
  21490. "type": "object",
  21491. "properties": {
  21492. "read": {
  21493. "type": "number"
  21494. },
  21495. "write": {
  21496. "type": "number"
  21497. }
  21498. },
  21499. "required": ["read", "write"],
  21500. "additionalProperties": false
  21501. }
  21502. },
  21503. "required": ["input", "output", "reasoning", "cache"],
  21504. "additionalProperties": false
  21505. },
  21506. "share": {
  21507. "type": "object",
  21508. "properties": {
  21509. "url": {
  21510. "type": "string"
  21511. }
  21512. },
  21513. "required": ["url"],
  21514. "additionalProperties": false
  21515. },
  21516. "title": {
  21517. "type": "string"
  21518. },
  21519. "agent": {
  21520. "type": "string"
  21521. },
  21522. "model": {
  21523. "type": "object",
  21524. "properties": {
  21525. "id": {
  21526. "type": "string"
  21527. },
  21528. "providerID": {
  21529. "type": "string"
  21530. },
  21531. "variant": {
  21532. "type": "string"
  21533. }
  21534. },
  21535. "required": ["id", "providerID"],
  21536. "additionalProperties": false
  21537. },
  21538. "version": {
  21539. "type": "string"
  21540. },
  21541. "metadata": {
  21542. "type": "object"
  21543. },
  21544. "time": {
  21545. "type": "object",
  21546. "properties": {
  21547. "created": {
  21548. "type": "integer",
  21549. "minimum": 0
  21550. },
  21551. "updated": {
  21552. "type": "integer",
  21553. "minimum": 0
  21554. },
  21555. "compacting": {
  21556. "type": "integer",
  21557. "minimum": 0
  21558. },
  21559. "archived": {
  21560. "type": "number"
  21561. }
  21562. },
  21563. "required": ["created", "updated"],
  21564. "additionalProperties": false
  21565. },
  21566. "permission": {
  21567. "$ref": "#/components/schemas/PermissionRuleset"
  21568. },
  21569. "revert": {
  21570. "type": "object",
  21571. "properties": {
  21572. "messageID": {
  21573. "type": "string",
  21574. "pattern": "^msg"
  21575. },
  21576. "partID": {
  21577. "type": "string",
  21578. "pattern": "^prt"
  21579. },
  21580. "snapshot": {
  21581. "type": "string"
  21582. },
  21583. "diff": {
  21584. "type": "string"
  21585. }
  21586. },
  21587. "required": ["messageID"],
  21588. "additionalProperties": false
  21589. },
  21590. "project": {
  21591. "anyOf": [
  21592. {
  21593. "$ref": "#/components/schemas/ProjectSummary"
  21594. },
  21595. {
  21596. "type": "null"
  21597. }
  21598. ]
  21599. }
  21600. },
  21601. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21602. "additionalProperties": false
  21603. },
  21604. "McpResource": {
  21605. "type": "object",
  21606. "properties": {
  21607. "name": {
  21608. "type": "string"
  21609. },
  21610. "uri": {
  21611. "type": "string"
  21612. },
  21613. "description": {
  21614. "type": "string"
  21615. },
  21616. "mimeType": {
  21617. "type": "string"
  21618. },
  21619. "client": {
  21620. "type": "string"
  21621. }
  21622. },
  21623. "required": ["name", "uri", "client"],
  21624. "additionalProperties": false
  21625. },
  21626. "Symbol": {
  21627. "type": "object",
  21628. "properties": {
  21629. "name": {
  21630. "type": "string"
  21631. },
  21632. "kind": {
  21633. "type": "integer",
  21634. "minimum": 0
  21635. },
  21636. "location": {
  21637. "type": "object",
  21638. "properties": {
  21639. "uri": {
  21640. "type": "string"
  21641. },
  21642. "range": {
  21643. "$ref": "#/components/schemas/Range"
  21644. }
  21645. },
  21646. "required": ["uri", "range"],
  21647. "additionalProperties": false
  21648. }
  21649. },
  21650. "required": ["name", "kind", "location"],
  21651. "additionalProperties": false
  21652. },
  21653. "FileNode": {
  21654. "type": "object",
  21655. "properties": {
  21656. "name": {
  21657. "type": "string"
  21658. },
  21659. "path": {
  21660. "type": "string"
  21661. },
  21662. "absolute": {
  21663. "type": "string"
  21664. },
  21665. "type": {
  21666. "type": "string",
  21667. "enum": ["file", "directory"]
  21668. },
  21669. "ignored": {
  21670. "type": "boolean"
  21671. }
  21672. },
  21673. "required": ["name", "path", "absolute", "type", "ignored"],
  21674. "additionalProperties": false
  21675. },
  21676. "FileContent": {
  21677. "type": "object",
  21678. "properties": {
  21679. "type": {
  21680. "type": "string",
  21681. "enum": ["text", "binary"]
  21682. },
  21683. "content": {
  21684. "type": "string"
  21685. },
  21686. "diff": {
  21687. "type": "string"
  21688. },
  21689. "patch": {
  21690. "type": "object",
  21691. "properties": {
  21692. "oldFileName": {
  21693. "type": "string"
  21694. },
  21695. "newFileName": {
  21696. "type": "string"
  21697. },
  21698. "oldHeader": {
  21699. "type": "string"
  21700. },
  21701. "newHeader": {
  21702. "type": "string"
  21703. },
  21704. "hunks": {
  21705. "type": "array",
  21706. "items": {
  21707. "type": "object",
  21708. "properties": {
  21709. "oldStart": {
  21710. "type": "integer",
  21711. "minimum": 0
  21712. },
  21713. "oldLines": {
  21714. "type": "integer",
  21715. "minimum": 0
  21716. },
  21717. "newStart": {
  21718. "type": "integer",
  21719. "minimum": 0
  21720. },
  21721. "newLines": {
  21722. "type": "integer",
  21723. "minimum": 0
  21724. },
  21725. "lines": {
  21726. "type": "array",
  21727. "items": {
  21728. "type": "string"
  21729. }
  21730. }
  21731. },
  21732. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21733. "additionalProperties": false
  21734. }
  21735. },
  21736. "index": {
  21737. "type": "string"
  21738. }
  21739. },
  21740. "required": ["oldFileName", "newFileName", "hunks"],
  21741. "additionalProperties": false
  21742. },
  21743. "encoding": {
  21744. "type": "string",
  21745. "enum": ["base64"]
  21746. },
  21747. "mimeType": {
  21748. "type": "string"
  21749. }
  21750. },
  21751. "required": ["type", "content"],
  21752. "additionalProperties": false
  21753. },
  21754. "File": {
  21755. "type": "object",
  21756. "properties": {
  21757. "path": {
  21758. "type": "string"
  21759. },
  21760. "added": {
  21761. "type": "integer",
  21762. "minimum": 0
  21763. },
  21764. "removed": {
  21765. "type": "integer",
  21766. "minimum": 0
  21767. },
  21768. "status": {
  21769. "type": "string",
  21770. "enum": ["added", "deleted", "modified"]
  21771. }
  21772. },
  21773. "required": ["path", "added", "removed", "status"],
  21774. "additionalProperties": false
  21775. },
  21776. "Path": {
  21777. "type": "object",
  21778. "properties": {
  21779. "home": {
  21780. "type": "string"
  21781. },
  21782. "state": {
  21783. "type": "string"
  21784. },
  21785. "config": {
  21786. "type": "string"
  21787. },
  21788. "worktree": {
  21789. "type": "string"
  21790. },
  21791. "directory": {
  21792. "type": "string"
  21793. }
  21794. },
  21795. "required": ["home", "state", "config", "worktree", "directory"],
  21796. "additionalProperties": false
  21797. },
  21798. "VcsInfo": {
  21799. "type": "object",
  21800. "properties": {
  21801. "branch": {
  21802. "type": "string"
  21803. },
  21804. "default_branch": {
  21805. "type": "string"
  21806. }
  21807. },
  21808. "additionalProperties": false
  21809. },
  21810. "VcsFileStatus": {
  21811. "type": "object",
  21812. "properties": {
  21813. "file": {
  21814. "type": "string"
  21815. },
  21816. "additions": {
  21817. "type": "number"
  21818. },
  21819. "deletions": {
  21820. "type": "number"
  21821. },
  21822. "status": {
  21823. "type": "string",
  21824. "enum": ["added", "deleted", "modified"]
  21825. }
  21826. },
  21827. "required": ["file", "additions", "deletions", "status"],
  21828. "additionalProperties": false
  21829. },
  21830. "VcsFileDiff": {
  21831. "type": "object",
  21832. "properties": {
  21833. "file": {
  21834. "type": "string"
  21835. },
  21836. "patch": {
  21837. "type": "string"
  21838. },
  21839. "additions": {
  21840. "type": "number"
  21841. },
  21842. "deletions": {
  21843. "type": "number"
  21844. },
  21845. "status": {
  21846. "type": "string",
  21847. "enum": ["added", "deleted", "modified"]
  21848. }
  21849. },
  21850. "required": ["file", "additions", "deletions"],
  21851. "additionalProperties": false
  21852. },
  21853. "VcsApplyError": {
  21854. "type": "object",
  21855. "properties": {
  21856. "name": {
  21857. "type": "string",
  21858. "enum": ["VcsApplyError"]
  21859. },
  21860. "data": {
  21861. "type": "object",
  21862. "properties": {
  21863. "message": {
  21864. "type": "string"
  21865. },
  21866. "reason": {
  21867. "type": "string",
  21868. "enum": ["non-git", "not-clean"]
  21869. }
  21870. },
  21871. "required": ["message", "reason"],
  21872. "additionalProperties": false
  21873. }
  21874. },
  21875. "required": ["name", "data"],
  21876. "additionalProperties": false
  21877. },
  21878. "Command": {
  21879. "type": "object",
  21880. "properties": {
  21881. "name": {
  21882. "type": "string"
  21883. },
  21884. "description": {
  21885. "type": "string"
  21886. },
  21887. "agent": {
  21888. "type": "string"
  21889. },
  21890. "model": {
  21891. "type": "string"
  21892. },
  21893. "source": {
  21894. "type": "string",
  21895. "enum": ["command", "mcp", "skill"]
  21896. },
  21897. "template": {
  21898. "type": "string"
  21899. },
  21900. "subtask": {
  21901. "type": "boolean"
  21902. },
  21903. "hints": {
  21904. "type": "array",
  21905. "items": {
  21906. "type": "string"
  21907. }
  21908. }
  21909. },
  21910. "required": ["name", "template", "hints"],
  21911. "additionalProperties": false
  21912. },
  21913. "Agent": {
  21914. "type": "object",
  21915. "properties": {
  21916. "name": {
  21917. "type": "string"
  21918. },
  21919. "description": {
  21920. "type": "string"
  21921. },
  21922. "mode": {
  21923. "type": "string",
  21924. "enum": ["subagent", "primary", "all"]
  21925. },
  21926. "native": {
  21927. "type": "boolean"
  21928. },
  21929. "hidden": {
  21930. "type": "boolean"
  21931. },
  21932. "topP": {
  21933. "type": "number"
  21934. },
  21935. "temperature": {
  21936. "type": "number"
  21937. },
  21938. "color": {
  21939. "type": "string"
  21940. },
  21941. "permission": {
  21942. "$ref": "#/components/schemas/PermissionRuleset"
  21943. },
  21944. "model": {
  21945. "type": "object",
  21946. "properties": {
  21947. "modelID": {
  21948. "type": "string"
  21949. },
  21950. "providerID": {
  21951. "type": "string"
  21952. }
  21953. },
  21954. "required": ["modelID", "providerID"],
  21955. "additionalProperties": false
  21956. },
  21957. "variant": {
  21958. "type": "string"
  21959. },
  21960. "prompt": {
  21961. "type": "string"
  21962. },
  21963. "options": {
  21964. "type": "object"
  21965. },
  21966. "steps": {
  21967. "type": "number"
  21968. }
  21969. },
  21970. "required": ["name", "mode", "permission", "options"],
  21971. "additionalProperties": false
  21972. },
  21973. "LSPStatus": {
  21974. "type": "object",
  21975. "properties": {
  21976. "id": {
  21977. "type": "string"
  21978. },
  21979. "name": {
  21980. "type": "string"
  21981. },
  21982. "root": {
  21983. "type": "string"
  21984. },
  21985. "status": {
  21986. "type": "string",
  21987. "enum": ["connected", "error"]
  21988. }
  21989. },
  21990. "required": ["id", "name", "root", "status"],
  21991. "additionalProperties": false
  21992. },
  21993. "FormatterStatus": {
  21994. "type": "object",
  21995. "properties": {
  21996. "name": {
  21997. "type": "string"
  21998. },
  21999. "extensions": {
  22000. "type": "array",
  22001. "items": {
  22002. "type": "string"
  22003. }
  22004. },
  22005. "enabled": {
  22006. "type": "boolean"
  22007. }
  22008. },
  22009. "required": ["name", "extensions", "enabled"],
  22010. "additionalProperties": false
  22011. },
  22012. "MCPStatusConnected": {
  22013. "type": "object",
  22014. "properties": {
  22015. "status": {
  22016. "type": "string",
  22017. "enum": ["connected"]
  22018. }
  22019. },
  22020. "required": ["status"],
  22021. "additionalProperties": false
  22022. },
  22023. "MCPStatusDisabled": {
  22024. "type": "object",
  22025. "properties": {
  22026. "status": {
  22027. "type": "string",
  22028. "enum": ["disabled"]
  22029. }
  22030. },
  22031. "required": ["status"],
  22032. "additionalProperties": false
  22033. },
  22034. "MCPStatusFailed": {
  22035. "type": "object",
  22036. "properties": {
  22037. "status": {
  22038. "type": "string",
  22039. "enum": ["failed"]
  22040. },
  22041. "error": {
  22042. "type": "string"
  22043. }
  22044. },
  22045. "required": ["status", "error"],
  22046. "additionalProperties": false
  22047. },
  22048. "MCPStatusNeedsAuth": {
  22049. "type": "object",
  22050. "properties": {
  22051. "status": {
  22052. "type": "string",
  22053. "enum": ["needs_auth"]
  22054. }
  22055. },
  22056. "required": ["status"],
  22057. "additionalProperties": false
  22058. },
  22059. "MCPStatusNeedsClientRegistration": {
  22060. "type": "object",
  22061. "properties": {
  22062. "status": {
  22063. "type": "string",
  22064. "enum": ["needs_client_registration"]
  22065. },
  22066. "error": {
  22067. "type": "string"
  22068. }
  22069. },
  22070. "required": ["status", "error"],
  22071. "additionalProperties": false
  22072. },
  22073. "MCPStatus": {
  22074. "anyOf": [
  22075. {
  22076. "$ref": "#/components/schemas/MCPStatusConnected"
  22077. },
  22078. {
  22079. "$ref": "#/components/schemas/MCPStatusDisabled"
  22080. },
  22081. {
  22082. "$ref": "#/components/schemas/MCPStatusFailed"
  22083. },
  22084. {
  22085. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22086. },
  22087. {
  22088. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22089. }
  22090. ]
  22091. },
  22092. "McpUnsupportedOAuthError": {
  22093. "type": "object",
  22094. "properties": {
  22095. "error": {
  22096. "type": "string"
  22097. }
  22098. },
  22099. "required": ["error"],
  22100. "additionalProperties": false
  22101. },
  22102. "McpServerNotFoundError": {
  22103. "type": "object",
  22104. "properties": {
  22105. "_tag": {
  22106. "type": "string",
  22107. "enum": ["McpServerNotFoundError"]
  22108. },
  22109. "name": {
  22110. "type": "string"
  22111. },
  22112. "message": {
  22113. "type": "string"
  22114. }
  22115. },
  22116. "required": ["_tag", "name", "message"],
  22117. "additionalProperties": false
  22118. },
  22119. "Project": {
  22120. "type": "object",
  22121. "properties": {
  22122. "id": {
  22123. "type": "string"
  22124. },
  22125. "worktree": {
  22126. "type": "string"
  22127. },
  22128. "vcs": {
  22129. "type": "string",
  22130. "enum": ["git"]
  22131. },
  22132. "name": {
  22133. "type": "string"
  22134. },
  22135. "icon": {
  22136. "type": "object",
  22137. "properties": {
  22138. "url": {
  22139. "type": "string"
  22140. },
  22141. "override": {
  22142. "type": "string"
  22143. },
  22144. "color": {
  22145. "type": "string"
  22146. }
  22147. },
  22148. "additionalProperties": false
  22149. },
  22150. "commands": {
  22151. "type": "object",
  22152. "properties": {
  22153. "start": {
  22154. "type": "string",
  22155. "description": "Startup script to run when creating a new workspace (worktree)"
  22156. }
  22157. },
  22158. "additionalProperties": false
  22159. },
  22160. "time": {
  22161. "type": "object",
  22162. "properties": {
  22163. "created": {
  22164. "type": "integer",
  22165. "minimum": 0
  22166. },
  22167. "updated": {
  22168. "type": "integer",
  22169. "minimum": 0
  22170. },
  22171. "initialized": {
  22172. "type": "integer",
  22173. "minimum": 0
  22174. }
  22175. },
  22176. "required": ["created", "updated"],
  22177. "additionalProperties": false
  22178. },
  22179. "sandboxes": {
  22180. "type": "array",
  22181. "items": {
  22182. "type": "string"
  22183. }
  22184. }
  22185. },
  22186. "required": ["id", "worktree", "time", "sandboxes"],
  22187. "additionalProperties": false
  22188. },
  22189. "ProjectNotFoundError": {
  22190. "type": "object",
  22191. "properties": {
  22192. "_tag": {
  22193. "type": "string",
  22194. "enum": ["ProjectNotFoundError"]
  22195. },
  22196. "projectID": {
  22197. "type": "string"
  22198. },
  22199. "message": {
  22200. "type": "string"
  22201. }
  22202. },
  22203. "required": ["_tag", "projectID", "message"],
  22204. "additionalProperties": false
  22205. },
  22206. "PtyNotFoundError": {
  22207. "type": "object",
  22208. "properties": {
  22209. "_tag": {
  22210. "type": "string",
  22211. "enum": ["PtyNotFoundError"]
  22212. },
  22213. "ptyID": {
  22214. "type": "string"
  22215. },
  22216. "message": {
  22217. "type": "string"
  22218. }
  22219. },
  22220. "required": ["_tag", "ptyID", "message"],
  22221. "additionalProperties": false
  22222. },
  22223. "PtyForbiddenError": {
  22224. "type": "object",
  22225. "properties": {
  22226. "_tag": {
  22227. "type": "string",
  22228. "enum": ["PtyForbiddenError"]
  22229. },
  22230. "message": {
  22231. "type": "string"
  22232. }
  22233. },
  22234. "required": ["_tag", "message"],
  22235. "additionalProperties": false
  22236. },
  22237. "QuestionRequest": {
  22238. "type": "object",
  22239. "properties": {
  22240. "id": {
  22241. "type": "string",
  22242. "pattern": "^que"
  22243. },
  22244. "sessionID": {
  22245. "type": "string",
  22246. "pattern": "^ses"
  22247. },
  22248. "questions": {
  22249. "type": "array",
  22250. "items": {
  22251. "$ref": "#/components/schemas/QuestionInfo"
  22252. },
  22253. "description": "Questions to ask"
  22254. },
  22255. "tool": {
  22256. "$ref": "#/components/schemas/QuestionTool"
  22257. }
  22258. },
  22259. "required": ["id", "sessionID", "questions"],
  22260. "additionalProperties": false
  22261. },
  22262. "QuestionNotFoundError": {
  22263. "type": "object",
  22264. "properties": {
  22265. "_tag": {
  22266. "type": "string",
  22267. "enum": ["QuestionNotFoundError"]
  22268. },
  22269. "requestID": {
  22270. "type": "string"
  22271. },
  22272. "message": {
  22273. "type": "string"
  22274. }
  22275. },
  22276. "required": ["_tag", "requestID", "message"],
  22277. "additionalProperties": false
  22278. },
  22279. "PermissionRequest": {
  22280. "type": "object",
  22281. "properties": {
  22282. "id": {
  22283. "type": "string",
  22284. "pattern": "^per"
  22285. },
  22286. "sessionID": {
  22287. "type": "string",
  22288. "pattern": "^ses"
  22289. },
  22290. "permission": {
  22291. "type": "string"
  22292. },
  22293. "patterns": {
  22294. "type": "array",
  22295. "items": {
  22296. "type": "string"
  22297. }
  22298. },
  22299. "metadata": {
  22300. "type": "object"
  22301. },
  22302. "always": {
  22303. "type": "array",
  22304. "items": {
  22305. "type": "string"
  22306. }
  22307. },
  22308. "tool": {
  22309. "type": "object",
  22310. "properties": {
  22311. "messageID": {
  22312. "type": "string"
  22313. },
  22314. "callID": {
  22315. "type": "string"
  22316. }
  22317. },
  22318. "required": ["messageID", "callID"],
  22319. "additionalProperties": false
  22320. }
  22321. },
  22322. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22323. "additionalProperties": false
  22324. },
  22325. "PermissionNotFoundError": {
  22326. "type": "object",
  22327. "properties": {
  22328. "_tag": {
  22329. "type": "string",
  22330. "enum": ["PermissionNotFoundError"]
  22331. },
  22332. "requestID": {
  22333. "type": "string"
  22334. },
  22335. "message": {
  22336. "type": "string"
  22337. }
  22338. },
  22339. "required": ["_tag", "requestID", "message"],
  22340. "additionalProperties": false
  22341. },
  22342. "ProviderAuthMethod": {
  22343. "type": "object",
  22344. "properties": {
  22345. "type": {
  22346. "type": "string",
  22347. "enum": ["oauth", "api"]
  22348. },
  22349. "label": {
  22350. "type": "string"
  22351. },
  22352. "prompts": {
  22353. "type": "array",
  22354. "items": {
  22355. "anyOf": [
  22356. {
  22357. "type": "object",
  22358. "properties": {
  22359. "type": {
  22360. "type": "string",
  22361. "enum": ["text"]
  22362. },
  22363. "key": {
  22364. "type": "string"
  22365. },
  22366. "message": {
  22367. "type": "string"
  22368. },
  22369. "placeholder": {
  22370. "type": "string"
  22371. },
  22372. "when": {
  22373. "type": "object",
  22374. "properties": {
  22375. "key": {
  22376. "type": "string"
  22377. },
  22378. "op": {
  22379. "type": "string",
  22380. "enum": ["eq", "neq"]
  22381. },
  22382. "value": {
  22383. "type": "string"
  22384. }
  22385. },
  22386. "required": ["key", "op", "value"],
  22387. "additionalProperties": false
  22388. }
  22389. },
  22390. "required": ["type", "key", "message"],
  22391. "additionalProperties": false
  22392. },
  22393. {
  22394. "type": "object",
  22395. "properties": {
  22396. "type": {
  22397. "type": "string",
  22398. "enum": ["select"]
  22399. },
  22400. "key": {
  22401. "type": "string"
  22402. },
  22403. "message": {
  22404. "type": "string"
  22405. },
  22406. "options": {
  22407. "type": "array",
  22408. "items": {
  22409. "type": "object",
  22410. "properties": {
  22411. "label": {
  22412. "type": "string"
  22413. },
  22414. "value": {
  22415. "type": "string"
  22416. },
  22417. "hint": {
  22418. "type": "string"
  22419. }
  22420. },
  22421. "required": ["label", "value"],
  22422. "additionalProperties": false
  22423. }
  22424. },
  22425. "when": {
  22426. "type": "object",
  22427. "properties": {
  22428. "key": {
  22429. "type": "string"
  22430. },
  22431. "op": {
  22432. "type": "string",
  22433. "enum": ["eq", "neq"]
  22434. },
  22435. "value": {
  22436. "type": "string"
  22437. }
  22438. },
  22439. "required": ["key", "op", "value"],
  22440. "additionalProperties": false
  22441. }
  22442. },
  22443. "required": ["type", "key", "message", "options"],
  22444. "additionalProperties": false
  22445. }
  22446. ]
  22447. }
  22448. }
  22449. },
  22450. "required": ["type", "label"],
  22451. "additionalProperties": false
  22452. },
  22453. "ProviderAuthAuthorization": {
  22454. "type": "object",
  22455. "properties": {
  22456. "url": {
  22457. "type": "string"
  22458. },
  22459. "method": {
  22460. "type": "string",
  22461. "enum": ["auto", "code"]
  22462. },
  22463. "instructions": {
  22464. "type": "string"
  22465. }
  22466. },
  22467. "required": ["url", "method", "instructions"],
  22468. "additionalProperties": false
  22469. },
  22470. "ProviderAuthError1": {
  22471. "type": "object",
  22472. "properties": {
  22473. "name": {
  22474. "type": "string",
  22475. "enum": [
  22476. "BadRequest",
  22477. "ProviderAuthOauthMissing",
  22478. "ProviderAuthOauthCodeMissing",
  22479. "ProviderAuthOauthCallbackFailed",
  22480. "ProviderAuthValidationFailed"
  22481. ]
  22482. },
  22483. "data": {
  22484. "type": "object",
  22485. "properties": {
  22486. "providerID": {
  22487. "type": "string"
  22488. },
  22489. "field": {
  22490. "type": "string"
  22491. },
  22492. "message": {
  22493. "type": "string"
  22494. },
  22495. "kind": {
  22496. "type": "string"
  22497. }
  22498. },
  22499. "additionalProperties": false
  22500. }
  22501. },
  22502. "required": ["name", "data"],
  22503. "additionalProperties": false
  22504. },
  22505. "NotFoundError": {
  22506. "type": "object",
  22507. "required": ["name", "data"],
  22508. "properties": {
  22509. "name": {
  22510. "type": "string",
  22511. "enum": ["NotFoundError"]
  22512. },
  22513. "data": {
  22514. "type": "object",
  22515. "required": ["message"],
  22516. "properties": {
  22517. "message": {
  22518. "type": "string"
  22519. }
  22520. }
  22521. }
  22522. }
  22523. },
  22524. "TextPartInput": {
  22525. "type": "object",
  22526. "properties": {
  22527. "id": {
  22528. "type": "string",
  22529. "pattern": "^prt"
  22530. },
  22531. "type": {
  22532. "type": "string",
  22533. "enum": ["text"]
  22534. },
  22535. "text": {
  22536. "type": "string"
  22537. },
  22538. "synthetic": {
  22539. "type": "boolean"
  22540. },
  22541. "ignored": {
  22542. "type": "boolean"
  22543. },
  22544. "time": {
  22545. "type": "object",
  22546. "properties": {
  22547. "start": {
  22548. "type": "integer",
  22549. "minimum": 0
  22550. },
  22551. "end": {
  22552. "type": "integer",
  22553. "minimum": 0
  22554. }
  22555. },
  22556. "required": ["start"],
  22557. "additionalProperties": false
  22558. },
  22559. "metadata": {
  22560. "type": "object"
  22561. }
  22562. },
  22563. "required": ["type", "text"],
  22564. "additionalProperties": false
  22565. },
  22566. "FilePartInput": {
  22567. "type": "object",
  22568. "properties": {
  22569. "id": {
  22570. "type": "string",
  22571. "pattern": "^prt"
  22572. },
  22573. "type": {
  22574. "type": "string",
  22575. "enum": ["file"]
  22576. },
  22577. "mime": {
  22578. "type": "string"
  22579. },
  22580. "filename": {
  22581. "type": "string"
  22582. },
  22583. "url": {
  22584. "type": "string"
  22585. },
  22586. "source": {
  22587. "$ref": "#/components/schemas/FilePartSource"
  22588. }
  22589. },
  22590. "required": ["type", "mime", "url"],
  22591. "additionalProperties": false
  22592. },
  22593. "AgentPartInput": {
  22594. "type": "object",
  22595. "properties": {
  22596. "id": {
  22597. "type": "string",
  22598. "pattern": "^prt"
  22599. },
  22600. "type": {
  22601. "type": "string",
  22602. "enum": ["agent"]
  22603. },
  22604. "name": {
  22605. "type": "string"
  22606. },
  22607. "source": {
  22608. "type": "object",
  22609. "properties": {
  22610. "value": {
  22611. "type": "string"
  22612. },
  22613. "start": {
  22614. "type": "integer",
  22615. "minimum": 0
  22616. },
  22617. "end": {
  22618. "type": "integer",
  22619. "minimum": 0
  22620. }
  22621. },
  22622. "required": ["value", "start", "end"],
  22623. "additionalProperties": false
  22624. }
  22625. },
  22626. "required": ["type", "name"],
  22627. "additionalProperties": false
  22628. },
  22629. "SubtaskPartInput": {
  22630. "type": "object",
  22631. "properties": {
  22632. "id": {
  22633. "type": "string",
  22634. "pattern": "^prt"
  22635. },
  22636. "type": {
  22637. "type": "string",
  22638. "enum": ["subtask"]
  22639. },
  22640. "prompt": {
  22641. "type": "string"
  22642. },
  22643. "description": {
  22644. "type": "string"
  22645. },
  22646. "agent": {
  22647. "type": "string"
  22648. },
  22649. "model": {
  22650. "type": "object",
  22651. "properties": {
  22652. "providerID": {
  22653. "type": "string"
  22654. },
  22655. "modelID": {
  22656. "type": "string"
  22657. }
  22658. },
  22659. "required": ["providerID", "modelID"],
  22660. "additionalProperties": false
  22661. },
  22662. "command": {
  22663. "type": "string"
  22664. }
  22665. },
  22666. "required": ["type", "prompt", "description", "agent"],
  22667. "additionalProperties": false
  22668. },
  22669. "SessionBusyError": {
  22670. "type": "object",
  22671. "properties": {
  22672. "_tag": {
  22673. "type": "string",
  22674. "enum": ["SessionBusyError"]
  22675. },
  22676. "sessionID": {
  22677. "type": "string"
  22678. },
  22679. "message": {
  22680. "type": "string"
  22681. }
  22682. },
  22683. "required": ["_tag", "sessionID", "message"],
  22684. "additionalProperties": false
  22685. },
  22686. "EventTuiPromptAppend": {
  22687. "type": "object",
  22688. "properties": {
  22689. "type": {
  22690. "type": "string",
  22691. "enum": ["tui.prompt.append"]
  22692. },
  22693. "properties": {
  22694. "type": "object",
  22695. "properties": {
  22696. "text": {
  22697. "type": "string"
  22698. }
  22699. },
  22700. "required": ["text"],
  22701. "additionalProperties": false
  22702. }
  22703. },
  22704. "required": ["type", "properties"],
  22705. "additionalProperties": false
  22706. },
  22707. "EventTuiCommandExecute": {
  22708. "type": "object",
  22709. "properties": {
  22710. "type": {
  22711. "type": "string",
  22712. "enum": ["tui.command.execute"]
  22713. },
  22714. "properties": {
  22715. "type": "object",
  22716. "properties": {
  22717. "command": {
  22718. "anyOf": [
  22719. {
  22720. "type": "string",
  22721. "enum": [
  22722. "session.list",
  22723. "session.new",
  22724. "session.share",
  22725. "session.interrupt",
  22726. "session.compact",
  22727. "session.page.up",
  22728. "session.page.down",
  22729. "session.line.up",
  22730. "session.line.down",
  22731. "session.half.page.up",
  22732. "session.half.page.down",
  22733. "session.first",
  22734. "session.last",
  22735. "prompt.clear",
  22736. "prompt.submit",
  22737. "agent.cycle"
  22738. ]
  22739. },
  22740. {
  22741. "type": "string"
  22742. }
  22743. ]
  22744. }
  22745. },
  22746. "required": ["command"],
  22747. "additionalProperties": false
  22748. }
  22749. },
  22750. "required": ["type", "properties"],
  22751. "additionalProperties": false
  22752. },
  22753. "EventTuiToastShow": {
  22754. "type": "object",
  22755. "properties": {
  22756. "type": {
  22757. "type": "string",
  22758. "enum": ["tui.toast.show"]
  22759. },
  22760. "properties": {
  22761. "type": "object",
  22762. "properties": {
  22763. "title": {
  22764. "type": "string"
  22765. },
  22766. "message": {
  22767. "type": "string"
  22768. },
  22769. "variant": {
  22770. "type": "string",
  22771. "enum": ["info", "success", "warning", "error"]
  22772. },
  22773. "duration": {
  22774. "type": "integer",
  22775. "exclusiveMinimum": 0
  22776. }
  22777. },
  22778. "required": ["message", "variant"],
  22779. "additionalProperties": false
  22780. }
  22781. },
  22782. "required": ["type", "properties"],
  22783. "additionalProperties": false
  22784. },
  22785. "EventTuiSessionSelect": {
  22786. "type": "object",
  22787. "properties": {
  22788. "type": {
  22789. "type": "string",
  22790. "enum": ["tui.session.select"]
  22791. },
  22792. "properties": {
  22793. "type": "object",
  22794. "properties": {
  22795. "sessionID": {
  22796. "type": "string",
  22797. "pattern": "^ses",
  22798. "description": "Session ID to navigate to"
  22799. }
  22800. },
  22801. "required": ["sessionID"],
  22802. "additionalProperties": false
  22803. }
  22804. },
  22805. "required": ["type", "properties"],
  22806. "additionalProperties": false
  22807. },
  22808. "Workspace": {
  22809. "type": "object",
  22810. "properties": {
  22811. "id": {
  22812. "type": "string",
  22813. "pattern": "^wrk"
  22814. },
  22815. "type": {
  22816. "type": "string"
  22817. },
  22818. "name": {
  22819. "type": "string"
  22820. },
  22821. "branch": {
  22822. "anyOf": [
  22823. {
  22824. "type": "string"
  22825. },
  22826. {
  22827. "type": "null"
  22828. }
  22829. ]
  22830. },
  22831. "directory": {
  22832. "anyOf": [
  22833. {
  22834. "type": "string"
  22835. },
  22836. {
  22837. "type": "null"
  22838. }
  22839. ]
  22840. },
  22841. "extra": {
  22842. "anyOf": [
  22843. {},
  22844. {
  22845. "type": "null"
  22846. }
  22847. ]
  22848. },
  22849. "projectID": {
  22850. "type": "string"
  22851. },
  22852. "timeUsed": {
  22853. "anyOf": [
  22854. {
  22855. "type": "number"
  22856. },
  22857. {
  22858. "type": "string",
  22859. "enum": ["NaN"]
  22860. },
  22861. {
  22862. "type": "string",
  22863. "enum": ["Infinity"]
  22864. },
  22865. {
  22866. "type": "string",
  22867. "enum": ["-Infinity"]
  22868. },
  22869. {
  22870. "type": "string",
  22871. "enum": ["Infinity", "-Infinity", "NaN"]
  22872. }
  22873. ]
  22874. }
  22875. },
  22876. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22877. "additionalProperties": false
  22878. },
  22879. "WorkspaceCreateError": {
  22880. "type": "object",
  22881. "properties": {
  22882. "name": {
  22883. "type": "string",
  22884. "enum": ["WorkspaceCreateError"]
  22885. },
  22886. "data": {
  22887. "type": "object",
  22888. "properties": {
  22889. "message": {
  22890. "type": "string"
  22891. }
  22892. },
  22893. "required": ["message"],
  22894. "additionalProperties": false
  22895. }
  22896. },
  22897. "required": ["name", "data"],
  22898. "additionalProperties": false
  22899. },
  22900. "WorkspaceWarpError": {
  22901. "type": "object",
  22902. "properties": {
  22903. "name": {
  22904. "type": "string",
  22905. "enum": ["WorkspaceWarpError"]
  22906. },
  22907. "data": {
  22908. "type": "object",
  22909. "properties": {
  22910. "message": {
  22911. "type": "string"
  22912. }
  22913. },
  22914. "required": ["message"],
  22915. "additionalProperties": false
  22916. }
  22917. },
  22918. "required": ["name", "data"],
  22919. "additionalProperties": false
  22920. },
  22921. "UnauthorizedError": {
  22922. "type": "object",
  22923. "properties": {
  22924. "_tag": {
  22925. "type": "string",
  22926. "enum": ["UnauthorizedError"]
  22927. },
  22928. "message": {
  22929. "type": "string"
  22930. }
  22931. },
  22932. "required": ["_tag", "message"],
  22933. "additionalProperties": false
  22934. },
  22935. "SessionsResponse": {
  22936. "type": "object",
  22937. "properties": {
  22938. "data": {
  22939. "type": "array",
  22940. "items": {
  22941. "$ref": "#/components/schemas/SessionV2Info"
  22942. }
  22943. },
  22944. "cursor": {
  22945. "type": "object",
  22946. "properties": {
  22947. "previous": {
  22948. "type": "string"
  22949. },
  22950. "next": {
  22951. "type": "string"
  22952. }
  22953. },
  22954. "additionalProperties": false
  22955. }
  22956. },
  22957. "required": ["data", "cursor"],
  22958. "additionalProperties": false
  22959. },
  22960. "InvalidCursorError": {
  22961. "type": "object",
  22962. "properties": {
  22963. "_tag": {
  22964. "type": "string",
  22965. "enum": ["InvalidCursorError"]
  22966. },
  22967. "message": {
  22968. "type": "string"
  22969. }
  22970. },
  22971. "required": ["_tag", "message"],
  22972. "additionalProperties": false
  22973. },
  22974. "SessionNotFoundError": {
  22975. "type": "object",
  22976. "properties": {
  22977. "_tag": {
  22978. "type": "string",
  22979. "enum": ["SessionNotFoundError"]
  22980. },
  22981. "sessionID": {
  22982. "type": "string"
  22983. },
  22984. "message": {
  22985. "type": "string"
  22986. }
  22987. },
  22988. "required": ["_tag", "sessionID", "message"],
  22989. "additionalProperties": false
  22990. },
  22991. "ConflictError": {
  22992. "type": "object",
  22993. "properties": {
  22994. "_tag": {
  22995. "type": "string",
  22996. "enum": ["ConflictError"]
  22997. },
  22998. "message": {
  22999. "type": "string"
  23000. },
  23001. "resource": {
  23002. "type": "string"
  23003. }
  23004. },
  23005. "required": ["_tag", "message"],
  23006. "additionalProperties": false
  23007. },
  23008. "ServiceUnavailableError": {
  23009. "type": "object",
  23010. "properties": {
  23011. "_tag": {
  23012. "type": "string",
  23013. "enum": ["ServiceUnavailableError"]
  23014. },
  23015. "message": {
  23016. "type": "string"
  23017. },
  23018. "service": {
  23019. "type": "string"
  23020. }
  23021. },
  23022. "required": ["_tag", "message"],
  23023. "additionalProperties": false
  23024. },
  23025. "UnknownError1": {
  23026. "type": "object",
  23027. "properties": {
  23028. "_tag": {
  23029. "type": "string",
  23030. "enum": ["UnknownError"]
  23031. },
  23032. "message": {
  23033. "type": "string"
  23034. },
  23035. "ref": {
  23036. "type": "string"
  23037. }
  23038. },
  23039. "required": ["_tag", "message"],
  23040. "additionalProperties": false
  23041. },
  23042. "SessionMessagesResponse": {
  23043. "type": "object",
  23044. "properties": {
  23045. "data": {
  23046. "type": "array",
  23047. "items": {
  23048. "$ref": "#/components/schemas/SessionMessage"
  23049. }
  23050. },
  23051. "cursor": {
  23052. "type": "object",
  23053. "properties": {
  23054. "previous": {
  23055. "type": "string"
  23056. },
  23057. "next": {
  23058. "type": "string"
  23059. }
  23060. },
  23061. "additionalProperties": false
  23062. }
  23063. },
  23064. "required": ["data", "cursor"],
  23065. "additionalProperties": false
  23066. },
  23067. "ProviderNotFoundError": {
  23068. "type": "object",
  23069. "properties": {
  23070. "_tag": {
  23071. "type": "string",
  23072. "enum": ["ProviderNotFoundError"]
  23073. },
  23074. "providerID": {
  23075. "type": "string"
  23076. },
  23077. "message": {
  23078. "type": "string"
  23079. }
  23080. },
  23081. "required": ["_tag", "providerID", "message"],
  23082. "additionalProperties": false
  23083. },
  23084. "ForbiddenError": {
  23085. "type": "object",
  23086. "properties": {
  23087. "_tag": {
  23088. "type": "string",
  23089. "enum": ["ForbiddenError"]
  23090. },
  23091. "message": {
  23092. "type": "string"
  23093. }
  23094. },
  23095. "required": ["_tag", "message"],
  23096. "additionalProperties": false
  23097. },
  23098. "ProjectCopyError": {
  23099. "type": "object",
  23100. "properties": {
  23101. "name": {
  23102. "type": "string",
  23103. "enum": ["ProjectCopyError"]
  23104. },
  23105. "data": {
  23106. "type": "object",
  23107. "properties": {
  23108. "message": {
  23109. "type": "string"
  23110. },
  23111. "forceRequired": {
  23112. "type": "boolean"
  23113. }
  23114. },
  23115. "required": ["message"],
  23116. "additionalProperties": false
  23117. }
  23118. },
  23119. "required": ["name", "data"],
  23120. "additionalProperties": false
  23121. },
  23122. "effect_HttpApiError_Forbidden": {
  23123. "type": "object",
  23124. "properties": {
  23125. "_tag": {
  23126. "type": "string",
  23127. "enum": ["Forbidden"]
  23128. }
  23129. },
  23130. "required": ["_tag"],
  23131. "additionalProperties": false
  23132. },
  23133. "Event.tui.prompt.append": {
  23134. "type": "object",
  23135. "properties": {
  23136. "id": {
  23137. "type": "string",
  23138. "pattern": "^evt_"
  23139. },
  23140. "type": {
  23141. "type": "string",
  23142. "enum": ["tui.prompt.append"]
  23143. },
  23144. "properties": {
  23145. "type": "object",
  23146. "properties": {
  23147. "text": {
  23148. "type": "string"
  23149. }
  23150. },
  23151. "required": ["text"],
  23152. "additionalProperties": false
  23153. }
  23154. },
  23155. "required": ["id", "type", "properties"],
  23156. "additionalProperties": false
  23157. },
  23158. "Event.tui.command.execute": {
  23159. "type": "object",
  23160. "properties": {
  23161. "id": {
  23162. "type": "string",
  23163. "pattern": "^evt_"
  23164. },
  23165. "type": {
  23166. "type": "string",
  23167. "enum": ["tui.command.execute"]
  23168. },
  23169. "properties": {
  23170. "type": "object",
  23171. "properties": {
  23172. "command": {
  23173. "anyOf": [
  23174. {
  23175. "type": "string",
  23176. "enum": [
  23177. "session.list",
  23178. "session.new",
  23179. "session.share",
  23180. "session.interrupt",
  23181. "session.compact",
  23182. "session.page.up",
  23183. "session.page.down",
  23184. "session.line.up",
  23185. "session.line.down",
  23186. "session.half.page.up",
  23187. "session.half.page.down",
  23188. "session.first",
  23189. "session.last",
  23190. "prompt.clear",
  23191. "prompt.submit",
  23192. "agent.cycle"
  23193. ]
  23194. },
  23195. {
  23196. "type": "string"
  23197. }
  23198. ]
  23199. }
  23200. },
  23201. "required": ["command"],
  23202. "additionalProperties": false
  23203. }
  23204. },
  23205. "required": ["id", "type", "properties"],
  23206. "additionalProperties": false
  23207. },
  23208. "Event.tui.toast.show": {
  23209. "type": "object",
  23210. "properties": {
  23211. "id": {
  23212. "type": "string",
  23213. "pattern": "^evt_"
  23214. },
  23215. "type": {
  23216. "type": "string",
  23217. "enum": ["tui.toast.show"]
  23218. },
  23219. "properties": {
  23220. "type": "object",
  23221. "properties": {
  23222. "title": {
  23223. "type": "string"
  23224. },
  23225. "message": {
  23226. "type": "string"
  23227. },
  23228. "variant": {
  23229. "type": "string",
  23230. "enum": ["info", "success", "warning", "error"]
  23231. },
  23232. "duration": {
  23233. "type": "integer",
  23234. "exclusiveMinimum": 0
  23235. }
  23236. },
  23237. "required": ["message", "variant"],
  23238. "additionalProperties": false
  23239. }
  23240. },
  23241. "required": ["id", "type", "properties"],
  23242. "additionalProperties": false
  23243. },
  23244. "Event.tui.session.select": {
  23245. "type": "object",
  23246. "properties": {
  23247. "id": {
  23248. "type": "string",
  23249. "pattern": "^evt_"
  23250. },
  23251. "type": {
  23252. "type": "string",
  23253. "enum": ["tui.session.select"]
  23254. },
  23255. "properties": {
  23256. "type": "object",
  23257. "properties": {
  23258. "sessionID": {
  23259. "type": "string",
  23260. "pattern": "^ses",
  23261. "description": "Session ID to navigate to"
  23262. }
  23263. },
  23264. "required": ["sessionID"],
  23265. "additionalProperties": false
  23266. }
  23267. },
  23268. "required": ["id", "type", "properties"],
  23269. "additionalProperties": false
  23270. },
  23271. "MoveSessionDestination": {
  23272. "type": "object",
  23273. "properties": {
  23274. "directory": {
  23275. "type": "string"
  23276. }
  23277. },
  23278. "required": ["directory"],
  23279. "additionalProperties": false
  23280. },
  23281. "LocationRef": {
  23282. "type": "object",
  23283. "properties": {
  23284. "directory": {
  23285. "type": "string"
  23286. },
  23287. "workspaceID": {
  23288. "type": "string",
  23289. "pattern": "^wrk"
  23290. }
  23291. },
  23292. "required": ["directory"],
  23293. "additionalProperties": false
  23294. },
  23295. "PromptSource": {
  23296. "type": "object",
  23297. "properties": {
  23298. "start": {
  23299. "type": "number"
  23300. },
  23301. "end": {
  23302. "type": "number"
  23303. },
  23304. "text": {
  23305. "type": "string"
  23306. }
  23307. },
  23308. "required": ["start", "end", "text"],
  23309. "additionalProperties": false
  23310. },
  23311. "PromptFileAttachment": {
  23312. "type": "object",
  23313. "properties": {
  23314. "uri": {
  23315. "type": "string"
  23316. },
  23317. "mime": {
  23318. "type": "string"
  23319. },
  23320. "name": {
  23321. "type": "string"
  23322. },
  23323. "description": {
  23324. "type": "string"
  23325. },
  23326. "source": {
  23327. "$ref": "#/components/schemas/PromptSource"
  23328. }
  23329. },
  23330. "required": ["uri", "mime"],
  23331. "additionalProperties": false
  23332. },
  23333. "PromptAgentAttachment": {
  23334. "type": "object",
  23335. "properties": {
  23336. "name": {
  23337. "type": "string"
  23338. },
  23339. "source": {
  23340. "$ref": "#/components/schemas/PromptSource"
  23341. }
  23342. },
  23343. "required": ["name"],
  23344. "additionalProperties": false
  23345. },
  23346. "SessionErrorUnknown": {
  23347. "type": "object",
  23348. "properties": {
  23349. "type": {
  23350. "type": "string",
  23351. "enum": ["unknown"]
  23352. },
  23353. "message": {
  23354. "type": "string"
  23355. }
  23356. },
  23357. "required": ["type", "message"],
  23358. "additionalProperties": false
  23359. },
  23360. "ToolTextContent": {
  23361. "type": "object",
  23362. "properties": {
  23363. "type": {
  23364. "type": "string",
  23365. "enum": ["text"]
  23366. },
  23367. "text": {
  23368. "type": "string"
  23369. }
  23370. },
  23371. "required": ["type", "text"],
  23372. "additionalProperties": false
  23373. },
  23374. "ToolFileContent": {
  23375. "type": "object",
  23376. "properties": {
  23377. "type": {
  23378. "type": "string",
  23379. "enum": ["file"]
  23380. },
  23381. "uri": {
  23382. "type": "string"
  23383. },
  23384. "mime": {
  23385. "type": "string"
  23386. },
  23387. "name": {
  23388. "type": "string"
  23389. }
  23390. },
  23391. "required": ["type", "uri", "mime"],
  23392. "additionalProperties": false
  23393. },
  23394. "SessionNextRetry_error": {
  23395. "type": "object",
  23396. "properties": {
  23397. "message": {
  23398. "type": "string"
  23399. },
  23400. "statusCode": {
  23401. "type": "number"
  23402. },
  23403. "isRetryable": {
  23404. "type": "boolean"
  23405. },
  23406. "responseHeaders": {
  23407. "type": "object",
  23408. "additionalProperties": {
  23409. "type": "string"
  23410. }
  23411. },
  23412. "responseBody": {
  23413. "type": "string"
  23414. },
  23415. "metadata": {
  23416. "type": "object",
  23417. "additionalProperties": {
  23418. "type": "string"
  23419. }
  23420. }
  23421. },
  23422. "required": ["message", "isRetryable"],
  23423. "additionalProperties": false
  23424. },
  23425. "PermissionV2Source": {
  23426. "type": "object",
  23427. "properties": {
  23428. "type": {
  23429. "type": "string",
  23430. "enum": ["tool"]
  23431. },
  23432. "messageID": {
  23433. "type": "string"
  23434. },
  23435. "callID": {
  23436. "type": "string"
  23437. }
  23438. },
  23439. "required": ["type", "messageID", "callID"],
  23440. "additionalProperties": false
  23441. },
  23442. "PermissionV2Reply": {
  23443. "type": "string",
  23444. "enum": ["once", "always", "reject"]
  23445. },
  23446. "QuestionV2Option": {
  23447. "type": "object",
  23448. "properties": {
  23449. "label": {
  23450. "type": "string",
  23451. "description": "Display text (1-5 words, concise)"
  23452. },
  23453. "description": {
  23454. "type": "string",
  23455. "description": "Explanation of choice"
  23456. }
  23457. },
  23458. "required": ["label", "description"],
  23459. "additionalProperties": false
  23460. },
  23461. "QuestionV2Info": {
  23462. "type": "object",
  23463. "properties": {
  23464. "question": {
  23465. "type": "string",
  23466. "description": "Complete question"
  23467. },
  23468. "header": {
  23469. "type": "string",
  23470. "description": "Very short label (max 30 chars)"
  23471. },
  23472. "options": {
  23473. "type": "array",
  23474. "items": {
  23475. "$ref": "#/components/schemas/QuestionV2Option"
  23476. },
  23477. "description": "Available choices"
  23478. },
  23479. "multiple": {
  23480. "type": "boolean"
  23481. },
  23482. "custom": {
  23483. "type": "boolean"
  23484. }
  23485. },
  23486. "required": ["question", "header", "options"],
  23487. "additionalProperties": false
  23488. },
  23489. "QuestionV2Tool": {
  23490. "type": "object",
  23491. "properties": {
  23492. "messageID": {
  23493. "type": "string"
  23494. },
  23495. "callID": {
  23496. "type": "string"
  23497. }
  23498. },
  23499. "required": ["messageID", "callID"],
  23500. "additionalProperties": false
  23501. },
  23502. "QuestionV2Answer": {
  23503. "type": "array",
  23504. "items": {
  23505. "type": "string"
  23506. }
  23507. },
  23508. "EventServerInstanceDisposed": {
  23509. "type": "object",
  23510. "properties": {
  23511. "id": {
  23512. "type": "string"
  23513. },
  23514. "type": {
  23515. "type": "string",
  23516. "enum": ["server.instance.disposed"]
  23517. },
  23518. "properties": {
  23519. "type": "object",
  23520. "properties": {
  23521. "directory": {
  23522. "type": "string"
  23523. }
  23524. },
  23525. "required": ["directory"],
  23526. "additionalProperties": false
  23527. }
  23528. },
  23529. "required": ["id", "type", "properties"],
  23530. "additionalProperties": false
  23531. },
  23532. "SyncEventSessionCreated": {
  23533. "type": "object",
  23534. "properties": {
  23535. "type": {
  23536. "type": "string",
  23537. "enum": ["sync"]
  23538. },
  23539. "id": {
  23540. "type": "string",
  23541. "pattern": "^evt_"
  23542. },
  23543. "syncEvent": {
  23544. "type": "object",
  23545. "properties": {
  23546. "type": {
  23547. "type": "string",
  23548. "enum": ["session.created.1"]
  23549. },
  23550. "id": {
  23551. "type": "string",
  23552. "pattern": "^evt_"
  23553. },
  23554. "seq": {
  23555. "type": "number"
  23556. },
  23557. "aggregateID": {
  23558. "type": "string"
  23559. },
  23560. "data": {
  23561. "type": "object",
  23562. "properties": {
  23563. "sessionID": {
  23564. "type": "string",
  23565. "pattern": "^ses"
  23566. },
  23567. "info": {
  23568. "$ref": "#/components/schemas/Session"
  23569. }
  23570. },
  23571. "required": ["sessionID", "info"],
  23572. "additionalProperties": false
  23573. }
  23574. },
  23575. "required": ["type", "id", "seq", "aggregateID", "data"],
  23576. "additionalProperties": false
  23577. }
  23578. },
  23579. "required": ["type", "id", "syncEvent"],
  23580. "additionalProperties": false
  23581. },
  23582. "SyncEventSessionUpdated": {
  23583. "type": "object",
  23584. "properties": {
  23585. "type": {
  23586. "type": "string",
  23587. "enum": ["sync"]
  23588. },
  23589. "id": {
  23590. "type": "string",
  23591. "pattern": "^evt_"
  23592. },
  23593. "syncEvent": {
  23594. "type": "object",
  23595. "properties": {
  23596. "type": {
  23597. "type": "string",
  23598. "enum": ["session.updated.1"]
  23599. },
  23600. "id": {
  23601. "type": "string",
  23602. "pattern": "^evt_"
  23603. },
  23604. "seq": {
  23605. "type": "number"
  23606. },
  23607. "aggregateID": {
  23608. "type": "string"
  23609. },
  23610. "data": {
  23611. "type": "object",
  23612. "properties": {
  23613. "sessionID": {
  23614. "type": "string",
  23615. "pattern": "^ses"
  23616. },
  23617. "info": {
  23618. "$ref": "#/components/schemas/Session"
  23619. }
  23620. },
  23621. "required": ["sessionID", "info"],
  23622. "additionalProperties": false
  23623. }
  23624. },
  23625. "required": ["type", "id", "seq", "aggregateID", "data"],
  23626. "additionalProperties": false
  23627. }
  23628. },
  23629. "required": ["type", "id", "syncEvent"],
  23630. "additionalProperties": false
  23631. },
  23632. "SyncEventSessionDeleted": {
  23633. "type": "object",
  23634. "properties": {
  23635. "type": {
  23636. "type": "string",
  23637. "enum": ["sync"]
  23638. },
  23639. "id": {
  23640. "type": "string",
  23641. "pattern": "^evt_"
  23642. },
  23643. "syncEvent": {
  23644. "type": "object",
  23645. "properties": {
  23646. "type": {
  23647. "type": "string",
  23648. "enum": ["session.deleted.1"]
  23649. },
  23650. "id": {
  23651. "type": "string",
  23652. "pattern": "^evt_"
  23653. },
  23654. "seq": {
  23655. "type": "number"
  23656. },
  23657. "aggregateID": {
  23658. "type": "string"
  23659. },
  23660. "data": {
  23661. "type": "object",
  23662. "properties": {
  23663. "sessionID": {
  23664. "type": "string",
  23665. "pattern": "^ses"
  23666. },
  23667. "info": {
  23668. "$ref": "#/components/schemas/Session"
  23669. }
  23670. },
  23671. "required": ["sessionID", "info"],
  23672. "additionalProperties": false
  23673. }
  23674. },
  23675. "required": ["type", "id", "seq", "aggregateID", "data"],
  23676. "additionalProperties": false
  23677. }
  23678. },
  23679. "required": ["type", "id", "syncEvent"],
  23680. "additionalProperties": false
  23681. },
  23682. "SyncEventMessageUpdated": {
  23683. "type": "object",
  23684. "properties": {
  23685. "type": {
  23686. "type": "string",
  23687. "enum": ["sync"]
  23688. },
  23689. "id": {
  23690. "type": "string",
  23691. "pattern": "^evt_"
  23692. },
  23693. "syncEvent": {
  23694. "type": "object",
  23695. "properties": {
  23696. "type": {
  23697. "type": "string",
  23698. "enum": ["message.updated.1"]
  23699. },
  23700. "id": {
  23701. "type": "string",
  23702. "pattern": "^evt_"
  23703. },
  23704. "seq": {
  23705. "type": "number"
  23706. },
  23707. "aggregateID": {
  23708. "type": "string"
  23709. },
  23710. "data": {
  23711. "type": "object",
  23712. "properties": {
  23713. "sessionID": {
  23714. "type": "string",
  23715. "pattern": "^ses"
  23716. },
  23717. "info": {
  23718. "$ref": "#/components/schemas/Message"
  23719. }
  23720. },
  23721. "required": ["sessionID", "info"],
  23722. "additionalProperties": false
  23723. }
  23724. },
  23725. "required": ["type", "id", "seq", "aggregateID", "data"],
  23726. "additionalProperties": false
  23727. }
  23728. },
  23729. "required": ["type", "id", "syncEvent"],
  23730. "additionalProperties": false
  23731. },
  23732. "SyncEventMessageRemoved": {
  23733. "type": "object",
  23734. "properties": {
  23735. "type": {
  23736. "type": "string",
  23737. "enum": ["sync"]
  23738. },
  23739. "id": {
  23740. "type": "string",
  23741. "pattern": "^evt_"
  23742. },
  23743. "syncEvent": {
  23744. "type": "object",
  23745. "properties": {
  23746. "type": {
  23747. "type": "string",
  23748. "enum": ["message.removed.1"]
  23749. },
  23750. "id": {
  23751. "type": "string",
  23752. "pattern": "^evt_"
  23753. },
  23754. "seq": {
  23755. "type": "number"
  23756. },
  23757. "aggregateID": {
  23758. "type": "string"
  23759. },
  23760. "data": {
  23761. "type": "object",
  23762. "properties": {
  23763. "sessionID": {
  23764. "type": "string",
  23765. "pattern": "^ses"
  23766. },
  23767. "messageID": {
  23768. "type": "string",
  23769. "pattern": "^msg"
  23770. }
  23771. },
  23772. "required": ["sessionID", "messageID"],
  23773. "additionalProperties": false
  23774. }
  23775. },
  23776. "required": ["type", "id", "seq", "aggregateID", "data"],
  23777. "additionalProperties": false
  23778. }
  23779. },
  23780. "required": ["type", "id", "syncEvent"],
  23781. "additionalProperties": false
  23782. },
  23783. "SyncEventMessagePartUpdated": {
  23784. "type": "object",
  23785. "properties": {
  23786. "type": {
  23787. "type": "string",
  23788. "enum": ["sync"]
  23789. },
  23790. "id": {
  23791. "type": "string",
  23792. "pattern": "^evt_"
  23793. },
  23794. "syncEvent": {
  23795. "type": "object",
  23796. "properties": {
  23797. "type": {
  23798. "type": "string",
  23799. "enum": ["message.part.updated.1"]
  23800. },
  23801. "id": {
  23802. "type": "string",
  23803. "pattern": "^evt_"
  23804. },
  23805. "seq": {
  23806. "type": "number"
  23807. },
  23808. "aggregateID": {
  23809. "type": "string"
  23810. },
  23811. "data": {
  23812. "type": "object",
  23813. "properties": {
  23814. "sessionID": {
  23815. "type": "string",
  23816. "pattern": "^ses"
  23817. },
  23818. "part": {
  23819. "$ref": "#/components/schemas/Part"
  23820. },
  23821. "time": {
  23822. "type": "number"
  23823. }
  23824. },
  23825. "required": ["sessionID", "part", "time"],
  23826. "additionalProperties": false
  23827. }
  23828. },
  23829. "required": ["type", "id", "seq", "aggregateID", "data"],
  23830. "additionalProperties": false
  23831. }
  23832. },
  23833. "required": ["type", "id", "syncEvent"],
  23834. "additionalProperties": false
  23835. },
  23836. "SyncEventMessagePartRemoved": {
  23837. "type": "object",
  23838. "properties": {
  23839. "type": {
  23840. "type": "string",
  23841. "enum": ["sync"]
  23842. },
  23843. "id": {
  23844. "type": "string",
  23845. "pattern": "^evt_"
  23846. },
  23847. "syncEvent": {
  23848. "type": "object",
  23849. "properties": {
  23850. "type": {
  23851. "type": "string",
  23852. "enum": ["message.part.removed.1"]
  23853. },
  23854. "id": {
  23855. "type": "string",
  23856. "pattern": "^evt_"
  23857. },
  23858. "seq": {
  23859. "type": "number"
  23860. },
  23861. "aggregateID": {
  23862. "type": "string"
  23863. },
  23864. "data": {
  23865. "type": "object",
  23866. "properties": {
  23867. "sessionID": {
  23868. "type": "string",
  23869. "pattern": "^ses"
  23870. },
  23871. "messageID": {
  23872. "type": "string",
  23873. "pattern": "^msg"
  23874. },
  23875. "partID": {
  23876. "type": "string",
  23877. "pattern": "^prt"
  23878. }
  23879. },
  23880. "required": ["sessionID", "messageID", "partID"],
  23881. "additionalProperties": false
  23882. }
  23883. },
  23884. "required": ["type", "id", "seq", "aggregateID", "data"],
  23885. "additionalProperties": false
  23886. }
  23887. },
  23888. "required": ["type", "id", "syncEvent"],
  23889. "additionalProperties": false
  23890. },
  23891. "SyncEventSessionNextAgentSwitched": {
  23892. "type": "object",
  23893. "properties": {
  23894. "type": {
  23895. "type": "string",
  23896. "enum": ["sync"]
  23897. },
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^evt_"
  23901. },
  23902. "syncEvent": {
  23903. "type": "object",
  23904. "properties": {
  23905. "type": {
  23906. "type": "string",
  23907. "enum": ["session.next.agent.switched.1"]
  23908. },
  23909. "id": {
  23910. "type": "string",
  23911. "pattern": "^evt_"
  23912. },
  23913. "seq": {
  23914. "type": "number"
  23915. },
  23916. "aggregateID": {
  23917. "type": "string"
  23918. },
  23919. "data": {
  23920. "type": "object",
  23921. "properties": {
  23922. "timestamp": {
  23923. "type": "number"
  23924. },
  23925. "sessionID": {
  23926. "type": "string",
  23927. "pattern": "^ses"
  23928. },
  23929. "messageID": {
  23930. "type": "string",
  23931. "pattern": "^msg_"
  23932. },
  23933. "agent": {
  23934. "type": "string"
  23935. }
  23936. },
  23937. "required": ["timestamp", "sessionID", "messageID", "agent"],
  23938. "additionalProperties": false
  23939. }
  23940. },
  23941. "required": ["type", "id", "seq", "aggregateID", "data"],
  23942. "additionalProperties": false
  23943. }
  23944. },
  23945. "required": ["type", "id", "syncEvent"],
  23946. "additionalProperties": false
  23947. },
  23948. "SyncEventSessionNextModelSwitched": {
  23949. "type": "object",
  23950. "properties": {
  23951. "type": {
  23952. "type": "string",
  23953. "enum": ["sync"]
  23954. },
  23955. "id": {
  23956. "type": "string",
  23957. "pattern": "^evt_"
  23958. },
  23959. "syncEvent": {
  23960. "type": "object",
  23961. "properties": {
  23962. "type": {
  23963. "type": "string",
  23964. "enum": ["session.next.model.switched.1"]
  23965. },
  23966. "id": {
  23967. "type": "string",
  23968. "pattern": "^evt_"
  23969. },
  23970. "seq": {
  23971. "type": "number"
  23972. },
  23973. "aggregateID": {
  23974. "type": "string"
  23975. },
  23976. "data": {
  23977. "type": "object",
  23978. "properties": {
  23979. "timestamp": {
  23980. "type": "number"
  23981. },
  23982. "sessionID": {
  23983. "type": "string",
  23984. "pattern": "^ses"
  23985. },
  23986. "messageID": {
  23987. "type": "string",
  23988. "pattern": "^msg_"
  23989. },
  23990. "model": {
  23991. "type": "object",
  23992. "properties": {
  23993. "id": {
  23994. "type": "string"
  23995. },
  23996. "providerID": {
  23997. "type": "string"
  23998. },
  23999. "variant": {
  24000. "type": "string"
  24001. }
  24002. },
  24003. "required": ["id", "providerID"],
  24004. "additionalProperties": false
  24005. }
  24006. },
  24007. "required": ["timestamp", "sessionID", "messageID", "model"],
  24008. "additionalProperties": false
  24009. }
  24010. },
  24011. "required": ["type", "id", "seq", "aggregateID", "data"],
  24012. "additionalProperties": false
  24013. }
  24014. },
  24015. "required": ["type", "id", "syncEvent"],
  24016. "additionalProperties": false
  24017. },
  24018. "SyncEventSessionNextMoved": {
  24019. "type": "object",
  24020. "properties": {
  24021. "type": {
  24022. "type": "string",
  24023. "enum": ["sync"]
  24024. },
  24025. "id": {
  24026. "type": "string",
  24027. "pattern": "^evt_"
  24028. },
  24029. "syncEvent": {
  24030. "type": "object",
  24031. "properties": {
  24032. "type": {
  24033. "type": "string",
  24034. "enum": ["session.next.moved.1"]
  24035. },
  24036. "id": {
  24037. "type": "string",
  24038. "pattern": "^evt_"
  24039. },
  24040. "seq": {
  24041. "type": "number"
  24042. },
  24043. "aggregateID": {
  24044. "type": "string"
  24045. },
  24046. "data": {
  24047. "type": "object",
  24048. "properties": {
  24049. "timestamp": {
  24050. "type": "number"
  24051. },
  24052. "sessionID": {
  24053. "type": "string",
  24054. "pattern": "^ses"
  24055. },
  24056. "location": {
  24057. "$ref": "#/components/schemas/LocationRef"
  24058. },
  24059. "subdirectory": {
  24060. "type": "string"
  24061. }
  24062. },
  24063. "required": ["timestamp", "sessionID", "location"],
  24064. "additionalProperties": false
  24065. }
  24066. },
  24067. "required": ["type", "id", "seq", "aggregateID", "data"],
  24068. "additionalProperties": false
  24069. }
  24070. },
  24071. "required": ["type", "id", "syncEvent"],
  24072. "additionalProperties": false
  24073. },
  24074. "SyncEventSessionNextPrompted": {
  24075. "type": "object",
  24076. "properties": {
  24077. "type": {
  24078. "type": "string",
  24079. "enum": ["sync"]
  24080. },
  24081. "id": {
  24082. "type": "string",
  24083. "pattern": "^evt_"
  24084. },
  24085. "syncEvent": {
  24086. "type": "object",
  24087. "properties": {
  24088. "type": {
  24089. "type": "string",
  24090. "enum": ["session.next.prompted.1"]
  24091. },
  24092. "id": {
  24093. "type": "string",
  24094. "pattern": "^evt_"
  24095. },
  24096. "seq": {
  24097. "type": "number"
  24098. },
  24099. "aggregateID": {
  24100. "type": "string"
  24101. },
  24102. "data": {
  24103. "type": "object",
  24104. "properties": {
  24105. "timestamp": {
  24106. "type": "number"
  24107. },
  24108. "sessionID": {
  24109. "type": "string",
  24110. "pattern": "^ses"
  24111. },
  24112. "messageID": {
  24113. "type": "string",
  24114. "pattern": "^msg_"
  24115. },
  24116. "prompt": {
  24117. "$ref": "#/components/schemas/Prompt"
  24118. },
  24119. "delivery": {
  24120. "type": "string",
  24121. "enum": ["steer", "queue"]
  24122. }
  24123. },
  24124. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24125. "additionalProperties": false
  24126. }
  24127. },
  24128. "required": ["type", "id", "seq", "aggregateID", "data"],
  24129. "additionalProperties": false
  24130. }
  24131. },
  24132. "required": ["type", "id", "syncEvent"],
  24133. "additionalProperties": false
  24134. },
  24135. "SyncEventSessionNextPromptAdmitted": {
  24136. "type": "object",
  24137. "properties": {
  24138. "type": {
  24139. "type": "string",
  24140. "enum": ["sync"]
  24141. },
  24142. "id": {
  24143. "type": "string",
  24144. "pattern": "^evt_"
  24145. },
  24146. "syncEvent": {
  24147. "type": "object",
  24148. "properties": {
  24149. "type": {
  24150. "type": "string",
  24151. "enum": ["session.next.prompt.admitted.1"]
  24152. },
  24153. "id": {
  24154. "type": "string",
  24155. "pattern": "^evt_"
  24156. },
  24157. "seq": {
  24158. "type": "number"
  24159. },
  24160. "aggregateID": {
  24161. "type": "string"
  24162. },
  24163. "data": {
  24164. "type": "object",
  24165. "properties": {
  24166. "timestamp": {
  24167. "type": "number"
  24168. },
  24169. "sessionID": {
  24170. "type": "string",
  24171. "pattern": "^ses"
  24172. },
  24173. "messageID": {
  24174. "type": "string",
  24175. "pattern": "^msg_"
  24176. },
  24177. "prompt": {
  24178. "$ref": "#/components/schemas/Prompt"
  24179. },
  24180. "delivery": {
  24181. "type": "string",
  24182. "enum": ["steer", "queue"]
  24183. }
  24184. },
  24185. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24186. "additionalProperties": false
  24187. }
  24188. },
  24189. "required": ["type", "id", "seq", "aggregateID", "data"],
  24190. "additionalProperties": false
  24191. }
  24192. },
  24193. "required": ["type", "id", "syncEvent"],
  24194. "additionalProperties": false
  24195. },
  24196. "SyncEventSessionNextPromptPromoted": {
  24197. "type": "object",
  24198. "properties": {
  24199. "type": {
  24200. "type": "string",
  24201. "enum": ["sync"]
  24202. },
  24203. "id": {
  24204. "type": "string",
  24205. "pattern": "^evt_"
  24206. },
  24207. "syncEvent": {
  24208. "type": "object",
  24209. "properties": {
  24210. "type": {
  24211. "type": "string",
  24212. "enum": ["session.next.prompt.promoted.1"]
  24213. },
  24214. "id": {
  24215. "type": "string",
  24216. "pattern": "^evt_"
  24217. },
  24218. "seq": {
  24219. "type": "number"
  24220. },
  24221. "aggregateID": {
  24222. "type": "string"
  24223. },
  24224. "data": {
  24225. "type": "object",
  24226. "properties": {
  24227. "timestamp": {
  24228. "type": "number"
  24229. },
  24230. "sessionID": {
  24231. "type": "string",
  24232. "pattern": "^ses"
  24233. },
  24234. "messageID": {
  24235. "type": "string",
  24236. "pattern": "^msg_"
  24237. },
  24238. "prompt": {
  24239. "$ref": "#/components/schemas/Prompt"
  24240. },
  24241. "timeCreated": {
  24242. "type": "number"
  24243. }
  24244. },
  24245. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  24246. "additionalProperties": false
  24247. }
  24248. },
  24249. "required": ["type", "id", "seq", "aggregateID", "data"],
  24250. "additionalProperties": false
  24251. }
  24252. },
  24253. "required": ["type", "id", "syncEvent"],
  24254. "additionalProperties": false
  24255. },
  24256. "SyncEventSessionNextInterruptRequested": {
  24257. "type": "object",
  24258. "properties": {
  24259. "type": {
  24260. "type": "string",
  24261. "enum": ["sync"]
  24262. },
  24263. "id": {
  24264. "type": "string",
  24265. "pattern": "^evt_"
  24266. },
  24267. "syncEvent": {
  24268. "type": "object",
  24269. "properties": {
  24270. "type": {
  24271. "type": "string",
  24272. "enum": ["session.next.interrupt.requested.1"]
  24273. },
  24274. "id": {
  24275. "type": "string",
  24276. "pattern": "^evt_"
  24277. },
  24278. "seq": {
  24279. "type": "number"
  24280. },
  24281. "aggregateID": {
  24282. "type": "string"
  24283. },
  24284. "data": {
  24285. "type": "object",
  24286. "properties": {
  24287. "timestamp": {
  24288. "type": "number"
  24289. },
  24290. "sessionID": {
  24291. "type": "string",
  24292. "pattern": "^ses"
  24293. }
  24294. },
  24295. "required": ["timestamp", "sessionID"],
  24296. "additionalProperties": false
  24297. }
  24298. },
  24299. "required": ["type", "id", "seq", "aggregateID", "data"],
  24300. "additionalProperties": false
  24301. }
  24302. },
  24303. "required": ["type", "id", "syncEvent"],
  24304. "additionalProperties": false
  24305. },
  24306. "SyncEventSessionNextContextUpdated": {
  24307. "type": "object",
  24308. "properties": {
  24309. "type": {
  24310. "type": "string",
  24311. "enum": ["sync"]
  24312. },
  24313. "id": {
  24314. "type": "string",
  24315. "pattern": "^evt_"
  24316. },
  24317. "syncEvent": {
  24318. "type": "object",
  24319. "properties": {
  24320. "type": {
  24321. "type": "string",
  24322. "enum": ["session.next.context.updated.1"]
  24323. },
  24324. "id": {
  24325. "type": "string",
  24326. "pattern": "^evt_"
  24327. },
  24328. "seq": {
  24329. "type": "number"
  24330. },
  24331. "aggregateID": {
  24332. "type": "string"
  24333. },
  24334. "data": {
  24335. "type": "object",
  24336. "properties": {
  24337. "timestamp": {
  24338. "type": "number"
  24339. },
  24340. "sessionID": {
  24341. "type": "string",
  24342. "pattern": "^ses"
  24343. },
  24344. "messageID": {
  24345. "type": "string",
  24346. "pattern": "^msg_"
  24347. },
  24348. "text": {
  24349. "type": "string"
  24350. }
  24351. },
  24352. "required": ["timestamp", "sessionID", "messageID", "text"],
  24353. "additionalProperties": false
  24354. }
  24355. },
  24356. "required": ["type", "id", "seq", "aggregateID", "data"],
  24357. "additionalProperties": false
  24358. }
  24359. },
  24360. "required": ["type", "id", "syncEvent"],
  24361. "additionalProperties": false
  24362. },
  24363. "SyncEventSessionNextSynthetic": {
  24364. "type": "object",
  24365. "properties": {
  24366. "type": {
  24367. "type": "string",
  24368. "enum": ["sync"]
  24369. },
  24370. "id": {
  24371. "type": "string",
  24372. "pattern": "^evt_"
  24373. },
  24374. "syncEvent": {
  24375. "type": "object",
  24376. "properties": {
  24377. "type": {
  24378. "type": "string",
  24379. "enum": ["session.next.synthetic.1"]
  24380. },
  24381. "id": {
  24382. "type": "string",
  24383. "pattern": "^evt_"
  24384. },
  24385. "seq": {
  24386. "type": "number"
  24387. },
  24388. "aggregateID": {
  24389. "type": "string"
  24390. },
  24391. "data": {
  24392. "type": "object",
  24393. "properties": {
  24394. "timestamp": {
  24395. "type": "number"
  24396. },
  24397. "sessionID": {
  24398. "type": "string",
  24399. "pattern": "^ses"
  24400. },
  24401. "messageID": {
  24402. "type": "string",
  24403. "pattern": "^msg_"
  24404. },
  24405. "text": {
  24406. "type": "string"
  24407. }
  24408. },
  24409. "required": ["timestamp", "sessionID", "messageID", "text"],
  24410. "additionalProperties": false
  24411. }
  24412. },
  24413. "required": ["type", "id", "seq", "aggregateID", "data"],
  24414. "additionalProperties": false
  24415. }
  24416. },
  24417. "required": ["type", "id", "syncEvent"],
  24418. "additionalProperties": false
  24419. },
  24420. "SyncEventSessionNextShellStarted": {
  24421. "type": "object",
  24422. "properties": {
  24423. "type": {
  24424. "type": "string",
  24425. "enum": ["sync"]
  24426. },
  24427. "id": {
  24428. "type": "string",
  24429. "pattern": "^evt_"
  24430. },
  24431. "syncEvent": {
  24432. "type": "object",
  24433. "properties": {
  24434. "type": {
  24435. "type": "string",
  24436. "enum": ["session.next.shell.started.1"]
  24437. },
  24438. "id": {
  24439. "type": "string",
  24440. "pattern": "^evt_"
  24441. },
  24442. "seq": {
  24443. "type": "number"
  24444. },
  24445. "aggregateID": {
  24446. "type": "string"
  24447. },
  24448. "data": {
  24449. "type": "object",
  24450. "properties": {
  24451. "timestamp": {
  24452. "type": "number"
  24453. },
  24454. "sessionID": {
  24455. "type": "string",
  24456. "pattern": "^ses"
  24457. },
  24458. "messageID": {
  24459. "type": "string",
  24460. "pattern": "^msg_"
  24461. },
  24462. "callID": {
  24463. "type": "string"
  24464. },
  24465. "command": {
  24466. "type": "string"
  24467. }
  24468. },
  24469. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24470. "additionalProperties": false
  24471. }
  24472. },
  24473. "required": ["type", "id", "seq", "aggregateID", "data"],
  24474. "additionalProperties": false
  24475. }
  24476. },
  24477. "required": ["type", "id", "syncEvent"],
  24478. "additionalProperties": false
  24479. },
  24480. "SyncEventSessionNextShellEnded": {
  24481. "type": "object",
  24482. "properties": {
  24483. "type": {
  24484. "type": "string",
  24485. "enum": ["sync"]
  24486. },
  24487. "id": {
  24488. "type": "string",
  24489. "pattern": "^evt_"
  24490. },
  24491. "syncEvent": {
  24492. "type": "object",
  24493. "properties": {
  24494. "type": {
  24495. "type": "string",
  24496. "enum": ["session.next.shell.ended.1"]
  24497. },
  24498. "id": {
  24499. "type": "string",
  24500. "pattern": "^evt_"
  24501. },
  24502. "seq": {
  24503. "type": "number"
  24504. },
  24505. "aggregateID": {
  24506. "type": "string"
  24507. },
  24508. "data": {
  24509. "type": "object",
  24510. "properties": {
  24511. "timestamp": {
  24512. "type": "number"
  24513. },
  24514. "sessionID": {
  24515. "type": "string",
  24516. "pattern": "^ses"
  24517. },
  24518. "callID": {
  24519. "type": "string"
  24520. },
  24521. "output": {
  24522. "type": "string"
  24523. }
  24524. },
  24525. "required": ["timestamp", "sessionID", "callID", "output"],
  24526. "additionalProperties": false
  24527. }
  24528. },
  24529. "required": ["type", "id", "seq", "aggregateID", "data"],
  24530. "additionalProperties": false
  24531. }
  24532. },
  24533. "required": ["type", "id", "syncEvent"],
  24534. "additionalProperties": false
  24535. },
  24536. "SyncEventSessionNextStepStarted": {
  24537. "type": "object",
  24538. "properties": {
  24539. "type": {
  24540. "type": "string",
  24541. "enum": ["sync"]
  24542. },
  24543. "id": {
  24544. "type": "string",
  24545. "pattern": "^evt_"
  24546. },
  24547. "syncEvent": {
  24548. "type": "object",
  24549. "properties": {
  24550. "type": {
  24551. "type": "string",
  24552. "enum": ["session.next.step.started.1"]
  24553. },
  24554. "id": {
  24555. "type": "string",
  24556. "pattern": "^evt_"
  24557. },
  24558. "seq": {
  24559. "type": "number"
  24560. },
  24561. "aggregateID": {
  24562. "type": "string"
  24563. },
  24564. "data": {
  24565. "type": "object",
  24566. "properties": {
  24567. "timestamp": {
  24568. "type": "number"
  24569. },
  24570. "sessionID": {
  24571. "type": "string",
  24572. "pattern": "^ses"
  24573. },
  24574. "assistantMessageID": {
  24575. "type": "string",
  24576. "pattern": "^msg_"
  24577. },
  24578. "agent": {
  24579. "type": "string"
  24580. },
  24581. "model": {
  24582. "type": "object",
  24583. "properties": {
  24584. "id": {
  24585. "type": "string"
  24586. },
  24587. "providerID": {
  24588. "type": "string"
  24589. },
  24590. "variant": {
  24591. "type": "string"
  24592. }
  24593. },
  24594. "required": ["id", "providerID"],
  24595. "additionalProperties": false
  24596. },
  24597. "snapshot": {
  24598. "type": "string"
  24599. }
  24600. },
  24601. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24602. "additionalProperties": false
  24603. }
  24604. },
  24605. "required": ["type", "id", "seq", "aggregateID", "data"],
  24606. "additionalProperties": false
  24607. }
  24608. },
  24609. "required": ["type", "id", "syncEvent"],
  24610. "additionalProperties": false
  24611. },
  24612. "SyncEventSessionNextStepEnded": {
  24613. "type": "object",
  24614. "properties": {
  24615. "type": {
  24616. "type": "string",
  24617. "enum": ["sync"]
  24618. },
  24619. "id": {
  24620. "type": "string",
  24621. "pattern": "^evt_"
  24622. },
  24623. "syncEvent": {
  24624. "type": "object",
  24625. "properties": {
  24626. "type": {
  24627. "type": "string",
  24628. "enum": ["session.next.step.ended.2"]
  24629. },
  24630. "id": {
  24631. "type": "string",
  24632. "pattern": "^evt_"
  24633. },
  24634. "seq": {
  24635. "type": "number"
  24636. },
  24637. "aggregateID": {
  24638. "type": "string"
  24639. },
  24640. "data": {
  24641. "type": "object",
  24642. "properties": {
  24643. "timestamp": {
  24644. "type": "number"
  24645. },
  24646. "sessionID": {
  24647. "type": "string",
  24648. "pattern": "^ses"
  24649. },
  24650. "assistantMessageID": {
  24651. "type": "string",
  24652. "pattern": "^msg_"
  24653. },
  24654. "finish": {
  24655. "type": "string"
  24656. },
  24657. "cost": {
  24658. "type": "number"
  24659. },
  24660. "tokens": {
  24661. "type": "object",
  24662. "properties": {
  24663. "input": {
  24664. "type": "number"
  24665. },
  24666. "output": {
  24667. "type": "number"
  24668. },
  24669. "reasoning": {
  24670. "type": "number"
  24671. },
  24672. "cache": {
  24673. "type": "object",
  24674. "properties": {
  24675. "read": {
  24676. "type": "number"
  24677. },
  24678. "write": {
  24679. "type": "number"
  24680. }
  24681. },
  24682. "required": ["read", "write"],
  24683. "additionalProperties": false
  24684. }
  24685. },
  24686. "required": ["input", "output", "reasoning", "cache"],
  24687. "additionalProperties": false
  24688. },
  24689. "snapshot": {
  24690. "type": "string"
  24691. }
  24692. },
  24693. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  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. "SyncEventSessionNextStepFailed": {
  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.step.failed.2"]
  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. "error": {
  24747. "$ref": "#/components/schemas/SessionErrorUnknown"
  24748. }
  24749. },
  24750. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24751. "additionalProperties": false
  24752. }
  24753. },
  24754. "required": ["type", "id", "seq", "aggregateID", "data"],
  24755. "additionalProperties": false
  24756. }
  24757. },
  24758. "required": ["type", "id", "syncEvent"],
  24759. "additionalProperties": false
  24760. },
  24761. "SyncEventSessionNextTextStarted": {
  24762. "type": "object",
  24763. "properties": {
  24764. "type": {
  24765. "type": "string",
  24766. "enum": ["sync"]
  24767. },
  24768. "id": {
  24769. "type": "string",
  24770. "pattern": "^evt_"
  24771. },
  24772. "syncEvent": {
  24773. "type": "object",
  24774. "properties": {
  24775. "type": {
  24776. "type": "string",
  24777. "enum": ["session.next.text.started.1"]
  24778. },
  24779. "id": {
  24780. "type": "string",
  24781. "pattern": "^evt_"
  24782. },
  24783. "seq": {
  24784. "type": "number"
  24785. },
  24786. "aggregateID": {
  24787. "type": "string"
  24788. },
  24789. "data": {
  24790. "type": "object",
  24791. "properties": {
  24792. "timestamp": {
  24793. "type": "number"
  24794. },
  24795. "sessionID": {
  24796. "type": "string",
  24797. "pattern": "^ses"
  24798. },
  24799. "assistantMessageID": {
  24800. "type": "string",
  24801. "pattern": "^msg_"
  24802. },
  24803. "textID": {
  24804. "type": "string"
  24805. }
  24806. },
  24807. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24808. "additionalProperties": false
  24809. }
  24810. },
  24811. "required": ["type", "id", "seq", "aggregateID", "data"],
  24812. "additionalProperties": false
  24813. }
  24814. },
  24815. "required": ["type", "id", "syncEvent"],
  24816. "additionalProperties": false
  24817. },
  24818. "SyncEventSessionNextTextEnded": {
  24819. "type": "object",
  24820. "properties": {
  24821. "type": {
  24822. "type": "string",
  24823. "enum": ["sync"]
  24824. },
  24825. "id": {
  24826. "type": "string",
  24827. "pattern": "^evt_"
  24828. },
  24829. "syncEvent": {
  24830. "type": "object",
  24831. "properties": {
  24832. "type": {
  24833. "type": "string",
  24834. "enum": ["session.next.text.ended.1"]
  24835. },
  24836. "id": {
  24837. "type": "string",
  24838. "pattern": "^evt_"
  24839. },
  24840. "seq": {
  24841. "type": "number"
  24842. },
  24843. "aggregateID": {
  24844. "type": "string"
  24845. },
  24846. "data": {
  24847. "type": "object",
  24848. "properties": {
  24849. "timestamp": {
  24850. "type": "number"
  24851. },
  24852. "sessionID": {
  24853. "type": "string",
  24854. "pattern": "^ses"
  24855. },
  24856. "assistantMessageID": {
  24857. "type": "string",
  24858. "pattern": "^msg_"
  24859. },
  24860. "textID": {
  24861. "type": "string"
  24862. },
  24863. "text": {
  24864. "type": "string"
  24865. }
  24866. },
  24867. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24868. "additionalProperties": false
  24869. }
  24870. },
  24871. "required": ["type", "id", "seq", "aggregateID", "data"],
  24872. "additionalProperties": false
  24873. }
  24874. },
  24875. "required": ["type", "id", "syncEvent"],
  24876. "additionalProperties": false
  24877. },
  24878. "SyncEventSessionNextReasoningStarted": {
  24879. "type": "object",
  24880. "properties": {
  24881. "type": {
  24882. "type": "string",
  24883. "enum": ["sync"]
  24884. },
  24885. "id": {
  24886. "type": "string",
  24887. "pattern": "^evt_"
  24888. },
  24889. "syncEvent": {
  24890. "type": "object",
  24891. "properties": {
  24892. "type": {
  24893. "type": "string",
  24894. "enum": ["session.next.reasoning.started.1"]
  24895. },
  24896. "id": {
  24897. "type": "string",
  24898. "pattern": "^evt_"
  24899. },
  24900. "seq": {
  24901. "type": "number"
  24902. },
  24903. "aggregateID": {
  24904. "type": "string"
  24905. },
  24906. "data": {
  24907. "type": "object",
  24908. "properties": {
  24909. "timestamp": {
  24910. "type": "number"
  24911. },
  24912. "sessionID": {
  24913. "type": "string",
  24914. "pattern": "^ses"
  24915. },
  24916. "assistantMessageID": {
  24917. "type": "string",
  24918. "pattern": "^msg_"
  24919. },
  24920. "reasoningID": {
  24921. "type": "string"
  24922. },
  24923. "providerMetadata": {
  24924. "type": "object",
  24925. "additionalProperties": {
  24926. "type": "object"
  24927. }
  24928. }
  24929. },
  24930. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24931. "additionalProperties": false
  24932. }
  24933. },
  24934. "required": ["type", "id", "seq", "aggregateID", "data"],
  24935. "additionalProperties": false
  24936. }
  24937. },
  24938. "required": ["type", "id", "syncEvent"],
  24939. "additionalProperties": false
  24940. },
  24941. "SyncEventSessionNextReasoningEnded": {
  24942. "type": "object",
  24943. "properties": {
  24944. "type": {
  24945. "type": "string",
  24946. "enum": ["sync"]
  24947. },
  24948. "id": {
  24949. "type": "string",
  24950. "pattern": "^evt_"
  24951. },
  24952. "syncEvent": {
  24953. "type": "object",
  24954. "properties": {
  24955. "type": {
  24956. "type": "string",
  24957. "enum": ["session.next.reasoning.ended.1"]
  24958. },
  24959. "id": {
  24960. "type": "string",
  24961. "pattern": "^evt_"
  24962. },
  24963. "seq": {
  24964. "type": "number"
  24965. },
  24966. "aggregateID": {
  24967. "type": "string"
  24968. },
  24969. "data": {
  24970. "type": "object",
  24971. "properties": {
  24972. "timestamp": {
  24973. "type": "number"
  24974. },
  24975. "sessionID": {
  24976. "type": "string",
  24977. "pattern": "^ses"
  24978. },
  24979. "assistantMessageID": {
  24980. "type": "string",
  24981. "pattern": "^msg_"
  24982. },
  24983. "reasoningID": {
  24984. "type": "string"
  24985. },
  24986. "text": {
  24987. "type": "string"
  24988. },
  24989. "providerMetadata": {
  24990. "type": "object",
  24991. "additionalProperties": {
  24992. "type": "object"
  24993. }
  24994. }
  24995. },
  24996. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  24997. "additionalProperties": false
  24998. }
  24999. },
  25000. "required": ["type", "id", "seq", "aggregateID", "data"],
  25001. "additionalProperties": false
  25002. }
  25003. },
  25004. "required": ["type", "id", "syncEvent"],
  25005. "additionalProperties": false
  25006. },
  25007. "SyncEventSessionNextToolInputStarted": {
  25008. "type": "object",
  25009. "properties": {
  25010. "type": {
  25011. "type": "string",
  25012. "enum": ["sync"]
  25013. },
  25014. "id": {
  25015. "type": "string",
  25016. "pattern": "^evt_"
  25017. },
  25018. "syncEvent": {
  25019. "type": "object",
  25020. "properties": {
  25021. "type": {
  25022. "type": "string",
  25023. "enum": ["session.next.tool.input.started.1"]
  25024. },
  25025. "id": {
  25026. "type": "string",
  25027. "pattern": "^evt_"
  25028. },
  25029. "seq": {
  25030. "type": "number"
  25031. },
  25032. "aggregateID": {
  25033. "type": "string"
  25034. },
  25035. "data": {
  25036. "type": "object",
  25037. "properties": {
  25038. "timestamp": {
  25039. "type": "number"
  25040. },
  25041. "sessionID": {
  25042. "type": "string",
  25043. "pattern": "^ses"
  25044. },
  25045. "assistantMessageID": {
  25046. "type": "string",
  25047. "pattern": "^msg_"
  25048. },
  25049. "callID": {
  25050. "type": "string"
  25051. },
  25052. "name": {
  25053. "type": "string"
  25054. }
  25055. },
  25056. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25057. "additionalProperties": false
  25058. }
  25059. },
  25060. "required": ["type", "id", "seq", "aggregateID", "data"],
  25061. "additionalProperties": false
  25062. }
  25063. },
  25064. "required": ["type", "id", "syncEvent"],
  25065. "additionalProperties": false
  25066. },
  25067. "SyncEventSessionNextToolInputEnded": {
  25068. "type": "object",
  25069. "properties": {
  25070. "type": {
  25071. "type": "string",
  25072. "enum": ["sync"]
  25073. },
  25074. "id": {
  25075. "type": "string",
  25076. "pattern": "^evt_"
  25077. },
  25078. "syncEvent": {
  25079. "type": "object",
  25080. "properties": {
  25081. "type": {
  25082. "type": "string",
  25083. "enum": ["session.next.tool.input.ended.1"]
  25084. },
  25085. "id": {
  25086. "type": "string",
  25087. "pattern": "^evt_"
  25088. },
  25089. "seq": {
  25090. "type": "number"
  25091. },
  25092. "aggregateID": {
  25093. "type": "string"
  25094. },
  25095. "data": {
  25096. "type": "object",
  25097. "properties": {
  25098. "timestamp": {
  25099. "type": "number"
  25100. },
  25101. "sessionID": {
  25102. "type": "string",
  25103. "pattern": "^ses"
  25104. },
  25105. "assistantMessageID": {
  25106. "type": "string",
  25107. "pattern": "^msg_"
  25108. },
  25109. "callID": {
  25110. "type": "string"
  25111. },
  25112. "text": {
  25113. "type": "string"
  25114. }
  25115. },
  25116. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25117. "additionalProperties": false
  25118. }
  25119. },
  25120. "required": ["type", "id", "seq", "aggregateID", "data"],
  25121. "additionalProperties": false
  25122. }
  25123. },
  25124. "required": ["type", "id", "syncEvent"],
  25125. "additionalProperties": false
  25126. },
  25127. "SyncEventSessionNextToolCalled": {
  25128. "type": "object",
  25129. "properties": {
  25130. "type": {
  25131. "type": "string",
  25132. "enum": ["sync"]
  25133. },
  25134. "id": {
  25135. "type": "string",
  25136. "pattern": "^evt_"
  25137. },
  25138. "syncEvent": {
  25139. "type": "object",
  25140. "properties": {
  25141. "type": {
  25142. "type": "string",
  25143. "enum": ["session.next.tool.called.1"]
  25144. },
  25145. "id": {
  25146. "type": "string",
  25147. "pattern": "^evt_"
  25148. },
  25149. "seq": {
  25150. "type": "number"
  25151. },
  25152. "aggregateID": {
  25153. "type": "string"
  25154. },
  25155. "data": {
  25156. "type": "object",
  25157. "properties": {
  25158. "timestamp": {
  25159. "type": "number"
  25160. },
  25161. "sessionID": {
  25162. "type": "string",
  25163. "pattern": "^ses"
  25164. },
  25165. "assistantMessageID": {
  25166. "type": "string",
  25167. "pattern": "^msg_"
  25168. },
  25169. "callID": {
  25170. "type": "string"
  25171. },
  25172. "tool": {
  25173. "type": "string"
  25174. },
  25175. "input": {
  25176. "type": "object"
  25177. },
  25178. "provider": {
  25179. "type": "object",
  25180. "properties": {
  25181. "executed": {
  25182. "type": "boolean"
  25183. },
  25184. "metadata": {
  25185. "type": "object",
  25186. "additionalProperties": {
  25187. "type": "object"
  25188. }
  25189. }
  25190. },
  25191. "required": ["executed"],
  25192. "additionalProperties": false
  25193. }
  25194. },
  25195. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25196. "additionalProperties": false
  25197. }
  25198. },
  25199. "required": ["type", "id", "seq", "aggregateID", "data"],
  25200. "additionalProperties": false
  25201. }
  25202. },
  25203. "required": ["type", "id", "syncEvent"],
  25204. "additionalProperties": false
  25205. },
  25206. "SyncEventSessionNextToolProgress": {
  25207. "type": "object",
  25208. "properties": {
  25209. "type": {
  25210. "type": "string",
  25211. "enum": ["sync"]
  25212. },
  25213. "id": {
  25214. "type": "string",
  25215. "pattern": "^evt_"
  25216. },
  25217. "syncEvent": {
  25218. "type": "object",
  25219. "properties": {
  25220. "type": {
  25221. "type": "string",
  25222. "enum": ["session.next.tool.progress.1"]
  25223. },
  25224. "id": {
  25225. "type": "string",
  25226. "pattern": "^evt_"
  25227. },
  25228. "seq": {
  25229. "type": "number"
  25230. },
  25231. "aggregateID": {
  25232. "type": "string"
  25233. },
  25234. "data": {
  25235. "type": "object",
  25236. "properties": {
  25237. "timestamp": {
  25238. "type": "number"
  25239. },
  25240. "sessionID": {
  25241. "type": "string",
  25242. "pattern": "^ses"
  25243. },
  25244. "assistantMessageID": {
  25245. "type": "string",
  25246. "pattern": "^msg_"
  25247. },
  25248. "callID": {
  25249. "type": "string"
  25250. },
  25251. "structured": {
  25252. "type": "object"
  25253. },
  25254. "content": {
  25255. "type": "array",
  25256. "items": {
  25257. "anyOf": [
  25258. {
  25259. "$ref": "#/components/schemas/ToolTextContent"
  25260. },
  25261. {
  25262. "$ref": "#/components/schemas/ToolFileContent"
  25263. }
  25264. ]
  25265. }
  25266. }
  25267. },
  25268. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25269. "additionalProperties": false
  25270. }
  25271. },
  25272. "required": ["type", "id", "seq", "aggregateID", "data"],
  25273. "additionalProperties": false
  25274. }
  25275. },
  25276. "required": ["type", "id", "syncEvent"],
  25277. "additionalProperties": false
  25278. },
  25279. "SyncEventSessionNextToolSuccess": {
  25280. "type": "object",
  25281. "properties": {
  25282. "type": {
  25283. "type": "string",
  25284. "enum": ["sync"]
  25285. },
  25286. "id": {
  25287. "type": "string",
  25288. "pattern": "^evt_"
  25289. },
  25290. "syncEvent": {
  25291. "type": "object",
  25292. "properties": {
  25293. "type": {
  25294. "type": "string",
  25295. "enum": ["session.next.tool.success.1"]
  25296. },
  25297. "id": {
  25298. "type": "string",
  25299. "pattern": "^evt_"
  25300. },
  25301. "seq": {
  25302. "type": "number"
  25303. },
  25304. "aggregateID": {
  25305. "type": "string"
  25306. },
  25307. "data": {
  25308. "type": "object",
  25309. "properties": {
  25310. "timestamp": {
  25311. "type": "number"
  25312. },
  25313. "sessionID": {
  25314. "type": "string",
  25315. "pattern": "^ses"
  25316. },
  25317. "assistantMessageID": {
  25318. "type": "string",
  25319. "pattern": "^msg_"
  25320. },
  25321. "callID": {
  25322. "type": "string"
  25323. },
  25324. "structured": {
  25325. "type": "object"
  25326. },
  25327. "content": {
  25328. "type": "array",
  25329. "items": {
  25330. "anyOf": [
  25331. {
  25332. "$ref": "#/components/schemas/ToolTextContent"
  25333. },
  25334. {
  25335. "$ref": "#/components/schemas/ToolFileContent"
  25336. }
  25337. ]
  25338. }
  25339. },
  25340. "outputPaths": {
  25341. "type": "array",
  25342. "items": {
  25343. "type": "string"
  25344. }
  25345. },
  25346. "result": {},
  25347. "provider": {
  25348. "type": "object",
  25349. "properties": {
  25350. "executed": {
  25351. "type": "boolean"
  25352. },
  25353. "metadata": {
  25354. "type": "object",
  25355. "additionalProperties": {
  25356. "type": "object"
  25357. }
  25358. }
  25359. },
  25360. "required": ["executed"],
  25361. "additionalProperties": false
  25362. }
  25363. },
  25364. "required": [
  25365. "timestamp",
  25366. "sessionID",
  25367. "assistantMessageID",
  25368. "callID",
  25369. "structured",
  25370. "content",
  25371. "provider"
  25372. ],
  25373. "additionalProperties": false
  25374. }
  25375. },
  25376. "required": ["type", "id", "seq", "aggregateID", "data"],
  25377. "additionalProperties": false
  25378. }
  25379. },
  25380. "required": ["type", "id", "syncEvent"],
  25381. "additionalProperties": false
  25382. },
  25383. "SyncEventSessionNextToolFailed": {
  25384. "type": "object",
  25385. "properties": {
  25386. "type": {
  25387. "type": "string",
  25388. "enum": ["sync"]
  25389. },
  25390. "id": {
  25391. "type": "string",
  25392. "pattern": "^evt_"
  25393. },
  25394. "syncEvent": {
  25395. "type": "object",
  25396. "properties": {
  25397. "type": {
  25398. "type": "string",
  25399. "enum": ["session.next.tool.failed.1"]
  25400. },
  25401. "id": {
  25402. "type": "string",
  25403. "pattern": "^evt_"
  25404. },
  25405. "seq": {
  25406. "type": "number"
  25407. },
  25408. "aggregateID": {
  25409. "type": "string"
  25410. },
  25411. "data": {
  25412. "type": "object",
  25413. "properties": {
  25414. "timestamp": {
  25415. "type": "number"
  25416. },
  25417. "sessionID": {
  25418. "type": "string",
  25419. "pattern": "^ses"
  25420. },
  25421. "assistantMessageID": {
  25422. "type": "string",
  25423. "pattern": "^msg_"
  25424. },
  25425. "callID": {
  25426. "type": "string"
  25427. },
  25428. "error": {
  25429. "$ref": "#/components/schemas/SessionErrorUnknown"
  25430. },
  25431. "result": {},
  25432. "provider": {
  25433. "type": "object",
  25434. "properties": {
  25435. "executed": {
  25436. "type": "boolean"
  25437. },
  25438. "metadata": {
  25439. "type": "object",
  25440. "additionalProperties": {
  25441. "type": "object"
  25442. }
  25443. }
  25444. },
  25445. "required": ["executed"],
  25446. "additionalProperties": false
  25447. }
  25448. },
  25449. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25450. "additionalProperties": false
  25451. }
  25452. },
  25453. "required": ["type", "id", "seq", "aggregateID", "data"],
  25454. "additionalProperties": false
  25455. }
  25456. },
  25457. "required": ["type", "id", "syncEvent"],
  25458. "additionalProperties": false
  25459. },
  25460. "SyncEventSessionNextRetried": {
  25461. "type": "object",
  25462. "properties": {
  25463. "type": {
  25464. "type": "string",
  25465. "enum": ["sync"]
  25466. },
  25467. "id": {
  25468. "type": "string",
  25469. "pattern": "^evt_"
  25470. },
  25471. "syncEvent": {
  25472. "type": "object",
  25473. "properties": {
  25474. "type": {
  25475. "type": "string",
  25476. "enum": ["session.next.retried.1"]
  25477. },
  25478. "id": {
  25479. "type": "string",
  25480. "pattern": "^evt_"
  25481. },
  25482. "seq": {
  25483. "type": "number"
  25484. },
  25485. "aggregateID": {
  25486. "type": "string"
  25487. },
  25488. "data": {
  25489. "type": "object",
  25490. "properties": {
  25491. "timestamp": {
  25492. "type": "number"
  25493. },
  25494. "sessionID": {
  25495. "type": "string",
  25496. "pattern": "^ses"
  25497. },
  25498. "attempt": {
  25499. "type": "number"
  25500. },
  25501. "error": {
  25502. "$ref": "#/components/schemas/SessionNextRetry_error"
  25503. }
  25504. },
  25505. "required": ["timestamp", "sessionID", "attempt", "error"],
  25506. "additionalProperties": false
  25507. }
  25508. },
  25509. "required": ["type", "id", "seq", "aggregateID", "data"],
  25510. "additionalProperties": false
  25511. }
  25512. },
  25513. "required": ["type", "id", "syncEvent"],
  25514. "additionalProperties": false
  25515. },
  25516. "SyncEventSessionNextCompactionStarted": {
  25517. "type": "object",
  25518. "properties": {
  25519. "type": {
  25520. "type": "string",
  25521. "enum": ["sync"]
  25522. },
  25523. "id": {
  25524. "type": "string",
  25525. "pattern": "^evt_"
  25526. },
  25527. "syncEvent": {
  25528. "type": "object",
  25529. "properties": {
  25530. "type": {
  25531. "type": "string",
  25532. "enum": ["session.next.compaction.started.1"]
  25533. },
  25534. "id": {
  25535. "type": "string",
  25536. "pattern": "^evt_"
  25537. },
  25538. "seq": {
  25539. "type": "number"
  25540. },
  25541. "aggregateID": {
  25542. "type": "string"
  25543. },
  25544. "data": {
  25545. "type": "object",
  25546. "properties": {
  25547. "timestamp": {
  25548. "type": "number"
  25549. },
  25550. "sessionID": {
  25551. "type": "string",
  25552. "pattern": "^ses"
  25553. },
  25554. "messageID": {
  25555. "type": "string",
  25556. "pattern": "^msg_"
  25557. },
  25558. "reason": {
  25559. "type": "string",
  25560. "enum": ["auto", "manual"]
  25561. }
  25562. },
  25563. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25564. "additionalProperties": false
  25565. }
  25566. },
  25567. "required": ["type", "id", "seq", "aggregateID", "data"],
  25568. "additionalProperties": false
  25569. }
  25570. },
  25571. "required": ["type", "id", "syncEvent"],
  25572. "additionalProperties": false
  25573. },
  25574. "SyncEventSessionNextCompactionEnded": {
  25575. "type": "object",
  25576. "properties": {
  25577. "type": {
  25578. "type": "string",
  25579. "enum": ["sync"]
  25580. },
  25581. "id": {
  25582. "type": "string",
  25583. "pattern": "^evt_"
  25584. },
  25585. "syncEvent": {
  25586. "type": "object",
  25587. "properties": {
  25588. "type": {
  25589. "type": "string",
  25590. "enum": ["session.next.compaction.ended.2"]
  25591. },
  25592. "id": {
  25593. "type": "string",
  25594. "pattern": "^evt_"
  25595. },
  25596. "seq": {
  25597. "type": "number"
  25598. },
  25599. "aggregateID": {
  25600. "type": "string"
  25601. },
  25602. "data": {
  25603. "type": "object",
  25604. "properties": {
  25605. "timestamp": {
  25606. "type": "number"
  25607. },
  25608. "sessionID": {
  25609. "type": "string",
  25610. "pattern": "^ses"
  25611. },
  25612. "messageID": {
  25613. "type": "string",
  25614. "pattern": "^msg_"
  25615. },
  25616. "reason": {
  25617. "type": "string",
  25618. "enum": ["auto", "manual"]
  25619. },
  25620. "text": {
  25621. "type": "string"
  25622. },
  25623. "recent": {
  25624. "type": "string"
  25625. }
  25626. },
  25627. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25628. "additionalProperties": false
  25629. }
  25630. },
  25631. "required": ["type", "id", "seq", "aggregateID", "data"],
  25632. "additionalProperties": false
  25633. }
  25634. },
  25635. "required": ["type", "id", "syncEvent"],
  25636. "additionalProperties": false
  25637. },
  25638. "ConfigV2ReferenceGit": {
  25639. "type": "object",
  25640. "properties": {
  25641. "repository": {
  25642. "type": "string"
  25643. },
  25644. "branch": {
  25645. "type": "string"
  25646. },
  25647. "description": {
  25648. "type": "string"
  25649. },
  25650. "hidden": {
  25651. "type": "boolean"
  25652. }
  25653. },
  25654. "required": ["repository"],
  25655. "additionalProperties": false
  25656. },
  25657. "ConfigV2ReferenceLocal": {
  25658. "type": "object",
  25659. "properties": {
  25660. "path": {
  25661. "type": "string"
  25662. },
  25663. "description": {
  25664. "type": "string"
  25665. },
  25666. "hidden": {
  25667. "type": "boolean"
  25668. }
  25669. },
  25670. "required": ["path"],
  25671. "additionalProperties": false
  25672. },
  25673. "PolicyEffect": {
  25674. "type": "string",
  25675. "enum": ["allow", "deny"]
  25676. },
  25677. "ConfigV2ExperimentalPolicy": {
  25678. "type": "object",
  25679. "properties": {
  25680. "action": {
  25681. "type": "string",
  25682. "enum": ["provider.use"]
  25683. },
  25684. "effect": {
  25685. "$ref": "#/components/schemas/PolicyEffect"
  25686. },
  25687. "resource": {
  25688. "type": "string"
  25689. }
  25690. },
  25691. "required": ["action", "effect", "resource"],
  25692. "additionalProperties": false
  25693. },
  25694. "ProjectDirectories": {
  25695. "type": "array",
  25696. "items": {
  25697. "type": "object",
  25698. "properties": {
  25699. "directory": {
  25700. "type": "string"
  25701. },
  25702. "strategy": {
  25703. "type": "string"
  25704. }
  25705. },
  25706. "required": ["directory"],
  25707. "additionalProperties": false
  25708. }
  25709. },
  25710. "LocationInfo": {
  25711. "type": "object",
  25712. "properties": {
  25713. "directory": {
  25714. "type": "string"
  25715. },
  25716. "workspaceID": {
  25717. "type": "string",
  25718. "pattern": "^wrk"
  25719. },
  25720. "project": {
  25721. "type": "object",
  25722. "properties": {
  25723. "id": {
  25724. "type": "string"
  25725. },
  25726. "directory": {
  25727. "type": "string"
  25728. }
  25729. },
  25730. "required": ["id", "directory"],
  25731. "additionalProperties": false
  25732. }
  25733. },
  25734. "required": ["directory", "project"],
  25735. "additionalProperties": false
  25736. },
  25737. "PermissionV2Effect": {
  25738. "type": "string",
  25739. "enum": ["allow", "deny", "ask"]
  25740. },
  25741. "PermissionV2Rule": {
  25742. "type": "object",
  25743. "properties": {
  25744. "action": {
  25745. "type": "string"
  25746. },
  25747. "resource": {
  25748. "type": "string"
  25749. },
  25750. "effect": {
  25751. "$ref": "#/components/schemas/PermissionV2Effect"
  25752. }
  25753. },
  25754. "required": ["action", "resource", "effect"],
  25755. "additionalProperties": false
  25756. },
  25757. "PermissionV2Ruleset": {
  25758. "type": "array",
  25759. "items": {
  25760. "$ref": "#/components/schemas/PermissionV2Rule"
  25761. }
  25762. },
  25763. "AgentV2Info": {
  25764. "type": "object",
  25765. "properties": {
  25766. "id": {
  25767. "type": "string"
  25768. },
  25769. "model": {
  25770. "type": "object",
  25771. "properties": {
  25772. "id": {
  25773. "type": "string"
  25774. },
  25775. "providerID": {
  25776. "type": "string"
  25777. },
  25778. "variant": {
  25779. "type": "string"
  25780. }
  25781. },
  25782. "required": ["id", "providerID"],
  25783. "additionalProperties": false
  25784. },
  25785. "request": {
  25786. "type": "object",
  25787. "properties": {
  25788. "headers": {
  25789. "type": "object",
  25790. "additionalProperties": {
  25791. "type": "string"
  25792. }
  25793. },
  25794. "body": {
  25795. "type": "object"
  25796. }
  25797. },
  25798. "required": ["headers", "body"],
  25799. "additionalProperties": false
  25800. },
  25801. "system": {
  25802. "type": "string"
  25803. },
  25804. "description": {
  25805. "type": "string"
  25806. },
  25807. "mode": {
  25808. "type": "string",
  25809. "enum": ["subagent", "primary", "all"]
  25810. },
  25811. "hidden": {
  25812. "type": "boolean"
  25813. },
  25814. "color": {
  25815. "anyOf": [
  25816. {
  25817. "type": "string",
  25818. "pattern": "^#[0-9a-fA-F]{6}$"
  25819. },
  25820. {
  25821. "type": "string",
  25822. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25823. }
  25824. ]
  25825. },
  25826. "steps": {
  25827. "type": "integer",
  25828. "exclusiveMinimum": 0
  25829. },
  25830. "permissions": {
  25831. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25832. }
  25833. },
  25834. "required": ["id", "request", "mode", "hidden", "permissions"],
  25835. "additionalProperties": false
  25836. },
  25837. "SessionV2Info": {
  25838. "type": "object",
  25839. "properties": {
  25840. "id": {
  25841. "type": "string",
  25842. "pattern": "^ses"
  25843. },
  25844. "parentID": {
  25845. "type": "string",
  25846. "pattern": "^ses"
  25847. },
  25848. "projectID": {
  25849. "type": "string"
  25850. },
  25851. "agent": {
  25852. "type": "string"
  25853. },
  25854. "model": {
  25855. "type": "object",
  25856. "properties": {
  25857. "id": {
  25858. "type": "string"
  25859. },
  25860. "providerID": {
  25861. "type": "string"
  25862. },
  25863. "variant": {
  25864. "type": "string"
  25865. }
  25866. },
  25867. "required": ["id", "providerID"],
  25868. "additionalProperties": false
  25869. },
  25870. "cost": {
  25871. "type": "number"
  25872. },
  25873. "tokens": {
  25874. "type": "object",
  25875. "properties": {
  25876. "input": {
  25877. "type": "number"
  25878. },
  25879. "output": {
  25880. "type": "number"
  25881. },
  25882. "reasoning": {
  25883. "type": "number"
  25884. },
  25885. "cache": {
  25886. "type": "object",
  25887. "properties": {
  25888. "read": {
  25889. "type": "number"
  25890. },
  25891. "write": {
  25892. "type": "number"
  25893. }
  25894. },
  25895. "required": ["read", "write"],
  25896. "additionalProperties": false
  25897. }
  25898. },
  25899. "required": ["input", "output", "reasoning", "cache"],
  25900. "additionalProperties": false
  25901. },
  25902. "time": {
  25903. "type": "object",
  25904. "properties": {
  25905. "created": {
  25906. "type": "number"
  25907. },
  25908. "updated": {
  25909. "type": "number"
  25910. },
  25911. "archived": {
  25912. "type": "number"
  25913. }
  25914. },
  25915. "required": ["created", "updated"],
  25916. "additionalProperties": false
  25917. },
  25918. "title": {
  25919. "type": "string"
  25920. },
  25921. "location": {
  25922. "$ref": "#/components/schemas/LocationRef"
  25923. },
  25924. "subpath": {
  25925. "type": "string"
  25926. }
  25927. },
  25928. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25929. "additionalProperties": false
  25930. },
  25931. "SessionInputAdmitted": {
  25932. "type": "object",
  25933. "properties": {
  25934. "admittedSeq": {
  25935. "type": "integer",
  25936. "minimum": 0
  25937. },
  25938. "id": {
  25939. "type": "string",
  25940. "pattern": "^msg_"
  25941. },
  25942. "sessionID": {
  25943. "type": "string",
  25944. "pattern": "^ses"
  25945. },
  25946. "prompt": {
  25947. "$ref": "#/components/schemas/Prompt"
  25948. },
  25949. "delivery": {
  25950. "type": "string",
  25951. "enum": ["steer", "queue"]
  25952. },
  25953. "timeCreated": {
  25954. "type": "number"
  25955. },
  25956. "promotedSeq": {
  25957. "type": "integer",
  25958. "minimum": 0
  25959. }
  25960. },
  25961. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  25962. "additionalProperties": false
  25963. },
  25964. "SessionMessageAgentSwitched": {
  25965. "type": "object",
  25966. "properties": {
  25967. "id": {
  25968. "type": "string",
  25969. "pattern": "^msg_"
  25970. },
  25971. "metadata": {
  25972. "type": "object"
  25973. },
  25974. "time": {
  25975. "type": "object",
  25976. "properties": {
  25977. "created": {
  25978. "type": "number"
  25979. }
  25980. },
  25981. "required": ["created"],
  25982. "additionalProperties": false
  25983. },
  25984. "type": {
  25985. "type": "string",
  25986. "enum": ["agent-switched"]
  25987. },
  25988. "agent": {
  25989. "type": "string"
  25990. }
  25991. },
  25992. "required": ["id", "time", "type", "agent"],
  25993. "additionalProperties": false
  25994. },
  25995. "SessionMessageModelSwitched": {
  25996. "type": "object",
  25997. "properties": {
  25998. "id": {
  25999. "type": "string",
  26000. "pattern": "^msg_"
  26001. },
  26002. "metadata": {
  26003. "type": "object"
  26004. },
  26005. "time": {
  26006. "type": "object",
  26007. "properties": {
  26008. "created": {
  26009. "type": "number"
  26010. }
  26011. },
  26012. "required": ["created"],
  26013. "additionalProperties": false
  26014. },
  26015. "type": {
  26016. "type": "string",
  26017. "enum": ["model-switched"]
  26018. },
  26019. "model": {
  26020. "type": "object",
  26021. "properties": {
  26022. "id": {
  26023. "type": "string"
  26024. },
  26025. "providerID": {
  26026. "type": "string"
  26027. },
  26028. "variant": {
  26029. "type": "string"
  26030. }
  26031. },
  26032. "required": ["id", "providerID"],
  26033. "additionalProperties": false
  26034. }
  26035. },
  26036. "required": ["id", "time", "type", "model"],
  26037. "additionalProperties": false
  26038. },
  26039. "SessionMessageUser": {
  26040. "type": "object",
  26041. "properties": {
  26042. "id": {
  26043. "type": "string",
  26044. "pattern": "^msg_"
  26045. },
  26046. "metadata": {
  26047. "type": "object"
  26048. },
  26049. "time": {
  26050. "type": "object",
  26051. "properties": {
  26052. "created": {
  26053. "type": "number"
  26054. }
  26055. },
  26056. "required": ["created"],
  26057. "additionalProperties": false
  26058. },
  26059. "text": {
  26060. "type": "string"
  26061. },
  26062. "files": {
  26063. "type": "array",
  26064. "items": {
  26065. "$ref": "#/components/schemas/PromptFileAttachment"
  26066. }
  26067. },
  26068. "agents": {
  26069. "type": "array",
  26070. "items": {
  26071. "$ref": "#/components/schemas/PromptAgentAttachment"
  26072. }
  26073. },
  26074. "type": {
  26075. "type": "string",
  26076. "enum": ["user"]
  26077. }
  26078. },
  26079. "required": ["id", "time", "text", "type"],
  26080. "additionalProperties": false
  26081. },
  26082. "SessionMessageSynthetic": {
  26083. "type": "object",
  26084. "properties": {
  26085. "id": {
  26086. "type": "string",
  26087. "pattern": "^msg_"
  26088. },
  26089. "metadata": {
  26090. "type": "object"
  26091. },
  26092. "time": {
  26093. "type": "object",
  26094. "properties": {
  26095. "created": {
  26096. "type": "number"
  26097. }
  26098. },
  26099. "required": ["created"],
  26100. "additionalProperties": false
  26101. },
  26102. "sessionID": {
  26103. "type": "string",
  26104. "pattern": "^ses"
  26105. },
  26106. "text": {
  26107. "type": "string"
  26108. },
  26109. "type": {
  26110. "type": "string",
  26111. "enum": ["synthetic"]
  26112. }
  26113. },
  26114. "required": ["id", "time", "sessionID", "text", "type"],
  26115. "additionalProperties": false
  26116. },
  26117. "SessionMessageSystem": {
  26118. "type": "object",
  26119. "properties": {
  26120. "id": {
  26121. "type": "string",
  26122. "pattern": "^msg_"
  26123. },
  26124. "metadata": {
  26125. "type": "object"
  26126. },
  26127. "time": {
  26128. "type": "object",
  26129. "properties": {
  26130. "created": {
  26131. "type": "number"
  26132. }
  26133. },
  26134. "required": ["created"],
  26135. "additionalProperties": false
  26136. },
  26137. "type": {
  26138. "type": "string",
  26139. "enum": ["system"]
  26140. },
  26141. "text": {
  26142. "type": "string"
  26143. }
  26144. },
  26145. "required": ["id", "time", "type", "text"],
  26146. "additionalProperties": false
  26147. },
  26148. "SessionMessageShell": {
  26149. "type": "object",
  26150. "properties": {
  26151. "id": {
  26152. "type": "string",
  26153. "pattern": "^msg_"
  26154. },
  26155. "metadata": {
  26156. "type": "object"
  26157. },
  26158. "time": {
  26159. "type": "object",
  26160. "properties": {
  26161. "created": {
  26162. "type": "number"
  26163. },
  26164. "completed": {
  26165. "type": "number"
  26166. }
  26167. },
  26168. "required": ["created"],
  26169. "additionalProperties": false
  26170. },
  26171. "type": {
  26172. "type": "string",
  26173. "enum": ["shell"]
  26174. },
  26175. "callID": {
  26176. "type": "string"
  26177. },
  26178. "command": {
  26179. "type": "string"
  26180. },
  26181. "output": {
  26182. "type": "string"
  26183. }
  26184. },
  26185. "required": ["id", "time", "type", "callID", "command", "output"],
  26186. "additionalProperties": false
  26187. },
  26188. "SessionMessageAssistantText": {
  26189. "type": "object",
  26190. "properties": {
  26191. "type": {
  26192. "type": "string",
  26193. "enum": ["text"]
  26194. },
  26195. "id": {
  26196. "type": "string"
  26197. },
  26198. "text": {
  26199. "type": "string"
  26200. }
  26201. },
  26202. "required": ["type", "id", "text"],
  26203. "additionalProperties": false
  26204. },
  26205. "SessionMessageAssistantReasoning": {
  26206. "type": "object",
  26207. "properties": {
  26208. "type": {
  26209. "type": "string",
  26210. "enum": ["reasoning"]
  26211. },
  26212. "id": {
  26213. "type": "string"
  26214. },
  26215. "text": {
  26216. "type": "string"
  26217. },
  26218. "providerMetadata": {
  26219. "type": "object",
  26220. "additionalProperties": {
  26221. "type": "object"
  26222. }
  26223. }
  26224. },
  26225. "required": ["type", "id", "text"],
  26226. "additionalProperties": false
  26227. },
  26228. "SessionMessageToolStatePending": {
  26229. "type": "object",
  26230. "properties": {
  26231. "status": {
  26232. "type": "string",
  26233. "enum": ["pending"]
  26234. },
  26235. "input": {
  26236. "type": "string"
  26237. }
  26238. },
  26239. "required": ["status", "input"],
  26240. "additionalProperties": false
  26241. },
  26242. "SessionMessageToolStateRunning": {
  26243. "type": "object",
  26244. "properties": {
  26245. "status": {
  26246. "type": "string",
  26247. "enum": ["running"]
  26248. },
  26249. "input": {
  26250. "type": "object"
  26251. },
  26252. "structured": {
  26253. "type": "object"
  26254. },
  26255. "content": {
  26256. "type": "array",
  26257. "items": {
  26258. "anyOf": [
  26259. {
  26260. "$ref": "#/components/schemas/ToolTextContent"
  26261. },
  26262. {
  26263. "$ref": "#/components/schemas/ToolFileContent"
  26264. }
  26265. ]
  26266. }
  26267. }
  26268. },
  26269. "required": ["status", "input", "structured", "content"],
  26270. "additionalProperties": false
  26271. },
  26272. "SessionMessageToolStateCompleted": {
  26273. "type": "object",
  26274. "properties": {
  26275. "status": {
  26276. "type": "string",
  26277. "enum": ["completed"]
  26278. },
  26279. "input": {
  26280. "type": "object"
  26281. },
  26282. "attachments": {
  26283. "type": "array",
  26284. "items": {
  26285. "$ref": "#/components/schemas/PromptFileAttachment"
  26286. }
  26287. },
  26288. "content": {
  26289. "type": "array",
  26290. "items": {
  26291. "anyOf": [
  26292. {
  26293. "$ref": "#/components/schemas/ToolTextContent"
  26294. },
  26295. {
  26296. "$ref": "#/components/schemas/ToolFileContent"
  26297. }
  26298. ]
  26299. }
  26300. },
  26301. "outputPaths": {
  26302. "type": "array",
  26303. "items": {
  26304. "type": "string"
  26305. }
  26306. },
  26307. "structured": {
  26308. "type": "object"
  26309. },
  26310. "result": {}
  26311. },
  26312. "required": ["status", "input", "content", "structured"],
  26313. "additionalProperties": false
  26314. },
  26315. "SessionMessageToolStateError": {
  26316. "type": "object",
  26317. "properties": {
  26318. "status": {
  26319. "type": "string",
  26320. "enum": ["error"]
  26321. },
  26322. "input": {
  26323. "type": "object"
  26324. },
  26325. "content": {
  26326. "type": "array",
  26327. "items": {
  26328. "anyOf": [
  26329. {
  26330. "$ref": "#/components/schemas/ToolTextContent"
  26331. },
  26332. {
  26333. "$ref": "#/components/schemas/ToolFileContent"
  26334. }
  26335. ]
  26336. }
  26337. },
  26338. "structured": {
  26339. "type": "object"
  26340. },
  26341. "error": {
  26342. "$ref": "#/components/schemas/SessionErrorUnknown"
  26343. },
  26344. "result": {}
  26345. },
  26346. "required": ["status", "input", "content", "structured", "error"],
  26347. "additionalProperties": false
  26348. },
  26349. "SessionMessageAssistantTool": {
  26350. "type": "object",
  26351. "properties": {
  26352. "type": {
  26353. "type": "string",
  26354. "enum": ["tool"]
  26355. },
  26356. "id": {
  26357. "type": "string"
  26358. },
  26359. "name": {
  26360. "type": "string"
  26361. },
  26362. "provider": {
  26363. "type": "object",
  26364. "properties": {
  26365. "executed": {
  26366. "type": "boolean"
  26367. },
  26368. "metadata": {
  26369. "type": "object",
  26370. "additionalProperties": {
  26371. "type": "object"
  26372. }
  26373. },
  26374. "resultMetadata": {
  26375. "type": "object",
  26376. "additionalProperties": {
  26377. "type": "object"
  26378. }
  26379. }
  26380. },
  26381. "required": ["executed"],
  26382. "additionalProperties": false
  26383. },
  26384. "state": {
  26385. "anyOf": [
  26386. {
  26387. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26388. },
  26389. {
  26390. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26391. },
  26392. {
  26393. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26394. },
  26395. {
  26396. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26397. }
  26398. ]
  26399. },
  26400. "time": {
  26401. "type": "object",
  26402. "properties": {
  26403. "created": {
  26404. "type": "number"
  26405. },
  26406. "ran": {
  26407. "type": "number"
  26408. },
  26409. "completed": {
  26410. "type": "number"
  26411. },
  26412. "pruned": {
  26413. "type": "number"
  26414. }
  26415. },
  26416. "required": ["created"],
  26417. "additionalProperties": false
  26418. }
  26419. },
  26420. "required": ["type", "id", "name", "state", "time"],
  26421. "additionalProperties": false
  26422. },
  26423. "SessionMessageAssistant": {
  26424. "type": "object",
  26425. "properties": {
  26426. "id": {
  26427. "type": "string",
  26428. "pattern": "^msg_"
  26429. },
  26430. "metadata": {
  26431. "type": "object"
  26432. },
  26433. "time": {
  26434. "type": "object",
  26435. "properties": {
  26436. "created": {
  26437. "type": "number"
  26438. },
  26439. "completed": {
  26440. "type": "number"
  26441. }
  26442. },
  26443. "required": ["created"],
  26444. "additionalProperties": false
  26445. },
  26446. "type": {
  26447. "type": "string",
  26448. "enum": ["assistant"]
  26449. },
  26450. "agent": {
  26451. "type": "string"
  26452. },
  26453. "model": {
  26454. "type": "object",
  26455. "properties": {
  26456. "id": {
  26457. "type": "string"
  26458. },
  26459. "providerID": {
  26460. "type": "string"
  26461. },
  26462. "variant": {
  26463. "type": "string"
  26464. }
  26465. },
  26466. "required": ["id", "providerID"],
  26467. "additionalProperties": false
  26468. },
  26469. "content": {
  26470. "type": "array",
  26471. "items": {
  26472. "anyOf": [
  26473. {
  26474. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26475. },
  26476. {
  26477. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26478. },
  26479. {
  26480. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26481. }
  26482. ]
  26483. }
  26484. },
  26485. "snapshot": {
  26486. "type": "object",
  26487. "properties": {
  26488. "start": {
  26489. "type": "string"
  26490. },
  26491. "end": {
  26492. "type": "string"
  26493. }
  26494. },
  26495. "additionalProperties": false
  26496. },
  26497. "finish": {
  26498. "type": "string"
  26499. },
  26500. "cost": {
  26501. "type": "number"
  26502. },
  26503. "tokens": {
  26504. "type": "object",
  26505. "properties": {
  26506. "input": {
  26507. "type": "number"
  26508. },
  26509. "output": {
  26510. "type": "number"
  26511. },
  26512. "reasoning": {
  26513. "type": "number"
  26514. },
  26515. "cache": {
  26516. "type": "object",
  26517. "properties": {
  26518. "read": {
  26519. "type": "number"
  26520. },
  26521. "write": {
  26522. "type": "number"
  26523. }
  26524. },
  26525. "required": ["read", "write"],
  26526. "additionalProperties": false
  26527. }
  26528. },
  26529. "required": ["input", "output", "reasoning", "cache"],
  26530. "additionalProperties": false
  26531. },
  26532. "error": {
  26533. "$ref": "#/components/schemas/SessionErrorUnknown"
  26534. }
  26535. },
  26536. "required": ["id", "time", "type", "agent", "model", "content"],
  26537. "additionalProperties": false
  26538. },
  26539. "SessionMessageCompaction": {
  26540. "type": "object",
  26541. "properties": {
  26542. "type": {
  26543. "type": "string",
  26544. "enum": ["compaction"]
  26545. },
  26546. "reason": {
  26547. "type": "string",
  26548. "enum": ["auto", "manual"]
  26549. },
  26550. "summary": {
  26551. "type": "string"
  26552. },
  26553. "recent": {
  26554. "type": "string"
  26555. },
  26556. "id": {
  26557. "type": "string",
  26558. "pattern": "^msg_"
  26559. },
  26560. "metadata": {
  26561. "type": "object"
  26562. },
  26563. "time": {
  26564. "type": "object",
  26565. "properties": {
  26566. "created": {
  26567. "type": "number"
  26568. }
  26569. },
  26570. "required": ["created"],
  26571. "additionalProperties": false
  26572. }
  26573. },
  26574. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26575. "additionalProperties": false
  26576. },
  26577. "SessionMessage": {
  26578. "anyOf": [
  26579. {
  26580. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26581. },
  26582. {
  26583. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26584. },
  26585. {
  26586. "$ref": "#/components/schemas/SessionMessageUser"
  26587. },
  26588. {
  26589. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26590. },
  26591. {
  26592. "$ref": "#/components/schemas/SessionMessageSystem"
  26593. },
  26594. {
  26595. "$ref": "#/components/schemas/SessionMessageShell"
  26596. },
  26597. {
  26598. "$ref": "#/components/schemas/SessionMessageAssistant"
  26599. },
  26600. {
  26601. "$ref": "#/components/schemas/SessionMessageCompaction"
  26602. }
  26603. ]
  26604. },
  26605. "ModelV2Info": {
  26606. "type": "object",
  26607. "properties": {
  26608. "id": {
  26609. "type": "string"
  26610. },
  26611. "providerID": {
  26612. "type": "string"
  26613. },
  26614. "family": {
  26615. "type": "string"
  26616. },
  26617. "name": {
  26618. "type": "string"
  26619. },
  26620. "api": {
  26621. "anyOf": [
  26622. {
  26623. "type": "object",
  26624. "properties": {
  26625. "id": {
  26626. "type": "string"
  26627. },
  26628. "type": {
  26629. "type": "string",
  26630. "enum": ["aisdk"]
  26631. },
  26632. "package": {
  26633. "type": "string"
  26634. },
  26635. "url": {
  26636. "type": "string"
  26637. },
  26638. "settings": {
  26639. "type": "object"
  26640. }
  26641. },
  26642. "required": ["id", "type", "package"],
  26643. "additionalProperties": false
  26644. },
  26645. {
  26646. "type": "object",
  26647. "properties": {
  26648. "id": {
  26649. "type": "string"
  26650. },
  26651. "type": {
  26652. "type": "string",
  26653. "enum": ["native"]
  26654. },
  26655. "url": {
  26656. "type": "string"
  26657. },
  26658. "settings": {
  26659. "type": "object"
  26660. }
  26661. },
  26662. "required": ["id", "type", "settings"],
  26663. "additionalProperties": false
  26664. }
  26665. ]
  26666. },
  26667. "capabilities": {
  26668. "type": "object",
  26669. "properties": {
  26670. "tools": {
  26671. "type": "boolean"
  26672. },
  26673. "input": {
  26674. "type": "array",
  26675. "items": {
  26676. "type": "string"
  26677. }
  26678. },
  26679. "output": {
  26680. "type": "array",
  26681. "items": {
  26682. "type": "string"
  26683. }
  26684. }
  26685. },
  26686. "required": ["tools", "input", "output"],
  26687. "additionalProperties": false
  26688. },
  26689. "request": {
  26690. "type": "object",
  26691. "properties": {
  26692. "headers": {
  26693. "type": "object",
  26694. "additionalProperties": {
  26695. "type": "string"
  26696. }
  26697. },
  26698. "body": {
  26699. "type": "object"
  26700. },
  26701. "generation": {
  26702. "type": "object",
  26703. "properties": {
  26704. "maxTokens": {
  26705. "anyOf": [
  26706. {
  26707. "type": "number"
  26708. },
  26709. {
  26710. "type": "string",
  26711. "enum": ["NaN"]
  26712. },
  26713. {
  26714. "type": "string",
  26715. "enum": ["Infinity"]
  26716. },
  26717. {
  26718. "type": "string",
  26719. "enum": ["-Infinity"]
  26720. },
  26721. {
  26722. "type": "string",
  26723. "enum": ["Infinity", "-Infinity", "NaN"]
  26724. }
  26725. ]
  26726. },
  26727. "temperature": {
  26728. "anyOf": [
  26729. {
  26730. "type": "number"
  26731. },
  26732. {
  26733. "type": "string",
  26734. "enum": ["NaN"]
  26735. },
  26736. {
  26737. "type": "string",
  26738. "enum": ["Infinity"]
  26739. },
  26740. {
  26741. "type": "string",
  26742. "enum": ["-Infinity"]
  26743. },
  26744. {
  26745. "type": "string",
  26746. "enum": ["Infinity", "-Infinity", "NaN"]
  26747. }
  26748. ]
  26749. },
  26750. "topP": {
  26751. "anyOf": [
  26752. {
  26753. "type": "number"
  26754. },
  26755. {
  26756. "type": "string",
  26757. "enum": ["NaN"]
  26758. },
  26759. {
  26760. "type": "string",
  26761. "enum": ["Infinity"]
  26762. },
  26763. {
  26764. "type": "string",
  26765. "enum": ["-Infinity"]
  26766. },
  26767. {
  26768. "type": "string",
  26769. "enum": ["Infinity", "-Infinity", "NaN"]
  26770. }
  26771. ]
  26772. },
  26773. "topK": {
  26774. "anyOf": [
  26775. {
  26776. "type": "number"
  26777. },
  26778. {
  26779. "type": "string",
  26780. "enum": ["NaN"]
  26781. },
  26782. {
  26783. "type": "string",
  26784. "enum": ["Infinity"]
  26785. },
  26786. {
  26787. "type": "string",
  26788. "enum": ["-Infinity"]
  26789. },
  26790. {
  26791. "type": "string",
  26792. "enum": ["Infinity", "-Infinity", "NaN"]
  26793. }
  26794. ]
  26795. },
  26796. "frequencyPenalty": {
  26797. "anyOf": [
  26798. {
  26799. "type": "number"
  26800. },
  26801. {
  26802. "type": "string",
  26803. "enum": ["NaN"]
  26804. },
  26805. {
  26806. "type": "string",
  26807. "enum": ["Infinity"]
  26808. },
  26809. {
  26810. "type": "string",
  26811. "enum": ["-Infinity"]
  26812. },
  26813. {
  26814. "type": "string",
  26815. "enum": ["Infinity", "-Infinity", "NaN"]
  26816. }
  26817. ]
  26818. },
  26819. "presencePenalty": {
  26820. "anyOf": [
  26821. {
  26822. "type": "number"
  26823. },
  26824. {
  26825. "type": "string",
  26826. "enum": ["NaN"]
  26827. },
  26828. {
  26829. "type": "string",
  26830. "enum": ["Infinity"]
  26831. },
  26832. {
  26833. "type": "string",
  26834. "enum": ["-Infinity"]
  26835. },
  26836. {
  26837. "type": "string",
  26838. "enum": ["Infinity", "-Infinity", "NaN"]
  26839. }
  26840. ]
  26841. },
  26842. "seed": {
  26843. "anyOf": [
  26844. {
  26845. "type": "number"
  26846. },
  26847. {
  26848. "type": "string",
  26849. "enum": ["NaN"]
  26850. },
  26851. {
  26852. "type": "string",
  26853. "enum": ["Infinity"]
  26854. },
  26855. {
  26856. "type": "string",
  26857. "enum": ["-Infinity"]
  26858. },
  26859. {
  26860. "type": "string",
  26861. "enum": ["Infinity", "-Infinity", "NaN"]
  26862. }
  26863. ]
  26864. },
  26865. "stop": {
  26866. "type": "array",
  26867. "items": {
  26868. "type": "string"
  26869. }
  26870. }
  26871. },
  26872. "additionalProperties": false
  26873. },
  26874. "options": {
  26875. "type": "object"
  26876. },
  26877. "variant": {
  26878. "type": "string"
  26879. }
  26880. },
  26881. "required": ["headers", "body"],
  26882. "additionalProperties": false
  26883. },
  26884. "variants": {
  26885. "type": "array",
  26886. "items": {
  26887. "type": "object",
  26888. "properties": {
  26889. "id": {
  26890. "type": "string"
  26891. },
  26892. "headers": {
  26893. "type": "object",
  26894. "additionalProperties": {
  26895. "type": "string"
  26896. }
  26897. },
  26898. "body": {
  26899. "type": "object"
  26900. },
  26901. "generation": {
  26902. "type": "object",
  26903. "properties": {
  26904. "maxTokens": {
  26905. "anyOf": [
  26906. {
  26907. "type": "number"
  26908. },
  26909. {
  26910. "type": "string",
  26911. "enum": ["NaN"]
  26912. },
  26913. {
  26914. "type": "string",
  26915. "enum": ["Infinity"]
  26916. },
  26917. {
  26918. "type": "string",
  26919. "enum": ["-Infinity"]
  26920. },
  26921. {
  26922. "type": "string",
  26923. "enum": ["Infinity", "-Infinity", "NaN"]
  26924. }
  26925. ]
  26926. },
  26927. "temperature": {
  26928. "anyOf": [
  26929. {
  26930. "type": "number"
  26931. },
  26932. {
  26933. "type": "string",
  26934. "enum": ["NaN"]
  26935. },
  26936. {
  26937. "type": "string",
  26938. "enum": ["Infinity"]
  26939. },
  26940. {
  26941. "type": "string",
  26942. "enum": ["-Infinity"]
  26943. },
  26944. {
  26945. "type": "string",
  26946. "enum": ["Infinity", "-Infinity", "NaN"]
  26947. }
  26948. ]
  26949. },
  26950. "topP": {
  26951. "anyOf": [
  26952. {
  26953. "type": "number"
  26954. },
  26955. {
  26956. "type": "string",
  26957. "enum": ["NaN"]
  26958. },
  26959. {
  26960. "type": "string",
  26961. "enum": ["Infinity"]
  26962. },
  26963. {
  26964. "type": "string",
  26965. "enum": ["-Infinity"]
  26966. },
  26967. {
  26968. "type": "string",
  26969. "enum": ["Infinity", "-Infinity", "NaN"]
  26970. }
  26971. ]
  26972. },
  26973. "topK": {
  26974. "anyOf": [
  26975. {
  26976. "type": "number"
  26977. },
  26978. {
  26979. "type": "string",
  26980. "enum": ["NaN"]
  26981. },
  26982. {
  26983. "type": "string",
  26984. "enum": ["Infinity"]
  26985. },
  26986. {
  26987. "type": "string",
  26988. "enum": ["-Infinity"]
  26989. },
  26990. {
  26991. "type": "string",
  26992. "enum": ["Infinity", "-Infinity", "NaN"]
  26993. }
  26994. ]
  26995. },
  26996. "frequencyPenalty": {
  26997. "anyOf": [
  26998. {
  26999. "type": "number"
  27000. },
  27001. {
  27002. "type": "string",
  27003. "enum": ["NaN"]
  27004. },
  27005. {
  27006. "type": "string",
  27007. "enum": ["Infinity"]
  27008. },
  27009. {
  27010. "type": "string",
  27011. "enum": ["-Infinity"]
  27012. },
  27013. {
  27014. "type": "string",
  27015. "enum": ["Infinity", "-Infinity", "NaN"]
  27016. }
  27017. ]
  27018. },
  27019. "presencePenalty": {
  27020. "anyOf": [
  27021. {
  27022. "type": "number"
  27023. },
  27024. {
  27025. "type": "string",
  27026. "enum": ["NaN"]
  27027. },
  27028. {
  27029. "type": "string",
  27030. "enum": ["Infinity"]
  27031. },
  27032. {
  27033. "type": "string",
  27034. "enum": ["-Infinity"]
  27035. },
  27036. {
  27037. "type": "string",
  27038. "enum": ["Infinity", "-Infinity", "NaN"]
  27039. }
  27040. ]
  27041. },
  27042. "seed": {
  27043. "anyOf": [
  27044. {
  27045. "type": "number"
  27046. },
  27047. {
  27048. "type": "string",
  27049. "enum": ["NaN"]
  27050. },
  27051. {
  27052. "type": "string",
  27053. "enum": ["Infinity"]
  27054. },
  27055. {
  27056. "type": "string",
  27057. "enum": ["-Infinity"]
  27058. },
  27059. {
  27060. "type": "string",
  27061. "enum": ["Infinity", "-Infinity", "NaN"]
  27062. }
  27063. ]
  27064. },
  27065. "stop": {
  27066. "type": "array",
  27067. "items": {
  27068. "type": "string"
  27069. }
  27070. }
  27071. },
  27072. "additionalProperties": false
  27073. },
  27074. "options": {
  27075. "type": "object"
  27076. }
  27077. },
  27078. "required": ["id", "headers", "body"],
  27079. "additionalProperties": false
  27080. }
  27081. },
  27082. "time": {
  27083. "type": "object",
  27084. "properties": {
  27085. "released": {
  27086. "type": "number"
  27087. }
  27088. },
  27089. "required": ["released"],
  27090. "additionalProperties": false
  27091. },
  27092. "cost": {
  27093. "type": "array",
  27094. "items": {
  27095. "type": "object",
  27096. "properties": {
  27097. "tier": {
  27098. "type": "object",
  27099. "properties": {
  27100. "type": {
  27101. "type": "string",
  27102. "enum": ["context"]
  27103. },
  27104. "size": {
  27105. "type": "integer"
  27106. }
  27107. },
  27108. "required": ["type", "size"],
  27109. "additionalProperties": false
  27110. },
  27111. "input": {
  27112. "type": "number"
  27113. },
  27114. "output": {
  27115. "type": "number"
  27116. },
  27117. "cache": {
  27118. "type": "object",
  27119. "properties": {
  27120. "read": {
  27121. "type": "number"
  27122. },
  27123. "write": {
  27124. "type": "number"
  27125. }
  27126. },
  27127. "required": ["read", "write"],
  27128. "additionalProperties": false
  27129. }
  27130. },
  27131. "required": ["input", "output", "cache"],
  27132. "additionalProperties": false
  27133. }
  27134. },
  27135. "status": {
  27136. "type": "string",
  27137. "enum": ["alpha", "beta", "deprecated", "active"]
  27138. },
  27139. "enabled": {
  27140. "type": "boolean"
  27141. },
  27142. "limit": {
  27143. "type": "object",
  27144. "properties": {
  27145. "context": {
  27146. "type": "integer"
  27147. },
  27148. "input": {
  27149. "type": "integer"
  27150. },
  27151. "output": {
  27152. "type": "integer"
  27153. }
  27154. },
  27155. "required": ["context", "output"],
  27156. "additionalProperties": false
  27157. }
  27158. },
  27159. "required": [
  27160. "id",
  27161. "providerID",
  27162. "name",
  27163. "api",
  27164. "capabilities",
  27165. "request",
  27166. "variants",
  27167. "time",
  27168. "cost",
  27169. "status",
  27170. "enabled",
  27171. "limit"
  27172. ],
  27173. "additionalProperties": false
  27174. },
  27175. "ProviderV2Info": {
  27176. "type": "object",
  27177. "properties": {
  27178. "id": {
  27179. "type": "string"
  27180. },
  27181. "name": {
  27182. "type": "string"
  27183. },
  27184. "disabled": {
  27185. "type": "boolean"
  27186. },
  27187. "api": {
  27188. "anyOf": [
  27189. {
  27190. "type": "object",
  27191. "properties": {
  27192. "type": {
  27193. "type": "string",
  27194. "enum": ["aisdk"]
  27195. },
  27196. "package": {
  27197. "type": "string"
  27198. },
  27199. "url": {
  27200. "type": "string"
  27201. },
  27202. "settings": {
  27203. "type": "object"
  27204. }
  27205. },
  27206. "required": ["type", "package"],
  27207. "additionalProperties": false
  27208. },
  27209. {
  27210. "type": "object",
  27211. "properties": {
  27212. "type": {
  27213. "type": "string",
  27214. "enum": ["native"]
  27215. },
  27216. "url": {
  27217. "type": "string"
  27218. },
  27219. "settings": {
  27220. "type": "object"
  27221. }
  27222. },
  27223. "required": ["type", "settings"],
  27224. "additionalProperties": false
  27225. }
  27226. ]
  27227. },
  27228. "request": {
  27229. "type": "object",
  27230. "properties": {
  27231. "headers": {
  27232. "type": "object",
  27233. "additionalProperties": {
  27234. "type": "string"
  27235. }
  27236. },
  27237. "body": {
  27238. "type": "object"
  27239. }
  27240. },
  27241. "required": ["headers", "body"],
  27242. "additionalProperties": false
  27243. }
  27244. },
  27245. "required": ["id", "name", "api", "request"],
  27246. "additionalProperties": false
  27247. },
  27248. "IntegrationWhen": {
  27249. "type": "object",
  27250. "properties": {
  27251. "key": {
  27252. "type": "string"
  27253. },
  27254. "op": {
  27255. "type": "string",
  27256. "enum": ["eq", "neq"]
  27257. },
  27258. "value": {
  27259. "type": "string"
  27260. }
  27261. },
  27262. "required": ["key", "op", "value"],
  27263. "additionalProperties": false
  27264. },
  27265. "IntegrationTextPrompt": {
  27266. "type": "object",
  27267. "properties": {
  27268. "type": {
  27269. "type": "string",
  27270. "enum": ["text"]
  27271. },
  27272. "key": {
  27273. "type": "string"
  27274. },
  27275. "message": {
  27276. "type": "string"
  27277. },
  27278. "placeholder": {
  27279. "type": "string"
  27280. },
  27281. "when": {
  27282. "$ref": "#/components/schemas/IntegrationWhen"
  27283. }
  27284. },
  27285. "required": ["type", "key", "message"],
  27286. "additionalProperties": false
  27287. },
  27288. "IntegrationSelectPrompt": {
  27289. "type": "object",
  27290. "properties": {
  27291. "type": {
  27292. "type": "string",
  27293. "enum": ["select"]
  27294. },
  27295. "key": {
  27296. "type": "string"
  27297. },
  27298. "message": {
  27299. "type": "string"
  27300. },
  27301. "options": {
  27302. "type": "array",
  27303. "items": {
  27304. "type": "object",
  27305. "properties": {
  27306. "label": {
  27307. "type": "string"
  27308. },
  27309. "value": {
  27310. "type": "string"
  27311. },
  27312. "hint": {
  27313. "type": "string"
  27314. }
  27315. },
  27316. "required": ["label", "value"],
  27317. "additionalProperties": false
  27318. }
  27319. },
  27320. "when": {
  27321. "$ref": "#/components/schemas/IntegrationWhen"
  27322. }
  27323. },
  27324. "required": ["type", "key", "message", "options"],
  27325. "additionalProperties": false
  27326. },
  27327. "IntegrationOAuthMethod": {
  27328. "type": "object",
  27329. "properties": {
  27330. "id": {
  27331. "type": "string"
  27332. },
  27333. "type": {
  27334. "type": "string",
  27335. "enum": ["oauth"]
  27336. },
  27337. "label": {
  27338. "type": "string"
  27339. },
  27340. "prompts": {
  27341. "type": "array",
  27342. "items": {
  27343. "anyOf": [
  27344. {
  27345. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27346. },
  27347. {
  27348. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27349. }
  27350. ]
  27351. }
  27352. }
  27353. },
  27354. "required": ["id", "type", "label"],
  27355. "additionalProperties": false
  27356. },
  27357. "IntegrationKeyMethod": {
  27358. "type": "object",
  27359. "properties": {
  27360. "type": {
  27361. "type": "string",
  27362. "enum": ["key"]
  27363. },
  27364. "label": {
  27365. "type": "string"
  27366. }
  27367. },
  27368. "required": ["type"],
  27369. "additionalProperties": false
  27370. },
  27371. "IntegrationEnvMethod": {
  27372. "type": "object",
  27373. "properties": {
  27374. "type": {
  27375. "type": "string",
  27376. "enum": ["env"]
  27377. },
  27378. "names": {
  27379. "type": "array",
  27380. "items": {
  27381. "type": "string"
  27382. }
  27383. }
  27384. },
  27385. "required": ["type", "names"],
  27386. "additionalProperties": false
  27387. },
  27388. "ConnectionCredentialInfo": {
  27389. "type": "object",
  27390. "properties": {
  27391. "type": {
  27392. "type": "string",
  27393. "enum": ["credential"]
  27394. },
  27395. "id": {
  27396. "type": "string"
  27397. },
  27398. "label": {
  27399. "type": "string"
  27400. }
  27401. },
  27402. "required": ["type", "id", "label"],
  27403. "additionalProperties": false
  27404. },
  27405. "ConnectionEnvInfo": {
  27406. "type": "object",
  27407. "properties": {
  27408. "type": {
  27409. "type": "string",
  27410. "enum": ["env"]
  27411. },
  27412. "name": {
  27413. "type": "string"
  27414. }
  27415. },
  27416. "required": ["type", "name"],
  27417. "additionalProperties": false
  27418. },
  27419. "ConnectionInfo": {
  27420. "anyOf": [
  27421. {
  27422. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27423. },
  27424. {
  27425. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27426. }
  27427. ]
  27428. },
  27429. "IntegrationInfo": {
  27430. "type": "object",
  27431. "properties": {
  27432. "id": {
  27433. "type": "string"
  27434. },
  27435. "name": {
  27436. "type": "string"
  27437. },
  27438. "methods": {
  27439. "type": "array",
  27440. "items": {
  27441. "anyOf": [
  27442. {
  27443. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27444. },
  27445. {
  27446. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27447. },
  27448. {
  27449. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27450. }
  27451. ]
  27452. }
  27453. },
  27454. "connections": {
  27455. "type": "array",
  27456. "items": {
  27457. "$ref": "#/components/schemas/ConnectionInfo"
  27458. }
  27459. }
  27460. },
  27461. "required": ["id", "name", "methods", "connections"],
  27462. "additionalProperties": false
  27463. },
  27464. "IntegrationAttempt": {
  27465. "type": "object",
  27466. "properties": {
  27467. "attemptID": {
  27468. "type": "string"
  27469. },
  27470. "url": {
  27471. "type": "string"
  27472. },
  27473. "instructions": {
  27474. "type": "string"
  27475. },
  27476. "mode": {
  27477. "type": "string",
  27478. "enum": ["auto", "code"]
  27479. },
  27480. "time": {
  27481. "type": "object",
  27482. "properties": {
  27483. "created": {
  27484. "anyOf": [
  27485. {
  27486. "type": "number"
  27487. },
  27488. {
  27489. "type": "string",
  27490. "enum": ["NaN"]
  27491. },
  27492. {
  27493. "type": "string",
  27494. "enum": ["Infinity"]
  27495. },
  27496. {
  27497. "type": "string",
  27498. "enum": ["-Infinity"]
  27499. },
  27500. {
  27501. "type": "string",
  27502. "enum": ["Infinity", "-Infinity", "NaN"]
  27503. }
  27504. ]
  27505. },
  27506. "expires": {
  27507. "anyOf": [
  27508. {
  27509. "type": "number"
  27510. },
  27511. {
  27512. "type": "string",
  27513. "enum": ["NaN"]
  27514. },
  27515. {
  27516. "type": "string",
  27517. "enum": ["Infinity"]
  27518. },
  27519. {
  27520. "type": "string",
  27521. "enum": ["-Infinity"]
  27522. },
  27523. {
  27524. "type": "string",
  27525. "enum": ["Infinity", "-Infinity", "NaN"]
  27526. }
  27527. ]
  27528. }
  27529. },
  27530. "required": ["created", "expires"],
  27531. "additionalProperties": false
  27532. }
  27533. },
  27534. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27535. "additionalProperties": false
  27536. },
  27537. "PermissionV2Request": {
  27538. "type": "object",
  27539. "properties": {
  27540. "id": {
  27541. "type": "string",
  27542. "pattern": "^per"
  27543. },
  27544. "sessionID": {
  27545. "type": "string",
  27546. "pattern": "^ses"
  27547. },
  27548. "action": {
  27549. "type": "string"
  27550. },
  27551. "resources": {
  27552. "type": "array",
  27553. "items": {
  27554. "type": "string"
  27555. }
  27556. },
  27557. "save": {
  27558. "type": "array",
  27559. "items": {
  27560. "type": "string"
  27561. }
  27562. },
  27563. "metadata": {
  27564. "type": "object"
  27565. },
  27566. "source": {
  27567. "$ref": "#/components/schemas/PermissionV2Source"
  27568. }
  27569. },
  27570. "required": ["id", "sessionID", "action", "resources"],
  27571. "additionalProperties": false
  27572. },
  27573. "PermissionSavedInfo": {
  27574. "type": "object",
  27575. "properties": {
  27576. "id": {
  27577. "type": "string"
  27578. },
  27579. "projectID": {
  27580. "type": "string"
  27581. },
  27582. "action": {
  27583. "type": "string"
  27584. },
  27585. "resource": {
  27586. "type": "string"
  27587. }
  27588. },
  27589. "required": ["id", "projectID", "action", "resource"],
  27590. "additionalProperties": false
  27591. },
  27592. "FileSystemEntry": {
  27593. "type": "object",
  27594. "properties": {
  27595. "path": {
  27596. "type": "string"
  27597. },
  27598. "type": {
  27599. "type": "string",
  27600. "enum": ["file", "directory"]
  27601. },
  27602. "mime": {
  27603. "type": "string"
  27604. }
  27605. },
  27606. "required": ["path", "type", "mime"],
  27607. "additionalProperties": false
  27608. },
  27609. "CommandV2Info": {
  27610. "type": "object",
  27611. "properties": {
  27612. "name": {
  27613. "type": "string"
  27614. },
  27615. "template": {
  27616. "type": "string"
  27617. },
  27618. "description": {
  27619. "type": "string"
  27620. },
  27621. "agent": {
  27622. "type": "string"
  27623. },
  27624. "model": {
  27625. "type": "object",
  27626. "properties": {
  27627. "id": {
  27628. "type": "string"
  27629. },
  27630. "providerID": {
  27631. "type": "string"
  27632. },
  27633. "variant": {
  27634. "type": "string"
  27635. }
  27636. },
  27637. "required": ["id", "providerID"],
  27638. "additionalProperties": false
  27639. },
  27640. "subtask": {
  27641. "type": "boolean"
  27642. }
  27643. },
  27644. "required": ["name", "template"],
  27645. "additionalProperties": false
  27646. },
  27647. "SkillV2Info": {
  27648. "type": "object",
  27649. "properties": {
  27650. "name": {
  27651. "type": "string"
  27652. },
  27653. "description": {
  27654. "type": "string"
  27655. },
  27656. "slash": {
  27657. "type": "boolean"
  27658. },
  27659. "location": {
  27660. "type": "string"
  27661. },
  27662. "content": {
  27663. "type": "string"
  27664. }
  27665. },
  27666. "required": ["name", "location", "content"],
  27667. "additionalProperties": false
  27668. },
  27669. "QuestionV2Request": {
  27670. "type": "object",
  27671. "properties": {
  27672. "id": {
  27673. "type": "string",
  27674. "pattern": "^que"
  27675. },
  27676. "sessionID": {
  27677. "type": "string",
  27678. "pattern": "^ses"
  27679. },
  27680. "questions": {
  27681. "type": "array",
  27682. "items": {
  27683. "$ref": "#/components/schemas/QuestionV2Info"
  27684. },
  27685. "description": "Questions to ask"
  27686. },
  27687. "tool": {
  27688. "$ref": "#/components/schemas/QuestionV2Tool"
  27689. }
  27690. },
  27691. "required": ["id", "sessionID", "questions"],
  27692. "additionalProperties": false
  27693. },
  27694. "QuestionV2Reply": {
  27695. "type": "object",
  27696. "properties": {
  27697. "answers": {
  27698. "type": "array",
  27699. "items": {
  27700. "$ref": "#/components/schemas/QuestionV2Answer"
  27701. },
  27702. "description": "User answers in order of questions (each answer is an array of selected labels)"
  27703. }
  27704. },
  27705. "required": ["answers"],
  27706. "additionalProperties": false
  27707. },
  27708. "ReferenceLocalSource": {
  27709. "type": "object",
  27710. "properties": {
  27711. "type": {
  27712. "type": "string",
  27713. "enum": ["local"]
  27714. },
  27715. "path": {
  27716. "type": "string"
  27717. },
  27718. "description": {
  27719. "type": "string"
  27720. },
  27721. "hidden": {
  27722. "type": "boolean"
  27723. }
  27724. },
  27725. "required": ["type", "path"],
  27726. "additionalProperties": false
  27727. },
  27728. "ReferenceGitSource": {
  27729. "type": "object",
  27730. "properties": {
  27731. "type": {
  27732. "type": "string",
  27733. "enum": ["git"]
  27734. },
  27735. "repository": {
  27736. "type": "string"
  27737. },
  27738. "branch": {
  27739. "type": "string"
  27740. },
  27741. "description": {
  27742. "type": "string"
  27743. },
  27744. "hidden": {
  27745. "type": "boolean"
  27746. }
  27747. },
  27748. "required": ["type", "repository"],
  27749. "additionalProperties": false
  27750. },
  27751. "ReferenceInfo": {
  27752. "type": "object",
  27753. "properties": {
  27754. "name": {
  27755. "type": "string"
  27756. },
  27757. "path": {
  27758. "type": "string"
  27759. },
  27760. "description": {
  27761. "type": "string"
  27762. },
  27763. "hidden": {
  27764. "type": "boolean"
  27765. },
  27766. "source": {
  27767. "anyOf": [
  27768. {
  27769. "$ref": "#/components/schemas/ReferenceLocalSource"
  27770. },
  27771. {
  27772. "$ref": "#/components/schemas/ReferenceGitSource"
  27773. }
  27774. ]
  27775. }
  27776. },
  27777. "required": ["name", "path", "source"],
  27778. "additionalProperties": false
  27779. },
  27780. "ProjectCopyCopy": {
  27781. "type": "object",
  27782. "properties": {
  27783. "directory": {
  27784. "type": "string"
  27785. }
  27786. },
  27787. "required": ["directory"],
  27788. "additionalProperties": false
  27789. },
  27790. "EventModels-devRefreshed": {
  27791. "type": "object",
  27792. "properties": {
  27793. "id": {
  27794. "type": "string",
  27795. "pattern": "^evt_"
  27796. },
  27797. "type": {
  27798. "type": "string",
  27799. "enum": ["models-dev.refreshed"]
  27800. },
  27801. "properties": {
  27802. "type": "object",
  27803. "properties": {}
  27804. }
  27805. },
  27806. "required": ["id", "type", "properties"],
  27807. "additionalProperties": false
  27808. },
  27809. "EventIntegrationUpdated": {
  27810. "type": "object",
  27811. "properties": {
  27812. "id": {
  27813. "type": "string",
  27814. "pattern": "^evt_"
  27815. },
  27816. "type": {
  27817. "type": "string",
  27818. "enum": ["integration.updated"]
  27819. },
  27820. "properties": {
  27821. "type": "object",
  27822. "properties": {}
  27823. }
  27824. },
  27825. "required": ["id", "type", "properties"],
  27826. "additionalProperties": false
  27827. },
  27828. "EventCatalogUpdated": {
  27829. "type": "object",
  27830. "properties": {
  27831. "id": {
  27832. "type": "string",
  27833. "pattern": "^evt_"
  27834. },
  27835. "type": {
  27836. "type": "string",
  27837. "enum": ["catalog.updated"]
  27838. },
  27839. "properties": {
  27840. "type": "object",
  27841. "properties": {}
  27842. }
  27843. },
  27844. "required": ["id", "type", "properties"],
  27845. "additionalProperties": false
  27846. },
  27847. "EventSessionCreated": {
  27848. "type": "object",
  27849. "properties": {
  27850. "id": {
  27851. "type": "string",
  27852. "pattern": "^evt_"
  27853. },
  27854. "type": {
  27855. "type": "string",
  27856. "enum": ["session.created"]
  27857. },
  27858. "properties": {
  27859. "type": "object",
  27860. "properties": {
  27861. "sessionID": {
  27862. "type": "string",
  27863. "pattern": "^ses"
  27864. },
  27865. "info": {
  27866. "$ref": "#/components/schemas/Session"
  27867. }
  27868. },
  27869. "required": ["sessionID", "info"],
  27870. "additionalProperties": false
  27871. }
  27872. },
  27873. "required": ["id", "type", "properties"],
  27874. "additionalProperties": false
  27875. },
  27876. "EventSessionUpdated": {
  27877. "type": "object",
  27878. "properties": {
  27879. "id": {
  27880. "type": "string",
  27881. "pattern": "^evt_"
  27882. },
  27883. "type": {
  27884. "type": "string",
  27885. "enum": ["session.updated"]
  27886. },
  27887. "properties": {
  27888. "type": "object",
  27889. "properties": {
  27890. "sessionID": {
  27891. "type": "string",
  27892. "pattern": "^ses"
  27893. },
  27894. "info": {
  27895. "$ref": "#/components/schemas/Session"
  27896. }
  27897. },
  27898. "required": ["sessionID", "info"],
  27899. "additionalProperties": false
  27900. }
  27901. },
  27902. "required": ["id", "type", "properties"],
  27903. "additionalProperties": false
  27904. },
  27905. "EventSessionDeleted": {
  27906. "type": "object",
  27907. "properties": {
  27908. "id": {
  27909. "type": "string",
  27910. "pattern": "^evt_"
  27911. },
  27912. "type": {
  27913. "type": "string",
  27914. "enum": ["session.deleted"]
  27915. },
  27916. "properties": {
  27917. "type": "object",
  27918. "properties": {
  27919. "sessionID": {
  27920. "type": "string",
  27921. "pattern": "^ses"
  27922. },
  27923. "info": {
  27924. "$ref": "#/components/schemas/Session"
  27925. }
  27926. },
  27927. "required": ["sessionID", "info"],
  27928. "additionalProperties": false
  27929. }
  27930. },
  27931. "required": ["id", "type", "properties"],
  27932. "additionalProperties": false
  27933. },
  27934. "EventMessageUpdated": {
  27935. "type": "object",
  27936. "properties": {
  27937. "id": {
  27938. "type": "string",
  27939. "pattern": "^evt_"
  27940. },
  27941. "type": {
  27942. "type": "string",
  27943. "enum": ["message.updated"]
  27944. },
  27945. "properties": {
  27946. "type": "object",
  27947. "properties": {
  27948. "sessionID": {
  27949. "type": "string",
  27950. "pattern": "^ses"
  27951. },
  27952. "info": {
  27953. "$ref": "#/components/schemas/Message"
  27954. }
  27955. },
  27956. "required": ["sessionID", "info"],
  27957. "additionalProperties": false
  27958. }
  27959. },
  27960. "required": ["id", "type", "properties"],
  27961. "additionalProperties": false
  27962. },
  27963. "EventMessageRemoved": {
  27964. "type": "object",
  27965. "properties": {
  27966. "id": {
  27967. "type": "string",
  27968. "pattern": "^evt_"
  27969. },
  27970. "type": {
  27971. "type": "string",
  27972. "enum": ["message.removed"]
  27973. },
  27974. "properties": {
  27975. "type": "object",
  27976. "properties": {
  27977. "sessionID": {
  27978. "type": "string",
  27979. "pattern": "^ses"
  27980. },
  27981. "messageID": {
  27982. "type": "string",
  27983. "pattern": "^msg"
  27984. }
  27985. },
  27986. "required": ["sessionID", "messageID"],
  27987. "additionalProperties": false
  27988. }
  27989. },
  27990. "required": ["id", "type", "properties"],
  27991. "additionalProperties": false
  27992. },
  27993. "EventMessagePartUpdated": {
  27994. "type": "object",
  27995. "properties": {
  27996. "id": {
  27997. "type": "string",
  27998. "pattern": "^evt_"
  27999. },
  28000. "type": {
  28001. "type": "string",
  28002. "enum": ["message.part.updated"]
  28003. },
  28004. "properties": {
  28005. "type": "object",
  28006. "properties": {
  28007. "sessionID": {
  28008. "type": "string",
  28009. "pattern": "^ses"
  28010. },
  28011. "part": {
  28012. "$ref": "#/components/schemas/Part"
  28013. },
  28014. "time": {
  28015. "type": "number"
  28016. }
  28017. },
  28018. "required": ["sessionID", "part", "time"],
  28019. "additionalProperties": false
  28020. }
  28021. },
  28022. "required": ["id", "type", "properties"],
  28023. "additionalProperties": false
  28024. },
  28025. "EventMessagePartRemoved": {
  28026. "type": "object",
  28027. "properties": {
  28028. "id": {
  28029. "type": "string",
  28030. "pattern": "^evt_"
  28031. },
  28032. "type": {
  28033. "type": "string",
  28034. "enum": ["message.part.removed"]
  28035. },
  28036. "properties": {
  28037. "type": "object",
  28038. "properties": {
  28039. "sessionID": {
  28040. "type": "string",
  28041. "pattern": "^ses"
  28042. },
  28043. "messageID": {
  28044. "type": "string",
  28045. "pattern": "^msg"
  28046. },
  28047. "partID": {
  28048. "type": "string",
  28049. "pattern": "^prt"
  28050. }
  28051. },
  28052. "required": ["sessionID", "messageID", "partID"],
  28053. "additionalProperties": false
  28054. }
  28055. },
  28056. "required": ["id", "type", "properties"],
  28057. "additionalProperties": false
  28058. },
  28059. "EventSessionNextAgentSwitched": {
  28060. "type": "object",
  28061. "properties": {
  28062. "id": {
  28063. "type": "string",
  28064. "pattern": "^evt_"
  28065. },
  28066. "type": {
  28067. "type": "string",
  28068. "enum": ["session.next.agent.switched"]
  28069. },
  28070. "properties": {
  28071. "type": "object",
  28072. "properties": {
  28073. "timestamp": {
  28074. "type": "number"
  28075. },
  28076. "sessionID": {
  28077. "type": "string",
  28078. "pattern": "^ses"
  28079. },
  28080. "messageID": {
  28081. "type": "string",
  28082. "pattern": "^msg_"
  28083. },
  28084. "agent": {
  28085. "type": "string"
  28086. }
  28087. },
  28088. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28089. "additionalProperties": false
  28090. }
  28091. },
  28092. "required": ["id", "type", "properties"],
  28093. "additionalProperties": false
  28094. },
  28095. "EventSessionNextModelSwitched": {
  28096. "type": "object",
  28097. "properties": {
  28098. "id": {
  28099. "type": "string",
  28100. "pattern": "^evt_"
  28101. },
  28102. "type": {
  28103. "type": "string",
  28104. "enum": ["session.next.model.switched"]
  28105. },
  28106. "properties": {
  28107. "type": "object",
  28108. "properties": {
  28109. "timestamp": {
  28110. "type": "number"
  28111. },
  28112. "sessionID": {
  28113. "type": "string",
  28114. "pattern": "^ses"
  28115. },
  28116. "messageID": {
  28117. "type": "string",
  28118. "pattern": "^msg_"
  28119. },
  28120. "model": {
  28121. "type": "object",
  28122. "properties": {
  28123. "id": {
  28124. "type": "string"
  28125. },
  28126. "providerID": {
  28127. "type": "string"
  28128. },
  28129. "variant": {
  28130. "type": "string"
  28131. }
  28132. },
  28133. "required": ["id", "providerID"],
  28134. "additionalProperties": false
  28135. }
  28136. },
  28137. "required": ["timestamp", "sessionID", "messageID", "model"],
  28138. "additionalProperties": false
  28139. }
  28140. },
  28141. "required": ["id", "type", "properties"],
  28142. "additionalProperties": false
  28143. },
  28144. "EventSessionNextMoved": {
  28145. "type": "object",
  28146. "properties": {
  28147. "id": {
  28148. "type": "string",
  28149. "pattern": "^evt_"
  28150. },
  28151. "type": {
  28152. "type": "string",
  28153. "enum": ["session.next.moved"]
  28154. },
  28155. "properties": {
  28156. "type": "object",
  28157. "properties": {
  28158. "timestamp": {
  28159. "type": "number"
  28160. },
  28161. "sessionID": {
  28162. "type": "string",
  28163. "pattern": "^ses"
  28164. },
  28165. "location": {
  28166. "$ref": "#/components/schemas/LocationRef"
  28167. },
  28168. "subdirectory": {
  28169. "type": "string"
  28170. }
  28171. },
  28172. "required": ["timestamp", "sessionID", "location"],
  28173. "additionalProperties": false
  28174. }
  28175. },
  28176. "required": ["id", "type", "properties"],
  28177. "additionalProperties": false
  28178. },
  28179. "EventSessionNextPrompted": {
  28180. "type": "object",
  28181. "properties": {
  28182. "id": {
  28183. "type": "string",
  28184. "pattern": "^evt_"
  28185. },
  28186. "type": {
  28187. "type": "string",
  28188. "enum": ["session.next.prompted"]
  28189. },
  28190. "properties": {
  28191. "type": "object",
  28192. "properties": {
  28193. "timestamp": {
  28194. "type": "number"
  28195. },
  28196. "sessionID": {
  28197. "type": "string",
  28198. "pattern": "^ses"
  28199. },
  28200. "messageID": {
  28201. "type": "string",
  28202. "pattern": "^msg_"
  28203. },
  28204. "prompt": {
  28205. "$ref": "#/components/schemas/Prompt"
  28206. },
  28207. "delivery": {
  28208. "type": "string",
  28209. "enum": ["steer", "queue"]
  28210. }
  28211. },
  28212. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28213. "additionalProperties": false
  28214. }
  28215. },
  28216. "required": ["id", "type", "properties"],
  28217. "additionalProperties": false
  28218. },
  28219. "EventSessionNextPromptAdmitted": {
  28220. "type": "object",
  28221. "properties": {
  28222. "id": {
  28223. "type": "string",
  28224. "pattern": "^evt_"
  28225. },
  28226. "type": {
  28227. "type": "string",
  28228. "enum": ["session.next.prompt.admitted"]
  28229. },
  28230. "properties": {
  28231. "type": "object",
  28232. "properties": {
  28233. "timestamp": {
  28234. "type": "number"
  28235. },
  28236. "sessionID": {
  28237. "type": "string",
  28238. "pattern": "^ses"
  28239. },
  28240. "messageID": {
  28241. "type": "string",
  28242. "pattern": "^msg_"
  28243. },
  28244. "prompt": {
  28245. "$ref": "#/components/schemas/Prompt"
  28246. },
  28247. "delivery": {
  28248. "type": "string",
  28249. "enum": ["steer", "queue"]
  28250. }
  28251. },
  28252. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28253. "additionalProperties": false
  28254. }
  28255. },
  28256. "required": ["id", "type", "properties"],
  28257. "additionalProperties": false
  28258. },
  28259. "EventSessionNextPromptPromoted": {
  28260. "type": "object",
  28261. "properties": {
  28262. "id": {
  28263. "type": "string",
  28264. "pattern": "^evt_"
  28265. },
  28266. "type": {
  28267. "type": "string",
  28268. "enum": ["session.next.prompt.promoted"]
  28269. },
  28270. "properties": {
  28271. "type": "object",
  28272. "properties": {
  28273. "timestamp": {
  28274. "type": "number"
  28275. },
  28276. "sessionID": {
  28277. "type": "string",
  28278. "pattern": "^ses"
  28279. },
  28280. "messageID": {
  28281. "type": "string",
  28282. "pattern": "^msg_"
  28283. },
  28284. "prompt": {
  28285. "$ref": "#/components/schemas/Prompt"
  28286. },
  28287. "timeCreated": {
  28288. "type": "number"
  28289. }
  28290. },
  28291. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  28292. "additionalProperties": false
  28293. }
  28294. },
  28295. "required": ["id", "type", "properties"],
  28296. "additionalProperties": false
  28297. },
  28298. "EventSessionNextInterruptRequested": {
  28299. "type": "object",
  28300. "properties": {
  28301. "id": {
  28302. "type": "string",
  28303. "pattern": "^evt_"
  28304. },
  28305. "type": {
  28306. "type": "string",
  28307. "enum": ["session.next.interrupt.requested"]
  28308. },
  28309. "properties": {
  28310. "type": "object",
  28311. "properties": {
  28312. "timestamp": {
  28313. "type": "number"
  28314. },
  28315. "sessionID": {
  28316. "type": "string",
  28317. "pattern": "^ses"
  28318. }
  28319. },
  28320. "required": ["timestamp", "sessionID"],
  28321. "additionalProperties": false
  28322. }
  28323. },
  28324. "required": ["id", "type", "properties"],
  28325. "additionalProperties": false
  28326. },
  28327. "EventSessionNextContextUpdated": {
  28328. "type": "object",
  28329. "properties": {
  28330. "id": {
  28331. "type": "string",
  28332. "pattern": "^evt_"
  28333. },
  28334. "type": {
  28335. "type": "string",
  28336. "enum": ["session.next.context.updated"]
  28337. },
  28338. "properties": {
  28339. "type": "object",
  28340. "properties": {
  28341. "timestamp": {
  28342. "type": "number"
  28343. },
  28344. "sessionID": {
  28345. "type": "string",
  28346. "pattern": "^ses"
  28347. },
  28348. "messageID": {
  28349. "type": "string",
  28350. "pattern": "^msg_"
  28351. },
  28352. "text": {
  28353. "type": "string"
  28354. }
  28355. },
  28356. "required": ["timestamp", "sessionID", "messageID", "text"],
  28357. "additionalProperties": false
  28358. }
  28359. },
  28360. "required": ["id", "type", "properties"],
  28361. "additionalProperties": false
  28362. },
  28363. "EventSessionNextSynthetic": {
  28364. "type": "object",
  28365. "properties": {
  28366. "id": {
  28367. "type": "string",
  28368. "pattern": "^evt_"
  28369. },
  28370. "type": {
  28371. "type": "string",
  28372. "enum": ["session.next.synthetic"]
  28373. },
  28374. "properties": {
  28375. "type": "object",
  28376. "properties": {
  28377. "timestamp": {
  28378. "type": "number"
  28379. },
  28380. "sessionID": {
  28381. "type": "string",
  28382. "pattern": "^ses"
  28383. },
  28384. "messageID": {
  28385. "type": "string",
  28386. "pattern": "^msg_"
  28387. },
  28388. "text": {
  28389. "type": "string"
  28390. }
  28391. },
  28392. "required": ["timestamp", "sessionID", "messageID", "text"],
  28393. "additionalProperties": false
  28394. }
  28395. },
  28396. "required": ["id", "type", "properties"],
  28397. "additionalProperties": false
  28398. },
  28399. "EventSessionNextShellStarted": {
  28400. "type": "object",
  28401. "properties": {
  28402. "id": {
  28403. "type": "string",
  28404. "pattern": "^evt_"
  28405. },
  28406. "type": {
  28407. "type": "string",
  28408. "enum": ["session.next.shell.started"]
  28409. },
  28410. "properties": {
  28411. "type": "object",
  28412. "properties": {
  28413. "timestamp": {
  28414. "type": "number"
  28415. },
  28416. "sessionID": {
  28417. "type": "string",
  28418. "pattern": "^ses"
  28419. },
  28420. "messageID": {
  28421. "type": "string",
  28422. "pattern": "^msg_"
  28423. },
  28424. "callID": {
  28425. "type": "string"
  28426. },
  28427. "command": {
  28428. "type": "string"
  28429. }
  28430. },
  28431. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28432. "additionalProperties": false
  28433. }
  28434. },
  28435. "required": ["id", "type", "properties"],
  28436. "additionalProperties": false
  28437. },
  28438. "EventSessionNextShellEnded": {
  28439. "type": "object",
  28440. "properties": {
  28441. "id": {
  28442. "type": "string",
  28443. "pattern": "^evt_"
  28444. },
  28445. "type": {
  28446. "type": "string",
  28447. "enum": ["session.next.shell.ended"]
  28448. },
  28449. "properties": {
  28450. "type": "object",
  28451. "properties": {
  28452. "timestamp": {
  28453. "type": "number"
  28454. },
  28455. "sessionID": {
  28456. "type": "string",
  28457. "pattern": "^ses"
  28458. },
  28459. "callID": {
  28460. "type": "string"
  28461. },
  28462. "output": {
  28463. "type": "string"
  28464. }
  28465. },
  28466. "required": ["timestamp", "sessionID", "callID", "output"],
  28467. "additionalProperties": false
  28468. }
  28469. },
  28470. "required": ["id", "type", "properties"],
  28471. "additionalProperties": false
  28472. },
  28473. "EventSessionNextStepStarted": {
  28474. "type": "object",
  28475. "properties": {
  28476. "id": {
  28477. "type": "string",
  28478. "pattern": "^evt_"
  28479. },
  28480. "type": {
  28481. "type": "string",
  28482. "enum": ["session.next.step.started"]
  28483. },
  28484. "properties": {
  28485. "type": "object",
  28486. "properties": {
  28487. "timestamp": {
  28488. "type": "number"
  28489. },
  28490. "sessionID": {
  28491. "type": "string",
  28492. "pattern": "^ses"
  28493. },
  28494. "assistantMessageID": {
  28495. "type": "string",
  28496. "pattern": "^msg_"
  28497. },
  28498. "agent": {
  28499. "type": "string"
  28500. },
  28501. "model": {
  28502. "type": "object",
  28503. "properties": {
  28504. "id": {
  28505. "type": "string"
  28506. },
  28507. "providerID": {
  28508. "type": "string"
  28509. },
  28510. "variant": {
  28511. "type": "string"
  28512. }
  28513. },
  28514. "required": ["id", "providerID"],
  28515. "additionalProperties": false
  28516. },
  28517. "snapshot": {
  28518. "type": "string"
  28519. }
  28520. },
  28521. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28522. "additionalProperties": false
  28523. }
  28524. },
  28525. "required": ["id", "type", "properties"],
  28526. "additionalProperties": false
  28527. },
  28528. "EventSessionNextStepEnded": {
  28529. "type": "object",
  28530. "properties": {
  28531. "id": {
  28532. "type": "string",
  28533. "pattern": "^evt_"
  28534. },
  28535. "type": {
  28536. "type": "string",
  28537. "enum": ["session.next.step.ended"]
  28538. },
  28539. "properties": {
  28540. "type": "object",
  28541. "properties": {
  28542. "timestamp": {
  28543. "type": "number"
  28544. },
  28545. "sessionID": {
  28546. "type": "string",
  28547. "pattern": "^ses"
  28548. },
  28549. "assistantMessageID": {
  28550. "type": "string",
  28551. "pattern": "^msg_"
  28552. },
  28553. "finish": {
  28554. "type": "string"
  28555. },
  28556. "cost": {
  28557. "type": "number"
  28558. },
  28559. "tokens": {
  28560. "type": "object",
  28561. "properties": {
  28562. "input": {
  28563. "type": "number"
  28564. },
  28565. "output": {
  28566. "type": "number"
  28567. },
  28568. "reasoning": {
  28569. "type": "number"
  28570. },
  28571. "cache": {
  28572. "type": "object",
  28573. "properties": {
  28574. "read": {
  28575. "type": "number"
  28576. },
  28577. "write": {
  28578. "type": "number"
  28579. }
  28580. },
  28581. "required": ["read", "write"],
  28582. "additionalProperties": false
  28583. }
  28584. },
  28585. "required": ["input", "output", "reasoning", "cache"],
  28586. "additionalProperties": false
  28587. },
  28588. "snapshot": {
  28589. "type": "string"
  28590. }
  28591. },
  28592. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28593. "additionalProperties": false
  28594. }
  28595. },
  28596. "required": ["id", "type", "properties"],
  28597. "additionalProperties": false
  28598. },
  28599. "EventSessionNextStepFailed": {
  28600. "type": "object",
  28601. "properties": {
  28602. "id": {
  28603. "type": "string",
  28604. "pattern": "^evt_"
  28605. },
  28606. "type": {
  28607. "type": "string",
  28608. "enum": ["session.next.step.failed"]
  28609. },
  28610. "properties": {
  28611. "type": "object",
  28612. "properties": {
  28613. "timestamp": {
  28614. "type": "number"
  28615. },
  28616. "sessionID": {
  28617. "type": "string",
  28618. "pattern": "^ses"
  28619. },
  28620. "assistantMessageID": {
  28621. "type": "string",
  28622. "pattern": "^msg_"
  28623. },
  28624. "error": {
  28625. "$ref": "#/components/schemas/SessionErrorUnknown"
  28626. }
  28627. },
  28628. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28629. "additionalProperties": false
  28630. }
  28631. },
  28632. "required": ["id", "type", "properties"],
  28633. "additionalProperties": false
  28634. },
  28635. "EventSessionNextTextStarted": {
  28636. "type": "object",
  28637. "properties": {
  28638. "id": {
  28639. "type": "string",
  28640. "pattern": "^evt_"
  28641. },
  28642. "type": {
  28643. "type": "string",
  28644. "enum": ["session.next.text.started"]
  28645. },
  28646. "properties": {
  28647. "type": "object",
  28648. "properties": {
  28649. "timestamp": {
  28650. "type": "number"
  28651. },
  28652. "sessionID": {
  28653. "type": "string",
  28654. "pattern": "^ses"
  28655. },
  28656. "assistantMessageID": {
  28657. "type": "string",
  28658. "pattern": "^msg_"
  28659. },
  28660. "textID": {
  28661. "type": "string"
  28662. }
  28663. },
  28664. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28665. "additionalProperties": false
  28666. }
  28667. },
  28668. "required": ["id", "type", "properties"],
  28669. "additionalProperties": false
  28670. },
  28671. "EventSessionNextTextDelta": {
  28672. "type": "object",
  28673. "properties": {
  28674. "id": {
  28675. "type": "string",
  28676. "pattern": "^evt_"
  28677. },
  28678. "type": {
  28679. "type": "string",
  28680. "enum": ["session.next.text.delta"]
  28681. },
  28682. "properties": {
  28683. "type": "object",
  28684. "properties": {
  28685. "timestamp": {
  28686. "type": "number"
  28687. },
  28688. "sessionID": {
  28689. "type": "string",
  28690. "pattern": "^ses"
  28691. },
  28692. "assistantMessageID": {
  28693. "type": "string",
  28694. "pattern": "^msg_"
  28695. },
  28696. "textID": {
  28697. "type": "string"
  28698. },
  28699. "delta": {
  28700. "type": "string"
  28701. }
  28702. },
  28703. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28704. "additionalProperties": false
  28705. }
  28706. },
  28707. "required": ["id", "type", "properties"],
  28708. "additionalProperties": false
  28709. },
  28710. "EventSessionNextTextEnded": {
  28711. "type": "object",
  28712. "properties": {
  28713. "id": {
  28714. "type": "string",
  28715. "pattern": "^evt_"
  28716. },
  28717. "type": {
  28718. "type": "string",
  28719. "enum": ["session.next.text.ended"]
  28720. },
  28721. "properties": {
  28722. "type": "object",
  28723. "properties": {
  28724. "timestamp": {
  28725. "type": "number"
  28726. },
  28727. "sessionID": {
  28728. "type": "string",
  28729. "pattern": "^ses"
  28730. },
  28731. "assistantMessageID": {
  28732. "type": "string",
  28733. "pattern": "^msg_"
  28734. },
  28735. "textID": {
  28736. "type": "string"
  28737. },
  28738. "text": {
  28739. "type": "string"
  28740. }
  28741. },
  28742. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28743. "additionalProperties": false
  28744. }
  28745. },
  28746. "required": ["id", "type", "properties"],
  28747. "additionalProperties": false
  28748. },
  28749. "EventSessionNextReasoningStarted": {
  28750. "type": "object",
  28751. "properties": {
  28752. "id": {
  28753. "type": "string",
  28754. "pattern": "^evt_"
  28755. },
  28756. "type": {
  28757. "type": "string",
  28758. "enum": ["session.next.reasoning.started"]
  28759. },
  28760. "properties": {
  28761. "type": "object",
  28762. "properties": {
  28763. "timestamp": {
  28764. "type": "number"
  28765. },
  28766. "sessionID": {
  28767. "type": "string",
  28768. "pattern": "^ses"
  28769. },
  28770. "assistantMessageID": {
  28771. "type": "string",
  28772. "pattern": "^msg_"
  28773. },
  28774. "reasoningID": {
  28775. "type": "string"
  28776. },
  28777. "providerMetadata": {
  28778. "type": "object",
  28779. "additionalProperties": {
  28780. "type": "object"
  28781. }
  28782. }
  28783. },
  28784. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28785. "additionalProperties": false
  28786. }
  28787. },
  28788. "required": ["id", "type", "properties"],
  28789. "additionalProperties": false
  28790. },
  28791. "EventSessionNextReasoningDelta": {
  28792. "type": "object",
  28793. "properties": {
  28794. "id": {
  28795. "type": "string",
  28796. "pattern": "^evt_"
  28797. },
  28798. "type": {
  28799. "type": "string",
  28800. "enum": ["session.next.reasoning.delta"]
  28801. },
  28802. "properties": {
  28803. "type": "object",
  28804. "properties": {
  28805. "timestamp": {
  28806. "type": "number"
  28807. },
  28808. "sessionID": {
  28809. "type": "string",
  28810. "pattern": "^ses"
  28811. },
  28812. "assistantMessageID": {
  28813. "type": "string",
  28814. "pattern": "^msg_"
  28815. },
  28816. "reasoningID": {
  28817. "type": "string"
  28818. },
  28819. "delta": {
  28820. "type": "string"
  28821. }
  28822. },
  28823. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28824. "additionalProperties": false
  28825. }
  28826. },
  28827. "required": ["id", "type", "properties"],
  28828. "additionalProperties": false
  28829. },
  28830. "EventSessionNextReasoningEnded": {
  28831. "type": "object",
  28832. "properties": {
  28833. "id": {
  28834. "type": "string",
  28835. "pattern": "^evt_"
  28836. },
  28837. "type": {
  28838. "type": "string",
  28839. "enum": ["session.next.reasoning.ended"]
  28840. },
  28841. "properties": {
  28842. "type": "object",
  28843. "properties": {
  28844. "timestamp": {
  28845. "type": "number"
  28846. },
  28847. "sessionID": {
  28848. "type": "string",
  28849. "pattern": "^ses"
  28850. },
  28851. "assistantMessageID": {
  28852. "type": "string",
  28853. "pattern": "^msg_"
  28854. },
  28855. "reasoningID": {
  28856. "type": "string"
  28857. },
  28858. "text": {
  28859. "type": "string"
  28860. },
  28861. "providerMetadata": {
  28862. "type": "object",
  28863. "additionalProperties": {
  28864. "type": "object"
  28865. }
  28866. }
  28867. },
  28868. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28869. "additionalProperties": false
  28870. }
  28871. },
  28872. "required": ["id", "type", "properties"],
  28873. "additionalProperties": false
  28874. },
  28875. "EventSessionNextToolInputStarted": {
  28876. "type": "object",
  28877. "properties": {
  28878. "id": {
  28879. "type": "string",
  28880. "pattern": "^evt_"
  28881. },
  28882. "type": {
  28883. "type": "string",
  28884. "enum": ["session.next.tool.input.started"]
  28885. },
  28886. "properties": {
  28887. "type": "object",
  28888. "properties": {
  28889. "timestamp": {
  28890. "type": "number"
  28891. },
  28892. "sessionID": {
  28893. "type": "string",
  28894. "pattern": "^ses"
  28895. },
  28896. "assistantMessageID": {
  28897. "type": "string",
  28898. "pattern": "^msg_"
  28899. },
  28900. "callID": {
  28901. "type": "string"
  28902. },
  28903. "name": {
  28904. "type": "string"
  28905. }
  28906. },
  28907. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28908. "additionalProperties": false
  28909. }
  28910. },
  28911. "required": ["id", "type", "properties"],
  28912. "additionalProperties": false
  28913. },
  28914. "EventSessionNextToolInputDelta": {
  28915. "type": "object",
  28916. "properties": {
  28917. "id": {
  28918. "type": "string",
  28919. "pattern": "^evt_"
  28920. },
  28921. "type": {
  28922. "type": "string",
  28923. "enum": ["session.next.tool.input.delta"]
  28924. },
  28925. "properties": {
  28926. "type": "object",
  28927. "properties": {
  28928. "timestamp": {
  28929. "type": "number"
  28930. },
  28931. "sessionID": {
  28932. "type": "string",
  28933. "pattern": "^ses"
  28934. },
  28935. "assistantMessageID": {
  28936. "type": "string",
  28937. "pattern": "^msg_"
  28938. },
  28939. "callID": {
  28940. "type": "string"
  28941. },
  28942. "delta": {
  28943. "type": "string"
  28944. }
  28945. },
  28946. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28947. "additionalProperties": false
  28948. }
  28949. },
  28950. "required": ["id", "type", "properties"],
  28951. "additionalProperties": false
  28952. },
  28953. "EventSessionNextToolInputEnded": {
  28954. "type": "object",
  28955. "properties": {
  28956. "id": {
  28957. "type": "string",
  28958. "pattern": "^evt_"
  28959. },
  28960. "type": {
  28961. "type": "string",
  28962. "enum": ["session.next.tool.input.ended"]
  28963. },
  28964. "properties": {
  28965. "type": "object",
  28966. "properties": {
  28967. "timestamp": {
  28968. "type": "number"
  28969. },
  28970. "sessionID": {
  28971. "type": "string",
  28972. "pattern": "^ses"
  28973. },
  28974. "assistantMessageID": {
  28975. "type": "string",
  28976. "pattern": "^msg_"
  28977. },
  28978. "callID": {
  28979. "type": "string"
  28980. },
  28981. "text": {
  28982. "type": "string"
  28983. }
  28984. },
  28985. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28986. "additionalProperties": false
  28987. }
  28988. },
  28989. "required": ["id", "type", "properties"],
  28990. "additionalProperties": false
  28991. },
  28992. "EventSessionNextToolCalled": {
  28993. "type": "object",
  28994. "properties": {
  28995. "id": {
  28996. "type": "string",
  28997. "pattern": "^evt_"
  28998. },
  28999. "type": {
  29000. "type": "string",
  29001. "enum": ["session.next.tool.called"]
  29002. },
  29003. "properties": {
  29004. "type": "object",
  29005. "properties": {
  29006. "timestamp": {
  29007. "type": "number"
  29008. },
  29009. "sessionID": {
  29010. "type": "string",
  29011. "pattern": "^ses"
  29012. },
  29013. "assistantMessageID": {
  29014. "type": "string",
  29015. "pattern": "^msg_"
  29016. },
  29017. "callID": {
  29018. "type": "string"
  29019. },
  29020. "tool": {
  29021. "type": "string"
  29022. },
  29023. "input": {
  29024. "type": "object"
  29025. },
  29026. "provider": {
  29027. "type": "object",
  29028. "properties": {
  29029. "executed": {
  29030. "type": "boolean"
  29031. },
  29032. "metadata": {
  29033. "type": "object",
  29034. "additionalProperties": {
  29035. "type": "object"
  29036. }
  29037. }
  29038. },
  29039. "required": ["executed"],
  29040. "additionalProperties": false
  29041. }
  29042. },
  29043. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29044. "additionalProperties": false
  29045. }
  29046. },
  29047. "required": ["id", "type", "properties"],
  29048. "additionalProperties": false
  29049. },
  29050. "EventSessionNextToolProgress": {
  29051. "type": "object",
  29052. "properties": {
  29053. "id": {
  29054. "type": "string",
  29055. "pattern": "^evt_"
  29056. },
  29057. "type": {
  29058. "type": "string",
  29059. "enum": ["session.next.tool.progress"]
  29060. },
  29061. "properties": {
  29062. "type": "object",
  29063. "properties": {
  29064. "timestamp": {
  29065. "type": "number"
  29066. },
  29067. "sessionID": {
  29068. "type": "string",
  29069. "pattern": "^ses"
  29070. },
  29071. "assistantMessageID": {
  29072. "type": "string",
  29073. "pattern": "^msg_"
  29074. },
  29075. "callID": {
  29076. "type": "string"
  29077. },
  29078. "structured": {
  29079. "type": "object"
  29080. },
  29081. "content": {
  29082. "type": "array",
  29083. "items": {
  29084. "anyOf": [
  29085. {
  29086. "$ref": "#/components/schemas/ToolTextContent"
  29087. },
  29088. {
  29089. "$ref": "#/components/schemas/ToolFileContent"
  29090. }
  29091. ]
  29092. }
  29093. }
  29094. },
  29095. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29096. "additionalProperties": false
  29097. }
  29098. },
  29099. "required": ["id", "type", "properties"],
  29100. "additionalProperties": false
  29101. },
  29102. "EventSessionNextToolSuccess": {
  29103. "type": "object",
  29104. "properties": {
  29105. "id": {
  29106. "type": "string",
  29107. "pattern": "^evt_"
  29108. },
  29109. "type": {
  29110. "type": "string",
  29111. "enum": ["session.next.tool.success"]
  29112. },
  29113. "properties": {
  29114. "type": "object",
  29115. "properties": {
  29116. "timestamp": {
  29117. "type": "number"
  29118. },
  29119. "sessionID": {
  29120. "type": "string",
  29121. "pattern": "^ses"
  29122. },
  29123. "assistantMessageID": {
  29124. "type": "string",
  29125. "pattern": "^msg_"
  29126. },
  29127. "callID": {
  29128. "type": "string"
  29129. },
  29130. "structured": {
  29131. "type": "object"
  29132. },
  29133. "content": {
  29134. "type": "array",
  29135. "items": {
  29136. "anyOf": [
  29137. {
  29138. "$ref": "#/components/schemas/ToolTextContent"
  29139. },
  29140. {
  29141. "$ref": "#/components/schemas/ToolFileContent"
  29142. }
  29143. ]
  29144. }
  29145. },
  29146. "outputPaths": {
  29147. "type": "array",
  29148. "items": {
  29149. "type": "string"
  29150. }
  29151. },
  29152. "result": {},
  29153. "provider": {
  29154. "type": "object",
  29155. "properties": {
  29156. "executed": {
  29157. "type": "boolean"
  29158. },
  29159. "metadata": {
  29160. "type": "object",
  29161. "additionalProperties": {
  29162. "type": "object"
  29163. }
  29164. }
  29165. },
  29166. "required": ["executed"],
  29167. "additionalProperties": false
  29168. }
  29169. },
  29170. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29171. "additionalProperties": false
  29172. }
  29173. },
  29174. "required": ["id", "type", "properties"],
  29175. "additionalProperties": false
  29176. },
  29177. "EventSessionNextToolFailed": {
  29178. "type": "object",
  29179. "properties": {
  29180. "id": {
  29181. "type": "string",
  29182. "pattern": "^evt_"
  29183. },
  29184. "type": {
  29185. "type": "string",
  29186. "enum": ["session.next.tool.failed"]
  29187. },
  29188. "properties": {
  29189. "type": "object",
  29190. "properties": {
  29191. "timestamp": {
  29192. "type": "number"
  29193. },
  29194. "sessionID": {
  29195. "type": "string",
  29196. "pattern": "^ses"
  29197. },
  29198. "assistantMessageID": {
  29199. "type": "string",
  29200. "pattern": "^msg_"
  29201. },
  29202. "callID": {
  29203. "type": "string"
  29204. },
  29205. "error": {
  29206. "$ref": "#/components/schemas/SessionErrorUnknown"
  29207. },
  29208. "result": {},
  29209. "provider": {
  29210. "type": "object",
  29211. "properties": {
  29212. "executed": {
  29213. "type": "boolean"
  29214. },
  29215. "metadata": {
  29216. "type": "object",
  29217. "additionalProperties": {
  29218. "type": "object"
  29219. }
  29220. }
  29221. },
  29222. "required": ["executed"],
  29223. "additionalProperties": false
  29224. }
  29225. },
  29226. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29227. "additionalProperties": false
  29228. }
  29229. },
  29230. "required": ["id", "type", "properties"],
  29231. "additionalProperties": false
  29232. },
  29233. "EventSessionNextRetried": {
  29234. "type": "object",
  29235. "properties": {
  29236. "id": {
  29237. "type": "string",
  29238. "pattern": "^evt_"
  29239. },
  29240. "type": {
  29241. "type": "string",
  29242. "enum": ["session.next.retried"]
  29243. },
  29244. "properties": {
  29245. "type": "object",
  29246. "properties": {
  29247. "timestamp": {
  29248. "type": "number"
  29249. },
  29250. "sessionID": {
  29251. "type": "string",
  29252. "pattern": "^ses"
  29253. },
  29254. "attempt": {
  29255. "type": "number"
  29256. },
  29257. "error": {
  29258. "$ref": "#/components/schemas/SessionNextRetry_error"
  29259. }
  29260. },
  29261. "required": ["timestamp", "sessionID", "attempt", "error"],
  29262. "additionalProperties": false
  29263. }
  29264. },
  29265. "required": ["id", "type", "properties"],
  29266. "additionalProperties": false
  29267. },
  29268. "EventSessionNextCompactionStarted": {
  29269. "type": "object",
  29270. "properties": {
  29271. "id": {
  29272. "type": "string",
  29273. "pattern": "^evt_"
  29274. },
  29275. "type": {
  29276. "type": "string",
  29277. "enum": ["session.next.compaction.started"]
  29278. },
  29279. "properties": {
  29280. "type": "object",
  29281. "properties": {
  29282. "timestamp": {
  29283. "type": "number"
  29284. },
  29285. "sessionID": {
  29286. "type": "string",
  29287. "pattern": "^ses"
  29288. },
  29289. "messageID": {
  29290. "type": "string",
  29291. "pattern": "^msg_"
  29292. },
  29293. "reason": {
  29294. "type": "string",
  29295. "enum": ["auto", "manual"]
  29296. }
  29297. },
  29298. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29299. "additionalProperties": false
  29300. }
  29301. },
  29302. "required": ["id", "type", "properties"],
  29303. "additionalProperties": false
  29304. },
  29305. "EventSessionNextCompactionDelta": {
  29306. "type": "object",
  29307. "properties": {
  29308. "id": {
  29309. "type": "string",
  29310. "pattern": "^evt_"
  29311. },
  29312. "type": {
  29313. "type": "string",
  29314. "enum": ["session.next.compaction.delta"]
  29315. },
  29316. "properties": {
  29317. "type": "object",
  29318. "properties": {
  29319. "timestamp": {
  29320. "type": "number"
  29321. },
  29322. "sessionID": {
  29323. "type": "string",
  29324. "pattern": "^ses"
  29325. },
  29326. "messageID": {
  29327. "type": "string",
  29328. "pattern": "^msg_"
  29329. },
  29330. "text": {
  29331. "type": "string"
  29332. }
  29333. },
  29334. "required": ["timestamp", "sessionID", "messageID", "text"],
  29335. "additionalProperties": false
  29336. }
  29337. },
  29338. "required": ["id", "type", "properties"],
  29339. "additionalProperties": false
  29340. },
  29341. "EventSessionNextCompactionEnded": {
  29342. "type": "object",
  29343. "properties": {
  29344. "id": {
  29345. "type": "string",
  29346. "pattern": "^evt_"
  29347. },
  29348. "type": {
  29349. "type": "string",
  29350. "enum": ["session.next.compaction.ended"]
  29351. },
  29352. "properties": {
  29353. "type": "object",
  29354. "properties": {
  29355. "timestamp": {
  29356. "type": "number"
  29357. },
  29358. "sessionID": {
  29359. "type": "string",
  29360. "pattern": "^ses"
  29361. },
  29362. "messageID": {
  29363. "type": "string",
  29364. "pattern": "^msg_"
  29365. },
  29366. "reason": {
  29367. "type": "string",
  29368. "enum": ["auto", "manual"]
  29369. },
  29370. "text": {
  29371. "type": "string"
  29372. },
  29373. "recent": {
  29374. "type": "string"
  29375. }
  29376. },
  29377. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29378. "additionalProperties": false
  29379. }
  29380. },
  29381. "required": ["id", "type", "properties"],
  29382. "additionalProperties": false
  29383. },
  29384. "EventMessagePartDelta": {
  29385. "type": "object",
  29386. "properties": {
  29387. "id": {
  29388. "type": "string",
  29389. "pattern": "^evt_"
  29390. },
  29391. "type": {
  29392. "type": "string",
  29393. "enum": ["message.part.delta"]
  29394. },
  29395. "properties": {
  29396. "type": "object",
  29397. "properties": {
  29398. "sessionID": {
  29399. "type": "string",
  29400. "pattern": "^ses"
  29401. },
  29402. "messageID": {
  29403. "type": "string",
  29404. "pattern": "^msg"
  29405. },
  29406. "partID": {
  29407. "type": "string",
  29408. "pattern": "^prt"
  29409. },
  29410. "field": {
  29411. "type": "string"
  29412. },
  29413. "delta": {
  29414. "type": "string"
  29415. }
  29416. },
  29417. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29418. "additionalProperties": false
  29419. }
  29420. },
  29421. "required": ["id", "type", "properties"],
  29422. "additionalProperties": false
  29423. },
  29424. "EventSessionDiff": {
  29425. "type": "object",
  29426. "properties": {
  29427. "id": {
  29428. "type": "string",
  29429. "pattern": "^evt_"
  29430. },
  29431. "type": {
  29432. "type": "string",
  29433. "enum": ["session.diff"]
  29434. },
  29435. "properties": {
  29436. "type": "object",
  29437. "properties": {
  29438. "sessionID": {
  29439. "type": "string",
  29440. "pattern": "^ses"
  29441. },
  29442. "diff": {
  29443. "type": "array",
  29444. "items": {
  29445. "$ref": "#/components/schemas/SnapshotFileDiff"
  29446. }
  29447. }
  29448. },
  29449. "required": ["sessionID", "diff"],
  29450. "additionalProperties": false
  29451. }
  29452. },
  29453. "required": ["id", "type", "properties"],
  29454. "additionalProperties": false
  29455. },
  29456. "EventSessionError": {
  29457. "type": "object",
  29458. "properties": {
  29459. "id": {
  29460. "type": "string",
  29461. "pattern": "^evt_"
  29462. },
  29463. "type": {
  29464. "type": "string",
  29465. "enum": ["session.error"]
  29466. },
  29467. "properties": {
  29468. "type": "object",
  29469. "properties": {
  29470. "sessionID": {
  29471. "type": "string",
  29472. "pattern": "^ses"
  29473. },
  29474. "error": {
  29475. "anyOf": [
  29476. {
  29477. "$ref": "#/components/schemas/ProviderAuthError"
  29478. },
  29479. {
  29480. "$ref": "#/components/schemas/UnknownError"
  29481. },
  29482. {
  29483. "$ref": "#/components/schemas/MessageOutputLengthError"
  29484. },
  29485. {
  29486. "$ref": "#/components/schemas/MessageAbortedError"
  29487. },
  29488. {
  29489. "$ref": "#/components/schemas/StructuredOutputError"
  29490. },
  29491. {
  29492. "$ref": "#/components/schemas/ContextOverflowError"
  29493. },
  29494. {
  29495. "$ref": "#/components/schemas/ContentFilterError"
  29496. },
  29497. {
  29498. "$ref": "#/components/schemas/APIError"
  29499. }
  29500. ]
  29501. }
  29502. },
  29503. "additionalProperties": false
  29504. }
  29505. },
  29506. "required": ["id", "type", "properties"],
  29507. "additionalProperties": false
  29508. },
  29509. "EventInstallationUpdated": {
  29510. "type": "object",
  29511. "properties": {
  29512. "id": {
  29513. "type": "string",
  29514. "pattern": "^evt_"
  29515. },
  29516. "type": {
  29517. "type": "string",
  29518. "enum": ["installation.updated"]
  29519. },
  29520. "properties": {
  29521. "type": "object",
  29522. "properties": {
  29523. "version": {
  29524. "type": "string"
  29525. }
  29526. },
  29527. "required": ["version"],
  29528. "additionalProperties": false
  29529. }
  29530. },
  29531. "required": ["id", "type", "properties"],
  29532. "additionalProperties": false
  29533. },
  29534. "EventInstallationUpdate-available": {
  29535. "type": "object",
  29536. "properties": {
  29537. "id": {
  29538. "type": "string",
  29539. "pattern": "^evt_"
  29540. },
  29541. "type": {
  29542. "type": "string",
  29543. "enum": ["installation.update-available"]
  29544. },
  29545. "properties": {
  29546. "type": "object",
  29547. "properties": {
  29548. "version": {
  29549. "type": "string"
  29550. }
  29551. },
  29552. "required": ["version"],
  29553. "additionalProperties": false
  29554. }
  29555. },
  29556. "required": ["id", "type", "properties"],
  29557. "additionalProperties": false
  29558. },
  29559. "EventFileEdited": {
  29560. "type": "object",
  29561. "properties": {
  29562. "id": {
  29563. "type": "string",
  29564. "pattern": "^evt_"
  29565. },
  29566. "type": {
  29567. "type": "string",
  29568. "enum": ["file.edited"]
  29569. },
  29570. "properties": {
  29571. "type": "object",
  29572. "properties": {
  29573. "file": {
  29574. "type": "string"
  29575. }
  29576. },
  29577. "required": ["file"],
  29578. "additionalProperties": false
  29579. }
  29580. },
  29581. "required": ["id", "type", "properties"],
  29582. "additionalProperties": false
  29583. },
  29584. "EventPluginAdded": {
  29585. "type": "object",
  29586. "properties": {
  29587. "id": {
  29588. "type": "string",
  29589. "pattern": "^evt_"
  29590. },
  29591. "type": {
  29592. "type": "string",
  29593. "enum": ["plugin.added"]
  29594. },
  29595. "properties": {
  29596. "type": "object",
  29597. "properties": {
  29598. "id": {
  29599. "type": "string"
  29600. }
  29601. },
  29602. "required": ["id"],
  29603. "additionalProperties": false
  29604. }
  29605. },
  29606. "required": ["id", "type", "properties"],
  29607. "additionalProperties": false
  29608. },
  29609. "EventPermissionV2Asked": {
  29610. "type": "object",
  29611. "properties": {
  29612. "id": {
  29613. "type": "string",
  29614. "pattern": "^evt_"
  29615. },
  29616. "type": {
  29617. "type": "string",
  29618. "enum": ["permission.v2.asked"]
  29619. },
  29620. "properties": {
  29621. "type": "object",
  29622. "properties": {
  29623. "id": {
  29624. "type": "string",
  29625. "pattern": "^per"
  29626. },
  29627. "sessionID": {
  29628. "type": "string",
  29629. "pattern": "^ses"
  29630. },
  29631. "action": {
  29632. "type": "string"
  29633. },
  29634. "resources": {
  29635. "type": "array",
  29636. "items": {
  29637. "type": "string"
  29638. }
  29639. },
  29640. "save": {
  29641. "type": "array",
  29642. "items": {
  29643. "type": "string"
  29644. }
  29645. },
  29646. "metadata": {
  29647. "type": "object"
  29648. },
  29649. "source": {
  29650. "$ref": "#/components/schemas/PermissionV2Source"
  29651. }
  29652. },
  29653. "required": ["id", "sessionID", "action", "resources"],
  29654. "additionalProperties": false
  29655. }
  29656. },
  29657. "required": ["id", "type", "properties"],
  29658. "additionalProperties": false
  29659. },
  29660. "EventPermissionV2Replied": {
  29661. "type": "object",
  29662. "properties": {
  29663. "id": {
  29664. "type": "string",
  29665. "pattern": "^evt_"
  29666. },
  29667. "type": {
  29668. "type": "string",
  29669. "enum": ["permission.v2.replied"]
  29670. },
  29671. "properties": {
  29672. "type": "object",
  29673. "properties": {
  29674. "sessionID": {
  29675. "type": "string",
  29676. "pattern": "^ses"
  29677. },
  29678. "requestID": {
  29679. "type": "string",
  29680. "pattern": "^per"
  29681. },
  29682. "reply": {
  29683. "$ref": "#/components/schemas/PermissionV2Reply"
  29684. }
  29685. },
  29686. "required": ["sessionID", "requestID", "reply"],
  29687. "additionalProperties": false
  29688. }
  29689. },
  29690. "required": ["id", "type", "properties"],
  29691. "additionalProperties": false
  29692. },
  29693. "EventReferenceUpdated": {
  29694. "type": "object",
  29695. "properties": {
  29696. "id": {
  29697. "type": "string",
  29698. "pattern": "^evt_"
  29699. },
  29700. "type": {
  29701. "type": "string",
  29702. "enum": ["reference.updated"]
  29703. },
  29704. "properties": {
  29705. "type": "object",
  29706. "properties": {}
  29707. }
  29708. },
  29709. "required": ["id", "type", "properties"],
  29710. "additionalProperties": false
  29711. },
  29712. "EventProjectDirectoriesUpdated": {
  29713. "type": "object",
  29714. "properties": {
  29715. "id": {
  29716. "type": "string",
  29717. "pattern": "^evt_"
  29718. },
  29719. "type": {
  29720. "type": "string",
  29721. "enum": ["project.directories.updated"]
  29722. },
  29723. "properties": {
  29724. "type": "object",
  29725. "properties": {
  29726. "projectID": {
  29727. "type": "string"
  29728. }
  29729. },
  29730. "required": ["projectID"],
  29731. "additionalProperties": false
  29732. }
  29733. },
  29734. "required": ["id", "type", "properties"],
  29735. "additionalProperties": false
  29736. },
  29737. "EventFileWatcherUpdated": {
  29738. "type": "object",
  29739. "properties": {
  29740. "id": {
  29741. "type": "string",
  29742. "pattern": "^evt_"
  29743. },
  29744. "type": {
  29745. "type": "string",
  29746. "enum": ["file.watcher.updated"]
  29747. },
  29748. "properties": {
  29749. "type": "object",
  29750. "properties": {
  29751. "file": {
  29752. "type": "string"
  29753. },
  29754. "event": {
  29755. "type": "string",
  29756. "enum": ["add", "change", "unlink"]
  29757. }
  29758. },
  29759. "required": ["file", "event"],
  29760. "additionalProperties": false
  29761. }
  29762. },
  29763. "required": ["id", "type", "properties"],
  29764. "additionalProperties": false
  29765. },
  29766. "EventPtyCreated": {
  29767. "type": "object",
  29768. "properties": {
  29769. "id": {
  29770. "type": "string",
  29771. "pattern": "^evt_"
  29772. },
  29773. "type": {
  29774. "type": "string",
  29775. "enum": ["pty.created"]
  29776. },
  29777. "properties": {
  29778. "type": "object",
  29779. "properties": {
  29780. "info": {
  29781. "$ref": "#/components/schemas/Pty"
  29782. }
  29783. },
  29784. "required": ["info"],
  29785. "additionalProperties": false
  29786. }
  29787. },
  29788. "required": ["id", "type", "properties"],
  29789. "additionalProperties": false
  29790. },
  29791. "EventPtyUpdated": {
  29792. "type": "object",
  29793. "properties": {
  29794. "id": {
  29795. "type": "string",
  29796. "pattern": "^evt_"
  29797. },
  29798. "type": {
  29799. "type": "string",
  29800. "enum": ["pty.updated"]
  29801. },
  29802. "properties": {
  29803. "type": "object",
  29804. "properties": {
  29805. "info": {
  29806. "$ref": "#/components/schemas/Pty"
  29807. }
  29808. },
  29809. "required": ["info"],
  29810. "additionalProperties": false
  29811. }
  29812. },
  29813. "required": ["id", "type", "properties"],
  29814. "additionalProperties": false
  29815. },
  29816. "EventPtyExited": {
  29817. "type": "object",
  29818. "properties": {
  29819. "id": {
  29820. "type": "string",
  29821. "pattern": "^evt_"
  29822. },
  29823. "type": {
  29824. "type": "string",
  29825. "enum": ["pty.exited"]
  29826. },
  29827. "properties": {
  29828. "type": "object",
  29829. "properties": {
  29830. "id": {
  29831. "type": "string",
  29832. "pattern": "^pty"
  29833. },
  29834. "exitCode": {
  29835. "type": "integer",
  29836. "minimum": 0
  29837. }
  29838. },
  29839. "required": ["id", "exitCode"],
  29840. "additionalProperties": false
  29841. }
  29842. },
  29843. "required": ["id", "type", "properties"],
  29844. "additionalProperties": false
  29845. },
  29846. "EventPtyDeleted": {
  29847. "type": "object",
  29848. "properties": {
  29849. "id": {
  29850. "type": "string",
  29851. "pattern": "^evt_"
  29852. },
  29853. "type": {
  29854. "type": "string",
  29855. "enum": ["pty.deleted"]
  29856. },
  29857. "properties": {
  29858. "type": "object",
  29859. "properties": {
  29860. "id": {
  29861. "type": "string",
  29862. "pattern": "^pty"
  29863. }
  29864. },
  29865. "required": ["id"],
  29866. "additionalProperties": false
  29867. }
  29868. },
  29869. "required": ["id", "type", "properties"],
  29870. "additionalProperties": false
  29871. },
  29872. "EventQuestionV2Asked": {
  29873. "type": "object",
  29874. "properties": {
  29875. "id": {
  29876. "type": "string",
  29877. "pattern": "^evt_"
  29878. },
  29879. "type": {
  29880. "type": "string",
  29881. "enum": ["question.v2.asked"]
  29882. },
  29883. "properties": {
  29884. "type": "object",
  29885. "properties": {
  29886. "id": {
  29887. "type": "string",
  29888. "pattern": "^que"
  29889. },
  29890. "sessionID": {
  29891. "type": "string",
  29892. "pattern": "^ses"
  29893. },
  29894. "questions": {
  29895. "type": "array",
  29896. "items": {
  29897. "$ref": "#/components/schemas/QuestionV2Info"
  29898. },
  29899. "description": "Questions to ask"
  29900. },
  29901. "tool": {
  29902. "$ref": "#/components/schemas/QuestionV2Tool"
  29903. }
  29904. },
  29905. "required": ["id", "sessionID", "questions"],
  29906. "additionalProperties": false
  29907. }
  29908. },
  29909. "required": ["id", "type", "properties"],
  29910. "additionalProperties": false
  29911. },
  29912. "EventQuestionV2Replied": {
  29913. "type": "object",
  29914. "properties": {
  29915. "id": {
  29916. "type": "string",
  29917. "pattern": "^evt_"
  29918. },
  29919. "type": {
  29920. "type": "string",
  29921. "enum": ["question.v2.replied"]
  29922. },
  29923. "properties": {
  29924. "type": "object",
  29925. "properties": {
  29926. "sessionID": {
  29927. "type": "string",
  29928. "pattern": "^ses"
  29929. },
  29930. "requestID": {
  29931. "type": "string",
  29932. "pattern": "^que"
  29933. },
  29934. "answers": {
  29935. "type": "array",
  29936. "items": {
  29937. "$ref": "#/components/schemas/QuestionV2Answer"
  29938. }
  29939. }
  29940. },
  29941. "required": ["sessionID", "requestID", "answers"],
  29942. "additionalProperties": false
  29943. }
  29944. },
  29945. "required": ["id", "type", "properties"],
  29946. "additionalProperties": false
  29947. },
  29948. "EventQuestionV2Rejected": {
  29949. "type": "object",
  29950. "properties": {
  29951. "id": {
  29952. "type": "string",
  29953. "pattern": "^evt_"
  29954. },
  29955. "type": {
  29956. "type": "string",
  29957. "enum": ["question.v2.rejected"]
  29958. },
  29959. "properties": {
  29960. "type": "object",
  29961. "properties": {
  29962. "sessionID": {
  29963. "type": "string",
  29964. "pattern": "^ses"
  29965. },
  29966. "requestID": {
  29967. "type": "string",
  29968. "pattern": "^que"
  29969. }
  29970. },
  29971. "required": ["sessionID", "requestID"],
  29972. "additionalProperties": false
  29973. }
  29974. },
  29975. "required": ["id", "type", "properties"],
  29976. "additionalProperties": false
  29977. },
  29978. "EventTodoUpdated": {
  29979. "type": "object",
  29980. "properties": {
  29981. "id": {
  29982. "type": "string",
  29983. "pattern": "^evt_"
  29984. },
  29985. "type": {
  29986. "type": "string",
  29987. "enum": ["todo.updated"]
  29988. },
  29989. "properties": {
  29990. "type": "object",
  29991. "properties": {
  29992. "sessionID": {
  29993. "type": "string",
  29994. "pattern": "^ses"
  29995. },
  29996. "todos": {
  29997. "type": "array",
  29998. "items": {
  29999. "$ref": "#/components/schemas/Todo"
  30000. }
  30001. }
  30002. },
  30003. "required": ["sessionID", "todos"],
  30004. "additionalProperties": false
  30005. }
  30006. },
  30007. "required": ["id", "type", "properties"],
  30008. "additionalProperties": false
  30009. },
  30010. "EventLspUpdated": {
  30011. "type": "object",
  30012. "properties": {
  30013. "id": {
  30014. "type": "string",
  30015. "pattern": "^evt_"
  30016. },
  30017. "type": {
  30018. "type": "string",
  30019. "enum": ["lsp.updated"]
  30020. },
  30021. "properties": {
  30022. "type": "object",
  30023. "properties": {}
  30024. }
  30025. },
  30026. "required": ["id", "type", "properties"],
  30027. "additionalProperties": false
  30028. },
  30029. "EventPermissionAsked": {
  30030. "type": "object",
  30031. "properties": {
  30032. "id": {
  30033. "type": "string",
  30034. "pattern": "^evt_"
  30035. },
  30036. "type": {
  30037. "type": "string",
  30038. "enum": ["permission.asked"]
  30039. },
  30040. "properties": {
  30041. "type": "object",
  30042. "properties": {
  30043. "id": {
  30044. "type": "string",
  30045. "pattern": "^per"
  30046. },
  30047. "sessionID": {
  30048. "type": "string",
  30049. "pattern": "^ses"
  30050. },
  30051. "permission": {
  30052. "type": "string"
  30053. },
  30054. "patterns": {
  30055. "type": "array",
  30056. "items": {
  30057. "type": "string"
  30058. }
  30059. },
  30060. "metadata": {
  30061. "type": "object"
  30062. },
  30063. "always": {
  30064. "type": "array",
  30065. "items": {
  30066. "type": "string"
  30067. }
  30068. },
  30069. "tool": {
  30070. "type": "object",
  30071. "properties": {
  30072. "messageID": {
  30073. "type": "string"
  30074. },
  30075. "callID": {
  30076. "type": "string"
  30077. }
  30078. },
  30079. "required": ["messageID", "callID"],
  30080. "additionalProperties": false
  30081. }
  30082. },
  30083. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  30084. "additionalProperties": false
  30085. }
  30086. },
  30087. "required": ["id", "type", "properties"],
  30088. "additionalProperties": false
  30089. },
  30090. "EventPermissionReplied": {
  30091. "type": "object",
  30092. "properties": {
  30093. "id": {
  30094. "type": "string",
  30095. "pattern": "^evt_"
  30096. },
  30097. "type": {
  30098. "type": "string",
  30099. "enum": ["permission.replied"]
  30100. },
  30101. "properties": {
  30102. "type": "object",
  30103. "properties": {
  30104. "sessionID": {
  30105. "type": "string",
  30106. "pattern": "^ses"
  30107. },
  30108. "requestID": {
  30109. "type": "string",
  30110. "pattern": "^per"
  30111. },
  30112. "reply": {
  30113. "type": "string",
  30114. "enum": ["once", "always", "reject"]
  30115. }
  30116. },
  30117. "required": ["sessionID", "requestID", "reply"],
  30118. "additionalProperties": false
  30119. }
  30120. },
  30121. "required": ["id", "type", "properties"],
  30122. "additionalProperties": false
  30123. },
  30124. "EventMcpToolsChanged": {
  30125. "type": "object",
  30126. "properties": {
  30127. "id": {
  30128. "type": "string",
  30129. "pattern": "^evt_"
  30130. },
  30131. "type": {
  30132. "type": "string",
  30133. "enum": ["mcp.tools.changed"]
  30134. },
  30135. "properties": {
  30136. "type": "object",
  30137. "properties": {
  30138. "server": {
  30139. "type": "string"
  30140. }
  30141. },
  30142. "required": ["server"],
  30143. "additionalProperties": false
  30144. }
  30145. },
  30146. "required": ["id", "type", "properties"],
  30147. "additionalProperties": false
  30148. },
  30149. "EventMcpBrowserOpenFailed": {
  30150. "type": "object",
  30151. "properties": {
  30152. "id": {
  30153. "type": "string",
  30154. "pattern": "^evt_"
  30155. },
  30156. "type": {
  30157. "type": "string",
  30158. "enum": ["mcp.browser.open.failed"]
  30159. },
  30160. "properties": {
  30161. "type": "object",
  30162. "properties": {
  30163. "mcpName": {
  30164. "type": "string"
  30165. },
  30166. "url": {
  30167. "type": "string"
  30168. }
  30169. },
  30170. "required": ["mcpName", "url"],
  30171. "additionalProperties": false
  30172. }
  30173. },
  30174. "required": ["id", "type", "properties"],
  30175. "additionalProperties": false
  30176. },
  30177. "EventCommandExecuted": {
  30178. "type": "object",
  30179. "properties": {
  30180. "id": {
  30181. "type": "string",
  30182. "pattern": "^evt_"
  30183. },
  30184. "type": {
  30185. "type": "string",
  30186. "enum": ["command.executed"]
  30187. },
  30188. "properties": {
  30189. "type": "object",
  30190. "properties": {
  30191. "name": {
  30192. "type": "string"
  30193. },
  30194. "sessionID": {
  30195. "type": "string",
  30196. "pattern": "^ses"
  30197. },
  30198. "arguments": {
  30199. "type": "string"
  30200. },
  30201. "messageID": {
  30202. "type": "string",
  30203. "pattern": "^msg"
  30204. }
  30205. },
  30206. "required": ["name", "sessionID", "arguments", "messageID"],
  30207. "additionalProperties": false
  30208. }
  30209. },
  30210. "required": ["id", "type", "properties"],
  30211. "additionalProperties": false
  30212. },
  30213. "EventProjectUpdated": {
  30214. "type": "object",
  30215. "properties": {
  30216. "id": {
  30217. "type": "string",
  30218. "pattern": "^evt_"
  30219. },
  30220. "type": {
  30221. "type": "string",
  30222. "enum": ["project.updated"]
  30223. },
  30224. "properties": {
  30225. "type": "object",
  30226. "properties": {
  30227. "id": {
  30228. "type": "string"
  30229. },
  30230. "worktree": {
  30231. "type": "string"
  30232. },
  30233. "vcs": {
  30234. "type": "string",
  30235. "enum": ["git"]
  30236. },
  30237. "name": {
  30238. "type": "string"
  30239. },
  30240. "icon": {
  30241. "type": "object",
  30242. "properties": {
  30243. "url": {
  30244. "type": "string"
  30245. },
  30246. "override": {
  30247. "type": "string"
  30248. },
  30249. "color": {
  30250. "type": "string"
  30251. }
  30252. },
  30253. "additionalProperties": false
  30254. },
  30255. "commands": {
  30256. "type": "object",
  30257. "properties": {
  30258. "start": {
  30259. "type": "string",
  30260. "description": "Startup script to run when creating a new workspace (worktree)"
  30261. }
  30262. },
  30263. "additionalProperties": false
  30264. },
  30265. "time": {
  30266. "type": "object",
  30267. "properties": {
  30268. "created": {
  30269. "type": "integer",
  30270. "minimum": 0
  30271. },
  30272. "updated": {
  30273. "type": "integer",
  30274. "minimum": 0
  30275. },
  30276. "initialized": {
  30277. "type": "integer",
  30278. "minimum": 0
  30279. }
  30280. },
  30281. "required": ["created", "updated"],
  30282. "additionalProperties": false
  30283. },
  30284. "sandboxes": {
  30285. "type": "array",
  30286. "items": {
  30287. "type": "string"
  30288. }
  30289. }
  30290. },
  30291. "required": ["id", "worktree", "time", "sandboxes"],
  30292. "additionalProperties": false
  30293. }
  30294. },
  30295. "required": ["id", "type", "properties"],
  30296. "additionalProperties": false
  30297. },
  30298. "EventSessionStatus": {
  30299. "type": "object",
  30300. "properties": {
  30301. "id": {
  30302. "type": "string",
  30303. "pattern": "^evt_"
  30304. },
  30305. "type": {
  30306. "type": "string",
  30307. "enum": ["session.status"]
  30308. },
  30309. "properties": {
  30310. "type": "object",
  30311. "properties": {
  30312. "sessionID": {
  30313. "type": "string",
  30314. "pattern": "^ses"
  30315. },
  30316. "status": {
  30317. "$ref": "#/components/schemas/SessionStatus"
  30318. }
  30319. },
  30320. "required": ["sessionID", "status"],
  30321. "additionalProperties": false
  30322. }
  30323. },
  30324. "required": ["id", "type", "properties"],
  30325. "additionalProperties": false
  30326. },
  30327. "EventSessionIdle": {
  30328. "type": "object",
  30329. "properties": {
  30330. "id": {
  30331. "type": "string",
  30332. "pattern": "^evt_"
  30333. },
  30334. "type": {
  30335. "type": "string",
  30336. "enum": ["session.idle"]
  30337. },
  30338. "properties": {
  30339. "type": "object",
  30340. "properties": {
  30341. "sessionID": {
  30342. "type": "string",
  30343. "pattern": "^ses"
  30344. }
  30345. },
  30346. "required": ["sessionID"],
  30347. "additionalProperties": false
  30348. }
  30349. },
  30350. "required": ["id", "type", "properties"],
  30351. "additionalProperties": false
  30352. },
  30353. "EventQuestionAsked": {
  30354. "type": "object",
  30355. "properties": {
  30356. "id": {
  30357. "type": "string",
  30358. "pattern": "^evt_"
  30359. },
  30360. "type": {
  30361. "type": "string",
  30362. "enum": ["question.asked"]
  30363. },
  30364. "properties": {
  30365. "type": "object",
  30366. "properties": {
  30367. "id": {
  30368. "type": "string",
  30369. "pattern": "^que"
  30370. },
  30371. "sessionID": {
  30372. "type": "string",
  30373. "pattern": "^ses"
  30374. },
  30375. "questions": {
  30376. "type": "array",
  30377. "items": {
  30378. "$ref": "#/components/schemas/QuestionInfo"
  30379. },
  30380. "description": "Questions to ask"
  30381. },
  30382. "tool": {
  30383. "$ref": "#/components/schemas/QuestionTool"
  30384. }
  30385. },
  30386. "required": ["id", "sessionID", "questions"],
  30387. "additionalProperties": false
  30388. }
  30389. },
  30390. "required": ["id", "type", "properties"],
  30391. "additionalProperties": false
  30392. },
  30393. "EventQuestionReplied": {
  30394. "type": "object",
  30395. "properties": {
  30396. "id": {
  30397. "type": "string",
  30398. "pattern": "^evt_"
  30399. },
  30400. "type": {
  30401. "type": "string",
  30402. "enum": ["question.replied"]
  30403. },
  30404. "properties": {
  30405. "type": "object",
  30406. "properties": {
  30407. "sessionID": {
  30408. "type": "string",
  30409. "pattern": "^ses"
  30410. },
  30411. "requestID": {
  30412. "type": "string",
  30413. "pattern": "^que"
  30414. },
  30415. "answers": {
  30416. "type": "array",
  30417. "items": {
  30418. "$ref": "#/components/schemas/QuestionAnswer"
  30419. }
  30420. }
  30421. },
  30422. "required": ["sessionID", "requestID", "answers"],
  30423. "additionalProperties": false
  30424. }
  30425. },
  30426. "required": ["id", "type", "properties"],
  30427. "additionalProperties": false
  30428. },
  30429. "EventQuestionRejected": {
  30430. "type": "object",
  30431. "properties": {
  30432. "id": {
  30433. "type": "string",
  30434. "pattern": "^evt_"
  30435. },
  30436. "type": {
  30437. "type": "string",
  30438. "enum": ["question.rejected"]
  30439. },
  30440. "properties": {
  30441. "type": "object",
  30442. "properties": {
  30443. "sessionID": {
  30444. "type": "string",
  30445. "pattern": "^ses"
  30446. },
  30447. "requestID": {
  30448. "type": "string",
  30449. "pattern": "^que"
  30450. }
  30451. },
  30452. "required": ["sessionID", "requestID"],
  30453. "additionalProperties": false
  30454. }
  30455. },
  30456. "required": ["id", "type", "properties"],
  30457. "additionalProperties": false
  30458. },
  30459. "EventSessionCompacted": {
  30460. "type": "object",
  30461. "properties": {
  30462. "id": {
  30463. "type": "string",
  30464. "pattern": "^evt_"
  30465. },
  30466. "type": {
  30467. "type": "string",
  30468. "enum": ["session.compacted"]
  30469. },
  30470. "properties": {
  30471. "type": "object",
  30472. "properties": {
  30473. "sessionID": {
  30474. "type": "string",
  30475. "pattern": "^ses"
  30476. }
  30477. },
  30478. "required": ["sessionID"],
  30479. "additionalProperties": false
  30480. }
  30481. },
  30482. "required": ["id", "type", "properties"],
  30483. "additionalProperties": false
  30484. },
  30485. "EventVcsBranchUpdated": {
  30486. "type": "object",
  30487. "properties": {
  30488. "id": {
  30489. "type": "string",
  30490. "pattern": "^evt_"
  30491. },
  30492. "type": {
  30493. "type": "string",
  30494. "enum": ["vcs.branch.updated"]
  30495. },
  30496. "properties": {
  30497. "type": "object",
  30498. "properties": {
  30499. "branch": {
  30500. "type": "string"
  30501. }
  30502. },
  30503. "additionalProperties": false
  30504. }
  30505. },
  30506. "required": ["id", "type", "properties"],
  30507. "additionalProperties": false
  30508. },
  30509. "EventWorkspaceReady": {
  30510. "type": "object",
  30511. "properties": {
  30512. "id": {
  30513. "type": "string",
  30514. "pattern": "^evt_"
  30515. },
  30516. "type": {
  30517. "type": "string",
  30518. "enum": ["workspace.ready"]
  30519. },
  30520. "properties": {
  30521. "type": "object",
  30522. "properties": {
  30523. "name": {
  30524. "type": "string"
  30525. }
  30526. },
  30527. "required": ["name"],
  30528. "additionalProperties": false
  30529. }
  30530. },
  30531. "required": ["id", "type", "properties"],
  30532. "additionalProperties": false
  30533. },
  30534. "EventWorkspaceFailed": {
  30535. "type": "object",
  30536. "properties": {
  30537. "id": {
  30538. "type": "string",
  30539. "pattern": "^evt_"
  30540. },
  30541. "type": {
  30542. "type": "string",
  30543. "enum": ["workspace.failed"]
  30544. },
  30545. "properties": {
  30546. "type": "object",
  30547. "properties": {
  30548. "message": {
  30549. "type": "string"
  30550. }
  30551. },
  30552. "required": ["message"],
  30553. "additionalProperties": false
  30554. }
  30555. },
  30556. "required": ["id", "type", "properties"],
  30557. "additionalProperties": false
  30558. },
  30559. "EventWorkspaceStatus": {
  30560. "type": "object",
  30561. "properties": {
  30562. "id": {
  30563. "type": "string",
  30564. "pattern": "^evt_"
  30565. },
  30566. "type": {
  30567. "type": "string",
  30568. "enum": ["workspace.status"]
  30569. },
  30570. "properties": {
  30571. "type": "object",
  30572. "properties": {
  30573. "workspaceID": {
  30574. "type": "string",
  30575. "pattern": "^wrk"
  30576. },
  30577. "status": {
  30578. "type": "string",
  30579. "enum": ["connected", "connecting", "disconnected", "error"]
  30580. }
  30581. },
  30582. "required": ["workspaceID", "status"],
  30583. "additionalProperties": false
  30584. }
  30585. },
  30586. "required": ["id", "type", "properties"],
  30587. "additionalProperties": false
  30588. },
  30589. "EventWorktreeReady": {
  30590. "type": "object",
  30591. "properties": {
  30592. "id": {
  30593. "type": "string",
  30594. "pattern": "^evt_"
  30595. },
  30596. "type": {
  30597. "type": "string",
  30598. "enum": ["worktree.ready"]
  30599. },
  30600. "properties": {
  30601. "type": "object",
  30602. "properties": {
  30603. "name": {
  30604. "type": "string"
  30605. },
  30606. "branch": {
  30607. "type": "string"
  30608. }
  30609. },
  30610. "required": ["name"],
  30611. "additionalProperties": false
  30612. }
  30613. },
  30614. "required": ["id", "type", "properties"],
  30615. "additionalProperties": false
  30616. },
  30617. "EventWorktreeFailed": {
  30618. "type": "object",
  30619. "properties": {
  30620. "id": {
  30621. "type": "string",
  30622. "pattern": "^evt_"
  30623. },
  30624. "type": {
  30625. "type": "string",
  30626. "enum": ["worktree.failed"]
  30627. },
  30628. "properties": {
  30629. "type": "object",
  30630. "properties": {
  30631. "message": {
  30632. "type": "string"
  30633. }
  30634. },
  30635. "required": ["message"],
  30636. "additionalProperties": false
  30637. }
  30638. },
  30639. "required": ["id", "type", "properties"],
  30640. "additionalProperties": false
  30641. },
  30642. "EventServerConnected": {
  30643. "type": "object",
  30644. "properties": {
  30645. "id": {
  30646. "type": "string",
  30647. "pattern": "^evt_"
  30648. },
  30649. "type": {
  30650. "type": "string",
  30651. "enum": ["server.connected"]
  30652. },
  30653. "properties": {
  30654. "type": "object",
  30655. "properties": {}
  30656. }
  30657. },
  30658. "required": ["id", "type", "properties"],
  30659. "additionalProperties": false
  30660. },
  30661. "EventGlobalDisposed": {
  30662. "type": "object",
  30663. "properties": {
  30664. "id": {
  30665. "type": "string",
  30666. "pattern": "^evt_"
  30667. },
  30668. "type": {
  30669. "type": "string",
  30670. "enum": ["global.disposed"]
  30671. },
  30672. "properties": {
  30673. "type": "object",
  30674. "properties": {}
  30675. }
  30676. },
  30677. "required": ["id", "type", "properties"],
  30678. "additionalProperties": false
  30679. },
  30680. "BadRequestError": {
  30681. "type": "object",
  30682. "required": ["name", "data"],
  30683. "properties": {
  30684. "name": {
  30685. "type": "string",
  30686. "enum": ["BadRequest"]
  30687. },
  30688. "data": {
  30689. "type": "object",
  30690. "required": ["message"],
  30691. "properties": {
  30692. "message": {
  30693. "type": "string"
  30694. },
  30695. "kind": {
  30696. "type": "string",
  30697. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30698. }
  30699. }
  30700. }
  30701. }
  30702. }
  30703. }
  30704. },
  30705. "security": [],
  30706. "tags": [
  30707. {
  30708. "name": "control",
  30709. "description": "Control plane routes."
  30710. },
  30711. {
  30712. "name": "controlPlane",
  30713. "description": "Control-plane orchestration routes."
  30714. },
  30715. {
  30716. "name": "global",
  30717. "description": "Global server routes."
  30718. },
  30719. {
  30720. "name": "event",
  30721. "description": "Instance event stream route."
  30722. },
  30723. {
  30724. "name": "config",
  30725. "description": "Experimental HttpApi config routes."
  30726. },
  30727. {
  30728. "name": "experimental",
  30729. "description": "Experimental HttpApi read-only routes."
  30730. },
  30731. {
  30732. "name": "file",
  30733. "description": "Experimental HttpApi file routes."
  30734. },
  30735. {
  30736. "name": "instance",
  30737. "description": "Experimental HttpApi instance read routes."
  30738. },
  30739. {
  30740. "name": "mcp",
  30741. "description": "Experimental HttpApi MCP routes."
  30742. },
  30743. {
  30744. "name": "project",
  30745. "description": "Experimental HttpApi project routes."
  30746. },
  30747. {
  30748. "name": "projectCopy",
  30749. "description": "Project copy naming routes."
  30750. },
  30751. {
  30752. "name": "pty",
  30753. "description": "Experimental HttpApi PTY routes."
  30754. },
  30755. {
  30756. "name": "question",
  30757. "description": "Question routes."
  30758. },
  30759. {
  30760. "name": "permission",
  30761. "description": "Experimental HttpApi permission routes."
  30762. },
  30763. {
  30764. "name": "provider",
  30765. "description": "Experimental HttpApi provider routes."
  30766. },
  30767. {
  30768. "name": "session",
  30769. "description": "Experimental HttpApi session routes."
  30770. },
  30771. {
  30772. "name": "sync",
  30773. "description": "Experimental HttpApi sync routes."
  30774. },
  30775. {
  30776. "name": "tui",
  30777. "description": "Experimental HttpApi TUI routes."
  30778. },
  30779. {
  30780. "name": "workspace",
  30781. "description": "Experimental HttpApi workspace routes."
  30782. },
  30783. {
  30784. "name": "opencode HttpApi",
  30785. "description": "Experimental HttpApi surface for selected instance routes."
  30786. },
  30787. {
  30788. "name": "opencode HttpApi",
  30789. "description": "Experimental HttpApi surface for selected instance routes."
  30790. },
  30791. {
  30792. "name": "opencode HttpApi",
  30793. "description": "Experimental HttpApi surface for selected instance routes."
  30794. },
  30795. {
  30796. "name": "sessions",
  30797. "description": "Experimental session routes."
  30798. },
  30799. {
  30800. "name": "messages",
  30801. "description": "Experimental message routes."
  30802. },
  30803. {
  30804. "name": "models",
  30805. "description": "Experimental model routes."
  30806. },
  30807. {
  30808. "name": "providers",
  30809. "description": "Experimental provider routes."
  30810. },
  30811. {
  30812. "name": "integrations",
  30813. "description": "Integration discovery and authentication routes."
  30814. },
  30815. {
  30816. "name": "opencode HttpApi",
  30817. "description": "Experimental HttpApi surface for selected instance routes."
  30818. },
  30819. {
  30820. "name": "permissions",
  30821. "description": "Experimental permission routes."
  30822. },
  30823. {
  30824. "name": "filesystem",
  30825. "description": "Experimental location-scoped filesystem routes."
  30826. },
  30827. {
  30828. "name": "commands",
  30829. "description": "Experimental command routes."
  30830. },
  30831. {
  30832. "name": "skills",
  30833. "description": "Experimental skill routes."
  30834. },
  30835. {
  30836. "name": "events",
  30837. "description": "Experimental event stream route."
  30838. },
  30839. {
  30840. "name": "pty",
  30841. "description": "Experimental location-scoped PTY routes."
  30842. },
  30843. {
  30844. "name": "session questions",
  30845. "description": "Experimental session question routes."
  30846. },
  30847. {
  30848. "name": "reference",
  30849. "description": "Location-scoped project references."
  30850. },
  30851. {
  30852. "name": "projectCopy",
  30853. "description": "Project copy management routes."
  30854. },
  30855. {
  30856. "name": "pty",
  30857. "description": "PTY websocket route."
  30858. }
  30859. ]
  30860. }