openapi.json 868 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.create",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  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 copy created",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectCopyCopy"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "ProjectCopyError | InvalidRequestError",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "anyOf": [
  3934. {
  3935. "$ref": "#/components/schemas/ProjectCopyError"
  3936. },
  3937. {
  3938. "$ref": "#/components/schemas/InvalidRequestError"
  3939. }
  3940. ]
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Create a local physical copy of a project using the selected strategy.",
  3947. "summary": "Create project copy",
  3948. "requestBody": {
  3949. "content": {
  3950. "application/json": {
  3951. "schema": {
  3952. "type": "object",
  3953. "properties": {
  3954. "strategy": {
  3955. "type": "string",
  3956. "enum": ["git_worktree"]
  3957. },
  3958. "directory": {
  3959. "type": "string"
  3960. },
  3961. "name": {
  3962. "type": "string"
  3963. },
  3964. "context": {
  3965. "type": "string"
  3966. }
  3967. },
  3968. "required": ["strategy", "directory"],
  3969. "additionalProperties": false
  3970. }
  3971. }
  3972. }
  3973. },
  3974. "x-codeSamples": [
  3975. {
  3976. "lang": "js",
  3977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3978. }
  3979. ]
  3980. },
  3981. "delete": {
  3982. "tags": ["projectCopy"],
  3983. "operationId": "experimental.projectCopy.remove",
  3984. "parameters": [
  3985. {
  3986. "name": "projectID",
  3987. "in": "path",
  3988. "schema": {
  3989. "type": "string"
  3990. },
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "workspace",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. }
  4001. ],
  4002. "responses": {
  4003. "204": {
  4004. "description": "Project copy removed"
  4005. },
  4006. "400": {
  4007. "description": "ProjectCopyError | InvalidRequestError",
  4008. "content": {
  4009. "application/json": {
  4010. "schema": {
  4011. "anyOf": [
  4012. {
  4013. "$ref": "#/components/schemas/ProjectCopyError"
  4014. },
  4015. {
  4016. "$ref": "#/components/schemas/InvalidRequestError"
  4017. }
  4018. ]
  4019. }
  4020. }
  4021. }
  4022. }
  4023. },
  4024. "description": "Remove a local physical copy of a project using the selected strategy.",
  4025. "summary": "Remove project copy",
  4026. "requestBody": {
  4027. "content": {
  4028. "application/json": {
  4029. "schema": {
  4030. "type": "object",
  4031. "properties": {
  4032. "directory": {
  4033. "type": "string"
  4034. },
  4035. "force": {
  4036. "type": "boolean"
  4037. }
  4038. },
  4039. "required": ["directory", "force"],
  4040. "additionalProperties": false
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "x-codeSamples": [
  4046. {
  4047. "lang": "js",
  4048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4049. }
  4050. ]
  4051. }
  4052. },
  4053. "/experimental/project/{projectID}/copy/refresh": {
  4054. "post": {
  4055. "tags": ["projectCopy"],
  4056. "operationId": "experimental.projectCopy.refresh",
  4057. "parameters": [
  4058. {
  4059. "name": "projectID",
  4060. "in": "path",
  4061. "schema": {
  4062. "type": "string"
  4063. },
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "directory",
  4068. "in": "query",
  4069. "schema": {
  4070. "type": "string"
  4071. },
  4072. "required": false
  4073. },
  4074. {
  4075. "name": "workspace",
  4076. "in": "query",
  4077. "schema": {
  4078. "type": "string"
  4079. },
  4080. "required": false
  4081. }
  4082. ],
  4083. "responses": {
  4084. "204": {
  4085. "description": "Project copies refreshed"
  4086. },
  4087. "400": {
  4088. "description": "ProjectCopyError | InvalidRequestError",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "anyOf": [
  4093. {
  4094. "$ref": "#/components/schemas/ProjectCopyError"
  4095. },
  4096. {
  4097. "$ref": "#/components/schemas/InvalidRequestError"
  4098. }
  4099. ]
  4100. }
  4101. }
  4102. }
  4103. }
  4104. },
  4105. "description": "Discover local project copies using one or all configured strategies.",
  4106. "summary": "Refresh project copies",
  4107. "x-codeSamples": [
  4108. {
  4109. "lang": "js",
  4110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4111. }
  4112. ]
  4113. }
  4114. },
  4115. "/pty/shells": {
  4116. "get": {
  4117. "tags": ["pty"],
  4118. "operationId": "pty.shells",
  4119. "parameters": [
  4120. {
  4121. "name": "directory",
  4122. "in": "query",
  4123. "schema": {
  4124. "type": "string"
  4125. },
  4126. "required": false
  4127. },
  4128. {
  4129. "name": "workspace",
  4130. "in": "query",
  4131. "schema": {
  4132. "type": "string"
  4133. },
  4134. "required": false
  4135. }
  4136. ],
  4137. "responses": {
  4138. "200": {
  4139. "description": "List of shells",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "type": "array",
  4144. "items": {
  4145. "type": "object",
  4146. "properties": {
  4147. "path": {
  4148. "type": "string"
  4149. },
  4150. "name": {
  4151. "type": "string"
  4152. },
  4153. "acceptable": {
  4154. "type": "boolean"
  4155. }
  4156. },
  4157. "required": ["path", "name", "acceptable"],
  4158. "additionalProperties": false
  4159. },
  4160. "description": "List of shells"
  4161. }
  4162. }
  4163. }
  4164. },
  4165. "400": {
  4166. "description": "Bad request",
  4167. "content": {
  4168. "application/json": {
  4169. "schema": {
  4170. "$ref": "#/components/schemas/BadRequestError"
  4171. }
  4172. }
  4173. }
  4174. }
  4175. },
  4176. "description": "Get a list of available shells on the system.",
  4177. "summary": "List available shells",
  4178. "x-codeSamples": [
  4179. {
  4180. "lang": "js",
  4181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4182. }
  4183. ]
  4184. }
  4185. },
  4186. "/pty": {
  4187. "get": {
  4188. "tags": ["pty"],
  4189. "operationId": "pty.list",
  4190. "parameters": [
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "List of sessions",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "type": "array",
  4215. "items": {
  4216. "$ref": "#/components/schemas/Pty"
  4217. },
  4218. "description": "List of sessions"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4235. "summary": "List PTY sessions",
  4236. "x-codeSamples": [
  4237. {
  4238. "lang": "js",
  4239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4240. }
  4241. ]
  4242. },
  4243. "post": {
  4244. "tags": ["pty"],
  4245. "operationId": "pty.create",
  4246. "parameters": [
  4247. {
  4248. "name": "directory",
  4249. "in": "query",
  4250. "schema": {
  4251. "type": "string"
  4252. },
  4253. "required": false
  4254. },
  4255. {
  4256. "name": "workspace",
  4257. "in": "query",
  4258. "schema": {
  4259. "type": "string"
  4260. },
  4261. "required": false
  4262. }
  4263. ],
  4264. "responses": {
  4265. "200": {
  4266. "description": "Created session",
  4267. "content": {
  4268. "application/json": {
  4269. "schema": {
  4270. "$ref": "#/components/schemas/Pty"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "BadRequest | InvalidRequestError",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "anyOf": [
  4281. {
  4282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4283. },
  4284. {
  4285. "$ref": "#/components/schemas/InvalidRequestError"
  4286. }
  4287. ]
  4288. }
  4289. }
  4290. }
  4291. }
  4292. },
  4293. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4294. "summary": "Create PTY session",
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "command": {
  4302. "type": "string"
  4303. },
  4304. "args": {
  4305. "type": "array",
  4306. "items": {
  4307. "type": "string"
  4308. }
  4309. },
  4310. "cwd": {
  4311. "type": "string"
  4312. },
  4313. "title": {
  4314. "type": "string"
  4315. },
  4316. "env": {
  4317. "type": "object",
  4318. "additionalProperties": {
  4319. "type": "string"
  4320. }
  4321. }
  4322. },
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/pty/{ptyID}": {
  4337. "get": {
  4338. "tags": ["pty"],
  4339. "operationId": "pty.get",
  4340. "parameters": [
  4341. {
  4342. "name": "ptyID",
  4343. "in": "path",
  4344. "schema": {
  4345. "type": "string",
  4346. "pattern": "^pty"
  4347. },
  4348. "required": true
  4349. },
  4350. {
  4351. "name": "directory",
  4352. "in": "query",
  4353. "schema": {
  4354. "type": "string"
  4355. },
  4356. "required": false
  4357. },
  4358. {
  4359. "name": "workspace",
  4360. "in": "query",
  4361. "schema": {
  4362. "type": "string"
  4363. },
  4364. "required": false
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "Session info",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Pty"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "PtyNotFoundError",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/PtyNotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4400. "summary": "Get PTY session",
  4401. "x-codeSamples": [
  4402. {
  4403. "lang": "js",
  4404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4405. }
  4406. ]
  4407. },
  4408. "put": {
  4409. "tags": ["pty"],
  4410. "operationId": "pty.update",
  4411. "parameters": [
  4412. {
  4413. "name": "ptyID",
  4414. "in": "path",
  4415. "schema": {
  4416. "type": "string",
  4417. "pattern": "^pty"
  4418. },
  4419. "required": true
  4420. },
  4421. {
  4422. "name": "directory",
  4423. "in": "query",
  4424. "schema": {
  4425. "type": "string"
  4426. },
  4427. "required": false
  4428. },
  4429. {
  4430. "name": "workspace",
  4431. "in": "query",
  4432. "schema": {
  4433. "type": "string"
  4434. },
  4435. "required": false
  4436. }
  4437. ],
  4438. "responses": {
  4439. "200": {
  4440. "description": "Updated session",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "$ref": "#/components/schemas/Pty"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "BadRequest | InvalidRequestError",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "anyOf": [
  4455. {
  4456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4457. },
  4458. {
  4459. "$ref": "#/components/schemas/InvalidRequestError"
  4460. }
  4461. ]
  4462. }
  4463. }
  4464. }
  4465. },
  4466. "404": {
  4467. "description": "PtyNotFoundError",
  4468. "content": {
  4469. "application/json": {
  4470. "schema": {
  4471. "$ref": "#/components/schemas/PtyNotFoundError"
  4472. }
  4473. }
  4474. }
  4475. }
  4476. },
  4477. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4478. "summary": "Update PTY session",
  4479. "requestBody": {
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "type": "object",
  4484. "properties": {
  4485. "title": {
  4486. "type": "string"
  4487. },
  4488. "size": {
  4489. "type": "object",
  4490. "properties": {
  4491. "rows": {
  4492. "type": "integer",
  4493. "exclusiveMinimum": 0
  4494. },
  4495. "cols": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["rows", "cols"],
  4501. "additionalProperties": false
  4502. }
  4503. },
  4504. "additionalProperties": false
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "x-codeSamples": [
  4510. {
  4511. "lang": "js",
  4512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4513. }
  4514. ]
  4515. },
  4516. "delete": {
  4517. "tags": ["pty"],
  4518. "operationId": "pty.remove",
  4519. "parameters": [
  4520. {
  4521. "name": "ptyID",
  4522. "in": "path",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^pty"
  4526. },
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "directory",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. },
  4537. {
  4538. "name": "workspace",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. }
  4545. ],
  4546. "responses": {
  4547. "200": {
  4548. "description": "Session removed",
  4549. "content": {
  4550. "application/json": {
  4551. "schema": {
  4552. "type": "boolean",
  4553. "description": "Session removed"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "400": {
  4559. "description": "Bad request",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/BadRequestError"
  4564. }
  4565. }
  4566. }
  4567. },
  4568. "404": {
  4569. "description": "PtyNotFoundError",
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "$ref": "#/components/schemas/PtyNotFoundError"
  4574. }
  4575. }
  4576. }
  4577. }
  4578. },
  4579. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4580. "summary": "Remove PTY session",
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/pty/{ptyID}/connect-token": {
  4590. "post": {
  4591. "tags": ["pty"],
  4592. "operationId": "pty.connectToken",
  4593. "parameters": [
  4594. {
  4595. "name": "ptyID",
  4596. "in": "path",
  4597. "schema": {
  4598. "type": "string",
  4599. "pattern": "^pty"
  4600. },
  4601. "required": true
  4602. },
  4603. {
  4604. "name": "directory",
  4605. "in": "query",
  4606. "schema": {
  4607. "type": "string"
  4608. },
  4609. "required": false
  4610. },
  4611. {
  4612. "name": "workspace",
  4613. "in": "query",
  4614. "schema": {
  4615. "type": "string"
  4616. },
  4617. "required": false
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "description": "WebSocket connect token",
  4623. "content": {
  4624. "application/json": {
  4625. "schema": {
  4626. "type": "object",
  4627. "properties": {
  4628. "ticket": {
  4629. "type": "string"
  4630. },
  4631. "expires_in": {
  4632. "type": "integer",
  4633. "exclusiveMinimum": 0
  4634. }
  4635. },
  4636. "required": ["ticket", "expires_in"],
  4637. "additionalProperties": false,
  4638. "description": "WebSocket connect token"
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "400": {
  4644. "description": "Bad request",
  4645. "content": {
  4646. "application/json": {
  4647. "schema": {
  4648. "$ref": "#/components/schemas/BadRequestError"
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "403": {
  4654. "description": "PtyForbiddenError",
  4655. "content": {
  4656. "application/json": {
  4657. "schema": {
  4658. "$ref": "#/components/schemas/PtyForbiddenError"
  4659. }
  4660. }
  4661. }
  4662. },
  4663. "404": {
  4664. "description": "PtyNotFoundError",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "$ref": "#/components/schemas/PtyNotFoundError"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4675. "summary": "Create PTY WebSocket token",
  4676. "x-codeSamples": [
  4677. {
  4678. "lang": "js",
  4679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4680. }
  4681. ]
  4682. }
  4683. },
  4684. "/question": {
  4685. "get": {
  4686. "tags": ["question"],
  4687. "operationId": "question.list",
  4688. "parameters": [
  4689. {
  4690. "name": "directory",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. },
  4697. {
  4698. "name": "workspace",
  4699. "in": "query",
  4700. "schema": {
  4701. "type": "string"
  4702. },
  4703. "required": false
  4704. }
  4705. ],
  4706. "responses": {
  4707. "200": {
  4708. "description": "List of pending questions",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionRequest"
  4715. },
  4716. "description": "List of pending questions"
  4717. }
  4718. }
  4719. }
  4720. },
  4721. "400": {
  4722. "description": "Bad request",
  4723. "content": {
  4724. "application/json": {
  4725. "schema": {
  4726. "$ref": "#/components/schemas/BadRequestError"
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "description": "Get all pending question requests across all sessions.",
  4733. "summary": "List pending questions",
  4734. "x-codeSamples": [
  4735. {
  4736. "lang": "js",
  4737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4738. }
  4739. ]
  4740. }
  4741. },
  4742. "/question/{requestID}/reply": {
  4743. "post": {
  4744. "tags": ["question"],
  4745. "operationId": "question.reply",
  4746. "parameters": [
  4747. {
  4748. "name": "requestID",
  4749. "in": "path",
  4750. "schema": {
  4751. "type": "string",
  4752. "pattern": "^que"
  4753. },
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "directory",
  4758. "in": "query",
  4759. "schema": {
  4760. "type": "string"
  4761. },
  4762. "required": false
  4763. },
  4764. {
  4765. "name": "workspace",
  4766. "in": "query",
  4767. "schema": {
  4768. "type": "string"
  4769. },
  4770. "required": false
  4771. }
  4772. ],
  4773. "responses": {
  4774. "200": {
  4775. "description": "Question answered successfully",
  4776. "content": {
  4777. "application/json": {
  4778. "schema": {
  4779. "type": "boolean",
  4780. "description": "Question answered successfully"
  4781. }
  4782. }
  4783. }
  4784. },
  4785. "400": {
  4786. "description": "BadRequest | InvalidRequestError",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/InvalidRequestError"
  4796. }
  4797. ]
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "404": {
  4803. "description": "QuestionNotFoundError",
  4804. "content": {
  4805. "application/json": {
  4806. "schema": {
  4807. "$ref": "#/components/schemas/QuestionNotFoundError"
  4808. }
  4809. }
  4810. }
  4811. }
  4812. },
  4813. "description": "Provide answers to a question request from the AI assistant.",
  4814. "summary": "Reply to question request",
  4815. "requestBody": {
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "properties": {
  4821. "answers": {
  4822. "type": "array",
  4823. "items": {
  4824. "$ref": "#/components/schemas/QuestionAnswer"
  4825. },
  4826. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4827. }
  4828. },
  4829. "required": ["answers"],
  4830. "additionalProperties": false
  4831. }
  4832. }
  4833. }
  4834. },
  4835. "x-codeSamples": [
  4836. {
  4837. "lang": "js",
  4838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4839. }
  4840. ]
  4841. }
  4842. },
  4843. "/question/{requestID}/reject": {
  4844. "post": {
  4845. "tags": ["question"],
  4846. "operationId": "question.reject",
  4847. "parameters": [
  4848. {
  4849. "name": "requestID",
  4850. "in": "path",
  4851. "schema": {
  4852. "type": "string",
  4853. "pattern": "^que"
  4854. },
  4855. "required": true
  4856. },
  4857. {
  4858. "name": "directory",
  4859. "in": "query",
  4860. "schema": {
  4861. "type": "string"
  4862. },
  4863. "required": false
  4864. },
  4865. {
  4866. "name": "workspace",
  4867. "in": "query",
  4868. "schema": {
  4869. "type": "string"
  4870. },
  4871. "required": false
  4872. }
  4873. ],
  4874. "responses": {
  4875. "200": {
  4876. "description": "Question rejected successfully",
  4877. "content": {
  4878. "application/json": {
  4879. "schema": {
  4880. "type": "boolean",
  4881. "description": "Question rejected successfully"
  4882. }
  4883. }
  4884. }
  4885. },
  4886. "400": {
  4887. "description": "BadRequest | InvalidRequestError",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "anyOf": [
  4892. {
  4893. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/InvalidRequestError"
  4897. }
  4898. ]
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "404": {
  4904. "description": "QuestionNotFoundError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "$ref": "#/components/schemas/QuestionNotFoundError"
  4909. }
  4910. }
  4911. }
  4912. }
  4913. },
  4914. "description": "Reject a question request from the AI assistant.",
  4915. "summary": "Reject question request",
  4916. "x-codeSamples": [
  4917. {
  4918. "lang": "js",
  4919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4920. }
  4921. ]
  4922. }
  4923. },
  4924. "/permission": {
  4925. "get": {
  4926. "tags": ["permission"],
  4927. "operationId": "permission.list",
  4928. "parameters": [
  4929. {
  4930. "name": "directory",
  4931. "in": "query",
  4932. "schema": {
  4933. "type": "string"
  4934. },
  4935. "required": false
  4936. },
  4937. {
  4938. "name": "workspace",
  4939. "in": "query",
  4940. "schema": {
  4941. "type": "string"
  4942. },
  4943. "required": false
  4944. }
  4945. ],
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of pending permissions",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "array",
  4953. "items": {
  4954. "$ref": "#/components/schemas/PermissionRequest"
  4955. },
  4956. "description": "List of pending permissions"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "400": {
  4962. "description": "Bad request",
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "$ref": "#/components/schemas/BadRequestError"
  4967. }
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "description": "Get all pending permission requests across all sessions.",
  4973. "summary": "List pending permissions",
  4974. "x-codeSamples": [
  4975. {
  4976. "lang": "js",
  4977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4978. }
  4979. ]
  4980. }
  4981. },
  4982. "/permission/{requestID}/reply": {
  4983. "post": {
  4984. "tags": ["permission"],
  4985. "operationId": "permission.reply",
  4986. "parameters": [
  4987. {
  4988. "name": "requestID",
  4989. "in": "path",
  4990. "schema": {
  4991. "type": "string",
  4992. "pattern": "^per"
  4993. },
  4994. "required": true
  4995. },
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "schema": {
  5000. "type": "string"
  5001. },
  5002. "required": false
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "schema": {
  5008. "type": "string"
  5009. },
  5010. "required": false
  5011. }
  5012. ],
  5013. "responses": {
  5014. "200": {
  5015. "description": "Permission processed successfully",
  5016. "content": {
  5017. "application/json": {
  5018. "schema": {
  5019. "type": "boolean",
  5020. "description": "Permission processed successfully"
  5021. }
  5022. }
  5023. }
  5024. },
  5025. "400": {
  5026. "description": "BadRequest | InvalidRequestError",
  5027. "content": {
  5028. "application/json": {
  5029. "schema": {
  5030. "anyOf": [
  5031. {
  5032. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5033. },
  5034. {
  5035. "$ref": "#/components/schemas/InvalidRequestError"
  5036. }
  5037. ]
  5038. }
  5039. }
  5040. }
  5041. },
  5042. "404": {
  5043. "description": "PermissionNotFoundError",
  5044. "content": {
  5045. "application/json": {
  5046. "schema": {
  5047. "$ref": "#/components/schemas/PermissionNotFoundError"
  5048. }
  5049. }
  5050. }
  5051. }
  5052. },
  5053. "description": "Approve or deny a permission request from the AI assistant.",
  5054. "summary": "Respond to permission request",
  5055. "requestBody": {
  5056. "content": {
  5057. "application/json": {
  5058. "schema": {
  5059. "type": "object",
  5060. "properties": {
  5061. "reply": {
  5062. "type": "string",
  5063. "enum": ["once", "always", "reject"]
  5064. },
  5065. "message": {
  5066. "type": "string"
  5067. }
  5068. },
  5069. "required": ["reply"],
  5070. "additionalProperties": false
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "x-codeSamples": [
  5076. {
  5077. "lang": "js",
  5078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5079. }
  5080. ]
  5081. }
  5082. },
  5083. "/provider": {
  5084. "get": {
  5085. "tags": ["provider"],
  5086. "operationId": "provider.list",
  5087. "parameters": [
  5088. {
  5089. "name": "directory",
  5090. "in": "query",
  5091. "schema": {
  5092. "type": "string"
  5093. },
  5094. "required": false
  5095. },
  5096. {
  5097. "name": "workspace",
  5098. "in": "query",
  5099. "schema": {
  5100. "type": "string"
  5101. },
  5102. "required": false
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "description": "List of providers",
  5108. "content": {
  5109. "application/json": {
  5110. "schema": {
  5111. "type": "object",
  5112. "properties": {
  5113. "all": {
  5114. "type": "array",
  5115. "items": {
  5116. "$ref": "#/components/schemas/Provider"
  5117. }
  5118. },
  5119. "default": {
  5120. "type": "object",
  5121. "additionalProperties": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "connected": {
  5126. "type": "array",
  5127. "items": {
  5128. "type": "string"
  5129. }
  5130. }
  5131. },
  5132. "required": ["all", "default", "connected"],
  5133. "additionalProperties": false,
  5134. "description": "List of providers"
  5135. }
  5136. }
  5137. }
  5138. },
  5139. "400": {
  5140. "description": "Bad request",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/BadRequestError"
  5145. }
  5146. }
  5147. }
  5148. }
  5149. },
  5150. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5151. "summary": "List providers",
  5152. "x-codeSamples": [
  5153. {
  5154. "lang": "js",
  5155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5156. }
  5157. ]
  5158. }
  5159. },
  5160. "/provider/auth": {
  5161. "get": {
  5162. "tags": ["provider"],
  5163. "operationId": "provider.auth",
  5164. "parameters": [
  5165. {
  5166. "name": "directory",
  5167. "in": "query",
  5168. "schema": {
  5169. "type": "string"
  5170. },
  5171. "required": false
  5172. },
  5173. {
  5174. "name": "workspace",
  5175. "in": "query",
  5176. "schema": {
  5177. "type": "string"
  5178. },
  5179. "required": false
  5180. }
  5181. ],
  5182. "responses": {
  5183. "200": {
  5184. "description": "Provider auth methods",
  5185. "content": {
  5186. "application/json": {
  5187. "schema": {
  5188. "type": "object",
  5189. "additionalProperties": {
  5190. "type": "array",
  5191. "items": {
  5192. "$ref": "#/components/schemas/ProviderAuthMethod"
  5193. }
  5194. },
  5195. "description": "Provider auth methods"
  5196. }
  5197. }
  5198. }
  5199. },
  5200. "400": {
  5201. "description": "Bad request",
  5202. "content": {
  5203. "application/json": {
  5204. "schema": {
  5205. "$ref": "#/components/schemas/BadRequestError"
  5206. }
  5207. }
  5208. }
  5209. }
  5210. },
  5211. "description": "Retrieve available authentication methods for all AI providers.",
  5212. "summary": "Get provider auth methods",
  5213. "x-codeSamples": [
  5214. {
  5215. "lang": "js",
  5216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5217. }
  5218. ]
  5219. }
  5220. },
  5221. "/provider/{providerID}/oauth/authorize": {
  5222. "post": {
  5223. "tags": ["provider"],
  5224. "operationId": "provider.oauth.authorize",
  5225. "parameters": [
  5226. {
  5227. "name": "providerID",
  5228. "in": "path",
  5229. "schema": {
  5230. "type": "string"
  5231. },
  5232. "required": true
  5233. },
  5234. {
  5235. "name": "directory",
  5236. "in": "query",
  5237. "schema": {
  5238. "type": "string"
  5239. },
  5240. "required": false
  5241. },
  5242. {
  5243. "name": "workspace",
  5244. "in": "query",
  5245. "schema": {
  5246. "type": "string"
  5247. },
  5248. "required": false
  5249. }
  5250. ],
  5251. "responses": {
  5252. "200": {
  5253. "description": "Authorization URL and method",
  5254. "content": {
  5255. "application/json": {
  5256. "schema": {
  5257. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "400": {
  5263. "description": "ProviderAuthError | InvalidRequestError",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "anyOf": [
  5268. {
  5269. "$ref": "#/components/schemas/ProviderAuthError1"
  5270. },
  5271. {
  5272. "$ref": "#/components/schemas/InvalidRequestError"
  5273. }
  5274. ]
  5275. }
  5276. }
  5277. }
  5278. }
  5279. },
  5280. "description": "Start the OAuth authorization flow for a provider.",
  5281. "summary": "Start OAuth authorization",
  5282. "requestBody": {
  5283. "content": {
  5284. "application/json": {
  5285. "schema": {
  5286. "type": "object",
  5287. "properties": {
  5288. "method": {
  5289. "type": "number",
  5290. "description": "Auth method index"
  5291. },
  5292. "inputs": {
  5293. "type": "object",
  5294. "additionalProperties": {
  5295. "type": "string"
  5296. }
  5297. }
  5298. },
  5299. "required": ["method"],
  5300. "additionalProperties": false
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "x-codeSamples": [
  5306. {
  5307. "lang": "js",
  5308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5309. }
  5310. ]
  5311. }
  5312. },
  5313. "/provider/{providerID}/oauth/callback": {
  5314. "post": {
  5315. "tags": ["provider"],
  5316. "operationId": "provider.oauth.callback",
  5317. "parameters": [
  5318. {
  5319. "name": "providerID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string"
  5323. },
  5324. "required": true
  5325. },
  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. "responses": {
  5344. "200": {
  5345. "description": "OAuth callback processed successfully",
  5346. "content": {
  5347. "application/json": {
  5348. "schema": {
  5349. "type": "boolean",
  5350. "description": "OAuth callback processed successfully"
  5351. }
  5352. }
  5353. }
  5354. },
  5355. "400": {
  5356. "description": "ProviderAuthError | InvalidRequestError",
  5357. "content": {
  5358. "application/json": {
  5359. "schema": {
  5360. "anyOf": [
  5361. {
  5362. "$ref": "#/components/schemas/ProviderAuthError1"
  5363. },
  5364. {
  5365. "$ref": "#/components/schemas/InvalidRequestError"
  5366. }
  5367. ]
  5368. }
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "description": "Handle the OAuth callback from a provider after user authorization.",
  5374. "summary": "Handle OAuth callback",
  5375. "requestBody": {
  5376. "content": {
  5377. "application/json": {
  5378. "schema": {
  5379. "type": "object",
  5380. "properties": {
  5381. "method": {
  5382. "type": "number",
  5383. "description": "Auth method index"
  5384. },
  5385. "code": {
  5386. "type": "string"
  5387. }
  5388. },
  5389. "required": ["method"],
  5390. "additionalProperties": false
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "x-codeSamples": [
  5396. {
  5397. "lang": "js",
  5398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5399. }
  5400. ]
  5401. }
  5402. },
  5403. "/session": {
  5404. "get": {
  5405. "tags": ["session"],
  5406. "operationId": "session.list",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. },
  5424. {
  5425. "name": "scope",
  5426. "in": "query",
  5427. "schema": {
  5428. "type": "string",
  5429. "enum": ["project"]
  5430. },
  5431. "required": false
  5432. },
  5433. {
  5434. "name": "path",
  5435. "in": "query",
  5436. "schema": {
  5437. "type": "string"
  5438. },
  5439. "required": false
  5440. },
  5441. {
  5442. "name": "roots",
  5443. "in": "query",
  5444. "schema": {
  5445. "anyOf": [
  5446. {
  5447. "type": "boolean"
  5448. },
  5449. {
  5450. "type": "string",
  5451. "enum": ["true", "false"]
  5452. }
  5453. ]
  5454. },
  5455. "required": false
  5456. },
  5457. {
  5458. "name": "start",
  5459. "in": "query",
  5460. "schema": {
  5461. "type": "number"
  5462. },
  5463. "required": false
  5464. },
  5465. {
  5466. "name": "search",
  5467. "in": "query",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": false
  5472. },
  5473. {
  5474. "name": "limit",
  5475. "in": "query",
  5476. "schema": {
  5477. "type": "number"
  5478. },
  5479. "required": false
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "description": "List of sessions",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "array",
  5489. "items": {
  5490. "$ref": "#/components/schemas/Session"
  5491. },
  5492. "description": "List of sessions"
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "400": {
  5498. "description": "Bad request",
  5499. "content": {
  5500. "application/json": {
  5501. "schema": {
  5502. "$ref": "#/components/schemas/BadRequestError"
  5503. }
  5504. }
  5505. }
  5506. }
  5507. },
  5508. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5509. "summary": "List sessions",
  5510. "x-codeSamples": [
  5511. {
  5512. "lang": "js",
  5513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5514. }
  5515. ]
  5516. },
  5517. "post": {
  5518. "tags": ["session"],
  5519. "operationId": "session.create",
  5520. "parameters": [
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "Successfully created session",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5568. "summary": "Create session",
  5569. "requestBody": {
  5570. "content": {
  5571. "application/json": {
  5572. "schema": {
  5573. "type": "object",
  5574. "properties": {
  5575. "parentID": {
  5576. "type": "string",
  5577. "pattern": "^ses"
  5578. },
  5579. "title": {
  5580. "type": "string"
  5581. },
  5582. "agent": {
  5583. "type": "string"
  5584. },
  5585. "model": {
  5586. "type": "object",
  5587. "properties": {
  5588. "id": {
  5589. "type": "string"
  5590. },
  5591. "providerID": {
  5592. "type": "string"
  5593. },
  5594. "variant": {
  5595. "type": "string"
  5596. }
  5597. },
  5598. "required": ["id", "providerID"],
  5599. "additionalProperties": false
  5600. },
  5601. "metadata": {
  5602. "type": "object"
  5603. },
  5604. "permission": {
  5605. "$ref": "#/components/schemas/PermissionRuleset"
  5606. },
  5607. "workspaceID": {
  5608. "type": "string",
  5609. "pattern": "^wrk"
  5610. }
  5611. },
  5612. "additionalProperties": false
  5613. }
  5614. }
  5615. }
  5616. },
  5617. "x-codeSamples": [
  5618. {
  5619. "lang": "js",
  5620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5621. }
  5622. ]
  5623. }
  5624. },
  5625. "/session/status": {
  5626. "get": {
  5627. "tags": ["session"],
  5628. "operationId": "session.status",
  5629. "parameters": [
  5630. {
  5631. "name": "directory",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. },
  5638. {
  5639. "name": "workspace",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. }
  5646. ],
  5647. "responses": {
  5648. "200": {
  5649. "description": "Get session status",
  5650. "content": {
  5651. "application/json": {
  5652. "schema": {
  5653. "type": "object",
  5654. "additionalProperties": {
  5655. "$ref": "#/components/schemas/SessionStatus"
  5656. },
  5657. "description": "Get session status"
  5658. }
  5659. }
  5660. }
  5661. },
  5662. "400": {
  5663. "description": "BadRequest | InvalidRequestError",
  5664. "content": {
  5665. "application/json": {
  5666. "schema": {
  5667. "anyOf": [
  5668. {
  5669. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5670. },
  5671. {
  5672. "$ref": "#/components/schemas/InvalidRequestError"
  5673. }
  5674. ]
  5675. }
  5676. }
  5677. }
  5678. }
  5679. },
  5680. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5681. "summary": "Get session status",
  5682. "x-codeSamples": [
  5683. {
  5684. "lang": "js",
  5685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5686. }
  5687. ]
  5688. }
  5689. },
  5690. "/session/{sessionID}": {
  5691. "get": {
  5692. "tags": ["session"],
  5693. "operationId": "session.get",
  5694. "parameters": [
  5695. {
  5696. "name": "sessionID",
  5697. "in": "path",
  5698. "schema": {
  5699. "type": "string",
  5700. "pattern": "^ses"
  5701. },
  5702. "required": true
  5703. },
  5704. {
  5705. "name": "directory",
  5706. "in": "query",
  5707. "schema": {
  5708. "type": "string"
  5709. },
  5710. "required": false
  5711. },
  5712. {
  5713. "name": "workspace",
  5714. "in": "query",
  5715. "schema": {
  5716. "type": "string"
  5717. },
  5718. "required": false
  5719. }
  5720. ],
  5721. "responses": {
  5722. "200": {
  5723. "description": "Get session",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/Session"
  5728. }
  5729. }
  5730. }
  5731. },
  5732. "400": {
  5733. "description": "BadRequest | InvalidRequestError",
  5734. "content": {
  5735. "application/json": {
  5736. "schema": {
  5737. "anyOf": [
  5738. {
  5739. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5740. },
  5741. {
  5742. "$ref": "#/components/schemas/InvalidRequestError"
  5743. }
  5744. ]
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "404": {
  5750. "description": "NotFoundError",
  5751. "content": {
  5752. "application/json": {
  5753. "schema": {
  5754. "$ref": "#/components/schemas/NotFoundError"
  5755. }
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "description": "Retrieve detailed information about a specific OpenCode session.",
  5761. "summary": "Get session",
  5762. "x-codeSamples": [
  5763. {
  5764. "lang": "js",
  5765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5766. }
  5767. ]
  5768. },
  5769. "delete": {
  5770. "tags": ["session"],
  5771. "operationId": "session.delete",
  5772. "parameters": [
  5773. {
  5774. "name": "sessionID",
  5775. "in": "path",
  5776. "schema": {
  5777. "type": "string",
  5778. "pattern": "^ses"
  5779. },
  5780. "required": true
  5781. },
  5782. {
  5783. "name": "directory",
  5784. "in": "query",
  5785. "schema": {
  5786. "type": "string"
  5787. },
  5788. "required": false
  5789. },
  5790. {
  5791. "name": "workspace",
  5792. "in": "query",
  5793. "schema": {
  5794. "type": "string"
  5795. },
  5796. "required": false
  5797. }
  5798. ],
  5799. "responses": {
  5800. "200": {
  5801. "description": "Successfully deleted session",
  5802. "content": {
  5803. "application/json": {
  5804. "schema": {
  5805. "type": "boolean",
  5806. "description": "Successfully deleted session"
  5807. }
  5808. }
  5809. }
  5810. },
  5811. "400": {
  5812. "description": "BadRequest | InvalidRequestError",
  5813. "content": {
  5814. "application/json": {
  5815. "schema": {
  5816. "anyOf": [
  5817. {
  5818. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5819. },
  5820. {
  5821. "$ref": "#/components/schemas/InvalidRequestError"
  5822. }
  5823. ]
  5824. }
  5825. }
  5826. }
  5827. },
  5828. "404": {
  5829. "description": "NotFoundError",
  5830. "content": {
  5831. "application/json": {
  5832. "schema": {
  5833. "$ref": "#/components/schemas/NotFoundError"
  5834. }
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5840. "summary": "Delete session",
  5841. "x-codeSamples": [
  5842. {
  5843. "lang": "js",
  5844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5845. }
  5846. ]
  5847. },
  5848. "patch": {
  5849. "tags": ["session"],
  5850. "operationId": "session.update",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "Successfully updated session",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "$ref": "#/components/schemas/Session"
  5885. }
  5886. }
  5887. }
  5888. },
  5889. "400": {
  5890. "description": "BadRequest | InvalidRequestError",
  5891. "content": {
  5892. "application/json": {
  5893. "schema": {
  5894. "anyOf": [
  5895. {
  5896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5897. },
  5898. {
  5899. "$ref": "#/components/schemas/InvalidRequestError"
  5900. }
  5901. ]
  5902. }
  5903. }
  5904. }
  5905. },
  5906. "404": {
  5907. "description": "NotFoundError",
  5908. "content": {
  5909. "application/json": {
  5910. "schema": {
  5911. "$ref": "#/components/schemas/NotFoundError"
  5912. }
  5913. }
  5914. }
  5915. }
  5916. },
  5917. "description": "Update properties of an existing session, such as title or other metadata.",
  5918. "summary": "Update session",
  5919. "requestBody": {
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "properties": {
  5925. "title": {
  5926. "type": "string"
  5927. },
  5928. "metadata": {
  5929. "type": "object"
  5930. },
  5931. "permission": {
  5932. "$ref": "#/components/schemas/PermissionRuleset"
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "archived": {
  5938. "type": "number"
  5939. }
  5940. },
  5941. "additionalProperties": false
  5942. }
  5943. },
  5944. "additionalProperties": false
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "x-codeSamples": [
  5950. {
  5951. "lang": "js",
  5952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5953. }
  5954. ]
  5955. }
  5956. },
  5957. "/session/{sessionID}/children": {
  5958. "get": {
  5959. "tags": ["session"],
  5960. "operationId": "session.children",
  5961. "parameters": [
  5962. {
  5963. "name": "sessionID",
  5964. "in": "path",
  5965. "schema": {
  5966. "type": "string",
  5967. "pattern": "^ses"
  5968. },
  5969. "required": true
  5970. },
  5971. {
  5972. "name": "directory",
  5973. "in": "query",
  5974. "schema": {
  5975. "type": "string"
  5976. },
  5977. "required": false
  5978. },
  5979. {
  5980. "name": "workspace",
  5981. "in": "query",
  5982. "schema": {
  5983. "type": "string"
  5984. },
  5985. "required": false
  5986. }
  5987. ],
  5988. "responses": {
  5989. "200": {
  5990. "description": "List of children",
  5991. "content": {
  5992. "application/json": {
  5993. "schema": {
  5994. "type": "array",
  5995. "items": {
  5996. "$ref": "#/components/schemas/Session"
  5997. },
  5998. "description": "List of children"
  5999. }
  6000. }
  6001. }
  6002. },
  6003. "400": {
  6004. "description": "BadRequest | InvalidRequestError",
  6005. "content": {
  6006. "application/json": {
  6007. "schema": {
  6008. "anyOf": [
  6009. {
  6010. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6011. },
  6012. {
  6013. "$ref": "#/components/schemas/InvalidRequestError"
  6014. }
  6015. ]
  6016. }
  6017. }
  6018. }
  6019. },
  6020. "404": {
  6021. "description": "NotFoundError",
  6022. "content": {
  6023. "application/json": {
  6024. "schema": {
  6025. "$ref": "#/components/schemas/NotFoundError"
  6026. }
  6027. }
  6028. }
  6029. }
  6030. },
  6031. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6032. "summary": "Get session children",
  6033. "x-codeSamples": [
  6034. {
  6035. "lang": "js",
  6036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6037. }
  6038. ]
  6039. }
  6040. },
  6041. "/session/{sessionID}/todo": {
  6042. "get": {
  6043. "tags": ["session"],
  6044. "operationId": "session.todo",
  6045. "parameters": [
  6046. {
  6047. "name": "sessionID",
  6048. "in": "path",
  6049. "schema": {
  6050. "type": "string",
  6051. "pattern": "^ses"
  6052. },
  6053. "required": true
  6054. },
  6055. {
  6056. "name": "directory",
  6057. "in": "query",
  6058. "schema": {
  6059. "type": "string"
  6060. },
  6061. "required": false
  6062. },
  6063. {
  6064. "name": "workspace",
  6065. "in": "query",
  6066. "schema": {
  6067. "type": "string"
  6068. },
  6069. "required": false
  6070. }
  6071. ],
  6072. "responses": {
  6073. "200": {
  6074. "description": "Todo list",
  6075. "content": {
  6076. "application/json": {
  6077. "schema": {
  6078. "type": "array",
  6079. "items": {
  6080. "$ref": "#/components/schemas/Todo"
  6081. },
  6082. "description": "Todo list"
  6083. }
  6084. }
  6085. }
  6086. },
  6087. "400": {
  6088. "description": "BadRequest | InvalidRequestError",
  6089. "content": {
  6090. "application/json": {
  6091. "schema": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/InvalidRequestError"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. }
  6103. },
  6104. "404": {
  6105. "description": "NotFoundError",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "$ref": "#/components/schemas/NotFoundError"
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6116. "summary": "Get session todos",
  6117. "x-codeSamples": [
  6118. {
  6119. "lang": "js",
  6120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6121. }
  6122. ]
  6123. }
  6124. },
  6125. "/session/{sessionID}/diff": {
  6126. "get": {
  6127. "tags": ["session"],
  6128. "operationId": "session.diff",
  6129. "parameters": [
  6130. {
  6131. "name": "sessionID",
  6132. "in": "path",
  6133. "schema": {
  6134. "type": "string",
  6135. "pattern": "^ses"
  6136. },
  6137. "required": true
  6138. },
  6139. {
  6140. "name": "directory",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. },
  6147. {
  6148. "name": "workspace",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "messageID",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string",
  6160. "pattern": "^msg"
  6161. },
  6162. "required": false
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "description": "Successfully retrieved diff",
  6168. "content": {
  6169. "application/json": {
  6170. "schema": {
  6171. "type": "array",
  6172. "items": {
  6173. "$ref": "#/components/schemas/SnapshotFileDiff"
  6174. },
  6175. "description": "Successfully retrieved diff"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "400": {
  6181. "description": "Bad request",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "$ref": "#/components/schemas/BadRequestError"
  6186. }
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6192. "summary": "Get message diff",
  6193. "x-codeSamples": [
  6194. {
  6195. "lang": "js",
  6196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6197. }
  6198. ]
  6199. }
  6200. },
  6201. "/session/{sessionID}/message": {
  6202. "get": {
  6203. "tags": ["session"],
  6204. "operationId": "session.messages",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "limit",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "integer",
  6236. "minimum": 0,
  6237. "maximum": 9007199254740991
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "before",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "List of messages",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "type": "array",
  6257. "items": {
  6258. "type": "object",
  6259. "properties": {
  6260. "info": {
  6261. "$ref": "#/components/schemas/Message"
  6262. },
  6263. "parts": {
  6264. "type": "array",
  6265. "items": {
  6266. "$ref": "#/components/schemas/Part"
  6267. }
  6268. }
  6269. },
  6270. "required": ["info", "parts"],
  6271. "additionalProperties": false
  6272. },
  6273. "description": "List of messages"
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "400": {
  6279. "description": "BadRequest | InvalidRequestError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "anyOf": [
  6284. {
  6285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6286. },
  6287. {
  6288. "$ref": "#/components/schemas/InvalidRequestError"
  6289. }
  6290. ]
  6291. }
  6292. }
  6293. }
  6294. },
  6295. "404": {
  6296. "description": "NotFoundError",
  6297. "content": {
  6298. "application/json": {
  6299. "schema": {
  6300. "$ref": "#/components/schemas/NotFoundError"
  6301. }
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6307. "summary": "Get session messages",
  6308. "x-codeSamples": [
  6309. {
  6310. "lang": "js",
  6311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6312. }
  6313. ]
  6314. },
  6315. "post": {
  6316. "tags": ["session"],
  6317. "operationId": "session.prompt",
  6318. "parameters": [
  6319. {
  6320. "name": "sessionID",
  6321. "in": "path",
  6322. "schema": {
  6323. "type": "string",
  6324. "pattern": "^ses"
  6325. },
  6326. "required": true
  6327. },
  6328. {
  6329. "name": "directory",
  6330. "in": "query",
  6331. "schema": {
  6332. "type": "string"
  6333. },
  6334. "required": false
  6335. },
  6336. {
  6337. "name": "workspace",
  6338. "in": "query",
  6339. "schema": {
  6340. "type": "string"
  6341. },
  6342. "required": false
  6343. }
  6344. ],
  6345. "responses": {
  6346. "200": {
  6347. "description": "Created message",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "type": "object",
  6352. "required": ["info", "parts"],
  6353. "properties": {
  6354. "info": {
  6355. "$ref": "#/components/schemas/AssistantMessage"
  6356. },
  6357. "parts": {
  6358. "type": "array",
  6359. "items": {
  6360. "$ref": "#/components/schemas/Part"
  6361. }
  6362. }
  6363. }
  6364. }
  6365. }
  6366. }
  6367. },
  6368. "400": {
  6369. "description": "BadRequest | InvalidRequestError",
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "anyOf": [
  6374. {
  6375. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6376. },
  6377. {
  6378. "$ref": "#/components/schemas/InvalidRequestError"
  6379. }
  6380. ]
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "404": {
  6386. "description": "NotFoundError",
  6387. "content": {
  6388. "application/json": {
  6389. "schema": {
  6390. "$ref": "#/components/schemas/NotFoundError"
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Create and send a new message to a session, streaming the AI response.",
  6397. "summary": "Send message",
  6398. "requestBody": {
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "type": "object",
  6403. "properties": {
  6404. "messageID": {
  6405. "type": "string",
  6406. "pattern": "^msg"
  6407. },
  6408. "model": {
  6409. "type": "object",
  6410. "properties": {
  6411. "providerID": {
  6412. "type": "string"
  6413. },
  6414. "modelID": {
  6415. "type": "string"
  6416. }
  6417. },
  6418. "required": ["providerID", "modelID"],
  6419. "additionalProperties": false
  6420. },
  6421. "agent": {
  6422. "type": "string"
  6423. },
  6424. "noReply": {
  6425. "type": "boolean"
  6426. },
  6427. "tools": {
  6428. "type": "object",
  6429. "additionalProperties": {
  6430. "type": "boolean"
  6431. }
  6432. },
  6433. "format": {
  6434. "$ref": "#/components/schemas/OutputFormat"
  6435. },
  6436. "system": {
  6437. "type": "string"
  6438. },
  6439. "variant": {
  6440. "type": "string"
  6441. },
  6442. "parts": {
  6443. "type": "array",
  6444. "items": {
  6445. "anyOf": [
  6446. {
  6447. "$ref": "#/components/schemas/TextPartInput"
  6448. },
  6449. {
  6450. "$ref": "#/components/schemas/FilePartInput"
  6451. },
  6452. {
  6453. "$ref": "#/components/schemas/AgentPartInput"
  6454. },
  6455. {
  6456. "$ref": "#/components/schemas/SubtaskPartInput"
  6457. }
  6458. ]
  6459. }
  6460. }
  6461. },
  6462. "required": ["parts"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/message/{messageID}": {
  6477. "get": {
  6478. "tags": ["session"],
  6479. "operationId": "session.message",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "messageID",
  6492. "in": "path",
  6493. "schema": {
  6494. "type": "string",
  6495. "pattern": "^msg"
  6496. },
  6497. "required": true
  6498. },
  6499. {
  6500. "name": "directory",
  6501. "in": "query",
  6502. "schema": {
  6503. "type": "string"
  6504. },
  6505. "required": false
  6506. },
  6507. {
  6508. "name": "workspace",
  6509. "in": "query",
  6510. "schema": {
  6511. "type": "string"
  6512. },
  6513. "required": false
  6514. }
  6515. ],
  6516. "responses": {
  6517. "200": {
  6518. "description": "Message",
  6519. "content": {
  6520. "application/json": {
  6521. "schema": {
  6522. "type": "object",
  6523. "properties": {
  6524. "info": {
  6525. "$ref": "#/components/schemas/Message"
  6526. },
  6527. "parts": {
  6528. "type": "array",
  6529. "items": {
  6530. "$ref": "#/components/schemas/Part"
  6531. }
  6532. }
  6533. },
  6534. "required": ["info", "parts"],
  6535. "additionalProperties": false,
  6536. "description": "Message"
  6537. }
  6538. }
  6539. }
  6540. },
  6541. "400": {
  6542. "description": "BadRequest | InvalidRequestError",
  6543. "content": {
  6544. "application/json": {
  6545. "schema": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/InvalidRequestError"
  6552. }
  6553. ]
  6554. }
  6555. }
  6556. }
  6557. },
  6558. "404": {
  6559. "description": "NotFoundError",
  6560. "content": {
  6561. "application/json": {
  6562. "schema": {
  6563. "$ref": "#/components/schemas/NotFoundError"
  6564. }
  6565. }
  6566. }
  6567. }
  6568. },
  6569. "description": "Retrieve a specific message from a session by its message ID.",
  6570. "summary": "Get message",
  6571. "x-codeSamples": [
  6572. {
  6573. "lang": "js",
  6574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6575. }
  6576. ]
  6577. },
  6578. "delete": {
  6579. "tags": ["session"],
  6580. "operationId": "session.deleteMessage",
  6581. "parameters": [
  6582. {
  6583. "name": "sessionID",
  6584. "in": "path",
  6585. "schema": {
  6586. "type": "string",
  6587. "pattern": "^ses"
  6588. },
  6589. "required": true
  6590. },
  6591. {
  6592. "name": "messageID",
  6593. "in": "path",
  6594. "schema": {
  6595. "type": "string",
  6596. "pattern": "^msg"
  6597. },
  6598. "required": true
  6599. },
  6600. {
  6601. "name": "directory",
  6602. "in": "query",
  6603. "schema": {
  6604. "type": "string"
  6605. },
  6606. "required": false
  6607. },
  6608. {
  6609. "name": "workspace",
  6610. "in": "query",
  6611. "schema": {
  6612. "type": "string"
  6613. },
  6614. "required": false
  6615. }
  6616. ],
  6617. "responses": {
  6618. "200": {
  6619. "description": "Successfully deleted message",
  6620. "content": {
  6621. "application/json": {
  6622. "schema": {
  6623. "type": "boolean",
  6624. "description": "Successfully deleted message"
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "400": {
  6630. "description": "BadRequest | InvalidRequestError",
  6631. "content": {
  6632. "application/json": {
  6633. "schema": {
  6634. "anyOf": [
  6635. {
  6636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6637. },
  6638. {
  6639. "$ref": "#/components/schemas/InvalidRequestError"
  6640. }
  6641. ]
  6642. }
  6643. }
  6644. }
  6645. },
  6646. "404": {
  6647. "description": "NotFoundError",
  6648. "content": {
  6649. "application/json": {
  6650. "schema": {
  6651. "$ref": "#/components/schemas/NotFoundError"
  6652. }
  6653. }
  6654. }
  6655. },
  6656. "409": {
  6657. "description": "SessionBusyError",
  6658. "content": {
  6659. "application/json": {
  6660. "schema": {
  6661. "$ref": "#/components/schemas/SessionBusyError"
  6662. }
  6663. }
  6664. }
  6665. }
  6666. },
  6667. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6668. "summary": "Delete message",
  6669. "x-codeSamples": [
  6670. {
  6671. "lang": "js",
  6672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6673. }
  6674. ]
  6675. }
  6676. },
  6677. "/session/{sessionID}/fork": {
  6678. "post": {
  6679. "tags": ["session"],
  6680. "operationId": "session.fork",
  6681. "parameters": [
  6682. {
  6683. "name": "sessionID",
  6684. "in": "path",
  6685. "schema": {
  6686. "type": "string",
  6687. "pattern": "^ses"
  6688. },
  6689. "required": true
  6690. },
  6691. {
  6692. "name": "directory",
  6693. "in": "query",
  6694. "schema": {
  6695. "type": "string"
  6696. },
  6697. "required": false
  6698. },
  6699. {
  6700. "name": "workspace",
  6701. "in": "query",
  6702. "schema": {
  6703. "type": "string"
  6704. },
  6705. "required": false
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "description": "200",
  6711. "content": {
  6712. "application/json": {
  6713. "schema": {
  6714. "$ref": "#/components/schemas/Session"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "400": {
  6720. "description": "BadRequest | InvalidRequestError",
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "anyOf": [
  6725. {
  6726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6727. },
  6728. {
  6729. "$ref": "#/components/schemas/InvalidRequestError"
  6730. }
  6731. ]
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "404": {
  6737. "description": "NotFoundError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "$ref": "#/components/schemas/NotFoundError"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. },
  6747. "description": "Create a new session by forking an existing session at a specific message point.",
  6748. "summary": "Fork session",
  6749. "requestBody": {
  6750. "content": {
  6751. "application/json": {
  6752. "schema": {
  6753. "type": "object",
  6754. "properties": {
  6755. "messageID": {
  6756. "type": "string",
  6757. "pattern": "^msg"
  6758. }
  6759. },
  6760. "additionalProperties": false
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "x-codeSamples": [
  6766. {
  6767. "lang": "js",
  6768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "/session/{sessionID}/abort": {
  6774. "post": {
  6775. "tags": ["session"],
  6776. "operationId": "session.abort",
  6777. "parameters": [
  6778. {
  6779. "name": "sessionID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^ses"
  6784. },
  6785. "required": true
  6786. },
  6787. {
  6788. "name": "directory",
  6789. "in": "query",
  6790. "schema": {
  6791. "type": "string"
  6792. },
  6793. "required": false
  6794. },
  6795. {
  6796. "name": "workspace",
  6797. "in": "query",
  6798. "schema": {
  6799. "type": "string"
  6800. },
  6801. "required": false
  6802. }
  6803. ],
  6804. "responses": {
  6805. "200": {
  6806. "description": "Aborted session",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "type": "boolean",
  6811. "description": "Aborted session"
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "400": {
  6817. "description": "BadRequest | InvalidRequestError",
  6818. "content": {
  6819. "application/json": {
  6820. "schema": {
  6821. "anyOf": [
  6822. {
  6823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6824. },
  6825. {
  6826. "$ref": "#/components/schemas/InvalidRequestError"
  6827. }
  6828. ]
  6829. }
  6830. }
  6831. }
  6832. }
  6833. },
  6834. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6835. "summary": "Abort session",
  6836. "x-codeSamples": [
  6837. {
  6838. "lang": "js",
  6839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6840. }
  6841. ]
  6842. }
  6843. },
  6844. "/session/{sessionID}/init": {
  6845. "post": {
  6846. "tags": ["session"],
  6847. "operationId": "session.init",
  6848. "parameters": [
  6849. {
  6850. "name": "sessionID",
  6851. "in": "path",
  6852. "schema": {
  6853. "type": "string",
  6854. "pattern": "^ses"
  6855. },
  6856. "required": true
  6857. },
  6858. {
  6859. "name": "directory",
  6860. "in": "query",
  6861. "schema": {
  6862. "type": "string"
  6863. },
  6864. "required": false
  6865. },
  6866. {
  6867. "name": "workspace",
  6868. "in": "query",
  6869. "schema": {
  6870. "type": "string"
  6871. },
  6872. "required": false
  6873. }
  6874. ],
  6875. "responses": {
  6876. "200": {
  6877. "description": "200",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "type": "boolean",
  6882. "description": "200"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "400": {
  6888. "description": "BadRequest | InvalidRequestError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "anyOf": [
  6893. {
  6894. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/InvalidRequestError"
  6898. }
  6899. ]
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "404": {
  6905. "description": "NotFoundError",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/NotFoundError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6916. "summary": "Initialize session",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "modelID": {
  6924. "type": "string"
  6925. },
  6926. "providerID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string",
  6931. "pattern": "^msg"
  6932. }
  6933. },
  6934. "required": ["modelID", "providerID", "messageID"],
  6935. "additionalProperties": false
  6936. }
  6937. }
  6938. }
  6939. },
  6940. "x-codeSamples": [
  6941. {
  6942. "lang": "js",
  6943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6944. }
  6945. ]
  6946. }
  6947. },
  6948. "/session/{sessionID}/share": {
  6949. "post": {
  6950. "tags": ["session"],
  6951. "operationId": "session.share",
  6952. "parameters": [
  6953. {
  6954. "name": "sessionID",
  6955. "in": "path",
  6956. "schema": {
  6957. "type": "string",
  6958. "pattern": "^ses"
  6959. },
  6960. "required": true
  6961. },
  6962. {
  6963. "name": "directory",
  6964. "in": "query",
  6965. "schema": {
  6966. "type": "string"
  6967. },
  6968. "required": false
  6969. },
  6970. {
  6971. "name": "workspace",
  6972. "in": "query",
  6973. "schema": {
  6974. "type": "string"
  6975. },
  6976. "required": false
  6977. }
  6978. ],
  6979. "responses": {
  6980. "200": {
  6981. "description": "Successfully shared session",
  6982. "content": {
  6983. "application/json": {
  6984. "schema": {
  6985. "$ref": "#/components/schemas/Session"
  6986. }
  6987. }
  6988. }
  6989. },
  6990. "400": {
  6991. "description": "Bad request",
  6992. "content": {
  6993. "application/json": {
  6994. "schema": {
  6995. "$ref": "#/components/schemas/BadRequestError"
  6996. }
  6997. }
  6998. }
  6999. },
  7000. "404": {
  7001. "description": "NotFoundError",
  7002. "content": {
  7003. "application/json": {
  7004. "schema": {
  7005. "$ref": "#/components/schemas/NotFoundError"
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "500": {
  7011. "description": "InternalServerError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7022. "summary": "Share session",
  7023. "x-codeSamples": [
  7024. {
  7025. "lang": "js",
  7026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7027. }
  7028. ]
  7029. },
  7030. "delete": {
  7031. "tags": ["session"],
  7032. "operationId": "session.unshare",
  7033. "parameters": [
  7034. {
  7035. "name": "sessionID",
  7036. "in": "path",
  7037. "schema": {
  7038. "type": "string",
  7039. "pattern": "^ses"
  7040. },
  7041. "required": true
  7042. },
  7043. {
  7044. "name": "directory",
  7045. "in": "query",
  7046. "schema": {
  7047. "type": "string"
  7048. },
  7049. "required": false
  7050. },
  7051. {
  7052. "name": "workspace",
  7053. "in": "query",
  7054. "schema": {
  7055. "type": "string"
  7056. },
  7057. "required": false
  7058. }
  7059. ],
  7060. "responses": {
  7061. "200": {
  7062. "description": "Successfully unshared session",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/Session"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "400": {
  7072. "description": "Bad request",
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "$ref": "#/components/schemas/BadRequestError"
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "404": {
  7082. "description": "NotFoundError",
  7083. "content": {
  7084. "application/json": {
  7085. "schema": {
  7086. "$ref": "#/components/schemas/NotFoundError"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "500": {
  7092. "description": "InternalServerError",
  7093. "content": {
  7094. "application/json": {
  7095. "schema": {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "description": "Remove the shareable link for a session, making it private again.",
  7103. "summary": "Unshare session",
  7104. "x-codeSamples": [
  7105. {
  7106. "lang": "js",
  7107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7108. }
  7109. ]
  7110. }
  7111. },
  7112. "/session/{sessionID}/summarize": {
  7113. "post": {
  7114. "tags": ["session"],
  7115. "operationId": "session.summarize",
  7116. "parameters": [
  7117. {
  7118. "name": "sessionID",
  7119. "in": "path",
  7120. "schema": {
  7121. "type": "string",
  7122. "pattern": "^ses"
  7123. },
  7124. "required": true
  7125. },
  7126. {
  7127. "name": "directory",
  7128. "in": "query",
  7129. "schema": {
  7130. "type": "string"
  7131. },
  7132. "required": false
  7133. },
  7134. {
  7135. "name": "workspace",
  7136. "in": "query",
  7137. "schema": {
  7138. "type": "string"
  7139. },
  7140. "required": false
  7141. }
  7142. ],
  7143. "responses": {
  7144. "200": {
  7145. "description": "Summarized session",
  7146. "content": {
  7147. "application/json": {
  7148. "schema": {
  7149. "type": "boolean",
  7150. "description": "Summarized session"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. }
  7182. },
  7183. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7184. "summary": "Summarize session",
  7185. "requestBody": {
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "type": "object",
  7190. "properties": {
  7191. "providerID": {
  7192. "type": "string"
  7193. },
  7194. "modelID": {
  7195. "type": "string"
  7196. },
  7197. "auto": {
  7198. "type": "boolean"
  7199. }
  7200. },
  7201. "required": ["providerID", "modelID"],
  7202. "additionalProperties": false
  7203. }
  7204. }
  7205. }
  7206. },
  7207. "x-codeSamples": [
  7208. {
  7209. "lang": "js",
  7210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7211. }
  7212. ]
  7213. }
  7214. },
  7215. "/session/{sessionID}/prompt_async": {
  7216. "post": {
  7217. "tags": ["session"],
  7218. "operationId": "session.prompt_async",
  7219. "parameters": [
  7220. {
  7221. "name": "sessionID",
  7222. "in": "path",
  7223. "schema": {
  7224. "type": "string",
  7225. "pattern": "^ses"
  7226. },
  7227. "required": true
  7228. },
  7229. {
  7230. "name": "directory",
  7231. "in": "query",
  7232. "schema": {
  7233. "type": "string"
  7234. },
  7235. "required": false
  7236. },
  7237. {
  7238. "name": "workspace",
  7239. "in": "query",
  7240. "schema": {
  7241. "type": "string"
  7242. },
  7243. "required": false
  7244. }
  7245. ],
  7246. "responses": {
  7247. "204": {
  7248. "description": "Prompt accepted"
  7249. },
  7250. "400": {
  7251. "description": "BadRequest | InvalidRequestError",
  7252. "content": {
  7253. "application/json": {
  7254. "schema": {
  7255. "anyOf": [
  7256. {
  7257. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7258. },
  7259. {
  7260. "$ref": "#/components/schemas/InvalidRequestError"
  7261. }
  7262. ]
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "404": {
  7268. "description": "NotFoundError",
  7269. "content": {
  7270. "application/json": {
  7271. "schema": {
  7272. "$ref": "#/components/schemas/NotFoundError"
  7273. }
  7274. }
  7275. }
  7276. }
  7277. },
  7278. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7279. "summary": "Send async message",
  7280. "requestBody": {
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "type": "object",
  7285. "properties": {
  7286. "messageID": {
  7287. "type": "string",
  7288. "pattern": "^msg"
  7289. },
  7290. "model": {
  7291. "type": "object",
  7292. "properties": {
  7293. "providerID": {
  7294. "type": "string"
  7295. },
  7296. "modelID": {
  7297. "type": "string"
  7298. }
  7299. },
  7300. "required": ["providerID", "modelID"],
  7301. "additionalProperties": false
  7302. },
  7303. "agent": {
  7304. "type": "string"
  7305. },
  7306. "noReply": {
  7307. "type": "boolean"
  7308. },
  7309. "tools": {
  7310. "type": "object",
  7311. "additionalProperties": {
  7312. "type": "boolean"
  7313. }
  7314. },
  7315. "format": {
  7316. "$ref": "#/components/schemas/OutputFormat"
  7317. },
  7318. "system": {
  7319. "type": "string"
  7320. },
  7321. "variant": {
  7322. "type": "string"
  7323. },
  7324. "parts": {
  7325. "type": "array",
  7326. "items": {
  7327. "anyOf": [
  7328. {
  7329. "$ref": "#/components/schemas/TextPartInput"
  7330. },
  7331. {
  7332. "$ref": "#/components/schemas/FilePartInput"
  7333. },
  7334. {
  7335. "$ref": "#/components/schemas/AgentPartInput"
  7336. },
  7337. {
  7338. "$ref": "#/components/schemas/SubtaskPartInput"
  7339. }
  7340. ]
  7341. }
  7342. }
  7343. },
  7344. "required": ["parts"],
  7345. "additionalProperties": false
  7346. }
  7347. }
  7348. }
  7349. },
  7350. "x-codeSamples": [
  7351. {
  7352. "lang": "js",
  7353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7354. }
  7355. ]
  7356. }
  7357. },
  7358. "/session/{sessionID}/command": {
  7359. "post": {
  7360. "tags": ["session"],
  7361. "operationId": "session.command",
  7362. "parameters": [
  7363. {
  7364. "name": "sessionID",
  7365. "in": "path",
  7366. "schema": {
  7367. "type": "string",
  7368. "pattern": "^ses"
  7369. },
  7370. "required": true
  7371. },
  7372. {
  7373. "name": "directory",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. },
  7380. {
  7381. "name": "workspace",
  7382. "in": "query",
  7383. "schema": {
  7384. "type": "string"
  7385. },
  7386. "required": false
  7387. }
  7388. ],
  7389. "responses": {
  7390. "200": {
  7391. "description": "Created message",
  7392. "content": {
  7393. "application/json": {
  7394. "schema": {
  7395. "type": "object",
  7396. "required": ["info", "parts"],
  7397. "properties": {
  7398. "info": {
  7399. "$ref": "#/components/schemas/AssistantMessage"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "$ref": "#/components/schemas/Part"
  7405. }
  7406. }
  7407. }
  7408. }
  7409. }
  7410. }
  7411. },
  7412. "400": {
  7413. "description": "BadRequest | InvalidRequestError",
  7414. "content": {
  7415. "application/json": {
  7416. "schema": {
  7417. "anyOf": [
  7418. {
  7419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7420. },
  7421. {
  7422. "$ref": "#/components/schemas/InvalidRequestError"
  7423. }
  7424. ]
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "404": {
  7430. "description": "NotFoundError",
  7431. "content": {
  7432. "application/json": {
  7433. "schema": {
  7434. "$ref": "#/components/schemas/NotFoundError"
  7435. }
  7436. }
  7437. }
  7438. }
  7439. },
  7440. "description": "Send a new command to a session for execution by the AI assistant.",
  7441. "summary": "Send command",
  7442. "requestBody": {
  7443. "content": {
  7444. "application/json": {
  7445. "schema": {
  7446. "type": "object",
  7447. "properties": {
  7448. "messageID": {
  7449. "type": "string",
  7450. "pattern": "^msg"
  7451. },
  7452. "agent": {
  7453. "type": "string"
  7454. },
  7455. "model": {
  7456. "type": "string"
  7457. },
  7458. "arguments": {
  7459. "type": "string"
  7460. },
  7461. "command": {
  7462. "type": "string"
  7463. },
  7464. "variant": {
  7465. "type": "string"
  7466. },
  7467. "parts": {
  7468. "type": "array",
  7469. "items": {
  7470. "type": "object",
  7471. "properties": {
  7472. "id": {
  7473. "type": "string",
  7474. "pattern": "^prt"
  7475. },
  7476. "type": {
  7477. "type": "string",
  7478. "enum": ["file"]
  7479. },
  7480. "mime": {
  7481. "type": "string"
  7482. },
  7483. "filename": {
  7484. "type": "string"
  7485. },
  7486. "url": {
  7487. "type": "string"
  7488. },
  7489. "source": {
  7490. "$ref": "#/components/schemas/FilePartSource"
  7491. }
  7492. },
  7493. "required": ["type", "mime", "url"],
  7494. "additionalProperties": false
  7495. }
  7496. }
  7497. },
  7498. "required": ["arguments", "command"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. }
  7503. },
  7504. "x-codeSamples": [
  7505. {
  7506. "lang": "js",
  7507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7508. }
  7509. ]
  7510. }
  7511. },
  7512. "/session/{sessionID}/shell": {
  7513. "post": {
  7514. "tags": ["session"],
  7515. "operationId": "session.shell",
  7516. "parameters": [
  7517. {
  7518. "name": "sessionID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^ses"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "directory",
  7528. "in": "query",
  7529. "schema": {
  7530. "type": "string"
  7531. },
  7532. "required": false
  7533. },
  7534. {
  7535. "name": "workspace",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. }
  7542. ],
  7543. "responses": {
  7544. "200": {
  7545. "description": "Created message",
  7546. "content": {
  7547. "application/json": {
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "info": {
  7552. "$ref": "#/components/schemas/Message"
  7553. },
  7554. "parts": {
  7555. "type": "array",
  7556. "items": {
  7557. "$ref": "#/components/schemas/Part"
  7558. }
  7559. }
  7560. },
  7561. "required": ["info", "parts"],
  7562. "additionalProperties": false,
  7563. "description": "Created message"
  7564. }
  7565. }
  7566. }
  7567. },
  7568. "400": {
  7569. "description": "BadRequest | InvalidRequestError",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "anyOf": [
  7574. {
  7575. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7576. },
  7577. {
  7578. "$ref": "#/components/schemas/InvalidRequestError"
  7579. }
  7580. ]
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "404": {
  7586. "description": "NotFoundError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/NotFoundError"
  7591. }
  7592. }
  7593. }
  7594. },
  7595. "409": {
  7596. "description": "SessionBusyError",
  7597. "content": {
  7598. "application/json": {
  7599. "schema": {
  7600. "$ref": "#/components/schemas/SessionBusyError"
  7601. }
  7602. }
  7603. }
  7604. }
  7605. },
  7606. "description": "Execute a shell command within the session context and return the AI's response.",
  7607. "summary": "Run shell command",
  7608. "requestBody": {
  7609. "content": {
  7610. "application/json": {
  7611. "schema": {
  7612. "type": "object",
  7613. "properties": {
  7614. "messageID": {
  7615. "type": "string",
  7616. "pattern": "^msg"
  7617. },
  7618. "agent": {
  7619. "type": "string"
  7620. },
  7621. "model": {
  7622. "type": "object",
  7623. "properties": {
  7624. "providerID": {
  7625. "type": "string"
  7626. },
  7627. "modelID": {
  7628. "type": "string"
  7629. }
  7630. },
  7631. "required": ["providerID", "modelID"],
  7632. "additionalProperties": false
  7633. },
  7634. "command": {
  7635. "type": "string"
  7636. }
  7637. },
  7638. "required": ["agent", "command"],
  7639. "additionalProperties": false
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "x-codeSamples": [
  7645. {
  7646. "lang": "js",
  7647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7648. }
  7649. ]
  7650. }
  7651. },
  7652. "/session/{sessionID}/revert": {
  7653. "post": {
  7654. "tags": ["session"],
  7655. "operationId": "session.revert",
  7656. "parameters": [
  7657. {
  7658. "name": "sessionID",
  7659. "in": "path",
  7660. "schema": {
  7661. "type": "string",
  7662. "pattern": "^ses"
  7663. },
  7664. "required": true
  7665. },
  7666. {
  7667. "name": "directory",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. },
  7674. {
  7675. "name": "workspace",
  7676. "in": "query",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": false
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "Updated session",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/Session"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "400": {
  7695. "description": "BadRequest | InvalidRequestError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "anyOf": [
  7700. {
  7701. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7702. },
  7703. {
  7704. "$ref": "#/components/schemas/InvalidRequestError"
  7705. }
  7706. ]
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "404": {
  7712. "description": "NotFoundError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "$ref": "#/components/schemas/NotFoundError"
  7717. }
  7718. }
  7719. }
  7720. },
  7721. "409": {
  7722. "description": "SessionBusyError",
  7723. "content": {
  7724. "application/json": {
  7725. "schema": {
  7726. "$ref": "#/components/schemas/SessionBusyError"
  7727. }
  7728. }
  7729. }
  7730. }
  7731. },
  7732. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7733. "summary": "Revert message",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "type": "object",
  7739. "properties": {
  7740. "messageID": {
  7741. "type": "string",
  7742. "pattern": "^msg"
  7743. },
  7744. "partID": {
  7745. "type": "string",
  7746. "pattern": "^prt"
  7747. }
  7748. },
  7749. "required": ["messageID"],
  7750. "additionalProperties": false
  7751. }
  7752. }
  7753. }
  7754. },
  7755. "x-codeSamples": [
  7756. {
  7757. "lang": "js",
  7758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7759. }
  7760. ]
  7761. }
  7762. },
  7763. "/session/{sessionID}/unrevert": {
  7764. "post": {
  7765. "tags": ["session"],
  7766. "operationId": "session.unrevert",
  7767. "parameters": [
  7768. {
  7769. "name": "sessionID",
  7770. "in": "path",
  7771. "schema": {
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. },
  7775. "required": true
  7776. },
  7777. {
  7778. "name": "directory",
  7779. "in": "query",
  7780. "schema": {
  7781. "type": "string"
  7782. },
  7783. "required": false
  7784. },
  7785. {
  7786. "name": "workspace",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. }
  7793. ],
  7794. "responses": {
  7795. "200": {
  7796. "description": "Updated session",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "$ref": "#/components/schemas/Session"
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "400": {
  7806. "description": "BadRequest | InvalidRequestError",
  7807. "content": {
  7808. "application/json": {
  7809. "schema": {
  7810. "anyOf": [
  7811. {
  7812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7813. },
  7814. {
  7815. "$ref": "#/components/schemas/InvalidRequestError"
  7816. }
  7817. ]
  7818. }
  7819. }
  7820. }
  7821. },
  7822. "404": {
  7823. "description": "NotFoundError",
  7824. "content": {
  7825. "application/json": {
  7826. "schema": {
  7827. "$ref": "#/components/schemas/NotFoundError"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "409": {
  7833. "description": "SessionBusyError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "$ref": "#/components/schemas/SessionBusyError"
  7838. }
  7839. }
  7840. }
  7841. }
  7842. },
  7843. "description": "Restore all previously reverted messages in a session.",
  7844. "summary": "Restore reverted messages",
  7845. "x-codeSamples": [
  7846. {
  7847. "lang": "js",
  7848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7849. }
  7850. ]
  7851. }
  7852. },
  7853. "/session/{sessionID}/permissions/{permissionID}": {
  7854. "post": {
  7855. "tags": ["session"],
  7856. "operationId": "permission.respond",
  7857. "parameters": [
  7858. {
  7859. "name": "sessionID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^ses"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "permissionID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^per"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Permission processed successfully",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Permission processed successfully"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError | PermissionNotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "anyOf": [
  7928. {
  7929. "$ref": "#/components/schemas/NotFoundError"
  7930. },
  7931. {
  7932. "$ref": "#/components/schemas/PermissionNotFoundError"
  7933. }
  7934. ]
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Approve or deny a permission request from the AI assistant.",
  7941. "summary": "Respond to permission",
  7942. "deprecated": true,
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "response": {
  7950. "type": "string",
  7951. "enum": ["once", "always", "reject"]
  7952. }
  7953. },
  7954. "required": ["response"],
  7955. "additionalProperties": false
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "x-codeSamples": [
  7961. {
  7962. "lang": "js",
  7963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7964. }
  7965. ]
  7966. }
  7967. },
  7968. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7969. "delete": {
  7970. "tags": ["session"],
  7971. "operationId": "part.delete",
  7972. "parameters": [
  7973. {
  7974. "name": "sessionID",
  7975. "in": "path",
  7976. "schema": {
  7977. "type": "string",
  7978. "pattern": "^ses"
  7979. },
  7980. "required": true
  7981. },
  7982. {
  7983. "name": "messageID",
  7984. "in": "path",
  7985. "schema": {
  7986. "type": "string",
  7987. "pattern": "^msg"
  7988. },
  7989. "required": true
  7990. },
  7991. {
  7992. "name": "partID",
  7993. "in": "path",
  7994. "schema": {
  7995. "type": "string",
  7996. "pattern": "^prt"
  7997. },
  7998. "required": true
  7999. },
  8000. {
  8001. "name": "directory",
  8002. "in": "query",
  8003. "schema": {
  8004. "type": "string"
  8005. },
  8006. "required": false
  8007. },
  8008. {
  8009. "name": "workspace",
  8010. "in": "query",
  8011. "schema": {
  8012. "type": "string"
  8013. },
  8014. "required": false
  8015. }
  8016. ],
  8017. "responses": {
  8018. "200": {
  8019. "description": "Successfully deleted part",
  8020. "content": {
  8021. "application/json": {
  8022. "schema": {
  8023. "type": "boolean",
  8024. "description": "Successfully deleted part"
  8025. }
  8026. }
  8027. }
  8028. },
  8029. "400": {
  8030. "description": "BadRequest | InvalidRequestError",
  8031. "content": {
  8032. "application/json": {
  8033. "schema": {
  8034. "anyOf": [
  8035. {
  8036. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8037. },
  8038. {
  8039. "$ref": "#/components/schemas/InvalidRequestError"
  8040. }
  8041. ]
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "404": {
  8047. "description": "NotFoundError",
  8048. "content": {
  8049. "application/json": {
  8050. "schema": {
  8051. "$ref": "#/components/schemas/NotFoundError"
  8052. }
  8053. }
  8054. }
  8055. }
  8056. },
  8057. "description": "Delete a part from a message.",
  8058. "x-codeSamples": [
  8059. {
  8060. "lang": "js",
  8061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8062. }
  8063. ]
  8064. },
  8065. "patch": {
  8066. "tags": ["session"],
  8067. "operationId": "part.update",
  8068. "parameters": [
  8069. {
  8070. "name": "sessionID",
  8071. "in": "path",
  8072. "schema": {
  8073. "type": "string",
  8074. "pattern": "^ses"
  8075. },
  8076. "required": true
  8077. },
  8078. {
  8079. "name": "messageID",
  8080. "in": "path",
  8081. "schema": {
  8082. "type": "string",
  8083. "pattern": "^msg"
  8084. },
  8085. "required": true
  8086. },
  8087. {
  8088. "name": "partID",
  8089. "in": "path",
  8090. "schema": {
  8091. "type": "string",
  8092. "pattern": "^prt"
  8093. },
  8094. "required": true
  8095. },
  8096. {
  8097. "name": "directory",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. },
  8104. {
  8105. "name": "workspace",
  8106. "in": "query",
  8107. "schema": {
  8108. "type": "string"
  8109. },
  8110. "required": false
  8111. }
  8112. ],
  8113. "responses": {
  8114. "200": {
  8115. "description": "Successfully updated part",
  8116. "content": {
  8117. "application/json": {
  8118. "schema": {
  8119. "$ref": "#/components/schemas/Part"
  8120. }
  8121. }
  8122. }
  8123. },
  8124. "400": {
  8125. "description": "BadRequest | InvalidRequestError",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "anyOf": [
  8130. {
  8131. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8132. },
  8133. {
  8134. "$ref": "#/components/schemas/InvalidRequestError"
  8135. }
  8136. ]
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "404": {
  8142. "description": "NotFoundError",
  8143. "content": {
  8144. "application/json": {
  8145. "schema": {
  8146. "$ref": "#/components/schemas/NotFoundError"
  8147. }
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "description": "Update a part in a message.",
  8153. "requestBody": {
  8154. "content": {
  8155. "application/json": {
  8156. "schema": {
  8157. "$ref": "#/components/schemas/Part"
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/sync/start": {
  8171. "post": {
  8172. "tags": ["sync"],
  8173. "operationId": "sync.start",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Workspace sync started",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Workspace sync started"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8216. "summary": "Start workspace sync",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/replay": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.replay",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Replayed sync events",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["sessionID"],
  8260. "additionalProperties": false,
  8261. "description": "Replayed sync events"
  8262. }
  8263. }
  8264. }
  8265. },
  8266. "400": {
  8267. "description": "BadRequest | InvalidRequestError",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "anyOf": [
  8272. {
  8273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8274. },
  8275. {
  8276. "$ref": "#/components/schemas/InvalidRequestError"
  8277. }
  8278. ]
  8279. }
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "description": "Validate and replay a complete sync event history.",
  8285. "summary": "Replay sync events",
  8286. "requestBody": {
  8287. "content": {
  8288. "application/json": {
  8289. "schema": {
  8290. "type": "object",
  8291. "properties": {
  8292. "directory": {
  8293. "type": "string"
  8294. },
  8295. "events": {
  8296. "type": "array",
  8297. "minItems": 1,
  8298. "items": {
  8299. "type": "object",
  8300. "properties": {
  8301. "id": {
  8302. "type": "string",
  8303. "pattern": "^evt_"
  8304. },
  8305. "aggregateID": {
  8306. "type": "string"
  8307. },
  8308. "seq": {
  8309. "type": "integer",
  8310. "minimum": 0
  8311. },
  8312. "type": {
  8313. "type": "string"
  8314. },
  8315. "data": {
  8316. "type": "object"
  8317. }
  8318. },
  8319. "required": ["id", "aggregateID", "seq", "type", "data"],
  8320. "additionalProperties": false
  8321. }
  8322. }
  8323. },
  8324. "required": ["directory", "events"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. }
  8329. },
  8330. "x-codeSamples": [
  8331. {
  8332. "lang": "js",
  8333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/sync/steal": {
  8339. "post": {
  8340. "tags": ["sync"],
  8341. "operationId": "sync.steal",
  8342. "parameters": [
  8343. {
  8344. "name": "directory",
  8345. "in": "query",
  8346. "schema": {
  8347. "type": "string"
  8348. },
  8349. "required": false
  8350. },
  8351. {
  8352. "name": "workspace",
  8353. "in": "query",
  8354. "schema": {
  8355. "type": "string"
  8356. },
  8357. "required": false
  8358. }
  8359. ],
  8360. "responses": {
  8361. "200": {
  8362. "description": "Session stolen into workspace",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "type": "object",
  8367. "properties": {
  8368. "sessionID": {
  8369. "type": "string",
  8370. "pattern": "^ses"
  8371. }
  8372. },
  8373. "required": ["sessionID"],
  8374. "additionalProperties": false,
  8375. "description": "Session stolen into workspace"
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "400": {
  8381. "description": "BadRequest | InvalidRequestError",
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "anyOf": [
  8386. {
  8387. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/InvalidRequestError"
  8391. }
  8392. ]
  8393. }
  8394. }
  8395. }
  8396. }
  8397. },
  8398. "description": "Update a session to belong to the current workspace through the sync event system.",
  8399. "summary": "Steal session into workspace",
  8400. "requestBody": {
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "type": "object",
  8405. "properties": {
  8406. "sessionID": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. }
  8410. },
  8411. "required": ["sessionID"],
  8412. "additionalProperties": false
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/sync/history": {
  8426. "post": {
  8427. "tags": ["sync"],
  8428. "operationId": "sync.history.list",
  8429. "parameters": [
  8430. {
  8431. "name": "directory",
  8432. "in": "query",
  8433. "schema": {
  8434. "type": "string"
  8435. },
  8436. "required": false
  8437. },
  8438. {
  8439. "name": "workspace",
  8440. "in": "query",
  8441. "schema": {
  8442. "type": "string"
  8443. },
  8444. "required": false
  8445. }
  8446. ],
  8447. "responses": {
  8448. "200": {
  8449. "description": "Sync events",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "type": "array",
  8454. "items": {
  8455. "type": "object",
  8456. "properties": {
  8457. "id": {
  8458. "type": "string",
  8459. "pattern": "^evt_"
  8460. },
  8461. "aggregate_id": {
  8462. "type": "string"
  8463. },
  8464. "seq": {
  8465. "type": "integer",
  8466. "minimum": 0
  8467. },
  8468. "type": {
  8469. "type": "string"
  8470. },
  8471. "data": {
  8472. "type": "object"
  8473. }
  8474. },
  8475. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8476. "additionalProperties": false
  8477. },
  8478. "description": "Sync events"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "BadRequest | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. }
  8495. ]
  8496. }
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "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.",
  8502. "summary": "List sync events",
  8503. "requestBody": {
  8504. "content": {
  8505. "application/json": {
  8506. "schema": {
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "integer",
  8510. "minimum": 0
  8511. }
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/tui/append-prompt": {
  8525. "post": {
  8526. "tags": ["tui"],
  8527. "operationId": "tui.appendPrompt",
  8528. "parameters": [
  8529. {
  8530. "name": "directory",
  8531. "in": "query",
  8532. "schema": {
  8533. "type": "string"
  8534. },
  8535. "required": false
  8536. },
  8537. {
  8538. "name": "workspace",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. }
  8545. ],
  8546. "responses": {
  8547. "200": {
  8548. "description": "Prompt processed successfully",
  8549. "content": {
  8550. "application/json": {
  8551. "schema": {
  8552. "type": "boolean",
  8553. "description": "Prompt processed successfully"
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "BadRequest | InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "anyOf": [
  8564. {
  8565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8566. },
  8567. {
  8568. "$ref": "#/components/schemas/InvalidRequestError"
  8569. }
  8570. ]
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Append prompt to the TUI.",
  8577. "summary": "Append TUI prompt",
  8578. "requestBody": {
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "type": "object",
  8583. "properties": {
  8584. "text": {
  8585. "type": "string"
  8586. }
  8587. },
  8588. "required": ["text"],
  8589. "additionalProperties": false
  8590. }
  8591. }
  8592. }
  8593. },
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-help": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openHelp",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Help dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Help dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the help dialog in the TUI to display user assistance information.",
  8648. "summary": "Open help dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-sessions": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openSessions",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Session dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Session dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the session dialog.",
  8703. "summary": "Open sessions dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/open-themes": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.openThemes",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Theme dialog opened successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Theme dialog opened successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Open the theme dialog.",
  8758. "summary": "Open themes dialog",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/open-models": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.openModels",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Model dialog opened successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Model dialog opened successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Open the model dialog.",
  8813. "summary": "Open models dialog",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/submit-prompt": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.submitPrompt",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Prompt submitted successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Prompt submitted successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "Bad request",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/BadRequestError"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Submit the prompt.",
  8868. "summary": "Submit TUI prompt",
  8869. "x-codeSamples": [
  8870. {
  8871. "lang": "js",
  8872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8873. }
  8874. ]
  8875. }
  8876. },
  8877. "/tui/clear-prompt": {
  8878. "post": {
  8879. "tags": ["tui"],
  8880. "operationId": "tui.clearPrompt",
  8881. "parameters": [
  8882. {
  8883. "name": "directory",
  8884. "in": "query",
  8885. "schema": {
  8886. "type": "string"
  8887. },
  8888. "required": false
  8889. },
  8890. {
  8891. "name": "workspace",
  8892. "in": "query",
  8893. "schema": {
  8894. "type": "string"
  8895. },
  8896. "required": false
  8897. }
  8898. ],
  8899. "responses": {
  8900. "200": {
  8901. "description": "Prompt cleared successfully",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "type": "boolean",
  8906. "description": "Prompt cleared successfully"
  8907. }
  8908. }
  8909. }
  8910. },
  8911. "400": {
  8912. "description": "Bad request",
  8913. "content": {
  8914. "application/json": {
  8915. "schema": {
  8916. "$ref": "#/components/schemas/BadRequestError"
  8917. }
  8918. }
  8919. }
  8920. }
  8921. },
  8922. "description": "Clear the prompt.",
  8923. "summary": "Clear TUI prompt",
  8924. "x-codeSamples": [
  8925. {
  8926. "lang": "js",
  8927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8928. }
  8929. ]
  8930. }
  8931. },
  8932. "/tui/execute-command": {
  8933. "post": {
  8934. "tags": ["tui"],
  8935. "operationId": "tui.executeCommand",
  8936. "parameters": [
  8937. {
  8938. "name": "directory",
  8939. "in": "query",
  8940. "schema": {
  8941. "type": "string"
  8942. },
  8943. "required": false
  8944. },
  8945. {
  8946. "name": "workspace",
  8947. "in": "query",
  8948. "schema": {
  8949. "type": "string"
  8950. },
  8951. "required": false
  8952. }
  8953. ],
  8954. "responses": {
  8955. "200": {
  8956. "description": "Command executed successfully",
  8957. "content": {
  8958. "application/json": {
  8959. "schema": {
  8960. "type": "boolean",
  8961. "description": "Command executed successfully"
  8962. }
  8963. }
  8964. }
  8965. },
  8966. "400": {
  8967. "description": "BadRequest | InvalidRequestError",
  8968. "content": {
  8969. "application/json": {
  8970. "schema": {
  8971. "anyOf": [
  8972. {
  8973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/InvalidRequestError"
  8977. }
  8978. ]
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Execute a TUI command.",
  8985. "summary": "Execute TUI command",
  8986. "requestBody": {
  8987. "content": {
  8988. "application/json": {
  8989. "schema": {
  8990. "type": "object",
  8991. "properties": {
  8992. "command": {
  8993. "type": "string"
  8994. }
  8995. },
  8996. "required": ["command"],
  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.executeCommand({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/show-toast": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.showToast",
  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": "Toast notification shown successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Toast notification shown successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "Bad request",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/BadRequestError"
  9050. }
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "description": "Show a toast notification in the TUI.",
  9056. "summary": "Show TUI toast",
  9057. "requestBody": {
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "type": "object",
  9062. "properties": {
  9063. "title": {
  9064. "type": "string"
  9065. },
  9066. "message": {
  9067. "type": "string"
  9068. },
  9069. "variant": {
  9070. "type": "string",
  9071. "enum": ["info", "success", "warning", "error"]
  9072. },
  9073. "duration": {
  9074. "type": "integer",
  9075. "exclusiveMinimum": 0
  9076. }
  9077. },
  9078. "required": ["message", "variant"],
  9079. "additionalProperties": false
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "x-codeSamples": [
  9085. {
  9086. "lang": "js",
  9087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9088. }
  9089. ]
  9090. }
  9091. },
  9092. "/tui/publish": {
  9093. "post": {
  9094. "tags": ["tui"],
  9095. "operationId": "tui.publish",
  9096. "parameters": [
  9097. {
  9098. "name": "directory",
  9099. "in": "query",
  9100. "schema": {
  9101. "type": "string"
  9102. },
  9103. "required": false
  9104. },
  9105. {
  9106. "name": "workspace",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. }
  9113. ],
  9114. "responses": {
  9115. "200": {
  9116. "description": "Event published successfully",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "type": "boolean",
  9121. "description": "Event published successfully"
  9122. }
  9123. }
  9124. }
  9125. },
  9126. "400": {
  9127. "description": "BadRequest | InvalidRequestError",
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "anyOf": [
  9132. {
  9133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9134. },
  9135. {
  9136. "$ref": "#/components/schemas/InvalidRequestError"
  9137. }
  9138. ]
  9139. }
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "description": "Publish a TUI event.",
  9145. "summary": "Publish TUI event",
  9146. "requestBody": {
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "anyOf": [
  9151. {
  9152. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventTuiToastShow"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9162. }
  9163. ]
  9164. }
  9165. }
  9166. }
  9167. },
  9168. "x-codeSamples": [
  9169. {
  9170. "lang": "js",
  9171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9172. }
  9173. ]
  9174. }
  9175. },
  9176. "/tui/select-session": {
  9177. "post": {
  9178. "tags": ["tui"],
  9179. "operationId": "tui.selectSession",
  9180. "parameters": [
  9181. {
  9182. "name": "directory",
  9183. "in": "query",
  9184. "schema": {
  9185. "type": "string"
  9186. },
  9187. "required": false
  9188. },
  9189. {
  9190. "name": "workspace",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. }
  9197. ],
  9198. "responses": {
  9199. "200": {
  9200. "description": "Session selected successfully",
  9201. "content": {
  9202. "application/json": {
  9203. "schema": {
  9204. "type": "boolean",
  9205. "description": "Session selected successfully"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "400": {
  9211. "description": "BadRequest | InvalidRequestError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/InvalidRequestError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "404": {
  9228. "description": "NotFoundError",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/NotFoundError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Navigate the TUI to display the specified session.",
  9239. "summary": "Select session",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "object",
  9245. "properties": {
  9246. "sessionID": {
  9247. "type": "string",
  9248. "pattern": "^ses",
  9249. "description": "Session ID to navigate to"
  9250. }
  9251. },
  9252. "required": ["sessionID"],
  9253. "additionalProperties": false
  9254. }
  9255. }
  9256. }
  9257. },
  9258. "x-codeSamples": [
  9259. {
  9260. "lang": "js",
  9261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9262. }
  9263. ]
  9264. }
  9265. },
  9266. "/tui/control/next": {
  9267. "get": {
  9268. "tags": ["tui"],
  9269. "operationId": "tui.control.next",
  9270. "parameters": [
  9271. {
  9272. "name": "directory",
  9273. "in": "query",
  9274. "schema": {
  9275. "type": "string"
  9276. },
  9277. "required": false
  9278. },
  9279. {
  9280. "name": "workspace",
  9281. "in": "query",
  9282. "schema": {
  9283. "type": "string"
  9284. },
  9285. "required": false
  9286. }
  9287. ],
  9288. "responses": {
  9289. "200": {
  9290. "description": "Next TUI request",
  9291. "content": {
  9292. "application/json": {
  9293. "schema": {
  9294. "type": "object",
  9295. "properties": {
  9296. "path": {
  9297. "type": "string"
  9298. },
  9299. "body": {}
  9300. },
  9301. "required": ["path", "body"],
  9302. "additionalProperties": false,
  9303. "description": "Next TUI request"
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "400": {
  9309. "description": "Bad request",
  9310. "content": {
  9311. "application/json": {
  9312. "schema": {
  9313. "$ref": "#/components/schemas/BadRequestError"
  9314. }
  9315. }
  9316. }
  9317. }
  9318. },
  9319. "description": "Retrieve the next TUI request from the queue for processing.",
  9320. "summary": "Get next TUI request",
  9321. "x-codeSamples": [
  9322. {
  9323. "lang": "js",
  9324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9325. }
  9326. ]
  9327. }
  9328. },
  9329. "/tui/control/response": {
  9330. "post": {
  9331. "tags": ["tui"],
  9332. "operationId": "tui.control.response",
  9333. "parameters": [
  9334. {
  9335. "name": "directory",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. },
  9342. {
  9343. "name": "workspace",
  9344. "in": "query",
  9345. "schema": {
  9346. "type": "string"
  9347. },
  9348. "required": false
  9349. }
  9350. ],
  9351. "responses": {
  9352. "200": {
  9353. "description": "Response submitted successfully",
  9354. "content": {
  9355. "application/json": {
  9356. "schema": {
  9357. "type": "boolean",
  9358. "description": "Response submitted successfully"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9375. "summary": "Submit TUI response",
  9376. "requestBody": {
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {}
  9380. }
  9381. }
  9382. },
  9383. "x-codeSamples": [
  9384. {
  9385. "lang": "js",
  9386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9387. }
  9388. ]
  9389. }
  9390. },
  9391. "/experimental/workspace/adapter": {
  9392. "get": {
  9393. "tags": ["workspace"],
  9394. "operationId": "experimental.workspace.adapter.list",
  9395. "parameters": [
  9396. {
  9397. "name": "directory",
  9398. "in": "query",
  9399. "schema": {
  9400. "type": "string"
  9401. },
  9402. "required": false
  9403. },
  9404. {
  9405. "name": "workspace",
  9406. "in": "query",
  9407. "schema": {
  9408. "type": "string"
  9409. },
  9410. "required": false
  9411. }
  9412. ],
  9413. "responses": {
  9414. "200": {
  9415. "description": "Workspace adapters",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "object",
  9422. "properties": {
  9423. "type": {
  9424. "type": "string"
  9425. },
  9426. "name": {
  9427. "type": "string"
  9428. },
  9429. "description": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "required": ["type", "name", "description"],
  9434. "additionalProperties": false
  9435. },
  9436. "description": "Workspace adapters"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "Bad request",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "$ref": "#/components/schemas/BadRequestError"
  9447. }
  9448. }
  9449. }
  9450. }
  9451. },
  9452. "description": "List all available workspace adapters for the current project.",
  9453. "summary": "List workspace adapters",
  9454. "x-codeSamples": [
  9455. {
  9456. "lang": "js",
  9457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9458. }
  9459. ]
  9460. }
  9461. },
  9462. "/experimental/workspace": {
  9463. "get": {
  9464. "tags": ["workspace"],
  9465. "operationId": "experimental.workspace.list",
  9466. "parameters": [
  9467. {
  9468. "name": "directory",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "workspace",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "responses": {
  9485. "200": {
  9486. "description": "Workspaces",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "type": "array",
  9491. "items": {
  9492. "$ref": "#/components/schemas/Workspace"
  9493. },
  9494. "description": "Workspaces"
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "Bad request",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/BadRequestError"
  9505. }
  9506. }
  9507. }
  9508. }
  9509. },
  9510. "description": "List all workspaces.",
  9511. "summary": "List workspaces",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9516. }
  9517. ]
  9518. },
  9519. "post": {
  9520. "tags": ["workspace"],
  9521. "operationId": "experimental.workspace.create",
  9522. "parameters": [
  9523. {
  9524. "name": "directory",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. },
  9531. {
  9532. "name": "workspace",
  9533. "in": "query",
  9534. "schema": {
  9535. "type": "string"
  9536. },
  9537. "required": false
  9538. }
  9539. ],
  9540. "responses": {
  9541. "200": {
  9542. "description": "Workspace created",
  9543. "content": {
  9544. "application/json": {
  9545. "schema": {
  9546. "$ref": "#/components/schemas/Workspace"
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "400": {
  9552. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "anyOf": [
  9557. {
  9558. "$ref": "#/components/schemas/WorkspaceCreateError"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/InvalidRequestError"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. }
  9571. },
  9572. "description": "Create a workspace for the current project.",
  9573. "summary": "Create workspace",
  9574. "requestBody": {
  9575. "content": {
  9576. "application/json": {
  9577. "schema": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string",
  9582. "pattern": "^wrk"
  9583. },
  9584. "type": {
  9585. "type": "string"
  9586. },
  9587. "branch": {
  9588. "anyOf": [
  9589. {
  9590. "type": "string"
  9591. },
  9592. {
  9593. "type": "null"
  9594. }
  9595. ]
  9596. },
  9597. "extra": {
  9598. "anyOf": [
  9599. {},
  9600. {
  9601. "type": "null"
  9602. }
  9603. ]
  9604. }
  9605. },
  9606. "required": ["type"],
  9607. "additionalProperties": false
  9608. }
  9609. }
  9610. }
  9611. },
  9612. "x-codeSamples": [
  9613. {
  9614. "lang": "js",
  9615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9616. }
  9617. ]
  9618. }
  9619. },
  9620. "/experimental/workspace/sync-list": {
  9621. "post": {
  9622. "tags": ["workspace"],
  9623. "operationId": "experimental.workspace.syncList",
  9624. "parameters": [
  9625. {
  9626. "name": "directory",
  9627. "in": "query",
  9628. "schema": {
  9629. "type": "string"
  9630. },
  9631. "required": false
  9632. },
  9633. {
  9634. "name": "workspace",
  9635. "in": "query",
  9636. "schema": {
  9637. "type": "string"
  9638. },
  9639. "required": false
  9640. }
  9641. ],
  9642. "responses": {
  9643. "204": {
  9644. "description": "Workspace list synced"
  9645. },
  9646. "400": {
  9647. "description": "Bad request",
  9648. "content": {
  9649. "application/json": {
  9650. "schema": {
  9651. "$ref": "#/components/schemas/BadRequestError"
  9652. }
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "description": "Register missing workspaces returned by workspace adapters.",
  9658. "summary": "Sync workspace list",
  9659. "x-codeSamples": [
  9660. {
  9661. "lang": "js",
  9662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "/experimental/workspace/status": {
  9668. "get": {
  9669. "tags": ["workspace"],
  9670. "operationId": "experimental.workspace.status",
  9671. "parameters": [
  9672. {
  9673. "name": "directory",
  9674. "in": "query",
  9675. "schema": {
  9676. "type": "string"
  9677. },
  9678. "required": false
  9679. },
  9680. {
  9681. "name": "workspace",
  9682. "in": "query",
  9683. "schema": {
  9684. "type": "string"
  9685. },
  9686. "required": false
  9687. }
  9688. ],
  9689. "responses": {
  9690. "200": {
  9691. "description": "Workspace status",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "type": "array",
  9696. "items": {
  9697. "type": "object",
  9698. "properties": {
  9699. "workspaceID": {
  9700. "type": "string",
  9701. "pattern": "^wrk"
  9702. },
  9703. "status": {
  9704. "type": "string",
  9705. "enum": ["connected", "connecting", "disconnected", "error"]
  9706. }
  9707. },
  9708. "required": ["workspaceID", "status"],
  9709. "additionalProperties": false
  9710. },
  9711. "description": "Workspace status"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "400": {
  9717. "description": "Bad request",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/BadRequestError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Get connection status for workspaces in the current project.",
  9728. "summary": "Workspace status",
  9729. "x-codeSamples": [
  9730. {
  9731. "lang": "js",
  9732. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9733. }
  9734. ]
  9735. }
  9736. },
  9737. "/experimental/workspace/{id}": {
  9738. "delete": {
  9739. "tags": ["workspace"],
  9740. "operationId": "experimental.workspace.remove",
  9741. "parameters": [
  9742. {
  9743. "name": "id",
  9744. "in": "path",
  9745. "schema": {
  9746. "type": "string",
  9747. "pattern": "^wrk"
  9748. },
  9749. "required": true
  9750. },
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Workspace removed",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "$ref": "#/components/schemas/Workspace"
  9775. }
  9776. }
  9777. }
  9778. },
  9779. "400": {
  9780. "description": "BadRequest | InvalidRequestError",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "anyOf": [
  9785. {
  9786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9787. },
  9788. {
  9789. "$ref": "#/components/schemas/InvalidRequestError"
  9790. }
  9791. ]
  9792. }
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "description": "Remove an existing workspace.",
  9798. "summary": "Remove workspace",
  9799. "x-codeSamples": [
  9800. {
  9801. "lang": "js",
  9802. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "/experimental/workspace/warp": {
  9808. "post": {
  9809. "tags": ["workspace"],
  9810. "operationId": "experimental.workspace.warp",
  9811. "parameters": [
  9812. {
  9813. "name": "directory",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. },
  9820. {
  9821. "name": "workspace",
  9822. "in": "query",
  9823. "schema": {
  9824. "type": "string"
  9825. },
  9826. "required": false
  9827. }
  9828. ],
  9829. "responses": {
  9830. "204": {
  9831. "description": "Session warped"
  9832. },
  9833. "400": {
  9834. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "anyOf": [
  9839. {
  9840. "$ref": "#/components/schemas/WorkspaceWarpError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/VcsApplyError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/InvalidRequestError"
  9847. }
  9848. ]
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "404": {
  9854. "description": "NotFoundError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "$ref": "#/components/schemas/NotFoundError"
  9859. }
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9865. "summary": "Warp session into workspace",
  9866. "requestBody": {
  9867. "content": {
  9868. "application/json": {
  9869. "schema": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "anyOf": [
  9874. {
  9875. "type": "string",
  9876. "pattern": "^wrk"
  9877. },
  9878. {
  9879. "type": "null"
  9880. }
  9881. ]
  9882. },
  9883. "sessionID": {
  9884. "type": "string",
  9885. "pattern": "^ses"
  9886. },
  9887. "copyChanges": {
  9888. "type": "boolean"
  9889. }
  9890. },
  9891. "required": ["id", "sessionID"],
  9892. "additionalProperties": false
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/api/health": {
  9906. "get": {
  9907. "tags": ["opencode HttpApi"],
  9908. "operationId": "v2.health.get",
  9909. "parameters": [],
  9910. "security": [],
  9911. "responses": {
  9912. "200": {
  9913. "description": "Success",
  9914. "content": {
  9915. "application/json": {
  9916. "schema": {
  9917. "type": "object",
  9918. "properties": {
  9919. "healthy": {
  9920. "type": "boolean",
  9921. "enum": [true]
  9922. }
  9923. },
  9924. "required": ["healthy"],
  9925. "additionalProperties": false
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "InvalidRequestError",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/InvalidRequestError"
  9936. }
  9937. }
  9938. }
  9939. },
  9940. "401": {
  9941. "description": "UnauthorizedError",
  9942. "content": {
  9943. "application/json": {
  9944. "schema": {
  9945. "$ref": "#/components/schemas/UnauthorizedError"
  9946. }
  9947. }
  9948. }
  9949. }
  9950. },
  9951. "description": "Check whether the API server is ready to accept requests.",
  9952. "summary": "Check server health",
  9953. "x-codeSamples": [
  9954. {
  9955. "lang": "js",
  9956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9957. }
  9958. ]
  9959. }
  9960. },
  9961. "/api/location": {
  9962. "get": {
  9963. "tags": ["opencode HttpApi"],
  9964. "operationId": "v2.location.get",
  9965. "parameters": [
  9966. {
  9967. "name": "location",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "object",
  9971. "properties": {
  9972. "directory": {
  9973. "type": "string"
  9974. },
  9975. "workspace": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "additionalProperties": false
  9980. },
  9981. "required": false,
  9982. "style": "deepObject",
  9983. "explode": true
  9984. }
  9985. ],
  9986. "security": [],
  9987. "responses": {
  9988. "200": {
  9989. "description": "Location.Info",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "$ref": "#/components/schemas/LocationInfo"
  9994. }
  9995. }
  9996. }
  9997. },
  9998. "400": {
  9999. "description": "InvalidRequestError",
  10000. "content": {
  10001. "application/json": {
  10002. "schema": {
  10003. "$ref": "#/components/schemas/InvalidRequestError"
  10004. }
  10005. }
  10006. }
  10007. },
  10008. "401": {
  10009. "description": "UnauthorizedError",
  10010. "content": {
  10011. "application/json": {
  10012. "schema": {
  10013. "$ref": "#/components/schemas/UnauthorizedError"
  10014. }
  10015. }
  10016. }
  10017. }
  10018. },
  10019. "description": "Resolve the requested location or the server default location.",
  10020. "summary": "Get location",
  10021. "x-codeSamples": [
  10022. {
  10023. "lang": "js",
  10024. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  10025. }
  10026. ]
  10027. }
  10028. },
  10029. "/api/agent": {
  10030. "get": {
  10031. "tags": ["opencode HttpApi"],
  10032. "operationId": "v2.agent.list",
  10033. "parameters": [
  10034. {
  10035. "name": "location",
  10036. "in": "query",
  10037. "schema": {
  10038. "type": "object",
  10039. "properties": {
  10040. "directory": {
  10041. "type": "string"
  10042. },
  10043. "workspace": {
  10044. "type": "string"
  10045. }
  10046. },
  10047. "additionalProperties": false
  10048. },
  10049. "required": false,
  10050. "style": "deepObject",
  10051. "explode": true
  10052. }
  10053. ],
  10054. "security": [],
  10055. "responses": {
  10056. "200": {
  10057. "description": "Success",
  10058. "content": {
  10059. "application/json": {
  10060. "schema": {
  10061. "type": "object",
  10062. "properties": {
  10063. "location": {
  10064. "$ref": "#/components/schemas/LocationInfo"
  10065. },
  10066. "data": {
  10067. "type": "array",
  10068. "items": {
  10069. "$ref": "#/components/schemas/AgentV2Info"
  10070. }
  10071. }
  10072. },
  10073. "required": ["location", "data"],
  10074. "additionalProperties": false
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "400": {
  10080. "description": "InvalidRequestError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/InvalidRequestError"
  10085. }
  10086. }
  10087. }
  10088. },
  10089. "401": {
  10090. "description": "UnauthorizedError",
  10091. "content": {
  10092. "application/json": {
  10093. "schema": {
  10094. "$ref": "#/components/schemas/UnauthorizedError"
  10095. }
  10096. }
  10097. }
  10098. }
  10099. },
  10100. "description": "Retrieve currently registered agents.",
  10101. "summary": "List agents",
  10102. "x-codeSamples": [
  10103. {
  10104. "lang": "js",
  10105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10106. }
  10107. ]
  10108. }
  10109. },
  10110. "/api/session": {
  10111. "get": {
  10112. "tags": ["sessions"],
  10113. "operationId": "v2.session.list",
  10114. "parameters": [
  10115. {
  10116. "name": "workspace",
  10117. "in": "query",
  10118. "schema": {
  10119. "type": "string",
  10120. "pattern": "^wrk"
  10121. },
  10122. "required": false
  10123. },
  10124. {
  10125. "name": "limit",
  10126. "in": "query",
  10127. "schema": {
  10128. "type": "number"
  10129. },
  10130. "required": false
  10131. },
  10132. {
  10133. "name": "order",
  10134. "in": "query",
  10135. "schema": {
  10136. "type": "string",
  10137. "enum": ["asc", "desc"]
  10138. },
  10139. "required": false
  10140. },
  10141. {
  10142. "name": "search",
  10143. "in": "query",
  10144. "schema": {
  10145. "type": "string"
  10146. },
  10147. "required": false
  10148. },
  10149. {
  10150. "name": "directory",
  10151. "in": "query",
  10152. "schema": {
  10153. "type": "string"
  10154. },
  10155. "required": false
  10156. },
  10157. {
  10158. "name": "project",
  10159. "in": "query",
  10160. "schema": {
  10161. "type": "string"
  10162. },
  10163. "required": false
  10164. },
  10165. {
  10166. "name": "subpath",
  10167. "in": "query",
  10168. "schema": {
  10169. "type": "string"
  10170. },
  10171. "required": false
  10172. },
  10173. {
  10174. "name": "cursor",
  10175. "in": "query",
  10176. "schema": {
  10177. "type": "string",
  10178. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10179. },
  10180. "required": false
  10181. }
  10182. ],
  10183. "security": [],
  10184. "responses": {
  10185. "200": {
  10186. "description": "SessionsResponse",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "$ref": "#/components/schemas/SessionsResponse"
  10191. }
  10192. }
  10193. }
  10194. },
  10195. "400": {
  10196. "description": "InvalidCursorError | InvalidRequestError",
  10197. "content": {
  10198. "application/json": {
  10199. "schema": {
  10200. "anyOf": [
  10201. {
  10202. "$ref": "#/components/schemas/InvalidCursorError"
  10203. },
  10204. {
  10205. "$ref": "#/components/schemas/InvalidRequestError"
  10206. },
  10207. {
  10208. "$ref": "#/components/schemas/InvalidRequestError"
  10209. }
  10210. ]
  10211. }
  10212. }
  10213. }
  10214. },
  10215. "401": {
  10216. "description": "UnauthorizedError",
  10217. "content": {
  10218. "application/json": {
  10219. "schema": {
  10220. "$ref": "#/components/schemas/UnauthorizedError"
  10221. }
  10222. }
  10223. }
  10224. }
  10225. },
  10226. "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.",
  10227. "summary": "List sessions",
  10228. "x-codeSamples": [
  10229. {
  10230. "lang": "js",
  10231. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10232. }
  10233. ]
  10234. },
  10235. "post": {
  10236. "tags": ["sessions"],
  10237. "operationId": "v2.session.create",
  10238. "parameters": [],
  10239. "security": [],
  10240. "responses": {
  10241. "200": {
  10242. "description": "Success",
  10243. "content": {
  10244. "application/json": {
  10245. "schema": {
  10246. "type": "object",
  10247. "properties": {
  10248. "data": {
  10249. "$ref": "#/components/schemas/SessionV2Info"
  10250. }
  10251. },
  10252. "required": ["data"],
  10253. "additionalProperties": false
  10254. }
  10255. }
  10256. }
  10257. },
  10258. "400": {
  10259. "description": "InvalidRequestError",
  10260. "content": {
  10261. "application/json": {
  10262. "schema": {
  10263. "$ref": "#/components/schemas/InvalidRequestError"
  10264. }
  10265. }
  10266. }
  10267. },
  10268. "401": {
  10269. "description": "UnauthorizedError",
  10270. "content": {
  10271. "application/json": {
  10272. "schema": {
  10273. "$ref": "#/components/schemas/UnauthorizedError"
  10274. }
  10275. }
  10276. }
  10277. }
  10278. },
  10279. "description": "Create a session at the requested location.",
  10280. "summary": "Create session",
  10281. "requestBody": {
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "type": "object",
  10286. "properties": {
  10287. "id": {
  10288. "type": "string",
  10289. "pattern": "^ses"
  10290. },
  10291. "agent": {
  10292. "type": "string"
  10293. },
  10294. "model": {
  10295. "type": "object",
  10296. "properties": {
  10297. "id": {
  10298. "type": "string"
  10299. },
  10300. "providerID": {
  10301. "type": "string"
  10302. },
  10303. "variant": {
  10304. "type": "string"
  10305. }
  10306. },
  10307. "required": ["id", "providerID"],
  10308. "additionalProperties": false
  10309. },
  10310. "location": {
  10311. "$ref": "#/components/schemas/LocationRef"
  10312. }
  10313. },
  10314. "additionalProperties": false
  10315. }
  10316. }
  10317. },
  10318. "required": true
  10319. },
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}": {
  10329. "get": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.get",
  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. "200": {
  10346. "description": "Success",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "type": "object",
  10351. "properties": {
  10352. "data": {
  10353. "$ref": "#/components/schemas/SessionV2Info"
  10354. }
  10355. },
  10356. "required": ["data"],
  10357. "additionalProperties": false
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "400": {
  10363. "description": "InvalidRequestError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/InvalidRequestError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "401": {
  10373. "description": "UnauthorizedError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "$ref": "#/components/schemas/UnauthorizedError"
  10378. }
  10379. }
  10380. }
  10381. },
  10382. "404": {
  10383. "description": "SessionNotFoundError",
  10384. "content": {
  10385. "application/json": {
  10386. "schema": {
  10387. "anyOf": [
  10388. {
  10389. "$ref": "#/components/schemas/SessionNotFoundError"
  10390. },
  10391. {
  10392. "$ref": "#/components/schemas/SessionNotFoundError"
  10393. }
  10394. ]
  10395. }
  10396. }
  10397. }
  10398. }
  10399. },
  10400. "description": "Retrieve a session by ID.",
  10401. "summary": "Get session",
  10402. "x-codeSamples": [
  10403. {
  10404. "lang": "js",
  10405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10406. }
  10407. ]
  10408. }
  10409. },
  10410. "/api/session/{sessionID}/prompt": {
  10411. "post": {
  10412. "tags": ["sessions"],
  10413. "operationId": "v2.session.prompt",
  10414. "parameters": [
  10415. {
  10416. "name": "sessionID",
  10417. "in": "path",
  10418. "schema": {
  10419. "type": "string",
  10420. "pattern": "^ses"
  10421. },
  10422. "required": true
  10423. }
  10424. ],
  10425. "security": [],
  10426. "responses": {
  10427. "200": {
  10428. "description": "Success",
  10429. "content": {
  10430. "application/json": {
  10431. "schema": {
  10432. "type": "object",
  10433. "properties": {
  10434. "data": {
  10435. "$ref": "#/components/schemas/SessionInputAdmitted"
  10436. }
  10437. },
  10438. "required": ["data"],
  10439. "additionalProperties": false
  10440. }
  10441. }
  10442. }
  10443. },
  10444. "400": {
  10445. "description": "InvalidRequestError",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "$ref": "#/components/schemas/InvalidRequestError"
  10450. }
  10451. }
  10452. }
  10453. },
  10454. "401": {
  10455. "description": "UnauthorizedError",
  10456. "content": {
  10457. "application/json": {
  10458. "schema": {
  10459. "$ref": "#/components/schemas/UnauthorizedError"
  10460. }
  10461. }
  10462. }
  10463. },
  10464. "404": {
  10465. "description": "SessionNotFoundError",
  10466. "content": {
  10467. "application/json": {
  10468. "schema": {
  10469. "anyOf": [
  10470. {
  10471. "$ref": "#/components/schemas/SessionNotFoundError"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/SessionNotFoundError"
  10475. }
  10476. ]
  10477. }
  10478. }
  10479. }
  10480. },
  10481. "409": {
  10482. "description": "ConflictError",
  10483. "content": {
  10484. "application/json": {
  10485. "schema": {
  10486. "$ref": "#/components/schemas/ConflictError"
  10487. }
  10488. }
  10489. }
  10490. }
  10491. },
  10492. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10493. "summary": "Send message",
  10494. "requestBody": {
  10495. "content": {
  10496. "application/json": {
  10497. "schema": {
  10498. "type": "object",
  10499. "properties": {
  10500. "id": {
  10501. "type": "string",
  10502. "pattern": "^msg_"
  10503. },
  10504. "prompt": {
  10505. "$ref": "#/components/schemas/Prompt"
  10506. },
  10507. "delivery": {
  10508. "type": "string",
  10509. "enum": ["steer", "queue"]
  10510. },
  10511. "resume": {
  10512. "type": "boolean"
  10513. }
  10514. },
  10515. "required": ["prompt"],
  10516. "additionalProperties": false
  10517. }
  10518. }
  10519. },
  10520. "required": true
  10521. },
  10522. "x-codeSamples": [
  10523. {
  10524. "lang": "js",
  10525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10526. }
  10527. ]
  10528. }
  10529. },
  10530. "/api/session/{sessionID}/compact": {
  10531. "post": {
  10532. "tags": ["sessions"],
  10533. "operationId": "v2.session.compact",
  10534. "parameters": [
  10535. {
  10536. "name": "sessionID",
  10537. "in": "path",
  10538. "schema": {
  10539. "type": "string",
  10540. "pattern": "^ses"
  10541. },
  10542. "required": true
  10543. }
  10544. ],
  10545. "security": [],
  10546. "responses": {
  10547. "204": {
  10548. "description": "<No Content>"
  10549. },
  10550. "400": {
  10551. "description": "InvalidRequestError",
  10552. "content": {
  10553. "application/json": {
  10554. "schema": {
  10555. "$ref": "#/components/schemas/InvalidRequestError"
  10556. }
  10557. }
  10558. }
  10559. },
  10560. "401": {
  10561. "description": "UnauthorizedError",
  10562. "content": {
  10563. "application/json": {
  10564. "schema": {
  10565. "$ref": "#/components/schemas/UnauthorizedError"
  10566. }
  10567. }
  10568. }
  10569. },
  10570. "404": {
  10571. "description": "SessionNotFoundError",
  10572. "content": {
  10573. "application/json": {
  10574. "schema": {
  10575. "anyOf": [
  10576. {
  10577. "$ref": "#/components/schemas/SessionNotFoundError"
  10578. },
  10579. {
  10580. "$ref": "#/components/schemas/SessionNotFoundError"
  10581. }
  10582. ]
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "503": {
  10588. "description": "ServiceUnavailableError",
  10589. "content": {
  10590. "application/json": {
  10591. "schema": {
  10592. "$ref": "#/components/schemas/ServiceUnavailableError"
  10593. }
  10594. }
  10595. }
  10596. }
  10597. },
  10598. "description": "Compact a session conversation.",
  10599. "summary": "Compact session",
  10600. "x-codeSamples": [
  10601. {
  10602. "lang": "js",
  10603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10604. }
  10605. ]
  10606. }
  10607. },
  10608. "/api/session/{sessionID}/wait": {
  10609. "post": {
  10610. "tags": ["sessions"],
  10611. "operationId": "v2.session.wait",
  10612. "parameters": [
  10613. {
  10614. "name": "sessionID",
  10615. "in": "path",
  10616. "schema": {
  10617. "type": "string",
  10618. "pattern": "^ses"
  10619. },
  10620. "required": true
  10621. }
  10622. ],
  10623. "security": [],
  10624. "responses": {
  10625. "204": {
  10626. "description": "<No Content>"
  10627. },
  10628. "400": {
  10629. "description": "InvalidRequestError",
  10630. "content": {
  10631. "application/json": {
  10632. "schema": {
  10633. "$ref": "#/components/schemas/InvalidRequestError"
  10634. }
  10635. }
  10636. }
  10637. },
  10638. "401": {
  10639. "description": "UnauthorizedError",
  10640. "content": {
  10641. "application/json": {
  10642. "schema": {
  10643. "$ref": "#/components/schemas/UnauthorizedError"
  10644. }
  10645. }
  10646. }
  10647. },
  10648. "404": {
  10649. "description": "SessionNotFoundError",
  10650. "content": {
  10651. "application/json": {
  10652. "schema": {
  10653. "anyOf": [
  10654. {
  10655. "$ref": "#/components/schemas/SessionNotFoundError"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/SessionNotFoundError"
  10659. }
  10660. ]
  10661. }
  10662. }
  10663. }
  10664. },
  10665. "503": {
  10666. "description": "ServiceUnavailableError",
  10667. "content": {
  10668. "application/json": {
  10669. "schema": {
  10670. "$ref": "#/components/schemas/ServiceUnavailableError"
  10671. }
  10672. }
  10673. }
  10674. }
  10675. },
  10676. "description": "Wait for a session agent loop to become idle.",
  10677. "summary": "Wait for session",
  10678. "x-codeSamples": [
  10679. {
  10680. "lang": "js",
  10681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10682. }
  10683. ]
  10684. }
  10685. },
  10686. "/api/session/{sessionID}/context": {
  10687. "get": {
  10688. "tags": ["sessions"],
  10689. "operationId": "v2.session.context",
  10690. "parameters": [
  10691. {
  10692. "name": "sessionID",
  10693. "in": "path",
  10694. "schema": {
  10695. "type": "string",
  10696. "pattern": "^ses"
  10697. },
  10698. "required": true
  10699. }
  10700. ],
  10701. "security": [],
  10702. "responses": {
  10703. "200": {
  10704. "description": "Success",
  10705. "content": {
  10706. "application/json": {
  10707. "schema": {
  10708. "type": "object",
  10709. "properties": {
  10710. "data": {
  10711. "type": "array",
  10712. "items": {
  10713. "$ref": "#/components/schemas/SessionMessage"
  10714. }
  10715. }
  10716. },
  10717. "required": ["data"],
  10718. "additionalProperties": false
  10719. }
  10720. }
  10721. }
  10722. },
  10723. "400": {
  10724. "description": "InvalidRequestError",
  10725. "content": {
  10726. "application/json": {
  10727. "schema": {
  10728. "$ref": "#/components/schemas/InvalidRequestError"
  10729. }
  10730. }
  10731. }
  10732. },
  10733. "401": {
  10734. "description": "UnauthorizedError",
  10735. "content": {
  10736. "application/json": {
  10737. "schema": {
  10738. "$ref": "#/components/schemas/UnauthorizedError"
  10739. }
  10740. }
  10741. }
  10742. },
  10743. "404": {
  10744. "description": "SessionNotFoundError",
  10745. "content": {
  10746. "application/json": {
  10747. "schema": {
  10748. "anyOf": [
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/SessionNotFoundError"
  10754. }
  10755. ]
  10756. }
  10757. }
  10758. }
  10759. },
  10760. "500": {
  10761. "description": "UnknownError",
  10762. "content": {
  10763. "application/json": {
  10764. "schema": {
  10765. "$ref": "#/components/schemas/UnknownError1"
  10766. }
  10767. }
  10768. }
  10769. }
  10770. },
  10771. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10772. "summary": "Get session context",
  10773. "x-codeSamples": [
  10774. {
  10775. "lang": "js",
  10776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10777. }
  10778. ]
  10779. }
  10780. },
  10781. "/api/session/{sessionID}/message": {
  10782. "get": {
  10783. "tags": ["messages"],
  10784. "operationId": "v2.session.messages",
  10785. "parameters": [
  10786. {
  10787. "name": "sessionID",
  10788. "in": "path",
  10789. "schema": {
  10790. "type": "string",
  10791. "pattern": "^ses"
  10792. },
  10793. "required": true
  10794. },
  10795. {
  10796. "name": "limit",
  10797. "in": "query",
  10798. "schema": {
  10799. "type": "number"
  10800. },
  10801. "required": false
  10802. },
  10803. {
  10804. "name": "order",
  10805. "in": "query",
  10806. "schema": {
  10807. "type": "string",
  10808. "enum": ["asc", "desc"]
  10809. },
  10810. "required": false
  10811. },
  10812. {
  10813. "name": "cursor",
  10814. "in": "query",
  10815. "schema": {
  10816. "type": "string",
  10817. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10818. },
  10819. "required": false
  10820. }
  10821. ],
  10822. "security": [],
  10823. "responses": {
  10824. "200": {
  10825. "description": "SessionMessagesResponse",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/SessionMessagesResponse"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "400": {
  10835. "description": "InvalidCursorError | InvalidRequestError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "anyOf": [
  10840. {
  10841. "$ref": "#/components/schemas/InvalidCursorError"
  10842. },
  10843. {
  10844. "$ref": "#/components/schemas/InvalidRequestError"
  10845. }
  10846. ]
  10847. }
  10848. }
  10849. }
  10850. },
  10851. "401": {
  10852. "description": "UnauthorizedError",
  10853. "content": {
  10854. "application/json": {
  10855. "schema": {
  10856. "$ref": "#/components/schemas/UnauthorizedError"
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "404": {
  10862. "description": "SessionNotFoundError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "anyOf": [
  10867. {
  10868. "$ref": "#/components/schemas/SessionNotFoundError"
  10869. },
  10870. {
  10871. "$ref": "#/components/schemas/SessionNotFoundError"
  10872. }
  10873. ]
  10874. }
  10875. }
  10876. }
  10877. },
  10878. "500": {
  10879. "description": "UnknownError",
  10880. "content": {
  10881. "application/json": {
  10882. "schema": {
  10883. "$ref": "#/components/schemas/UnknownError1"
  10884. }
  10885. }
  10886. }
  10887. }
  10888. },
  10889. "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.",
  10890. "summary": "Get session messages",
  10891. "x-codeSamples": [
  10892. {
  10893. "lang": "js",
  10894. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10895. }
  10896. ]
  10897. }
  10898. },
  10899. "/api/model": {
  10900. "get": {
  10901. "tags": ["models"],
  10902. "operationId": "v2.model.list",
  10903. "parameters": [
  10904. {
  10905. "name": "location",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "object",
  10909. "properties": {
  10910. "directory": {
  10911. "type": "string"
  10912. },
  10913. "workspace": {
  10914. "type": "string"
  10915. }
  10916. },
  10917. "additionalProperties": false
  10918. },
  10919. "required": false,
  10920. "style": "deepObject",
  10921. "explode": true
  10922. }
  10923. ],
  10924. "security": [],
  10925. "responses": {
  10926. "200": {
  10927. "description": "Success",
  10928. "content": {
  10929. "application/json": {
  10930. "schema": {
  10931. "type": "object",
  10932. "properties": {
  10933. "location": {
  10934. "$ref": "#/components/schemas/LocationInfo"
  10935. },
  10936. "data": {
  10937. "type": "array",
  10938. "items": {
  10939. "$ref": "#/components/schemas/ModelV2Info"
  10940. }
  10941. }
  10942. },
  10943. "required": ["location", "data"],
  10944. "additionalProperties": false
  10945. }
  10946. }
  10947. }
  10948. },
  10949. "400": {
  10950. "description": "InvalidRequestError",
  10951. "content": {
  10952. "application/json": {
  10953. "schema": {
  10954. "$ref": "#/components/schemas/InvalidRequestError"
  10955. }
  10956. }
  10957. }
  10958. },
  10959. "401": {
  10960. "description": "UnauthorizedError",
  10961. "content": {
  10962. "application/json": {
  10963. "schema": {
  10964. "$ref": "#/components/schemas/UnauthorizedError"
  10965. }
  10966. }
  10967. }
  10968. },
  10969. "503": {
  10970. "description": "ServiceUnavailableError",
  10971. "content": {
  10972. "application/json": {
  10973. "schema": {
  10974. "$ref": "#/components/schemas/ServiceUnavailableError"
  10975. }
  10976. }
  10977. }
  10978. }
  10979. },
  10980. "description": "Retrieve available models ordered by release date.",
  10981. "summary": "List models",
  10982. "x-codeSamples": [
  10983. {
  10984. "lang": "js",
  10985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10986. }
  10987. ]
  10988. }
  10989. },
  10990. "/api/provider": {
  10991. "get": {
  10992. "tags": ["providers"],
  10993. "operationId": "v2.provider.list",
  10994. "parameters": [
  10995. {
  10996. "name": "location",
  10997. "in": "query",
  10998. "schema": {
  10999. "type": "object",
  11000. "properties": {
  11001. "directory": {
  11002. "type": "string"
  11003. },
  11004. "workspace": {
  11005. "type": "string"
  11006. }
  11007. },
  11008. "additionalProperties": false
  11009. },
  11010. "required": false,
  11011. "style": "deepObject",
  11012. "explode": true
  11013. }
  11014. ],
  11015. "security": [],
  11016. "responses": {
  11017. "200": {
  11018. "description": "Success",
  11019. "content": {
  11020. "application/json": {
  11021. "schema": {
  11022. "type": "object",
  11023. "properties": {
  11024. "location": {
  11025. "$ref": "#/components/schemas/LocationInfo"
  11026. },
  11027. "data": {
  11028. "type": "array",
  11029. "items": {
  11030. "$ref": "#/components/schemas/ProviderV2Info"
  11031. }
  11032. }
  11033. },
  11034. "required": ["location", "data"],
  11035. "additionalProperties": false
  11036. }
  11037. }
  11038. }
  11039. },
  11040. "400": {
  11041. "description": "InvalidRequestError",
  11042. "content": {
  11043. "application/json": {
  11044. "schema": {
  11045. "$ref": "#/components/schemas/InvalidRequestError"
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "401": {
  11051. "description": "UnauthorizedError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/UnauthorizedError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "503": {
  11061. "description": "ServiceUnavailableError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/ServiceUnavailableError"
  11066. }
  11067. }
  11068. }
  11069. }
  11070. },
  11071. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11072. "summary": "List providers",
  11073. "x-codeSamples": [
  11074. {
  11075. "lang": "js",
  11076. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11077. }
  11078. ]
  11079. }
  11080. },
  11081. "/api/provider/{providerID}": {
  11082. "get": {
  11083. "tags": ["providers"],
  11084. "operationId": "v2.provider.get",
  11085. "parameters": [
  11086. {
  11087. "name": "providerID",
  11088. "in": "path",
  11089. "schema": {
  11090. "type": "string"
  11091. },
  11092. "required": true
  11093. },
  11094. {
  11095. "name": "location",
  11096. "in": "query",
  11097. "schema": {
  11098. "type": "object",
  11099. "properties": {
  11100. "directory": {
  11101. "type": "string"
  11102. },
  11103. "workspace": {
  11104. "type": "string"
  11105. }
  11106. },
  11107. "additionalProperties": false
  11108. },
  11109. "required": false,
  11110. "style": "deepObject",
  11111. "explode": true
  11112. }
  11113. ],
  11114. "security": [],
  11115. "responses": {
  11116. "200": {
  11117. "description": "Success",
  11118. "content": {
  11119. "application/json": {
  11120. "schema": {
  11121. "type": "object",
  11122. "properties": {
  11123. "location": {
  11124. "$ref": "#/components/schemas/LocationInfo"
  11125. },
  11126. "data": {
  11127. "$ref": "#/components/schemas/ProviderV2Info"
  11128. }
  11129. },
  11130. "required": ["location", "data"],
  11131. "additionalProperties": false
  11132. }
  11133. }
  11134. }
  11135. },
  11136. "400": {
  11137. "description": "InvalidRequestError",
  11138. "content": {
  11139. "application/json": {
  11140. "schema": {
  11141. "$ref": "#/components/schemas/InvalidRequestError"
  11142. }
  11143. }
  11144. }
  11145. },
  11146. "401": {
  11147. "description": "UnauthorizedError",
  11148. "content": {
  11149. "application/json": {
  11150. "schema": {
  11151. "$ref": "#/components/schemas/UnauthorizedError"
  11152. }
  11153. }
  11154. }
  11155. },
  11156. "404": {
  11157. "description": "ProviderNotFoundError",
  11158. "content": {
  11159. "application/json": {
  11160. "schema": {
  11161. "$ref": "#/components/schemas/ProviderNotFoundError"
  11162. }
  11163. }
  11164. }
  11165. },
  11166. "503": {
  11167. "description": "ServiceUnavailableError",
  11168. "content": {
  11169. "application/json": {
  11170. "schema": {
  11171. "$ref": "#/components/schemas/ServiceUnavailableError"
  11172. }
  11173. }
  11174. }
  11175. }
  11176. },
  11177. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11178. "summary": "Get provider",
  11179. "x-codeSamples": [
  11180. {
  11181. "lang": "js",
  11182. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11183. }
  11184. ]
  11185. }
  11186. },
  11187. "/api/connector": {
  11188. "get": {
  11189. "tags": ["connectors"],
  11190. "operationId": "v2.connector.list",
  11191. "parameters": [
  11192. {
  11193. "name": "location",
  11194. "in": "query",
  11195. "schema": {
  11196. "type": "object",
  11197. "properties": {
  11198. "directory": {
  11199. "type": "string"
  11200. },
  11201. "workspace": {
  11202. "type": "string"
  11203. }
  11204. },
  11205. "additionalProperties": false
  11206. },
  11207. "required": false,
  11208. "style": "deepObject",
  11209. "explode": true
  11210. }
  11211. ],
  11212. "security": [],
  11213. "responses": {
  11214. "200": {
  11215. "description": "Success",
  11216. "content": {
  11217. "application/json": {
  11218. "schema": {
  11219. "type": "object",
  11220. "properties": {
  11221. "location": {
  11222. "$ref": "#/components/schemas/LocationInfo"
  11223. },
  11224. "data": {
  11225. "type": "array",
  11226. "items": {
  11227. "$ref": "#/components/schemas/ConnectorInfo"
  11228. }
  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. },
  11258. "description": "Retrieve available connectors and their authentication methods.",
  11259. "summary": "List connectors",
  11260. "x-codeSamples": [
  11261. {
  11262. "lang": "js",
  11263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.list({\n ...\n})"
  11264. }
  11265. ]
  11266. }
  11267. },
  11268. "/api/connector/{connectorID}": {
  11269. "get": {
  11270. "tags": ["connectors"],
  11271. "operationId": "v2.connector.get",
  11272. "parameters": [
  11273. {
  11274. "name": "connectorID",
  11275. "in": "path",
  11276. "schema": {
  11277. "type": "string"
  11278. },
  11279. "required": true
  11280. },
  11281. {
  11282. "name": "location",
  11283. "in": "query",
  11284. "schema": {
  11285. "type": "object",
  11286. "properties": {
  11287. "directory": {
  11288. "type": "string"
  11289. },
  11290. "workspace": {
  11291. "type": "string"
  11292. }
  11293. },
  11294. "additionalProperties": false
  11295. },
  11296. "required": false,
  11297. "style": "deepObject",
  11298. "explode": true
  11299. }
  11300. ],
  11301. "security": [],
  11302. "responses": {
  11303. "200": {
  11304. "description": "Success",
  11305. "content": {
  11306. "application/json": {
  11307. "schema": {
  11308. "type": "object",
  11309. "properties": {
  11310. "location": {
  11311. "$ref": "#/components/schemas/LocationInfo"
  11312. },
  11313. "data": {
  11314. "$ref": "#/components/schemas/ConnectorInfo"
  11315. }
  11316. },
  11317. "required": ["location", "data"],
  11318. "additionalProperties": false
  11319. }
  11320. }
  11321. }
  11322. },
  11323. "400": {
  11324. "description": "InvalidRequestError",
  11325. "content": {
  11326. "application/json": {
  11327. "schema": {
  11328. "$ref": "#/components/schemas/InvalidRequestError"
  11329. }
  11330. }
  11331. }
  11332. },
  11333. "401": {
  11334. "description": "UnauthorizedError",
  11335. "content": {
  11336. "application/json": {
  11337. "schema": {
  11338. "$ref": "#/components/schemas/UnauthorizedError"
  11339. }
  11340. }
  11341. }
  11342. }
  11343. },
  11344. "description": "Retrieve one connector and its authentication methods.",
  11345. "summary": "Get connector",
  11346. "x-codeSamples": [
  11347. {
  11348. "lang": "js",
  11349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.get({\n ...\n})"
  11350. }
  11351. ]
  11352. }
  11353. },
  11354. "/api/connector/{connectorID}/connect/key": {
  11355. "post": {
  11356. "tags": ["connectors"],
  11357. "operationId": "v2.connector.connect.key",
  11358. "parameters": [
  11359. {
  11360. "name": "connectorID",
  11361. "in": "path",
  11362. "schema": {
  11363. "type": "string"
  11364. },
  11365. "required": true
  11366. },
  11367. {
  11368. "name": "location",
  11369. "in": "query",
  11370. "schema": {
  11371. "type": "object",
  11372. "properties": {
  11373. "directory": {
  11374. "type": "string"
  11375. },
  11376. "workspace": {
  11377. "type": "string"
  11378. }
  11379. },
  11380. "additionalProperties": false
  11381. },
  11382. "required": false,
  11383. "style": "deepObject",
  11384. "explode": true
  11385. }
  11386. ],
  11387. "security": [],
  11388. "responses": {
  11389. "204": {
  11390. "description": "<No Content>"
  11391. },
  11392. "400": {
  11393. "description": "InvalidRequestError",
  11394. "content": {
  11395. "application/json": {
  11396. "schema": {
  11397. "anyOf": [
  11398. {
  11399. "$ref": "#/components/schemas/InvalidRequestError"
  11400. },
  11401. {
  11402. "$ref": "#/components/schemas/InvalidRequestError"
  11403. }
  11404. ]
  11405. }
  11406. }
  11407. }
  11408. },
  11409. "401": {
  11410. "description": "UnauthorizedError",
  11411. "content": {
  11412. "application/json": {
  11413. "schema": {
  11414. "$ref": "#/components/schemas/UnauthorizedError"
  11415. }
  11416. }
  11417. }
  11418. }
  11419. },
  11420. "description": "Run a key authentication method and store the resulting credential.",
  11421. "summary": "Connect with key",
  11422. "requestBody": {
  11423. "content": {
  11424. "application/json": {
  11425. "schema": {
  11426. "type": "object",
  11427. "properties": {
  11428. "methodID": {
  11429. "type": "string"
  11430. },
  11431. "key": {
  11432. "type": "string"
  11433. },
  11434. "inputs": {
  11435. "type": "object",
  11436. "additionalProperties": {
  11437. "type": "string"
  11438. }
  11439. },
  11440. "label": {
  11441. "type": "string"
  11442. }
  11443. },
  11444. "required": ["methodID", "key", "inputs"],
  11445. "additionalProperties": false
  11446. }
  11447. }
  11448. },
  11449. "required": true
  11450. },
  11451. "x-codeSamples": [
  11452. {
  11453. "lang": "js",
  11454. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.key({\n ...\n})"
  11455. }
  11456. ]
  11457. }
  11458. },
  11459. "/api/connector/{connectorID}/connect/oauth": {
  11460. "post": {
  11461. "tags": ["connectors"],
  11462. "operationId": "v2.connector.connect.oauth.begin",
  11463. "parameters": [
  11464. {
  11465. "name": "connectorID",
  11466. "in": "path",
  11467. "schema": {
  11468. "type": "string"
  11469. },
  11470. "required": true
  11471. },
  11472. {
  11473. "name": "location",
  11474. "in": "query",
  11475. "schema": {
  11476. "type": "object",
  11477. "properties": {
  11478. "directory": {
  11479. "type": "string"
  11480. },
  11481. "workspace": {
  11482. "type": "string"
  11483. }
  11484. },
  11485. "additionalProperties": false
  11486. },
  11487. "required": false,
  11488. "style": "deepObject",
  11489. "explode": true
  11490. }
  11491. ],
  11492. "security": [],
  11493. "responses": {
  11494. "200": {
  11495. "description": "Success",
  11496. "content": {
  11497. "application/json": {
  11498. "schema": {
  11499. "type": "object",
  11500. "properties": {
  11501. "location": {
  11502. "$ref": "#/components/schemas/LocationInfo"
  11503. },
  11504. "data": {
  11505. "$ref": "#/components/schemas/ConnectorAttempt"
  11506. }
  11507. },
  11508. "required": ["location", "data"],
  11509. "additionalProperties": false
  11510. }
  11511. }
  11512. }
  11513. },
  11514. "400": {
  11515. "description": "InvalidRequestError",
  11516. "content": {
  11517. "application/json": {
  11518. "schema": {
  11519. "anyOf": [
  11520. {
  11521. "$ref": "#/components/schemas/InvalidRequestError"
  11522. },
  11523. {
  11524. "$ref": "#/components/schemas/InvalidRequestError"
  11525. }
  11526. ]
  11527. }
  11528. }
  11529. }
  11530. },
  11531. "401": {
  11532. "description": "UnauthorizedError",
  11533. "content": {
  11534. "application/json": {
  11535. "schema": {
  11536. "$ref": "#/components/schemas/UnauthorizedError"
  11537. }
  11538. }
  11539. }
  11540. }
  11541. },
  11542. "description": "Start an OAuth attempt and return the authorization details.",
  11543. "summary": "Begin OAuth connection",
  11544. "requestBody": {
  11545. "content": {
  11546. "application/json": {
  11547. "schema": {
  11548. "type": "object",
  11549. "properties": {
  11550. "methodID": {
  11551. "type": "string"
  11552. },
  11553. "inputs": {
  11554. "type": "object",
  11555. "additionalProperties": {
  11556. "type": "string"
  11557. }
  11558. },
  11559. "label": {
  11560. "type": "string"
  11561. }
  11562. },
  11563. "required": ["methodID", "inputs"],
  11564. "additionalProperties": false
  11565. }
  11566. }
  11567. },
  11568. "required": true
  11569. },
  11570. "x-codeSamples": [
  11571. {
  11572. "lang": "js",
  11573. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.begin({\n ...\n})"
  11574. }
  11575. ]
  11576. }
  11577. },
  11578. "/api/connector/oauth/{attemptID}": {
  11579. "get": {
  11580. "tags": ["connectors"],
  11581. "operationId": "v2.connector.connect.oauth.status",
  11582. "parameters": [
  11583. {
  11584. "name": "attemptID",
  11585. "in": "path",
  11586. "schema": {
  11587. "type": "string"
  11588. },
  11589. "required": true
  11590. },
  11591. {
  11592. "name": "location",
  11593. "in": "query",
  11594. "schema": {
  11595. "type": "object",
  11596. "properties": {
  11597. "directory": {
  11598. "type": "string"
  11599. },
  11600. "workspace": {
  11601. "type": "string"
  11602. }
  11603. },
  11604. "additionalProperties": false
  11605. },
  11606. "required": false,
  11607. "style": "deepObject",
  11608. "explode": true
  11609. }
  11610. ],
  11611. "security": [],
  11612. "responses": {
  11613. "200": {
  11614. "description": "Success",
  11615. "content": {
  11616. "application/json": {
  11617. "schema": {
  11618. "type": "object",
  11619. "properties": {
  11620. "location": {
  11621. "$ref": "#/components/schemas/LocationInfo"
  11622. },
  11623. "data": {
  11624. "anyOf": [
  11625. {
  11626. "type": "object",
  11627. "properties": {
  11628. "status": {
  11629. "type": "string",
  11630. "enum": ["pending"]
  11631. },
  11632. "time": {
  11633. "type": "object",
  11634. "properties": {
  11635. "created": {
  11636. "anyOf": [
  11637. {
  11638. "type": "number"
  11639. },
  11640. {
  11641. "type": "string",
  11642. "enum": ["NaN"]
  11643. },
  11644. {
  11645. "type": "string",
  11646. "enum": ["Infinity"]
  11647. },
  11648. {
  11649. "type": "string",
  11650. "enum": ["-Infinity"]
  11651. },
  11652. {
  11653. "type": "string",
  11654. "enum": ["Infinity", "-Infinity", "NaN"]
  11655. }
  11656. ]
  11657. },
  11658. "expires": {
  11659. "anyOf": [
  11660. {
  11661. "type": "number"
  11662. },
  11663. {
  11664. "type": "string",
  11665. "enum": ["NaN"]
  11666. },
  11667. {
  11668. "type": "string",
  11669. "enum": ["Infinity"]
  11670. },
  11671. {
  11672. "type": "string",
  11673. "enum": ["-Infinity"]
  11674. },
  11675. {
  11676. "type": "string",
  11677. "enum": ["Infinity", "-Infinity", "NaN"]
  11678. }
  11679. ]
  11680. }
  11681. },
  11682. "required": ["created", "expires"],
  11683. "additionalProperties": false
  11684. }
  11685. },
  11686. "required": ["status", "time"],
  11687. "additionalProperties": false
  11688. },
  11689. {
  11690. "type": "object",
  11691. "properties": {
  11692. "status": {
  11693. "type": "string",
  11694. "enum": ["complete"]
  11695. },
  11696. "time": {
  11697. "type": "object",
  11698. "properties": {
  11699. "created": {
  11700. "anyOf": [
  11701. {
  11702. "type": "number"
  11703. },
  11704. {
  11705. "type": "string",
  11706. "enum": ["NaN"]
  11707. },
  11708. {
  11709. "type": "string",
  11710. "enum": ["Infinity"]
  11711. },
  11712. {
  11713. "type": "string",
  11714. "enum": ["-Infinity"]
  11715. },
  11716. {
  11717. "type": "string",
  11718. "enum": ["Infinity", "-Infinity", "NaN"]
  11719. }
  11720. ]
  11721. },
  11722. "expires": {
  11723. "anyOf": [
  11724. {
  11725. "type": "number"
  11726. },
  11727. {
  11728. "type": "string",
  11729. "enum": ["NaN"]
  11730. },
  11731. {
  11732. "type": "string",
  11733. "enum": ["Infinity"]
  11734. },
  11735. {
  11736. "type": "string",
  11737. "enum": ["-Infinity"]
  11738. },
  11739. {
  11740. "type": "string",
  11741. "enum": ["Infinity", "-Infinity", "NaN"]
  11742. }
  11743. ]
  11744. }
  11745. },
  11746. "required": ["created", "expires"],
  11747. "additionalProperties": false
  11748. }
  11749. },
  11750. "required": ["status", "time"],
  11751. "additionalProperties": false
  11752. },
  11753. {
  11754. "type": "object",
  11755. "properties": {
  11756. "status": {
  11757. "type": "string",
  11758. "enum": ["failed"]
  11759. },
  11760. "message": {
  11761. "type": "string"
  11762. },
  11763. "time": {
  11764. "type": "object",
  11765. "properties": {
  11766. "created": {
  11767. "anyOf": [
  11768. {
  11769. "type": "number"
  11770. },
  11771. {
  11772. "type": "string",
  11773. "enum": ["NaN"]
  11774. },
  11775. {
  11776. "type": "string",
  11777. "enum": ["Infinity"]
  11778. },
  11779. {
  11780. "type": "string",
  11781. "enum": ["-Infinity"]
  11782. },
  11783. {
  11784. "type": "string",
  11785. "enum": ["Infinity", "-Infinity", "NaN"]
  11786. }
  11787. ]
  11788. },
  11789. "expires": {
  11790. "anyOf": [
  11791. {
  11792. "type": "number"
  11793. },
  11794. {
  11795. "type": "string",
  11796. "enum": ["NaN"]
  11797. },
  11798. {
  11799. "type": "string",
  11800. "enum": ["Infinity"]
  11801. },
  11802. {
  11803. "type": "string",
  11804. "enum": ["-Infinity"]
  11805. },
  11806. {
  11807. "type": "string",
  11808. "enum": ["Infinity", "-Infinity", "NaN"]
  11809. }
  11810. ]
  11811. }
  11812. },
  11813. "required": ["created", "expires"],
  11814. "additionalProperties": false
  11815. }
  11816. },
  11817. "required": ["status", "message", "time"],
  11818. "additionalProperties": false
  11819. },
  11820. {
  11821. "type": "object",
  11822. "properties": {
  11823. "status": {
  11824. "type": "string",
  11825. "enum": ["expired"]
  11826. },
  11827. "time": {
  11828. "type": "object",
  11829. "properties": {
  11830. "created": {
  11831. "anyOf": [
  11832. {
  11833. "type": "number"
  11834. },
  11835. {
  11836. "type": "string",
  11837. "enum": ["NaN"]
  11838. },
  11839. {
  11840. "type": "string",
  11841. "enum": ["Infinity"]
  11842. },
  11843. {
  11844. "type": "string",
  11845. "enum": ["-Infinity"]
  11846. },
  11847. {
  11848. "type": "string",
  11849. "enum": ["Infinity", "-Infinity", "NaN"]
  11850. }
  11851. ]
  11852. },
  11853. "expires": {
  11854. "anyOf": [
  11855. {
  11856. "type": "number"
  11857. },
  11858. {
  11859. "type": "string",
  11860. "enum": ["NaN"]
  11861. },
  11862. {
  11863. "type": "string",
  11864. "enum": ["Infinity"]
  11865. },
  11866. {
  11867. "type": "string",
  11868. "enum": ["-Infinity"]
  11869. },
  11870. {
  11871. "type": "string",
  11872. "enum": ["Infinity", "-Infinity", "NaN"]
  11873. }
  11874. ]
  11875. }
  11876. },
  11877. "required": ["created", "expires"],
  11878. "additionalProperties": false
  11879. }
  11880. },
  11881. "required": ["status", "time"],
  11882. "additionalProperties": false
  11883. }
  11884. ]
  11885. }
  11886. },
  11887. "required": ["location", "data"],
  11888. "additionalProperties": false
  11889. }
  11890. }
  11891. }
  11892. },
  11893. "400": {
  11894. "description": "InvalidRequestError",
  11895. "content": {
  11896. "application/json": {
  11897. "schema": {
  11898. "$ref": "#/components/schemas/InvalidRequestError"
  11899. }
  11900. }
  11901. }
  11902. },
  11903. "401": {
  11904. "description": "UnauthorizedError",
  11905. "content": {
  11906. "application/json": {
  11907. "schema": {
  11908. "$ref": "#/components/schemas/UnauthorizedError"
  11909. }
  11910. }
  11911. }
  11912. }
  11913. },
  11914. "description": "Poll the current status of an OAuth attempt.",
  11915. "summary": "Get OAuth attempt status",
  11916. "x-codeSamples": [
  11917. {
  11918. "lang": "js",
  11919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.status({\n ...\n})"
  11920. }
  11921. ]
  11922. },
  11923. "delete": {
  11924. "tags": ["connectors"],
  11925. "operationId": "v2.connector.connect.oauth.cancel",
  11926. "parameters": [
  11927. {
  11928. "name": "attemptID",
  11929. "in": "path",
  11930. "schema": {
  11931. "type": "string"
  11932. },
  11933. "required": true
  11934. },
  11935. {
  11936. "name": "location",
  11937. "in": "query",
  11938. "schema": {
  11939. "type": "object",
  11940. "properties": {
  11941. "directory": {
  11942. "type": "string"
  11943. },
  11944. "workspace": {
  11945. "type": "string"
  11946. }
  11947. },
  11948. "additionalProperties": false
  11949. },
  11950. "required": false,
  11951. "style": "deepObject",
  11952. "explode": true
  11953. }
  11954. ],
  11955. "security": [],
  11956. "responses": {
  11957. "204": {
  11958. "description": "<No Content>"
  11959. },
  11960. "400": {
  11961. "description": "InvalidRequestError",
  11962. "content": {
  11963. "application/json": {
  11964. "schema": {
  11965. "$ref": "#/components/schemas/InvalidRequestError"
  11966. }
  11967. }
  11968. }
  11969. },
  11970. "401": {
  11971. "description": "UnauthorizedError",
  11972. "content": {
  11973. "application/json": {
  11974. "schema": {
  11975. "$ref": "#/components/schemas/UnauthorizedError"
  11976. }
  11977. }
  11978. }
  11979. }
  11980. },
  11981. "description": "Cancel an OAuth attempt and release its resources.",
  11982. "summary": "Cancel OAuth connection",
  11983. "x-codeSamples": [
  11984. {
  11985. "lang": "js",
  11986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.cancel({\n ...\n})"
  11987. }
  11988. ]
  11989. }
  11990. },
  11991. "/api/connector/oauth/{attemptID}/complete": {
  11992. "post": {
  11993. "tags": ["connectors"],
  11994. "operationId": "v2.connector.connect.oauth.complete",
  11995. "parameters": [
  11996. {
  11997. "name": "attemptID",
  11998. "in": "path",
  11999. "schema": {
  12000. "type": "string"
  12001. },
  12002. "required": true
  12003. },
  12004. {
  12005. "name": "location",
  12006. "in": "query",
  12007. "schema": {
  12008. "type": "object",
  12009. "properties": {
  12010. "directory": {
  12011. "type": "string"
  12012. },
  12013. "workspace": {
  12014. "type": "string"
  12015. }
  12016. },
  12017. "additionalProperties": false
  12018. },
  12019. "required": false,
  12020. "style": "deepObject",
  12021. "explode": true
  12022. }
  12023. ],
  12024. "security": [],
  12025. "responses": {
  12026. "204": {
  12027. "description": "<No Content>"
  12028. },
  12029. "400": {
  12030. "description": "InvalidRequestError",
  12031. "content": {
  12032. "application/json": {
  12033. "schema": {
  12034. "anyOf": [
  12035. {
  12036. "$ref": "#/components/schemas/InvalidRequestError"
  12037. },
  12038. {
  12039. "$ref": "#/components/schemas/InvalidRequestError"
  12040. }
  12041. ]
  12042. }
  12043. }
  12044. }
  12045. },
  12046. "401": {
  12047. "description": "UnauthorizedError",
  12048. "content": {
  12049. "application/json": {
  12050. "schema": {
  12051. "$ref": "#/components/schemas/UnauthorizedError"
  12052. }
  12053. }
  12054. }
  12055. }
  12056. },
  12057. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12058. "summary": "Complete OAuth connection",
  12059. "requestBody": {
  12060. "content": {
  12061. "application/json": {
  12062. "schema": {
  12063. "type": "object",
  12064. "properties": {
  12065. "code": {
  12066. "type": "string"
  12067. }
  12068. },
  12069. "additionalProperties": false
  12070. }
  12071. }
  12072. },
  12073. "required": true
  12074. },
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.complete({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/permission/request": {
  12084. "get": {
  12085. "tags": ["permissions"],
  12086. "operationId": "v2.permission.request.list",
  12087. "parameters": [
  12088. {
  12089. "name": "location",
  12090. "in": "query",
  12091. "schema": {
  12092. "type": "object",
  12093. "properties": {
  12094. "directory": {
  12095. "type": "string"
  12096. },
  12097. "workspace": {
  12098. "type": "string"
  12099. }
  12100. },
  12101. "additionalProperties": false
  12102. },
  12103. "required": false,
  12104. "style": "deepObject",
  12105. "explode": true
  12106. }
  12107. ],
  12108. "security": [],
  12109. "responses": {
  12110. "200": {
  12111. "description": "Success",
  12112. "content": {
  12113. "application/json": {
  12114. "schema": {
  12115. "type": "object",
  12116. "properties": {
  12117. "location": {
  12118. "$ref": "#/components/schemas/LocationInfo"
  12119. },
  12120. "data": {
  12121. "type": "array",
  12122. "items": {
  12123. "$ref": "#/components/schemas/PermissionV2Request"
  12124. }
  12125. }
  12126. },
  12127. "required": ["location", "data"],
  12128. "additionalProperties": false
  12129. }
  12130. }
  12131. }
  12132. },
  12133. "400": {
  12134. "description": "InvalidRequestError",
  12135. "content": {
  12136. "application/json": {
  12137. "schema": {
  12138. "$ref": "#/components/schemas/InvalidRequestError"
  12139. }
  12140. }
  12141. }
  12142. },
  12143. "401": {
  12144. "description": "UnauthorizedError",
  12145. "content": {
  12146. "application/json": {
  12147. "schema": {
  12148. "$ref": "#/components/schemas/UnauthorizedError"
  12149. }
  12150. }
  12151. }
  12152. }
  12153. },
  12154. "description": "Retrieve pending permission requests for a location.",
  12155. "summary": "List pending permission requests",
  12156. "x-codeSamples": [
  12157. {
  12158. "lang": "js",
  12159. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12160. }
  12161. ]
  12162. }
  12163. },
  12164. "/api/permission/saved": {
  12165. "get": {
  12166. "tags": ["permissions"],
  12167. "operationId": "v2.permission.saved.list",
  12168. "parameters": [
  12169. {
  12170. "name": "projectID",
  12171. "in": "query",
  12172. "schema": {
  12173. "type": "string"
  12174. },
  12175. "required": false
  12176. }
  12177. ],
  12178. "security": [],
  12179. "responses": {
  12180. "200": {
  12181. "description": "Success",
  12182. "content": {
  12183. "application/json": {
  12184. "schema": {
  12185. "type": "object",
  12186. "properties": {
  12187. "data": {
  12188. "type": "array",
  12189. "items": {
  12190. "$ref": "#/components/schemas/PermissionSavedInfo"
  12191. }
  12192. }
  12193. },
  12194. "required": ["data"],
  12195. "additionalProperties": false
  12196. }
  12197. }
  12198. }
  12199. },
  12200. "400": {
  12201. "description": "InvalidRequestError",
  12202. "content": {
  12203. "application/json": {
  12204. "schema": {
  12205. "$ref": "#/components/schemas/InvalidRequestError"
  12206. }
  12207. }
  12208. }
  12209. },
  12210. "401": {
  12211. "description": "UnauthorizedError",
  12212. "content": {
  12213. "application/json": {
  12214. "schema": {
  12215. "$ref": "#/components/schemas/UnauthorizedError"
  12216. }
  12217. }
  12218. }
  12219. }
  12220. },
  12221. "description": "Retrieve saved permissions, optionally filtered by project.",
  12222. "summary": "List saved permissions",
  12223. "x-codeSamples": [
  12224. {
  12225. "lang": "js",
  12226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12227. }
  12228. ]
  12229. }
  12230. },
  12231. "/api/permission/saved/{id}": {
  12232. "delete": {
  12233. "tags": ["permissions"],
  12234. "operationId": "v2.permission.saved.remove",
  12235. "parameters": [
  12236. {
  12237. "name": "id",
  12238. "in": "path",
  12239. "schema": {
  12240. "type": "string"
  12241. },
  12242. "required": true
  12243. }
  12244. ],
  12245. "security": [],
  12246. "responses": {
  12247. "204": {
  12248. "description": "<No Content>"
  12249. },
  12250. "400": {
  12251. "description": "InvalidRequestError",
  12252. "content": {
  12253. "application/json": {
  12254. "schema": {
  12255. "$ref": "#/components/schemas/InvalidRequestError"
  12256. }
  12257. }
  12258. }
  12259. },
  12260. "401": {
  12261. "description": "UnauthorizedError",
  12262. "content": {
  12263. "application/json": {
  12264. "schema": {
  12265. "$ref": "#/components/schemas/UnauthorizedError"
  12266. }
  12267. }
  12268. }
  12269. }
  12270. },
  12271. "description": "Remove a saved permission by ID.",
  12272. "summary": "Remove saved permission",
  12273. "x-codeSamples": [
  12274. {
  12275. "lang": "js",
  12276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12277. }
  12278. ]
  12279. }
  12280. },
  12281. "/api/session/{sessionID}/permission": {
  12282. "get": {
  12283. "tags": ["permissions"],
  12284. "operationId": "v2.session.permission.list",
  12285. "parameters": [
  12286. {
  12287. "name": "sessionID",
  12288. "in": "path",
  12289. "schema": {
  12290. "type": "string",
  12291. "pattern": "^ses"
  12292. },
  12293. "required": true
  12294. }
  12295. ],
  12296. "security": [],
  12297. "responses": {
  12298. "200": {
  12299. "description": "Success",
  12300. "content": {
  12301. "application/json": {
  12302. "schema": {
  12303. "type": "object",
  12304. "properties": {
  12305. "data": {
  12306. "type": "array",
  12307. "items": {
  12308. "$ref": "#/components/schemas/PermissionV2Request"
  12309. }
  12310. }
  12311. },
  12312. "required": ["data"],
  12313. "additionalProperties": false
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "400": {
  12319. "description": "InvalidRequestError",
  12320. "content": {
  12321. "application/json": {
  12322. "schema": {
  12323. "$ref": "#/components/schemas/InvalidRequestError"
  12324. }
  12325. }
  12326. }
  12327. },
  12328. "401": {
  12329. "description": "UnauthorizedError",
  12330. "content": {
  12331. "application/json": {
  12332. "schema": {
  12333. "$ref": "#/components/schemas/UnauthorizedError"
  12334. }
  12335. }
  12336. }
  12337. },
  12338. "404": {
  12339. "description": "SessionNotFoundError",
  12340. "content": {
  12341. "application/json": {
  12342. "schema": {
  12343. "anyOf": [
  12344. {
  12345. "$ref": "#/components/schemas/SessionNotFoundError"
  12346. },
  12347. {
  12348. "$ref": "#/components/schemas/SessionNotFoundError"
  12349. }
  12350. ]
  12351. }
  12352. }
  12353. }
  12354. }
  12355. },
  12356. "description": "Retrieve pending permission requests owned by a session.",
  12357. "summary": "List session permission requests",
  12358. "x-codeSamples": [
  12359. {
  12360. "lang": "js",
  12361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12362. }
  12363. ]
  12364. }
  12365. },
  12366. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12367. "post": {
  12368. "tags": ["permissions"],
  12369. "operationId": "v2.session.permission.reply",
  12370. "parameters": [
  12371. {
  12372. "name": "sessionID",
  12373. "in": "path",
  12374. "schema": {
  12375. "type": "string",
  12376. "pattern": "^ses"
  12377. },
  12378. "required": true
  12379. },
  12380. {
  12381. "name": "requestID",
  12382. "in": "path",
  12383. "schema": {
  12384. "type": "string",
  12385. "pattern": "^per"
  12386. },
  12387. "required": true
  12388. }
  12389. ],
  12390. "security": [],
  12391. "responses": {
  12392. "204": {
  12393. "description": "<No Content>"
  12394. },
  12395. "400": {
  12396. "description": "InvalidRequestError",
  12397. "content": {
  12398. "application/json": {
  12399. "schema": {
  12400. "$ref": "#/components/schemas/InvalidRequestError"
  12401. }
  12402. }
  12403. }
  12404. },
  12405. "401": {
  12406. "description": "UnauthorizedError",
  12407. "content": {
  12408. "application/json": {
  12409. "schema": {
  12410. "$ref": "#/components/schemas/UnauthorizedError"
  12411. }
  12412. }
  12413. }
  12414. },
  12415. "404": {
  12416. "description": "SessionNotFoundError | PermissionNotFoundError",
  12417. "content": {
  12418. "application/json": {
  12419. "schema": {
  12420. "anyOf": [
  12421. {
  12422. "$ref": "#/components/schemas/PermissionNotFoundError"
  12423. },
  12424. {
  12425. "$ref": "#/components/schemas/SessionNotFoundError"
  12426. },
  12427. {
  12428. "$ref": "#/components/schemas/SessionNotFoundError"
  12429. }
  12430. ]
  12431. }
  12432. }
  12433. }
  12434. }
  12435. },
  12436. "description": "Respond to a pending permission request owned by a session.",
  12437. "summary": "Reply to pending permission request",
  12438. "requestBody": {
  12439. "content": {
  12440. "application/json": {
  12441. "schema": {
  12442. "type": "object",
  12443. "properties": {
  12444. "reply": {
  12445. "$ref": "#/components/schemas/PermissionV2Reply"
  12446. },
  12447. "message": {
  12448. "type": "string"
  12449. }
  12450. },
  12451. "required": ["reply"],
  12452. "additionalProperties": false
  12453. }
  12454. }
  12455. },
  12456. "required": true
  12457. },
  12458. "x-codeSamples": [
  12459. {
  12460. "lang": "js",
  12461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12462. }
  12463. ]
  12464. }
  12465. },
  12466. "/api/fs/read/*": {
  12467. "get": {
  12468. "tags": ["filesystem"],
  12469. "operationId": "v2.fs.read",
  12470. "parameters": [
  12471. {
  12472. "name": "location",
  12473. "in": "query",
  12474. "schema": {
  12475. "type": "object",
  12476. "properties": {
  12477. "directory": {
  12478. "type": "string"
  12479. },
  12480. "workspace": {
  12481. "type": "string"
  12482. }
  12483. },
  12484. "additionalProperties": false
  12485. },
  12486. "required": false,
  12487. "style": "deepObject",
  12488. "explode": true
  12489. }
  12490. ],
  12491. "security": [],
  12492. "responses": {
  12493. "200": {
  12494. "description": "Success",
  12495. "content": {
  12496. "application/octet-stream": {
  12497. "schema": {
  12498. "type": "string",
  12499. "format": "binary"
  12500. }
  12501. }
  12502. }
  12503. },
  12504. "400": {
  12505. "description": "InvalidRequestError",
  12506. "content": {
  12507. "application/json": {
  12508. "schema": {
  12509. "$ref": "#/components/schemas/InvalidRequestError"
  12510. }
  12511. }
  12512. }
  12513. },
  12514. "401": {
  12515. "description": "UnauthorizedError",
  12516. "content": {
  12517. "application/json": {
  12518. "schema": {
  12519. "$ref": "#/components/schemas/UnauthorizedError"
  12520. }
  12521. }
  12522. }
  12523. }
  12524. },
  12525. "description": "Serve one file relative to the requested location.",
  12526. "summary": "Read file",
  12527. "x-codeSamples": [
  12528. {
  12529. "lang": "js",
  12530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12531. }
  12532. ]
  12533. }
  12534. },
  12535. "/api/fs/list": {
  12536. "get": {
  12537. "tags": ["filesystem"],
  12538. "operationId": "v2.fs.list",
  12539. "parameters": [
  12540. {
  12541. "name": "location",
  12542. "in": "query",
  12543. "schema": {
  12544. "type": "object",
  12545. "properties": {
  12546. "directory": {
  12547. "type": "string"
  12548. },
  12549. "workspace": {
  12550. "type": "string"
  12551. }
  12552. },
  12553. "additionalProperties": false
  12554. },
  12555. "required": false,
  12556. "style": "deepObject",
  12557. "explode": true
  12558. },
  12559. {
  12560. "name": "path",
  12561. "in": "query",
  12562. "schema": {
  12563. "type": "string"
  12564. },
  12565. "required": false
  12566. }
  12567. ],
  12568. "security": [],
  12569. "responses": {
  12570. "200": {
  12571. "description": "Success",
  12572. "content": {
  12573. "application/json": {
  12574. "schema": {
  12575. "type": "object",
  12576. "properties": {
  12577. "location": {
  12578. "$ref": "#/components/schemas/LocationInfo"
  12579. },
  12580. "data": {
  12581. "type": "array",
  12582. "items": {
  12583. "$ref": "#/components/schemas/FileSystemEntry"
  12584. }
  12585. }
  12586. },
  12587. "required": ["location", "data"],
  12588. "additionalProperties": false
  12589. }
  12590. }
  12591. }
  12592. },
  12593. "400": {
  12594. "description": "InvalidRequestError",
  12595. "content": {
  12596. "application/json": {
  12597. "schema": {
  12598. "$ref": "#/components/schemas/InvalidRequestError"
  12599. }
  12600. }
  12601. }
  12602. },
  12603. "401": {
  12604. "description": "UnauthorizedError",
  12605. "content": {
  12606. "application/json": {
  12607. "schema": {
  12608. "$ref": "#/components/schemas/UnauthorizedError"
  12609. }
  12610. }
  12611. }
  12612. }
  12613. },
  12614. "description": "List direct children of one directory relative to the requested location.",
  12615. "summary": "List directory",
  12616. "x-codeSamples": [
  12617. {
  12618. "lang": "js",
  12619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12620. }
  12621. ]
  12622. }
  12623. },
  12624. "/api/fs/find": {
  12625. "get": {
  12626. "tags": ["filesystem"],
  12627. "operationId": "v2.fs.find",
  12628. "parameters": [
  12629. {
  12630. "name": "location",
  12631. "in": "query",
  12632. "schema": {
  12633. "type": "object",
  12634. "properties": {
  12635. "directory": {
  12636. "type": "string"
  12637. },
  12638. "workspace": {
  12639. "type": "string"
  12640. }
  12641. },
  12642. "additionalProperties": false
  12643. },
  12644. "required": false,
  12645. "style": "deepObject",
  12646. "explode": true
  12647. },
  12648. {
  12649. "name": "query",
  12650. "in": "query",
  12651. "schema": {
  12652. "type": "string"
  12653. },
  12654. "required": true
  12655. },
  12656. {
  12657. "name": "type",
  12658. "in": "query",
  12659. "schema": {
  12660. "type": "string",
  12661. "enum": ["file", "directory"]
  12662. },
  12663. "required": false
  12664. },
  12665. {
  12666. "name": "limit",
  12667. "in": "query",
  12668. "schema": {
  12669. "type": "string"
  12670. },
  12671. "required": false
  12672. }
  12673. ],
  12674. "security": [],
  12675. "responses": {
  12676. "200": {
  12677. "description": "Success",
  12678. "content": {
  12679. "application/json": {
  12680. "schema": {
  12681. "type": "object",
  12682. "properties": {
  12683. "location": {
  12684. "$ref": "#/components/schemas/LocationInfo"
  12685. },
  12686. "data": {
  12687. "type": "array",
  12688. "items": {
  12689. "$ref": "#/components/schemas/FileSystemEntry"
  12690. }
  12691. }
  12692. },
  12693. "required": ["location", "data"],
  12694. "additionalProperties": false
  12695. }
  12696. }
  12697. }
  12698. },
  12699. "400": {
  12700. "description": "InvalidRequestError",
  12701. "content": {
  12702. "application/json": {
  12703. "schema": {
  12704. "$ref": "#/components/schemas/InvalidRequestError"
  12705. }
  12706. }
  12707. }
  12708. },
  12709. "401": {
  12710. "description": "UnauthorizedError",
  12711. "content": {
  12712. "application/json": {
  12713. "schema": {
  12714. "$ref": "#/components/schemas/UnauthorizedError"
  12715. }
  12716. }
  12717. }
  12718. }
  12719. },
  12720. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12721. "summary": "Find files",
  12722. "x-codeSamples": [
  12723. {
  12724. "lang": "js",
  12725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12726. }
  12727. ]
  12728. }
  12729. },
  12730. "/api/command": {
  12731. "get": {
  12732. "tags": ["commands"],
  12733. "operationId": "v2.command.list",
  12734. "parameters": [
  12735. {
  12736. "name": "location",
  12737. "in": "query",
  12738. "schema": {
  12739. "type": "object",
  12740. "properties": {
  12741. "directory": {
  12742. "type": "string"
  12743. },
  12744. "workspace": {
  12745. "type": "string"
  12746. }
  12747. },
  12748. "additionalProperties": false
  12749. },
  12750. "required": false,
  12751. "style": "deepObject",
  12752. "explode": true
  12753. }
  12754. ],
  12755. "security": [],
  12756. "responses": {
  12757. "200": {
  12758. "description": "Success",
  12759. "content": {
  12760. "application/json": {
  12761. "schema": {
  12762. "type": "object",
  12763. "properties": {
  12764. "location": {
  12765. "$ref": "#/components/schemas/LocationInfo"
  12766. },
  12767. "data": {
  12768. "type": "array",
  12769. "items": {
  12770. "$ref": "#/components/schemas/CommandV2Info"
  12771. }
  12772. }
  12773. },
  12774. "required": ["location", "data"],
  12775. "additionalProperties": false
  12776. }
  12777. }
  12778. }
  12779. },
  12780. "400": {
  12781. "description": "InvalidRequestError",
  12782. "content": {
  12783. "application/json": {
  12784. "schema": {
  12785. "$ref": "#/components/schemas/InvalidRequestError"
  12786. }
  12787. }
  12788. }
  12789. },
  12790. "401": {
  12791. "description": "UnauthorizedError",
  12792. "content": {
  12793. "application/json": {
  12794. "schema": {
  12795. "$ref": "#/components/schemas/UnauthorizedError"
  12796. }
  12797. }
  12798. }
  12799. }
  12800. },
  12801. "description": "Retrieve currently registered commands.",
  12802. "summary": "List commands",
  12803. "x-codeSamples": [
  12804. {
  12805. "lang": "js",
  12806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  12807. }
  12808. ]
  12809. }
  12810. },
  12811. "/api/skill": {
  12812. "get": {
  12813. "tags": ["skills"],
  12814. "operationId": "v2.skill.list",
  12815. "parameters": [
  12816. {
  12817. "name": "location",
  12818. "in": "query",
  12819. "schema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "directory": {
  12823. "type": "string"
  12824. },
  12825. "workspace": {
  12826. "type": "string"
  12827. }
  12828. },
  12829. "additionalProperties": false
  12830. },
  12831. "required": false,
  12832. "style": "deepObject",
  12833. "explode": true
  12834. }
  12835. ],
  12836. "security": [],
  12837. "responses": {
  12838. "200": {
  12839. "description": "Success",
  12840. "content": {
  12841. "application/json": {
  12842. "schema": {
  12843. "type": "object",
  12844. "properties": {
  12845. "location": {
  12846. "$ref": "#/components/schemas/LocationInfo"
  12847. },
  12848. "data": {
  12849. "type": "array",
  12850. "items": {
  12851. "$ref": "#/components/schemas/SkillV2Info"
  12852. }
  12853. }
  12854. },
  12855. "required": ["location", "data"],
  12856. "additionalProperties": false
  12857. }
  12858. }
  12859. }
  12860. },
  12861. "400": {
  12862. "description": "InvalidRequestError",
  12863. "content": {
  12864. "application/json": {
  12865. "schema": {
  12866. "$ref": "#/components/schemas/InvalidRequestError"
  12867. }
  12868. }
  12869. }
  12870. },
  12871. "401": {
  12872. "description": "UnauthorizedError",
  12873. "content": {
  12874. "application/json": {
  12875. "schema": {
  12876. "$ref": "#/components/schemas/UnauthorizedError"
  12877. }
  12878. }
  12879. }
  12880. }
  12881. },
  12882. "description": "Retrieve currently registered skills.",
  12883. "summary": "List skills",
  12884. "x-codeSamples": [
  12885. {
  12886. "lang": "js",
  12887. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12888. }
  12889. ]
  12890. }
  12891. },
  12892. "/api/event": {
  12893. "get": {
  12894. "tags": ["events"],
  12895. "operationId": "v2.event.subscribe",
  12896. "parameters": [
  12897. {
  12898. "name": "location",
  12899. "in": "query",
  12900. "schema": {
  12901. "type": "object",
  12902. "properties": {
  12903. "directory": {
  12904. "type": "string"
  12905. },
  12906. "workspace": {
  12907. "type": "string"
  12908. }
  12909. },
  12910. "additionalProperties": false
  12911. },
  12912. "required": false,
  12913. "style": "deepObject",
  12914. "explode": true
  12915. }
  12916. ],
  12917. "security": [],
  12918. "responses": {
  12919. "200": {
  12920. "description": "Success",
  12921. "content": {
  12922. "text/event-stream": {
  12923. "schema": {
  12924. "type": "string"
  12925. }
  12926. }
  12927. }
  12928. },
  12929. "400": {
  12930. "description": "InvalidRequestError",
  12931. "content": {
  12932. "application/json": {
  12933. "schema": {
  12934. "$ref": "#/components/schemas/InvalidRequestError"
  12935. }
  12936. }
  12937. }
  12938. },
  12939. "401": {
  12940. "description": "UnauthorizedError",
  12941. "content": {
  12942. "application/json": {
  12943. "schema": {
  12944. "$ref": "#/components/schemas/UnauthorizedError"
  12945. }
  12946. }
  12947. }
  12948. }
  12949. },
  12950. "description": "Subscribe to native event payloads for a location.",
  12951. "summary": "Subscribe to events",
  12952. "x-codeSamples": [
  12953. {
  12954. "lang": "js",
  12955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  12956. }
  12957. ]
  12958. }
  12959. },
  12960. "/api/question/request": {
  12961. "get": {
  12962. "tags": ["session questions"],
  12963. "operationId": "v2.question.request.list",
  12964. "parameters": [
  12965. {
  12966. "name": "location",
  12967. "in": "query",
  12968. "schema": {
  12969. "type": "object",
  12970. "properties": {
  12971. "directory": {
  12972. "type": "string"
  12973. },
  12974. "workspace": {
  12975. "type": "string"
  12976. }
  12977. },
  12978. "additionalProperties": false
  12979. },
  12980. "required": false,
  12981. "style": "deepObject",
  12982. "explode": true
  12983. }
  12984. ],
  12985. "security": [],
  12986. "responses": {
  12987. "200": {
  12988. "description": "Success",
  12989. "content": {
  12990. "application/json": {
  12991. "schema": {
  12992. "type": "object",
  12993. "properties": {
  12994. "location": {
  12995. "$ref": "#/components/schemas/LocationInfo"
  12996. },
  12997. "data": {
  12998. "type": "array",
  12999. "items": {
  13000. "$ref": "#/components/schemas/QuestionV2Request"
  13001. }
  13002. }
  13003. },
  13004. "required": ["location", "data"],
  13005. "additionalProperties": false
  13006. }
  13007. }
  13008. }
  13009. },
  13010. "400": {
  13011. "description": "InvalidRequestError",
  13012. "content": {
  13013. "application/json": {
  13014. "schema": {
  13015. "$ref": "#/components/schemas/InvalidRequestError"
  13016. }
  13017. }
  13018. }
  13019. },
  13020. "401": {
  13021. "description": "UnauthorizedError",
  13022. "content": {
  13023. "application/json": {
  13024. "schema": {
  13025. "$ref": "#/components/schemas/UnauthorizedError"
  13026. }
  13027. }
  13028. }
  13029. }
  13030. },
  13031. "description": "Retrieve pending question requests for a location.",
  13032. "summary": "List pending question requests",
  13033. "x-codeSamples": [
  13034. {
  13035. "lang": "js",
  13036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13037. }
  13038. ]
  13039. }
  13040. },
  13041. "/api/session/{sessionID}/question": {
  13042. "get": {
  13043. "tags": ["session questions"],
  13044. "operationId": "v2.session.question.list",
  13045. "parameters": [
  13046. {
  13047. "name": "sessionID",
  13048. "in": "path",
  13049. "schema": {
  13050. "type": "string",
  13051. "pattern": "^ses"
  13052. },
  13053. "required": true
  13054. }
  13055. ],
  13056. "security": [],
  13057. "responses": {
  13058. "200": {
  13059. "description": "Success",
  13060. "content": {
  13061. "application/json": {
  13062. "schema": {
  13063. "type": "object",
  13064. "properties": {
  13065. "data": {
  13066. "type": "array",
  13067. "items": {
  13068. "$ref": "#/components/schemas/QuestionV2Request"
  13069. }
  13070. }
  13071. },
  13072. "required": ["data"],
  13073. "additionalProperties": false
  13074. }
  13075. }
  13076. }
  13077. },
  13078. "400": {
  13079. "description": "InvalidRequestError",
  13080. "content": {
  13081. "application/json": {
  13082. "schema": {
  13083. "$ref": "#/components/schemas/InvalidRequestError"
  13084. }
  13085. }
  13086. }
  13087. },
  13088. "401": {
  13089. "description": "UnauthorizedError",
  13090. "content": {
  13091. "application/json": {
  13092. "schema": {
  13093. "$ref": "#/components/schemas/UnauthorizedError"
  13094. }
  13095. }
  13096. }
  13097. },
  13098. "404": {
  13099. "description": "SessionNotFoundError",
  13100. "content": {
  13101. "application/json": {
  13102. "schema": {
  13103. "anyOf": [
  13104. {
  13105. "$ref": "#/components/schemas/SessionNotFoundError"
  13106. },
  13107. {
  13108. "$ref": "#/components/schemas/SessionNotFoundError"
  13109. }
  13110. ]
  13111. }
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "description": "Retrieve pending question requests owned by a session.",
  13117. "summary": "List session question requests",
  13118. "x-codeSamples": [
  13119. {
  13120. "lang": "js",
  13121. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  13122. }
  13123. ]
  13124. }
  13125. },
  13126. "/api/session/{sessionID}/question/{requestID}/reply": {
  13127. "post": {
  13128. "tags": ["session questions"],
  13129. "operationId": "v2.session.question.reply",
  13130. "parameters": [
  13131. {
  13132. "name": "sessionID",
  13133. "in": "path",
  13134. "schema": {
  13135. "type": "string",
  13136. "pattern": "^ses"
  13137. },
  13138. "required": true
  13139. },
  13140. {
  13141. "name": "requestID",
  13142. "in": "path",
  13143. "schema": {
  13144. "type": "string",
  13145. "pattern": "^que"
  13146. },
  13147. "required": true
  13148. }
  13149. ],
  13150. "security": [],
  13151. "responses": {
  13152. "204": {
  13153. "description": "<No Content>"
  13154. },
  13155. "400": {
  13156. "description": "InvalidRequestError",
  13157. "content": {
  13158. "application/json": {
  13159. "schema": {
  13160. "$ref": "#/components/schemas/InvalidRequestError"
  13161. }
  13162. }
  13163. }
  13164. },
  13165. "401": {
  13166. "description": "UnauthorizedError",
  13167. "content": {
  13168. "application/json": {
  13169. "schema": {
  13170. "$ref": "#/components/schemas/UnauthorizedError"
  13171. }
  13172. }
  13173. }
  13174. },
  13175. "404": {
  13176. "description": "SessionNotFoundError | QuestionNotFoundError",
  13177. "content": {
  13178. "application/json": {
  13179. "schema": {
  13180. "anyOf": [
  13181. {
  13182. "$ref": "#/components/schemas/QuestionNotFoundError"
  13183. },
  13184. {
  13185. "$ref": "#/components/schemas/SessionNotFoundError"
  13186. },
  13187. {
  13188. "$ref": "#/components/schemas/SessionNotFoundError"
  13189. }
  13190. ]
  13191. }
  13192. }
  13193. }
  13194. }
  13195. },
  13196. "description": "Answer a pending question request owned by a session.",
  13197. "summary": "Reply to pending question request",
  13198. "requestBody": {
  13199. "content": {
  13200. "application/json": {
  13201. "schema": {
  13202. "$ref": "#/components/schemas/QuestionV2Reply"
  13203. }
  13204. }
  13205. },
  13206. "required": true
  13207. },
  13208. "x-codeSamples": [
  13209. {
  13210. "lang": "js",
  13211. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  13212. }
  13213. ]
  13214. }
  13215. },
  13216. "/api/session/{sessionID}/question/{requestID}/reject": {
  13217. "post": {
  13218. "tags": ["session questions"],
  13219. "operationId": "v2.session.question.reject",
  13220. "parameters": [
  13221. {
  13222. "name": "sessionID",
  13223. "in": "path",
  13224. "schema": {
  13225. "type": "string",
  13226. "pattern": "^ses"
  13227. },
  13228. "required": true
  13229. },
  13230. {
  13231. "name": "requestID",
  13232. "in": "path",
  13233. "schema": {
  13234. "type": "string",
  13235. "pattern": "^que"
  13236. },
  13237. "required": true
  13238. }
  13239. ],
  13240. "security": [],
  13241. "responses": {
  13242. "204": {
  13243. "description": "<No Content>"
  13244. },
  13245. "400": {
  13246. "description": "InvalidRequestError",
  13247. "content": {
  13248. "application/json": {
  13249. "schema": {
  13250. "$ref": "#/components/schemas/InvalidRequestError"
  13251. }
  13252. }
  13253. }
  13254. },
  13255. "401": {
  13256. "description": "UnauthorizedError",
  13257. "content": {
  13258. "application/json": {
  13259. "schema": {
  13260. "$ref": "#/components/schemas/UnauthorizedError"
  13261. }
  13262. }
  13263. }
  13264. },
  13265. "404": {
  13266. "description": "SessionNotFoundError | QuestionNotFoundError",
  13267. "content": {
  13268. "application/json": {
  13269. "schema": {
  13270. "anyOf": [
  13271. {
  13272. "$ref": "#/components/schemas/QuestionNotFoundError"
  13273. },
  13274. {
  13275. "$ref": "#/components/schemas/SessionNotFoundError"
  13276. },
  13277. {
  13278. "$ref": "#/components/schemas/SessionNotFoundError"
  13279. }
  13280. ]
  13281. }
  13282. }
  13283. }
  13284. }
  13285. },
  13286. "description": "Reject a pending question request owned by a session.",
  13287. "summary": "Reject pending question request",
  13288. "x-codeSamples": [
  13289. {
  13290. "lang": "js",
  13291. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  13292. }
  13293. ]
  13294. }
  13295. },
  13296. "/api/reference": {
  13297. "get": {
  13298. "tags": ["reference"],
  13299. "operationId": "v2.reference.list",
  13300. "parameters": [
  13301. {
  13302. "name": "location",
  13303. "in": "query",
  13304. "schema": {
  13305. "type": "object",
  13306. "properties": {
  13307. "directory": {
  13308. "type": "string"
  13309. },
  13310. "workspace": {
  13311. "type": "string"
  13312. }
  13313. },
  13314. "additionalProperties": false
  13315. },
  13316. "required": false,
  13317. "style": "deepObject",
  13318. "explode": true
  13319. }
  13320. ],
  13321. "security": [],
  13322. "responses": {
  13323. "200": {
  13324. "description": "Success",
  13325. "content": {
  13326. "application/json": {
  13327. "schema": {
  13328. "type": "object",
  13329. "properties": {
  13330. "location": {
  13331. "$ref": "#/components/schemas/LocationInfo"
  13332. },
  13333. "data": {
  13334. "type": "array",
  13335. "items": {
  13336. "$ref": "#/components/schemas/ReferenceInfo"
  13337. }
  13338. }
  13339. },
  13340. "required": ["location", "data"],
  13341. "additionalProperties": false
  13342. }
  13343. }
  13344. }
  13345. },
  13346. "400": {
  13347. "description": "InvalidRequestError",
  13348. "content": {
  13349. "application/json": {
  13350. "schema": {
  13351. "$ref": "#/components/schemas/InvalidRequestError"
  13352. }
  13353. }
  13354. }
  13355. },
  13356. "401": {
  13357. "description": "UnauthorizedError",
  13358. "content": {
  13359. "application/json": {
  13360. "schema": {
  13361. "$ref": "#/components/schemas/UnauthorizedError"
  13362. }
  13363. }
  13364. }
  13365. }
  13366. },
  13367. "description": "List references available in the requested location.",
  13368. "summary": "List references",
  13369. "x-codeSamples": [
  13370. {
  13371. "lang": "js",
  13372. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  13373. }
  13374. ]
  13375. }
  13376. },
  13377. "/pty/{ptyID}/connect": {
  13378. "get": {
  13379. "tags": ["pty"],
  13380. "operationId": "pty.connect",
  13381. "parameters": [
  13382. {
  13383. "name": "ptyID",
  13384. "in": "path",
  13385. "schema": {
  13386. "type": "string",
  13387. "pattern": "^pty"
  13388. },
  13389. "required": true
  13390. },
  13391. {
  13392. "in": "query",
  13393. "name": "directory",
  13394. "schema": {
  13395. "type": "string"
  13396. }
  13397. },
  13398. {
  13399. "in": "query",
  13400. "name": "workspace",
  13401. "schema": {
  13402. "type": "string"
  13403. }
  13404. },
  13405. {
  13406. "in": "query",
  13407. "name": "cursor",
  13408. "schema": {
  13409. "type": "string"
  13410. }
  13411. },
  13412. {
  13413. "in": "query",
  13414. "name": "ticket",
  13415. "schema": {
  13416. "type": "string"
  13417. }
  13418. }
  13419. ],
  13420. "responses": {
  13421. "200": {
  13422. "description": "Connected session",
  13423. "content": {
  13424. "application/json": {
  13425. "schema": {
  13426. "type": "boolean",
  13427. "description": "Connected session"
  13428. }
  13429. }
  13430. }
  13431. },
  13432. "403": {
  13433. "description": "Forbidden",
  13434. "content": {
  13435. "application/json": {
  13436. "schema": {
  13437. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  13438. }
  13439. }
  13440. }
  13441. },
  13442. "404": {
  13443. "description": "Not found",
  13444. "content": {
  13445. "application/json": {
  13446. "schema": {
  13447. "$ref": "#/components/schemas/NotFoundError"
  13448. }
  13449. }
  13450. }
  13451. }
  13452. },
  13453. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  13454. "summary": "Connect to PTY session",
  13455. "x-codeSamples": [
  13456. {
  13457. "lang": "js",
  13458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  13459. }
  13460. ]
  13461. }
  13462. }
  13463. },
  13464. "components": {
  13465. "schemas": {
  13466. "Event": {
  13467. "anyOf": [
  13468. {
  13469. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13470. },
  13471. {
  13472. "$ref": "#/components/schemas/EventCredentialAdded"
  13473. },
  13474. {
  13475. "$ref": "#/components/schemas/EventCredentialRemoved"
  13476. },
  13477. {
  13478. "$ref": "#/components/schemas/EventCredentialSwitched"
  13479. },
  13480. {
  13481. "$ref": "#/components/schemas/EventPluginAdded"
  13482. },
  13483. {
  13484. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13485. },
  13486. {
  13487. "$ref": "#/components/schemas/EventSessionCreated"
  13488. },
  13489. {
  13490. "$ref": "#/components/schemas/EventSessionUpdated"
  13491. },
  13492. {
  13493. "$ref": "#/components/schemas/EventSessionDeleted"
  13494. },
  13495. {
  13496. "$ref": "#/components/schemas/EventMessageUpdated"
  13497. },
  13498. {
  13499. "$ref": "#/components/schemas/EventMessageRemoved"
  13500. },
  13501. {
  13502. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13503. },
  13504. {
  13505. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13506. },
  13507. {
  13508. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13509. },
  13510. {
  13511. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13512. },
  13513. {
  13514. "$ref": "#/components/schemas/EventSessionNextMoved"
  13515. },
  13516. {
  13517. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13518. },
  13519. {
  13520. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  13521. },
  13522. {
  13523. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  13524. },
  13525. {
  13526. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  13527. },
  13528. {
  13529. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  13530. },
  13531. {
  13532. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13533. },
  13534. {
  13535. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13536. },
  13537. {
  13538. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13539. },
  13540. {
  13541. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13542. },
  13543. {
  13544. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13545. },
  13546. {
  13547. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13548. },
  13549. {
  13550. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13551. },
  13552. {
  13553. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13554. },
  13555. {
  13556. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13557. },
  13558. {
  13559. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13560. },
  13561. {
  13562. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13563. },
  13564. {
  13565. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13566. },
  13567. {
  13568. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13569. },
  13570. {
  13571. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13572. },
  13573. {
  13574. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13575. },
  13576. {
  13577. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13578. },
  13579. {
  13580. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13581. },
  13582. {
  13583. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13584. },
  13585. {
  13586. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13587. },
  13588. {
  13589. "$ref": "#/components/schemas/EventSessionNextRetried"
  13590. },
  13591. {
  13592. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13593. },
  13594. {
  13595. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13596. },
  13597. {
  13598. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13599. },
  13600. {
  13601. "$ref": "#/components/schemas/EventMessagePartDelta"
  13602. },
  13603. {
  13604. "$ref": "#/components/schemas/EventSessionDiff"
  13605. },
  13606. {
  13607. "$ref": "#/components/schemas/EventSessionError"
  13608. },
  13609. {
  13610. "$ref": "#/components/schemas/EventInstallationUpdated"
  13611. },
  13612. {
  13613. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13614. },
  13615. {
  13616. "$ref": "#/components/schemas/EventFileEdited"
  13617. },
  13618. {
  13619. "$ref": "#/components/schemas/EventConnectorUpdated"
  13620. },
  13621. {
  13622. "$ref": "#/components/schemas/EventPermissionV2Asked"
  13623. },
  13624. {
  13625. "$ref": "#/components/schemas/EventPermissionV2Replied"
  13626. },
  13627. {
  13628. "$ref": "#/components/schemas/EventReferenceUpdated"
  13629. },
  13630. {
  13631. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  13632. },
  13633. {
  13634. "$ref": "#/components/schemas/EventPtyCreated"
  13635. },
  13636. {
  13637. "$ref": "#/components/schemas/EventPtyUpdated"
  13638. },
  13639. {
  13640. "$ref": "#/components/schemas/EventPtyExited"
  13641. },
  13642. {
  13643. "$ref": "#/components/schemas/EventPtyDeleted"
  13644. },
  13645. {
  13646. "$ref": "#/components/schemas/EventQuestionV2Asked"
  13647. },
  13648. {
  13649. "$ref": "#/components/schemas/EventQuestionV2Replied"
  13650. },
  13651. {
  13652. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  13653. },
  13654. {
  13655. "$ref": "#/components/schemas/EventTodoUpdated"
  13656. },
  13657. {
  13658. "$ref": "#/components/schemas/EventLspUpdated"
  13659. },
  13660. {
  13661. "$ref": "#/components/schemas/EventPermissionAsked"
  13662. },
  13663. {
  13664. "$ref": "#/components/schemas/EventPermissionReplied"
  13665. },
  13666. {
  13667. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13668. },
  13669. {
  13670. "$ref": "#/components/schemas/Event.tui.command.execute"
  13671. },
  13672. {
  13673. "$ref": "#/components/schemas/Event.tui.toast.show"
  13674. },
  13675. {
  13676. "$ref": "#/components/schemas/Event.tui.session.select"
  13677. },
  13678. {
  13679. "$ref": "#/components/schemas/EventMcpToolsChanged"
  13680. },
  13681. {
  13682. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  13683. },
  13684. {
  13685. "$ref": "#/components/schemas/EventCommandExecuted"
  13686. },
  13687. {
  13688. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  13689. },
  13690. {
  13691. "$ref": "#/components/schemas/EventProjectUpdated"
  13692. },
  13693. {
  13694. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  13695. },
  13696. {
  13697. "$ref": "#/components/schemas/EventQuestionAsked"
  13698. },
  13699. {
  13700. "$ref": "#/components/schemas/EventQuestionReplied"
  13701. },
  13702. {
  13703. "$ref": "#/components/schemas/EventQuestionRejected"
  13704. },
  13705. {
  13706. "$ref": "#/components/schemas/EventSessionStatus"
  13707. },
  13708. {
  13709. "$ref": "#/components/schemas/EventSessionIdle"
  13710. },
  13711. {
  13712. "$ref": "#/components/schemas/EventSessionCompacted"
  13713. },
  13714. {
  13715. "$ref": "#/components/schemas/EventWorktreeReady"
  13716. },
  13717. {
  13718. "$ref": "#/components/schemas/EventWorktreeFailed"
  13719. },
  13720. {
  13721. "$ref": "#/components/schemas/EventWorkspaceReady"
  13722. },
  13723. {
  13724. "$ref": "#/components/schemas/EventWorkspaceFailed"
  13725. },
  13726. {
  13727. "$ref": "#/components/schemas/EventWorkspaceStatus"
  13728. },
  13729. {
  13730. "$ref": "#/components/schemas/EventServerConnected"
  13731. },
  13732. {
  13733. "$ref": "#/components/schemas/EventGlobalDisposed"
  13734. },
  13735. {
  13736. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  13737. }
  13738. ]
  13739. },
  13740. "QuestionReplied": {
  13741. "type": "object",
  13742. "properties": {
  13743. "sessionID": {
  13744. "type": "string",
  13745. "pattern": "^ses"
  13746. },
  13747. "requestID": {
  13748. "type": "string",
  13749. "pattern": "^que"
  13750. },
  13751. "answers": {
  13752. "type": "array",
  13753. "items": {
  13754. "$ref": "#/components/schemas/QuestionAnswer"
  13755. }
  13756. }
  13757. },
  13758. "required": ["sessionID", "requestID", "answers"],
  13759. "additionalProperties": false
  13760. },
  13761. "QuestionRejected": {
  13762. "type": "object",
  13763. "properties": {
  13764. "sessionID": {
  13765. "type": "string",
  13766. "pattern": "^ses"
  13767. },
  13768. "requestID": {
  13769. "type": "string",
  13770. "pattern": "^que"
  13771. }
  13772. },
  13773. "required": ["sessionID", "requestID"],
  13774. "additionalProperties": false
  13775. },
  13776. "OAuth": {
  13777. "type": "object",
  13778. "properties": {
  13779. "type": {
  13780. "type": "string",
  13781. "enum": ["oauth"]
  13782. },
  13783. "refresh": {
  13784. "type": "string"
  13785. },
  13786. "access": {
  13787. "type": "string"
  13788. },
  13789. "expires": {
  13790. "type": "integer",
  13791. "minimum": 0
  13792. },
  13793. "accountId": {
  13794. "type": "string"
  13795. },
  13796. "enterpriseUrl": {
  13797. "type": "string"
  13798. }
  13799. },
  13800. "required": ["type", "refresh", "access", "expires"],
  13801. "additionalProperties": false
  13802. },
  13803. "ApiAuth": {
  13804. "type": "object",
  13805. "properties": {
  13806. "type": {
  13807. "type": "string",
  13808. "enum": ["api"]
  13809. },
  13810. "key": {
  13811. "type": "string"
  13812. },
  13813. "metadata": {
  13814. "type": "object",
  13815. "additionalProperties": {
  13816. "type": "string"
  13817. }
  13818. }
  13819. },
  13820. "required": ["type", "key"],
  13821. "additionalProperties": false
  13822. },
  13823. "WellKnownAuth": {
  13824. "type": "object",
  13825. "properties": {
  13826. "type": {
  13827. "type": "string",
  13828. "enum": ["wellknown"]
  13829. },
  13830. "key": {
  13831. "type": "string"
  13832. },
  13833. "token": {
  13834. "type": "string"
  13835. }
  13836. },
  13837. "required": ["type", "key", "token"],
  13838. "additionalProperties": false
  13839. },
  13840. "Auth": {
  13841. "anyOf": [
  13842. {
  13843. "$ref": "#/components/schemas/OAuth"
  13844. },
  13845. {
  13846. "$ref": "#/components/schemas/ApiAuth"
  13847. },
  13848. {
  13849. "$ref": "#/components/schemas/WellKnownAuth"
  13850. }
  13851. ]
  13852. },
  13853. "effect_HttpApiError_BadRequest": {
  13854. "type": "object",
  13855. "properties": {
  13856. "_tag": {
  13857. "type": "string",
  13858. "enum": ["BadRequest"]
  13859. }
  13860. },
  13861. "required": ["_tag"],
  13862. "additionalProperties": false
  13863. },
  13864. "InvalidRequestError": {
  13865. "type": "object",
  13866. "properties": {
  13867. "_tag": {
  13868. "type": "string",
  13869. "enum": ["InvalidRequestError"]
  13870. },
  13871. "message": {
  13872. "type": "string"
  13873. },
  13874. "kind": {
  13875. "type": "string"
  13876. },
  13877. "field": {
  13878. "type": "string"
  13879. }
  13880. },
  13881. "required": ["_tag", "message"],
  13882. "additionalProperties": false
  13883. },
  13884. "MoveSessionError": {
  13885. "type": "object",
  13886. "properties": {
  13887. "name": {
  13888. "type": "string",
  13889. "enum": ["MoveSessionError"]
  13890. },
  13891. "data": {
  13892. "type": "object",
  13893. "properties": {
  13894. "message": {
  13895. "type": "string"
  13896. }
  13897. },
  13898. "required": ["message"],
  13899. "additionalProperties": false
  13900. }
  13901. },
  13902. "required": ["name", "data"],
  13903. "additionalProperties": false
  13904. },
  13905. "SnapshotFileDiff": {
  13906. "type": "object",
  13907. "properties": {
  13908. "file": {
  13909. "type": "string"
  13910. },
  13911. "patch": {
  13912. "type": "string"
  13913. },
  13914. "additions": {
  13915. "type": "number"
  13916. },
  13917. "deletions": {
  13918. "type": "number"
  13919. },
  13920. "status": {
  13921. "type": "string",
  13922. "enum": ["added", "deleted", "modified"]
  13923. }
  13924. },
  13925. "required": ["additions", "deletions"],
  13926. "additionalProperties": false
  13927. },
  13928. "PermissionAction": {
  13929. "type": "string",
  13930. "enum": ["allow", "deny", "ask"]
  13931. },
  13932. "PermissionRule": {
  13933. "type": "object",
  13934. "properties": {
  13935. "permission": {
  13936. "type": "string"
  13937. },
  13938. "pattern": {
  13939. "type": "string"
  13940. },
  13941. "action": {
  13942. "$ref": "#/components/schemas/PermissionAction"
  13943. }
  13944. },
  13945. "required": ["permission", "pattern", "action"],
  13946. "additionalProperties": false
  13947. },
  13948. "PermissionRuleset": {
  13949. "type": "array",
  13950. "items": {
  13951. "$ref": "#/components/schemas/PermissionRule"
  13952. }
  13953. },
  13954. "Session": {
  13955. "type": "object",
  13956. "properties": {
  13957. "id": {
  13958. "type": "string",
  13959. "pattern": "^ses"
  13960. },
  13961. "slug": {
  13962. "type": "string"
  13963. },
  13964. "projectID": {
  13965. "type": "string"
  13966. },
  13967. "workspaceID": {
  13968. "type": "string",
  13969. "pattern": "^wrk"
  13970. },
  13971. "directory": {
  13972. "type": "string"
  13973. },
  13974. "path": {
  13975. "type": "string"
  13976. },
  13977. "parentID": {
  13978. "type": "string",
  13979. "pattern": "^ses"
  13980. },
  13981. "summary": {
  13982. "type": "object",
  13983. "properties": {
  13984. "additions": {
  13985. "type": "number"
  13986. },
  13987. "deletions": {
  13988. "type": "number"
  13989. },
  13990. "files": {
  13991. "type": "number"
  13992. },
  13993. "diffs": {
  13994. "type": "array",
  13995. "items": {
  13996. "$ref": "#/components/schemas/SnapshotFileDiff"
  13997. }
  13998. }
  13999. },
  14000. "required": ["additions", "deletions", "files"],
  14001. "additionalProperties": false
  14002. },
  14003. "cost": {
  14004. "type": "number"
  14005. },
  14006. "tokens": {
  14007. "type": "object",
  14008. "properties": {
  14009. "input": {
  14010. "type": "number"
  14011. },
  14012. "output": {
  14013. "type": "number"
  14014. },
  14015. "reasoning": {
  14016. "type": "number"
  14017. },
  14018. "cache": {
  14019. "type": "object",
  14020. "properties": {
  14021. "read": {
  14022. "type": "number"
  14023. },
  14024. "write": {
  14025. "type": "number"
  14026. }
  14027. },
  14028. "required": ["read", "write"],
  14029. "additionalProperties": false
  14030. }
  14031. },
  14032. "required": ["input", "output", "reasoning", "cache"],
  14033. "additionalProperties": false
  14034. },
  14035. "share": {
  14036. "type": "object",
  14037. "properties": {
  14038. "url": {
  14039. "type": "string"
  14040. }
  14041. },
  14042. "required": ["url"],
  14043. "additionalProperties": false
  14044. },
  14045. "title": {
  14046. "type": "string"
  14047. },
  14048. "agent": {
  14049. "type": "string"
  14050. },
  14051. "model": {
  14052. "type": "object",
  14053. "properties": {
  14054. "id": {
  14055. "type": "string"
  14056. },
  14057. "providerID": {
  14058. "type": "string"
  14059. },
  14060. "variant": {
  14061. "type": "string"
  14062. }
  14063. },
  14064. "required": ["id", "providerID"],
  14065. "additionalProperties": false
  14066. },
  14067. "version": {
  14068. "type": "string"
  14069. },
  14070. "metadata": {
  14071. "type": "object"
  14072. },
  14073. "time": {
  14074. "type": "object",
  14075. "properties": {
  14076. "created": {
  14077. "type": "integer",
  14078. "minimum": 0
  14079. },
  14080. "updated": {
  14081. "type": "integer",
  14082. "minimum": 0
  14083. },
  14084. "compacting": {
  14085. "type": "integer",
  14086. "minimum": 0
  14087. },
  14088. "archived": {
  14089. "type": "number"
  14090. }
  14091. },
  14092. "required": ["created", "updated"],
  14093. "additionalProperties": false
  14094. },
  14095. "permission": {
  14096. "$ref": "#/components/schemas/PermissionRuleset"
  14097. },
  14098. "revert": {
  14099. "type": "object",
  14100. "properties": {
  14101. "messageID": {
  14102. "type": "string",
  14103. "pattern": "^msg"
  14104. },
  14105. "partID": {
  14106. "type": "string",
  14107. "pattern": "^prt"
  14108. },
  14109. "snapshot": {
  14110. "type": "string"
  14111. },
  14112. "diff": {
  14113. "type": "string"
  14114. }
  14115. },
  14116. "required": ["messageID"],
  14117. "additionalProperties": false
  14118. }
  14119. },
  14120. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  14121. "additionalProperties": false
  14122. },
  14123. "OutputFormatText": {
  14124. "type": "object",
  14125. "properties": {
  14126. "type": {
  14127. "type": "string",
  14128. "enum": ["text"]
  14129. }
  14130. },
  14131. "required": ["type"],
  14132. "additionalProperties": false
  14133. },
  14134. "JSONSchema": {
  14135. "type": "object"
  14136. },
  14137. "OutputFormatJsonSchema": {
  14138. "type": "object",
  14139. "properties": {
  14140. "type": {
  14141. "type": "string",
  14142. "enum": ["json_schema"]
  14143. },
  14144. "schema": {
  14145. "$ref": "#/components/schemas/JSONSchema"
  14146. },
  14147. "retryCount": {
  14148. "type": "integer",
  14149. "minimum": 0
  14150. }
  14151. },
  14152. "required": ["type", "schema"],
  14153. "additionalProperties": false
  14154. },
  14155. "OutputFormat": {
  14156. "anyOf": [
  14157. {
  14158. "$ref": "#/components/schemas/OutputFormatText"
  14159. },
  14160. {
  14161. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  14162. }
  14163. ]
  14164. },
  14165. "UserMessage": {
  14166. "type": "object",
  14167. "properties": {
  14168. "id": {
  14169. "type": "string",
  14170. "pattern": "^msg"
  14171. },
  14172. "sessionID": {
  14173. "type": "string",
  14174. "pattern": "^ses"
  14175. },
  14176. "role": {
  14177. "type": "string",
  14178. "enum": ["user"]
  14179. },
  14180. "time": {
  14181. "type": "object",
  14182. "properties": {
  14183. "created": {
  14184. "type": "number",
  14185. "minimum": 0
  14186. }
  14187. },
  14188. "required": ["created"],
  14189. "additionalProperties": false
  14190. },
  14191. "format": {
  14192. "$ref": "#/components/schemas/OutputFormat"
  14193. },
  14194. "summary": {
  14195. "type": "object",
  14196. "properties": {
  14197. "title": {
  14198. "type": "string"
  14199. },
  14200. "body": {
  14201. "type": "string"
  14202. },
  14203. "diffs": {
  14204. "type": "array",
  14205. "items": {
  14206. "$ref": "#/components/schemas/SnapshotFileDiff"
  14207. }
  14208. }
  14209. },
  14210. "required": ["diffs"],
  14211. "additionalProperties": false
  14212. },
  14213. "agent": {
  14214. "type": "string"
  14215. },
  14216. "model": {
  14217. "type": "object",
  14218. "properties": {
  14219. "providerID": {
  14220. "type": "string"
  14221. },
  14222. "modelID": {
  14223. "type": "string"
  14224. },
  14225. "variant": {
  14226. "type": "string"
  14227. }
  14228. },
  14229. "required": ["providerID", "modelID"],
  14230. "additionalProperties": false
  14231. },
  14232. "system": {
  14233. "type": "string"
  14234. },
  14235. "tools": {
  14236. "type": "object",
  14237. "additionalProperties": {
  14238. "type": "boolean"
  14239. }
  14240. }
  14241. },
  14242. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  14243. "additionalProperties": false
  14244. },
  14245. "ProviderAuthError": {
  14246. "type": "object",
  14247. "properties": {
  14248. "name": {
  14249. "type": "string",
  14250. "enum": ["ProviderAuthError"]
  14251. },
  14252. "data": {
  14253. "type": "object",
  14254. "properties": {
  14255. "providerID": {
  14256. "type": "string"
  14257. },
  14258. "message": {
  14259. "type": "string"
  14260. }
  14261. },
  14262. "required": ["providerID", "message"],
  14263. "additionalProperties": false
  14264. }
  14265. },
  14266. "required": ["name", "data"],
  14267. "additionalProperties": false
  14268. },
  14269. "UnknownError": {
  14270. "type": "object",
  14271. "properties": {
  14272. "name": {
  14273. "type": "string",
  14274. "enum": ["UnknownError"]
  14275. },
  14276. "data": {
  14277. "type": "object",
  14278. "properties": {
  14279. "message": {
  14280. "type": "string"
  14281. },
  14282. "ref": {
  14283. "type": "string"
  14284. }
  14285. },
  14286. "required": ["message"],
  14287. "additionalProperties": false
  14288. }
  14289. },
  14290. "required": ["name", "data"],
  14291. "additionalProperties": false
  14292. },
  14293. "MessageOutputLengthError": {
  14294. "type": "object",
  14295. "properties": {
  14296. "name": {
  14297. "type": "string",
  14298. "enum": ["MessageOutputLengthError"]
  14299. },
  14300. "data": {
  14301. "type": "object",
  14302. "properties": {}
  14303. }
  14304. },
  14305. "required": ["name", "data"],
  14306. "additionalProperties": false
  14307. },
  14308. "MessageAbortedError": {
  14309. "type": "object",
  14310. "properties": {
  14311. "name": {
  14312. "type": "string",
  14313. "enum": ["MessageAbortedError"]
  14314. },
  14315. "data": {
  14316. "type": "object",
  14317. "properties": {
  14318. "message": {
  14319. "type": "string"
  14320. }
  14321. },
  14322. "required": ["message"],
  14323. "additionalProperties": false
  14324. }
  14325. },
  14326. "required": ["name", "data"],
  14327. "additionalProperties": false
  14328. },
  14329. "StructuredOutputError": {
  14330. "type": "object",
  14331. "properties": {
  14332. "name": {
  14333. "type": "string",
  14334. "enum": ["StructuredOutputError"]
  14335. },
  14336. "data": {
  14337. "type": "object",
  14338. "properties": {
  14339. "message": {
  14340. "type": "string"
  14341. },
  14342. "retries": {
  14343. "type": "integer",
  14344. "minimum": 0
  14345. }
  14346. },
  14347. "required": ["message", "retries"],
  14348. "additionalProperties": false
  14349. }
  14350. },
  14351. "required": ["name", "data"],
  14352. "additionalProperties": false
  14353. },
  14354. "ContextOverflowError": {
  14355. "type": "object",
  14356. "properties": {
  14357. "name": {
  14358. "type": "string",
  14359. "enum": ["ContextOverflowError"]
  14360. },
  14361. "data": {
  14362. "type": "object",
  14363. "properties": {
  14364. "message": {
  14365. "type": "string"
  14366. },
  14367. "responseBody": {
  14368. "type": "string"
  14369. }
  14370. },
  14371. "required": ["message"],
  14372. "additionalProperties": false
  14373. }
  14374. },
  14375. "required": ["name", "data"],
  14376. "additionalProperties": false
  14377. },
  14378. "ContentFilterError": {
  14379. "type": "object",
  14380. "properties": {
  14381. "name": {
  14382. "type": "string",
  14383. "enum": ["ContentFilterError"]
  14384. },
  14385. "data": {
  14386. "type": "object",
  14387. "properties": {
  14388. "message": {
  14389. "type": "string"
  14390. }
  14391. },
  14392. "required": ["message"],
  14393. "additionalProperties": false
  14394. }
  14395. },
  14396. "required": ["name", "data"],
  14397. "additionalProperties": false
  14398. },
  14399. "APIError": {
  14400. "type": "object",
  14401. "properties": {
  14402. "name": {
  14403. "type": "string",
  14404. "enum": ["APIError"]
  14405. },
  14406. "data": {
  14407. "type": "object",
  14408. "properties": {
  14409. "message": {
  14410. "type": "string"
  14411. },
  14412. "statusCode": {
  14413. "type": "integer",
  14414. "minimum": 0
  14415. },
  14416. "isRetryable": {
  14417. "type": "boolean"
  14418. },
  14419. "responseHeaders": {
  14420. "type": "object",
  14421. "additionalProperties": {
  14422. "type": "string"
  14423. }
  14424. },
  14425. "responseBody": {
  14426. "type": "string"
  14427. },
  14428. "metadata": {
  14429. "type": "object",
  14430. "additionalProperties": {
  14431. "type": "string"
  14432. }
  14433. }
  14434. },
  14435. "required": ["message", "isRetryable"],
  14436. "additionalProperties": false
  14437. }
  14438. },
  14439. "required": ["name", "data"],
  14440. "additionalProperties": false
  14441. },
  14442. "AssistantMessage": {
  14443. "type": "object",
  14444. "properties": {
  14445. "id": {
  14446. "type": "string",
  14447. "pattern": "^msg"
  14448. },
  14449. "sessionID": {
  14450. "type": "string",
  14451. "pattern": "^ses"
  14452. },
  14453. "role": {
  14454. "type": "string",
  14455. "enum": ["assistant"]
  14456. },
  14457. "time": {
  14458. "type": "object",
  14459. "properties": {
  14460. "created": {
  14461. "type": "integer",
  14462. "minimum": 0
  14463. },
  14464. "completed": {
  14465. "type": "integer",
  14466. "minimum": 0
  14467. }
  14468. },
  14469. "required": ["created"],
  14470. "additionalProperties": false
  14471. },
  14472. "error": {
  14473. "anyOf": [
  14474. {
  14475. "$ref": "#/components/schemas/ProviderAuthError"
  14476. },
  14477. {
  14478. "$ref": "#/components/schemas/UnknownError"
  14479. },
  14480. {
  14481. "$ref": "#/components/schemas/MessageOutputLengthError"
  14482. },
  14483. {
  14484. "$ref": "#/components/schemas/MessageAbortedError"
  14485. },
  14486. {
  14487. "$ref": "#/components/schemas/StructuredOutputError"
  14488. },
  14489. {
  14490. "$ref": "#/components/schemas/ContextOverflowError"
  14491. },
  14492. {
  14493. "$ref": "#/components/schemas/ContentFilterError"
  14494. },
  14495. {
  14496. "$ref": "#/components/schemas/APIError"
  14497. }
  14498. ]
  14499. },
  14500. "parentID": {
  14501. "type": "string",
  14502. "pattern": "^msg"
  14503. },
  14504. "modelID": {
  14505. "type": "string"
  14506. },
  14507. "providerID": {
  14508. "type": "string"
  14509. },
  14510. "mode": {
  14511. "type": "string"
  14512. },
  14513. "agent": {
  14514. "type": "string"
  14515. },
  14516. "path": {
  14517. "type": "object",
  14518. "properties": {
  14519. "cwd": {
  14520. "type": "string"
  14521. },
  14522. "root": {
  14523. "type": "string"
  14524. }
  14525. },
  14526. "required": ["cwd", "root"],
  14527. "additionalProperties": false
  14528. },
  14529. "summary": {
  14530. "type": "boolean"
  14531. },
  14532. "cost": {
  14533. "type": "number"
  14534. },
  14535. "tokens": {
  14536. "type": "object",
  14537. "properties": {
  14538. "total": {
  14539. "type": "number"
  14540. },
  14541. "input": {
  14542. "type": "number"
  14543. },
  14544. "output": {
  14545. "type": "number"
  14546. },
  14547. "reasoning": {
  14548. "type": "number"
  14549. },
  14550. "cache": {
  14551. "type": "object",
  14552. "properties": {
  14553. "read": {
  14554. "type": "number"
  14555. },
  14556. "write": {
  14557. "type": "number"
  14558. }
  14559. },
  14560. "required": ["read", "write"],
  14561. "additionalProperties": false
  14562. }
  14563. },
  14564. "required": ["input", "output", "reasoning", "cache"],
  14565. "additionalProperties": false
  14566. },
  14567. "structured": {},
  14568. "variant": {
  14569. "type": "string"
  14570. },
  14571. "finish": {
  14572. "type": "string"
  14573. }
  14574. },
  14575. "required": [
  14576. "id",
  14577. "sessionID",
  14578. "role",
  14579. "time",
  14580. "parentID",
  14581. "modelID",
  14582. "providerID",
  14583. "mode",
  14584. "agent",
  14585. "path",
  14586. "cost",
  14587. "tokens"
  14588. ],
  14589. "additionalProperties": false
  14590. },
  14591. "Message": {
  14592. "anyOf": [
  14593. {
  14594. "$ref": "#/components/schemas/UserMessage"
  14595. },
  14596. {
  14597. "$ref": "#/components/schemas/AssistantMessage"
  14598. }
  14599. ]
  14600. },
  14601. "TextPart": {
  14602. "type": "object",
  14603. "properties": {
  14604. "id": {
  14605. "type": "string",
  14606. "pattern": "^prt"
  14607. },
  14608. "sessionID": {
  14609. "type": "string",
  14610. "pattern": "^ses"
  14611. },
  14612. "messageID": {
  14613. "type": "string",
  14614. "pattern": "^msg"
  14615. },
  14616. "type": {
  14617. "type": "string",
  14618. "enum": ["text"]
  14619. },
  14620. "text": {
  14621. "type": "string"
  14622. },
  14623. "synthetic": {
  14624. "type": "boolean"
  14625. },
  14626. "ignored": {
  14627. "type": "boolean"
  14628. },
  14629. "time": {
  14630. "type": "object",
  14631. "properties": {
  14632. "start": {
  14633. "type": "integer",
  14634. "minimum": 0
  14635. },
  14636. "end": {
  14637. "type": "integer",
  14638. "minimum": 0
  14639. }
  14640. },
  14641. "required": ["start"],
  14642. "additionalProperties": false
  14643. },
  14644. "metadata": {
  14645. "type": "object"
  14646. }
  14647. },
  14648. "required": ["id", "sessionID", "messageID", "type", "text"],
  14649. "additionalProperties": false
  14650. },
  14651. "SubtaskPart": {
  14652. "type": "object",
  14653. "properties": {
  14654. "id": {
  14655. "type": "string",
  14656. "pattern": "^prt"
  14657. },
  14658. "sessionID": {
  14659. "type": "string",
  14660. "pattern": "^ses"
  14661. },
  14662. "messageID": {
  14663. "type": "string",
  14664. "pattern": "^msg"
  14665. },
  14666. "type": {
  14667. "type": "string",
  14668. "enum": ["subtask"]
  14669. },
  14670. "prompt": {
  14671. "type": "string"
  14672. },
  14673. "description": {
  14674. "type": "string"
  14675. },
  14676. "agent": {
  14677. "type": "string"
  14678. },
  14679. "model": {
  14680. "type": "object",
  14681. "properties": {
  14682. "providerID": {
  14683. "type": "string"
  14684. },
  14685. "modelID": {
  14686. "type": "string"
  14687. }
  14688. },
  14689. "required": ["providerID", "modelID"],
  14690. "additionalProperties": false
  14691. },
  14692. "command": {
  14693. "type": "string"
  14694. }
  14695. },
  14696. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  14697. "additionalProperties": false
  14698. },
  14699. "ReasoningPart": {
  14700. "type": "object",
  14701. "properties": {
  14702. "id": {
  14703. "type": "string",
  14704. "pattern": "^prt"
  14705. },
  14706. "sessionID": {
  14707. "type": "string",
  14708. "pattern": "^ses"
  14709. },
  14710. "messageID": {
  14711. "type": "string",
  14712. "pattern": "^msg"
  14713. },
  14714. "type": {
  14715. "type": "string",
  14716. "enum": ["reasoning"]
  14717. },
  14718. "text": {
  14719. "type": "string"
  14720. },
  14721. "metadata": {
  14722. "type": "object"
  14723. },
  14724. "time": {
  14725. "type": "object",
  14726. "properties": {
  14727. "start": {
  14728. "type": "integer",
  14729. "minimum": 0
  14730. },
  14731. "end": {
  14732. "type": "integer",
  14733. "minimum": 0
  14734. }
  14735. },
  14736. "required": ["start"],
  14737. "additionalProperties": false
  14738. }
  14739. },
  14740. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  14741. "additionalProperties": false
  14742. },
  14743. "FilePartSourceText": {
  14744. "type": "object",
  14745. "properties": {
  14746. "value": {
  14747. "type": "string"
  14748. },
  14749. "start": {
  14750. "type": "number"
  14751. },
  14752. "end": {
  14753. "type": "number"
  14754. }
  14755. },
  14756. "required": ["value", "start", "end"],
  14757. "additionalProperties": false
  14758. },
  14759. "FileSource": {
  14760. "type": "object",
  14761. "properties": {
  14762. "text": {
  14763. "$ref": "#/components/schemas/FilePartSourceText"
  14764. },
  14765. "type": {
  14766. "type": "string",
  14767. "enum": ["file"]
  14768. },
  14769. "path": {
  14770. "type": "string"
  14771. }
  14772. },
  14773. "required": ["text", "type", "path"],
  14774. "additionalProperties": false
  14775. },
  14776. "Range": {
  14777. "type": "object",
  14778. "properties": {
  14779. "start": {
  14780. "type": "object",
  14781. "properties": {
  14782. "line": {
  14783. "type": "integer",
  14784. "minimum": 0
  14785. },
  14786. "character": {
  14787. "type": "integer",
  14788. "minimum": 0
  14789. }
  14790. },
  14791. "required": ["line", "character"],
  14792. "additionalProperties": false
  14793. },
  14794. "end": {
  14795. "type": "object",
  14796. "properties": {
  14797. "line": {
  14798. "type": "integer",
  14799. "minimum": 0
  14800. },
  14801. "character": {
  14802. "type": "integer",
  14803. "minimum": 0
  14804. }
  14805. },
  14806. "required": ["line", "character"],
  14807. "additionalProperties": false
  14808. }
  14809. },
  14810. "required": ["start", "end"],
  14811. "additionalProperties": false
  14812. },
  14813. "SymbolSource": {
  14814. "type": "object",
  14815. "properties": {
  14816. "text": {
  14817. "$ref": "#/components/schemas/FilePartSourceText"
  14818. },
  14819. "type": {
  14820. "type": "string",
  14821. "enum": ["symbol"]
  14822. },
  14823. "path": {
  14824. "type": "string"
  14825. },
  14826. "range": {
  14827. "$ref": "#/components/schemas/Range"
  14828. },
  14829. "name": {
  14830. "type": "string"
  14831. },
  14832. "kind": {
  14833. "type": "integer",
  14834. "minimum": 0
  14835. }
  14836. },
  14837. "required": ["text", "type", "path", "range", "name", "kind"],
  14838. "additionalProperties": false
  14839. },
  14840. "ResourceSource": {
  14841. "type": "object",
  14842. "properties": {
  14843. "text": {
  14844. "$ref": "#/components/schemas/FilePartSourceText"
  14845. },
  14846. "type": {
  14847. "type": "string",
  14848. "enum": ["resource"]
  14849. },
  14850. "clientName": {
  14851. "type": "string"
  14852. },
  14853. "uri": {
  14854. "type": "string"
  14855. }
  14856. },
  14857. "required": ["text", "type", "clientName", "uri"],
  14858. "additionalProperties": false
  14859. },
  14860. "FilePartSource": {
  14861. "anyOf": [
  14862. {
  14863. "$ref": "#/components/schemas/FileSource"
  14864. },
  14865. {
  14866. "$ref": "#/components/schemas/SymbolSource"
  14867. },
  14868. {
  14869. "$ref": "#/components/schemas/ResourceSource"
  14870. }
  14871. ]
  14872. },
  14873. "FilePart": {
  14874. "type": "object",
  14875. "properties": {
  14876. "id": {
  14877. "type": "string",
  14878. "pattern": "^prt"
  14879. },
  14880. "sessionID": {
  14881. "type": "string",
  14882. "pattern": "^ses"
  14883. },
  14884. "messageID": {
  14885. "type": "string",
  14886. "pattern": "^msg"
  14887. },
  14888. "type": {
  14889. "type": "string",
  14890. "enum": ["file"]
  14891. },
  14892. "mime": {
  14893. "type": "string"
  14894. },
  14895. "filename": {
  14896. "type": "string"
  14897. },
  14898. "url": {
  14899. "type": "string"
  14900. },
  14901. "source": {
  14902. "$ref": "#/components/schemas/FilePartSource"
  14903. }
  14904. },
  14905. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  14906. "additionalProperties": false
  14907. },
  14908. "ToolStatePending": {
  14909. "type": "object",
  14910. "properties": {
  14911. "status": {
  14912. "type": "string",
  14913. "enum": ["pending"]
  14914. },
  14915. "input": {
  14916. "type": "object"
  14917. },
  14918. "raw": {
  14919. "type": "string"
  14920. }
  14921. },
  14922. "required": ["status", "input", "raw"],
  14923. "additionalProperties": false
  14924. },
  14925. "ToolStateRunning": {
  14926. "type": "object",
  14927. "properties": {
  14928. "status": {
  14929. "type": "string",
  14930. "enum": ["running"]
  14931. },
  14932. "input": {
  14933. "type": "object"
  14934. },
  14935. "title": {
  14936. "type": "string"
  14937. },
  14938. "metadata": {
  14939. "type": "object"
  14940. },
  14941. "time": {
  14942. "type": "object",
  14943. "properties": {
  14944. "start": {
  14945. "type": "integer",
  14946. "minimum": 0
  14947. }
  14948. },
  14949. "required": ["start"],
  14950. "additionalProperties": false
  14951. }
  14952. },
  14953. "required": ["status", "input", "time"],
  14954. "additionalProperties": false
  14955. },
  14956. "ToolStateCompleted": {
  14957. "type": "object",
  14958. "properties": {
  14959. "status": {
  14960. "type": "string",
  14961. "enum": ["completed"]
  14962. },
  14963. "input": {
  14964. "type": "object"
  14965. },
  14966. "output": {
  14967. "type": "string"
  14968. },
  14969. "title": {
  14970. "type": "string"
  14971. },
  14972. "metadata": {
  14973. "type": "object"
  14974. },
  14975. "time": {
  14976. "type": "object",
  14977. "properties": {
  14978. "start": {
  14979. "type": "integer",
  14980. "minimum": 0
  14981. },
  14982. "end": {
  14983. "type": "integer",
  14984. "minimum": 0
  14985. },
  14986. "compacted": {
  14987. "type": "integer",
  14988. "minimum": 0
  14989. }
  14990. },
  14991. "required": ["start", "end"],
  14992. "additionalProperties": false
  14993. },
  14994. "attachments": {
  14995. "type": "array",
  14996. "items": {
  14997. "$ref": "#/components/schemas/FilePart"
  14998. }
  14999. }
  15000. },
  15001. "required": ["status", "input", "output", "title", "metadata", "time"],
  15002. "additionalProperties": false
  15003. },
  15004. "ToolStateError": {
  15005. "type": "object",
  15006. "properties": {
  15007. "status": {
  15008. "type": "string",
  15009. "enum": ["error"]
  15010. },
  15011. "input": {
  15012. "type": "object"
  15013. },
  15014. "error": {
  15015. "type": "string"
  15016. },
  15017. "metadata": {
  15018. "type": "object"
  15019. },
  15020. "time": {
  15021. "type": "object",
  15022. "properties": {
  15023. "start": {
  15024. "type": "integer",
  15025. "minimum": 0
  15026. },
  15027. "end": {
  15028. "type": "integer",
  15029. "minimum": 0
  15030. }
  15031. },
  15032. "required": ["start", "end"],
  15033. "additionalProperties": false
  15034. }
  15035. },
  15036. "required": ["status", "input", "error", "time"],
  15037. "additionalProperties": false
  15038. },
  15039. "ToolState": {
  15040. "anyOf": [
  15041. {
  15042. "$ref": "#/components/schemas/ToolStatePending"
  15043. },
  15044. {
  15045. "$ref": "#/components/schemas/ToolStateRunning"
  15046. },
  15047. {
  15048. "$ref": "#/components/schemas/ToolStateCompleted"
  15049. },
  15050. {
  15051. "$ref": "#/components/schemas/ToolStateError"
  15052. }
  15053. ]
  15054. },
  15055. "ToolPart": {
  15056. "type": "object",
  15057. "properties": {
  15058. "id": {
  15059. "type": "string",
  15060. "pattern": "^prt"
  15061. },
  15062. "sessionID": {
  15063. "type": "string",
  15064. "pattern": "^ses"
  15065. },
  15066. "messageID": {
  15067. "type": "string",
  15068. "pattern": "^msg"
  15069. },
  15070. "type": {
  15071. "type": "string",
  15072. "enum": ["tool"]
  15073. },
  15074. "callID": {
  15075. "type": "string"
  15076. },
  15077. "tool": {
  15078. "type": "string"
  15079. },
  15080. "state": {
  15081. "$ref": "#/components/schemas/ToolState"
  15082. },
  15083. "metadata": {
  15084. "type": "object"
  15085. }
  15086. },
  15087. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  15088. "additionalProperties": false
  15089. },
  15090. "StepStartPart": {
  15091. "type": "object",
  15092. "properties": {
  15093. "id": {
  15094. "type": "string",
  15095. "pattern": "^prt"
  15096. },
  15097. "sessionID": {
  15098. "type": "string",
  15099. "pattern": "^ses"
  15100. },
  15101. "messageID": {
  15102. "type": "string",
  15103. "pattern": "^msg"
  15104. },
  15105. "type": {
  15106. "type": "string",
  15107. "enum": ["step-start"]
  15108. },
  15109. "snapshot": {
  15110. "type": "string"
  15111. }
  15112. },
  15113. "required": ["id", "sessionID", "messageID", "type"],
  15114. "additionalProperties": false
  15115. },
  15116. "StepFinishPart": {
  15117. "type": "object",
  15118. "properties": {
  15119. "id": {
  15120. "type": "string",
  15121. "pattern": "^prt"
  15122. },
  15123. "sessionID": {
  15124. "type": "string",
  15125. "pattern": "^ses"
  15126. },
  15127. "messageID": {
  15128. "type": "string",
  15129. "pattern": "^msg"
  15130. },
  15131. "type": {
  15132. "type": "string",
  15133. "enum": ["step-finish"]
  15134. },
  15135. "reason": {
  15136. "type": "string"
  15137. },
  15138. "snapshot": {
  15139. "type": "string"
  15140. },
  15141. "cost": {
  15142. "type": "number"
  15143. },
  15144. "tokens": {
  15145. "type": "object",
  15146. "properties": {
  15147. "total": {
  15148. "type": "number"
  15149. },
  15150. "input": {
  15151. "type": "number"
  15152. },
  15153. "output": {
  15154. "type": "number"
  15155. },
  15156. "reasoning": {
  15157. "type": "number"
  15158. },
  15159. "cache": {
  15160. "type": "object",
  15161. "properties": {
  15162. "read": {
  15163. "type": "number"
  15164. },
  15165. "write": {
  15166. "type": "number"
  15167. }
  15168. },
  15169. "required": ["read", "write"],
  15170. "additionalProperties": false
  15171. }
  15172. },
  15173. "required": ["input", "output", "reasoning", "cache"],
  15174. "additionalProperties": false
  15175. }
  15176. },
  15177. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  15178. "additionalProperties": false
  15179. },
  15180. "SnapshotPart": {
  15181. "type": "object",
  15182. "properties": {
  15183. "id": {
  15184. "type": "string",
  15185. "pattern": "^prt"
  15186. },
  15187. "sessionID": {
  15188. "type": "string",
  15189. "pattern": "^ses"
  15190. },
  15191. "messageID": {
  15192. "type": "string",
  15193. "pattern": "^msg"
  15194. },
  15195. "type": {
  15196. "type": "string",
  15197. "enum": ["snapshot"]
  15198. },
  15199. "snapshot": {
  15200. "type": "string"
  15201. }
  15202. },
  15203. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  15204. "additionalProperties": false
  15205. },
  15206. "PatchPart": {
  15207. "type": "object",
  15208. "properties": {
  15209. "id": {
  15210. "type": "string",
  15211. "pattern": "^prt"
  15212. },
  15213. "sessionID": {
  15214. "type": "string",
  15215. "pattern": "^ses"
  15216. },
  15217. "messageID": {
  15218. "type": "string",
  15219. "pattern": "^msg"
  15220. },
  15221. "type": {
  15222. "type": "string",
  15223. "enum": ["patch"]
  15224. },
  15225. "hash": {
  15226. "type": "string"
  15227. },
  15228. "files": {
  15229. "type": "array",
  15230. "items": {
  15231. "type": "string"
  15232. }
  15233. }
  15234. },
  15235. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  15236. "additionalProperties": false
  15237. },
  15238. "AgentPart": {
  15239. "type": "object",
  15240. "properties": {
  15241. "id": {
  15242. "type": "string",
  15243. "pattern": "^prt"
  15244. },
  15245. "sessionID": {
  15246. "type": "string",
  15247. "pattern": "^ses"
  15248. },
  15249. "messageID": {
  15250. "type": "string",
  15251. "pattern": "^msg"
  15252. },
  15253. "type": {
  15254. "type": "string",
  15255. "enum": ["agent"]
  15256. },
  15257. "name": {
  15258. "type": "string"
  15259. },
  15260. "source": {
  15261. "type": "object",
  15262. "properties": {
  15263. "value": {
  15264. "type": "string"
  15265. },
  15266. "start": {
  15267. "type": "integer",
  15268. "minimum": 0
  15269. },
  15270. "end": {
  15271. "type": "integer",
  15272. "minimum": 0
  15273. }
  15274. },
  15275. "required": ["value", "start", "end"],
  15276. "additionalProperties": false
  15277. }
  15278. },
  15279. "required": ["id", "sessionID", "messageID", "type", "name"],
  15280. "additionalProperties": false
  15281. },
  15282. "RetryPart": {
  15283. "type": "object",
  15284. "properties": {
  15285. "id": {
  15286. "type": "string",
  15287. "pattern": "^prt"
  15288. },
  15289. "sessionID": {
  15290. "type": "string",
  15291. "pattern": "^ses"
  15292. },
  15293. "messageID": {
  15294. "type": "string",
  15295. "pattern": "^msg"
  15296. },
  15297. "type": {
  15298. "type": "string",
  15299. "enum": ["retry"]
  15300. },
  15301. "attempt": {
  15302. "type": "integer",
  15303. "minimum": 0
  15304. },
  15305. "error": {
  15306. "$ref": "#/components/schemas/APIError"
  15307. },
  15308. "time": {
  15309. "type": "object",
  15310. "properties": {
  15311. "created": {
  15312. "type": "integer",
  15313. "minimum": 0
  15314. }
  15315. },
  15316. "required": ["created"],
  15317. "additionalProperties": false
  15318. }
  15319. },
  15320. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  15321. "additionalProperties": false
  15322. },
  15323. "CompactionPart": {
  15324. "type": "object",
  15325. "properties": {
  15326. "id": {
  15327. "type": "string",
  15328. "pattern": "^prt"
  15329. },
  15330. "sessionID": {
  15331. "type": "string",
  15332. "pattern": "^ses"
  15333. },
  15334. "messageID": {
  15335. "type": "string",
  15336. "pattern": "^msg"
  15337. },
  15338. "type": {
  15339. "type": "string",
  15340. "enum": ["compaction"]
  15341. },
  15342. "auto": {
  15343. "type": "boolean"
  15344. },
  15345. "overflow": {
  15346. "type": "boolean"
  15347. },
  15348. "tail_start_id": {
  15349. "type": "string",
  15350. "pattern": "^msg"
  15351. }
  15352. },
  15353. "required": ["id", "sessionID", "messageID", "type", "auto"],
  15354. "additionalProperties": false
  15355. },
  15356. "Part": {
  15357. "anyOf": [
  15358. {
  15359. "$ref": "#/components/schemas/TextPart"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/SubtaskPart"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/ReasoningPart"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/FilePart"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/ToolPart"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/StepStartPart"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/StepFinishPart"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/SnapshotPart"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/PatchPart"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/AgentPart"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/RetryPart"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/CompactionPart"
  15393. }
  15394. ]
  15395. },
  15396. "Prompt": {
  15397. "type": "object",
  15398. "properties": {
  15399. "text": {
  15400. "type": "string"
  15401. },
  15402. "files": {
  15403. "type": "array",
  15404. "items": {
  15405. "$ref": "#/components/schemas/PromptFileAttachment"
  15406. }
  15407. },
  15408. "agents": {
  15409. "type": "array",
  15410. "items": {
  15411. "$ref": "#/components/schemas/PromptAgentAttachment"
  15412. }
  15413. }
  15414. },
  15415. "required": ["text"],
  15416. "additionalProperties": false
  15417. },
  15418. "Pty": {
  15419. "type": "object",
  15420. "properties": {
  15421. "id": {
  15422. "type": "string",
  15423. "pattern": "^pty"
  15424. },
  15425. "title": {
  15426. "type": "string"
  15427. },
  15428. "command": {
  15429. "type": "string"
  15430. },
  15431. "args": {
  15432. "type": "array",
  15433. "items": {
  15434. "type": "string"
  15435. }
  15436. },
  15437. "cwd": {
  15438. "type": "string"
  15439. },
  15440. "status": {
  15441. "type": "string",
  15442. "enum": ["running", "exited"]
  15443. },
  15444. "pid": {
  15445. "type": "integer",
  15446. "minimum": 0
  15447. }
  15448. },
  15449. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  15450. "additionalProperties": false
  15451. },
  15452. "Todo": {
  15453. "type": "object",
  15454. "properties": {
  15455. "content": {
  15456. "type": "string",
  15457. "description": "Brief description of the task"
  15458. },
  15459. "status": {
  15460. "type": "string",
  15461. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  15462. },
  15463. "priority": {
  15464. "type": "string",
  15465. "description": "Priority level of the task: high, medium, low"
  15466. }
  15467. },
  15468. "required": ["content", "status", "priority"],
  15469. "additionalProperties": false
  15470. },
  15471. "QuestionOption": {
  15472. "type": "object",
  15473. "properties": {
  15474. "label": {
  15475. "type": "string",
  15476. "description": "Display text (1-5 words, concise)"
  15477. },
  15478. "description": {
  15479. "type": "string",
  15480. "description": "Explanation of choice"
  15481. }
  15482. },
  15483. "required": ["label", "description"],
  15484. "additionalProperties": false
  15485. },
  15486. "QuestionInfo": {
  15487. "type": "object",
  15488. "properties": {
  15489. "question": {
  15490. "type": "string",
  15491. "description": "Complete question"
  15492. },
  15493. "header": {
  15494. "type": "string",
  15495. "description": "Very short label (max 30 chars)"
  15496. },
  15497. "options": {
  15498. "type": "array",
  15499. "items": {
  15500. "$ref": "#/components/schemas/QuestionOption"
  15501. },
  15502. "description": "Available choices"
  15503. },
  15504. "multiple": {
  15505. "type": "boolean"
  15506. },
  15507. "custom": {
  15508. "type": "boolean"
  15509. }
  15510. },
  15511. "required": ["question", "header", "options"],
  15512. "additionalProperties": false
  15513. },
  15514. "QuestionTool": {
  15515. "type": "object",
  15516. "properties": {
  15517. "messageID": {
  15518. "type": "string",
  15519. "pattern": "^msg"
  15520. },
  15521. "callID": {
  15522. "type": "string"
  15523. }
  15524. },
  15525. "required": ["messageID", "callID"],
  15526. "additionalProperties": false
  15527. },
  15528. "QuestionAnswer": {
  15529. "type": "array",
  15530. "items": {
  15531. "type": "string"
  15532. }
  15533. },
  15534. "SessionStatus": {
  15535. "anyOf": [
  15536. {
  15537. "type": "object",
  15538. "properties": {
  15539. "type": {
  15540. "type": "string",
  15541. "enum": ["idle"]
  15542. }
  15543. },
  15544. "required": ["type"],
  15545. "additionalProperties": false
  15546. },
  15547. {
  15548. "type": "object",
  15549. "properties": {
  15550. "type": {
  15551. "type": "string",
  15552. "enum": ["retry"]
  15553. },
  15554. "attempt": {
  15555. "type": "integer",
  15556. "minimum": 0
  15557. },
  15558. "message": {
  15559. "type": "string"
  15560. },
  15561. "action": {
  15562. "type": "object",
  15563. "properties": {
  15564. "reason": {
  15565. "type": "string"
  15566. },
  15567. "provider": {
  15568. "type": "string"
  15569. },
  15570. "title": {
  15571. "type": "string"
  15572. },
  15573. "message": {
  15574. "type": "string"
  15575. },
  15576. "label": {
  15577. "type": "string"
  15578. },
  15579. "link": {
  15580. "type": "string"
  15581. }
  15582. },
  15583. "required": ["reason", "provider", "title", "message", "label"],
  15584. "additionalProperties": false
  15585. },
  15586. "next": {
  15587. "type": "integer",
  15588. "minimum": 0
  15589. }
  15590. },
  15591. "required": ["type", "attempt", "message", "next"],
  15592. "additionalProperties": false
  15593. },
  15594. {
  15595. "type": "object",
  15596. "properties": {
  15597. "type": {
  15598. "type": "string",
  15599. "enum": ["busy"]
  15600. }
  15601. },
  15602. "required": ["type"],
  15603. "additionalProperties": false
  15604. }
  15605. ]
  15606. },
  15607. "GlobalEvent": {
  15608. "type": "object",
  15609. "properties": {
  15610. "directory": {
  15611. "type": "string"
  15612. },
  15613. "project": {
  15614. "type": "string"
  15615. },
  15616. "workspace": {
  15617. "type": "string"
  15618. },
  15619. "payload": {
  15620. "anyOf": [
  15621. {
  15622. "type": "object",
  15623. "properties": {
  15624. "id": {
  15625. "type": "string",
  15626. "pattern": "^evt_"
  15627. },
  15628. "type": {
  15629. "type": "string",
  15630. "enum": ["models-dev.refreshed"]
  15631. },
  15632. "properties": {
  15633. "type": "object",
  15634. "properties": {}
  15635. }
  15636. },
  15637. "required": ["id", "type", "properties"],
  15638. "additionalProperties": false
  15639. },
  15640. {
  15641. "type": "object",
  15642. "properties": {
  15643. "id": {
  15644. "type": "string",
  15645. "pattern": "^evt_"
  15646. },
  15647. "type": {
  15648. "type": "string",
  15649. "enum": ["credential.added"]
  15650. },
  15651. "properties": {
  15652. "type": "object",
  15653. "properties": {
  15654. "credential": {
  15655. "$ref": "#/components/schemas/CredentialInfo"
  15656. }
  15657. },
  15658. "required": ["credential"],
  15659. "additionalProperties": false
  15660. }
  15661. },
  15662. "required": ["id", "type", "properties"],
  15663. "additionalProperties": false
  15664. },
  15665. {
  15666. "type": "object",
  15667. "properties": {
  15668. "id": {
  15669. "type": "string",
  15670. "pattern": "^evt_"
  15671. },
  15672. "type": {
  15673. "type": "string",
  15674. "enum": ["credential.removed"]
  15675. },
  15676. "properties": {
  15677. "type": "object",
  15678. "properties": {
  15679. "credential": {
  15680. "$ref": "#/components/schemas/CredentialInfo"
  15681. }
  15682. },
  15683. "required": ["credential"],
  15684. "additionalProperties": false
  15685. }
  15686. },
  15687. "required": ["id", "type", "properties"],
  15688. "additionalProperties": false
  15689. },
  15690. {
  15691. "type": "object",
  15692. "properties": {
  15693. "id": {
  15694. "type": "string",
  15695. "pattern": "^evt_"
  15696. },
  15697. "type": {
  15698. "type": "string",
  15699. "enum": ["credential.switched"]
  15700. },
  15701. "properties": {
  15702. "type": "object",
  15703. "properties": {
  15704. "connectorID": {
  15705. "type": "string"
  15706. },
  15707. "from": {
  15708. "type": "string"
  15709. },
  15710. "to": {
  15711. "type": "string"
  15712. }
  15713. },
  15714. "required": ["connectorID"],
  15715. "additionalProperties": false
  15716. }
  15717. },
  15718. "required": ["id", "type", "properties"],
  15719. "additionalProperties": false
  15720. },
  15721. {
  15722. "type": "object",
  15723. "properties": {
  15724. "id": {
  15725. "type": "string",
  15726. "pattern": "^evt_"
  15727. },
  15728. "type": {
  15729. "type": "string",
  15730. "enum": ["plugin.added"]
  15731. },
  15732. "properties": {
  15733. "type": "object",
  15734. "properties": {
  15735. "id": {
  15736. "type": "string"
  15737. }
  15738. },
  15739. "required": ["id"],
  15740. "additionalProperties": false
  15741. }
  15742. },
  15743. "required": ["id", "type", "properties"],
  15744. "additionalProperties": false
  15745. },
  15746. {
  15747. "type": "object",
  15748. "properties": {
  15749. "id": {
  15750. "type": "string",
  15751. "pattern": "^evt_"
  15752. },
  15753. "type": {
  15754. "type": "string",
  15755. "enum": ["catalog.model.updated"]
  15756. },
  15757. "properties": {
  15758. "type": "object",
  15759. "properties": {
  15760. "model": {
  15761. "$ref": "#/components/schemas/ModelV2Info"
  15762. }
  15763. },
  15764. "required": ["model"],
  15765. "additionalProperties": false
  15766. }
  15767. },
  15768. "required": ["id", "type", "properties"],
  15769. "additionalProperties": false
  15770. },
  15771. {
  15772. "type": "object",
  15773. "properties": {
  15774. "id": {
  15775. "type": "string",
  15776. "pattern": "^evt_"
  15777. },
  15778. "type": {
  15779. "type": "string",
  15780. "enum": ["session.created"]
  15781. },
  15782. "properties": {
  15783. "type": "object",
  15784. "properties": {
  15785. "sessionID": {
  15786. "type": "string",
  15787. "pattern": "^ses"
  15788. },
  15789. "info": {
  15790. "$ref": "#/components/schemas/Session"
  15791. }
  15792. },
  15793. "required": ["sessionID", "info"],
  15794. "additionalProperties": false
  15795. }
  15796. },
  15797. "required": ["id", "type", "properties"],
  15798. "additionalProperties": false
  15799. },
  15800. {
  15801. "type": "object",
  15802. "properties": {
  15803. "id": {
  15804. "type": "string",
  15805. "pattern": "^evt_"
  15806. },
  15807. "type": {
  15808. "type": "string",
  15809. "enum": ["session.updated"]
  15810. },
  15811. "properties": {
  15812. "type": "object",
  15813. "properties": {
  15814. "sessionID": {
  15815. "type": "string",
  15816. "pattern": "^ses"
  15817. },
  15818. "info": {
  15819. "$ref": "#/components/schemas/Session"
  15820. }
  15821. },
  15822. "required": ["sessionID", "info"],
  15823. "additionalProperties": false
  15824. }
  15825. },
  15826. "required": ["id", "type", "properties"],
  15827. "additionalProperties": false
  15828. },
  15829. {
  15830. "type": "object",
  15831. "properties": {
  15832. "id": {
  15833. "type": "string",
  15834. "pattern": "^evt_"
  15835. },
  15836. "type": {
  15837. "type": "string",
  15838. "enum": ["session.deleted"]
  15839. },
  15840. "properties": {
  15841. "type": "object",
  15842. "properties": {
  15843. "sessionID": {
  15844. "type": "string",
  15845. "pattern": "^ses"
  15846. },
  15847. "info": {
  15848. "$ref": "#/components/schemas/Session"
  15849. }
  15850. },
  15851. "required": ["sessionID", "info"],
  15852. "additionalProperties": false
  15853. }
  15854. },
  15855. "required": ["id", "type", "properties"],
  15856. "additionalProperties": false
  15857. },
  15858. {
  15859. "type": "object",
  15860. "properties": {
  15861. "id": {
  15862. "type": "string",
  15863. "pattern": "^evt_"
  15864. },
  15865. "type": {
  15866. "type": "string",
  15867. "enum": ["message.updated"]
  15868. },
  15869. "properties": {
  15870. "type": "object",
  15871. "properties": {
  15872. "sessionID": {
  15873. "type": "string",
  15874. "pattern": "^ses"
  15875. },
  15876. "info": {
  15877. "$ref": "#/components/schemas/Message"
  15878. }
  15879. },
  15880. "required": ["sessionID", "info"],
  15881. "additionalProperties": false
  15882. }
  15883. },
  15884. "required": ["id", "type", "properties"],
  15885. "additionalProperties": false
  15886. },
  15887. {
  15888. "type": "object",
  15889. "properties": {
  15890. "id": {
  15891. "type": "string",
  15892. "pattern": "^evt_"
  15893. },
  15894. "type": {
  15895. "type": "string",
  15896. "enum": ["message.removed"]
  15897. },
  15898. "properties": {
  15899. "type": "object",
  15900. "properties": {
  15901. "sessionID": {
  15902. "type": "string",
  15903. "pattern": "^ses"
  15904. },
  15905. "messageID": {
  15906. "type": "string",
  15907. "pattern": "^msg"
  15908. }
  15909. },
  15910. "required": ["sessionID", "messageID"],
  15911. "additionalProperties": false
  15912. }
  15913. },
  15914. "required": ["id", "type", "properties"],
  15915. "additionalProperties": false
  15916. },
  15917. {
  15918. "type": "object",
  15919. "properties": {
  15920. "id": {
  15921. "type": "string",
  15922. "pattern": "^evt_"
  15923. },
  15924. "type": {
  15925. "type": "string",
  15926. "enum": ["message.part.updated"]
  15927. },
  15928. "properties": {
  15929. "type": "object",
  15930. "properties": {
  15931. "sessionID": {
  15932. "type": "string",
  15933. "pattern": "^ses"
  15934. },
  15935. "part": {
  15936. "$ref": "#/components/schemas/Part"
  15937. },
  15938. "time": {
  15939. "type": "number"
  15940. }
  15941. },
  15942. "required": ["sessionID", "part", "time"],
  15943. "additionalProperties": false
  15944. }
  15945. },
  15946. "required": ["id", "type", "properties"],
  15947. "additionalProperties": false
  15948. },
  15949. {
  15950. "type": "object",
  15951. "properties": {
  15952. "id": {
  15953. "type": "string",
  15954. "pattern": "^evt_"
  15955. },
  15956. "type": {
  15957. "type": "string",
  15958. "enum": ["message.part.removed"]
  15959. },
  15960. "properties": {
  15961. "type": "object",
  15962. "properties": {
  15963. "sessionID": {
  15964. "type": "string",
  15965. "pattern": "^ses"
  15966. },
  15967. "messageID": {
  15968. "type": "string",
  15969. "pattern": "^msg"
  15970. },
  15971. "partID": {
  15972. "type": "string",
  15973. "pattern": "^prt"
  15974. }
  15975. },
  15976. "required": ["sessionID", "messageID", "partID"],
  15977. "additionalProperties": false
  15978. }
  15979. },
  15980. "required": ["id", "type", "properties"],
  15981. "additionalProperties": false
  15982. },
  15983. {
  15984. "type": "object",
  15985. "properties": {
  15986. "id": {
  15987. "type": "string",
  15988. "pattern": "^evt_"
  15989. },
  15990. "type": {
  15991. "type": "string",
  15992. "enum": ["session.next.agent.switched"]
  15993. },
  15994. "properties": {
  15995. "type": "object",
  15996. "properties": {
  15997. "timestamp": {
  15998. "type": "number"
  15999. },
  16000. "sessionID": {
  16001. "type": "string",
  16002. "pattern": "^ses"
  16003. },
  16004. "messageID": {
  16005. "type": "string",
  16006. "pattern": "^msg_"
  16007. },
  16008. "agent": {
  16009. "type": "string"
  16010. }
  16011. },
  16012. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16013. "additionalProperties": false
  16014. }
  16015. },
  16016. "required": ["id", "type", "properties"],
  16017. "additionalProperties": false
  16018. },
  16019. {
  16020. "type": "object",
  16021. "properties": {
  16022. "id": {
  16023. "type": "string",
  16024. "pattern": "^evt_"
  16025. },
  16026. "type": {
  16027. "type": "string",
  16028. "enum": ["session.next.model.switched"]
  16029. },
  16030. "properties": {
  16031. "type": "object",
  16032. "properties": {
  16033. "timestamp": {
  16034. "type": "number"
  16035. },
  16036. "sessionID": {
  16037. "type": "string",
  16038. "pattern": "^ses"
  16039. },
  16040. "messageID": {
  16041. "type": "string",
  16042. "pattern": "^msg_"
  16043. },
  16044. "model": {
  16045. "type": "object",
  16046. "properties": {
  16047. "id": {
  16048. "type": "string"
  16049. },
  16050. "providerID": {
  16051. "type": "string"
  16052. },
  16053. "variant": {
  16054. "type": "string"
  16055. }
  16056. },
  16057. "required": ["id", "providerID"],
  16058. "additionalProperties": false
  16059. }
  16060. },
  16061. "required": ["timestamp", "sessionID", "messageID", "model"],
  16062. "additionalProperties": false
  16063. }
  16064. },
  16065. "required": ["id", "type", "properties"],
  16066. "additionalProperties": false
  16067. },
  16068. {
  16069. "type": "object",
  16070. "properties": {
  16071. "id": {
  16072. "type": "string",
  16073. "pattern": "^evt_"
  16074. },
  16075. "type": {
  16076. "type": "string",
  16077. "enum": ["session.next.moved"]
  16078. },
  16079. "properties": {
  16080. "type": "object",
  16081. "properties": {
  16082. "timestamp": {
  16083. "type": "number"
  16084. },
  16085. "sessionID": {
  16086. "type": "string",
  16087. "pattern": "^ses"
  16088. },
  16089. "location": {
  16090. "$ref": "#/components/schemas/LocationRef"
  16091. },
  16092. "subdirectory": {
  16093. "type": "string"
  16094. }
  16095. },
  16096. "required": ["timestamp", "sessionID", "location"],
  16097. "additionalProperties": false
  16098. }
  16099. },
  16100. "required": ["id", "type", "properties"],
  16101. "additionalProperties": false
  16102. },
  16103. {
  16104. "type": "object",
  16105. "properties": {
  16106. "id": {
  16107. "type": "string",
  16108. "pattern": "^evt_"
  16109. },
  16110. "type": {
  16111. "type": "string",
  16112. "enum": ["session.next.prompted"]
  16113. },
  16114. "properties": {
  16115. "type": "object",
  16116. "properties": {
  16117. "timestamp": {
  16118. "type": "number"
  16119. },
  16120. "sessionID": {
  16121. "type": "string",
  16122. "pattern": "^ses"
  16123. },
  16124. "messageID": {
  16125. "type": "string",
  16126. "pattern": "^msg_"
  16127. },
  16128. "prompt": {
  16129. "$ref": "#/components/schemas/Prompt"
  16130. },
  16131. "delivery": {
  16132. "type": "string",
  16133. "enum": ["steer", "queue"]
  16134. }
  16135. },
  16136. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16137. "additionalProperties": false
  16138. }
  16139. },
  16140. "required": ["id", "type", "properties"],
  16141. "additionalProperties": false
  16142. },
  16143. {
  16144. "type": "object",
  16145. "properties": {
  16146. "id": {
  16147. "type": "string",
  16148. "pattern": "^evt_"
  16149. },
  16150. "type": {
  16151. "type": "string",
  16152. "enum": ["session.next.prompt.admitted"]
  16153. },
  16154. "properties": {
  16155. "type": "object",
  16156. "properties": {
  16157. "timestamp": {
  16158. "type": "number"
  16159. },
  16160. "sessionID": {
  16161. "type": "string",
  16162. "pattern": "^ses"
  16163. },
  16164. "messageID": {
  16165. "type": "string",
  16166. "pattern": "^msg_"
  16167. },
  16168. "prompt": {
  16169. "$ref": "#/components/schemas/Prompt"
  16170. },
  16171. "delivery": {
  16172. "type": "string",
  16173. "enum": ["steer", "queue"]
  16174. }
  16175. },
  16176. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16177. "additionalProperties": false
  16178. }
  16179. },
  16180. "required": ["id", "type", "properties"],
  16181. "additionalProperties": false
  16182. },
  16183. {
  16184. "type": "object",
  16185. "properties": {
  16186. "id": {
  16187. "type": "string",
  16188. "pattern": "^evt_"
  16189. },
  16190. "type": {
  16191. "type": "string",
  16192. "enum": ["session.next.prompt.promoted"]
  16193. },
  16194. "properties": {
  16195. "type": "object",
  16196. "properties": {
  16197. "timestamp": {
  16198. "type": "number"
  16199. },
  16200. "sessionID": {
  16201. "type": "string",
  16202. "pattern": "^ses"
  16203. },
  16204. "messageID": {
  16205. "type": "string",
  16206. "pattern": "^msg_"
  16207. },
  16208. "prompt": {
  16209. "$ref": "#/components/schemas/Prompt"
  16210. },
  16211. "timeCreated": {
  16212. "type": "number"
  16213. }
  16214. },
  16215. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  16216. "additionalProperties": false
  16217. }
  16218. },
  16219. "required": ["id", "type", "properties"],
  16220. "additionalProperties": false
  16221. },
  16222. {
  16223. "type": "object",
  16224. "properties": {
  16225. "id": {
  16226. "type": "string",
  16227. "pattern": "^evt_"
  16228. },
  16229. "type": {
  16230. "type": "string",
  16231. "enum": ["session.next.interrupt.requested"]
  16232. },
  16233. "properties": {
  16234. "type": "object",
  16235. "properties": {
  16236. "timestamp": {
  16237. "type": "number"
  16238. },
  16239. "sessionID": {
  16240. "type": "string",
  16241. "pattern": "^ses"
  16242. }
  16243. },
  16244. "required": ["timestamp", "sessionID"],
  16245. "additionalProperties": false
  16246. }
  16247. },
  16248. "required": ["id", "type", "properties"],
  16249. "additionalProperties": false
  16250. },
  16251. {
  16252. "type": "object",
  16253. "properties": {
  16254. "id": {
  16255. "type": "string",
  16256. "pattern": "^evt_"
  16257. },
  16258. "type": {
  16259. "type": "string",
  16260. "enum": ["session.next.context.updated"]
  16261. },
  16262. "properties": {
  16263. "type": "object",
  16264. "properties": {
  16265. "timestamp": {
  16266. "type": "number"
  16267. },
  16268. "sessionID": {
  16269. "type": "string",
  16270. "pattern": "^ses"
  16271. },
  16272. "messageID": {
  16273. "type": "string",
  16274. "pattern": "^msg_"
  16275. },
  16276. "text": {
  16277. "type": "string"
  16278. }
  16279. },
  16280. "required": ["timestamp", "sessionID", "messageID", "text"],
  16281. "additionalProperties": false
  16282. }
  16283. },
  16284. "required": ["id", "type", "properties"],
  16285. "additionalProperties": false
  16286. },
  16287. {
  16288. "type": "object",
  16289. "properties": {
  16290. "id": {
  16291. "type": "string",
  16292. "pattern": "^evt_"
  16293. },
  16294. "type": {
  16295. "type": "string",
  16296. "enum": ["session.next.synthetic"]
  16297. },
  16298. "properties": {
  16299. "type": "object",
  16300. "properties": {
  16301. "timestamp": {
  16302. "type": "number"
  16303. },
  16304. "sessionID": {
  16305. "type": "string",
  16306. "pattern": "^ses"
  16307. },
  16308. "messageID": {
  16309. "type": "string",
  16310. "pattern": "^msg_"
  16311. },
  16312. "text": {
  16313. "type": "string"
  16314. }
  16315. },
  16316. "required": ["timestamp", "sessionID", "messageID", "text"],
  16317. "additionalProperties": false
  16318. }
  16319. },
  16320. "required": ["id", "type", "properties"],
  16321. "additionalProperties": false
  16322. },
  16323. {
  16324. "type": "object",
  16325. "properties": {
  16326. "id": {
  16327. "type": "string",
  16328. "pattern": "^evt_"
  16329. },
  16330. "type": {
  16331. "type": "string",
  16332. "enum": ["session.next.shell.started"]
  16333. },
  16334. "properties": {
  16335. "type": "object",
  16336. "properties": {
  16337. "timestamp": {
  16338. "type": "number"
  16339. },
  16340. "sessionID": {
  16341. "type": "string",
  16342. "pattern": "^ses"
  16343. },
  16344. "messageID": {
  16345. "type": "string",
  16346. "pattern": "^msg_"
  16347. },
  16348. "callID": {
  16349. "type": "string"
  16350. },
  16351. "command": {
  16352. "type": "string"
  16353. }
  16354. },
  16355. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  16356. "additionalProperties": false
  16357. }
  16358. },
  16359. "required": ["id", "type", "properties"],
  16360. "additionalProperties": false
  16361. },
  16362. {
  16363. "type": "object",
  16364. "properties": {
  16365. "id": {
  16366. "type": "string",
  16367. "pattern": "^evt_"
  16368. },
  16369. "type": {
  16370. "type": "string",
  16371. "enum": ["session.next.shell.ended"]
  16372. },
  16373. "properties": {
  16374. "type": "object",
  16375. "properties": {
  16376. "timestamp": {
  16377. "type": "number"
  16378. },
  16379. "sessionID": {
  16380. "type": "string",
  16381. "pattern": "^ses"
  16382. },
  16383. "callID": {
  16384. "type": "string"
  16385. },
  16386. "output": {
  16387. "type": "string"
  16388. }
  16389. },
  16390. "required": ["timestamp", "sessionID", "callID", "output"],
  16391. "additionalProperties": false
  16392. }
  16393. },
  16394. "required": ["id", "type", "properties"],
  16395. "additionalProperties": false
  16396. },
  16397. {
  16398. "type": "object",
  16399. "properties": {
  16400. "id": {
  16401. "type": "string",
  16402. "pattern": "^evt_"
  16403. },
  16404. "type": {
  16405. "type": "string",
  16406. "enum": ["session.next.step.started"]
  16407. },
  16408. "properties": {
  16409. "type": "object",
  16410. "properties": {
  16411. "timestamp": {
  16412. "type": "number"
  16413. },
  16414. "sessionID": {
  16415. "type": "string",
  16416. "pattern": "^ses"
  16417. },
  16418. "assistantMessageID": {
  16419. "type": "string",
  16420. "pattern": "^msg_"
  16421. },
  16422. "agent": {
  16423. "type": "string"
  16424. },
  16425. "model": {
  16426. "type": "object",
  16427. "properties": {
  16428. "id": {
  16429. "type": "string"
  16430. },
  16431. "providerID": {
  16432. "type": "string"
  16433. },
  16434. "variant": {
  16435. "type": "string"
  16436. }
  16437. },
  16438. "required": ["id", "providerID"],
  16439. "additionalProperties": false
  16440. },
  16441. "snapshot": {
  16442. "type": "string"
  16443. }
  16444. },
  16445. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  16446. "additionalProperties": false
  16447. }
  16448. },
  16449. "required": ["id", "type", "properties"],
  16450. "additionalProperties": false
  16451. },
  16452. {
  16453. "type": "object",
  16454. "properties": {
  16455. "id": {
  16456. "type": "string",
  16457. "pattern": "^evt_"
  16458. },
  16459. "type": {
  16460. "type": "string",
  16461. "enum": ["session.next.step.ended"]
  16462. },
  16463. "properties": {
  16464. "type": "object",
  16465. "properties": {
  16466. "timestamp": {
  16467. "type": "number"
  16468. },
  16469. "sessionID": {
  16470. "type": "string",
  16471. "pattern": "^ses"
  16472. },
  16473. "assistantMessageID": {
  16474. "type": "string",
  16475. "pattern": "^msg_"
  16476. },
  16477. "finish": {
  16478. "type": "string"
  16479. },
  16480. "cost": {
  16481. "type": "number"
  16482. },
  16483. "tokens": {
  16484. "type": "object",
  16485. "properties": {
  16486. "input": {
  16487. "type": "number"
  16488. },
  16489. "output": {
  16490. "type": "number"
  16491. },
  16492. "reasoning": {
  16493. "type": "number"
  16494. },
  16495. "cache": {
  16496. "type": "object",
  16497. "properties": {
  16498. "read": {
  16499. "type": "number"
  16500. },
  16501. "write": {
  16502. "type": "number"
  16503. }
  16504. },
  16505. "required": ["read", "write"],
  16506. "additionalProperties": false
  16507. }
  16508. },
  16509. "required": ["input", "output", "reasoning", "cache"],
  16510. "additionalProperties": false
  16511. },
  16512. "snapshot": {
  16513. "type": "string"
  16514. }
  16515. },
  16516. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  16517. "additionalProperties": false
  16518. }
  16519. },
  16520. "required": ["id", "type", "properties"],
  16521. "additionalProperties": false
  16522. },
  16523. {
  16524. "type": "object",
  16525. "properties": {
  16526. "id": {
  16527. "type": "string",
  16528. "pattern": "^evt_"
  16529. },
  16530. "type": {
  16531. "type": "string",
  16532. "enum": ["session.next.step.failed"]
  16533. },
  16534. "properties": {
  16535. "type": "object",
  16536. "properties": {
  16537. "timestamp": {
  16538. "type": "number"
  16539. },
  16540. "sessionID": {
  16541. "type": "string",
  16542. "pattern": "^ses"
  16543. },
  16544. "assistantMessageID": {
  16545. "type": "string",
  16546. "pattern": "^msg_"
  16547. },
  16548. "error": {
  16549. "$ref": "#/components/schemas/SessionErrorUnknown"
  16550. }
  16551. },
  16552. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  16553. "additionalProperties": false
  16554. }
  16555. },
  16556. "required": ["id", "type", "properties"],
  16557. "additionalProperties": false
  16558. },
  16559. {
  16560. "type": "object",
  16561. "properties": {
  16562. "id": {
  16563. "type": "string",
  16564. "pattern": "^evt_"
  16565. },
  16566. "type": {
  16567. "type": "string",
  16568. "enum": ["session.next.text.started"]
  16569. },
  16570. "properties": {
  16571. "type": "object",
  16572. "properties": {
  16573. "timestamp": {
  16574. "type": "number"
  16575. },
  16576. "sessionID": {
  16577. "type": "string",
  16578. "pattern": "^ses"
  16579. },
  16580. "assistantMessageID": {
  16581. "type": "string",
  16582. "pattern": "^msg_"
  16583. },
  16584. "textID": {
  16585. "type": "string"
  16586. }
  16587. },
  16588. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  16589. "additionalProperties": false
  16590. }
  16591. },
  16592. "required": ["id", "type", "properties"],
  16593. "additionalProperties": false
  16594. },
  16595. {
  16596. "type": "object",
  16597. "properties": {
  16598. "id": {
  16599. "type": "string",
  16600. "pattern": "^evt_"
  16601. },
  16602. "type": {
  16603. "type": "string",
  16604. "enum": ["session.next.text.delta"]
  16605. },
  16606. "properties": {
  16607. "type": "object",
  16608. "properties": {
  16609. "timestamp": {
  16610. "type": "number"
  16611. },
  16612. "sessionID": {
  16613. "type": "string",
  16614. "pattern": "^ses"
  16615. },
  16616. "assistantMessageID": {
  16617. "type": "string",
  16618. "pattern": "^msg_"
  16619. },
  16620. "textID": {
  16621. "type": "string"
  16622. },
  16623. "delta": {
  16624. "type": "string"
  16625. }
  16626. },
  16627. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  16628. "additionalProperties": false
  16629. }
  16630. },
  16631. "required": ["id", "type", "properties"],
  16632. "additionalProperties": false
  16633. },
  16634. {
  16635. "type": "object",
  16636. "properties": {
  16637. "id": {
  16638. "type": "string",
  16639. "pattern": "^evt_"
  16640. },
  16641. "type": {
  16642. "type": "string",
  16643. "enum": ["session.next.text.ended"]
  16644. },
  16645. "properties": {
  16646. "type": "object",
  16647. "properties": {
  16648. "timestamp": {
  16649. "type": "number"
  16650. },
  16651. "sessionID": {
  16652. "type": "string",
  16653. "pattern": "^ses"
  16654. },
  16655. "assistantMessageID": {
  16656. "type": "string",
  16657. "pattern": "^msg_"
  16658. },
  16659. "textID": {
  16660. "type": "string"
  16661. },
  16662. "text": {
  16663. "type": "string"
  16664. }
  16665. },
  16666. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  16667. "additionalProperties": false
  16668. }
  16669. },
  16670. "required": ["id", "type", "properties"],
  16671. "additionalProperties": false
  16672. },
  16673. {
  16674. "type": "object",
  16675. "properties": {
  16676. "id": {
  16677. "type": "string",
  16678. "pattern": "^evt_"
  16679. },
  16680. "type": {
  16681. "type": "string",
  16682. "enum": ["session.next.reasoning.started"]
  16683. },
  16684. "properties": {
  16685. "type": "object",
  16686. "properties": {
  16687. "timestamp": {
  16688. "type": "number"
  16689. },
  16690. "sessionID": {
  16691. "type": "string",
  16692. "pattern": "^ses"
  16693. },
  16694. "assistantMessageID": {
  16695. "type": "string",
  16696. "pattern": "^msg_"
  16697. },
  16698. "reasoningID": {
  16699. "type": "string"
  16700. },
  16701. "providerMetadata": {
  16702. "type": "object",
  16703. "additionalProperties": {
  16704. "type": "object"
  16705. }
  16706. }
  16707. },
  16708. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  16709. "additionalProperties": false
  16710. }
  16711. },
  16712. "required": ["id", "type", "properties"],
  16713. "additionalProperties": false
  16714. },
  16715. {
  16716. "type": "object",
  16717. "properties": {
  16718. "id": {
  16719. "type": "string",
  16720. "pattern": "^evt_"
  16721. },
  16722. "type": {
  16723. "type": "string",
  16724. "enum": ["session.next.reasoning.delta"]
  16725. },
  16726. "properties": {
  16727. "type": "object",
  16728. "properties": {
  16729. "timestamp": {
  16730. "type": "number"
  16731. },
  16732. "sessionID": {
  16733. "type": "string",
  16734. "pattern": "^ses"
  16735. },
  16736. "assistantMessageID": {
  16737. "type": "string",
  16738. "pattern": "^msg_"
  16739. },
  16740. "reasoningID": {
  16741. "type": "string"
  16742. },
  16743. "delta": {
  16744. "type": "string"
  16745. }
  16746. },
  16747. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  16748. "additionalProperties": false
  16749. }
  16750. },
  16751. "required": ["id", "type", "properties"],
  16752. "additionalProperties": false
  16753. },
  16754. {
  16755. "type": "object",
  16756. "properties": {
  16757. "id": {
  16758. "type": "string",
  16759. "pattern": "^evt_"
  16760. },
  16761. "type": {
  16762. "type": "string",
  16763. "enum": ["session.next.reasoning.ended"]
  16764. },
  16765. "properties": {
  16766. "type": "object",
  16767. "properties": {
  16768. "timestamp": {
  16769. "type": "number"
  16770. },
  16771. "sessionID": {
  16772. "type": "string",
  16773. "pattern": "^ses"
  16774. },
  16775. "assistantMessageID": {
  16776. "type": "string",
  16777. "pattern": "^msg_"
  16778. },
  16779. "reasoningID": {
  16780. "type": "string"
  16781. },
  16782. "text": {
  16783. "type": "string"
  16784. },
  16785. "providerMetadata": {
  16786. "type": "object",
  16787. "additionalProperties": {
  16788. "type": "object"
  16789. }
  16790. }
  16791. },
  16792. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  16793. "additionalProperties": false
  16794. }
  16795. },
  16796. "required": ["id", "type", "properties"],
  16797. "additionalProperties": false
  16798. },
  16799. {
  16800. "type": "object",
  16801. "properties": {
  16802. "id": {
  16803. "type": "string",
  16804. "pattern": "^evt_"
  16805. },
  16806. "type": {
  16807. "type": "string",
  16808. "enum": ["session.next.tool.input.started"]
  16809. },
  16810. "properties": {
  16811. "type": "object",
  16812. "properties": {
  16813. "timestamp": {
  16814. "type": "number"
  16815. },
  16816. "sessionID": {
  16817. "type": "string",
  16818. "pattern": "^ses"
  16819. },
  16820. "assistantMessageID": {
  16821. "type": "string",
  16822. "pattern": "^msg_"
  16823. },
  16824. "callID": {
  16825. "type": "string"
  16826. },
  16827. "name": {
  16828. "type": "string"
  16829. }
  16830. },
  16831. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  16832. "additionalProperties": false
  16833. }
  16834. },
  16835. "required": ["id", "type", "properties"],
  16836. "additionalProperties": false
  16837. },
  16838. {
  16839. "type": "object",
  16840. "properties": {
  16841. "id": {
  16842. "type": "string",
  16843. "pattern": "^evt_"
  16844. },
  16845. "type": {
  16846. "type": "string",
  16847. "enum": ["session.next.tool.input.delta"]
  16848. },
  16849. "properties": {
  16850. "type": "object",
  16851. "properties": {
  16852. "timestamp": {
  16853. "type": "number"
  16854. },
  16855. "sessionID": {
  16856. "type": "string",
  16857. "pattern": "^ses"
  16858. },
  16859. "assistantMessageID": {
  16860. "type": "string",
  16861. "pattern": "^msg_"
  16862. },
  16863. "callID": {
  16864. "type": "string"
  16865. },
  16866. "delta": {
  16867. "type": "string"
  16868. }
  16869. },
  16870. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  16871. "additionalProperties": false
  16872. }
  16873. },
  16874. "required": ["id", "type", "properties"],
  16875. "additionalProperties": false
  16876. },
  16877. {
  16878. "type": "object",
  16879. "properties": {
  16880. "id": {
  16881. "type": "string",
  16882. "pattern": "^evt_"
  16883. },
  16884. "type": {
  16885. "type": "string",
  16886. "enum": ["session.next.tool.input.ended"]
  16887. },
  16888. "properties": {
  16889. "type": "object",
  16890. "properties": {
  16891. "timestamp": {
  16892. "type": "number"
  16893. },
  16894. "sessionID": {
  16895. "type": "string",
  16896. "pattern": "^ses"
  16897. },
  16898. "assistantMessageID": {
  16899. "type": "string",
  16900. "pattern": "^msg_"
  16901. },
  16902. "callID": {
  16903. "type": "string"
  16904. },
  16905. "text": {
  16906. "type": "string"
  16907. }
  16908. },
  16909. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  16910. "additionalProperties": false
  16911. }
  16912. },
  16913. "required": ["id", "type", "properties"],
  16914. "additionalProperties": false
  16915. },
  16916. {
  16917. "type": "object",
  16918. "properties": {
  16919. "id": {
  16920. "type": "string",
  16921. "pattern": "^evt_"
  16922. },
  16923. "type": {
  16924. "type": "string",
  16925. "enum": ["session.next.tool.called"]
  16926. },
  16927. "properties": {
  16928. "type": "object",
  16929. "properties": {
  16930. "timestamp": {
  16931. "type": "number"
  16932. },
  16933. "sessionID": {
  16934. "type": "string",
  16935. "pattern": "^ses"
  16936. },
  16937. "assistantMessageID": {
  16938. "type": "string",
  16939. "pattern": "^msg_"
  16940. },
  16941. "callID": {
  16942. "type": "string"
  16943. },
  16944. "tool": {
  16945. "type": "string"
  16946. },
  16947. "input": {
  16948. "type": "object"
  16949. },
  16950. "provider": {
  16951. "type": "object",
  16952. "properties": {
  16953. "executed": {
  16954. "type": "boolean"
  16955. },
  16956. "metadata": {
  16957. "type": "object",
  16958. "additionalProperties": {
  16959. "type": "object"
  16960. }
  16961. }
  16962. },
  16963. "required": ["executed"],
  16964. "additionalProperties": false
  16965. }
  16966. },
  16967. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  16968. "additionalProperties": false
  16969. }
  16970. },
  16971. "required": ["id", "type", "properties"],
  16972. "additionalProperties": false
  16973. },
  16974. {
  16975. "type": "object",
  16976. "properties": {
  16977. "id": {
  16978. "type": "string",
  16979. "pattern": "^evt_"
  16980. },
  16981. "type": {
  16982. "type": "string",
  16983. "enum": ["session.next.tool.progress"]
  16984. },
  16985. "properties": {
  16986. "type": "object",
  16987. "properties": {
  16988. "timestamp": {
  16989. "type": "number"
  16990. },
  16991. "sessionID": {
  16992. "type": "string",
  16993. "pattern": "^ses"
  16994. },
  16995. "assistantMessageID": {
  16996. "type": "string",
  16997. "pattern": "^msg_"
  16998. },
  16999. "callID": {
  17000. "type": "string"
  17001. },
  17002. "structured": {
  17003. "type": "object"
  17004. },
  17005. "content": {
  17006. "type": "array",
  17007. "items": {
  17008. "anyOf": [
  17009. {
  17010. "$ref": "#/components/schemas/ToolTextContent"
  17011. },
  17012. {
  17013. "$ref": "#/components/schemas/ToolFileContent"
  17014. }
  17015. ]
  17016. }
  17017. }
  17018. },
  17019. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17020. "additionalProperties": false
  17021. }
  17022. },
  17023. "required": ["id", "type", "properties"],
  17024. "additionalProperties": false
  17025. },
  17026. {
  17027. "type": "object",
  17028. "properties": {
  17029. "id": {
  17030. "type": "string",
  17031. "pattern": "^evt_"
  17032. },
  17033. "type": {
  17034. "type": "string",
  17035. "enum": ["session.next.tool.success"]
  17036. },
  17037. "properties": {
  17038. "type": "object",
  17039. "properties": {
  17040. "timestamp": {
  17041. "type": "number"
  17042. },
  17043. "sessionID": {
  17044. "type": "string",
  17045. "pattern": "^ses"
  17046. },
  17047. "assistantMessageID": {
  17048. "type": "string",
  17049. "pattern": "^msg_"
  17050. },
  17051. "callID": {
  17052. "type": "string"
  17053. },
  17054. "structured": {
  17055. "type": "object"
  17056. },
  17057. "content": {
  17058. "type": "array",
  17059. "items": {
  17060. "anyOf": [
  17061. {
  17062. "$ref": "#/components/schemas/ToolTextContent"
  17063. },
  17064. {
  17065. "$ref": "#/components/schemas/ToolFileContent"
  17066. }
  17067. ]
  17068. }
  17069. },
  17070. "outputPaths": {
  17071. "type": "array",
  17072. "items": {
  17073. "type": "string"
  17074. }
  17075. },
  17076. "result": {},
  17077. "provider": {
  17078. "type": "object",
  17079. "properties": {
  17080. "executed": {
  17081. "type": "boolean"
  17082. },
  17083. "metadata": {
  17084. "type": "object",
  17085. "additionalProperties": {
  17086. "type": "object"
  17087. }
  17088. }
  17089. },
  17090. "required": ["executed"],
  17091. "additionalProperties": false
  17092. }
  17093. },
  17094. "required": [
  17095. "timestamp",
  17096. "sessionID",
  17097. "assistantMessageID",
  17098. "callID",
  17099. "structured",
  17100. "content",
  17101. "provider"
  17102. ],
  17103. "additionalProperties": false
  17104. }
  17105. },
  17106. "required": ["id", "type", "properties"],
  17107. "additionalProperties": false
  17108. },
  17109. {
  17110. "type": "object",
  17111. "properties": {
  17112. "id": {
  17113. "type": "string",
  17114. "pattern": "^evt_"
  17115. },
  17116. "type": {
  17117. "type": "string",
  17118. "enum": ["session.next.tool.failed"]
  17119. },
  17120. "properties": {
  17121. "type": "object",
  17122. "properties": {
  17123. "timestamp": {
  17124. "type": "number"
  17125. },
  17126. "sessionID": {
  17127. "type": "string",
  17128. "pattern": "^ses"
  17129. },
  17130. "assistantMessageID": {
  17131. "type": "string",
  17132. "pattern": "^msg_"
  17133. },
  17134. "callID": {
  17135. "type": "string"
  17136. },
  17137. "error": {
  17138. "$ref": "#/components/schemas/SessionErrorUnknown"
  17139. },
  17140. "result": {},
  17141. "provider": {
  17142. "type": "object",
  17143. "properties": {
  17144. "executed": {
  17145. "type": "boolean"
  17146. },
  17147. "metadata": {
  17148. "type": "object",
  17149. "additionalProperties": {
  17150. "type": "object"
  17151. }
  17152. }
  17153. },
  17154. "required": ["executed"],
  17155. "additionalProperties": false
  17156. }
  17157. },
  17158. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  17159. "additionalProperties": false
  17160. }
  17161. },
  17162. "required": ["id", "type", "properties"],
  17163. "additionalProperties": false
  17164. },
  17165. {
  17166. "type": "object",
  17167. "properties": {
  17168. "id": {
  17169. "type": "string",
  17170. "pattern": "^evt_"
  17171. },
  17172. "type": {
  17173. "type": "string",
  17174. "enum": ["session.next.retried"]
  17175. },
  17176. "properties": {
  17177. "type": "object",
  17178. "properties": {
  17179. "timestamp": {
  17180. "type": "number"
  17181. },
  17182. "sessionID": {
  17183. "type": "string",
  17184. "pattern": "^ses"
  17185. },
  17186. "attempt": {
  17187. "type": "number"
  17188. },
  17189. "error": {
  17190. "$ref": "#/components/schemas/SessionNextRetry_error"
  17191. }
  17192. },
  17193. "required": ["timestamp", "sessionID", "attempt", "error"],
  17194. "additionalProperties": false
  17195. }
  17196. },
  17197. "required": ["id", "type", "properties"],
  17198. "additionalProperties": false
  17199. },
  17200. {
  17201. "type": "object",
  17202. "properties": {
  17203. "id": {
  17204. "type": "string",
  17205. "pattern": "^evt_"
  17206. },
  17207. "type": {
  17208. "type": "string",
  17209. "enum": ["session.next.compaction.started"]
  17210. },
  17211. "properties": {
  17212. "type": "object",
  17213. "properties": {
  17214. "timestamp": {
  17215. "type": "number"
  17216. },
  17217. "sessionID": {
  17218. "type": "string",
  17219. "pattern": "^ses"
  17220. },
  17221. "messageID": {
  17222. "type": "string",
  17223. "pattern": "^msg_"
  17224. },
  17225. "reason": {
  17226. "type": "string",
  17227. "enum": ["auto", "manual"]
  17228. }
  17229. },
  17230. "required": ["timestamp", "sessionID", "messageID", "reason"],
  17231. "additionalProperties": false
  17232. }
  17233. },
  17234. "required": ["id", "type", "properties"],
  17235. "additionalProperties": false
  17236. },
  17237. {
  17238. "type": "object",
  17239. "properties": {
  17240. "id": {
  17241. "type": "string",
  17242. "pattern": "^evt_"
  17243. },
  17244. "type": {
  17245. "type": "string",
  17246. "enum": ["session.next.compaction.delta"]
  17247. },
  17248. "properties": {
  17249. "type": "object",
  17250. "properties": {
  17251. "timestamp": {
  17252. "type": "number"
  17253. },
  17254. "sessionID": {
  17255. "type": "string",
  17256. "pattern": "^ses"
  17257. },
  17258. "messageID": {
  17259. "type": "string",
  17260. "pattern": "^msg_"
  17261. },
  17262. "text": {
  17263. "type": "string"
  17264. }
  17265. },
  17266. "required": ["timestamp", "sessionID", "messageID", "text"],
  17267. "additionalProperties": false
  17268. }
  17269. },
  17270. "required": ["id", "type", "properties"],
  17271. "additionalProperties": false
  17272. },
  17273. {
  17274. "type": "object",
  17275. "properties": {
  17276. "id": {
  17277. "type": "string",
  17278. "pattern": "^evt_"
  17279. },
  17280. "type": {
  17281. "type": "string",
  17282. "enum": ["session.next.compaction.ended"]
  17283. },
  17284. "properties": {
  17285. "type": "object",
  17286. "properties": {
  17287. "timestamp": {
  17288. "type": "number"
  17289. },
  17290. "sessionID": {
  17291. "type": "string",
  17292. "pattern": "^ses"
  17293. },
  17294. "messageID": {
  17295. "type": "string",
  17296. "pattern": "^msg_"
  17297. },
  17298. "reason": {
  17299. "type": "string",
  17300. "enum": ["auto", "manual"]
  17301. },
  17302. "text": {
  17303. "type": "string"
  17304. },
  17305. "recent": {
  17306. "type": "string"
  17307. }
  17308. },
  17309. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  17310. "additionalProperties": false
  17311. }
  17312. },
  17313. "required": ["id", "type", "properties"],
  17314. "additionalProperties": false
  17315. },
  17316. {
  17317. "type": "object",
  17318. "properties": {
  17319. "id": {
  17320. "type": "string",
  17321. "pattern": "^evt_"
  17322. },
  17323. "type": {
  17324. "type": "string",
  17325. "enum": ["message.part.delta"]
  17326. },
  17327. "properties": {
  17328. "type": "object",
  17329. "properties": {
  17330. "sessionID": {
  17331. "type": "string",
  17332. "pattern": "^ses"
  17333. },
  17334. "messageID": {
  17335. "type": "string",
  17336. "pattern": "^msg"
  17337. },
  17338. "partID": {
  17339. "type": "string",
  17340. "pattern": "^prt"
  17341. },
  17342. "field": {
  17343. "type": "string"
  17344. },
  17345. "delta": {
  17346. "type": "string"
  17347. }
  17348. },
  17349. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17350. "additionalProperties": false
  17351. }
  17352. },
  17353. "required": ["id", "type", "properties"],
  17354. "additionalProperties": false
  17355. },
  17356. {
  17357. "type": "object",
  17358. "properties": {
  17359. "id": {
  17360. "type": "string",
  17361. "pattern": "^evt_"
  17362. },
  17363. "type": {
  17364. "type": "string",
  17365. "enum": ["session.diff"]
  17366. },
  17367. "properties": {
  17368. "type": "object",
  17369. "properties": {
  17370. "sessionID": {
  17371. "type": "string",
  17372. "pattern": "^ses"
  17373. },
  17374. "diff": {
  17375. "type": "array",
  17376. "items": {
  17377. "$ref": "#/components/schemas/SnapshotFileDiff"
  17378. }
  17379. }
  17380. },
  17381. "required": ["sessionID", "diff"],
  17382. "additionalProperties": false
  17383. }
  17384. },
  17385. "required": ["id", "type", "properties"],
  17386. "additionalProperties": false
  17387. },
  17388. {
  17389. "type": "object",
  17390. "properties": {
  17391. "id": {
  17392. "type": "string",
  17393. "pattern": "^evt_"
  17394. },
  17395. "type": {
  17396. "type": "string",
  17397. "enum": ["session.error"]
  17398. },
  17399. "properties": {
  17400. "type": "object",
  17401. "properties": {
  17402. "sessionID": {
  17403. "type": "string",
  17404. "pattern": "^ses"
  17405. },
  17406. "error": {
  17407. "anyOf": [
  17408. {
  17409. "$ref": "#/components/schemas/ProviderAuthError"
  17410. },
  17411. {
  17412. "$ref": "#/components/schemas/UnknownError"
  17413. },
  17414. {
  17415. "$ref": "#/components/schemas/MessageOutputLengthError"
  17416. },
  17417. {
  17418. "$ref": "#/components/schemas/MessageAbortedError"
  17419. },
  17420. {
  17421. "$ref": "#/components/schemas/StructuredOutputError"
  17422. },
  17423. {
  17424. "$ref": "#/components/schemas/ContextOverflowError"
  17425. },
  17426. {
  17427. "$ref": "#/components/schemas/ContentFilterError"
  17428. },
  17429. {
  17430. "$ref": "#/components/schemas/APIError"
  17431. }
  17432. ]
  17433. }
  17434. },
  17435. "additionalProperties": false
  17436. }
  17437. },
  17438. "required": ["id", "type", "properties"],
  17439. "additionalProperties": false
  17440. },
  17441. {
  17442. "type": "object",
  17443. "properties": {
  17444. "id": {
  17445. "type": "string",
  17446. "pattern": "^evt_"
  17447. },
  17448. "type": {
  17449. "type": "string",
  17450. "enum": ["installation.updated"]
  17451. },
  17452. "properties": {
  17453. "type": "object",
  17454. "properties": {
  17455. "version": {
  17456. "type": "string"
  17457. }
  17458. },
  17459. "required": ["version"],
  17460. "additionalProperties": false
  17461. }
  17462. },
  17463. "required": ["id", "type", "properties"],
  17464. "additionalProperties": false
  17465. },
  17466. {
  17467. "type": "object",
  17468. "properties": {
  17469. "id": {
  17470. "type": "string",
  17471. "pattern": "^evt_"
  17472. },
  17473. "type": {
  17474. "type": "string",
  17475. "enum": ["installation.update-available"]
  17476. },
  17477. "properties": {
  17478. "type": "object",
  17479. "properties": {
  17480. "version": {
  17481. "type": "string"
  17482. }
  17483. },
  17484. "required": ["version"],
  17485. "additionalProperties": false
  17486. }
  17487. },
  17488. "required": ["id", "type", "properties"],
  17489. "additionalProperties": false
  17490. },
  17491. {
  17492. "type": "object",
  17493. "properties": {
  17494. "id": {
  17495. "type": "string",
  17496. "pattern": "^evt_"
  17497. },
  17498. "type": {
  17499. "type": "string",
  17500. "enum": ["file.edited"]
  17501. },
  17502. "properties": {
  17503. "type": "object",
  17504. "properties": {
  17505. "file": {
  17506. "type": "string"
  17507. }
  17508. },
  17509. "required": ["file"],
  17510. "additionalProperties": false
  17511. }
  17512. },
  17513. "required": ["id", "type", "properties"],
  17514. "additionalProperties": false
  17515. },
  17516. {
  17517. "type": "object",
  17518. "properties": {
  17519. "id": {
  17520. "type": "string",
  17521. "pattern": "^evt_"
  17522. },
  17523. "type": {
  17524. "type": "string",
  17525. "enum": ["connector.updated"]
  17526. },
  17527. "properties": {
  17528. "type": "object",
  17529. "properties": {}
  17530. }
  17531. },
  17532. "required": ["id", "type", "properties"],
  17533. "additionalProperties": false
  17534. },
  17535. {
  17536. "type": "object",
  17537. "properties": {
  17538. "id": {
  17539. "type": "string",
  17540. "pattern": "^evt_"
  17541. },
  17542. "type": {
  17543. "type": "string",
  17544. "enum": ["permission.v2.asked"]
  17545. },
  17546. "properties": {
  17547. "type": "object",
  17548. "properties": {
  17549. "id": {
  17550. "type": "string",
  17551. "pattern": "^per"
  17552. },
  17553. "sessionID": {
  17554. "type": "string",
  17555. "pattern": "^ses"
  17556. },
  17557. "action": {
  17558. "type": "string"
  17559. },
  17560. "resources": {
  17561. "type": "array",
  17562. "items": {
  17563. "type": "string"
  17564. }
  17565. },
  17566. "save": {
  17567. "type": "array",
  17568. "items": {
  17569. "type": "string"
  17570. }
  17571. },
  17572. "metadata": {
  17573. "type": "object"
  17574. },
  17575. "source": {
  17576. "$ref": "#/components/schemas/PermissionV2Source"
  17577. }
  17578. },
  17579. "required": ["id", "sessionID", "action", "resources"],
  17580. "additionalProperties": false
  17581. }
  17582. },
  17583. "required": ["id", "type", "properties"],
  17584. "additionalProperties": false
  17585. },
  17586. {
  17587. "type": "object",
  17588. "properties": {
  17589. "id": {
  17590. "type": "string",
  17591. "pattern": "^evt_"
  17592. },
  17593. "type": {
  17594. "type": "string",
  17595. "enum": ["permission.v2.replied"]
  17596. },
  17597. "properties": {
  17598. "type": "object",
  17599. "properties": {
  17600. "sessionID": {
  17601. "type": "string",
  17602. "pattern": "^ses"
  17603. },
  17604. "requestID": {
  17605. "type": "string",
  17606. "pattern": "^per"
  17607. },
  17608. "reply": {
  17609. "$ref": "#/components/schemas/PermissionV2Reply"
  17610. }
  17611. },
  17612. "required": ["sessionID", "requestID", "reply"],
  17613. "additionalProperties": false
  17614. }
  17615. },
  17616. "required": ["id", "type", "properties"],
  17617. "additionalProperties": false
  17618. },
  17619. {
  17620. "type": "object",
  17621. "properties": {
  17622. "id": {
  17623. "type": "string",
  17624. "pattern": "^evt_"
  17625. },
  17626. "type": {
  17627. "type": "string",
  17628. "enum": ["reference.updated"]
  17629. },
  17630. "properties": {
  17631. "type": "object",
  17632. "properties": {}
  17633. }
  17634. },
  17635. "required": ["id", "type", "properties"],
  17636. "additionalProperties": false
  17637. },
  17638. {
  17639. "type": "object",
  17640. "properties": {
  17641. "id": {
  17642. "type": "string",
  17643. "pattern": "^evt_"
  17644. },
  17645. "type": {
  17646. "type": "string",
  17647. "enum": ["file.watcher.updated"]
  17648. },
  17649. "properties": {
  17650. "type": "object",
  17651. "properties": {
  17652. "file": {
  17653. "type": "string"
  17654. },
  17655. "event": {
  17656. "type": "string",
  17657. "enum": ["add", "change", "unlink"]
  17658. }
  17659. },
  17660. "required": ["file", "event"],
  17661. "additionalProperties": false
  17662. }
  17663. },
  17664. "required": ["id", "type", "properties"],
  17665. "additionalProperties": false
  17666. },
  17667. {
  17668. "type": "object",
  17669. "properties": {
  17670. "id": {
  17671. "type": "string",
  17672. "pattern": "^evt_"
  17673. },
  17674. "type": {
  17675. "type": "string",
  17676. "enum": ["pty.created"]
  17677. },
  17678. "properties": {
  17679. "type": "object",
  17680. "properties": {
  17681. "info": {
  17682. "$ref": "#/components/schemas/Pty"
  17683. }
  17684. },
  17685. "required": ["info"],
  17686. "additionalProperties": false
  17687. }
  17688. },
  17689. "required": ["id", "type", "properties"],
  17690. "additionalProperties": false
  17691. },
  17692. {
  17693. "type": "object",
  17694. "properties": {
  17695. "id": {
  17696. "type": "string",
  17697. "pattern": "^evt_"
  17698. },
  17699. "type": {
  17700. "type": "string",
  17701. "enum": ["pty.updated"]
  17702. },
  17703. "properties": {
  17704. "type": "object",
  17705. "properties": {
  17706. "info": {
  17707. "$ref": "#/components/schemas/Pty"
  17708. }
  17709. },
  17710. "required": ["info"],
  17711. "additionalProperties": false
  17712. }
  17713. },
  17714. "required": ["id", "type", "properties"],
  17715. "additionalProperties": false
  17716. },
  17717. {
  17718. "type": "object",
  17719. "properties": {
  17720. "id": {
  17721. "type": "string",
  17722. "pattern": "^evt_"
  17723. },
  17724. "type": {
  17725. "type": "string",
  17726. "enum": ["pty.exited"]
  17727. },
  17728. "properties": {
  17729. "type": "object",
  17730. "properties": {
  17731. "id": {
  17732. "type": "string",
  17733. "pattern": "^pty"
  17734. },
  17735. "exitCode": {
  17736. "type": "integer",
  17737. "minimum": 0
  17738. }
  17739. },
  17740. "required": ["id", "exitCode"],
  17741. "additionalProperties": false
  17742. }
  17743. },
  17744. "required": ["id", "type", "properties"],
  17745. "additionalProperties": false
  17746. },
  17747. {
  17748. "type": "object",
  17749. "properties": {
  17750. "id": {
  17751. "type": "string",
  17752. "pattern": "^evt_"
  17753. },
  17754. "type": {
  17755. "type": "string",
  17756. "enum": ["pty.deleted"]
  17757. },
  17758. "properties": {
  17759. "type": "object",
  17760. "properties": {
  17761. "id": {
  17762. "type": "string",
  17763. "pattern": "^pty"
  17764. }
  17765. },
  17766. "required": ["id"],
  17767. "additionalProperties": false
  17768. }
  17769. },
  17770. "required": ["id", "type", "properties"],
  17771. "additionalProperties": false
  17772. },
  17773. {
  17774. "type": "object",
  17775. "properties": {
  17776. "id": {
  17777. "type": "string",
  17778. "pattern": "^evt_"
  17779. },
  17780. "type": {
  17781. "type": "string",
  17782. "enum": ["question.v2.asked"]
  17783. },
  17784. "properties": {
  17785. "type": "object",
  17786. "properties": {
  17787. "id": {
  17788. "type": "string",
  17789. "pattern": "^que"
  17790. },
  17791. "sessionID": {
  17792. "type": "string",
  17793. "pattern": "^ses"
  17794. },
  17795. "questions": {
  17796. "type": "array",
  17797. "items": {
  17798. "$ref": "#/components/schemas/QuestionV2Info"
  17799. },
  17800. "description": "Questions to ask"
  17801. },
  17802. "tool": {
  17803. "$ref": "#/components/schemas/QuestionV2Tool"
  17804. }
  17805. },
  17806. "required": ["id", "sessionID", "questions"],
  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": ["question.v2.replied"]
  17823. },
  17824. "properties": {
  17825. "type": "object",
  17826. "properties": {
  17827. "sessionID": {
  17828. "type": "string",
  17829. "pattern": "^ses"
  17830. },
  17831. "requestID": {
  17832. "type": "string",
  17833. "pattern": "^que"
  17834. },
  17835. "answers": {
  17836. "type": "array",
  17837. "items": {
  17838. "$ref": "#/components/schemas/QuestionV2Answer"
  17839. }
  17840. }
  17841. },
  17842. "required": ["sessionID", "requestID", "answers"],
  17843. "additionalProperties": false
  17844. }
  17845. },
  17846. "required": ["id", "type", "properties"],
  17847. "additionalProperties": false
  17848. },
  17849. {
  17850. "type": "object",
  17851. "properties": {
  17852. "id": {
  17853. "type": "string",
  17854. "pattern": "^evt_"
  17855. },
  17856. "type": {
  17857. "type": "string",
  17858. "enum": ["question.v2.rejected"]
  17859. },
  17860. "properties": {
  17861. "type": "object",
  17862. "properties": {
  17863. "sessionID": {
  17864. "type": "string",
  17865. "pattern": "^ses"
  17866. },
  17867. "requestID": {
  17868. "type": "string",
  17869. "pattern": "^que"
  17870. }
  17871. },
  17872. "required": ["sessionID", "requestID"],
  17873. "additionalProperties": false
  17874. }
  17875. },
  17876. "required": ["id", "type", "properties"],
  17877. "additionalProperties": false
  17878. },
  17879. {
  17880. "type": "object",
  17881. "properties": {
  17882. "id": {
  17883. "type": "string",
  17884. "pattern": "^evt_"
  17885. },
  17886. "type": {
  17887. "type": "string",
  17888. "enum": ["todo.updated"]
  17889. },
  17890. "properties": {
  17891. "type": "object",
  17892. "properties": {
  17893. "sessionID": {
  17894. "type": "string",
  17895. "pattern": "^ses"
  17896. },
  17897. "todos": {
  17898. "type": "array",
  17899. "items": {
  17900. "$ref": "#/components/schemas/Todo"
  17901. }
  17902. }
  17903. },
  17904. "required": ["sessionID", "todos"],
  17905. "additionalProperties": false
  17906. }
  17907. },
  17908. "required": ["id", "type", "properties"],
  17909. "additionalProperties": false
  17910. },
  17911. {
  17912. "type": "object",
  17913. "properties": {
  17914. "id": {
  17915. "type": "string",
  17916. "pattern": "^evt_"
  17917. },
  17918. "type": {
  17919. "type": "string",
  17920. "enum": ["lsp.updated"]
  17921. },
  17922. "properties": {
  17923. "type": "object",
  17924. "properties": {}
  17925. }
  17926. },
  17927. "required": ["id", "type", "properties"],
  17928. "additionalProperties": false
  17929. },
  17930. {
  17931. "type": "object",
  17932. "properties": {
  17933. "id": {
  17934. "type": "string",
  17935. "pattern": "^evt_"
  17936. },
  17937. "type": {
  17938. "type": "string",
  17939. "enum": ["permission.asked"]
  17940. },
  17941. "properties": {
  17942. "type": "object",
  17943. "properties": {
  17944. "id": {
  17945. "type": "string",
  17946. "pattern": "^per"
  17947. },
  17948. "sessionID": {
  17949. "type": "string",
  17950. "pattern": "^ses"
  17951. },
  17952. "permission": {
  17953. "type": "string"
  17954. },
  17955. "patterns": {
  17956. "type": "array",
  17957. "items": {
  17958. "type": "string"
  17959. }
  17960. },
  17961. "metadata": {
  17962. "type": "object"
  17963. },
  17964. "always": {
  17965. "type": "array",
  17966. "items": {
  17967. "type": "string"
  17968. }
  17969. },
  17970. "tool": {
  17971. "type": "object",
  17972. "properties": {
  17973. "messageID": {
  17974. "type": "string"
  17975. },
  17976. "callID": {
  17977. "type": "string"
  17978. }
  17979. },
  17980. "required": ["messageID", "callID"],
  17981. "additionalProperties": false
  17982. }
  17983. },
  17984. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  17985. "additionalProperties": false
  17986. }
  17987. },
  17988. "required": ["id", "type", "properties"],
  17989. "additionalProperties": false
  17990. },
  17991. {
  17992. "type": "object",
  17993. "properties": {
  17994. "id": {
  17995. "type": "string",
  17996. "pattern": "^evt_"
  17997. },
  17998. "type": {
  17999. "type": "string",
  18000. "enum": ["permission.replied"]
  18001. },
  18002. "properties": {
  18003. "type": "object",
  18004. "properties": {
  18005. "sessionID": {
  18006. "type": "string",
  18007. "pattern": "^ses"
  18008. },
  18009. "requestID": {
  18010. "type": "string",
  18011. "pattern": "^per"
  18012. },
  18013. "reply": {
  18014. "type": "string",
  18015. "enum": ["once", "always", "reject"]
  18016. }
  18017. },
  18018. "required": ["sessionID", "requestID", "reply"],
  18019. "additionalProperties": false
  18020. }
  18021. },
  18022. "required": ["id", "type", "properties"],
  18023. "additionalProperties": false
  18024. },
  18025. {
  18026. "type": "object",
  18027. "properties": {
  18028. "id": {
  18029. "type": "string",
  18030. "pattern": "^evt_"
  18031. },
  18032. "type": {
  18033. "type": "string",
  18034. "enum": ["tui.prompt.append"]
  18035. },
  18036. "properties": {
  18037. "type": "object",
  18038. "properties": {
  18039. "text": {
  18040. "type": "string"
  18041. }
  18042. },
  18043. "required": ["text"],
  18044. "additionalProperties": false
  18045. }
  18046. },
  18047. "required": ["id", "type", "properties"],
  18048. "additionalProperties": false
  18049. },
  18050. {
  18051. "type": "object",
  18052. "properties": {
  18053. "id": {
  18054. "type": "string",
  18055. "pattern": "^evt_"
  18056. },
  18057. "type": {
  18058. "type": "string",
  18059. "enum": ["tui.command.execute"]
  18060. },
  18061. "properties": {
  18062. "type": "object",
  18063. "properties": {
  18064. "command": {
  18065. "anyOf": [
  18066. {
  18067. "type": "string",
  18068. "enum": [
  18069. "session.list",
  18070. "session.new",
  18071. "session.share",
  18072. "session.interrupt",
  18073. "session.compact",
  18074. "session.page.up",
  18075. "session.page.down",
  18076. "session.line.up",
  18077. "session.line.down",
  18078. "session.half.page.up",
  18079. "session.half.page.down",
  18080. "session.first",
  18081. "session.last",
  18082. "prompt.clear",
  18083. "prompt.submit",
  18084. "agent.cycle"
  18085. ]
  18086. },
  18087. {
  18088. "type": "string"
  18089. }
  18090. ]
  18091. }
  18092. },
  18093. "required": ["command"],
  18094. "additionalProperties": false
  18095. }
  18096. },
  18097. "required": ["id", "type", "properties"],
  18098. "additionalProperties": false
  18099. },
  18100. {
  18101. "type": "object",
  18102. "properties": {
  18103. "id": {
  18104. "type": "string",
  18105. "pattern": "^evt_"
  18106. },
  18107. "type": {
  18108. "type": "string",
  18109. "enum": ["tui.toast.show"]
  18110. },
  18111. "properties": {
  18112. "type": "object",
  18113. "properties": {
  18114. "title": {
  18115. "type": "string"
  18116. },
  18117. "message": {
  18118. "type": "string"
  18119. },
  18120. "variant": {
  18121. "type": "string",
  18122. "enum": ["info", "success", "warning", "error"]
  18123. },
  18124. "duration": {
  18125. "type": "integer",
  18126. "exclusiveMinimum": 0
  18127. }
  18128. },
  18129. "required": ["message", "variant"],
  18130. "additionalProperties": false
  18131. }
  18132. },
  18133. "required": ["id", "type", "properties"],
  18134. "additionalProperties": false
  18135. },
  18136. {
  18137. "type": "object",
  18138. "properties": {
  18139. "id": {
  18140. "type": "string",
  18141. "pattern": "^evt_"
  18142. },
  18143. "type": {
  18144. "type": "string",
  18145. "enum": ["tui.session.select"]
  18146. },
  18147. "properties": {
  18148. "type": "object",
  18149. "properties": {
  18150. "sessionID": {
  18151. "type": "string",
  18152. "pattern": "^ses",
  18153. "description": "Session ID to navigate to"
  18154. }
  18155. },
  18156. "required": ["sessionID"],
  18157. "additionalProperties": false
  18158. }
  18159. },
  18160. "required": ["id", "type", "properties"],
  18161. "additionalProperties": false
  18162. },
  18163. {
  18164. "type": "object",
  18165. "properties": {
  18166. "id": {
  18167. "type": "string",
  18168. "pattern": "^evt_"
  18169. },
  18170. "type": {
  18171. "type": "string",
  18172. "enum": ["mcp.tools.changed"]
  18173. },
  18174. "properties": {
  18175. "type": "object",
  18176. "properties": {
  18177. "server": {
  18178. "type": "string"
  18179. }
  18180. },
  18181. "required": ["server"],
  18182. "additionalProperties": false
  18183. }
  18184. },
  18185. "required": ["id", "type", "properties"],
  18186. "additionalProperties": false
  18187. },
  18188. {
  18189. "type": "object",
  18190. "properties": {
  18191. "id": {
  18192. "type": "string",
  18193. "pattern": "^evt_"
  18194. },
  18195. "type": {
  18196. "type": "string",
  18197. "enum": ["mcp.browser.open.failed"]
  18198. },
  18199. "properties": {
  18200. "type": "object",
  18201. "properties": {
  18202. "mcpName": {
  18203. "type": "string"
  18204. },
  18205. "url": {
  18206. "type": "string"
  18207. }
  18208. },
  18209. "required": ["mcpName", "url"],
  18210. "additionalProperties": false
  18211. }
  18212. },
  18213. "required": ["id", "type", "properties"],
  18214. "additionalProperties": false
  18215. },
  18216. {
  18217. "type": "object",
  18218. "properties": {
  18219. "id": {
  18220. "type": "string",
  18221. "pattern": "^evt_"
  18222. },
  18223. "type": {
  18224. "type": "string",
  18225. "enum": ["command.executed"]
  18226. },
  18227. "properties": {
  18228. "type": "object",
  18229. "properties": {
  18230. "name": {
  18231. "type": "string"
  18232. },
  18233. "sessionID": {
  18234. "type": "string",
  18235. "pattern": "^ses"
  18236. },
  18237. "arguments": {
  18238. "type": "string"
  18239. },
  18240. "messageID": {
  18241. "type": "string",
  18242. "pattern": "^msg"
  18243. }
  18244. },
  18245. "required": ["name", "sessionID", "arguments", "messageID"],
  18246. "additionalProperties": false
  18247. }
  18248. },
  18249. "required": ["id", "type", "properties"],
  18250. "additionalProperties": false
  18251. },
  18252. {
  18253. "type": "object",
  18254. "properties": {
  18255. "id": {
  18256. "type": "string",
  18257. "pattern": "^evt_"
  18258. },
  18259. "type": {
  18260. "type": "string",
  18261. "enum": ["project.directories.updated"]
  18262. },
  18263. "properties": {
  18264. "type": "object",
  18265. "properties": {
  18266. "projectID": {
  18267. "type": "string"
  18268. }
  18269. },
  18270. "required": ["projectID"],
  18271. "additionalProperties": false
  18272. }
  18273. },
  18274. "required": ["id", "type", "properties"],
  18275. "additionalProperties": false
  18276. },
  18277. {
  18278. "type": "object",
  18279. "properties": {
  18280. "id": {
  18281. "type": "string",
  18282. "pattern": "^evt_"
  18283. },
  18284. "type": {
  18285. "type": "string",
  18286. "enum": ["project.updated"]
  18287. },
  18288. "properties": {
  18289. "type": "object",
  18290. "properties": {
  18291. "id": {
  18292. "type": "string"
  18293. },
  18294. "worktree": {
  18295. "type": "string"
  18296. },
  18297. "vcs": {
  18298. "type": "string",
  18299. "enum": ["git"]
  18300. },
  18301. "name": {
  18302. "type": "string"
  18303. },
  18304. "icon": {
  18305. "type": "object",
  18306. "properties": {
  18307. "url": {
  18308. "type": "string"
  18309. },
  18310. "override": {
  18311. "type": "string"
  18312. },
  18313. "color": {
  18314. "type": "string"
  18315. }
  18316. },
  18317. "additionalProperties": false
  18318. },
  18319. "commands": {
  18320. "type": "object",
  18321. "properties": {
  18322. "start": {
  18323. "type": "string",
  18324. "description": "Startup script to run when creating a new workspace (worktree)"
  18325. }
  18326. },
  18327. "additionalProperties": false
  18328. },
  18329. "time": {
  18330. "type": "object",
  18331. "properties": {
  18332. "created": {
  18333. "type": "integer",
  18334. "minimum": 0
  18335. },
  18336. "updated": {
  18337. "type": "integer",
  18338. "minimum": 0
  18339. },
  18340. "initialized": {
  18341. "type": "integer",
  18342. "minimum": 0
  18343. }
  18344. },
  18345. "required": ["created", "updated"],
  18346. "additionalProperties": false
  18347. },
  18348. "sandboxes": {
  18349. "type": "array",
  18350. "items": {
  18351. "type": "string"
  18352. }
  18353. }
  18354. },
  18355. "required": ["id", "worktree", "time", "sandboxes"],
  18356. "additionalProperties": false
  18357. }
  18358. },
  18359. "required": ["id", "type", "properties"],
  18360. "additionalProperties": false
  18361. },
  18362. {
  18363. "type": "object",
  18364. "properties": {
  18365. "id": {
  18366. "type": "string",
  18367. "pattern": "^evt_"
  18368. },
  18369. "type": {
  18370. "type": "string",
  18371. "enum": ["vcs.branch.updated"]
  18372. },
  18373. "properties": {
  18374. "type": "object",
  18375. "properties": {
  18376. "branch": {
  18377. "type": "string"
  18378. }
  18379. },
  18380. "additionalProperties": false
  18381. }
  18382. },
  18383. "required": ["id", "type", "properties"],
  18384. "additionalProperties": false
  18385. },
  18386. {
  18387. "type": "object",
  18388. "properties": {
  18389. "id": {
  18390. "type": "string",
  18391. "pattern": "^evt_"
  18392. },
  18393. "type": {
  18394. "type": "string",
  18395. "enum": ["question.asked"]
  18396. },
  18397. "properties": {
  18398. "type": "object",
  18399. "properties": {
  18400. "id": {
  18401. "type": "string",
  18402. "pattern": "^que"
  18403. },
  18404. "sessionID": {
  18405. "type": "string",
  18406. "pattern": "^ses"
  18407. },
  18408. "questions": {
  18409. "type": "array",
  18410. "items": {
  18411. "$ref": "#/components/schemas/QuestionInfo"
  18412. },
  18413. "description": "Questions to ask"
  18414. },
  18415. "tool": {
  18416. "$ref": "#/components/schemas/QuestionTool"
  18417. }
  18418. },
  18419. "required": ["id", "sessionID", "questions"],
  18420. "additionalProperties": false
  18421. }
  18422. },
  18423. "required": ["id", "type", "properties"],
  18424. "additionalProperties": false
  18425. },
  18426. {
  18427. "type": "object",
  18428. "properties": {
  18429. "id": {
  18430. "type": "string",
  18431. "pattern": "^evt_"
  18432. },
  18433. "type": {
  18434. "type": "string",
  18435. "enum": ["question.replied"]
  18436. },
  18437. "properties": {
  18438. "type": "object",
  18439. "properties": {
  18440. "sessionID": {
  18441. "type": "string",
  18442. "pattern": "^ses"
  18443. },
  18444. "requestID": {
  18445. "type": "string",
  18446. "pattern": "^que"
  18447. },
  18448. "answers": {
  18449. "type": "array",
  18450. "items": {
  18451. "$ref": "#/components/schemas/QuestionAnswer"
  18452. }
  18453. }
  18454. },
  18455. "required": ["sessionID", "requestID", "answers"],
  18456. "additionalProperties": false
  18457. }
  18458. },
  18459. "required": ["id", "type", "properties"],
  18460. "additionalProperties": false
  18461. },
  18462. {
  18463. "type": "object",
  18464. "properties": {
  18465. "id": {
  18466. "type": "string",
  18467. "pattern": "^evt_"
  18468. },
  18469. "type": {
  18470. "type": "string",
  18471. "enum": ["question.rejected"]
  18472. },
  18473. "properties": {
  18474. "type": "object",
  18475. "properties": {
  18476. "sessionID": {
  18477. "type": "string",
  18478. "pattern": "^ses"
  18479. },
  18480. "requestID": {
  18481. "type": "string",
  18482. "pattern": "^que"
  18483. }
  18484. },
  18485. "required": ["sessionID", "requestID"],
  18486. "additionalProperties": false
  18487. }
  18488. },
  18489. "required": ["id", "type", "properties"],
  18490. "additionalProperties": false
  18491. },
  18492. {
  18493. "type": "object",
  18494. "properties": {
  18495. "id": {
  18496. "type": "string",
  18497. "pattern": "^evt_"
  18498. },
  18499. "type": {
  18500. "type": "string",
  18501. "enum": ["session.status"]
  18502. },
  18503. "properties": {
  18504. "type": "object",
  18505. "properties": {
  18506. "sessionID": {
  18507. "type": "string",
  18508. "pattern": "^ses"
  18509. },
  18510. "status": {
  18511. "$ref": "#/components/schemas/SessionStatus"
  18512. }
  18513. },
  18514. "required": ["sessionID", "status"],
  18515. "additionalProperties": false
  18516. }
  18517. },
  18518. "required": ["id", "type", "properties"],
  18519. "additionalProperties": false
  18520. },
  18521. {
  18522. "type": "object",
  18523. "properties": {
  18524. "id": {
  18525. "type": "string",
  18526. "pattern": "^evt_"
  18527. },
  18528. "type": {
  18529. "type": "string",
  18530. "enum": ["session.idle"]
  18531. },
  18532. "properties": {
  18533. "type": "object",
  18534. "properties": {
  18535. "sessionID": {
  18536. "type": "string",
  18537. "pattern": "^ses"
  18538. }
  18539. },
  18540. "required": ["sessionID"],
  18541. "additionalProperties": false
  18542. }
  18543. },
  18544. "required": ["id", "type", "properties"],
  18545. "additionalProperties": false
  18546. },
  18547. {
  18548. "type": "object",
  18549. "properties": {
  18550. "id": {
  18551. "type": "string",
  18552. "pattern": "^evt_"
  18553. },
  18554. "type": {
  18555. "type": "string",
  18556. "enum": ["session.compacted"]
  18557. },
  18558. "properties": {
  18559. "type": "object",
  18560. "properties": {
  18561. "sessionID": {
  18562. "type": "string",
  18563. "pattern": "^ses"
  18564. }
  18565. },
  18566. "required": ["sessionID"],
  18567. "additionalProperties": false
  18568. }
  18569. },
  18570. "required": ["id", "type", "properties"],
  18571. "additionalProperties": false
  18572. },
  18573. {
  18574. "type": "object",
  18575. "properties": {
  18576. "id": {
  18577. "type": "string",
  18578. "pattern": "^evt_"
  18579. },
  18580. "type": {
  18581. "type": "string",
  18582. "enum": ["worktree.ready"]
  18583. },
  18584. "properties": {
  18585. "type": "object",
  18586. "properties": {
  18587. "name": {
  18588. "type": "string"
  18589. },
  18590. "branch": {
  18591. "type": "string"
  18592. }
  18593. },
  18594. "required": ["name"],
  18595. "additionalProperties": false
  18596. }
  18597. },
  18598. "required": ["id", "type", "properties"],
  18599. "additionalProperties": false
  18600. },
  18601. {
  18602. "type": "object",
  18603. "properties": {
  18604. "id": {
  18605. "type": "string",
  18606. "pattern": "^evt_"
  18607. },
  18608. "type": {
  18609. "type": "string",
  18610. "enum": ["worktree.failed"]
  18611. },
  18612. "properties": {
  18613. "type": "object",
  18614. "properties": {
  18615. "message": {
  18616. "type": "string"
  18617. }
  18618. },
  18619. "required": ["message"],
  18620. "additionalProperties": false
  18621. }
  18622. },
  18623. "required": ["id", "type", "properties"],
  18624. "additionalProperties": false
  18625. },
  18626. {
  18627. "type": "object",
  18628. "properties": {
  18629. "id": {
  18630. "type": "string",
  18631. "pattern": "^evt_"
  18632. },
  18633. "type": {
  18634. "type": "string",
  18635. "enum": ["workspace.ready"]
  18636. },
  18637. "properties": {
  18638. "type": "object",
  18639. "properties": {
  18640. "name": {
  18641. "type": "string"
  18642. }
  18643. },
  18644. "required": ["name"],
  18645. "additionalProperties": false
  18646. }
  18647. },
  18648. "required": ["id", "type", "properties"],
  18649. "additionalProperties": false
  18650. },
  18651. {
  18652. "type": "object",
  18653. "properties": {
  18654. "id": {
  18655. "type": "string",
  18656. "pattern": "^evt_"
  18657. },
  18658. "type": {
  18659. "type": "string",
  18660. "enum": ["workspace.failed"]
  18661. },
  18662. "properties": {
  18663. "type": "object",
  18664. "properties": {
  18665. "message": {
  18666. "type": "string"
  18667. }
  18668. },
  18669. "required": ["message"],
  18670. "additionalProperties": false
  18671. }
  18672. },
  18673. "required": ["id", "type", "properties"],
  18674. "additionalProperties": false
  18675. },
  18676. {
  18677. "type": "object",
  18678. "properties": {
  18679. "id": {
  18680. "type": "string",
  18681. "pattern": "^evt_"
  18682. },
  18683. "type": {
  18684. "type": "string",
  18685. "enum": ["workspace.status"]
  18686. },
  18687. "properties": {
  18688. "type": "object",
  18689. "properties": {
  18690. "workspaceID": {
  18691. "type": "string",
  18692. "pattern": "^wrk"
  18693. },
  18694. "status": {
  18695. "type": "string",
  18696. "enum": ["connected", "connecting", "disconnected", "error"]
  18697. }
  18698. },
  18699. "required": ["workspaceID", "status"],
  18700. "additionalProperties": false
  18701. }
  18702. },
  18703. "required": ["id", "type", "properties"],
  18704. "additionalProperties": false
  18705. },
  18706. {
  18707. "type": "object",
  18708. "properties": {
  18709. "id": {
  18710. "type": "string",
  18711. "pattern": "^evt_"
  18712. },
  18713. "type": {
  18714. "type": "string",
  18715. "enum": ["server.connected"]
  18716. },
  18717. "properties": {
  18718. "type": "object",
  18719. "properties": {}
  18720. }
  18721. },
  18722. "required": ["id", "type", "properties"],
  18723. "additionalProperties": false
  18724. },
  18725. {
  18726. "type": "object",
  18727. "properties": {
  18728. "id": {
  18729. "type": "string",
  18730. "pattern": "^evt_"
  18731. },
  18732. "type": {
  18733. "type": "string",
  18734. "enum": ["global.disposed"]
  18735. },
  18736. "properties": {
  18737. "type": "object",
  18738. "properties": {}
  18739. }
  18740. },
  18741. "required": ["id", "type", "properties"],
  18742. "additionalProperties": false
  18743. },
  18744. {
  18745. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  18746. },
  18747. {
  18748. "$ref": "#/components/schemas/SyncEventSessionCreated"
  18749. },
  18750. {
  18751. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  18752. },
  18753. {
  18754. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  18755. },
  18756. {
  18757. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  18758. },
  18759. {
  18760. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  18761. },
  18762. {
  18763. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  18764. },
  18765. {
  18766. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  18767. },
  18768. {
  18769. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  18770. },
  18771. {
  18772. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  18773. },
  18774. {
  18775. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  18776. },
  18777. {
  18778. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  18779. },
  18780. {
  18781. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  18782. },
  18783. {
  18784. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  18785. },
  18786. {
  18787. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  18788. },
  18789. {
  18790. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  18791. },
  18792. {
  18793. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  18794. },
  18795. {
  18796. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  18797. },
  18798. {
  18799. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  18800. },
  18801. {
  18802. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  18803. },
  18804. {
  18805. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  18806. },
  18807. {
  18808. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  18809. },
  18810. {
  18811. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  18812. },
  18813. {
  18814. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  18815. },
  18816. {
  18817. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  18818. },
  18819. {
  18820. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  18821. },
  18822. {
  18823. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  18824. },
  18825. {
  18826. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  18827. },
  18828. {
  18829. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  18830. },
  18831. {
  18832. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  18833. },
  18834. {
  18835. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  18836. },
  18837. {
  18838. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  18839. },
  18840. {
  18841. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  18842. },
  18843. {
  18844. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  18845. },
  18846. {
  18847. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  18848. }
  18849. ]
  18850. }
  18851. },
  18852. "required": ["directory", "payload"],
  18853. "additionalProperties": false
  18854. },
  18855. "LogLevel": {
  18856. "type": "string",
  18857. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  18858. "description": "Log level"
  18859. },
  18860. "ServerConfig": {
  18861. "type": "object",
  18862. "properties": {
  18863. "port": {
  18864. "type": "integer",
  18865. "exclusiveMinimum": 0
  18866. },
  18867. "hostname": {
  18868. "type": "string"
  18869. },
  18870. "mdns": {
  18871. "type": "boolean"
  18872. },
  18873. "mdnsDomain": {
  18874. "type": "string"
  18875. },
  18876. "cors": {
  18877. "type": "array",
  18878. "items": {
  18879. "type": "string"
  18880. }
  18881. }
  18882. },
  18883. "additionalProperties": false,
  18884. "description": "Server configuration for opencode serve and web commands"
  18885. },
  18886. "PermissionActionConfig": {
  18887. "type": "string",
  18888. "enum": ["ask", "allow", "deny"]
  18889. },
  18890. "PermissionObjectConfig": {
  18891. "type": "object",
  18892. "additionalProperties": {
  18893. "$ref": "#/components/schemas/PermissionActionConfig"
  18894. }
  18895. },
  18896. "PermissionRuleConfig": {
  18897. "anyOf": [
  18898. {
  18899. "$ref": "#/components/schemas/PermissionActionConfig"
  18900. },
  18901. {
  18902. "$ref": "#/components/schemas/PermissionObjectConfig"
  18903. }
  18904. ]
  18905. },
  18906. "PermissionConfig": {
  18907. "anyOf": [
  18908. {
  18909. "$ref": "#/components/schemas/PermissionActionConfig"
  18910. },
  18911. {
  18912. "type": "object",
  18913. "properties": {
  18914. "read": {
  18915. "$ref": "#/components/schemas/PermissionRuleConfig"
  18916. },
  18917. "edit": {
  18918. "$ref": "#/components/schemas/PermissionRuleConfig"
  18919. },
  18920. "glob": {
  18921. "$ref": "#/components/schemas/PermissionRuleConfig"
  18922. },
  18923. "grep": {
  18924. "$ref": "#/components/schemas/PermissionRuleConfig"
  18925. },
  18926. "list": {
  18927. "$ref": "#/components/schemas/PermissionRuleConfig"
  18928. },
  18929. "bash": {
  18930. "$ref": "#/components/schemas/PermissionRuleConfig"
  18931. },
  18932. "task": {
  18933. "$ref": "#/components/schemas/PermissionRuleConfig"
  18934. },
  18935. "external_directory": {
  18936. "$ref": "#/components/schemas/PermissionRuleConfig"
  18937. },
  18938. "todowrite": {
  18939. "$ref": "#/components/schemas/PermissionActionConfig"
  18940. },
  18941. "question": {
  18942. "$ref": "#/components/schemas/PermissionActionConfig"
  18943. },
  18944. "webfetch": {
  18945. "$ref": "#/components/schemas/PermissionActionConfig"
  18946. },
  18947. "websearch": {
  18948. "$ref": "#/components/schemas/PermissionActionConfig"
  18949. },
  18950. "lsp": {
  18951. "$ref": "#/components/schemas/PermissionRuleConfig"
  18952. },
  18953. "doom_loop": {
  18954. "$ref": "#/components/schemas/PermissionActionConfig"
  18955. },
  18956. "skill": {
  18957. "$ref": "#/components/schemas/PermissionRuleConfig"
  18958. }
  18959. },
  18960. "additionalProperties": {
  18961. "$ref": "#/components/schemas/PermissionRuleConfig"
  18962. }
  18963. }
  18964. ]
  18965. },
  18966. "AgentConfig": {
  18967. "type": "object",
  18968. "properties": {
  18969. "model": {
  18970. "type": "string"
  18971. },
  18972. "variant": {
  18973. "type": "string"
  18974. },
  18975. "temperature": {
  18976. "type": "number"
  18977. },
  18978. "top_p": {
  18979. "type": "number"
  18980. },
  18981. "prompt": {
  18982. "type": "string"
  18983. },
  18984. "tools": {
  18985. "type": "object",
  18986. "additionalProperties": {
  18987. "type": "boolean"
  18988. }
  18989. },
  18990. "disable": {
  18991. "type": "boolean"
  18992. },
  18993. "description": {
  18994. "type": "string"
  18995. },
  18996. "mode": {
  18997. "type": "string",
  18998. "enum": ["subagent", "primary", "all"]
  18999. },
  19000. "hidden": {
  19001. "type": "boolean"
  19002. },
  19003. "options": {
  19004. "type": "object"
  19005. },
  19006. "color": {
  19007. "anyOf": [
  19008. {
  19009. "type": "string",
  19010. "pattern": "^#[0-9a-fA-F]{6}$"
  19011. },
  19012. {
  19013. "type": "string",
  19014. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  19015. }
  19016. ],
  19017. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  19018. },
  19019. "steps": {
  19020. "type": "integer",
  19021. "exclusiveMinimum": 0
  19022. },
  19023. "maxSteps": {
  19024. "type": "integer",
  19025. "exclusiveMinimum": 0
  19026. },
  19027. "permission": {
  19028. "$ref": "#/components/schemas/PermissionConfig"
  19029. }
  19030. },
  19031. "additionalProperties": {}
  19032. },
  19033. "ProviderConfig": {
  19034. "type": "object",
  19035. "properties": {
  19036. "api": {
  19037. "type": "string"
  19038. },
  19039. "name": {
  19040. "type": "string"
  19041. },
  19042. "env": {
  19043. "type": "array",
  19044. "items": {
  19045. "type": "string"
  19046. }
  19047. },
  19048. "id": {
  19049. "type": "string"
  19050. },
  19051. "npm": {
  19052. "type": "string"
  19053. },
  19054. "whitelist": {
  19055. "type": "array",
  19056. "items": {
  19057. "type": "string"
  19058. }
  19059. },
  19060. "blacklist": {
  19061. "type": "array",
  19062. "items": {
  19063. "type": "string"
  19064. }
  19065. },
  19066. "options": {
  19067. "type": "object",
  19068. "properties": {
  19069. "apiKey": {
  19070. "type": "string"
  19071. },
  19072. "baseURL": {
  19073. "type": "string"
  19074. },
  19075. "enterpriseUrl": {
  19076. "type": "string"
  19077. },
  19078. "setCacheKey": {
  19079. "type": "boolean"
  19080. },
  19081. "timeout": {
  19082. "anyOf": [
  19083. {
  19084. "type": "integer",
  19085. "exclusiveMinimum": 0
  19086. },
  19087. {
  19088. "type": "boolean",
  19089. "enum": [false]
  19090. }
  19091. ],
  19092. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  19093. },
  19094. "headerTimeout": {
  19095. "anyOf": [
  19096. {
  19097. "type": "integer",
  19098. "exclusiveMinimum": 0
  19099. },
  19100. {
  19101. "type": "boolean",
  19102. "enum": [false]
  19103. }
  19104. ],
  19105. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  19106. },
  19107. "chunkTimeout": {
  19108. "type": "integer",
  19109. "exclusiveMinimum": 0
  19110. }
  19111. },
  19112. "additionalProperties": {}
  19113. },
  19114. "models": {
  19115. "type": "object",
  19116. "additionalProperties": {
  19117. "type": "object",
  19118. "properties": {
  19119. "id": {
  19120. "type": "string"
  19121. },
  19122. "name": {
  19123. "type": "string"
  19124. },
  19125. "family": {
  19126. "type": "string"
  19127. },
  19128. "release_date": {
  19129. "type": "string"
  19130. },
  19131. "attachment": {
  19132. "type": "boolean"
  19133. },
  19134. "reasoning": {
  19135. "type": "boolean"
  19136. },
  19137. "temperature": {
  19138. "type": "boolean"
  19139. },
  19140. "tool_call": {
  19141. "type": "boolean"
  19142. },
  19143. "interleaved": {
  19144. "anyOf": [
  19145. {
  19146. "type": "boolean",
  19147. "enum": [true]
  19148. },
  19149. {
  19150. "type": "object",
  19151. "properties": {
  19152. "field": {
  19153. "type": "string",
  19154. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19155. }
  19156. },
  19157. "required": ["field"],
  19158. "additionalProperties": false
  19159. }
  19160. ]
  19161. },
  19162. "cost": {
  19163. "type": "object",
  19164. "properties": {
  19165. "input": {
  19166. "type": "number"
  19167. },
  19168. "output": {
  19169. "type": "number"
  19170. },
  19171. "cache_read": {
  19172. "type": "number"
  19173. },
  19174. "cache_write": {
  19175. "type": "number"
  19176. },
  19177. "context_over_200k": {
  19178. "type": "object",
  19179. "properties": {
  19180. "input": {
  19181. "type": "number"
  19182. },
  19183. "output": {
  19184. "type": "number"
  19185. },
  19186. "cache_read": {
  19187. "type": "number"
  19188. },
  19189. "cache_write": {
  19190. "type": "number"
  19191. }
  19192. },
  19193. "required": ["input", "output"],
  19194. "additionalProperties": false
  19195. }
  19196. },
  19197. "required": ["input", "output"],
  19198. "additionalProperties": false
  19199. },
  19200. "limit": {
  19201. "type": "object",
  19202. "properties": {
  19203. "context": {
  19204. "type": "number"
  19205. },
  19206. "input": {
  19207. "type": "number"
  19208. },
  19209. "output": {
  19210. "type": "number"
  19211. }
  19212. },
  19213. "required": ["context", "output"],
  19214. "additionalProperties": false
  19215. },
  19216. "modalities": {
  19217. "type": "object",
  19218. "properties": {
  19219. "input": {
  19220. "type": "array",
  19221. "items": {
  19222. "type": "string",
  19223. "enum": ["text", "audio", "image", "video", "pdf"]
  19224. }
  19225. },
  19226. "output": {
  19227. "type": "array",
  19228. "items": {
  19229. "type": "string",
  19230. "enum": ["text", "audio", "image", "video", "pdf"]
  19231. }
  19232. }
  19233. },
  19234. "additionalProperties": false
  19235. },
  19236. "experimental": {
  19237. "type": "boolean"
  19238. },
  19239. "status": {
  19240. "type": "string",
  19241. "enum": ["alpha", "beta", "deprecated", "active"]
  19242. },
  19243. "provider": {
  19244. "type": "object",
  19245. "properties": {
  19246. "npm": {
  19247. "type": "string"
  19248. },
  19249. "api": {
  19250. "type": "string"
  19251. }
  19252. },
  19253. "additionalProperties": false
  19254. },
  19255. "options": {
  19256. "type": "object"
  19257. },
  19258. "headers": {
  19259. "type": "object",
  19260. "additionalProperties": {
  19261. "type": "string"
  19262. }
  19263. },
  19264. "variants": {
  19265. "type": "object",
  19266. "additionalProperties": {
  19267. "type": "object",
  19268. "properties": {
  19269. "disabled": {
  19270. "type": "boolean"
  19271. }
  19272. },
  19273. "additionalProperties": {}
  19274. },
  19275. "description": "Variant-specific configuration"
  19276. }
  19277. },
  19278. "additionalProperties": false
  19279. }
  19280. }
  19281. },
  19282. "additionalProperties": false
  19283. },
  19284. "McpLocalConfig": {
  19285. "type": "object",
  19286. "properties": {
  19287. "type": {
  19288. "type": "string",
  19289. "enum": ["local"],
  19290. "description": "Type of MCP server connection"
  19291. },
  19292. "command": {
  19293. "type": "array",
  19294. "items": {
  19295. "type": "string"
  19296. },
  19297. "description": "Command and arguments to run the MCP server"
  19298. },
  19299. "environment": {
  19300. "type": "object",
  19301. "additionalProperties": {
  19302. "type": "string"
  19303. }
  19304. },
  19305. "enabled": {
  19306. "type": "boolean"
  19307. },
  19308. "timeout": {
  19309. "type": "integer",
  19310. "exclusiveMinimum": 0
  19311. }
  19312. },
  19313. "required": ["type", "command"],
  19314. "additionalProperties": false
  19315. },
  19316. "McpOAuthConfig": {
  19317. "type": "object",
  19318. "properties": {
  19319. "clientId": {
  19320. "type": "string"
  19321. },
  19322. "clientSecret": {
  19323. "type": "string"
  19324. },
  19325. "scope": {
  19326. "type": "string"
  19327. },
  19328. "callbackPort": {
  19329. "type": "integer",
  19330. "minimum": 1,
  19331. "maximum": 65535
  19332. },
  19333. "redirectUri": {
  19334. "type": "string"
  19335. }
  19336. },
  19337. "additionalProperties": false
  19338. },
  19339. "McpRemoteConfig": {
  19340. "type": "object",
  19341. "properties": {
  19342. "type": {
  19343. "type": "string",
  19344. "enum": ["remote"],
  19345. "description": "Type of MCP server connection"
  19346. },
  19347. "url": {
  19348. "type": "string",
  19349. "description": "URL of the remote MCP server"
  19350. },
  19351. "enabled": {
  19352. "type": "boolean"
  19353. },
  19354. "headers": {
  19355. "type": "object",
  19356. "additionalProperties": {
  19357. "type": "string"
  19358. }
  19359. },
  19360. "oauth": {
  19361. "anyOf": [
  19362. {
  19363. "$ref": "#/components/schemas/McpOAuthConfig"
  19364. },
  19365. {
  19366. "type": "boolean",
  19367. "enum": [false]
  19368. }
  19369. ],
  19370. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  19371. },
  19372. "timeout": {
  19373. "type": "integer",
  19374. "exclusiveMinimum": 0
  19375. }
  19376. },
  19377. "required": ["type", "url"],
  19378. "additionalProperties": false
  19379. },
  19380. "LayoutConfig": {
  19381. "type": "string",
  19382. "enum": ["auto", "stretch"],
  19383. "description": "@deprecated Always uses stretch layout."
  19384. },
  19385. "ImageAttachmentConfig": {
  19386. "type": "object",
  19387. "properties": {
  19388. "auto_resize": {
  19389. "type": "boolean"
  19390. },
  19391. "max_width": {
  19392. "type": "integer",
  19393. "exclusiveMinimum": 0
  19394. },
  19395. "max_height": {
  19396. "type": "integer",
  19397. "exclusiveMinimum": 0
  19398. },
  19399. "max_base64_bytes": {
  19400. "type": "integer",
  19401. "exclusiveMinimum": 0
  19402. }
  19403. },
  19404. "additionalProperties": false
  19405. },
  19406. "AttachmentConfig": {
  19407. "type": "object",
  19408. "properties": {
  19409. "image": {
  19410. "$ref": "#/components/schemas/ImageAttachmentConfig"
  19411. }
  19412. },
  19413. "additionalProperties": false
  19414. },
  19415. "Config": {
  19416. "type": "object",
  19417. "properties": {
  19418. "$schema": {
  19419. "type": "string"
  19420. },
  19421. "shell": {
  19422. "type": "string"
  19423. },
  19424. "logLevel": {
  19425. "$ref": "#/components/schemas/LogLevel"
  19426. },
  19427. "server": {
  19428. "$ref": "#/components/schemas/ServerConfig"
  19429. },
  19430. "command": {
  19431. "type": "object",
  19432. "additionalProperties": {
  19433. "type": "object",
  19434. "properties": {
  19435. "template": {
  19436. "type": "string"
  19437. },
  19438. "description": {
  19439. "type": "string"
  19440. },
  19441. "agent": {
  19442. "type": "string"
  19443. },
  19444. "model": {
  19445. "type": "string"
  19446. },
  19447. "variant": {
  19448. "type": "string"
  19449. },
  19450. "subtask": {
  19451. "type": "boolean"
  19452. }
  19453. },
  19454. "required": ["template"],
  19455. "additionalProperties": false
  19456. }
  19457. },
  19458. "skills": {
  19459. "type": "object",
  19460. "properties": {
  19461. "paths": {
  19462. "type": "array",
  19463. "items": {
  19464. "type": "string"
  19465. }
  19466. },
  19467. "urls": {
  19468. "type": "array",
  19469. "items": {
  19470. "type": "string"
  19471. }
  19472. }
  19473. },
  19474. "additionalProperties": false
  19475. },
  19476. "references": {
  19477. "type": "object",
  19478. "additionalProperties": {
  19479. "anyOf": [
  19480. {
  19481. "type": "string"
  19482. },
  19483. {
  19484. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19485. },
  19486. {
  19487. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19488. }
  19489. ]
  19490. }
  19491. },
  19492. "reference": {
  19493. "type": "object",
  19494. "additionalProperties": {
  19495. "anyOf": [
  19496. {
  19497. "type": "string"
  19498. },
  19499. {
  19500. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19501. },
  19502. {
  19503. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19504. }
  19505. ]
  19506. }
  19507. },
  19508. "watcher": {
  19509. "type": "object",
  19510. "properties": {
  19511. "ignore": {
  19512. "type": "array",
  19513. "items": {
  19514. "type": "string"
  19515. }
  19516. }
  19517. },
  19518. "additionalProperties": false
  19519. },
  19520. "snapshot": {
  19521. "type": "boolean"
  19522. },
  19523. "plugin": {
  19524. "type": "array",
  19525. "items": {
  19526. "anyOf": [
  19527. {
  19528. "type": "string"
  19529. },
  19530. {
  19531. "type": "array",
  19532. "prefixItems": [
  19533. {
  19534. "type": "string"
  19535. },
  19536. {
  19537. "type": "object"
  19538. }
  19539. ],
  19540. "maxItems": 2,
  19541. "minItems": 2
  19542. }
  19543. ]
  19544. }
  19545. },
  19546. "share": {
  19547. "type": "string",
  19548. "enum": ["manual", "auto", "disabled"]
  19549. },
  19550. "autoshare": {
  19551. "type": "boolean"
  19552. },
  19553. "autoupdate": {
  19554. "anyOf": [
  19555. {
  19556. "type": "boolean"
  19557. },
  19558. {
  19559. "type": "string",
  19560. "enum": ["notify"]
  19561. }
  19562. ],
  19563. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  19564. },
  19565. "disabled_providers": {
  19566. "type": "array",
  19567. "items": {
  19568. "type": "string"
  19569. }
  19570. },
  19571. "enabled_providers": {
  19572. "type": "array",
  19573. "items": {
  19574. "type": "string"
  19575. }
  19576. },
  19577. "model": {
  19578. "type": "string"
  19579. },
  19580. "small_model": {
  19581. "type": "string"
  19582. },
  19583. "default_agent": {
  19584. "type": "string"
  19585. },
  19586. "username": {
  19587. "type": "string"
  19588. },
  19589. "mode": {
  19590. "type": "object",
  19591. "properties": {
  19592. "build": {
  19593. "$ref": "#/components/schemas/AgentConfig"
  19594. },
  19595. "plan": {
  19596. "$ref": "#/components/schemas/AgentConfig"
  19597. }
  19598. },
  19599. "additionalProperties": {
  19600. "$ref": "#/components/schemas/AgentConfig"
  19601. }
  19602. },
  19603. "agent": {
  19604. "type": "object",
  19605. "properties": {
  19606. "plan": {
  19607. "$ref": "#/components/schemas/AgentConfig"
  19608. },
  19609. "build": {
  19610. "$ref": "#/components/schemas/AgentConfig"
  19611. },
  19612. "general": {
  19613. "$ref": "#/components/schemas/AgentConfig"
  19614. },
  19615. "explore": {
  19616. "$ref": "#/components/schemas/AgentConfig"
  19617. },
  19618. "title": {
  19619. "$ref": "#/components/schemas/AgentConfig"
  19620. },
  19621. "summary": {
  19622. "$ref": "#/components/schemas/AgentConfig"
  19623. },
  19624. "compaction": {
  19625. "$ref": "#/components/schemas/AgentConfig"
  19626. }
  19627. },
  19628. "additionalProperties": {
  19629. "$ref": "#/components/schemas/AgentConfig"
  19630. }
  19631. },
  19632. "provider": {
  19633. "type": "object",
  19634. "additionalProperties": {
  19635. "$ref": "#/components/schemas/ProviderConfig"
  19636. }
  19637. },
  19638. "mcp": {
  19639. "type": "object",
  19640. "additionalProperties": {
  19641. "anyOf": [
  19642. {
  19643. "$ref": "#/components/schemas/McpLocalConfig"
  19644. },
  19645. {
  19646. "$ref": "#/components/schemas/McpRemoteConfig"
  19647. },
  19648. {
  19649. "type": "object",
  19650. "properties": {
  19651. "enabled": {
  19652. "type": "boolean"
  19653. }
  19654. },
  19655. "required": ["enabled"],
  19656. "additionalProperties": false
  19657. }
  19658. ]
  19659. }
  19660. },
  19661. "formatter": {
  19662. "anyOf": [
  19663. {
  19664. "type": "boolean"
  19665. },
  19666. {
  19667. "type": "object",
  19668. "additionalProperties": {
  19669. "type": "object",
  19670. "properties": {
  19671. "disabled": {
  19672. "type": "boolean"
  19673. },
  19674. "command": {
  19675. "type": "array",
  19676. "items": {
  19677. "type": "string"
  19678. }
  19679. },
  19680. "environment": {
  19681. "type": "object",
  19682. "additionalProperties": {
  19683. "type": "string"
  19684. }
  19685. },
  19686. "extensions": {
  19687. "type": "array",
  19688. "items": {
  19689. "type": "string"
  19690. }
  19691. }
  19692. },
  19693. "additionalProperties": false
  19694. }
  19695. }
  19696. ],
  19697. "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."
  19698. },
  19699. "lsp": {
  19700. "anyOf": [
  19701. {
  19702. "type": "boolean"
  19703. },
  19704. {
  19705. "type": "object",
  19706. "additionalProperties": {
  19707. "anyOf": [
  19708. {
  19709. "type": "object",
  19710. "properties": {
  19711. "disabled": {
  19712. "type": "boolean",
  19713. "enum": [true]
  19714. }
  19715. },
  19716. "required": ["disabled"],
  19717. "additionalProperties": false
  19718. },
  19719. {
  19720. "type": "object",
  19721. "properties": {
  19722. "command": {
  19723. "type": "array",
  19724. "items": {
  19725. "type": "string"
  19726. }
  19727. },
  19728. "extensions": {
  19729. "type": "array",
  19730. "items": {
  19731. "type": "string"
  19732. }
  19733. },
  19734. "disabled": {
  19735. "type": "boolean"
  19736. },
  19737. "env": {
  19738. "type": "object",
  19739. "additionalProperties": {
  19740. "type": "string"
  19741. }
  19742. },
  19743. "initialization": {
  19744. "type": "object"
  19745. }
  19746. },
  19747. "required": ["command"],
  19748. "additionalProperties": false
  19749. }
  19750. ]
  19751. }
  19752. }
  19753. ],
  19754. "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."
  19755. },
  19756. "instructions": {
  19757. "type": "array",
  19758. "items": {
  19759. "type": "string"
  19760. }
  19761. },
  19762. "layout": {
  19763. "$ref": "#/components/schemas/LayoutConfig"
  19764. },
  19765. "permission": {
  19766. "$ref": "#/components/schemas/PermissionConfig"
  19767. },
  19768. "tools": {
  19769. "type": "object",
  19770. "additionalProperties": {
  19771. "type": "boolean"
  19772. }
  19773. },
  19774. "attachment": {
  19775. "$ref": "#/components/schemas/AttachmentConfig"
  19776. },
  19777. "enterprise": {
  19778. "type": "object",
  19779. "properties": {
  19780. "url": {
  19781. "type": "string"
  19782. }
  19783. },
  19784. "additionalProperties": false
  19785. },
  19786. "tool_output": {
  19787. "type": "object",
  19788. "properties": {
  19789. "max_lines": {
  19790. "type": "integer",
  19791. "exclusiveMinimum": 0
  19792. },
  19793. "max_bytes": {
  19794. "type": "integer",
  19795. "exclusiveMinimum": 0
  19796. }
  19797. },
  19798. "additionalProperties": false
  19799. },
  19800. "compaction": {
  19801. "type": "object",
  19802. "properties": {
  19803. "auto": {
  19804. "type": "boolean"
  19805. },
  19806. "prune": {
  19807. "type": "boolean"
  19808. },
  19809. "tail_turns": {
  19810. "type": "integer",
  19811. "minimum": 0
  19812. },
  19813. "preserve_recent_tokens": {
  19814. "type": "integer",
  19815. "minimum": 0
  19816. },
  19817. "reserved": {
  19818. "type": "integer",
  19819. "minimum": 0
  19820. }
  19821. },
  19822. "additionalProperties": false
  19823. },
  19824. "experimental": {
  19825. "type": "object",
  19826. "properties": {
  19827. "disable_paste_summary": {
  19828. "type": "boolean"
  19829. },
  19830. "batch_tool": {
  19831. "type": "boolean"
  19832. },
  19833. "openTelemetry": {
  19834. "type": "boolean"
  19835. },
  19836. "primary_tools": {
  19837. "type": "array",
  19838. "items": {
  19839. "type": "string"
  19840. }
  19841. },
  19842. "continue_loop_on_deny": {
  19843. "type": "boolean"
  19844. },
  19845. "mcp_timeout": {
  19846. "type": "integer",
  19847. "exclusiveMinimum": 0
  19848. },
  19849. "policies": {
  19850. "type": "array",
  19851. "items": {
  19852. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  19853. }
  19854. }
  19855. },
  19856. "additionalProperties": false
  19857. }
  19858. },
  19859. "additionalProperties": false
  19860. },
  19861. "Model": {
  19862. "type": "object",
  19863. "properties": {
  19864. "id": {
  19865. "type": "string"
  19866. },
  19867. "providerID": {
  19868. "type": "string"
  19869. },
  19870. "api": {
  19871. "type": "object",
  19872. "properties": {
  19873. "id": {
  19874. "type": "string"
  19875. },
  19876. "url": {
  19877. "type": "string"
  19878. },
  19879. "npm": {
  19880. "type": "string"
  19881. }
  19882. },
  19883. "required": ["id", "url", "npm"],
  19884. "additionalProperties": false
  19885. },
  19886. "name": {
  19887. "type": "string"
  19888. },
  19889. "family": {
  19890. "type": "string"
  19891. },
  19892. "capabilities": {
  19893. "type": "object",
  19894. "properties": {
  19895. "temperature": {
  19896. "type": "boolean"
  19897. },
  19898. "reasoning": {
  19899. "type": "boolean"
  19900. },
  19901. "attachment": {
  19902. "type": "boolean"
  19903. },
  19904. "toolcall": {
  19905. "type": "boolean"
  19906. },
  19907. "input": {
  19908. "type": "object",
  19909. "properties": {
  19910. "text": {
  19911. "type": "boolean"
  19912. },
  19913. "audio": {
  19914. "type": "boolean"
  19915. },
  19916. "image": {
  19917. "type": "boolean"
  19918. },
  19919. "video": {
  19920. "type": "boolean"
  19921. },
  19922. "pdf": {
  19923. "type": "boolean"
  19924. }
  19925. },
  19926. "required": ["text", "audio", "image", "video", "pdf"],
  19927. "additionalProperties": false
  19928. },
  19929. "output": {
  19930. "type": "object",
  19931. "properties": {
  19932. "text": {
  19933. "type": "boolean"
  19934. },
  19935. "audio": {
  19936. "type": "boolean"
  19937. },
  19938. "image": {
  19939. "type": "boolean"
  19940. },
  19941. "video": {
  19942. "type": "boolean"
  19943. },
  19944. "pdf": {
  19945. "type": "boolean"
  19946. }
  19947. },
  19948. "required": ["text", "audio", "image", "video", "pdf"],
  19949. "additionalProperties": false
  19950. },
  19951. "interleaved": {
  19952. "anyOf": [
  19953. {
  19954. "type": "boolean"
  19955. },
  19956. {
  19957. "type": "object",
  19958. "properties": {
  19959. "field": {
  19960. "type": "string",
  19961. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19962. }
  19963. },
  19964. "required": ["field"],
  19965. "additionalProperties": false
  19966. }
  19967. ]
  19968. }
  19969. },
  19970. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  19971. "additionalProperties": false
  19972. },
  19973. "cost": {
  19974. "type": "object",
  19975. "properties": {
  19976. "input": {
  19977. "type": "number"
  19978. },
  19979. "output": {
  19980. "type": "number"
  19981. },
  19982. "cache": {
  19983. "type": "object",
  19984. "properties": {
  19985. "read": {
  19986. "type": "number"
  19987. },
  19988. "write": {
  19989. "type": "number"
  19990. }
  19991. },
  19992. "required": ["read", "write"],
  19993. "additionalProperties": false
  19994. },
  19995. "tiers": {
  19996. "type": "array",
  19997. "items": {
  19998. "type": "object",
  19999. "properties": {
  20000. "input": {
  20001. "type": "number"
  20002. },
  20003. "output": {
  20004. "type": "number"
  20005. },
  20006. "cache": {
  20007. "type": "object",
  20008. "properties": {
  20009. "read": {
  20010. "type": "number"
  20011. },
  20012. "write": {
  20013. "type": "number"
  20014. }
  20015. },
  20016. "required": ["read", "write"],
  20017. "additionalProperties": false
  20018. },
  20019. "tier": {
  20020. "type": "object",
  20021. "properties": {
  20022. "type": {
  20023. "type": "string",
  20024. "enum": ["context"]
  20025. },
  20026. "size": {
  20027. "type": "number"
  20028. }
  20029. },
  20030. "required": ["type", "size"],
  20031. "additionalProperties": false
  20032. }
  20033. },
  20034. "required": ["input", "output", "cache", "tier"],
  20035. "additionalProperties": false
  20036. }
  20037. },
  20038. "experimentalOver200K": {
  20039. "type": "object",
  20040. "properties": {
  20041. "input": {
  20042. "type": "number"
  20043. },
  20044. "output": {
  20045. "type": "number"
  20046. },
  20047. "cache": {
  20048. "type": "object",
  20049. "properties": {
  20050. "read": {
  20051. "type": "number"
  20052. },
  20053. "write": {
  20054. "type": "number"
  20055. }
  20056. },
  20057. "required": ["read", "write"],
  20058. "additionalProperties": false
  20059. }
  20060. },
  20061. "required": ["input", "output", "cache"],
  20062. "additionalProperties": false
  20063. }
  20064. },
  20065. "required": ["input", "output", "cache"],
  20066. "additionalProperties": false
  20067. },
  20068. "limit": {
  20069. "type": "object",
  20070. "properties": {
  20071. "context": {
  20072. "type": "number"
  20073. },
  20074. "input": {
  20075. "type": "number"
  20076. },
  20077. "output": {
  20078. "type": "number"
  20079. }
  20080. },
  20081. "required": ["context", "output"],
  20082. "additionalProperties": false
  20083. },
  20084. "status": {
  20085. "type": "string",
  20086. "enum": ["alpha", "beta", "deprecated", "active"]
  20087. },
  20088. "options": {
  20089. "type": "object"
  20090. },
  20091. "headers": {
  20092. "type": "object",
  20093. "additionalProperties": {
  20094. "type": "string"
  20095. }
  20096. },
  20097. "release_date": {
  20098. "type": "string"
  20099. },
  20100. "variants": {
  20101. "type": "object",
  20102. "additionalProperties": {
  20103. "type": "object"
  20104. }
  20105. }
  20106. },
  20107. "required": [
  20108. "id",
  20109. "providerID",
  20110. "api",
  20111. "name",
  20112. "capabilities",
  20113. "cost",
  20114. "limit",
  20115. "status",
  20116. "options",
  20117. "headers",
  20118. "release_date"
  20119. ],
  20120. "additionalProperties": false
  20121. },
  20122. "Provider": {
  20123. "type": "object",
  20124. "properties": {
  20125. "id": {
  20126. "type": "string"
  20127. },
  20128. "name": {
  20129. "type": "string"
  20130. },
  20131. "source": {
  20132. "type": "string",
  20133. "enum": ["env", "config", "custom", "api"]
  20134. },
  20135. "env": {
  20136. "type": "array",
  20137. "items": {
  20138. "type": "string"
  20139. }
  20140. },
  20141. "key": {
  20142. "type": "string"
  20143. },
  20144. "options": {
  20145. "type": "object"
  20146. },
  20147. "models": {
  20148. "type": "object",
  20149. "additionalProperties": {
  20150. "$ref": "#/components/schemas/Model"
  20151. }
  20152. }
  20153. },
  20154. "required": ["id", "name", "source", "env", "options", "models"],
  20155. "additionalProperties": false
  20156. },
  20157. "ConsoleState": {
  20158. "type": "object",
  20159. "properties": {
  20160. "consoleManagedProviders": {
  20161. "type": "array",
  20162. "items": {
  20163. "type": "string"
  20164. }
  20165. },
  20166. "activeOrgName": {
  20167. "type": "string"
  20168. },
  20169. "switchableOrgCount": {
  20170. "type": "integer",
  20171. "minimum": 0
  20172. }
  20173. },
  20174. "required": ["consoleManagedProviders", "switchableOrgCount"],
  20175. "additionalProperties": false
  20176. },
  20177. "effect_HttpApiError_InternalServerError": {
  20178. "type": "object",
  20179. "properties": {
  20180. "_tag": {
  20181. "type": "string",
  20182. "enum": ["InternalServerError"]
  20183. }
  20184. },
  20185. "required": ["_tag"],
  20186. "additionalProperties": false
  20187. },
  20188. "ToolListItem": {
  20189. "type": "object",
  20190. "properties": {
  20191. "id": {
  20192. "type": "string"
  20193. },
  20194. "description": {
  20195. "type": "string"
  20196. },
  20197. "parameters": {}
  20198. },
  20199. "required": ["id", "description", "parameters"],
  20200. "additionalProperties": false
  20201. },
  20202. "ToolList": {
  20203. "type": "array",
  20204. "items": {
  20205. "$ref": "#/components/schemas/ToolListItem"
  20206. }
  20207. },
  20208. "ToolIDs": {
  20209. "type": "array",
  20210. "items": {
  20211. "type": "string"
  20212. }
  20213. },
  20214. "WorktreeError": {
  20215. "type": "object",
  20216. "properties": {
  20217. "name": {
  20218. "type": "string",
  20219. "enum": [
  20220. "WorktreeNotGitError",
  20221. "WorktreeNameGenerationFailedError",
  20222. "WorktreeCreateFailedError",
  20223. "WorktreeStartCommandFailedError",
  20224. "WorktreeRemoveFailedError",
  20225. "WorktreeResetFailedError",
  20226. "WorktreeListFailedError"
  20227. ]
  20228. },
  20229. "data": {
  20230. "type": "object",
  20231. "properties": {
  20232. "message": {
  20233. "type": "string"
  20234. }
  20235. },
  20236. "required": ["message"],
  20237. "additionalProperties": false
  20238. }
  20239. },
  20240. "required": ["name", "data"],
  20241. "additionalProperties": false
  20242. },
  20243. "WorktreeCreateInput": {
  20244. "type": "object",
  20245. "properties": {
  20246. "name": {
  20247. "type": "string"
  20248. },
  20249. "startCommand": {
  20250. "type": "string",
  20251. "description": "Additional startup script to run after the project's start command"
  20252. }
  20253. },
  20254. "additionalProperties": false
  20255. },
  20256. "Worktree": {
  20257. "type": "object",
  20258. "properties": {
  20259. "name": {
  20260. "type": "string"
  20261. },
  20262. "branch": {
  20263. "type": "string"
  20264. },
  20265. "directory": {
  20266. "type": "string"
  20267. }
  20268. },
  20269. "required": ["name", "directory"],
  20270. "additionalProperties": false
  20271. },
  20272. "WorktreeRemoveInput": {
  20273. "type": "object",
  20274. "properties": {
  20275. "directory": {
  20276. "type": "string"
  20277. }
  20278. },
  20279. "required": ["directory"],
  20280. "additionalProperties": false
  20281. },
  20282. "WorktreeResetInput": {
  20283. "type": "object",
  20284. "properties": {
  20285. "directory": {
  20286. "type": "string"
  20287. }
  20288. },
  20289. "required": ["directory"],
  20290. "additionalProperties": false
  20291. },
  20292. "ProjectSummary": {
  20293. "type": "object",
  20294. "properties": {
  20295. "id": {
  20296. "type": "string"
  20297. },
  20298. "name": {
  20299. "type": "string"
  20300. },
  20301. "worktree": {
  20302. "type": "string"
  20303. }
  20304. },
  20305. "required": ["id", "worktree"],
  20306. "additionalProperties": false
  20307. },
  20308. "GlobalSession": {
  20309. "type": "object",
  20310. "properties": {
  20311. "id": {
  20312. "type": "string",
  20313. "pattern": "^ses"
  20314. },
  20315. "slug": {
  20316. "type": "string"
  20317. },
  20318. "projectID": {
  20319. "type": "string"
  20320. },
  20321. "workspaceID": {
  20322. "type": "string",
  20323. "pattern": "^wrk"
  20324. },
  20325. "directory": {
  20326. "type": "string"
  20327. },
  20328. "path": {
  20329. "type": "string"
  20330. },
  20331. "parentID": {
  20332. "type": "string",
  20333. "pattern": "^ses"
  20334. },
  20335. "summary": {
  20336. "type": "object",
  20337. "properties": {
  20338. "additions": {
  20339. "type": "number"
  20340. },
  20341. "deletions": {
  20342. "type": "number"
  20343. },
  20344. "files": {
  20345. "type": "number"
  20346. },
  20347. "diffs": {
  20348. "type": "array",
  20349. "items": {
  20350. "$ref": "#/components/schemas/SnapshotFileDiff"
  20351. }
  20352. }
  20353. },
  20354. "required": ["additions", "deletions", "files"],
  20355. "additionalProperties": false
  20356. },
  20357. "cost": {
  20358. "type": "number"
  20359. },
  20360. "tokens": {
  20361. "type": "object",
  20362. "properties": {
  20363. "input": {
  20364. "type": "number"
  20365. },
  20366. "output": {
  20367. "type": "number"
  20368. },
  20369. "reasoning": {
  20370. "type": "number"
  20371. },
  20372. "cache": {
  20373. "type": "object",
  20374. "properties": {
  20375. "read": {
  20376. "type": "number"
  20377. },
  20378. "write": {
  20379. "type": "number"
  20380. }
  20381. },
  20382. "required": ["read", "write"],
  20383. "additionalProperties": false
  20384. }
  20385. },
  20386. "required": ["input", "output", "reasoning", "cache"],
  20387. "additionalProperties": false
  20388. },
  20389. "share": {
  20390. "type": "object",
  20391. "properties": {
  20392. "url": {
  20393. "type": "string"
  20394. }
  20395. },
  20396. "required": ["url"],
  20397. "additionalProperties": false
  20398. },
  20399. "title": {
  20400. "type": "string"
  20401. },
  20402. "agent": {
  20403. "type": "string"
  20404. },
  20405. "model": {
  20406. "type": "object",
  20407. "properties": {
  20408. "id": {
  20409. "type": "string"
  20410. },
  20411. "providerID": {
  20412. "type": "string"
  20413. },
  20414. "variant": {
  20415. "type": "string"
  20416. }
  20417. },
  20418. "required": ["id", "providerID"],
  20419. "additionalProperties": false
  20420. },
  20421. "version": {
  20422. "type": "string"
  20423. },
  20424. "metadata": {
  20425. "type": "object"
  20426. },
  20427. "time": {
  20428. "type": "object",
  20429. "properties": {
  20430. "created": {
  20431. "type": "integer",
  20432. "minimum": 0
  20433. },
  20434. "updated": {
  20435. "type": "integer",
  20436. "minimum": 0
  20437. },
  20438. "compacting": {
  20439. "type": "integer",
  20440. "minimum": 0
  20441. },
  20442. "archived": {
  20443. "type": "number"
  20444. }
  20445. },
  20446. "required": ["created", "updated"],
  20447. "additionalProperties": false
  20448. },
  20449. "permission": {
  20450. "$ref": "#/components/schemas/PermissionRuleset"
  20451. },
  20452. "revert": {
  20453. "type": "object",
  20454. "properties": {
  20455. "messageID": {
  20456. "type": "string",
  20457. "pattern": "^msg"
  20458. },
  20459. "partID": {
  20460. "type": "string",
  20461. "pattern": "^prt"
  20462. },
  20463. "snapshot": {
  20464. "type": "string"
  20465. },
  20466. "diff": {
  20467. "type": "string"
  20468. }
  20469. },
  20470. "required": ["messageID"],
  20471. "additionalProperties": false
  20472. },
  20473. "project": {
  20474. "anyOf": [
  20475. {
  20476. "$ref": "#/components/schemas/ProjectSummary"
  20477. },
  20478. {
  20479. "type": "null"
  20480. }
  20481. ]
  20482. }
  20483. },
  20484. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  20485. "additionalProperties": false
  20486. },
  20487. "McpResource": {
  20488. "type": "object",
  20489. "properties": {
  20490. "name": {
  20491. "type": "string"
  20492. },
  20493. "uri": {
  20494. "type": "string"
  20495. },
  20496. "description": {
  20497. "type": "string"
  20498. },
  20499. "mimeType": {
  20500. "type": "string"
  20501. },
  20502. "client": {
  20503. "type": "string"
  20504. }
  20505. },
  20506. "required": ["name", "uri", "client"],
  20507. "additionalProperties": false
  20508. },
  20509. "Symbol": {
  20510. "type": "object",
  20511. "properties": {
  20512. "name": {
  20513. "type": "string"
  20514. },
  20515. "kind": {
  20516. "type": "integer",
  20517. "minimum": 0
  20518. },
  20519. "location": {
  20520. "type": "object",
  20521. "properties": {
  20522. "uri": {
  20523. "type": "string"
  20524. },
  20525. "range": {
  20526. "$ref": "#/components/schemas/Range"
  20527. }
  20528. },
  20529. "required": ["uri", "range"],
  20530. "additionalProperties": false
  20531. }
  20532. },
  20533. "required": ["name", "kind", "location"],
  20534. "additionalProperties": false
  20535. },
  20536. "FileNode": {
  20537. "type": "object",
  20538. "properties": {
  20539. "name": {
  20540. "type": "string"
  20541. },
  20542. "path": {
  20543. "type": "string"
  20544. },
  20545. "absolute": {
  20546. "type": "string"
  20547. },
  20548. "type": {
  20549. "type": "string",
  20550. "enum": ["file", "directory"]
  20551. },
  20552. "ignored": {
  20553. "type": "boolean"
  20554. }
  20555. },
  20556. "required": ["name", "path", "absolute", "type", "ignored"],
  20557. "additionalProperties": false
  20558. },
  20559. "FileContent": {
  20560. "type": "object",
  20561. "properties": {
  20562. "type": {
  20563. "type": "string",
  20564. "enum": ["text", "binary"]
  20565. },
  20566. "content": {
  20567. "type": "string"
  20568. },
  20569. "diff": {
  20570. "type": "string"
  20571. },
  20572. "patch": {
  20573. "type": "object",
  20574. "properties": {
  20575. "oldFileName": {
  20576. "type": "string"
  20577. },
  20578. "newFileName": {
  20579. "type": "string"
  20580. },
  20581. "oldHeader": {
  20582. "type": "string"
  20583. },
  20584. "newHeader": {
  20585. "type": "string"
  20586. },
  20587. "hunks": {
  20588. "type": "array",
  20589. "items": {
  20590. "type": "object",
  20591. "properties": {
  20592. "oldStart": {
  20593. "type": "integer",
  20594. "minimum": 0
  20595. },
  20596. "oldLines": {
  20597. "type": "integer",
  20598. "minimum": 0
  20599. },
  20600. "newStart": {
  20601. "type": "integer",
  20602. "minimum": 0
  20603. },
  20604. "newLines": {
  20605. "type": "integer",
  20606. "minimum": 0
  20607. },
  20608. "lines": {
  20609. "type": "array",
  20610. "items": {
  20611. "type": "string"
  20612. }
  20613. }
  20614. },
  20615. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  20616. "additionalProperties": false
  20617. }
  20618. },
  20619. "index": {
  20620. "type": "string"
  20621. }
  20622. },
  20623. "required": ["oldFileName", "newFileName", "hunks"],
  20624. "additionalProperties": false
  20625. },
  20626. "encoding": {
  20627. "type": "string",
  20628. "enum": ["base64"]
  20629. },
  20630. "mimeType": {
  20631. "type": "string"
  20632. }
  20633. },
  20634. "required": ["type", "content"],
  20635. "additionalProperties": false
  20636. },
  20637. "File": {
  20638. "type": "object",
  20639. "properties": {
  20640. "path": {
  20641. "type": "string"
  20642. },
  20643. "added": {
  20644. "type": "integer",
  20645. "minimum": 0
  20646. },
  20647. "removed": {
  20648. "type": "integer",
  20649. "minimum": 0
  20650. },
  20651. "status": {
  20652. "type": "string",
  20653. "enum": ["added", "deleted", "modified"]
  20654. }
  20655. },
  20656. "required": ["path", "added", "removed", "status"],
  20657. "additionalProperties": false
  20658. },
  20659. "Path": {
  20660. "type": "object",
  20661. "properties": {
  20662. "home": {
  20663. "type": "string"
  20664. },
  20665. "state": {
  20666. "type": "string"
  20667. },
  20668. "config": {
  20669. "type": "string"
  20670. },
  20671. "worktree": {
  20672. "type": "string"
  20673. },
  20674. "directory": {
  20675. "type": "string"
  20676. }
  20677. },
  20678. "required": ["home", "state", "config", "worktree", "directory"],
  20679. "additionalProperties": false
  20680. },
  20681. "VcsInfo": {
  20682. "type": "object",
  20683. "properties": {
  20684. "branch": {
  20685. "type": "string"
  20686. },
  20687. "default_branch": {
  20688. "type": "string"
  20689. }
  20690. },
  20691. "additionalProperties": false
  20692. },
  20693. "VcsFileStatus": {
  20694. "type": "object",
  20695. "properties": {
  20696. "file": {
  20697. "type": "string"
  20698. },
  20699. "additions": {
  20700. "type": "number"
  20701. },
  20702. "deletions": {
  20703. "type": "number"
  20704. },
  20705. "status": {
  20706. "type": "string",
  20707. "enum": ["added", "deleted", "modified"]
  20708. }
  20709. },
  20710. "required": ["file", "additions", "deletions", "status"],
  20711. "additionalProperties": false
  20712. },
  20713. "VcsFileDiff": {
  20714. "type": "object",
  20715. "properties": {
  20716. "file": {
  20717. "type": "string"
  20718. },
  20719. "patch": {
  20720. "type": "string"
  20721. },
  20722. "additions": {
  20723. "type": "number"
  20724. },
  20725. "deletions": {
  20726. "type": "number"
  20727. },
  20728. "status": {
  20729. "type": "string",
  20730. "enum": ["added", "deleted", "modified"]
  20731. }
  20732. },
  20733. "required": ["file", "additions", "deletions"],
  20734. "additionalProperties": false
  20735. },
  20736. "VcsApplyError": {
  20737. "type": "object",
  20738. "properties": {
  20739. "name": {
  20740. "type": "string",
  20741. "enum": ["VcsApplyError"]
  20742. },
  20743. "data": {
  20744. "type": "object",
  20745. "properties": {
  20746. "message": {
  20747. "type": "string"
  20748. },
  20749. "reason": {
  20750. "type": "string",
  20751. "enum": ["non-git", "not-clean"]
  20752. }
  20753. },
  20754. "required": ["message", "reason"],
  20755. "additionalProperties": false
  20756. }
  20757. },
  20758. "required": ["name", "data"],
  20759. "additionalProperties": false
  20760. },
  20761. "Command": {
  20762. "type": "object",
  20763. "properties": {
  20764. "name": {
  20765. "type": "string"
  20766. },
  20767. "description": {
  20768. "type": "string"
  20769. },
  20770. "agent": {
  20771. "type": "string"
  20772. },
  20773. "model": {
  20774. "type": "string"
  20775. },
  20776. "source": {
  20777. "type": "string",
  20778. "enum": ["command", "mcp", "skill"]
  20779. },
  20780. "template": {
  20781. "type": "string"
  20782. },
  20783. "subtask": {
  20784. "type": "boolean"
  20785. },
  20786. "hints": {
  20787. "type": "array",
  20788. "items": {
  20789. "type": "string"
  20790. }
  20791. }
  20792. },
  20793. "required": ["name", "template", "hints"],
  20794. "additionalProperties": false
  20795. },
  20796. "Agent": {
  20797. "type": "object",
  20798. "properties": {
  20799. "name": {
  20800. "type": "string"
  20801. },
  20802. "description": {
  20803. "type": "string"
  20804. },
  20805. "mode": {
  20806. "type": "string",
  20807. "enum": ["subagent", "primary", "all"]
  20808. },
  20809. "native": {
  20810. "type": "boolean"
  20811. },
  20812. "hidden": {
  20813. "type": "boolean"
  20814. },
  20815. "topP": {
  20816. "type": "number"
  20817. },
  20818. "temperature": {
  20819. "type": "number"
  20820. },
  20821. "color": {
  20822. "type": "string"
  20823. },
  20824. "permission": {
  20825. "$ref": "#/components/schemas/PermissionRuleset"
  20826. },
  20827. "model": {
  20828. "type": "object",
  20829. "properties": {
  20830. "modelID": {
  20831. "type": "string"
  20832. },
  20833. "providerID": {
  20834. "type": "string"
  20835. }
  20836. },
  20837. "required": ["modelID", "providerID"],
  20838. "additionalProperties": false
  20839. },
  20840. "variant": {
  20841. "type": "string"
  20842. },
  20843. "prompt": {
  20844. "type": "string"
  20845. },
  20846. "options": {
  20847. "type": "object"
  20848. },
  20849. "steps": {
  20850. "type": "number"
  20851. }
  20852. },
  20853. "required": ["name", "mode", "permission", "options"],
  20854. "additionalProperties": false
  20855. },
  20856. "LSPStatus": {
  20857. "type": "object",
  20858. "properties": {
  20859. "id": {
  20860. "type": "string"
  20861. },
  20862. "name": {
  20863. "type": "string"
  20864. },
  20865. "root": {
  20866. "type": "string"
  20867. },
  20868. "status": {
  20869. "type": "string",
  20870. "enum": ["connected", "error"]
  20871. }
  20872. },
  20873. "required": ["id", "name", "root", "status"],
  20874. "additionalProperties": false
  20875. },
  20876. "FormatterStatus": {
  20877. "type": "object",
  20878. "properties": {
  20879. "name": {
  20880. "type": "string"
  20881. },
  20882. "extensions": {
  20883. "type": "array",
  20884. "items": {
  20885. "type": "string"
  20886. }
  20887. },
  20888. "enabled": {
  20889. "type": "boolean"
  20890. }
  20891. },
  20892. "required": ["name", "extensions", "enabled"],
  20893. "additionalProperties": false
  20894. },
  20895. "MCPStatusConnected": {
  20896. "type": "object",
  20897. "properties": {
  20898. "status": {
  20899. "type": "string",
  20900. "enum": ["connected"]
  20901. }
  20902. },
  20903. "required": ["status"],
  20904. "additionalProperties": false
  20905. },
  20906. "MCPStatusDisabled": {
  20907. "type": "object",
  20908. "properties": {
  20909. "status": {
  20910. "type": "string",
  20911. "enum": ["disabled"]
  20912. }
  20913. },
  20914. "required": ["status"],
  20915. "additionalProperties": false
  20916. },
  20917. "MCPStatusFailed": {
  20918. "type": "object",
  20919. "properties": {
  20920. "status": {
  20921. "type": "string",
  20922. "enum": ["failed"]
  20923. },
  20924. "error": {
  20925. "type": "string"
  20926. }
  20927. },
  20928. "required": ["status", "error"],
  20929. "additionalProperties": false
  20930. },
  20931. "MCPStatusNeedsAuth": {
  20932. "type": "object",
  20933. "properties": {
  20934. "status": {
  20935. "type": "string",
  20936. "enum": ["needs_auth"]
  20937. }
  20938. },
  20939. "required": ["status"],
  20940. "additionalProperties": false
  20941. },
  20942. "MCPStatusNeedsClientRegistration": {
  20943. "type": "object",
  20944. "properties": {
  20945. "status": {
  20946. "type": "string",
  20947. "enum": ["needs_client_registration"]
  20948. },
  20949. "error": {
  20950. "type": "string"
  20951. }
  20952. },
  20953. "required": ["status", "error"],
  20954. "additionalProperties": false
  20955. },
  20956. "MCPStatus": {
  20957. "anyOf": [
  20958. {
  20959. "$ref": "#/components/schemas/MCPStatusConnected"
  20960. },
  20961. {
  20962. "$ref": "#/components/schemas/MCPStatusDisabled"
  20963. },
  20964. {
  20965. "$ref": "#/components/schemas/MCPStatusFailed"
  20966. },
  20967. {
  20968. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  20969. },
  20970. {
  20971. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  20972. }
  20973. ]
  20974. },
  20975. "McpUnsupportedOAuthError": {
  20976. "type": "object",
  20977. "properties": {
  20978. "error": {
  20979. "type": "string"
  20980. }
  20981. },
  20982. "required": ["error"],
  20983. "additionalProperties": false
  20984. },
  20985. "McpServerNotFoundError": {
  20986. "type": "object",
  20987. "properties": {
  20988. "_tag": {
  20989. "type": "string",
  20990. "enum": ["McpServerNotFoundError"]
  20991. },
  20992. "name": {
  20993. "type": "string"
  20994. },
  20995. "message": {
  20996. "type": "string"
  20997. }
  20998. },
  20999. "required": ["_tag", "name", "message"],
  21000. "additionalProperties": false
  21001. },
  21002. "Project": {
  21003. "type": "object",
  21004. "properties": {
  21005. "id": {
  21006. "type": "string"
  21007. },
  21008. "worktree": {
  21009. "type": "string"
  21010. },
  21011. "vcs": {
  21012. "type": "string",
  21013. "enum": ["git"]
  21014. },
  21015. "name": {
  21016. "type": "string"
  21017. },
  21018. "icon": {
  21019. "type": "object",
  21020. "properties": {
  21021. "url": {
  21022. "type": "string"
  21023. },
  21024. "override": {
  21025. "type": "string"
  21026. },
  21027. "color": {
  21028. "type": "string"
  21029. }
  21030. },
  21031. "additionalProperties": false
  21032. },
  21033. "commands": {
  21034. "type": "object",
  21035. "properties": {
  21036. "start": {
  21037. "type": "string",
  21038. "description": "Startup script to run when creating a new workspace (worktree)"
  21039. }
  21040. },
  21041. "additionalProperties": false
  21042. },
  21043. "time": {
  21044. "type": "object",
  21045. "properties": {
  21046. "created": {
  21047. "type": "integer",
  21048. "minimum": 0
  21049. },
  21050. "updated": {
  21051. "type": "integer",
  21052. "minimum": 0
  21053. },
  21054. "initialized": {
  21055. "type": "integer",
  21056. "minimum": 0
  21057. }
  21058. },
  21059. "required": ["created", "updated"],
  21060. "additionalProperties": false
  21061. },
  21062. "sandboxes": {
  21063. "type": "array",
  21064. "items": {
  21065. "type": "string"
  21066. }
  21067. }
  21068. },
  21069. "required": ["id", "worktree", "time", "sandboxes"],
  21070. "additionalProperties": false
  21071. },
  21072. "ProjectNotFoundError": {
  21073. "type": "object",
  21074. "properties": {
  21075. "_tag": {
  21076. "type": "string",
  21077. "enum": ["ProjectNotFoundError"]
  21078. },
  21079. "projectID": {
  21080. "type": "string"
  21081. },
  21082. "message": {
  21083. "type": "string"
  21084. }
  21085. },
  21086. "required": ["_tag", "projectID", "message"],
  21087. "additionalProperties": false
  21088. },
  21089. "ProjectCopyError": {
  21090. "type": "object",
  21091. "properties": {
  21092. "name": {
  21093. "type": "string",
  21094. "enum": ["ProjectCopyError"]
  21095. },
  21096. "data": {
  21097. "type": "object",
  21098. "properties": {
  21099. "message": {
  21100. "type": "string"
  21101. },
  21102. "forceRequired": {
  21103. "type": "boolean"
  21104. }
  21105. },
  21106. "required": ["message"],
  21107. "additionalProperties": false
  21108. }
  21109. },
  21110. "required": ["name", "data"],
  21111. "additionalProperties": false
  21112. },
  21113. "PtyNotFoundError": {
  21114. "type": "object",
  21115. "properties": {
  21116. "_tag": {
  21117. "type": "string",
  21118. "enum": ["PtyNotFoundError"]
  21119. },
  21120. "ptyID": {
  21121. "type": "string"
  21122. },
  21123. "message": {
  21124. "type": "string"
  21125. }
  21126. },
  21127. "required": ["_tag", "ptyID", "message"],
  21128. "additionalProperties": false
  21129. },
  21130. "PtyForbiddenError": {
  21131. "type": "object",
  21132. "properties": {
  21133. "_tag": {
  21134. "type": "string",
  21135. "enum": ["PtyForbiddenError"]
  21136. },
  21137. "message": {
  21138. "type": "string"
  21139. }
  21140. },
  21141. "required": ["_tag", "message"],
  21142. "additionalProperties": false
  21143. },
  21144. "QuestionRequest": {
  21145. "type": "object",
  21146. "properties": {
  21147. "id": {
  21148. "type": "string",
  21149. "pattern": "^que"
  21150. },
  21151. "sessionID": {
  21152. "type": "string",
  21153. "pattern": "^ses"
  21154. },
  21155. "questions": {
  21156. "type": "array",
  21157. "items": {
  21158. "$ref": "#/components/schemas/QuestionInfo"
  21159. },
  21160. "description": "Questions to ask"
  21161. },
  21162. "tool": {
  21163. "$ref": "#/components/schemas/QuestionTool"
  21164. }
  21165. },
  21166. "required": ["id", "sessionID", "questions"],
  21167. "additionalProperties": false
  21168. },
  21169. "QuestionNotFoundError": {
  21170. "type": "object",
  21171. "properties": {
  21172. "_tag": {
  21173. "type": "string",
  21174. "enum": ["QuestionNotFoundError"]
  21175. },
  21176. "requestID": {
  21177. "type": "string"
  21178. },
  21179. "message": {
  21180. "type": "string"
  21181. }
  21182. },
  21183. "required": ["_tag", "requestID", "message"],
  21184. "additionalProperties": false
  21185. },
  21186. "PermissionRequest": {
  21187. "type": "object",
  21188. "properties": {
  21189. "id": {
  21190. "type": "string",
  21191. "pattern": "^per"
  21192. },
  21193. "sessionID": {
  21194. "type": "string",
  21195. "pattern": "^ses"
  21196. },
  21197. "permission": {
  21198. "type": "string"
  21199. },
  21200. "patterns": {
  21201. "type": "array",
  21202. "items": {
  21203. "type": "string"
  21204. }
  21205. },
  21206. "metadata": {
  21207. "type": "object"
  21208. },
  21209. "always": {
  21210. "type": "array",
  21211. "items": {
  21212. "type": "string"
  21213. }
  21214. },
  21215. "tool": {
  21216. "type": "object",
  21217. "properties": {
  21218. "messageID": {
  21219. "type": "string"
  21220. },
  21221. "callID": {
  21222. "type": "string"
  21223. }
  21224. },
  21225. "required": ["messageID", "callID"],
  21226. "additionalProperties": false
  21227. }
  21228. },
  21229. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  21230. "additionalProperties": false
  21231. },
  21232. "PermissionNotFoundError": {
  21233. "type": "object",
  21234. "properties": {
  21235. "_tag": {
  21236. "type": "string",
  21237. "enum": ["PermissionNotFoundError"]
  21238. },
  21239. "requestID": {
  21240. "type": "string"
  21241. },
  21242. "message": {
  21243. "type": "string"
  21244. }
  21245. },
  21246. "required": ["_tag", "requestID", "message"],
  21247. "additionalProperties": false
  21248. },
  21249. "ProviderAuthMethod": {
  21250. "type": "object",
  21251. "properties": {
  21252. "type": {
  21253. "type": "string",
  21254. "enum": ["oauth", "api"]
  21255. },
  21256. "label": {
  21257. "type": "string"
  21258. },
  21259. "prompts": {
  21260. "type": "array",
  21261. "items": {
  21262. "anyOf": [
  21263. {
  21264. "type": "object",
  21265. "properties": {
  21266. "type": {
  21267. "type": "string",
  21268. "enum": ["text"]
  21269. },
  21270. "key": {
  21271. "type": "string"
  21272. },
  21273. "message": {
  21274. "type": "string"
  21275. },
  21276. "placeholder": {
  21277. "type": "string"
  21278. },
  21279. "when": {
  21280. "type": "object",
  21281. "properties": {
  21282. "key": {
  21283. "type": "string"
  21284. },
  21285. "op": {
  21286. "type": "string",
  21287. "enum": ["eq", "neq"]
  21288. },
  21289. "value": {
  21290. "type": "string"
  21291. }
  21292. },
  21293. "required": ["key", "op", "value"],
  21294. "additionalProperties": false
  21295. }
  21296. },
  21297. "required": ["type", "key", "message"],
  21298. "additionalProperties": false
  21299. },
  21300. {
  21301. "type": "object",
  21302. "properties": {
  21303. "type": {
  21304. "type": "string",
  21305. "enum": ["select"]
  21306. },
  21307. "key": {
  21308. "type": "string"
  21309. },
  21310. "message": {
  21311. "type": "string"
  21312. },
  21313. "options": {
  21314. "type": "array",
  21315. "items": {
  21316. "type": "object",
  21317. "properties": {
  21318. "label": {
  21319. "type": "string"
  21320. },
  21321. "value": {
  21322. "type": "string"
  21323. },
  21324. "hint": {
  21325. "type": "string"
  21326. }
  21327. },
  21328. "required": ["label", "value"],
  21329. "additionalProperties": false
  21330. }
  21331. },
  21332. "when": {
  21333. "type": "object",
  21334. "properties": {
  21335. "key": {
  21336. "type": "string"
  21337. },
  21338. "op": {
  21339. "type": "string",
  21340. "enum": ["eq", "neq"]
  21341. },
  21342. "value": {
  21343. "type": "string"
  21344. }
  21345. },
  21346. "required": ["key", "op", "value"],
  21347. "additionalProperties": false
  21348. }
  21349. },
  21350. "required": ["type", "key", "message", "options"],
  21351. "additionalProperties": false
  21352. }
  21353. ]
  21354. }
  21355. }
  21356. },
  21357. "required": ["type", "label"],
  21358. "additionalProperties": false
  21359. },
  21360. "ProviderAuthAuthorization": {
  21361. "type": "object",
  21362. "properties": {
  21363. "url": {
  21364. "type": "string"
  21365. },
  21366. "method": {
  21367. "type": "string",
  21368. "enum": ["auto", "code"]
  21369. },
  21370. "instructions": {
  21371. "type": "string"
  21372. }
  21373. },
  21374. "required": ["url", "method", "instructions"],
  21375. "additionalProperties": false
  21376. },
  21377. "ProviderAuthError1": {
  21378. "type": "object",
  21379. "properties": {
  21380. "name": {
  21381. "type": "string",
  21382. "enum": [
  21383. "BadRequest",
  21384. "ProviderAuthOauthMissing",
  21385. "ProviderAuthOauthCodeMissing",
  21386. "ProviderAuthOauthCallbackFailed",
  21387. "ProviderAuthValidationFailed"
  21388. ]
  21389. },
  21390. "data": {
  21391. "type": "object",
  21392. "properties": {
  21393. "providerID": {
  21394. "type": "string"
  21395. },
  21396. "field": {
  21397. "type": "string"
  21398. },
  21399. "message": {
  21400. "type": "string"
  21401. },
  21402. "kind": {
  21403. "type": "string"
  21404. }
  21405. },
  21406. "additionalProperties": false
  21407. }
  21408. },
  21409. "required": ["name", "data"],
  21410. "additionalProperties": false
  21411. },
  21412. "NotFoundError": {
  21413. "type": "object",
  21414. "required": ["name", "data"],
  21415. "properties": {
  21416. "name": {
  21417. "type": "string",
  21418. "enum": ["NotFoundError"]
  21419. },
  21420. "data": {
  21421. "type": "object",
  21422. "required": ["message"],
  21423. "properties": {
  21424. "message": {
  21425. "type": "string"
  21426. }
  21427. }
  21428. }
  21429. }
  21430. },
  21431. "TextPartInput": {
  21432. "type": "object",
  21433. "properties": {
  21434. "id": {
  21435. "type": "string",
  21436. "pattern": "^prt"
  21437. },
  21438. "type": {
  21439. "type": "string",
  21440. "enum": ["text"]
  21441. },
  21442. "text": {
  21443. "type": "string"
  21444. },
  21445. "synthetic": {
  21446. "type": "boolean"
  21447. },
  21448. "ignored": {
  21449. "type": "boolean"
  21450. },
  21451. "time": {
  21452. "type": "object",
  21453. "properties": {
  21454. "start": {
  21455. "type": "integer",
  21456. "minimum": 0
  21457. },
  21458. "end": {
  21459. "type": "integer",
  21460. "minimum": 0
  21461. }
  21462. },
  21463. "required": ["start"],
  21464. "additionalProperties": false
  21465. },
  21466. "metadata": {
  21467. "type": "object"
  21468. }
  21469. },
  21470. "required": ["type", "text"],
  21471. "additionalProperties": false
  21472. },
  21473. "FilePartInput": {
  21474. "type": "object",
  21475. "properties": {
  21476. "id": {
  21477. "type": "string",
  21478. "pattern": "^prt"
  21479. },
  21480. "type": {
  21481. "type": "string",
  21482. "enum": ["file"]
  21483. },
  21484. "mime": {
  21485. "type": "string"
  21486. },
  21487. "filename": {
  21488. "type": "string"
  21489. },
  21490. "url": {
  21491. "type": "string"
  21492. },
  21493. "source": {
  21494. "$ref": "#/components/schemas/FilePartSource"
  21495. }
  21496. },
  21497. "required": ["type", "mime", "url"],
  21498. "additionalProperties": false
  21499. },
  21500. "AgentPartInput": {
  21501. "type": "object",
  21502. "properties": {
  21503. "id": {
  21504. "type": "string",
  21505. "pattern": "^prt"
  21506. },
  21507. "type": {
  21508. "type": "string",
  21509. "enum": ["agent"]
  21510. },
  21511. "name": {
  21512. "type": "string"
  21513. },
  21514. "source": {
  21515. "type": "object",
  21516. "properties": {
  21517. "value": {
  21518. "type": "string"
  21519. },
  21520. "start": {
  21521. "type": "integer",
  21522. "minimum": 0
  21523. },
  21524. "end": {
  21525. "type": "integer",
  21526. "minimum": 0
  21527. }
  21528. },
  21529. "required": ["value", "start", "end"],
  21530. "additionalProperties": false
  21531. }
  21532. },
  21533. "required": ["type", "name"],
  21534. "additionalProperties": false
  21535. },
  21536. "SubtaskPartInput": {
  21537. "type": "object",
  21538. "properties": {
  21539. "id": {
  21540. "type": "string",
  21541. "pattern": "^prt"
  21542. },
  21543. "type": {
  21544. "type": "string",
  21545. "enum": ["subtask"]
  21546. },
  21547. "prompt": {
  21548. "type": "string"
  21549. },
  21550. "description": {
  21551. "type": "string"
  21552. },
  21553. "agent": {
  21554. "type": "string"
  21555. },
  21556. "model": {
  21557. "type": "object",
  21558. "properties": {
  21559. "providerID": {
  21560. "type": "string"
  21561. },
  21562. "modelID": {
  21563. "type": "string"
  21564. }
  21565. },
  21566. "required": ["providerID", "modelID"],
  21567. "additionalProperties": false
  21568. },
  21569. "command": {
  21570. "type": "string"
  21571. }
  21572. },
  21573. "required": ["type", "prompt", "description", "agent"],
  21574. "additionalProperties": false
  21575. },
  21576. "SessionBusyError": {
  21577. "type": "object",
  21578. "properties": {
  21579. "_tag": {
  21580. "type": "string",
  21581. "enum": ["SessionBusyError"]
  21582. },
  21583. "sessionID": {
  21584. "type": "string"
  21585. },
  21586. "message": {
  21587. "type": "string"
  21588. }
  21589. },
  21590. "required": ["_tag", "sessionID", "message"],
  21591. "additionalProperties": false
  21592. },
  21593. "EventTuiPromptAppend": {
  21594. "type": "object",
  21595. "properties": {
  21596. "type": {
  21597. "type": "string",
  21598. "enum": ["tui.prompt.append"]
  21599. },
  21600. "properties": {
  21601. "type": "object",
  21602. "properties": {
  21603. "text": {
  21604. "type": "string"
  21605. }
  21606. },
  21607. "required": ["text"],
  21608. "additionalProperties": false
  21609. }
  21610. },
  21611. "required": ["type", "properties"],
  21612. "additionalProperties": false
  21613. },
  21614. "EventTuiCommandExecute": {
  21615. "type": "object",
  21616. "properties": {
  21617. "type": {
  21618. "type": "string",
  21619. "enum": ["tui.command.execute"]
  21620. },
  21621. "properties": {
  21622. "type": "object",
  21623. "properties": {
  21624. "command": {
  21625. "anyOf": [
  21626. {
  21627. "type": "string",
  21628. "enum": [
  21629. "session.list",
  21630. "session.new",
  21631. "session.share",
  21632. "session.interrupt",
  21633. "session.compact",
  21634. "session.page.up",
  21635. "session.page.down",
  21636. "session.line.up",
  21637. "session.line.down",
  21638. "session.half.page.up",
  21639. "session.half.page.down",
  21640. "session.first",
  21641. "session.last",
  21642. "prompt.clear",
  21643. "prompt.submit",
  21644. "agent.cycle"
  21645. ]
  21646. },
  21647. {
  21648. "type": "string"
  21649. }
  21650. ]
  21651. }
  21652. },
  21653. "required": ["command"],
  21654. "additionalProperties": false
  21655. }
  21656. },
  21657. "required": ["type", "properties"],
  21658. "additionalProperties": false
  21659. },
  21660. "EventTuiToastShow": {
  21661. "type": "object",
  21662. "properties": {
  21663. "type": {
  21664. "type": "string",
  21665. "enum": ["tui.toast.show"]
  21666. },
  21667. "properties": {
  21668. "type": "object",
  21669. "properties": {
  21670. "title": {
  21671. "type": "string"
  21672. },
  21673. "message": {
  21674. "type": "string"
  21675. },
  21676. "variant": {
  21677. "type": "string",
  21678. "enum": ["info", "success", "warning", "error"]
  21679. },
  21680. "duration": {
  21681. "type": "integer",
  21682. "exclusiveMinimum": 0
  21683. }
  21684. },
  21685. "required": ["message", "variant"],
  21686. "additionalProperties": false
  21687. }
  21688. },
  21689. "required": ["type", "properties"],
  21690. "additionalProperties": false
  21691. },
  21692. "EventTuiSessionSelect": {
  21693. "type": "object",
  21694. "properties": {
  21695. "type": {
  21696. "type": "string",
  21697. "enum": ["tui.session.select"]
  21698. },
  21699. "properties": {
  21700. "type": "object",
  21701. "properties": {
  21702. "sessionID": {
  21703. "type": "string",
  21704. "pattern": "^ses",
  21705. "description": "Session ID to navigate to"
  21706. }
  21707. },
  21708. "required": ["sessionID"],
  21709. "additionalProperties": false
  21710. }
  21711. },
  21712. "required": ["type", "properties"],
  21713. "additionalProperties": false
  21714. },
  21715. "Workspace": {
  21716. "type": "object",
  21717. "properties": {
  21718. "id": {
  21719. "type": "string",
  21720. "pattern": "^wrk"
  21721. },
  21722. "type": {
  21723. "type": "string"
  21724. },
  21725. "name": {
  21726. "type": "string"
  21727. },
  21728. "branch": {
  21729. "anyOf": [
  21730. {
  21731. "type": "string"
  21732. },
  21733. {
  21734. "type": "null"
  21735. }
  21736. ]
  21737. },
  21738. "directory": {
  21739. "anyOf": [
  21740. {
  21741. "type": "string"
  21742. },
  21743. {
  21744. "type": "null"
  21745. }
  21746. ]
  21747. },
  21748. "extra": {
  21749. "anyOf": [
  21750. {},
  21751. {
  21752. "type": "null"
  21753. }
  21754. ]
  21755. },
  21756. "projectID": {
  21757. "type": "string"
  21758. },
  21759. "timeUsed": {
  21760. "anyOf": [
  21761. {
  21762. "type": "number"
  21763. },
  21764. {
  21765. "type": "string",
  21766. "enum": ["NaN"]
  21767. },
  21768. {
  21769. "type": "string",
  21770. "enum": ["Infinity"]
  21771. },
  21772. {
  21773. "type": "string",
  21774. "enum": ["-Infinity"]
  21775. },
  21776. {
  21777. "type": "string",
  21778. "enum": ["Infinity", "-Infinity", "NaN"]
  21779. }
  21780. ]
  21781. }
  21782. },
  21783. "required": ["id", "type", "name", "projectID", "timeUsed"],
  21784. "additionalProperties": false
  21785. },
  21786. "WorkspaceCreateError": {
  21787. "type": "object",
  21788. "properties": {
  21789. "name": {
  21790. "type": "string",
  21791. "enum": ["WorkspaceCreateError"]
  21792. },
  21793. "data": {
  21794. "type": "object",
  21795. "properties": {
  21796. "message": {
  21797. "type": "string"
  21798. }
  21799. },
  21800. "required": ["message"],
  21801. "additionalProperties": false
  21802. }
  21803. },
  21804. "required": ["name", "data"],
  21805. "additionalProperties": false
  21806. },
  21807. "WorkspaceWarpError": {
  21808. "type": "object",
  21809. "properties": {
  21810. "name": {
  21811. "type": "string",
  21812. "enum": ["WorkspaceWarpError"]
  21813. },
  21814. "data": {
  21815. "type": "object",
  21816. "properties": {
  21817. "message": {
  21818. "type": "string"
  21819. }
  21820. },
  21821. "required": ["message"],
  21822. "additionalProperties": false
  21823. }
  21824. },
  21825. "required": ["name", "data"],
  21826. "additionalProperties": false
  21827. },
  21828. "UnauthorizedError": {
  21829. "type": "object",
  21830. "properties": {
  21831. "_tag": {
  21832. "type": "string",
  21833. "enum": ["UnauthorizedError"]
  21834. },
  21835. "message": {
  21836. "type": "string"
  21837. }
  21838. },
  21839. "required": ["_tag", "message"],
  21840. "additionalProperties": false
  21841. },
  21842. "SessionsResponse": {
  21843. "type": "object",
  21844. "properties": {
  21845. "data": {
  21846. "type": "array",
  21847. "items": {
  21848. "$ref": "#/components/schemas/SessionV2Info"
  21849. }
  21850. },
  21851. "cursor": {
  21852. "type": "object",
  21853. "properties": {
  21854. "previous": {
  21855. "type": "string"
  21856. },
  21857. "next": {
  21858. "type": "string"
  21859. }
  21860. },
  21861. "additionalProperties": false
  21862. }
  21863. },
  21864. "required": ["data", "cursor"],
  21865. "additionalProperties": false
  21866. },
  21867. "InvalidCursorError": {
  21868. "type": "object",
  21869. "properties": {
  21870. "_tag": {
  21871. "type": "string",
  21872. "enum": ["InvalidCursorError"]
  21873. },
  21874. "message": {
  21875. "type": "string"
  21876. }
  21877. },
  21878. "required": ["_tag", "message"],
  21879. "additionalProperties": false
  21880. },
  21881. "SessionNotFoundError": {
  21882. "type": "object",
  21883. "properties": {
  21884. "_tag": {
  21885. "type": "string",
  21886. "enum": ["SessionNotFoundError"]
  21887. },
  21888. "sessionID": {
  21889. "type": "string"
  21890. },
  21891. "message": {
  21892. "type": "string"
  21893. }
  21894. },
  21895. "required": ["_tag", "sessionID", "message"],
  21896. "additionalProperties": false
  21897. },
  21898. "ConflictError": {
  21899. "type": "object",
  21900. "properties": {
  21901. "_tag": {
  21902. "type": "string",
  21903. "enum": ["ConflictError"]
  21904. },
  21905. "message": {
  21906. "type": "string"
  21907. },
  21908. "resource": {
  21909. "type": "string"
  21910. }
  21911. },
  21912. "required": ["_tag", "message"],
  21913. "additionalProperties": false
  21914. },
  21915. "ServiceUnavailableError": {
  21916. "type": "object",
  21917. "properties": {
  21918. "_tag": {
  21919. "type": "string",
  21920. "enum": ["ServiceUnavailableError"]
  21921. },
  21922. "message": {
  21923. "type": "string"
  21924. },
  21925. "service": {
  21926. "type": "string"
  21927. }
  21928. },
  21929. "required": ["_tag", "message"],
  21930. "additionalProperties": false
  21931. },
  21932. "UnknownError1": {
  21933. "type": "object",
  21934. "properties": {
  21935. "_tag": {
  21936. "type": "string",
  21937. "enum": ["UnknownError"]
  21938. },
  21939. "message": {
  21940. "type": "string"
  21941. },
  21942. "ref": {
  21943. "type": "string"
  21944. }
  21945. },
  21946. "required": ["_tag", "message"],
  21947. "additionalProperties": false
  21948. },
  21949. "SessionMessagesResponse": {
  21950. "type": "object",
  21951. "properties": {
  21952. "data": {
  21953. "type": "array",
  21954. "items": {
  21955. "$ref": "#/components/schemas/SessionMessage"
  21956. }
  21957. },
  21958. "cursor": {
  21959. "type": "object",
  21960. "properties": {
  21961. "previous": {
  21962. "type": "string"
  21963. },
  21964. "next": {
  21965. "type": "string"
  21966. }
  21967. },
  21968. "additionalProperties": false
  21969. }
  21970. },
  21971. "required": ["data", "cursor"],
  21972. "additionalProperties": false
  21973. },
  21974. "ProviderNotFoundError": {
  21975. "type": "object",
  21976. "properties": {
  21977. "_tag": {
  21978. "type": "string",
  21979. "enum": ["ProviderNotFoundError"]
  21980. },
  21981. "providerID": {
  21982. "type": "string"
  21983. },
  21984. "message": {
  21985. "type": "string"
  21986. }
  21987. },
  21988. "required": ["_tag", "providerID", "message"],
  21989. "additionalProperties": false
  21990. },
  21991. "effect_HttpApiError_Forbidden": {
  21992. "type": "object",
  21993. "properties": {
  21994. "_tag": {
  21995. "type": "string",
  21996. "enum": ["Forbidden"]
  21997. }
  21998. },
  21999. "required": ["_tag"],
  22000. "additionalProperties": false
  22001. },
  22002. "Event.tui.prompt.append": {
  22003. "type": "object",
  22004. "properties": {
  22005. "id": {
  22006. "type": "string",
  22007. "pattern": "^evt_"
  22008. },
  22009. "type": {
  22010. "type": "string",
  22011. "enum": ["tui.prompt.append"]
  22012. },
  22013. "properties": {
  22014. "type": "object",
  22015. "properties": {
  22016. "text": {
  22017. "type": "string"
  22018. }
  22019. },
  22020. "required": ["text"],
  22021. "additionalProperties": false
  22022. }
  22023. },
  22024. "required": ["id", "type", "properties"],
  22025. "additionalProperties": false
  22026. },
  22027. "Event.tui.command.execute": {
  22028. "type": "object",
  22029. "properties": {
  22030. "id": {
  22031. "type": "string",
  22032. "pattern": "^evt_"
  22033. },
  22034. "type": {
  22035. "type": "string",
  22036. "enum": ["tui.command.execute"]
  22037. },
  22038. "properties": {
  22039. "type": "object",
  22040. "properties": {
  22041. "command": {
  22042. "anyOf": [
  22043. {
  22044. "type": "string",
  22045. "enum": [
  22046. "session.list",
  22047. "session.new",
  22048. "session.share",
  22049. "session.interrupt",
  22050. "session.compact",
  22051. "session.page.up",
  22052. "session.page.down",
  22053. "session.line.up",
  22054. "session.line.down",
  22055. "session.half.page.up",
  22056. "session.half.page.down",
  22057. "session.first",
  22058. "session.last",
  22059. "prompt.clear",
  22060. "prompt.submit",
  22061. "agent.cycle"
  22062. ]
  22063. },
  22064. {
  22065. "type": "string"
  22066. }
  22067. ]
  22068. }
  22069. },
  22070. "required": ["command"],
  22071. "additionalProperties": false
  22072. }
  22073. },
  22074. "required": ["id", "type", "properties"],
  22075. "additionalProperties": false
  22076. },
  22077. "Event.tui.toast.show": {
  22078. "type": "object",
  22079. "properties": {
  22080. "id": {
  22081. "type": "string",
  22082. "pattern": "^evt_"
  22083. },
  22084. "type": {
  22085. "type": "string",
  22086. "enum": ["tui.toast.show"]
  22087. },
  22088. "properties": {
  22089. "type": "object",
  22090. "properties": {
  22091. "title": {
  22092. "type": "string"
  22093. },
  22094. "message": {
  22095. "type": "string"
  22096. },
  22097. "variant": {
  22098. "type": "string",
  22099. "enum": ["info", "success", "warning", "error"]
  22100. },
  22101. "duration": {
  22102. "type": "integer",
  22103. "exclusiveMinimum": 0
  22104. }
  22105. },
  22106. "required": ["message", "variant"],
  22107. "additionalProperties": false
  22108. }
  22109. },
  22110. "required": ["id", "type", "properties"],
  22111. "additionalProperties": false
  22112. },
  22113. "Event.tui.session.select": {
  22114. "type": "object",
  22115. "properties": {
  22116. "id": {
  22117. "type": "string",
  22118. "pattern": "^evt_"
  22119. },
  22120. "type": {
  22121. "type": "string",
  22122. "enum": ["tui.session.select"]
  22123. },
  22124. "properties": {
  22125. "type": "object",
  22126. "properties": {
  22127. "sessionID": {
  22128. "type": "string",
  22129. "pattern": "^ses",
  22130. "description": "Session ID to navigate to"
  22131. }
  22132. },
  22133. "required": ["sessionID"],
  22134. "additionalProperties": false
  22135. }
  22136. },
  22137. "required": ["id", "type", "properties"],
  22138. "additionalProperties": false
  22139. },
  22140. "MoveSessionDestination": {
  22141. "type": "object",
  22142. "properties": {
  22143. "directory": {
  22144. "type": "string"
  22145. }
  22146. },
  22147. "required": ["directory"],
  22148. "additionalProperties": false
  22149. },
  22150. "CredentialOAuth": {
  22151. "type": "object",
  22152. "properties": {
  22153. "type": {
  22154. "type": "string",
  22155. "enum": ["oauth"]
  22156. },
  22157. "refresh": {
  22158. "type": "string"
  22159. },
  22160. "access": {
  22161. "type": "string"
  22162. },
  22163. "expires": {
  22164. "type": "integer",
  22165. "minimum": 0
  22166. },
  22167. "metadata": {
  22168. "type": "object",
  22169. "additionalProperties": {
  22170. "type": "string"
  22171. }
  22172. }
  22173. },
  22174. "required": ["type", "refresh", "access", "expires"],
  22175. "additionalProperties": false
  22176. },
  22177. "CredentialKey": {
  22178. "type": "object",
  22179. "properties": {
  22180. "type": {
  22181. "type": "string",
  22182. "enum": ["key"]
  22183. },
  22184. "key": {
  22185. "type": "string"
  22186. },
  22187. "metadata": {
  22188. "type": "object",
  22189. "additionalProperties": {
  22190. "type": "string"
  22191. }
  22192. }
  22193. },
  22194. "required": ["type", "key"],
  22195. "additionalProperties": false
  22196. },
  22197. "CredentialValue": {
  22198. "anyOf": [
  22199. {
  22200. "$ref": "#/components/schemas/CredentialOAuth"
  22201. },
  22202. {
  22203. "$ref": "#/components/schemas/CredentialKey"
  22204. }
  22205. ]
  22206. },
  22207. "CredentialInfo": {
  22208. "type": "object",
  22209. "properties": {
  22210. "id": {
  22211. "type": "string"
  22212. },
  22213. "connectorID": {
  22214. "type": "string"
  22215. },
  22216. "methodID": {
  22217. "type": "string"
  22218. },
  22219. "label": {
  22220. "type": "string"
  22221. },
  22222. "value": {
  22223. "$ref": "#/components/schemas/CredentialValue"
  22224. }
  22225. },
  22226. "required": ["id", "connectorID", "methodID", "label", "value"],
  22227. "additionalProperties": false
  22228. },
  22229. "ModelV2Info": {
  22230. "type": "object",
  22231. "properties": {
  22232. "id": {
  22233. "type": "string"
  22234. },
  22235. "providerID": {
  22236. "type": "string"
  22237. },
  22238. "family": {
  22239. "type": "string"
  22240. },
  22241. "name": {
  22242. "type": "string"
  22243. },
  22244. "api": {
  22245. "anyOf": [
  22246. {
  22247. "type": "object",
  22248. "properties": {
  22249. "id": {
  22250. "type": "string"
  22251. },
  22252. "type": {
  22253. "type": "string",
  22254. "enum": ["aisdk"]
  22255. },
  22256. "package": {
  22257. "type": "string"
  22258. },
  22259. "url": {
  22260. "type": "string"
  22261. },
  22262. "settings": {
  22263. "type": "object"
  22264. }
  22265. },
  22266. "required": ["id", "type", "package"],
  22267. "additionalProperties": false
  22268. },
  22269. {
  22270. "type": "object",
  22271. "properties": {
  22272. "id": {
  22273. "type": "string"
  22274. },
  22275. "type": {
  22276. "type": "string",
  22277. "enum": ["native"]
  22278. },
  22279. "url": {
  22280. "type": "string"
  22281. },
  22282. "settings": {
  22283. "type": "object"
  22284. }
  22285. },
  22286. "required": ["id", "type", "settings"],
  22287. "additionalProperties": false
  22288. }
  22289. ]
  22290. },
  22291. "capabilities": {
  22292. "type": "object",
  22293. "properties": {
  22294. "tools": {
  22295. "type": "boolean"
  22296. },
  22297. "input": {
  22298. "type": "array",
  22299. "items": {
  22300. "type": "string"
  22301. }
  22302. },
  22303. "output": {
  22304. "type": "array",
  22305. "items": {
  22306. "type": "string"
  22307. }
  22308. }
  22309. },
  22310. "required": ["tools", "input", "output"],
  22311. "additionalProperties": false
  22312. },
  22313. "request": {
  22314. "type": "object",
  22315. "properties": {
  22316. "headers": {
  22317. "type": "object",
  22318. "additionalProperties": {
  22319. "type": "string"
  22320. }
  22321. },
  22322. "body": {
  22323. "type": "object"
  22324. },
  22325. "generation": {
  22326. "type": "object",
  22327. "properties": {
  22328. "maxTokens": {
  22329. "anyOf": [
  22330. {
  22331. "type": "number"
  22332. },
  22333. {
  22334. "type": "string",
  22335. "enum": ["NaN"]
  22336. },
  22337. {
  22338. "type": "string",
  22339. "enum": ["Infinity"]
  22340. },
  22341. {
  22342. "type": "string",
  22343. "enum": ["-Infinity"]
  22344. },
  22345. {
  22346. "type": "string",
  22347. "enum": ["Infinity", "-Infinity", "NaN"]
  22348. }
  22349. ]
  22350. },
  22351. "temperature": {
  22352. "anyOf": [
  22353. {
  22354. "type": "number"
  22355. },
  22356. {
  22357. "type": "string",
  22358. "enum": ["NaN"]
  22359. },
  22360. {
  22361. "type": "string",
  22362. "enum": ["Infinity"]
  22363. },
  22364. {
  22365. "type": "string",
  22366. "enum": ["-Infinity"]
  22367. },
  22368. {
  22369. "type": "string",
  22370. "enum": ["Infinity", "-Infinity", "NaN"]
  22371. }
  22372. ]
  22373. },
  22374. "topP": {
  22375. "anyOf": [
  22376. {
  22377. "type": "number"
  22378. },
  22379. {
  22380. "type": "string",
  22381. "enum": ["NaN"]
  22382. },
  22383. {
  22384. "type": "string",
  22385. "enum": ["Infinity"]
  22386. },
  22387. {
  22388. "type": "string",
  22389. "enum": ["-Infinity"]
  22390. },
  22391. {
  22392. "type": "string",
  22393. "enum": ["Infinity", "-Infinity", "NaN"]
  22394. }
  22395. ]
  22396. },
  22397. "topK": {
  22398. "anyOf": [
  22399. {
  22400. "type": "number"
  22401. },
  22402. {
  22403. "type": "string",
  22404. "enum": ["NaN"]
  22405. },
  22406. {
  22407. "type": "string",
  22408. "enum": ["Infinity"]
  22409. },
  22410. {
  22411. "type": "string",
  22412. "enum": ["-Infinity"]
  22413. },
  22414. {
  22415. "type": "string",
  22416. "enum": ["Infinity", "-Infinity", "NaN"]
  22417. }
  22418. ]
  22419. },
  22420. "frequencyPenalty": {
  22421. "anyOf": [
  22422. {
  22423. "type": "number"
  22424. },
  22425. {
  22426. "type": "string",
  22427. "enum": ["NaN"]
  22428. },
  22429. {
  22430. "type": "string",
  22431. "enum": ["Infinity"]
  22432. },
  22433. {
  22434. "type": "string",
  22435. "enum": ["-Infinity"]
  22436. },
  22437. {
  22438. "type": "string",
  22439. "enum": ["Infinity", "-Infinity", "NaN"]
  22440. }
  22441. ]
  22442. },
  22443. "presencePenalty": {
  22444. "anyOf": [
  22445. {
  22446. "type": "number"
  22447. },
  22448. {
  22449. "type": "string",
  22450. "enum": ["NaN"]
  22451. },
  22452. {
  22453. "type": "string",
  22454. "enum": ["Infinity"]
  22455. },
  22456. {
  22457. "type": "string",
  22458. "enum": ["-Infinity"]
  22459. },
  22460. {
  22461. "type": "string",
  22462. "enum": ["Infinity", "-Infinity", "NaN"]
  22463. }
  22464. ]
  22465. },
  22466. "seed": {
  22467. "anyOf": [
  22468. {
  22469. "type": "number"
  22470. },
  22471. {
  22472. "type": "string",
  22473. "enum": ["NaN"]
  22474. },
  22475. {
  22476. "type": "string",
  22477. "enum": ["Infinity"]
  22478. },
  22479. {
  22480. "type": "string",
  22481. "enum": ["-Infinity"]
  22482. },
  22483. {
  22484. "type": "string",
  22485. "enum": ["Infinity", "-Infinity", "NaN"]
  22486. }
  22487. ]
  22488. },
  22489. "stop": {
  22490. "type": "array",
  22491. "items": {
  22492. "type": "string"
  22493. }
  22494. }
  22495. },
  22496. "additionalProperties": false
  22497. },
  22498. "options": {
  22499. "type": "object"
  22500. },
  22501. "variant": {
  22502. "type": "string"
  22503. }
  22504. },
  22505. "required": ["headers", "body"],
  22506. "additionalProperties": false
  22507. },
  22508. "variants": {
  22509. "type": "array",
  22510. "items": {
  22511. "type": "object",
  22512. "properties": {
  22513. "id": {
  22514. "type": "string"
  22515. },
  22516. "headers": {
  22517. "type": "object",
  22518. "additionalProperties": {
  22519. "type": "string"
  22520. }
  22521. },
  22522. "body": {
  22523. "type": "object"
  22524. },
  22525. "generation": {
  22526. "type": "object",
  22527. "properties": {
  22528. "maxTokens": {
  22529. "anyOf": [
  22530. {
  22531. "type": "number"
  22532. },
  22533. {
  22534. "type": "string",
  22535. "enum": ["NaN"]
  22536. },
  22537. {
  22538. "type": "string",
  22539. "enum": ["Infinity"]
  22540. },
  22541. {
  22542. "type": "string",
  22543. "enum": ["-Infinity"]
  22544. },
  22545. {
  22546. "type": "string",
  22547. "enum": ["Infinity", "-Infinity", "NaN"]
  22548. }
  22549. ]
  22550. },
  22551. "temperature": {
  22552. "anyOf": [
  22553. {
  22554. "type": "number"
  22555. },
  22556. {
  22557. "type": "string",
  22558. "enum": ["NaN"]
  22559. },
  22560. {
  22561. "type": "string",
  22562. "enum": ["Infinity"]
  22563. },
  22564. {
  22565. "type": "string",
  22566. "enum": ["-Infinity"]
  22567. },
  22568. {
  22569. "type": "string",
  22570. "enum": ["Infinity", "-Infinity", "NaN"]
  22571. }
  22572. ]
  22573. },
  22574. "topP": {
  22575. "anyOf": [
  22576. {
  22577. "type": "number"
  22578. },
  22579. {
  22580. "type": "string",
  22581. "enum": ["NaN"]
  22582. },
  22583. {
  22584. "type": "string",
  22585. "enum": ["Infinity"]
  22586. },
  22587. {
  22588. "type": "string",
  22589. "enum": ["-Infinity"]
  22590. },
  22591. {
  22592. "type": "string",
  22593. "enum": ["Infinity", "-Infinity", "NaN"]
  22594. }
  22595. ]
  22596. },
  22597. "topK": {
  22598. "anyOf": [
  22599. {
  22600. "type": "number"
  22601. },
  22602. {
  22603. "type": "string",
  22604. "enum": ["NaN"]
  22605. },
  22606. {
  22607. "type": "string",
  22608. "enum": ["Infinity"]
  22609. },
  22610. {
  22611. "type": "string",
  22612. "enum": ["-Infinity"]
  22613. },
  22614. {
  22615. "type": "string",
  22616. "enum": ["Infinity", "-Infinity", "NaN"]
  22617. }
  22618. ]
  22619. },
  22620. "frequencyPenalty": {
  22621. "anyOf": [
  22622. {
  22623. "type": "number"
  22624. },
  22625. {
  22626. "type": "string",
  22627. "enum": ["NaN"]
  22628. },
  22629. {
  22630. "type": "string",
  22631. "enum": ["Infinity"]
  22632. },
  22633. {
  22634. "type": "string",
  22635. "enum": ["-Infinity"]
  22636. },
  22637. {
  22638. "type": "string",
  22639. "enum": ["Infinity", "-Infinity", "NaN"]
  22640. }
  22641. ]
  22642. },
  22643. "presencePenalty": {
  22644. "anyOf": [
  22645. {
  22646. "type": "number"
  22647. },
  22648. {
  22649. "type": "string",
  22650. "enum": ["NaN"]
  22651. },
  22652. {
  22653. "type": "string",
  22654. "enum": ["Infinity"]
  22655. },
  22656. {
  22657. "type": "string",
  22658. "enum": ["-Infinity"]
  22659. },
  22660. {
  22661. "type": "string",
  22662. "enum": ["Infinity", "-Infinity", "NaN"]
  22663. }
  22664. ]
  22665. },
  22666. "seed": {
  22667. "anyOf": [
  22668. {
  22669. "type": "number"
  22670. },
  22671. {
  22672. "type": "string",
  22673. "enum": ["NaN"]
  22674. },
  22675. {
  22676. "type": "string",
  22677. "enum": ["Infinity"]
  22678. },
  22679. {
  22680. "type": "string",
  22681. "enum": ["-Infinity"]
  22682. },
  22683. {
  22684. "type": "string",
  22685. "enum": ["Infinity", "-Infinity", "NaN"]
  22686. }
  22687. ]
  22688. },
  22689. "stop": {
  22690. "type": "array",
  22691. "items": {
  22692. "type": "string"
  22693. }
  22694. }
  22695. },
  22696. "additionalProperties": false
  22697. },
  22698. "options": {
  22699. "type": "object"
  22700. }
  22701. },
  22702. "required": ["id", "headers", "body"],
  22703. "additionalProperties": false
  22704. }
  22705. },
  22706. "time": {
  22707. "type": "object",
  22708. "properties": {
  22709. "released": {
  22710. "anyOf": [
  22711. {
  22712. "type": "number"
  22713. },
  22714. {
  22715. "type": "string",
  22716. "enum": ["NaN"]
  22717. },
  22718. {
  22719. "type": "string",
  22720. "enum": ["Infinity"]
  22721. },
  22722. {
  22723. "type": "string",
  22724. "enum": ["-Infinity"]
  22725. },
  22726. {
  22727. "type": "string",
  22728. "enum": ["Infinity", "-Infinity", "NaN"]
  22729. }
  22730. ]
  22731. }
  22732. },
  22733. "required": ["released"],
  22734. "additionalProperties": false
  22735. },
  22736. "cost": {
  22737. "type": "array",
  22738. "items": {
  22739. "type": "object",
  22740. "properties": {
  22741. "tier": {
  22742. "type": "object",
  22743. "properties": {
  22744. "type": {
  22745. "type": "string",
  22746. "enum": ["context"]
  22747. },
  22748. "size": {
  22749. "type": "integer"
  22750. }
  22751. },
  22752. "required": ["type", "size"],
  22753. "additionalProperties": false
  22754. },
  22755. "input": {
  22756. "type": "number"
  22757. },
  22758. "output": {
  22759. "type": "number"
  22760. },
  22761. "cache": {
  22762. "type": "object",
  22763. "properties": {
  22764. "read": {
  22765. "type": "number"
  22766. },
  22767. "write": {
  22768. "type": "number"
  22769. }
  22770. },
  22771. "required": ["read", "write"],
  22772. "additionalProperties": false
  22773. }
  22774. },
  22775. "required": ["input", "output", "cache"],
  22776. "additionalProperties": false
  22777. }
  22778. },
  22779. "status": {
  22780. "type": "string",
  22781. "enum": ["alpha", "beta", "deprecated", "active"]
  22782. },
  22783. "enabled": {
  22784. "type": "boolean"
  22785. },
  22786. "limit": {
  22787. "type": "object",
  22788. "properties": {
  22789. "context": {
  22790. "type": "integer"
  22791. },
  22792. "input": {
  22793. "type": "integer"
  22794. },
  22795. "output": {
  22796. "type": "integer"
  22797. }
  22798. },
  22799. "required": ["context", "output"],
  22800. "additionalProperties": false
  22801. }
  22802. },
  22803. "required": [
  22804. "id",
  22805. "providerID",
  22806. "name",
  22807. "api",
  22808. "capabilities",
  22809. "request",
  22810. "variants",
  22811. "time",
  22812. "cost",
  22813. "status",
  22814. "enabled",
  22815. "limit"
  22816. ],
  22817. "additionalProperties": false
  22818. },
  22819. "LocationRef": {
  22820. "type": "object",
  22821. "properties": {
  22822. "directory": {
  22823. "type": "string"
  22824. },
  22825. "workspaceID": {
  22826. "type": "string",
  22827. "pattern": "^wrk"
  22828. }
  22829. },
  22830. "required": ["directory"],
  22831. "additionalProperties": false
  22832. },
  22833. "PromptSource": {
  22834. "type": "object",
  22835. "properties": {
  22836. "start": {
  22837. "type": "number"
  22838. },
  22839. "end": {
  22840. "type": "number"
  22841. },
  22842. "text": {
  22843. "type": "string"
  22844. }
  22845. },
  22846. "required": ["start", "end", "text"],
  22847. "additionalProperties": false
  22848. },
  22849. "PromptFileAttachment": {
  22850. "type": "object",
  22851. "properties": {
  22852. "uri": {
  22853. "type": "string"
  22854. },
  22855. "mime": {
  22856. "type": "string"
  22857. },
  22858. "name": {
  22859. "type": "string"
  22860. },
  22861. "description": {
  22862. "type": "string"
  22863. },
  22864. "source": {
  22865. "$ref": "#/components/schemas/PromptSource"
  22866. }
  22867. },
  22868. "required": ["uri", "mime"],
  22869. "additionalProperties": false
  22870. },
  22871. "PromptAgentAttachment": {
  22872. "type": "object",
  22873. "properties": {
  22874. "name": {
  22875. "type": "string"
  22876. },
  22877. "source": {
  22878. "$ref": "#/components/schemas/PromptSource"
  22879. }
  22880. },
  22881. "required": ["name"],
  22882. "additionalProperties": false
  22883. },
  22884. "SessionErrorUnknown": {
  22885. "type": "object",
  22886. "properties": {
  22887. "type": {
  22888. "type": "string",
  22889. "enum": ["unknown"]
  22890. },
  22891. "message": {
  22892. "type": "string"
  22893. }
  22894. },
  22895. "required": ["type", "message"],
  22896. "additionalProperties": false
  22897. },
  22898. "ToolTextContent": {
  22899. "type": "object",
  22900. "properties": {
  22901. "type": {
  22902. "type": "string",
  22903. "enum": ["text"]
  22904. },
  22905. "text": {
  22906. "type": "string"
  22907. }
  22908. },
  22909. "required": ["type", "text"],
  22910. "additionalProperties": false
  22911. },
  22912. "ToolFileContent": {
  22913. "type": "object",
  22914. "properties": {
  22915. "type": {
  22916. "type": "string",
  22917. "enum": ["file"]
  22918. },
  22919. "uri": {
  22920. "type": "string"
  22921. },
  22922. "mime": {
  22923. "type": "string"
  22924. },
  22925. "name": {
  22926. "type": "string"
  22927. }
  22928. },
  22929. "required": ["type", "uri", "mime"],
  22930. "additionalProperties": false
  22931. },
  22932. "SessionNextRetry_error": {
  22933. "type": "object",
  22934. "properties": {
  22935. "message": {
  22936. "type": "string"
  22937. },
  22938. "statusCode": {
  22939. "type": "number"
  22940. },
  22941. "isRetryable": {
  22942. "type": "boolean"
  22943. },
  22944. "responseHeaders": {
  22945. "type": "object",
  22946. "additionalProperties": {
  22947. "type": "string"
  22948. }
  22949. },
  22950. "responseBody": {
  22951. "type": "string"
  22952. },
  22953. "metadata": {
  22954. "type": "object",
  22955. "additionalProperties": {
  22956. "type": "string"
  22957. }
  22958. }
  22959. },
  22960. "required": ["message", "isRetryable"],
  22961. "additionalProperties": false
  22962. },
  22963. "PermissionV2Source": {
  22964. "type": "object",
  22965. "properties": {
  22966. "type": {
  22967. "type": "string",
  22968. "enum": ["tool"]
  22969. },
  22970. "messageID": {
  22971. "type": "string"
  22972. },
  22973. "callID": {
  22974. "type": "string"
  22975. }
  22976. },
  22977. "required": ["type", "messageID", "callID"],
  22978. "additionalProperties": false
  22979. },
  22980. "PermissionV2Reply": {
  22981. "type": "string",
  22982. "enum": ["once", "always", "reject"]
  22983. },
  22984. "QuestionV2Option": {
  22985. "type": "object",
  22986. "properties": {
  22987. "label": {
  22988. "type": "string",
  22989. "description": "Display text (1-5 words, concise)"
  22990. },
  22991. "description": {
  22992. "type": "string",
  22993. "description": "Explanation of choice"
  22994. }
  22995. },
  22996. "required": ["label", "description"],
  22997. "additionalProperties": false
  22998. },
  22999. "QuestionV2Info": {
  23000. "type": "object",
  23001. "properties": {
  23002. "question": {
  23003. "type": "string",
  23004. "description": "Complete question"
  23005. },
  23006. "header": {
  23007. "type": "string",
  23008. "description": "Very short label (max 30 chars)"
  23009. },
  23010. "options": {
  23011. "type": "array",
  23012. "items": {
  23013. "$ref": "#/components/schemas/QuestionV2Option"
  23014. },
  23015. "description": "Available choices"
  23016. },
  23017. "multiple": {
  23018. "type": "boolean"
  23019. },
  23020. "custom": {
  23021. "type": "boolean"
  23022. }
  23023. },
  23024. "required": ["question", "header", "options"],
  23025. "additionalProperties": false
  23026. },
  23027. "QuestionV2Tool": {
  23028. "type": "object",
  23029. "properties": {
  23030. "messageID": {
  23031. "type": "string"
  23032. },
  23033. "callID": {
  23034. "type": "string"
  23035. }
  23036. },
  23037. "required": ["messageID", "callID"],
  23038. "additionalProperties": false
  23039. },
  23040. "QuestionV2Answer": {
  23041. "type": "array",
  23042. "items": {
  23043. "type": "string"
  23044. }
  23045. },
  23046. "EventServerInstanceDisposed": {
  23047. "type": "object",
  23048. "properties": {
  23049. "id": {
  23050. "type": "string"
  23051. },
  23052. "type": {
  23053. "type": "string",
  23054. "enum": ["server.instance.disposed"]
  23055. },
  23056. "properties": {
  23057. "type": "object",
  23058. "properties": {
  23059. "directory": {
  23060. "type": "string"
  23061. }
  23062. },
  23063. "required": ["directory"],
  23064. "additionalProperties": false
  23065. }
  23066. },
  23067. "required": ["id", "type", "properties"],
  23068. "additionalProperties": false
  23069. },
  23070. "SyncEventSessionCreated": {
  23071. "type": "object",
  23072. "properties": {
  23073. "type": {
  23074. "type": "string",
  23075. "enum": ["sync"]
  23076. },
  23077. "id": {
  23078. "type": "string",
  23079. "pattern": "^evt_"
  23080. },
  23081. "syncEvent": {
  23082. "type": "object",
  23083. "properties": {
  23084. "type": {
  23085. "type": "string",
  23086. "enum": ["session.created.1"]
  23087. },
  23088. "id": {
  23089. "type": "string",
  23090. "pattern": "^evt_"
  23091. },
  23092. "seq": {
  23093. "type": "number"
  23094. },
  23095. "aggregateID": {
  23096. "type": "string"
  23097. },
  23098. "data": {
  23099. "type": "object",
  23100. "properties": {
  23101. "sessionID": {
  23102. "type": "string",
  23103. "pattern": "^ses"
  23104. },
  23105. "info": {
  23106. "$ref": "#/components/schemas/Session"
  23107. }
  23108. },
  23109. "required": ["sessionID", "info"],
  23110. "additionalProperties": false
  23111. }
  23112. },
  23113. "required": ["type", "id", "seq", "aggregateID", "data"],
  23114. "additionalProperties": false
  23115. }
  23116. },
  23117. "required": ["type", "id", "syncEvent"],
  23118. "additionalProperties": false
  23119. },
  23120. "SyncEventSessionUpdated": {
  23121. "type": "object",
  23122. "properties": {
  23123. "type": {
  23124. "type": "string",
  23125. "enum": ["sync"]
  23126. },
  23127. "id": {
  23128. "type": "string",
  23129. "pattern": "^evt_"
  23130. },
  23131. "syncEvent": {
  23132. "type": "object",
  23133. "properties": {
  23134. "type": {
  23135. "type": "string",
  23136. "enum": ["session.updated.1"]
  23137. },
  23138. "id": {
  23139. "type": "string",
  23140. "pattern": "^evt_"
  23141. },
  23142. "seq": {
  23143. "type": "number"
  23144. },
  23145. "aggregateID": {
  23146. "type": "string"
  23147. },
  23148. "data": {
  23149. "type": "object",
  23150. "properties": {
  23151. "sessionID": {
  23152. "type": "string",
  23153. "pattern": "^ses"
  23154. },
  23155. "info": {
  23156. "$ref": "#/components/schemas/Session"
  23157. }
  23158. },
  23159. "required": ["sessionID", "info"],
  23160. "additionalProperties": false
  23161. }
  23162. },
  23163. "required": ["type", "id", "seq", "aggregateID", "data"],
  23164. "additionalProperties": false
  23165. }
  23166. },
  23167. "required": ["type", "id", "syncEvent"],
  23168. "additionalProperties": false
  23169. },
  23170. "SyncEventSessionDeleted": {
  23171. "type": "object",
  23172. "properties": {
  23173. "type": {
  23174. "type": "string",
  23175. "enum": ["sync"]
  23176. },
  23177. "id": {
  23178. "type": "string",
  23179. "pattern": "^evt_"
  23180. },
  23181. "syncEvent": {
  23182. "type": "object",
  23183. "properties": {
  23184. "type": {
  23185. "type": "string",
  23186. "enum": ["session.deleted.1"]
  23187. },
  23188. "id": {
  23189. "type": "string",
  23190. "pattern": "^evt_"
  23191. },
  23192. "seq": {
  23193. "type": "number"
  23194. },
  23195. "aggregateID": {
  23196. "type": "string"
  23197. },
  23198. "data": {
  23199. "type": "object",
  23200. "properties": {
  23201. "sessionID": {
  23202. "type": "string",
  23203. "pattern": "^ses"
  23204. },
  23205. "info": {
  23206. "$ref": "#/components/schemas/Session"
  23207. }
  23208. },
  23209. "required": ["sessionID", "info"],
  23210. "additionalProperties": false
  23211. }
  23212. },
  23213. "required": ["type", "id", "seq", "aggregateID", "data"],
  23214. "additionalProperties": false
  23215. }
  23216. },
  23217. "required": ["type", "id", "syncEvent"],
  23218. "additionalProperties": false
  23219. },
  23220. "SyncEventMessageUpdated": {
  23221. "type": "object",
  23222. "properties": {
  23223. "type": {
  23224. "type": "string",
  23225. "enum": ["sync"]
  23226. },
  23227. "id": {
  23228. "type": "string",
  23229. "pattern": "^evt_"
  23230. },
  23231. "syncEvent": {
  23232. "type": "object",
  23233. "properties": {
  23234. "type": {
  23235. "type": "string",
  23236. "enum": ["message.updated.1"]
  23237. },
  23238. "id": {
  23239. "type": "string",
  23240. "pattern": "^evt_"
  23241. },
  23242. "seq": {
  23243. "type": "number"
  23244. },
  23245. "aggregateID": {
  23246. "type": "string"
  23247. },
  23248. "data": {
  23249. "type": "object",
  23250. "properties": {
  23251. "sessionID": {
  23252. "type": "string",
  23253. "pattern": "^ses"
  23254. },
  23255. "info": {
  23256. "$ref": "#/components/schemas/Message"
  23257. }
  23258. },
  23259. "required": ["sessionID", "info"],
  23260. "additionalProperties": false
  23261. }
  23262. },
  23263. "required": ["type", "id", "seq", "aggregateID", "data"],
  23264. "additionalProperties": false
  23265. }
  23266. },
  23267. "required": ["type", "id", "syncEvent"],
  23268. "additionalProperties": false
  23269. },
  23270. "SyncEventMessageRemoved": {
  23271. "type": "object",
  23272. "properties": {
  23273. "type": {
  23274. "type": "string",
  23275. "enum": ["sync"]
  23276. },
  23277. "id": {
  23278. "type": "string",
  23279. "pattern": "^evt_"
  23280. },
  23281. "syncEvent": {
  23282. "type": "object",
  23283. "properties": {
  23284. "type": {
  23285. "type": "string",
  23286. "enum": ["message.removed.1"]
  23287. },
  23288. "id": {
  23289. "type": "string",
  23290. "pattern": "^evt_"
  23291. },
  23292. "seq": {
  23293. "type": "number"
  23294. },
  23295. "aggregateID": {
  23296. "type": "string"
  23297. },
  23298. "data": {
  23299. "type": "object",
  23300. "properties": {
  23301. "sessionID": {
  23302. "type": "string",
  23303. "pattern": "^ses"
  23304. },
  23305. "messageID": {
  23306. "type": "string",
  23307. "pattern": "^msg"
  23308. }
  23309. },
  23310. "required": ["sessionID", "messageID"],
  23311. "additionalProperties": false
  23312. }
  23313. },
  23314. "required": ["type", "id", "seq", "aggregateID", "data"],
  23315. "additionalProperties": false
  23316. }
  23317. },
  23318. "required": ["type", "id", "syncEvent"],
  23319. "additionalProperties": false
  23320. },
  23321. "SyncEventMessagePartUpdated": {
  23322. "type": "object",
  23323. "properties": {
  23324. "type": {
  23325. "type": "string",
  23326. "enum": ["sync"]
  23327. },
  23328. "id": {
  23329. "type": "string",
  23330. "pattern": "^evt_"
  23331. },
  23332. "syncEvent": {
  23333. "type": "object",
  23334. "properties": {
  23335. "type": {
  23336. "type": "string",
  23337. "enum": ["message.part.updated.1"]
  23338. },
  23339. "id": {
  23340. "type": "string",
  23341. "pattern": "^evt_"
  23342. },
  23343. "seq": {
  23344. "type": "number"
  23345. },
  23346. "aggregateID": {
  23347. "type": "string"
  23348. },
  23349. "data": {
  23350. "type": "object",
  23351. "properties": {
  23352. "sessionID": {
  23353. "type": "string",
  23354. "pattern": "^ses"
  23355. },
  23356. "part": {
  23357. "$ref": "#/components/schemas/Part"
  23358. },
  23359. "time": {
  23360. "type": "number"
  23361. }
  23362. },
  23363. "required": ["sessionID", "part", "time"],
  23364. "additionalProperties": false
  23365. }
  23366. },
  23367. "required": ["type", "id", "seq", "aggregateID", "data"],
  23368. "additionalProperties": false
  23369. }
  23370. },
  23371. "required": ["type", "id", "syncEvent"],
  23372. "additionalProperties": false
  23373. },
  23374. "SyncEventMessagePartRemoved": {
  23375. "type": "object",
  23376. "properties": {
  23377. "type": {
  23378. "type": "string",
  23379. "enum": ["sync"]
  23380. },
  23381. "id": {
  23382. "type": "string",
  23383. "pattern": "^evt_"
  23384. },
  23385. "syncEvent": {
  23386. "type": "object",
  23387. "properties": {
  23388. "type": {
  23389. "type": "string",
  23390. "enum": ["message.part.removed.1"]
  23391. },
  23392. "id": {
  23393. "type": "string",
  23394. "pattern": "^evt_"
  23395. },
  23396. "seq": {
  23397. "type": "number"
  23398. },
  23399. "aggregateID": {
  23400. "type": "string"
  23401. },
  23402. "data": {
  23403. "type": "object",
  23404. "properties": {
  23405. "sessionID": {
  23406. "type": "string",
  23407. "pattern": "^ses"
  23408. },
  23409. "messageID": {
  23410. "type": "string",
  23411. "pattern": "^msg"
  23412. },
  23413. "partID": {
  23414. "type": "string",
  23415. "pattern": "^prt"
  23416. }
  23417. },
  23418. "required": ["sessionID", "messageID", "partID"],
  23419. "additionalProperties": false
  23420. }
  23421. },
  23422. "required": ["type", "id", "seq", "aggregateID", "data"],
  23423. "additionalProperties": false
  23424. }
  23425. },
  23426. "required": ["type", "id", "syncEvent"],
  23427. "additionalProperties": false
  23428. },
  23429. "SyncEventSessionNextAgentSwitched": {
  23430. "type": "object",
  23431. "properties": {
  23432. "type": {
  23433. "type": "string",
  23434. "enum": ["sync"]
  23435. },
  23436. "id": {
  23437. "type": "string",
  23438. "pattern": "^evt_"
  23439. },
  23440. "syncEvent": {
  23441. "type": "object",
  23442. "properties": {
  23443. "type": {
  23444. "type": "string",
  23445. "enum": ["session.next.agent.switched.1"]
  23446. },
  23447. "id": {
  23448. "type": "string",
  23449. "pattern": "^evt_"
  23450. },
  23451. "seq": {
  23452. "type": "number"
  23453. },
  23454. "aggregateID": {
  23455. "type": "string"
  23456. },
  23457. "data": {
  23458. "type": "object",
  23459. "properties": {
  23460. "timestamp": {
  23461. "type": "number"
  23462. },
  23463. "sessionID": {
  23464. "type": "string",
  23465. "pattern": "^ses"
  23466. },
  23467. "messageID": {
  23468. "type": "string",
  23469. "pattern": "^msg_"
  23470. },
  23471. "agent": {
  23472. "type": "string"
  23473. }
  23474. },
  23475. "required": ["timestamp", "sessionID", "messageID", "agent"],
  23476. "additionalProperties": false
  23477. }
  23478. },
  23479. "required": ["type", "id", "seq", "aggregateID", "data"],
  23480. "additionalProperties": false
  23481. }
  23482. },
  23483. "required": ["type", "id", "syncEvent"],
  23484. "additionalProperties": false
  23485. },
  23486. "SyncEventSessionNextModelSwitched": {
  23487. "type": "object",
  23488. "properties": {
  23489. "type": {
  23490. "type": "string",
  23491. "enum": ["sync"]
  23492. },
  23493. "id": {
  23494. "type": "string",
  23495. "pattern": "^evt_"
  23496. },
  23497. "syncEvent": {
  23498. "type": "object",
  23499. "properties": {
  23500. "type": {
  23501. "type": "string",
  23502. "enum": ["session.next.model.switched.1"]
  23503. },
  23504. "id": {
  23505. "type": "string",
  23506. "pattern": "^evt_"
  23507. },
  23508. "seq": {
  23509. "type": "number"
  23510. },
  23511. "aggregateID": {
  23512. "type": "string"
  23513. },
  23514. "data": {
  23515. "type": "object",
  23516. "properties": {
  23517. "timestamp": {
  23518. "type": "number"
  23519. },
  23520. "sessionID": {
  23521. "type": "string",
  23522. "pattern": "^ses"
  23523. },
  23524. "messageID": {
  23525. "type": "string",
  23526. "pattern": "^msg_"
  23527. },
  23528. "model": {
  23529. "type": "object",
  23530. "properties": {
  23531. "id": {
  23532. "type": "string"
  23533. },
  23534. "providerID": {
  23535. "type": "string"
  23536. },
  23537. "variant": {
  23538. "type": "string"
  23539. }
  23540. },
  23541. "required": ["id", "providerID"],
  23542. "additionalProperties": false
  23543. }
  23544. },
  23545. "required": ["timestamp", "sessionID", "messageID", "model"],
  23546. "additionalProperties": false
  23547. }
  23548. },
  23549. "required": ["type", "id", "seq", "aggregateID", "data"],
  23550. "additionalProperties": false
  23551. }
  23552. },
  23553. "required": ["type", "id", "syncEvent"],
  23554. "additionalProperties": false
  23555. },
  23556. "SyncEventSessionNextMoved": {
  23557. "type": "object",
  23558. "properties": {
  23559. "type": {
  23560. "type": "string",
  23561. "enum": ["sync"]
  23562. },
  23563. "id": {
  23564. "type": "string",
  23565. "pattern": "^evt_"
  23566. },
  23567. "syncEvent": {
  23568. "type": "object",
  23569. "properties": {
  23570. "type": {
  23571. "type": "string",
  23572. "enum": ["session.next.moved.1"]
  23573. },
  23574. "id": {
  23575. "type": "string",
  23576. "pattern": "^evt_"
  23577. },
  23578. "seq": {
  23579. "type": "number"
  23580. },
  23581. "aggregateID": {
  23582. "type": "string"
  23583. },
  23584. "data": {
  23585. "type": "object",
  23586. "properties": {
  23587. "timestamp": {
  23588. "type": "number"
  23589. },
  23590. "sessionID": {
  23591. "type": "string",
  23592. "pattern": "^ses"
  23593. },
  23594. "location": {
  23595. "$ref": "#/components/schemas/LocationRef"
  23596. },
  23597. "subdirectory": {
  23598. "type": "string"
  23599. }
  23600. },
  23601. "required": ["timestamp", "sessionID", "location"],
  23602. "additionalProperties": false
  23603. }
  23604. },
  23605. "required": ["type", "id", "seq", "aggregateID", "data"],
  23606. "additionalProperties": false
  23607. }
  23608. },
  23609. "required": ["type", "id", "syncEvent"],
  23610. "additionalProperties": false
  23611. },
  23612. "SyncEventSessionNextPrompted": {
  23613. "type": "object",
  23614. "properties": {
  23615. "type": {
  23616. "type": "string",
  23617. "enum": ["sync"]
  23618. },
  23619. "id": {
  23620. "type": "string",
  23621. "pattern": "^evt_"
  23622. },
  23623. "syncEvent": {
  23624. "type": "object",
  23625. "properties": {
  23626. "type": {
  23627. "type": "string",
  23628. "enum": ["session.next.prompted.1"]
  23629. },
  23630. "id": {
  23631. "type": "string",
  23632. "pattern": "^evt_"
  23633. },
  23634. "seq": {
  23635. "type": "number"
  23636. },
  23637. "aggregateID": {
  23638. "type": "string"
  23639. },
  23640. "data": {
  23641. "type": "object",
  23642. "properties": {
  23643. "timestamp": {
  23644. "type": "number"
  23645. },
  23646. "sessionID": {
  23647. "type": "string",
  23648. "pattern": "^ses"
  23649. },
  23650. "messageID": {
  23651. "type": "string",
  23652. "pattern": "^msg_"
  23653. },
  23654. "prompt": {
  23655. "$ref": "#/components/schemas/Prompt"
  23656. },
  23657. "delivery": {
  23658. "type": "string",
  23659. "enum": ["steer", "queue"]
  23660. }
  23661. },
  23662. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23663. "additionalProperties": false
  23664. }
  23665. },
  23666. "required": ["type", "id", "seq", "aggregateID", "data"],
  23667. "additionalProperties": false
  23668. }
  23669. },
  23670. "required": ["type", "id", "syncEvent"],
  23671. "additionalProperties": false
  23672. },
  23673. "SyncEventSessionNextPromptAdmitted": {
  23674. "type": "object",
  23675. "properties": {
  23676. "type": {
  23677. "type": "string",
  23678. "enum": ["sync"]
  23679. },
  23680. "id": {
  23681. "type": "string",
  23682. "pattern": "^evt_"
  23683. },
  23684. "syncEvent": {
  23685. "type": "object",
  23686. "properties": {
  23687. "type": {
  23688. "type": "string",
  23689. "enum": ["session.next.prompt.admitted.1"]
  23690. },
  23691. "id": {
  23692. "type": "string",
  23693. "pattern": "^evt_"
  23694. },
  23695. "seq": {
  23696. "type": "number"
  23697. },
  23698. "aggregateID": {
  23699. "type": "string"
  23700. },
  23701. "data": {
  23702. "type": "object",
  23703. "properties": {
  23704. "timestamp": {
  23705. "type": "number"
  23706. },
  23707. "sessionID": {
  23708. "type": "string",
  23709. "pattern": "^ses"
  23710. },
  23711. "messageID": {
  23712. "type": "string",
  23713. "pattern": "^msg_"
  23714. },
  23715. "prompt": {
  23716. "$ref": "#/components/schemas/Prompt"
  23717. },
  23718. "delivery": {
  23719. "type": "string",
  23720. "enum": ["steer", "queue"]
  23721. }
  23722. },
  23723. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23724. "additionalProperties": false
  23725. }
  23726. },
  23727. "required": ["type", "id", "seq", "aggregateID", "data"],
  23728. "additionalProperties": false
  23729. }
  23730. },
  23731. "required": ["type", "id", "syncEvent"],
  23732. "additionalProperties": false
  23733. },
  23734. "SyncEventSessionNextPromptPromoted": {
  23735. "type": "object",
  23736. "properties": {
  23737. "type": {
  23738. "type": "string",
  23739. "enum": ["sync"]
  23740. },
  23741. "id": {
  23742. "type": "string",
  23743. "pattern": "^evt_"
  23744. },
  23745. "syncEvent": {
  23746. "type": "object",
  23747. "properties": {
  23748. "type": {
  23749. "type": "string",
  23750. "enum": ["session.next.prompt.promoted.1"]
  23751. },
  23752. "id": {
  23753. "type": "string",
  23754. "pattern": "^evt_"
  23755. },
  23756. "seq": {
  23757. "type": "number"
  23758. },
  23759. "aggregateID": {
  23760. "type": "string"
  23761. },
  23762. "data": {
  23763. "type": "object",
  23764. "properties": {
  23765. "timestamp": {
  23766. "type": "number"
  23767. },
  23768. "sessionID": {
  23769. "type": "string",
  23770. "pattern": "^ses"
  23771. },
  23772. "messageID": {
  23773. "type": "string",
  23774. "pattern": "^msg_"
  23775. },
  23776. "prompt": {
  23777. "$ref": "#/components/schemas/Prompt"
  23778. },
  23779. "timeCreated": {
  23780. "type": "number"
  23781. }
  23782. },
  23783. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  23784. "additionalProperties": false
  23785. }
  23786. },
  23787. "required": ["type", "id", "seq", "aggregateID", "data"],
  23788. "additionalProperties": false
  23789. }
  23790. },
  23791. "required": ["type", "id", "syncEvent"],
  23792. "additionalProperties": false
  23793. },
  23794. "SyncEventSessionNextInterruptRequested": {
  23795. "type": "object",
  23796. "properties": {
  23797. "type": {
  23798. "type": "string",
  23799. "enum": ["sync"]
  23800. },
  23801. "id": {
  23802. "type": "string",
  23803. "pattern": "^evt_"
  23804. },
  23805. "syncEvent": {
  23806. "type": "object",
  23807. "properties": {
  23808. "type": {
  23809. "type": "string",
  23810. "enum": ["session.next.interrupt.requested.1"]
  23811. },
  23812. "id": {
  23813. "type": "string",
  23814. "pattern": "^evt_"
  23815. },
  23816. "seq": {
  23817. "type": "number"
  23818. },
  23819. "aggregateID": {
  23820. "type": "string"
  23821. },
  23822. "data": {
  23823. "type": "object",
  23824. "properties": {
  23825. "timestamp": {
  23826. "type": "number"
  23827. },
  23828. "sessionID": {
  23829. "type": "string",
  23830. "pattern": "^ses"
  23831. }
  23832. },
  23833. "required": ["timestamp", "sessionID"],
  23834. "additionalProperties": false
  23835. }
  23836. },
  23837. "required": ["type", "id", "seq", "aggregateID", "data"],
  23838. "additionalProperties": false
  23839. }
  23840. },
  23841. "required": ["type", "id", "syncEvent"],
  23842. "additionalProperties": false
  23843. },
  23844. "SyncEventSessionNextContextUpdated": {
  23845. "type": "object",
  23846. "properties": {
  23847. "type": {
  23848. "type": "string",
  23849. "enum": ["sync"]
  23850. },
  23851. "id": {
  23852. "type": "string",
  23853. "pattern": "^evt_"
  23854. },
  23855. "syncEvent": {
  23856. "type": "object",
  23857. "properties": {
  23858. "type": {
  23859. "type": "string",
  23860. "enum": ["session.next.context.updated.1"]
  23861. },
  23862. "id": {
  23863. "type": "string",
  23864. "pattern": "^evt_"
  23865. },
  23866. "seq": {
  23867. "type": "number"
  23868. },
  23869. "aggregateID": {
  23870. "type": "string"
  23871. },
  23872. "data": {
  23873. "type": "object",
  23874. "properties": {
  23875. "timestamp": {
  23876. "type": "number"
  23877. },
  23878. "sessionID": {
  23879. "type": "string",
  23880. "pattern": "^ses"
  23881. },
  23882. "messageID": {
  23883. "type": "string",
  23884. "pattern": "^msg_"
  23885. },
  23886. "text": {
  23887. "type": "string"
  23888. }
  23889. },
  23890. "required": ["timestamp", "sessionID", "messageID", "text"],
  23891. "additionalProperties": false
  23892. }
  23893. },
  23894. "required": ["type", "id", "seq", "aggregateID", "data"],
  23895. "additionalProperties": false
  23896. }
  23897. },
  23898. "required": ["type", "id", "syncEvent"],
  23899. "additionalProperties": false
  23900. },
  23901. "SyncEventSessionNextSynthetic": {
  23902. "type": "object",
  23903. "properties": {
  23904. "type": {
  23905. "type": "string",
  23906. "enum": ["sync"]
  23907. },
  23908. "id": {
  23909. "type": "string",
  23910. "pattern": "^evt_"
  23911. },
  23912. "syncEvent": {
  23913. "type": "object",
  23914. "properties": {
  23915. "type": {
  23916. "type": "string",
  23917. "enum": ["session.next.synthetic.1"]
  23918. },
  23919. "id": {
  23920. "type": "string",
  23921. "pattern": "^evt_"
  23922. },
  23923. "seq": {
  23924. "type": "number"
  23925. },
  23926. "aggregateID": {
  23927. "type": "string"
  23928. },
  23929. "data": {
  23930. "type": "object",
  23931. "properties": {
  23932. "timestamp": {
  23933. "type": "number"
  23934. },
  23935. "sessionID": {
  23936. "type": "string",
  23937. "pattern": "^ses"
  23938. },
  23939. "messageID": {
  23940. "type": "string",
  23941. "pattern": "^msg_"
  23942. },
  23943. "text": {
  23944. "type": "string"
  23945. }
  23946. },
  23947. "required": ["timestamp", "sessionID", "messageID", "text"],
  23948. "additionalProperties": false
  23949. }
  23950. },
  23951. "required": ["type", "id", "seq", "aggregateID", "data"],
  23952. "additionalProperties": false
  23953. }
  23954. },
  23955. "required": ["type", "id", "syncEvent"],
  23956. "additionalProperties": false
  23957. },
  23958. "SyncEventSessionNextShellStarted": {
  23959. "type": "object",
  23960. "properties": {
  23961. "type": {
  23962. "type": "string",
  23963. "enum": ["sync"]
  23964. },
  23965. "id": {
  23966. "type": "string",
  23967. "pattern": "^evt_"
  23968. },
  23969. "syncEvent": {
  23970. "type": "object",
  23971. "properties": {
  23972. "type": {
  23973. "type": "string",
  23974. "enum": ["session.next.shell.started.1"]
  23975. },
  23976. "id": {
  23977. "type": "string",
  23978. "pattern": "^evt_"
  23979. },
  23980. "seq": {
  23981. "type": "number"
  23982. },
  23983. "aggregateID": {
  23984. "type": "string"
  23985. },
  23986. "data": {
  23987. "type": "object",
  23988. "properties": {
  23989. "timestamp": {
  23990. "type": "number"
  23991. },
  23992. "sessionID": {
  23993. "type": "string",
  23994. "pattern": "^ses"
  23995. },
  23996. "messageID": {
  23997. "type": "string",
  23998. "pattern": "^msg_"
  23999. },
  24000. "callID": {
  24001. "type": "string"
  24002. },
  24003. "command": {
  24004. "type": "string"
  24005. }
  24006. },
  24007. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  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. "SyncEventSessionNextShellEnded": {
  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.shell.ended.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. "callID": {
  24057. "type": "string"
  24058. },
  24059. "output": {
  24060. "type": "string"
  24061. }
  24062. },
  24063. "required": ["timestamp", "sessionID", "callID", "output"],
  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. "SyncEventSessionNextStepStarted": {
  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.step.started.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. "assistantMessageID": {
  24113. "type": "string",
  24114. "pattern": "^msg_"
  24115. },
  24116. "agent": {
  24117. "type": "string"
  24118. },
  24119. "model": {
  24120. "type": "object",
  24121. "properties": {
  24122. "id": {
  24123. "type": "string"
  24124. },
  24125. "providerID": {
  24126. "type": "string"
  24127. },
  24128. "variant": {
  24129. "type": "string"
  24130. }
  24131. },
  24132. "required": ["id", "providerID"],
  24133. "additionalProperties": false
  24134. },
  24135. "snapshot": {
  24136. "type": "string"
  24137. }
  24138. },
  24139. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24140. "additionalProperties": false
  24141. }
  24142. },
  24143. "required": ["type", "id", "seq", "aggregateID", "data"],
  24144. "additionalProperties": false
  24145. }
  24146. },
  24147. "required": ["type", "id", "syncEvent"],
  24148. "additionalProperties": false
  24149. },
  24150. "SyncEventSessionNextStepEnded": {
  24151. "type": "object",
  24152. "properties": {
  24153. "type": {
  24154. "type": "string",
  24155. "enum": ["sync"]
  24156. },
  24157. "id": {
  24158. "type": "string",
  24159. "pattern": "^evt_"
  24160. },
  24161. "syncEvent": {
  24162. "type": "object",
  24163. "properties": {
  24164. "type": {
  24165. "type": "string",
  24166. "enum": ["session.next.step.ended.2"]
  24167. },
  24168. "id": {
  24169. "type": "string",
  24170. "pattern": "^evt_"
  24171. },
  24172. "seq": {
  24173. "type": "number"
  24174. },
  24175. "aggregateID": {
  24176. "type": "string"
  24177. },
  24178. "data": {
  24179. "type": "object",
  24180. "properties": {
  24181. "timestamp": {
  24182. "type": "number"
  24183. },
  24184. "sessionID": {
  24185. "type": "string",
  24186. "pattern": "^ses"
  24187. },
  24188. "assistantMessageID": {
  24189. "type": "string",
  24190. "pattern": "^msg_"
  24191. },
  24192. "finish": {
  24193. "type": "string"
  24194. },
  24195. "cost": {
  24196. "type": "number"
  24197. },
  24198. "tokens": {
  24199. "type": "object",
  24200. "properties": {
  24201. "input": {
  24202. "type": "number"
  24203. },
  24204. "output": {
  24205. "type": "number"
  24206. },
  24207. "reasoning": {
  24208. "type": "number"
  24209. },
  24210. "cache": {
  24211. "type": "object",
  24212. "properties": {
  24213. "read": {
  24214. "type": "number"
  24215. },
  24216. "write": {
  24217. "type": "number"
  24218. }
  24219. },
  24220. "required": ["read", "write"],
  24221. "additionalProperties": false
  24222. }
  24223. },
  24224. "required": ["input", "output", "reasoning", "cache"],
  24225. "additionalProperties": false
  24226. },
  24227. "snapshot": {
  24228. "type": "string"
  24229. }
  24230. },
  24231. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24232. "additionalProperties": false
  24233. }
  24234. },
  24235. "required": ["type", "id", "seq", "aggregateID", "data"],
  24236. "additionalProperties": false
  24237. }
  24238. },
  24239. "required": ["type", "id", "syncEvent"],
  24240. "additionalProperties": false
  24241. },
  24242. "SyncEventSessionNextStepFailed": {
  24243. "type": "object",
  24244. "properties": {
  24245. "type": {
  24246. "type": "string",
  24247. "enum": ["sync"]
  24248. },
  24249. "id": {
  24250. "type": "string",
  24251. "pattern": "^evt_"
  24252. },
  24253. "syncEvent": {
  24254. "type": "object",
  24255. "properties": {
  24256. "type": {
  24257. "type": "string",
  24258. "enum": ["session.next.step.failed.2"]
  24259. },
  24260. "id": {
  24261. "type": "string",
  24262. "pattern": "^evt_"
  24263. },
  24264. "seq": {
  24265. "type": "number"
  24266. },
  24267. "aggregateID": {
  24268. "type": "string"
  24269. },
  24270. "data": {
  24271. "type": "object",
  24272. "properties": {
  24273. "timestamp": {
  24274. "type": "number"
  24275. },
  24276. "sessionID": {
  24277. "type": "string",
  24278. "pattern": "^ses"
  24279. },
  24280. "assistantMessageID": {
  24281. "type": "string",
  24282. "pattern": "^msg_"
  24283. },
  24284. "error": {
  24285. "$ref": "#/components/schemas/SessionErrorUnknown"
  24286. }
  24287. },
  24288. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24289. "additionalProperties": false
  24290. }
  24291. },
  24292. "required": ["type", "id", "seq", "aggregateID", "data"],
  24293. "additionalProperties": false
  24294. }
  24295. },
  24296. "required": ["type", "id", "syncEvent"],
  24297. "additionalProperties": false
  24298. },
  24299. "SyncEventSessionNextTextStarted": {
  24300. "type": "object",
  24301. "properties": {
  24302. "type": {
  24303. "type": "string",
  24304. "enum": ["sync"]
  24305. },
  24306. "id": {
  24307. "type": "string",
  24308. "pattern": "^evt_"
  24309. },
  24310. "syncEvent": {
  24311. "type": "object",
  24312. "properties": {
  24313. "type": {
  24314. "type": "string",
  24315. "enum": ["session.next.text.started.1"]
  24316. },
  24317. "id": {
  24318. "type": "string",
  24319. "pattern": "^evt_"
  24320. },
  24321. "seq": {
  24322. "type": "number"
  24323. },
  24324. "aggregateID": {
  24325. "type": "string"
  24326. },
  24327. "data": {
  24328. "type": "object",
  24329. "properties": {
  24330. "timestamp": {
  24331. "type": "number"
  24332. },
  24333. "sessionID": {
  24334. "type": "string",
  24335. "pattern": "^ses"
  24336. },
  24337. "assistantMessageID": {
  24338. "type": "string",
  24339. "pattern": "^msg_"
  24340. },
  24341. "textID": {
  24342. "type": "string"
  24343. }
  24344. },
  24345. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24346. "additionalProperties": false
  24347. }
  24348. },
  24349. "required": ["type", "id", "seq", "aggregateID", "data"],
  24350. "additionalProperties": false
  24351. }
  24352. },
  24353. "required": ["type", "id", "syncEvent"],
  24354. "additionalProperties": false
  24355. },
  24356. "SyncEventSessionNextTextEnded": {
  24357. "type": "object",
  24358. "properties": {
  24359. "type": {
  24360. "type": "string",
  24361. "enum": ["sync"]
  24362. },
  24363. "id": {
  24364. "type": "string",
  24365. "pattern": "^evt_"
  24366. },
  24367. "syncEvent": {
  24368. "type": "object",
  24369. "properties": {
  24370. "type": {
  24371. "type": "string",
  24372. "enum": ["session.next.text.ended.1"]
  24373. },
  24374. "id": {
  24375. "type": "string",
  24376. "pattern": "^evt_"
  24377. },
  24378. "seq": {
  24379. "type": "number"
  24380. },
  24381. "aggregateID": {
  24382. "type": "string"
  24383. },
  24384. "data": {
  24385. "type": "object",
  24386. "properties": {
  24387. "timestamp": {
  24388. "type": "number"
  24389. },
  24390. "sessionID": {
  24391. "type": "string",
  24392. "pattern": "^ses"
  24393. },
  24394. "assistantMessageID": {
  24395. "type": "string",
  24396. "pattern": "^msg_"
  24397. },
  24398. "textID": {
  24399. "type": "string"
  24400. },
  24401. "text": {
  24402. "type": "string"
  24403. }
  24404. },
  24405. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24406. "additionalProperties": false
  24407. }
  24408. },
  24409. "required": ["type", "id", "seq", "aggregateID", "data"],
  24410. "additionalProperties": false
  24411. }
  24412. },
  24413. "required": ["type", "id", "syncEvent"],
  24414. "additionalProperties": false
  24415. },
  24416. "SyncEventSessionNextReasoningStarted": {
  24417. "type": "object",
  24418. "properties": {
  24419. "type": {
  24420. "type": "string",
  24421. "enum": ["sync"]
  24422. },
  24423. "id": {
  24424. "type": "string",
  24425. "pattern": "^evt_"
  24426. },
  24427. "syncEvent": {
  24428. "type": "object",
  24429. "properties": {
  24430. "type": {
  24431. "type": "string",
  24432. "enum": ["session.next.reasoning.started.1"]
  24433. },
  24434. "id": {
  24435. "type": "string",
  24436. "pattern": "^evt_"
  24437. },
  24438. "seq": {
  24439. "type": "number"
  24440. },
  24441. "aggregateID": {
  24442. "type": "string"
  24443. },
  24444. "data": {
  24445. "type": "object",
  24446. "properties": {
  24447. "timestamp": {
  24448. "type": "number"
  24449. },
  24450. "sessionID": {
  24451. "type": "string",
  24452. "pattern": "^ses"
  24453. },
  24454. "assistantMessageID": {
  24455. "type": "string",
  24456. "pattern": "^msg_"
  24457. },
  24458. "reasoningID": {
  24459. "type": "string"
  24460. },
  24461. "providerMetadata": {
  24462. "type": "object",
  24463. "additionalProperties": {
  24464. "type": "object"
  24465. }
  24466. }
  24467. },
  24468. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24469. "additionalProperties": false
  24470. }
  24471. },
  24472. "required": ["type", "id", "seq", "aggregateID", "data"],
  24473. "additionalProperties": false
  24474. }
  24475. },
  24476. "required": ["type", "id", "syncEvent"],
  24477. "additionalProperties": false
  24478. },
  24479. "SyncEventSessionNextReasoningEnded": {
  24480. "type": "object",
  24481. "properties": {
  24482. "type": {
  24483. "type": "string",
  24484. "enum": ["sync"]
  24485. },
  24486. "id": {
  24487. "type": "string",
  24488. "pattern": "^evt_"
  24489. },
  24490. "syncEvent": {
  24491. "type": "object",
  24492. "properties": {
  24493. "type": {
  24494. "type": "string",
  24495. "enum": ["session.next.reasoning.ended.1"]
  24496. },
  24497. "id": {
  24498. "type": "string",
  24499. "pattern": "^evt_"
  24500. },
  24501. "seq": {
  24502. "type": "number"
  24503. },
  24504. "aggregateID": {
  24505. "type": "string"
  24506. },
  24507. "data": {
  24508. "type": "object",
  24509. "properties": {
  24510. "timestamp": {
  24511. "type": "number"
  24512. },
  24513. "sessionID": {
  24514. "type": "string",
  24515. "pattern": "^ses"
  24516. },
  24517. "assistantMessageID": {
  24518. "type": "string",
  24519. "pattern": "^msg_"
  24520. },
  24521. "reasoningID": {
  24522. "type": "string"
  24523. },
  24524. "text": {
  24525. "type": "string"
  24526. },
  24527. "providerMetadata": {
  24528. "type": "object",
  24529. "additionalProperties": {
  24530. "type": "object"
  24531. }
  24532. }
  24533. },
  24534. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  24535. "additionalProperties": false
  24536. }
  24537. },
  24538. "required": ["type", "id", "seq", "aggregateID", "data"],
  24539. "additionalProperties": false
  24540. }
  24541. },
  24542. "required": ["type", "id", "syncEvent"],
  24543. "additionalProperties": false
  24544. },
  24545. "SyncEventSessionNextToolInputStarted": {
  24546. "type": "object",
  24547. "properties": {
  24548. "type": {
  24549. "type": "string",
  24550. "enum": ["sync"]
  24551. },
  24552. "id": {
  24553. "type": "string",
  24554. "pattern": "^evt_"
  24555. },
  24556. "syncEvent": {
  24557. "type": "object",
  24558. "properties": {
  24559. "type": {
  24560. "type": "string",
  24561. "enum": ["session.next.tool.input.started.1"]
  24562. },
  24563. "id": {
  24564. "type": "string",
  24565. "pattern": "^evt_"
  24566. },
  24567. "seq": {
  24568. "type": "number"
  24569. },
  24570. "aggregateID": {
  24571. "type": "string"
  24572. },
  24573. "data": {
  24574. "type": "object",
  24575. "properties": {
  24576. "timestamp": {
  24577. "type": "number"
  24578. },
  24579. "sessionID": {
  24580. "type": "string",
  24581. "pattern": "^ses"
  24582. },
  24583. "assistantMessageID": {
  24584. "type": "string",
  24585. "pattern": "^msg_"
  24586. },
  24587. "callID": {
  24588. "type": "string"
  24589. },
  24590. "name": {
  24591. "type": "string"
  24592. }
  24593. },
  24594. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  24595. "additionalProperties": false
  24596. }
  24597. },
  24598. "required": ["type", "id", "seq", "aggregateID", "data"],
  24599. "additionalProperties": false
  24600. }
  24601. },
  24602. "required": ["type", "id", "syncEvent"],
  24603. "additionalProperties": false
  24604. },
  24605. "SyncEventSessionNextToolInputEnded": {
  24606. "type": "object",
  24607. "properties": {
  24608. "type": {
  24609. "type": "string",
  24610. "enum": ["sync"]
  24611. },
  24612. "id": {
  24613. "type": "string",
  24614. "pattern": "^evt_"
  24615. },
  24616. "syncEvent": {
  24617. "type": "object",
  24618. "properties": {
  24619. "type": {
  24620. "type": "string",
  24621. "enum": ["session.next.tool.input.ended.1"]
  24622. },
  24623. "id": {
  24624. "type": "string",
  24625. "pattern": "^evt_"
  24626. },
  24627. "seq": {
  24628. "type": "number"
  24629. },
  24630. "aggregateID": {
  24631. "type": "string"
  24632. },
  24633. "data": {
  24634. "type": "object",
  24635. "properties": {
  24636. "timestamp": {
  24637. "type": "number"
  24638. },
  24639. "sessionID": {
  24640. "type": "string",
  24641. "pattern": "^ses"
  24642. },
  24643. "assistantMessageID": {
  24644. "type": "string",
  24645. "pattern": "^msg_"
  24646. },
  24647. "callID": {
  24648. "type": "string"
  24649. },
  24650. "text": {
  24651. "type": "string"
  24652. }
  24653. },
  24654. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  24655. "additionalProperties": false
  24656. }
  24657. },
  24658. "required": ["type", "id", "seq", "aggregateID", "data"],
  24659. "additionalProperties": false
  24660. }
  24661. },
  24662. "required": ["type", "id", "syncEvent"],
  24663. "additionalProperties": false
  24664. },
  24665. "SyncEventSessionNextToolCalled": {
  24666. "type": "object",
  24667. "properties": {
  24668. "type": {
  24669. "type": "string",
  24670. "enum": ["sync"]
  24671. },
  24672. "id": {
  24673. "type": "string",
  24674. "pattern": "^evt_"
  24675. },
  24676. "syncEvent": {
  24677. "type": "object",
  24678. "properties": {
  24679. "type": {
  24680. "type": "string",
  24681. "enum": ["session.next.tool.called.1"]
  24682. },
  24683. "id": {
  24684. "type": "string",
  24685. "pattern": "^evt_"
  24686. },
  24687. "seq": {
  24688. "type": "number"
  24689. },
  24690. "aggregateID": {
  24691. "type": "string"
  24692. },
  24693. "data": {
  24694. "type": "object",
  24695. "properties": {
  24696. "timestamp": {
  24697. "type": "number"
  24698. },
  24699. "sessionID": {
  24700. "type": "string",
  24701. "pattern": "^ses"
  24702. },
  24703. "assistantMessageID": {
  24704. "type": "string",
  24705. "pattern": "^msg_"
  24706. },
  24707. "callID": {
  24708. "type": "string"
  24709. },
  24710. "tool": {
  24711. "type": "string"
  24712. },
  24713. "input": {
  24714. "type": "object"
  24715. },
  24716. "provider": {
  24717. "type": "object",
  24718. "properties": {
  24719. "executed": {
  24720. "type": "boolean"
  24721. },
  24722. "metadata": {
  24723. "type": "object",
  24724. "additionalProperties": {
  24725. "type": "object"
  24726. }
  24727. }
  24728. },
  24729. "required": ["executed"],
  24730. "additionalProperties": false
  24731. }
  24732. },
  24733. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  24734. "additionalProperties": false
  24735. }
  24736. },
  24737. "required": ["type", "id", "seq", "aggregateID", "data"],
  24738. "additionalProperties": false
  24739. }
  24740. },
  24741. "required": ["type", "id", "syncEvent"],
  24742. "additionalProperties": false
  24743. },
  24744. "SyncEventSessionNextToolProgress": {
  24745. "type": "object",
  24746. "properties": {
  24747. "type": {
  24748. "type": "string",
  24749. "enum": ["sync"]
  24750. },
  24751. "id": {
  24752. "type": "string",
  24753. "pattern": "^evt_"
  24754. },
  24755. "syncEvent": {
  24756. "type": "object",
  24757. "properties": {
  24758. "type": {
  24759. "type": "string",
  24760. "enum": ["session.next.tool.progress.1"]
  24761. },
  24762. "id": {
  24763. "type": "string",
  24764. "pattern": "^evt_"
  24765. },
  24766. "seq": {
  24767. "type": "number"
  24768. },
  24769. "aggregateID": {
  24770. "type": "string"
  24771. },
  24772. "data": {
  24773. "type": "object",
  24774. "properties": {
  24775. "timestamp": {
  24776. "type": "number"
  24777. },
  24778. "sessionID": {
  24779. "type": "string",
  24780. "pattern": "^ses"
  24781. },
  24782. "assistantMessageID": {
  24783. "type": "string",
  24784. "pattern": "^msg_"
  24785. },
  24786. "callID": {
  24787. "type": "string"
  24788. },
  24789. "structured": {
  24790. "type": "object"
  24791. },
  24792. "content": {
  24793. "type": "array",
  24794. "items": {
  24795. "anyOf": [
  24796. {
  24797. "$ref": "#/components/schemas/ToolTextContent"
  24798. },
  24799. {
  24800. "$ref": "#/components/schemas/ToolFileContent"
  24801. }
  24802. ]
  24803. }
  24804. }
  24805. },
  24806. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  24807. "additionalProperties": false
  24808. }
  24809. },
  24810. "required": ["type", "id", "seq", "aggregateID", "data"],
  24811. "additionalProperties": false
  24812. }
  24813. },
  24814. "required": ["type", "id", "syncEvent"],
  24815. "additionalProperties": false
  24816. },
  24817. "SyncEventSessionNextToolSuccess": {
  24818. "type": "object",
  24819. "properties": {
  24820. "type": {
  24821. "type": "string",
  24822. "enum": ["sync"]
  24823. },
  24824. "id": {
  24825. "type": "string",
  24826. "pattern": "^evt_"
  24827. },
  24828. "syncEvent": {
  24829. "type": "object",
  24830. "properties": {
  24831. "type": {
  24832. "type": "string",
  24833. "enum": ["session.next.tool.success.1"]
  24834. },
  24835. "id": {
  24836. "type": "string",
  24837. "pattern": "^evt_"
  24838. },
  24839. "seq": {
  24840. "type": "number"
  24841. },
  24842. "aggregateID": {
  24843. "type": "string"
  24844. },
  24845. "data": {
  24846. "type": "object",
  24847. "properties": {
  24848. "timestamp": {
  24849. "type": "number"
  24850. },
  24851. "sessionID": {
  24852. "type": "string",
  24853. "pattern": "^ses"
  24854. },
  24855. "assistantMessageID": {
  24856. "type": "string",
  24857. "pattern": "^msg_"
  24858. },
  24859. "callID": {
  24860. "type": "string"
  24861. },
  24862. "structured": {
  24863. "type": "object"
  24864. },
  24865. "content": {
  24866. "type": "array",
  24867. "items": {
  24868. "anyOf": [
  24869. {
  24870. "$ref": "#/components/schemas/ToolTextContent"
  24871. },
  24872. {
  24873. "$ref": "#/components/schemas/ToolFileContent"
  24874. }
  24875. ]
  24876. }
  24877. },
  24878. "outputPaths": {
  24879. "type": "array",
  24880. "items": {
  24881. "type": "string"
  24882. }
  24883. },
  24884. "result": {},
  24885. "provider": {
  24886. "type": "object",
  24887. "properties": {
  24888. "executed": {
  24889. "type": "boolean"
  24890. },
  24891. "metadata": {
  24892. "type": "object",
  24893. "additionalProperties": {
  24894. "type": "object"
  24895. }
  24896. }
  24897. },
  24898. "required": ["executed"],
  24899. "additionalProperties": false
  24900. }
  24901. },
  24902. "required": [
  24903. "timestamp",
  24904. "sessionID",
  24905. "assistantMessageID",
  24906. "callID",
  24907. "structured",
  24908. "content",
  24909. "provider"
  24910. ],
  24911. "additionalProperties": false
  24912. }
  24913. },
  24914. "required": ["type", "id", "seq", "aggregateID", "data"],
  24915. "additionalProperties": false
  24916. }
  24917. },
  24918. "required": ["type", "id", "syncEvent"],
  24919. "additionalProperties": false
  24920. },
  24921. "SyncEventSessionNextToolFailed": {
  24922. "type": "object",
  24923. "properties": {
  24924. "type": {
  24925. "type": "string",
  24926. "enum": ["sync"]
  24927. },
  24928. "id": {
  24929. "type": "string",
  24930. "pattern": "^evt_"
  24931. },
  24932. "syncEvent": {
  24933. "type": "object",
  24934. "properties": {
  24935. "type": {
  24936. "type": "string",
  24937. "enum": ["session.next.tool.failed.1"]
  24938. },
  24939. "id": {
  24940. "type": "string",
  24941. "pattern": "^evt_"
  24942. },
  24943. "seq": {
  24944. "type": "number"
  24945. },
  24946. "aggregateID": {
  24947. "type": "string"
  24948. },
  24949. "data": {
  24950. "type": "object",
  24951. "properties": {
  24952. "timestamp": {
  24953. "type": "number"
  24954. },
  24955. "sessionID": {
  24956. "type": "string",
  24957. "pattern": "^ses"
  24958. },
  24959. "assistantMessageID": {
  24960. "type": "string",
  24961. "pattern": "^msg_"
  24962. },
  24963. "callID": {
  24964. "type": "string"
  24965. },
  24966. "error": {
  24967. "$ref": "#/components/schemas/SessionErrorUnknown"
  24968. },
  24969. "result": {},
  24970. "provider": {
  24971. "type": "object",
  24972. "properties": {
  24973. "executed": {
  24974. "type": "boolean"
  24975. },
  24976. "metadata": {
  24977. "type": "object",
  24978. "additionalProperties": {
  24979. "type": "object"
  24980. }
  24981. }
  24982. },
  24983. "required": ["executed"],
  24984. "additionalProperties": false
  24985. }
  24986. },
  24987. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  24988. "additionalProperties": false
  24989. }
  24990. },
  24991. "required": ["type", "id", "seq", "aggregateID", "data"],
  24992. "additionalProperties": false
  24993. }
  24994. },
  24995. "required": ["type", "id", "syncEvent"],
  24996. "additionalProperties": false
  24997. },
  24998. "SyncEventSessionNextRetried": {
  24999. "type": "object",
  25000. "properties": {
  25001. "type": {
  25002. "type": "string",
  25003. "enum": ["sync"]
  25004. },
  25005. "id": {
  25006. "type": "string",
  25007. "pattern": "^evt_"
  25008. },
  25009. "syncEvent": {
  25010. "type": "object",
  25011. "properties": {
  25012. "type": {
  25013. "type": "string",
  25014. "enum": ["session.next.retried.1"]
  25015. },
  25016. "id": {
  25017. "type": "string",
  25018. "pattern": "^evt_"
  25019. },
  25020. "seq": {
  25021. "type": "number"
  25022. },
  25023. "aggregateID": {
  25024. "type": "string"
  25025. },
  25026. "data": {
  25027. "type": "object",
  25028. "properties": {
  25029. "timestamp": {
  25030. "type": "number"
  25031. },
  25032. "sessionID": {
  25033. "type": "string",
  25034. "pattern": "^ses"
  25035. },
  25036. "attempt": {
  25037. "type": "number"
  25038. },
  25039. "error": {
  25040. "$ref": "#/components/schemas/SessionNextRetry_error"
  25041. }
  25042. },
  25043. "required": ["timestamp", "sessionID", "attempt", "error"],
  25044. "additionalProperties": false
  25045. }
  25046. },
  25047. "required": ["type", "id", "seq", "aggregateID", "data"],
  25048. "additionalProperties": false
  25049. }
  25050. },
  25051. "required": ["type", "id", "syncEvent"],
  25052. "additionalProperties": false
  25053. },
  25054. "SyncEventSessionNextCompactionStarted": {
  25055. "type": "object",
  25056. "properties": {
  25057. "type": {
  25058. "type": "string",
  25059. "enum": ["sync"]
  25060. },
  25061. "id": {
  25062. "type": "string",
  25063. "pattern": "^evt_"
  25064. },
  25065. "syncEvent": {
  25066. "type": "object",
  25067. "properties": {
  25068. "type": {
  25069. "type": "string",
  25070. "enum": ["session.next.compaction.started.1"]
  25071. },
  25072. "id": {
  25073. "type": "string",
  25074. "pattern": "^evt_"
  25075. },
  25076. "seq": {
  25077. "type": "number"
  25078. },
  25079. "aggregateID": {
  25080. "type": "string"
  25081. },
  25082. "data": {
  25083. "type": "object",
  25084. "properties": {
  25085. "timestamp": {
  25086. "type": "number"
  25087. },
  25088. "sessionID": {
  25089. "type": "string",
  25090. "pattern": "^ses"
  25091. },
  25092. "messageID": {
  25093. "type": "string",
  25094. "pattern": "^msg_"
  25095. },
  25096. "reason": {
  25097. "type": "string",
  25098. "enum": ["auto", "manual"]
  25099. }
  25100. },
  25101. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25102. "additionalProperties": false
  25103. }
  25104. },
  25105. "required": ["type", "id", "seq", "aggregateID", "data"],
  25106. "additionalProperties": false
  25107. }
  25108. },
  25109. "required": ["type", "id", "syncEvent"],
  25110. "additionalProperties": false
  25111. },
  25112. "SyncEventSessionNextCompactionEnded": {
  25113. "type": "object",
  25114. "properties": {
  25115. "type": {
  25116. "type": "string",
  25117. "enum": ["sync"]
  25118. },
  25119. "id": {
  25120. "type": "string",
  25121. "pattern": "^evt_"
  25122. },
  25123. "syncEvent": {
  25124. "type": "object",
  25125. "properties": {
  25126. "type": {
  25127. "type": "string",
  25128. "enum": ["session.next.compaction.ended.2"]
  25129. },
  25130. "id": {
  25131. "type": "string",
  25132. "pattern": "^evt_"
  25133. },
  25134. "seq": {
  25135. "type": "number"
  25136. },
  25137. "aggregateID": {
  25138. "type": "string"
  25139. },
  25140. "data": {
  25141. "type": "object",
  25142. "properties": {
  25143. "timestamp": {
  25144. "type": "number"
  25145. },
  25146. "sessionID": {
  25147. "type": "string",
  25148. "pattern": "^ses"
  25149. },
  25150. "messageID": {
  25151. "type": "string",
  25152. "pattern": "^msg_"
  25153. },
  25154. "reason": {
  25155. "type": "string",
  25156. "enum": ["auto", "manual"]
  25157. },
  25158. "text": {
  25159. "type": "string"
  25160. },
  25161. "recent": {
  25162. "type": "string"
  25163. }
  25164. },
  25165. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25166. "additionalProperties": false
  25167. }
  25168. },
  25169. "required": ["type", "id", "seq", "aggregateID", "data"],
  25170. "additionalProperties": false
  25171. }
  25172. },
  25173. "required": ["type", "id", "syncEvent"],
  25174. "additionalProperties": false
  25175. },
  25176. "ConfigV2ReferenceGit": {
  25177. "type": "object",
  25178. "properties": {
  25179. "repository": {
  25180. "type": "string"
  25181. },
  25182. "branch": {
  25183. "type": "string"
  25184. },
  25185. "description": {
  25186. "type": "string"
  25187. },
  25188. "hidden": {
  25189. "type": "boolean"
  25190. }
  25191. },
  25192. "required": ["repository"],
  25193. "additionalProperties": false
  25194. },
  25195. "ConfigV2ReferenceLocal": {
  25196. "type": "object",
  25197. "properties": {
  25198. "path": {
  25199. "type": "string"
  25200. },
  25201. "description": {
  25202. "type": "string"
  25203. },
  25204. "hidden": {
  25205. "type": "boolean"
  25206. }
  25207. },
  25208. "required": ["path"],
  25209. "additionalProperties": false
  25210. },
  25211. "PolicyEffect": {
  25212. "type": "string",
  25213. "enum": ["allow", "deny"]
  25214. },
  25215. "ConfigV2ExperimentalPolicy": {
  25216. "type": "object",
  25217. "properties": {
  25218. "action": {
  25219. "type": "string",
  25220. "enum": ["provider.use"]
  25221. },
  25222. "effect": {
  25223. "$ref": "#/components/schemas/PolicyEffect"
  25224. },
  25225. "resource": {
  25226. "type": "string"
  25227. }
  25228. },
  25229. "required": ["action", "effect", "resource"],
  25230. "additionalProperties": false
  25231. },
  25232. "ProjectDirectories": {
  25233. "type": "array",
  25234. "items": {
  25235. "type": "object",
  25236. "properties": {
  25237. "directory": {
  25238. "type": "string"
  25239. },
  25240. "type": {
  25241. "type": "string",
  25242. "enum": ["main", "root", "git_worktree"]
  25243. }
  25244. },
  25245. "required": ["directory", "type"],
  25246. "additionalProperties": false
  25247. }
  25248. },
  25249. "ProjectCopyCopy": {
  25250. "type": "object",
  25251. "properties": {
  25252. "directory": {
  25253. "type": "string"
  25254. }
  25255. },
  25256. "required": ["directory"],
  25257. "additionalProperties": false
  25258. },
  25259. "LocationInfo": {
  25260. "type": "object",
  25261. "properties": {
  25262. "directory": {
  25263. "type": "string"
  25264. },
  25265. "workspaceID": {
  25266. "type": "string",
  25267. "pattern": "^wrk"
  25268. },
  25269. "project": {
  25270. "type": "object",
  25271. "properties": {
  25272. "id": {
  25273. "type": "string"
  25274. },
  25275. "directory": {
  25276. "type": "string"
  25277. }
  25278. },
  25279. "required": ["id", "directory"],
  25280. "additionalProperties": false
  25281. }
  25282. },
  25283. "required": ["directory", "project"],
  25284. "additionalProperties": false
  25285. },
  25286. "PermissionV2Effect": {
  25287. "type": "string",
  25288. "enum": ["allow", "deny", "ask"]
  25289. },
  25290. "PermissionV2Rule": {
  25291. "type": "object",
  25292. "properties": {
  25293. "action": {
  25294. "type": "string"
  25295. },
  25296. "resource": {
  25297. "type": "string"
  25298. },
  25299. "effect": {
  25300. "$ref": "#/components/schemas/PermissionV2Effect"
  25301. }
  25302. },
  25303. "required": ["action", "resource", "effect"],
  25304. "additionalProperties": false
  25305. },
  25306. "PermissionV2Ruleset": {
  25307. "type": "array",
  25308. "items": {
  25309. "$ref": "#/components/schemas/PermissionV2Rule"
  25310. }
  25311. },
  25312. "AgentV2Info": {
  25313. "type": "object",
  25314. "properties": {
  25315. "id": {
  25316. "type": "string"
  25317. },
  25318. "model": {
  25319. "type": "object",
  25320. "properties": {
  25321. "id": {
  25322. "type": "string"
  25323. },
  25324. "providerID": {
  25325. "type": "string"
  25326. },
  25327. "variant": {
  25328. "type": "string"
  25329. }
  25330. },
  25331. "required": ["id", "providerID"],
  25332. "additionalProperties": false
  25333. },
  25334. "request": {
  25335. "type": "object",
  25336. "properties": {
  25337. "headers": {
  25338. "type": "object",
  25339. "additionalProperties": {
  25340. "type": "string"
  25341. }
  25342. },
  25343. "body": {
  25344. "type": "object"
  25345. }
  25346. },
  25347. "required": ["headers", "body"],
  25348. "additionalProperties": false
  25349. },
  25350. "system": {
  25351. "type": "string"
  25352. },
  25353. "description": {
  25354. "type": "string"
  25355. },
  25356. "mode": {
  25357. "type": "string",
  25358. "enum": ["subagent", "primary", "all"]
  25359. },
  25360. "hidden": {
  25361. "type": "boolean"
  25362. },
  25363. "color": {
  25364. "anyOf": [
  25365. {
  25366. "type": "string",
  25367. "pattern": "^#[0-9a-fA-F]{6}$"
  25368. },
  25369. {
  25370. "type": "string",
  25371. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25372. }
  25373. ]
  25374. },
  25375. "steps": {
  25376. "type": "integer",
  25377. "exclusiveMinimum": 0
  25378. },
  25379. "permissions": {
  25380. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25381. }
  25382. },
  25383. "required": ["id", "request", "mode", "hidden", "permissions"],
  25384. "additionalProperties": false
  25385. },
  25386. "SessionV2Info": {
  25387. "type": "object",
  25388. "properties": {
  25389. "id": {
  25390. "type": "string",
  25391. "pattern": "^ses"
  25392. },
  25393. "parentID": {
  25394. "type": "string",
  25395. "pattern": "^ses"
  25396. },
  25397. "projectID": {
  25398. "type": "string"
  25399. },
  25400. "agent": {
  25401. "type": "string"
  25402. },
  25403. "model": {
  25404. "type": "object",
  25405. "properties": {
  25406. "id": {
  25407. "type": "string"
  25408. },
  25409. "providerID": {
  25410. "type": "string"
  25411. },
  25412. "variant": {
  25413. "type": "string"
  25414. }
  25415. },
  25416. "required": ["id", "providerID"],
  25417. "additionalProperties": false
  25418. },
  25419. "cost": {
  25420. "type": "number"
  25421. },
  25422. "tokens": {
  25423. "type": "object",
  25424. "properties": {
  25425. "input": {
  25426. "type": "number"
  25427. },
  25428. "output": {
  25429. "type": "number"
  25430. },
  25431. "reasoning": {
  25432. "type": "number"
  25433. },
  25434. "cache": {
  25435. "type": "object",
  25436. "properties": {
  25437. "read": {
  25438. "type": "number"
  25439. },
  25440. "write": {
  25441. "type": "number"
  25442. }
  25443. },
  25444. "required": ["read", "write"],
  25445. "additionalProperties": false
  25446. }
  25447. },
  25448. "required": ["input", "output", "reasoning", "cache"],
  25449. "additionalProperties": false
  25450. },
  25451. "time": {
  25452. "type": "object",
  25453. "properties": {
  25454. "created": {
  25455. "type": "number"
  25456. },
  25457. "updated": {
  25458. "type": "number"
  25459. },
  25460. "archived": {
  25461. "type": "number"
  25462. }
  25463. },
  25464. "required": ["created", "updated"],
  25465. "additionalProperties": false
  25466. },
  25467. "title": {
  25468. "type": "string"
  25469. },
  25470. "location": {
  25471. "$ref": "#/components/schemas/LocationRef"
  25472. },
  25473. "subpath": {
  25474. "type": "string"
  25475. }
  25476. },
  25477. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25478. "additionalProperties": false
  25479. },
  25480. "SessionInputAdmitted": {
  25481. "type": "object",
  25482. "properties": {
  25483. "admittedSeq": {
  25484. "type": "integer",
  25485. "minimum": 0
  25486. },
  25487. "id": {
  25488. "type": "string",
  25489. "pattern": "^msg_"
  25490. },
  25491. "sessionID": {
  25492. "type": "string",
  25493. "pattern": "^ses"
  25494. },
  25495. "prompt": {
  25496. "$ref": "#/components/schemas/Prompt"
  25497. },
  25498. "delivery": {
  25499. "type": "string",
  25500. "enum": ["steer", "queue"]
  25501. },
  25502. "timeCreated": {
  25503. "type": "number"
  25504. },
  25505. "promotedSeq": {
  25506. "type": "integer",
  25507. "minimum": 0
  25508. }
  25509. },
  25510. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  25511. "additionalProperties": false
  25512. },
  25513. "SessionMessageAgentSwitched": {
  25514. "type": "object",
  25515. "properties": {
  25516. "id": {
  25517. "type": "string",
  25518. "pattern": "^msg_"
  25519. },
  25520. "metadata": {
  25521. "type": "object"
  25522. },
  25523. "time": {
  25524. "type": "object",
  25525. "properties": {
  25526. "created": {
  25527. "type": "number"
  25528. }
  25529. },
  25530. "required": ["created"],
  25531. "additionalProperties": false
  25532. },
  25533. "type": {
  25534. "type": "string",
  25535. "enum": ["agent-switched"]
  25536. },
  25537. "agent": {
  25538. "type": "string"
  25539. }
  25540. },
  25541. "required": ["id", "time", "type", "agent"],
  25542. "additionalProperties": false
  25543. },
  25544. "SessionMessageModelSwitched": {
  25545. "type": "object",
  25546. "properties": {
  25547. "id": {
  25548. "type": "string",
  25549. "pattern": "^msg_"
  25550. },
  25551. "metadata": {
  25552. "type": "object"
  25553. },
  25554. "time": {
  25555. "type": "object",
  25556. "properties": {
  25557. "created": {
  25558. "type": "number"
  25559. }
  25560. },
  25561. "required": ["created"],
  25562. "additionalProperties": false
  25563. },
  25564. "type": {
  25565. "type": "string",
  25566. "enum": ["model-switched"]
  25567. },
  25568. "model": {
  25569. "type": "object",
  25570. "properties": {
  25571. "id": {
  25572. "type": "string"
  25573. },
  25574. "providerID": {
  25575. "type": "string"
  25576. },
  25577. "variant": {
  25578. "type": "string"
  25579. }
  25580. },
  25581. "required": ["id", "providerID"],
  25582. "additionalProperties": false
  25583. }
  25584. },
  25585. "required": ["id", "time", "type", "model"],
  25586. "additionalProperties": false
  25587. },
  25588. "SessionMessageUser": {
  25589. "type": "object",
  25590. "properties": {
  25591. "id": {
  25592. "type": "string",
  25593. "pattern": "^msg_"
  25594. },
  25595. "metadata": {
  25596. "type": "object"
  25597. },
  25598. "time": {
  25599. "type": "object",
  25600. "properties": {
  25601. "created": {
  25602. "type": "number"
  25603. }
  25604. },
  25605. "required": ["created"],
  25606. "additionalProperties": false
  25607. },
  25608. "text": {
  25609. "type": "string"
  25610. },
  25611. "files": {
  25612. "type": "array",
  25613. "items": {
  25614. "$ref": "#/components/schemas/PromptFileAttachment"
  25615. }
  25616. },
  25617. "agents": {
  25618. "type": "array",
  25619. "items": {
  25620. "$ref": "#/components/schemas/PromptAgentAttachment"
  25621. }
  25622. },
  25623. "type": {
  25624. "type": "string",
  25625. "enum": ["user"]
  25626. }
  25627. },
  25628. "required": ["id", "time", "text", "type"],
  25629. "additionalProperties": false
  25630. },
  25631. "SessionMessageSynthetic": {
  25632. "type": "object",
  25633. "properties": {
  25634. "id": {
  25635. "type": "string",
  25636. "pattern": "^msg_"
  25637. },
  25638. "metadata": {
  25639. "type": "object"
  25640. },
  25641. "time": {
  25642. "type": "object",
  25643. "properties": {
  25644. "created": {
  25645. "type": "number"
  25646. }
  25647. },
  25648. "required": ["created"],
  25649. "additionalProperties": false
  25650. },
  25651. "sessionID": {
  25652. "type": "string",
  25653. "pattern": "^ses"
  25654. },
  25655. "text": {
  25656. "type": "string"
  25657. },
  25658. "type": {
  25659. "type": "string",
  25660. "enum": ["synthetic"]
  25661. }
  25662. },
  25663. "required": ["id", "time", "sessionID", "text", "type"],
  25664. "additionalProperties": false
  25665. },
  25666. "SessionMessageSystem": {
  25667. "type": "object",
  25668. "properties": {
  25669. "id": {
  25670. "type": "string",
  25671. "pattern": "^msg_"
  25672. },
  25673. "metadata": {
  25674. "type": "object"
  25675. },
  25676. "time": {
  25677. "type": "object",
  25678. "properties": {
  25679. "created": {
  25680. "type": "number"
  25681. }
  25682. },
  25683. "required": ["created"],
  25684. "additionalProperties": false
  25685. },
  25686. "type": {
  25687. "type": "string",
  25688. "enum": ["system"]
  25689. },
  25690. "text": {
  25691. "type": "string"
  25692. }
  25693. },
  25694. "required": ["id", "time", "type", "text"],
  25695. "additionalProperties": false
  25696. },
  25697. "SessionMessageShell": {
  25698. "type": "object",
  25699. "properties": {
  25700. "id": {
  25701. "type": "string",
  25702. "pattern": "^msg_"
  25703. },
  25704. "metadata": {
  25705. "type": "object"
  25706. },
  25707. "time": {
  25708. "type": "object",
  25709. "properties": {
  25710. "created": {
  25711. "type": "number"
  25712. },
  25713. "completed": {
  25714. "type": "number"
  25715. }
  25716. },
  25717. "required": ["created"],
  25718. "additionalProperties": false
  25719. },
  25720. "type": {
  25721. "type": "string",
  25722. "enum": ["shell"]
  25723. },
  25724. "callID": {
  25725. "type": "string"
  25726. },
  25727. "command": {
  25728. "type": "string"
  25729. },
  25730. "output": {
  25731. "type": "string"
  25732. }
  25733. },
  25734. "required": ["id", "time", "type", "callID", "command", "output"],
  25735. "additionalProperties": false
  25736. },
  25737. "SessionMessageAssistantText": {
  25738. "type": "object",
  25739. "properties": {
  25740. "type": {
  25741. "type": "string",
  25742. "enum": ["text"]
  25743. },
  25744. "id": {
  25745. "type": "string"
  25746. },
  25747. "text": {
  25748. "type": "string"
  25749. }
  25750. },
  25751. "required": ["type", "id", "text"],
  25752. "additionalProperties": false
  25753. },
  25754. "SessionMessageAssistantReasoning": {
  25755. "type": "object",
  25756. "properties": {
  25757. "type": {
  25758. "type": "string",
  25759. "enum": ["reasoning"]
  25760. },
  25761. "id": {
  25762. "type": "string"
  25763. },
  25764. "text": {
  25765. "type": "string"
  25766. },
  25767. "providerMetadata": {
  25768. "type": "object",
  25769. "additionalProperties": {
  25770. "type": "object"
  25771. }
  25772. }
  25773. },
  25774. "required": ["type", "id", "text"],
  25775. "additionalProperties": false
  25776. },
  25777. "SessionMessageToolStatePending": {
  25778. "type": "object",
  25779. "properties": {
  25780. "status": {
  25781. "type": "string",
  25782. "enum": ["pending"]
  25783. },
  25784. "input": {
  25785. "type": "string"
  25786. }
  25787. },
  25788. "required": ["status", "input"],
  25789. "additionalProperties": false
  25790. },
  25791. "SessionMessageToolStateRunning": {
  25792. "type": "object",
  25793. "properties": {
  25794. "status": {
  25795. "type": "string",
  25796. "enum": ["running"]
  25797. },
  25798. "input": {
  25799. "type": "object"
  25800. },
  25801. "structured": {
  25802. "type": "object"
  25803. },
  25804. "content": {
  25805. "type": "array",
  25806. "items": {
  25807. "anyOf": [
  25808. {
  25809. "$ref": "#/components/schemas/ToolTextContent"
  25810. },
  25811. {
  25812. "$ref": "#/components/schemas/ToolFileContent"
  25813. }
  25814. ]
  25815. }
  25816. }
  25817. },
  25818. "required": ["status", "input", "structured", "content"],
  25819. "additionalProperties": false
  25820. },
  25821. "SessionMessageToolStateCompleted": {
  25822. "type": "object",
  25823. "properties": {
  25824. "status": {
  25825. "type": "string",
  25826. "enum": ["completed"]
  25827. },
  25828. "input": {
  25829. "type": "object"
  25830. },
  25831. "attachments": {
  25832. "type": "array",
  25833. "items": {
  25834. "$ref": "#/components/schemas/PromptFileAttachment"
  25835. }
  25836. },
  25837. "content": {
  25838. "type": "array",
  25839. "items": {
  25840. "anyOf": [
  25841. {
  25842. "$ref": "#/components/schemas/ToolTextContent"
  25843. },
  25844. {
  25845. "$ref": "#/components/schemas/ToolFileContent"
  25846. }
  25847. ]
  25848. }
  25849. },
  25850. "outputPaths": {
  25851. "type": "array",
  25852. "items": {
  25853. "type": "string"
  25854. }
  25855. },
  25856. "structured": {
  25857. "type": "object"
  25858. },
  25859. "result": {}
  25860. },
  25861. "required": ["status", "input", "content", "structured"],
  25862. "additionalProperties": false
  25863. },
  25864. "SessionMessageToolStateError": {
  25865. "type": "object",
  25866. "properties": {
  25867. "status": {
  25868. "type": "string",
  25869. "enum": ["error"]
  25870. },
  25871. "input": {
  25872. "type": "object"
  25873. },
  25874. "content": {
  25875. "type": "array",
  25876. "items": {
  25877. "anyOf": [
  25878. {
  25879. "$ref": "#/components/schemas/ToolTextContent"
  25880. },
  25881. {
  25882. "$ref": "#/components/schemas/ToolFileContent"
  25883. }
  25884. ]
  25885. }
  25886. },
  25887. "structured": {
  25888. "type": "object"
  25889. },
  25890. "error": {
  25891. "$ref": "#/components/schemas/SessionErrorUnknown"
  25892. },
  25893. "result": {}
  25894. },
  25895. "required": ["status", "input", "content", "structured", "error"],
  25896. "additionalProperties": false
  25897. },
  25898. "SessionMessageAssistantTool": {
  25899. "type": "object",
  25900. "properties": {
  25901. "type": {
  25902. "type": "string",
  25903. "enum": ["tool"]
  25904. },
  25905. "id": {
  25906. "type": "string"
  25907. },
  25908. "name": {
  25909. "type": "string"
  25910. },
  25911. "provider": {
  25912. "type": "object",
  25913. "properties": {
  25914. "executed": {
  25915. "type": "boolean"
  25916. },
  25917. "metadata": {
  25918. "type": "object",
  25919. "additionalProperties": {
  25920. "type": "object"
  25921. }
  25922. },
  25923. "resultMetadata": {
  25924. "type": "object",
  25925. "additionalProperties": {
  25926. "type": "object"
  25927. }
  25928. }
  25929. },
  25930. "required": ["executed"],
  25931. "additionalProperties": false
  25932. },
  25933. "state": {
  25934. "anyOf": [
  25935. {
  25936. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  25937. },
  25938. {
  25939. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  25940. },
  25941. {
  25942. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  25943. },
  25944. {
  25945. "$ref": "#/components/schemas/SessionMessageToolStateError"
  25946. }
  25947. ]
  25948. },
  25949. "time": {
  25950. "type": "object",
  25951. "properties": {
  25952. "created": {
  25953. "type": "number"
  25954. },
  25955. "ran": {
  25956. "type": "number"
  25957. },
  25958. "completed": {
  25959. "type": "number"
  25960. },
  25961. "pruned": {
  25962. "type": "number"
  25963. }
  25964. },
  25965. "required": ["created"],
  25966. "additionalProperties": false
  25967. }
  25968. },
  25969. "required": ["type", "id", "name", "state", "time"],
  25970. "additionalProperties": false
  25971. },
  25972. "SessionMessageAssistant": {
  25973. "type": "object",
  25974. "properties": {
  25975. "id": {
  25976. "type": "string",
  25977. "pattern": "^msg_"
  25978. },
  25979. "metadata": {
  25980. "type": "object"
  25981. },
  25982. "time": {
  25983. "type": "object",
  25984. "properties": {
  25985. "created": {
  25986. "type": "number"
  25987. },
  25988. "completed": {
  25989. "type": "number"
  25990. }
  25991. },
  25992. "required": ["created"],
  25993. "additionalProperties": false
  25994. },
  25995. "type": {
  25996. "type": "string",
  25997. "enum": ["assistant"]
  25998. },
  25999. "agent": {
  26000. "type": "string"
  26001. },
  26002. "model": {
  26003. "type": "object",
  26004. "properties": {
  26005. "id": {
  26006. "type": "string"
  26007. },
  26008. "providerID": {
  26009. "type": "string"
  26010. },
  26011. "variant": {
  26012. "type": "string"
  26013. }
  26014. },
  26015. "required": ["id", "providerID"],
  26016. "additionalProperties": false
  26017. },
  26018. "content": {
  26019. "type": "array",
  26020. "items": {
  26021. "anyOf": [
  26022. {
  26023. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26024. },
  26025. {
  26026. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26027. },
  26028. {
  26029. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26030. }
  26031. ]
  26032. }
  26033. },
  26034. "snapshot": {
  26035. "type": "object",
  26036. "properties": {
  26037. "start": {
  26038. "type": "string"
  26039. },
  26040. "end": {
  26041. "type": "string"
  26042. }
  26043. },
  26044. "additionalProperties": false
  26045. },
  26046. "finish": {
  26047. "type": "string"
  26048. },
  26049. "cost": {
  26050. "type": "number"
  26051. },
  26052. "tokens": {
  26053. "type": "object",
  26054. "properties": {
  26055. "input": {
  26056. "type": "number"
  26057. },
  26058. "output": {
  26059. "type": "number"
  26060. },
  26061. "reasoning": {
  26062. "type": "number"
  26063. },
  26064. "cache": {
  26065. "type": "object",
  26066. "properties": {
  26067. "read": {
  26068. "type": "number"
  26069. },
  26070. "write": {
  26071. "type": "number"
  26072. }
  26073. },
  26074. "required": ["read", "write"],
  26075. "additionalProperties": false
  26076. }
  26077. },
  26078. "required": ["input", "output", "reasoning", "cache"],
  26079. "additionalProperties": false
  26080. },
  26081. "error": {
  26082. "$ref": "#/components/schemas/SessionErrorUnknown"
  26083. }
  26084. },
  26085. "required": ["id", "time", "type", "agent", "model", "content"],
  26086. "additionalProperties": false
  26087. },
  26088. "SessionMessageCompaction": {
  26089. "type": "object",
  26090. "properties": {
  26091. "type": {
  26092. "type": "string",
  26093. "enum": ["compaction"]
  26094. },
  26095. "reason": {
  26096. "type": "string",
  26097. "enum": ["auto", "manual"]
  26098. },
  26099. "summary": {
  26100. "type": "string"
  26101. },
  26102. "recent": {
  26103. "type": "string"
  26104. },
  26105. "id": {
  26106. "type": "string",
  26107. "pattern": "^msg_"
  26108. },
  26109. "metadata": {
  26110. "type": "object"
  26111. },
  26112. "time": {
  26113. "type": "object",
  26114. "properties": {
  26115. "created": {
  26116. "type": "number"
  26117. }
  26118. },
  26119. "required": ["created"],
  26120. "additionalProperties": false
  26121. }
  26122. },
  26123. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26124. "additionalProperties": false
  26125. },
  26126. "SessionMessage": {
  26127. "anyOf": [
  26128. {
  26129. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26130. },
  26131. {
  26132. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26133. },
  26134. {
  26135. "$ref": "#/components/schemas/SessionMessageUser"
  26136. },
  26137. {
  26138. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26139. },
  26140. {
  26141. "$ref": "#/components/schemas/SessionMessageSystem"
  26142. },
  26143. {
  26144. "$ref": "#/components/schemas/SessionMessageShell"
  26145. },
  26146. {
  26147. "$ref": "#/components/schemas/SessionMessageAssistant"
  26148. },
  26149. {
  26150. "$ref": "#/components/schemas/SessionMessageCompaction"
  26151. }
  26152. ]
  26153. },
  26154. "ProviderV2Info": {
  26155. "type": "object",
  26156. "properties": {
  26157. "id": {
  26158. "type": "string"
  26159. },
  26160. "name": {
  26161. "type": "string"
  26162. },
  26163. "enabled": {
  26164. "anyOf": [
  26165. {
  26166. "type": "boolean",
  26167. "enum": [false]
  26168. },
  26169. {
  26170. "type": "object",
  26171. "properties": {
  26172. "via": {
  26173. "type": "string",
  26174. "enum": ["env"]
  26175. },
  26176. "name": {
  26177. "type": "string"
  26178. }
  26179. },
  26180. "required": ["via", "name"],
  26181. "additionalProperties": false
  26182. },
  26183. {
  26184. "type": "object",
  26185. "properties": {
  26186. "via": {
  26187. "type": "string",
  26188. "enum": ["credential"]
  26189. },
  26190. "credentialID": {
  26191. "type": "string"
  26192. }
  26193. },
  26194. "required": ["via", "credentialID"],
  26195. "additionalProperties": false
  26196. },
  26197. {
  26198. "type": "object",
  26199. "properties": {
  26200. "via": {
  26201. "type": "string",
  26202. "enum": ["custom"]
  26203. },
  26204. "data": {
  26205. "type": "object"
  26206. }
  26207. },
  26208. "required": ["via", "data"],
  26209. "additionalProperties": false
  26210. }
  26211. ]
  26212. },
  26213. "env": {
  26214. "type": "array",
  26215. "items": {
  26216. "type": "string"
  26217. }
  26218. },
  26219. "api": {
  26220. "anyOf": [
  26221. {
  26222. "type": "object",
  26223. "properties": {
  26224. "type": {
  26225. "type": "string",
  26226. "enum": ["aisdk"]
  26227. },
  26228. "package": {
  26229. "type": "string"
  26230. },
  26231. "url": {
  26232. "type": "string"
  26233. },
  26234. "settings": {
  26235. "type": "object"
  26236. }
  26237. },
  26238. "required": ["type", "package"],
  26239. "additionalProperties": false
  26240. },
  26241. {
  26242. "type": "object",
  26243. "properties": {
  26244. "type": {
  26245. "type": "string",
  26246. "enum": ["native"]
  26247. },
  26248. "url": {
  26249. "type": "string"
  26250. },
  26251. "settings": {
  26252. "type": "object"
  26253. }
  26254. },
  26255. "required": ["type", "settings"],
  26256. "additionalProperties": false
  26257. }
  26258. ]
  26259. },
  26260. "request": {
  26261. "type": "object",
  26262. "properties": {
  26263. "headers": {
  26264. "type": "object",
  26265. "additionalProperties": {
  26266. "type": "string"
  26267. }
  26268. },
  26269. "body": {
  26270. "type": "object"
  26271. }
  26272. },
  26273. "required": ["headers", "body"],
  26274. "additionalProperties": false
  26275. }
  26276. },
  26277. "required": ["id", "name", "enabled", "env", "api", "request"],
  26278. "additionalProperties": false
  26279. },
  26280. "ConnectorWhen": {
  26281. "type": "object",
  26282. "properties": {
  26283. "key": {
  26284. "type": "string"
  26285. },
  26286. "op": {
  26287. "type": "string",
  26288. "enum": ["eq", "neq"]
  26289. },
  26290. "value": {
  26291. "type": "string"
  26292. }
  26293. },
  26294. "required": ["key", "op", "value"],
  26295. "additionalProperties": false
  26296. },
  26297. "ConnectorTextPrompt": {
  26298. "type": "object",
  26299. "properties": {
  26300. "type": {
  26301. "type": "string",
  26302. "enum": ["text"]
  26303. },
  26304. "key": {
  26305. "type": "string"
  26306. },
  26307. "message": {
  26308. "type": "string"
  26309. },
  26310. "placeholder": {
  26311. "type": "string"
  26312. },
  26313. "when": {
  26314. "$ref": "#/components/schemas/ConnectorWhen"
  26315. }
  26316. },
  26317. "required": ["type", "key", "message"],
  26318. "additionalProperties": false
  26319. },
  26320. "ConnectorSelectPrompt": {
  26321. "type": "object",
  26322. "properties": {
  26323. "type": {
  26324. "type": "string",
  26325. "enum": ["select"]
  26326. },
  26327. "key": {
  26328. "type": "string"
  26329. },
  26330. "message": {
  26331. "type": "string"
  26332. },
  26333. "options": {
  26334. "type": "array",
  26335. "items": {
  26336. "type": "object",
  26337. "properties": {
  26338. "label": {
  26339. "type": "string"
  26340. },
  26341. "value": {
  26342. "type": "string"
  26343. },
  26344. "hint": {
  26345. "type": "string"
  26346. }
  26347. },
  26348. "required": ["label", "value"],
  26349. "additionalProperties": false
  26350. }
  26351. },
  26352. "when": {
  26353. "$ref": "#/components/schemas/ConnectorWhen"
  26354. }
  26355. },
  26356. "required": ["type", "key", "message", "options"],
  26357. "additionalProperties": false
  26358. },
  26359. "ConnectorOAuthMethod": {
  26360. "type": "object",
  26361. "properties": {
  26362. "id": {
  26363. "type": "string"
  26364. },
  26365. "type": {
  26366. "type": "string",
  26367. "enum": ["oauth"]
  26368. },
  26369. "label": {
  26370. "type": "string"
  26371. },
  26372. "prompts": {
  26373. "type": "array",
  26374. "items": {
  26375. "anyOf": [
  26376. {
  26377. "$ref": "#/components/schemas/ConnectorTextPrompt"
  26378. },
  26379. {
  26380. "$ref": "#/components/schemas/ConnectorSelectPrompt"
  26381. }
  26382. ]
  26383. }
  26384. }
  26385. },
  26386. "required": ["id", "type", "label"],
  26387. "additionalProperties": false
  26388. },
  26389. "ConnectorKeyMethod": {
  26390. "type": "object",
  26391. "properties": {
  26392. "id": {
  26393. "type": "string"
  26394. },
  26395. "type": {
  26396. "type": "string",
  26397. "enum": ["key"]
  26398. },
  26399. "label": {
  26400. "type": "string"
  26401. },
  26402. "prompts": {
  26403. "type": "array",
  26404. "items": {
  26405. "anyOf": [
  26406. {
  26407. "$ref": "#/components/schemas/ConnectorTextPrompt"
  26408. },
  26409. {
  26410. "$ref": "#/components/schemas/ConnectorSelectPrompt"
  26411. }
  26412. ]
  26413. }
  26414. }
  26415. },
  26416. "required": ["id", "type", "label"],
  26417. "additionalProperties": false
  26418. },
  26419. "ConnectorInfo": {
  26420. "type": "object",
  26421. "properties": {
  26422. "id": {
  26423. "type": "string"
  26424. },
  26425. "name": {
  26426. "type": "string"
  26427. },
  26428. "methods": {
  26429. "type": "array",
  26430. "items": {
  26431. "anyOf": [
  26432. {
  26433. "$ref": "#/components/schemas/ConnectorOAuthMethod"
  26434. },
  26435. {
  26436. "$ref": "#/components/schemas/ConnectorKeyMethod"
  26437. }
  26438. ]
  26439. }
  26440. }
  26441. },
  26442. "required": ["id", "name", "methods"],
  26443. "additionalProperties": false
  26444. },
  26445. "ConnectorAttempt": {
  26446. "type": "object",
  26447. "properties": {
  26448. "attemptID": {
  26449. "type": "string"
  26450. },
  26451. "url": {
  26452. "type": "string"
  26453. },
  26454. "instructions": {
  26455. "type": "string"
  26456. },
  26457. "mode": {
  26458. "type": "string",
  26459. "enum": ["auto", "code"]
  26460. },
  26461. "time": {
  26462. "type": "object",
  26463. "properties": {
  26464. "created": {
  26465. "anyOf": [
  26466. {
  26467. "type": "number"
  26468. },
  26469. {
  26470. "type": "string",
  26471. "enum": ["NaN"]
  26472. },
  26473. {
  26474. "type": "string",
  26475. "enum": ["Infinity"]
  26476. },
  26477. {
  26478. "type": "string",
  26479. "enum": ["-Infinity"]
  26480. },
  26481. {
  26482. "type": "string",
  26483. "enum": ["Infinity", "-Infinity", "NaN"]
  26484. }
  26485. ]
  26486. },
  26487. "expires": {
  26488. "anyOf": [
  26489. {
  26490. "type": "number"
  26491. },
  26492. {
  26493. "type": "string",
  26494. "enum": ["NaN"]
  26495. },
  26496. {
  26497. "type": "string",
  26498. "enum": ["Infinity"]
  26499. },
  26500. {
  26501. "type": "string",
  26502. "enum": ["-Infinity"]
  26503. },
  26504. {
  26505. "type": "string",
  26506. "enum": ["Infinity", "-Infinity", "NaN"]
  26507. }
  26508. ]
  26509. }
  26510. },
  26511. "required": ["created", "expires"],
  26512. "additionalProperties": false
  26513. }
  26514. },
  26515. "required": ["attemptID", "url", "instructions", "mode", "time"],
  26516. "additionalProperties": false
  26517. },
  26518. "PermissionV2Request": {
  26519. "type": "object",
  26520. "properties": {
  26521. "id": {
  26522. "type": "string",
  26523. "pattern": "^per"
  26524. },
  26525. "sessionID": {
  26526. "type": "string",
  26527. "pattern": "^ses"
  26528. },
  26529. "action": {
  26530. "type": "string"
  26531. },
  26532. "resources": {
  26533. "type": "array",
  26534. "items": {
  26535. "type": "string"
  26536. }
  26537. },
  26538. "save": {
  26539. "type": "array",
  26540. "items": {
  26541. "type": "string"
  26542. }
  26543. },
  26544. "metadata": {
  26545. "type": "object"
  26546. },
  26547. "source": {
  26548. "$ref": "#/components/schemas/PermissionV2Source"
  26549. }
  26550. },
  26551. "required": ["id", "sessionID", "action", "resources"],
  26552. "additionalProperties": false
  26553. },
  26554. "PermissionSavedInfo": {
  26555. "type": "object",
  26556. "properties": {
  26557. "id": {
  26558. "type": "string"
  26559. },
  26560. "projectID": {
  26561. "type": "string"
  26562. },
  26563. "action": {
  26564. "type": "string"
  26565. },
  26566. "resource": {
  26567. "type": "string"
  26568. }
  26569. },
  26570. "required": ["id", "projectID", "action", "resource"],
  26571. "additionalProperties": false
  26572. },
  26573. "FileSystemEntry": {
  26574. "type": "object",
  26575. "properties": {
  26576. "path": {
  26577. "type": "string"
  26578. },
  26579. "type": {
  26580. "type": "string",
  26581. "enum": ["file", "directory"]
  26582. },
  26583. "mime": {
  26584. "type": "string"
  26585. }
  26586. },
  26587. "required": ["path", "type", "mime"],
  26588. "additionalProperties": false
  26589. },
  26590. "CommandV2Info": {
  26591. "type": "object",
  26592. "properties": {
  26593. "name": {
  26594. "type": "string"
  26595. },
  26596. "template": {
  26597. "type": "string"
  26598. },
  26599. "description": {
  26600. "type": "string"
  26601. },
  26602. "agent": {
  26603. "type": "string"
  26604. },
  26605. "model": {
  26606. "type": "object",
  26607. "properties": {
  26608. "id": {
  26609. "type": "string"
  26610. },
  26611. "providerID": {
  26612. "type": "string"
  26613. },
  26614. "variant": {
  26615. "type": "string"
  26616. }
  26617. },
  26618. "required": ["id", "providerID"],
  26619. "additionalProperties": false
  26620. },
  26621. "subtask": {
  26622. "type": "boolean"
  26623. }
  26624. },
  26625. "required": ["name", "template"],
  26626. "additionalProperties": false
  26627. },
  26628. "SkillV2Info": {
  26629. "type": "object",
  26630. "properties": {
  26631. "name": {
  26632. "type": "string"
  26633. },
  26634. "description": {
  26635. "type": "string"
  26636. },
  26637. "slash": {
  26638. "type": "boolean"
  26639. },
  26640. "location": {
  26641. "type": "string"
  26642. },
  26643. "content": {
  26644. "type": "string"
  26645. }
  26646. },
  26647. "required": ["name", "location", "content"],
  26648. "additionalProperties": false
  26649. },
  26650. "QuestionV2Request": {
  26651. "type": "object",
  26652. "properties": {
  26653. "id": {
  26654. "type": "string",
  26655. "pattern": "^que"
  26656. },
  26657. "sessionID": {
  26658. "type": "string",
  26659. "pattern": "^ses"
  26660. },
  26661. "questions": {
  26662. "type": "array",
  26663. "items": {
  26664. "$ref": "#/components/schemas/QuestionV2Info"
  26665. },
  26666. "description": "Questions to ask"
  26667. },
  26668. "tool": {
  26669. "$ref": "#/components/schemas/QuestionV2Tool"
  26670. }
  26671. },
  26672. "required": ["id", "sessionID", "questions"],
  26673. "additionalProperties": false
  26674. },
  26675. "QuestionV2Reply": {
  26676. "type": "object",
  26677. "properties": {
  26678. "answers": {
  26679. "type": "array",
  26680. "items": {
  26681. "$ref": "#/components/schemas/QuestionV2Answer"
  26682. },
  26683. "description": "User answers in order of questions (each answer is an array of selected labels)"
  26684. }
  26685. },
  26686. "required": ["answers"],
  26687. "additionalProperties": false
  26688. },
  26689. "ReferenceLocalSource": {
  26690. "type": "object",
  26691. "properties": {
  26692. "type": {
  26693. "type": "string",
  26694. "enum": ["local"]
  26695. },
  26696. "path": {
  26697. "type": "string"
  26698. },
  26699. "description": {
  26700. "type": "string"
  26701. },
  26702. "hidden": {
  26703. "type": "boolean"
  26704. }
  26705. },
  26706. "required": ["type", "path"],
  26707. "additionalProperties": false
  26708. },
  26709. "ReferenceGitSource": {
  26710. "type": "object",
  26711. "properties": {
  26712. "type": {
  26713. "type": "string",
  26714. "enum": ["git"]
  26715. },
  26716. "repository": {
  26717. "type": "string"
  26718. },
  26719. "branch": {
  26720. "type": "string"
  26721. },
  26722. "description": {
  26723. "type": "string"
  26724. },
  26725. "hidden": {
  26726. "type": "boolean"
  26727. }
  26728. },
  26729. "required": ["type", "repository"],
  26730. "additionalProperties": false
  26731. },
  26732. "ReferenceInfo": {
  26733. "type": "object",
  26734. "properties": {
  26735. "name": {
  26736. "type": "string"
  26737. },
  26738. "path": {
  26739. "type": "string"
  26740. },
  26741. "description": {
  26742. "type": "string"
  26743. },
  26744. "hidden": {
  26745. "type": "boolean"
  26746. },
  26747. "source": {
  26748. "anyOf": [
  26749. {
  26750. "$ref": "#/components/schemas/ReferenceLocalSource"
  26751. },
  26752. {
  26753. "$ref": "#/components/schemas/ReferenceGitSource"
  26754. }
  26755. ]
  26756. }
  26757. },
  26758. "required": ["name", "path", "source"],
  26759. "additionalProperties": false
  26760. },
  26761. "EventModels-devRefreshed": {
  26762. "type": "object",
  26763. "properties": {
  26764. "id": {
  26765. "type": "string",
  26766. "pattern": "^evt_"
  26767. },
  26768. "type": {
  26769. "type": "string",
  26770. "enum": ["models-dev.refreshed"]
  26771. },
  26772. "properties": {
  26773. "type": "object",
  26774. "properties": {}
  26775. }
  26776. },
  26777. "required": ["id", "type", "properties"],
  26778. "additionalProperties": false
  26779. },
  26780. "EventCredentialAdded": {
  26781. "type": "object",
  26782. "properties": {
  26783. "id": {
  26784. "type": "string",
  26785. "pattern": "^evt_"
  26786. },
  26787. "type": {
  26788. "type": "string",
  26789. "enum": ["credential.added"]
  26790. },
  26791. "properties": {
  26792. "type": "object",
  26793. "properties": {
  26794. "credential": {
  26795. "$ref": "#/components/schemas/CredentialInfo"
  26796. }
  26797. },
  26798. "required": ["credential"],
  26799. "additionalProperties": false
  26800. }
  26801. },
  26802. "required": ["id", "type", "properties"],
  26803. "additionalProperties": false
  26804. },
  26805. "EventCredentialRemoved": {
  26806. "type": "object",
  26807. "properties": {
  26808. "id": {
  26809. "type": "string",
  26810. "pattern": "^evt_"
  26811. },
  26812. "type": {
  26813. "type": "string",
  26814. "enum": ["credential.removed"]
  26815. },
  26816. "properties": {
  26817. "type": "object",
  26818. "properties": {
  26819. "credential": {
  26820. "$ref": "#/components/schemas/CredentialInfo"
  26821. }
  26822. },
  26823. "required": ["credential"],
  26824. "additionalProperties": false
  26825. }
  26826. },
  26827. "required": ["id", "type", "properties"],
  26828. "additionalProperties": false
  26829. },
  26830. "EventCredentialSwitched": {
  26831. "type": "object",
  26832. "properties": {
  26833. "id": {
  26834. "type": "string",
  26835. "pattern": "^evt_"
  26836. },
  26837. "type": {
  26838. "type": "string",
  26839. "enum": ["credential.switched"]
  26840. },
  26841. "properties": {
  26842. "type": "object",
  26843. "properties": {
  26844. "connectorID": {
  26845. "type": "string"
  26846. },
  26847. "from": {
  26848. "type": "string"
  26849. },
  26850. "to": {
  26851. "type": "string"
  26852. }
  26853. },
  26854. "required": ["connectorID"],
  26855. "additionalProperties": false
  26856. }
  26857. },
  26858. "required": ["id", "type", "properties"],
  26859. "additionalProperties": false
  26860. },
  26861. "EventPluginAdded": {
  26862. "type": "object",
  26863. "properties": {
  26864. "id": {
  26865. "type": "string",
  26866. "pattern": "^evt_"
  26867. },
  26868. "type": {
  26869. "type": "string",
  26870. "enum": ["plugin.added"]
  26871. },
  26872. "properties": {
  26873. "type": "object",
  26874. "properties": {
  26875. "id": {
  26876. "type": "string"
  26877. }
  26878. },
  26879. "required": ["id"],
  26880. "additionalProperties": false
  26881. }
  26882. },
  26883. "required": ["id", "type", "properties"],
  26884. "additionalProperties": false
  26885. },
  26886. "ModelV2Info1": {
  26887. "type": "object",
  26888. "properties": {
  26889. "id": {
  26890. "type": "string"
  26891. },
  26892. "providerID": {
  26893. "type": "string"
  26894. },
  26895. "family": {
  26896. "type": "string"
  26897. },
  26898. "name": {
  26899. "type": "string"
  26900. },
  26901. "api": {
  26902. "anyOf": [
  26903. {
  26904. "type": "object",
  26905. "properties": {
  26906. "id": {
  26907. "type": "string"
  26908. },
  26909. "type": {
  26910. "type": "string",
  26911. "enum": ["aisdk"]
  26912. },
  26913. "package": {
  26914. "type": "string"
  26915. },
  26916. "url": {
  26917. "type": "string"
  26918. },
  26919. "settings": {
  26920. "type": "object"
  26921. }
  26922. },
  26923. "required": ["id", "type", "package"],
  26924. "additionalProperties": false
  26925. },
  26926. {
  26927. "type": "object",
  26928. "properties": {
  26929. "id": {
  26930. "type": "string"
  26931. },
  26932. "type": {
  26933. "type": "string",
  26934. "enum": ["native"]
  26935. },
  26936. "url": {
  26937. "type": "string"
  26938. },
  26939. "settings": {
  26940. "type": "object"
  26941. }
  26942. },
  26943. "required": ["id", "type", "settings"],
  26944. "additionalProperties": false
  26945. }
  26946. ]
  26947. },
  26948. "capabilities": {
  26949. "type": "object",
  26950. "properties": {
  26951. "tools": {
  26952. "type": "boolean"
  26953. },
  26954. "input": {
  26955. "type": "array",
  26956. "items": {
  26957. "type": "string"
  26958. }
  26959. },
  26960. "output": {
  26961. "type": "array",
  26962. "items": {
  26963. "type": "string"
  26964. }
  26965. }
  26966. },
  26967. "required": ["tools", "input", "output"],
  26968. "additionalProperties": false
  26969. },
  26970. "request": {
  26971. "type": "object",
  26972. "properties": {
  26973. "headers": {
  26974. "type": "object",
  26975. "additionalProperties": {
  26976. "type": "string"
  26977. }
  26978. },
  26979. "body": {
  26980. "type": "object"
  26981. },
  26982. "generation": {
  26983. "type": "object",
  26984. "properties": {
  26985. "maxTokens": {
  26986. "anyOf": [
  26987. {
  26988. "type": "number"
  26989. },
  26990. {
  26991. "type": "string",
  26992. "enum": ["NaN"]
  26993. },
  26994. {
  26995. "type": "string",
  26996. "enum": ["Infinity"]
  26997. },
  26998. {
  26999. "type": "string",
  27000. "enum": ["-Infinity"]
  27001. }
  27002. ]
  27003. },
  27004. "temperature": {
  27005. "anyOf": [
  27006. {
  27007. "type": "number"
  27008. },
  27009. {
  27010. "type": "string",
  27011. "enum": ["NaN"]
  27012. },
  27013. {
  27014. "type": "string",
  27015. "enum": ["Infinity"]
  27016. },
  27017. {
  27018. "type": "string",
  27019. "enum": ["-Infinity"]
  27020. }
  27021. ]
  27022. },
  27023. "topP": {
  27024. "anyOf": [
  27025. {
  27026. "type": "number"
  27027. },
  27028. {
  27029. "type": "string",
  27030. "enum": ["NaN"]
  27031. },
  27032. {
  27033. "type": "string",
  27034. "enum": ["Infinity"]
  27035. },
  27036. {
  27037. "type": "string",
  27038. "enum": ["-Infinity"]
  27039. }
  27040. ]
  27041. },
  27042. "topK": {
  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. },
  27061. "frequencyPenalty": {
  27062. "anyOf": [
  27063. {
  27064. "type": "number"
  27065. },
  27066. {
  27067. "type": "string",
  27068. "enum": ["NaN"]
  27069. },
  27070. {
  27071. "type": "string",
  27072. "enum": ["Infinity"]
  27073. },
  27074. {
  27075. "type": "string",
  27076. "enum": ["-Infinity"]
  27077. }
  27078. ]
  27079. },
  27080. "presencePenalty": {
  27081. "anyOf": [
  27082. {
  27083. "type": "number"
  27084. },
  27085. {
  27086. "type": "string",
  27087. "enum": ["NaN"]
  27088. },
  27089. {
  27090. "type": "string",
  27091. "enum": ["Infinity"]
  27092. },
  27093. {
  27094. "type": "string",
  27095. "enum": ["-Infinity"]
  27096. }
  27097. ]
  27098. },
  27099. "seed": {
  27100. "anyOf": [
  27101. {
  27102. "type": "number"
  27103. },
  27104. {
  27105. "type": "string",
  27106. "enum": ["NaN"]
  27107. },
  27108. {
  27109. "type": "string",
  27110. "enum": ["Infinity"]
  27111. },
  27112. {
  27113. "type": "string",
  27114. "enum": ["-Infinity"]
  27115. }
  27116. ]
  27117. },
  27118. "stop": {
  27119. "type": "array",
  27120. "items": {
  27121. "type": "string"
  27122. }
  27123. }
  27124. },
  27125. "additionalProperties": false
  27126. },
  27127. "options": {
  27128. "type": "object"
  27129. },
  27130. "variant": {
  27131. "type": "string"
  27132. }
  27133. },
  27134. "required": ["headers", "body"],
  27135. "additionalProperties": false
  27136. },
  27137. "variants": {
  27138. "type": "array",
  27139. "items": {
  27140. "type": "object",
  27141. "properties": {
  27142. "id": {
  27143. "type": "string"
  27144. },
  27145. "headers": {
  27146. "type": "object",
  27147. "additionalProperties": {
  27148. "type": "string"
  27149. }
  27150. },
  27151. "body": {
  27152. "type": "object"
  27153. },
  27154. "generation": {
  27155. "type": "object",
  27156. "properties": {
  27157. "maxTokens": {
  27158. "anyOf": [
  27159. {
  27160. "type": "number"
  27161. },
  27162. {
  27163. "type": "string",
  27164. "enum": ["NaN"]
  27165. },
  27166. {
  27167. "type": "string",
  27168. "enum": ["Infinity"]
  27169. },
  27170. {
  27171. "type": "string",
  27172. "enum": ["-Infinity"]
  27173. }
  27174. ]
  27175. },
  27176. "temperature": {
  27177. "anyOf": [
  27178. {
  27179. "type": "number"
  27180. },
  27181. {
  27182. "type": "string",
  27183. "enum": ["NaN"]
  27184. },
  27185. {
  27186. "type": "string",
  27187. "enum": ["Infinity"]
  27188. },
  27189. {
  27190. "type": "string",
  27191. "enum": ["-Infinity"]
  27192. }
  27193. ]
  27194. },
  27195. "topP": {
  27196. "anyOf": [
  27197. {
  27198. "type": "number"
  27199. },
  27200. {
  27201. "type": "string",
  27202. "enum": ["NaN"]
  27203. },
  27204. {
  27205. "type": "string",
  27206. "enum": ["Infinity"]
  27207. },
  27208. {
  27209. "type": "string",
  27210. "enum": ["-Infinity"]
  27211. }
  27212. ]
  27213. },
  27214. "topK": {
  27215. "anyOf": [
  27216. {
  27217. "type": "number"
  27218. },
  27219. {
  27220. "type": "string",
  27221. "enum": ["NaN"]
  27222. },
  27223. {
  27224. "type": "string",
  27225. "enum": ["Infinity"]
  27226. },
  27227. {
  27228. "type": "string",
  27229. "enum": ["-Infinity"]
  27230. }
  27231. ]
  27232. },
  27233. "frequencyPenalty": {
  27234. "anyOf": [
  27235. {
  27236. "type": "number"
  27237. },
  27238. {
  27239. "type": "string",
  27240. "enum": ["NaN"]
  27241. },
  27242. {
  27243. "type": "string",
  27244. "enum": ["Infinity"]
  27245. },
  27246. {
  27247. "type": "string",
  27248. "enum": ["-Infinity"]
  27249. }
  27250. ]
  27251. },
  27252. "presencePenalty": {
  27253. "anyOf": [
  27254. {
  27255. "type": "number"
  27256. },
  27257. {
  27258. "type": "string",
  27259. "enum": ["NaN"]
  27260. },
  27261. {
  27262. "type": "string",
  27263. "enum": ["Infinity"]
  27264. },
  27265. {
  27266. "type": "string",
  27267. "enum": ["-Infinity"]
  27268. }
  27269. ]
  27270. },
  27271. "seed": {
  27272. "anyOf": [
  27273. {
  27274. "type": "number"
  27275. },
  27276. {
  27277. "type": "string",
  27278. "enum": ["NaN"]
  27279. },
  27280. {
  27281. "type": "string",
  27282. "enum": ["Infinity"]
  27283. },
  27284. {
  27285. "type": "string",
  27286. "enum": ["-Infinity"]
  27287. }
  27288. ]
  27289. },
  27290. "stop": {
  27291. "type": "array",
  27292. "items": {
  27293. "type": "string"
  27294. }
  27295. }
  27296. },
  27297. "additionalProperties": false
  27298. },
  27299. "options": {
  27300. "type": "object"
  27301. }
  27302. },
  27303. "required": ["id", "headers", "body"],
  27304. "additionalProperties": false
  27305. }
  27306. },
  27307. "time": {
  27308. "type": "object",
  27309. "properties": {
  27310. "released": {
  27311. "anyOf": [
  27312. {
  27313. "type": "number"
  27314. },
  27315. {
  27316. "type": "string",
  27317. "enum": ["NaN"]
  27318. },
  27319. {
  27320. "type": "string",
  27321. "enum": ["Infinity"]
  27322. },
  27323. {
  27324. "type": "string",
  27325. "enum": ["-Infinity"]
  27326. }
  27327. ]
  27328. }
  27329. },
  27330. "required": ["released"],
  27331. "additionalProperties": false
  27332. },
  27333. "cost": {
  27334. "type": "array",
  27335. "items": {
  27336. "type": "object",
  27337. "properties": {
  27338. "tier": {
  27339. "type": "object",
  27340. "properties": {
  27341. "type": {
  27342. "type": "string",
  27343. "enum": ["context"]
  27344. },
  27345. "size": {
  27346. "type": "integer"
  27347. }
  27348. },
  27349. "required": ["type", "size"],
  27350. "additionalProperties": false
  27351. },
  27352. "input": {
  27353. "type": "number"
  27354. },
  27355. "output": {
  27356. "type": "number"
  27357. },
  27358. "cache": {
  27359. "type": "object",
  27360. "properties": {
  27361. "read": {
  27362. "type": "number"
  27363. },
  27364. "write": {
  27365. "type": "number"
  27366. }
  27367. },
  27368. "required": ["read", "write"],
  27369. "additionalProperties": false
  27370. }
  27371. },
  27372. "required": ["input", "output", "cache"],
  27373. "additionalProperties": false
  27374. }
  27375. },
  27376. "status": {
  27377. "type": "string",
  27378. "enum": ["alpha", "beta", "deprecated", "active"]
  27379. },
  27380. "enabled": {
  27381. "type": "boolean"
  27382. },
  27383. "limit": {
  27384. "type": "object",
  27385. "properties": {
  27386. "context": {
  27387. "type": "integer"
  27388. },
  27389. "input": {
  27390. "type": "integer"
  27391. },
  27392. "output": {
  27393. "type": "integer"
  27394. }
  27395. },
  27396. "required": ["context", "output"],
  27397. "additionalProperties": false
  27398. }
  27399. },
  27400. "required": [
  27401. "id",
  27402. "providerID",
  27403. "name",
  27404. "api",
  27405. "capabilities",
  27406. "request",
  27407. "variants",
  27408. "time",
  27409. "cost",
  27410. "status",
  27411. "enabled",
  27412. "limit"
  27413. ],
  27414. "additionalProperties": false
  27415. },
  27416. "EventCatalogModelUpdated": {
  27417. "type": "object",
  27418. "properties": {
  27419. "id": {
  27420. "type": "string",
  27421. "pattern": "^evt_"
  27422. },
  27423. "type": {
  27424. "type": "string",
  27425. "enum": ["catalog.model.updated"]
  27426. },
  27427. "properties": {
  27428. "type": "object",
  27429. "properties": {
  27430. "model": {
  27431. "$ref": "#/components/schemas/ModelV2Info1"
  27432. }
  27433. },
  27434. "required": ["model"],
  27435. "additionalProperties": false
  27436. }
  27437. },
  27438. "required": ["id", "type", "properties"],
  27439. "additionalProperties": false
  27440. },
  27441. "EventSessionCreated": {
  27442. "type": "object",
  27443. "properties": {
  27444. "id": {
  27445. "type": "string",
  27446. "pattern": "^evt_"
  27447. },
  27448. "type": {
  27449. "type": "string",
  27450. "enum": ["session.created"]
  27451. },
  27452. "properties": {
  27453. "type": "object",
  27454. "properties": {
  27455. "sessionID": {
  27456. "type": "string",
  27457. "pattern": "^ses"
  27458. },
  27459. "info": {
  27460. "$ref": "#/components/schemas/Session"
  27461. }
  27462. },
  27463. "required": ["sessionID", "info"],
  27464. "additionalProperties": false
  27465. }
  27466. },
  27467. "required": ["id", "type", "properties"],
  27468. "additionalProperties": false
  27469. },
  27470. "EventSessionUpdated": {
  27471. "type": "object",
  27472. "properties": {
  27473. "id": {
  27474. "type": "string",
  27475. "pattern": "^evt_"
  27476. },
  27477. "type": {
  27478. "type": "string",
  27479. "enum": ["session.updated"]
  27480. },
  27481. "properties": {
  27482. "type": "object",
  27483. "properties": {
  27484. "sessionID": {
  27485. "type": "string",
  27486. "pattern": "^ses"
  27487. },
  27488. "info": {
  27489. "$ref": "#/components/schemas/Session"
  27490. }
  27491. },
  27492. "required": ["sessionID", "info"],
  27493. "additionalProperties": false
  27494. }
  27495. },
  27496. "required": ["id", "type", "properties"],
  27497. "additionalProperties": false
  27498. },
  27499. "EventSessionDeleted": {
  27500. "type": "object",
  27501. "properties": {
  27502. "id": {
  27503. "type": "string",
  27504. "pattern": "^evt_"
  27505. },
  27506. "type": {
  27507. "type": "string",
  27508. "enum": ["session.deleted"]
  27509. },
  27510. "properties": {
  27511. "type": "object",
  27512. "properties": {
  27513. "sessionID": {
  27514. "type": "string",
  27515. "pattern": "^ses"
  27516. },
  27517. "info": {
  27518. "$ref": "#/components/schemas/Session"
  27519. }
  27520. },
  27521. "required": ["sessionID", "info"],
  27522. "additionalProperties": false
  27523. }
  27524. },
  27525. "required": ["id", "type", "properties"],
  27526. "additionalProperties": false
  27527. },
  27528. "EventMessageUpdated": {
  27529. "type": "object",
  27530. "properties": {
  27531. "id": {
  27532. "type": "string",
  27533. "pattern": "^evt_"
  27534. },
  27535. "type": {
  27536. "type": "string",
  27537. "enum": ["message.updated"]
  27538. },
  27539. "properties": {
  27540. "type": "object",
  27541. "properties": {
  27542. "sessionID": {
  27543. "type": "string",
  27544. "pattern": "^ses"
  27545. },
  27546. "info": {
  27547. "$ref": "#/components/schemas/Message"
  27548. }
  27549. },
  27550. "required": ["sessionID", "info"],
  27551. "additionalProperties": false
  27552. }
  27553. },
  27554. "required": ["id", "type", "properties"],
  27555. "additionalProperties": false
  27556. },
  27557. "EventMessageRemoved": {
  27558. "type": "object",
  27559. "properties": {
  27560. "id": {
  27561. "type": "string",
  27562. "pattern": "^evt_"
  27563. },
  27564. "type": {
  27565. "type": "string",
  27566. "enum": ["message.removed"]
  27567. },
  27568. "properties": {
  27569. "type": "object",
  27570. "properties": {
  27571. "sessionID": {
  27572. "type": "string",
  27573. "pattern": "^ses"
  27574. },
  27575. "messageID": {
  27576. "type": "string",
  27577. "pattern": "^msg"
  27578. }
  27579. },
  27580. "required": ["sessionID", "messageID"],
  27581. "additionalProperties": false
  27582. }
  27583. },
  27584. "required": ["id", "type", "properties"],
  27585. "additionalProperties": false
  27586. },
  27587. "EventMessagePartUpdated": {
  27588. "type": "object",
  27589. "properties": {
  27590. "id": {
  27591. "type": "string",
  27592. "pattern": "^evt_"
  27593. },
  27594. "type": {
  27595. "type": "string",
  27596. "enum": ["message.part.updated"]
  27597. },
  27598. "properties": {
  27599. "type": "object",
  27600. "properties": {
  27601. "sessionID": {
  27602. "type": "string",
  27603. "pattern": "^ses"
  27604. },
  27605. "part": {
  27606. "$ref": "#/components/schemas/Part"
  27607. },
  27608. "time": {
  27609. "type": "number"
  27610. }
  27611. },
  27612. "required": ["sessionID", "part", "time"],
  27613. "additionalProperties": false
  27614. }
  27615. },
  27616. "required": ["id", "type", "properties"],
  27617. "additionalProperties": false
  27618. },
  27619. "EventMessagePartRemoved": {
  27620. "type": "object",
  27621. "properties": {
  27622. "id": {
  27623. "type": "string",
  27624. "pattern": "^evt_"
  27625. },
  27626. "type": {
  27627. "type": "string",
  27628. "enum": ["message.part.removed"]
  27629. },
  27630. "properties": {
  27631. "type": "object",
  27632. "properties": {
  27633. "sessionID": {
  27634. "type": "string",
  27635. "pattern": "^ses"
  27636. },
  27637. "messageID": {
  27638. "type": "string",
  27639. "pattern": "^msg"
  27640. },
  27641. "partID": {
  27642. "type": "string",
  27643. "pattern": "^prt"
  27644. }
  27645. },
  27646. "required": ["sessionID", "messageID", "partID"],
  27647. "additionalProperties": false
  27648. }
  27649. },
  27650. "required": ["id", "type", "properties"],
  27651. "additionalProperties": false
  27652. },
  27653. "EventSessionNextAgentSwitched": {
  27654. "type": "object",
  27655. "properties": {
  27656. "id": {
  27657. "type": "string",
  27658. "pattern": "^evt_"
  27659. },
  27660. "type": {
  27661. "type": "string",
  27662. "enum": ["session.next.agent.switched"]
  27663. },
  27664. "properties": {
  27665. "type": "object",
  27666. "properties": {
  27667. "timestamp": {
  27668. "type": "number"
  27669. },
  27670. "sessionID": {
  27671. "type": "string",
  27672. "pattern": "^ses"
  27673. },
  27674. "messageID": {
  27675. "type": "string",
  27676. "pattern": "^msg_"
  27677. },
  27678. "agent": {
  27679. "type": "string"
  27680. }
  27681. },
  27682. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27683. "additionalProperties": false
  27684. }
  27685. },
  27686. "required": ["id", "type", "properties"],
  27687. "additionalProperties": false
  27688. },
  27689. "EventSessionNextModelSwitched": {
  27690. "type": "object",
  27691. "properties": {
  27692. "id": {
  27693. "type": "string",
  27694. "pattern": "^evt_"
  27695. },
  27696. "type": {
  27697. "type": "string",
  27698. "enum": ["session.next.model.switched"]
  27699. },
  27700. "properties": {
  27701. "type": "object",
  27702. "properties": {
  27703. "timestamp": {
  27704. "type": "number"
  27705. },
  27706. "sessionID": {
  27707. "type": "string",
  27708. "pattern": "^ses"
  27709. },
  27710. "messageID": {
  27711. "type": "string",
  27712. "pattern": "^msg_"
  27713. },
  27714. "model": {
  27715. "type": "object",
  27716. "properties": {
  27717. "id": {
  27718. "type": "string"
  27719. },
  27720. "providerID": {
  27721. "type": "string"
  27722. },
  27723. "variant": {
  27724. "type": "string"
  27725. }
  27726. },
  27727. "required": ["id", "providerID"],
  27728. "additionalProperties": false
  27729. }
  27730. },
  27731. "required": ["timestamp", "sessionID", "messageID", "model"],
  27732. "additionalProperties": false
  27733. }
  27734. },
  27735. "required": ["id", "type", "properties"],
  27736. "additionalProperties": false
  27737. },
  27738. "EventSessionNextMoved": {
  27739. "type": "object",
  27740. "properties": {
  27741. "id": {
  27742. "type": "string",
  27743. "pattern": "^evt_"
  27744. },
  27745. "type": {
  27746. "type": "string",
  27747. "enum": ["session.next.moved"]
  27748. },
  27749. "properties": {
  27750. "type": "object",
  27751. "properties": {
  27752. "timestamp": {
  27753. "type": "number"
  27754. },
  27755. "sessionID": {
  27756. "type": "string",
  27757. "pattern": "^ses"
  27758. },
  27759. "location": {
  27760. "$ref": "#/components/schemas/LocationRef"
  27761. },
  27762. "subdirectory": {
  27763. "type": "string"
  27764. }
  27765. },
  27766. "required": ["timestamp", "sessionID", "location"],
  27767. "additionalProperties": false
  27768. }
  27769. },
  27770. "required": ["id", "type", "properties"],
  27771. "additionalProperties": false
  27772. },
  27773. "EventSessionNextPrompted": {
  27774. "type": "object",
  27775. "properties": {
  27776. "id": {
  27777. "type": "string",
  27778. "pattern": "^evt_"
  27779. },
  27780. "type": {
  27781. "type": "string",
  27782. "enum": ["session.next.prompted"]
  27783. },
  27784. "properties": {
  27785. "type": "object",
  27786. "properties": {
  27787. "timestamp": {
  27788. "type": "number"
  27789. },
  27790. "sessionID": {
  27791. "type": "string",
  27792. "pattern": "^ses"
  27793. },
  27794. "messageID": {
  27795. "type": "string",
  27796. "pattern": "^msg_"
  27797. },
  27798. "prompt": {
  27799. "$ref": "#/components/schemas/Prompt"
  27800. },
  27801. "delivery": {
  27802. "type": "string",
  27803. "enum": ["steer", "queue"]
  27804. }
  27805. },
  27806. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27807. "additionalProperties": false
  27808. }
  27809. },
  27810. "required": ["id", "type", "properties"],
  27811. "additionalProperties": false
  27812. },
  27813. "EventSessionNextPromptAdmitted": {
  27814. "type": "object",
  27815. "properties": {
  27816. "id": {
  27817. "type": "string",
  27818. "pattern": "^evt_"
  27819. },
  27820. "type": {
  27821. "type": "string",
  27822. "enum": ["session.next.prompt.admitted"]
  27823. },
  27824. "properties": {
  27825. "type": "object",
  27826. "properties": {
  27827. "timestamp": {
  27828. "type": "number"
  27829. },
  27830. "sessionID": {
  27831. "type": "string",
  27832. "pattern": "^ses"
  27833. },
  27834. "messageID": {
  27835. "type": "string",
  27836. "pattern": "^msg_"
  27837. },
  27838. "prompt": {
  27839. "$ref": "#/components/schemas/Prompt"
  27840. },
  27841. "delivery": {
  27842. "type": "string",
  27843. "enum": ["steer", "queue"]
  27844. }
  27845. },
  27846. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27847. "additionalProperties": false
  27848. }
  27849. },
  27850. "required": ["id", "type", "properties"],
  27851. "additionalProperties": false
  27852. },
  27853. "EventSessionNextPromptPromoted": {
  27854. "type": "object",
  27855. "properties": {
  27856. "id": {
  27857. "type": "string",
  27858. "pattern": "^evt_"
  27859. },
  27860. "type": {
  27861. "type": "string",
  27862. "enum": ["session.next.prompt.promoted"]
  27863. },
  27864. "properties": {
  27865. "type": "object",
  27866. "properties": {
  27867. "timestamp": {
  27868. "type": "number"
  27869. },
  27870. "sessionID": {
  27871. "type": "string",
  27872. "pattern": "^ses"
  27873. },
  27874. "messageID": {
  27875. "type": "string",
  27876. "pattern": "^msg_"
  27877. },
  27878. "prompt": {
  27879. "$ref": "#/components/schemas/Prompt"
  27880. },
  27881. "timeCreated": {
  27882. "type": "number"
  27883. }
  27884. },
  27885. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  27886. "additionalProperties": false
  27887. }
  27888. },
  27889. "required": ["id", "type", "properties"],
  27890. "additionalProperties": false
  27891. },
  27892. "EventSessionNextInterruptRequested": {
  27893. "type": "object",
  27894. "properties": {
  27895. "id": {
  27896. "type": "string",
  27897. "pattern": "^evt_"
  27898. },
  27899. "type": {
  27900. "type": "string",
  27901. "enum": ["session.next.interrupt.requested"]
  27902. },
  27903. "properties": {
  27904. "type": "object",
  27905. "properties": {
  27906. "timestamp": {
  27907. "type": "number"
  27908. },
  27909. "sessionID": {
  27910. "type": "string",
  27911. "pattern": "^ses"
  27912. }
  27913. },
  27914. "required": ["timestamp", "sessionID"],
  27915. "additionalProperties": false
  27916. }
  27917. },
  27918. "required": ["id", "type", "properties"],
  27919. "additionalProperties": false
  27920. },
  27921. "EventSessionNextContextUpdated": {
  27922. "type": "object",
  27923. "properties": {
  27924. "id": {
  27925. "type": "string",
  27926. "pattern": "^evt_"
  27927. },
  27928. "type": {
  27929. "type": "string",
  27930. "enum": ["session.next.context.updated"]
  27931. },
  27932. "properties": {
  27933. "type": "object",
  27934. "properties": {
  27935. "timestamp": {
  27936. "type": "number"
  27937. },
  27938. "sessionID": {
  27939. "type": "string",
  27940. "pattern": "^ses"
  27941. },
  27942. "messageID": {
  27943. "type": "string",
  27944. "pattern": "^msg_"
  27945. },
  27946. "text": {
  27947. "type": "string"
  27948. }
  27949. },
  27950. "required": ["timestamp", "sessionID", "messageID", "text"],
  27951. "additionalProperties": false
  27952. }
  27953. },
  27954. "required": ["id", "type", "properties"],
  27955. "additionalProperties": false
  27956. },
  27957. "EventSessionNextSynthetic": {
  27958. "type": "object",
  27959. "properties": {
  27960. "id": {
  27961. "type": "string",
  27962. "pattern": "^evt_"
  27963. },
  27964. "type": {
  27965. "type": "string",
  27966. "enum": ["session.next.synthetic"]
  27967. },
  27968. "properties": {
  27969. "type": "object",
  27970. "properties": {
  27971. "timestamp": {
  27972. "type": "number"
  27973. },
  27974. "sessionID": {
  27975. "type": "string",
  27976. "pattern": "^ses"
  27977. },
  27978. "messageID": {
  27979. "type": "string",
  27980. "pattern": "^msg_"
  27981. },
  27982. "text": {
  27983. "type": "string"
  27984. }
  27985. },
  27986. "required": ["timestamp", "sessionID", "messageID", "text"],
  27987. "additionalProperties": false
  27988. }
  27989. },
  27990. "required": ["id", "type", "properties"],
  27991. "additionalProperties": false
  27992. },
  27993. "EventSessionNextShellStarted": {
  27994. "type": "object",
  27995. "properties": {
  27996. "id": {
  27997. "type": "string",
  27998. "pattern": "^evt_"
  27999. },
  28000. "type": {
  28001. "type": "string",
  28002. "enum": ["session.next.shell.started"]
  28003. },
  28004. "properties": {
  28005. "type": "object",
  28006. "properties": {
  28007. "timestamp": {
  28008. "type": "number"
  28009. },
  28010. "sessionID": {
  28011. "type": "string",
  28012. "pattern": "^ses"
  28013. },
  28014. "messageID": {
  28015. "type": "string",
  28016. "pattern": "^msg_"
  28017. },
  28018. "callID": {
  28019. "type": "string"
  28020. },
  28021. "command": {
  28022. "type": "string"
  28023. }
  28024. },
  28025. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28026. "additionalProperties": false
  28027. }
  28028. },
  28029. "required": ["id", "type", "properties"],
  28030. "additionalProperties": false
  28031. },
  28032. "EventSessionNextShellEnded": {
  28033. "type": "object",
  28034. "properties": {
  28035. "id": {
  28036. "type": "string",
  28037. "pattern": "^evt_"
  28038. },
  28039. "type": {
  28040. "type": "string",
  28041. "enum": ["session.next.shell.ended"]
  28042. },
  28043. "properties": {
  28044. "type": "object",
  28045. "properties": {
  28046. "timestamp": {
  28047. "type": "number"
  28048. },
  28049. "sessionID": {
  28050. "type": "string",
  28051. "pattern": "^ses"
  28052. },
  28053. "callID": {
  28054. "type": "string"
  28055. },
  28056. "output": {
  28057. "type": "string"
  28058. }
  28059. },
  28060. "required": ["timestamp", "sessionID", "callID", "output"],
  28061. "additionalProperties": false
  28062. }
  28063. },
  28064. "required": ["id", "type", "properties"],
  28065. "additionalProperties": false
  28066. },
  28067. "EventSessionNextStepStarted": {
  28068. "type": "object",
  28069. "properties": {
  28070. "id": {
  28071. "type": "string",
  28072. "pattern": "^evt_"
  28073. },
  28074. "type": {
  28075. "type": "string",
  28076. "enum": ["session.next.step.started"]
  28077. },
  28078. "properties": {
  28079. "type": "object",
  28080. "properties": {
  28081. "timestamp": {
  28082. "type": "number"
  28083. },
  28084. "sessionID": {
  28085. "type": "string",
  28086. "pattern": "^ses"
  28087. },
  28088. "assistantMessageID": {
  28089. "type": "string",
  28090. "pattern": "^msg_"
  28091. },
  28092. "agent": {
  28093. "type": "string"
  28094. },
  28095. "model": {
  28096. "type": "object",
  28097. "properties": {
  28098. "id": {
  28099. "type": "string"
  28100. },
  28101. "providerID": {
  28102. "type": "string"
  28103. },
  28104. "variant": {
  28105. "type": "string"
  28106. }
  28107. },
  28108. "required": ["id", "providerID"],
  28109. "additionalProperties": false
  28110. },
  28111. "snapshot": {
  28112. "type": "string"
  28113. }
  28114. },
  28115. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28116. "additionalProperties": false
  28117. }
  28118. },
  28119. "required": ["id", "type", "properties"],
  28120. "additionalProperties": false
  28121. },
  28122. "EventSessionNextStepEnded": {
  28123. "type": "object",
  28124. "properties": {
  28125. "id": {
  28126. "type": "string",
  28127. "pattern": "^evt_"
  28128. },
  28129. "type": {
  28130. "type": "string",
  28131. "enum": ["session.next.step.ended"]
  28132. },
  28133. "properties": {
  28134. "type": "object",
  28135. "properties": {
  28136. "timestamp": {
  28137. "type": "number"
  28138. },
  28139. "sessionID": {
  28140. "type": "string",
  28141. "pattern": "^ses"
  28142. },
  28143. "assistantMessageID": {
  28144. "type": "string",
  28145. "pattern": "^msg_"
  28146. },
  28147. "finish": {
  28148. "type": "string"
  28149. },
  28150. "cost": {
  28151. "type": "number"
  28152. },
  28153. "tokens": {
  28154. "type": "object",
  28155. "properties": {
  28156. "input": {
  28157. "type": "number"
  28158. },
  28159. "output": {
  28160. "type": "number"
  28161. },
  28162. "reasoning": {
  28163. "type": "number"
  28164. },
  28165. "cache": {
  28166. "type": "object",
  28167. "properties": {
  28168. "read": {
  28169. "type": "number"
  28170. },
  28171. "write": {
  28172. "type": "number"
  28173. }
  28174. },
  28175. "required": ["read", "write"],
  28176. "additionalProperties": false
  28177. }
  28178. },
  28179. "required": ["input", "output", "reasoning", "cache"],
  28180. "additionalProperties": false
  28181. },
  28182. "snapshot": {
  28183. "type": "string"
  28184. }
  28185. },
  28186. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28187. "additionalProperties": false
  28188. }
  28189. },
  28190. "required": ["id", "type", "properties"],
  28191. "additionalProperties": false
  28192. },
  28193. "EventSessionNextStepFailed": {
  28194. "type": "object",
  28195. "properties": {
  28196. "id": {
  28197. "type": "string",
  28198. "pattern": "^evt_"
  28199. },
  28200. "type": {
  28201. "type": "string",
  28202. "enum": ["session.next.step.failed"]
  28203. },
  28204. "properties": {
  28205. "type": "object",
  28206. "properties": {
  28207. "timestamp": {
  28208. "type": "number"
  28209. },
  28210. "sessionID": {
  28211. "type": "string",
  28212. "pattern": "^ses"
  28213. },
  28214. "assistantMessageID": {
  28215. "type": "string",
  28216. "pattern": "^msg_"
  28217. },
  28218. "error": {
  28219. "$ref": "#/components/schemas/SessionErrorUnknown"
  28220. }
  28221. },
  28222. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28223. "additionalProperties": false
  28224. }
  28225. },
  28226. "required": ["id", "type", "properties"],
  28227. "additionalProperties": false
  28228. },
  28229. "EventSessionNextTextStarted": {
  28230. "type": "object",
  28231. "properties": {
  28232. "id": {
  28233. "type": "string",
  28234. "pattern": "^evt_"
  28235. },
  28236. "type": {
  28237. "type": "string",
  28238. "enum": ["session.next.text.started"]
  28239. },
  28240. "properties": {
  28241. "type": "object",
  28242. "properties": {
  28243. "timestamp": {
  28244. "type": "number"
  28245. },
  28246. "sessionID": {
  28247. "type": "string",
  28248. "pattern": "^ses"
  28249. },
  28250. "assistantMessageID": {
  28251. "type": "string",
  28252. "pattern": "^msg_"
  28253. },
  28254. "textID": {
  28255. "type": "string"
  28256. }
  28257. },
  28258. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28259. "additionalProperties": false
  28260. }
  28261. },
  28262. "required": ["id", "type", "properties"],
  28263. "additionalProperties": false
  28264. },
  28265. "EventSessionNextTextDelta": {
  28266. "type": "object",
  28267. "properties": {
  28268. "id": {
  28269. "type": "string",
  28270. "pattern": "^evt_"
  28271. },
  28272. "type": {
  28273. "type": "string",
  28274. "enum": ["session.next.text.delta"]
  28275. },
  28276. "properties": {
  28277. "type": "object",
  28278. "properties": {
  28279. "timestamp": {
  28280. "type": "number"
  28281. },
  28282. "sessionID": {
  28283. "type": "string",
  28284. "pattern": "^ses"
  28285. },
  28286. "assistantMessageID": {
  28287. "type": "string",
  28288. "pattern": "^msg_"
  28289. },
  28290. "textID": {
  28291. "type": "string"
  28292. },
  28293. "delta": {
  28294. "type": "string"
  28295. }
  28296. },
  28297. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28298. "additionalProperties": false
  28299. }
  28300. },
  28301. "required": ["id", "type", "properties"],
  28302. "additionalProperties": false
  28303. },
  28304. "EventSessionNextTextEnded": {
  28305. "type": "object",
  28306. "properties": {
  28307. "id": {
  28308. "type": "string",
  28309. "pattern": "^evt_"
  28310. },
  28311. "type": {
  28312. "type": "string",
  28313. "enum": ["session.next.text.ended"]
  28314. },
  28315. "properties": {
  28316. "type": "object",
  28317. "properties": {
  28318. "timestamp": {
  28319. "type": "number"
  28320. },
  28321. "sessionID": {
  28322. "type": "string",
  28323. "pattern": "^ses"
  28324. },
  28325. "assistantMessageID": {
  28326. "type": "string",
  28327. "pattern": "^msg_"
  28328. },
  28329. "textID": {
  28330. "type": "string"
  28331. },
  28332. "text": {
  28333. "type": "string"
  28334. }
  28335. },
  28336. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28337. "additionalProperties": false
  28338. }
  28339. },
  28340. "required": ["id", "type", "properties"],
  28341. "additionalProperties": false
  28342. },
  28343. "EventSessionNextReasoningStarted": {
  28344. "type": "object",
  28345. "properties": {
  28346. "id": {
  28347. "type": "string",
  28348. "pattern": "^evt_"
  28349. },
  28350. "type": {
  28351. "type": "string",
  28352. "enum": ["session.next.reasoning.started"]
  28353. },
  28354. "properties": {
  28355. "type": "object",
  28356. "properties": {
  28357. "timestamp": {
  28358. "type": "number"
  28359. },
  28360. "sessionID": {
  28361. "type": "string",
  28362. "pattern": "^ses"
  28363. },
  28364. "assistantMessageID": {
  28365. "type": "string",
  28366. "pattern": "^msg_"
  28367. },
  28368. "reasoningID": {
  28369. "type": "string"
  28370. },
  28371. "providerMetadata": {
  28372. "type": "object",
  28373. "additionalProperties": {
  28374. "type": "object"
  28375. }
  28376. }
  28377. },
  28378. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28379. "additionalProperties": false
  28380. }
  28381. },
  28382. "required": ["id", "type", "properties"],
  28383. "additionalProperties": false
  28384. },
  28385. "EventSessionNextReasoningDelta": {
  28386. "type": "object",
  28387. "properties": {
  28388. "id": {
  28389. "type": "string",
  28390. "pattern": "^evt_"
  28391. },
  28392. "type": {
  28393. "type": "string",
  28394. "enum": ["session.next.reasoning.delta"]
  28395. },
  28396. "properties": {
  28397. "type": "object",
  28398. "properties": {
  28399. "timestamp": {
  28400. "type": "number"
  28401. },
  28402. "sessionID": {
  28403. "type": "string",
  28404. "pattern": "^ses"
  28405. },
  28406. "assistantMessageID": {
  28407. "type": "string",
  28408. "pattern": "^msg_"
  28409. },
  28410. "reasoningID": {
  28411. "type": "string"
  28412. },
  28413. "delta": {
  28414. "type": "string"
  28415. }
  28416. },
  28417. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28418. "additionalProperties": false
  28419. }
  28420. },
  28421. "required": ["id", "type", "properties"],
  28422. "additionalProperties": false
  28423. },
  28424. "EventSessionNextReasoningEnded": {
  28425. "type": "object",
  28426. "properties": {
  28427. "id": {
  28428. "type": "string",
  28429. "pattern": "^evt_"
  28430. },
  28431. "type": {
  28432. "type": "string",
  28433. "enum": ["session.next.reasoning.ended"]
  28434. },
  28435. "properties": {
  28436. "type": "object",
  28437. "properties": {
  28438. "timestamp": {
  28439. "type": "number"
  28440. },
  28441. "sessionID": {
  28442. "type": "string",
  28443. "pattern": "^ses"
  28444. },
  28445. "assistantMessageID": {
  28446. "type": "string",
  28447. "pattern": "^msg_"
  28448. },
  28449. "reasoningID": {
  28450. "type": "string"
  28451. },
  28452. "text": {
  28453. "type": "string"
  28454. },
  28455. "providerMetadata": {
  28456. "type": "object",
  28457. "additionalProperties": {
  28458. "type": "object"
  28459. }
  28460. }
  28461. },
  28462. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28463. "additionalProperties": false
  28464. }
  28465. },
  28466. "required": ["id", "type", "properties"],
  28467. "additionalProperties": false
  28468. },
  28469. "EventSessionNextToolInputStarted": {
  28470. "type": "object",
  28471. "properties": {
  28472. "id": {
  28473. "type": "string",
  28474. "pattern": "^evt_"
  28475. },
  28476. "type": {
  28477. "type": "string",
  28478. "enum": ["session.next.tool.input.started"]
  28479. },
  28480. "properties": {
  28481. "type": "object",
  28482. "properties": {
  28483. "timestamp": {
  28484. "type": "number"
  28485. },
  28486. "sessionID": {
  28487. "type": "string",
  28488. "pattern": "^ses"
  28489. },
  28490. "assistantMessageID": {
  28491. "type": "string",
  28492. "pattern": "^msg_"
  28493. },
  28494. "callID": {
  28495. "type": "string"
  28496. },
  28497. "name": {
  28498. "type": "string"
  28499. }
  28500. },
  28501. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28502. "additionalProperties": false
  28503. }
  28504. },
  28505. "required": ["id", "type", "properties"],
  28506. "additionalProperties": false
  28507. },
  28508. "EventSessionNextToolInputDelta": {
  28509. "type": "object",
  28510. "properties": {
  28511. "id": {
  28512. "type": "string",
  28513. "pattern": "^evt_"
  28514. },
  28515. "type": {
  28516. "type": "string",
  28517. "enum": ["session.next.tool.input.delta"]
  28518. },
  28519. "properties": {
  28520. "type": "object",
  28521. "properties": {
  28522. "timestamp": {
  28523. "type": "number"
  28524. },
  28525. "sessionID": {
  28526. "type": "string",
  28527. "pattern": "^ses"
  28528. },
  28529. "assistantMessageID": {
  28530. "type": "string",
  28531. "pattern": "^msg_"
  28532. },
  28533. "callID": {
  28534. "type": "string"
  28535. },
  28536. "delta": {
  28537. "type": "string"
  28538. }
  28539. },
  28540. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28541. "additionalProperties": false
  28542. }
  28543. },
  28544. "required": ["id", "type", "properties"],
  28545. "additionalProperties": false
  28546. },
  28547. "EventSessionNextToolInputEnded": {
  28548. "type": "object",
  28549. "properties": {
  28550. "id": {
  28551. "type": "string",
  28552. "pattern": "^evt_"
  28553. },
  28554. "type": {
  28555. "type": "string",
  28556. "enum": ["session.next.tool.input.ended"]
  28557. },
  28558. "properties": {
  28559. "type": "object",
  28560. "properties": {
  28561. "timestamp": {
  28562. "type": "number"
  28563. },
  28564. "sessionID": {
  28565. "type": "string",
  28566. "pattern": "^ses"
  28567. },
  28568. "assistantMessageID": {
  28569. "type": "string",
  28570. "pattern": "^msg_"
  28571. },
  28572. "callID": {
  28573. "type": "string"
  28574. },
  28575. "text": {
  28576. "type": "string"
  28577. }
  28578. },
  28579. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28580. "additionalProperties": false
  28581. }
  28582. },
  28583. "required": ["id", "type", "properties"],
  28584. "additionalProperties": false
  28585. },
  28586. "EventSessionNextToolCalled": {
  28587. "type": "object",
  28588. "properties": {
  28589. "id": {
  28590. "type": "string",
  28591. "pattern": "^evt_"
  28592. },
  28593. "type": {
  28594. "type": "string",
  28595. "enum": ["session.next.tool.called"]
  28596. },
  28597. "properties": {
  28598. "type": "object",
  28599. "properties": {
  28600. "timestamp": {
  28601. "type": "number"
  28602. },
  28603. "sessionID": {
  28604. "type": "string",
  28605. "pattern": "^ses"
  28606. },
  28607. "assistantMessageID": {
  28608. "type": "string",
  28609. "pattern": "^msg_"
  28610. },
  28611. "callID": {
  28612. "type": "string"
  28613. },
  28614. "tool": {
  28615. "type": "string"
  28616. },
  28617. "input": {
  28618. "type": "object"
  28619. },
  28620. "provider": {
  28621. "type": "object",
  28622. "properties": {
  28623. "executed": {
  28624. "type": "boolean"
  28625. },
  28626. "metadata": {
  28627. "type": "object",
  28628. "additionalProperties": {
  28629. "type": "object"
  28630. }
  28631. }
  28632. },
  28633. "required": ["executed"],
  28634. "additionalProperties": false
  28635. }
  28636. },
  28637. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28638. "additionalProperties": false
  28639. }
  28640. },
  28641. "required": ["id", "type", "properties"],
  28642. "additionalProperties": false
  28643. },
  28644. "EventSessionNextToolProgress": {
  28645. "type": "object",
  28646. "properties": {
  28647. "id": {
  28648. "type": "string",
  28649. "pattern": "^evt_"
  28650. },
  28651. "type": {
  28652. "type": "string",
  28653. "enum": ["session.next.tool.progress"]
  28654. },
  28655. "properties": {
  28656. "type": "object",
  28657. "properties": {
  28658. "timestamp": {
  28659. "type": "number"
  28660. },
  28661. "sessionID": {
  28662. "type": "string",
  28663. "pattern": "^ses"
  28664. },
  28665. "assistantMessageID": {
  28666. "type": "string",
  28667. "pattern": "^msg_"
  28668. },
  28669. "callID": {
  28670. "type": "string"
  28671. },
  28672. "structured": {
  28673. "type": "object"
  28674. },
  28675. "content": {
  28676. "type": "array",
  28677. "items": {
  28678. "anyOf": [
  28679. {
  28680. "$ref": "#/components/schemas/ToolTextContent"
  28681. },
  28682. {
  28683. "$ref": "#/components/schemas/ToolFileContent"
  28684. }
  28685. ]
  28686. }
  28687. }
  28688. },
  28689. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28690. "additionalProperties": false
  28691. }
  28692. },
  28693. "required": ["id", "type", "properties"],
  28694. "additionalProperties": false
  28695. },
  28696. "EventSessionNextToolSuccess": {
  28697. "type": "object",
  28698. "properties": {
  28699. "id": {
  28700. "type": "string",
  28701. "pattern": "^evt_"
  28702. },
  28703. "type": {
  28704. "type": "string",
  28705. "enum": ["session.next.tool.success"]
  28706. },
  28707. "properties": {
  28708. "type": "object",
  28709. "properties": {
  28710. "timestamp": {
  28711. "type": "number"
  28712. },
  28713. "sessionID": {
  28714. "type": "string",
  28715. "pattern": "^ses"
  28716. },
  28717. "assistantMessageID": {
  28718. "type": "string",
  28719. "pattern": "^msg_"
  28720. },
  28721. "callID": {
  28722. "type": "string"
  28723. },
  28724. "structured": {
  28725. "type": "object"
  28726. },
  28727. "content": {
  28728. "type": "array",
  28729. "items": {
  28730. "anyOf": [
  28731. {
  28732. "$ref": "#/components/schemas/ToolTextContent"
  28733. },
  28734. {
  28735. "$ref": "#/components/schemas/ToolFileContent"
  28736. }
  28737. ]
  28738. }
  28739. },
  28740. "outputPaths": {
  28741. "type": "array",
  28742. "items": {
  28743. "type": "string"
  28744. }
  28745. },
  28746. "result": {},
  28747. "provider": {
  28748. "type": "object",
  28749. "properties": {
  28750. "executed": {
  28751. "type": "boolean"
  28752. },
  28753. "metadata": {
  28754. "type": "object",
  28755. "additionalProperties": {
  28756. "type": "object"
  28757. }
  28758. }
  28759. },
  28760. "required": ["executed"],
  28761. "additionalProperties": false
  28762. }
  28763. },
  28764. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  28765. "additionalProperties": false
  28766. }
  28767. },
  28768. "required": ["id", "type", "properties"],
  28769. "additionalProperties": false
  28770. },
  28771. "EventSessionNextToolFailed": {
  28772. "type": "object",
  28773. "properties": {
  28774. "id": {
  28775. "type": "string",
  28776. "pattern": "^evt_"
  28777. },
  28778. "type": {
  28779. "type": "string",
  28780. "enum": ["session.next.tool.failed"]
  28781. },
  28782. "properties": {
  28783. "type": "object",
  28784. "properties": {
  28785. "timestamp": {
  28786. "type": "number"
  28787. },
  28788. "sessionID": {
  28789. "type": "string",
  28790. "pattern": "^ses"
  28791. },
  28792. "assistantMessageID": {
  28793. "type": "string",
  28794. "pattern": "^msg_"
  28795. },
  28796. "callID": {
  28797. "type": "string"
  28798. },
  28799. "error": {
  28800. "$ref": "#/components/schemas/SessionErrorUnknown"
  28801. },
  28802. "result": {},
  28803. "provider": {
  28804. "type": "object",
  28805. "properties": {
  28806. "executed": {
  28807. "type": "boolean"
  28808. },
  28809. "metadata": {
  28810. "type": "object",
  28811. "additionalProperties": {
  28812. "type": "object"
  28813. }
  28814. }
  28815. },
  28816. "required": ["executed"],
  28817. "additionalProperties": false
  28818. }
  28819. },
  28820. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  28821. "additionalProperties": false
  28822. }
  28823. },
  28824. "required": ["id", "type", "properties"],
  28825. "additionalProperties": false
  28826. },
  28827. "EventSessionNextRetried": {
  28828. "type": "object",
  28829. "properties": {
  28830. "id": {
  28831. "type": "string",
  28832. "pattern": "^evt_"
  28833. },
  28834. "type": {
  28835. "type": "string",
  28836. "enum": ["session.next.retried"]
  28837. },
  28838. "properties": {
  28839. "type": "object",
  28840. "properties": {
  28841. "timestamp": {
  28842. "type": "number"
  28843. },
  28844. "sessionID": {
  28845. "type": "string",
  28846. "pattern": "^ses"
  28847. },
  28848. "attempt": {
  28849. "type": "number"
  28850. },
  28851. "error": {
  28852. "$ref": "#/components/schemas/SessionNextRetry_error"
  28853. }
  28854. },
  28855. "required": ["timestamp", "sessionID", "attempt", "error"],
  28856. "additionalProperties": false
  28857. }
  28858. },
  28859. "required": ["id", "type", "properties"],
  28860. "additionalProperties": false
  28861. },
  28862. "EventSessionNextCompactionStarted": {
  28863. "type": "object",
  28864. "properties": {
  28865. "id": {
  28866. "type": "string",
  28867. "pattern": "^evt_"
  28868. },
  28869. "type": {
  28870. "type": "string",
  28871. "enum": ["session.next.compaction.started"]
  28872. },
  28873. "properties": {
  28874. "type": "object",
  28875. "properties": {
  28876. "timestamp": {
  28877. "type": "number"
  28878. },
  28879. "sessionID": {
  28880. "type": "string",
  28881. "pattern": "^ses"
  28882. },
  28883. "messageID": {
  28884. "type": "string",
  28885. "pattern": "^msg_"
  28886. },
  28887. "reason": {
  28888. "type": "string",
  28889. "enum": ["auto", "manual"]
  28890. }
  28891. },
  28892. "required": ["timestamp", "sessionID", "messageID", "reason"],
  28893. "additionalProperties": false
  28894. }
  28895. },
  28896. "required": ["id", "type", "properties"],
  28897. "additionalProperties": false
  28898. },
  28899. "EventSessionNextCompactionDelta": {
  28900. "type": "object",
  28901. "properties": {
  28902. "id": {
  28903. "type": "string",
  28904. "pattern": "^evt_"
  28905. },
  28906. "type": {
  28907. "type": "string",
  28908. "enum": ["session.next.compaction.delta"]
  28909. },
  28910. "properties": {
  28911. "type": "object",
  28912. "properties": {
  28913. "timestamp": {
  28914. "type": "number"
  28915. },
  28916. "sessionID": {
  28917. "type": "string",
  28918. "pattern": "^ses"
  28919. },
  28920. "messageID": {
  28921. "type": "string",
  28922. "pattern": "^msg_"
  28923. },
  28924. "text": {
  28925. "type": "string"
  28926. }
  28927. },
  28928. "required": ["timestamp", "sessionID", "messageID", "text"],
  28929. "additionalProperties": false
  28930. }
  28931. },
  28932. "required": ["id", "type", "properties"],
  28933. "additionalProperties": false
  28934. },
  28935. "EventSessionNextCompactionEnded": {
  28936. "type": "object",
  28937. "properties": {
  28938. "id": {
  28939. "type": "string",
  28940. "pattern": "^evt_"
  28941. },
  28942. "type": {
  28943. "type": "string",
  28944. "enum": ["session.next.compaction.ended"]
  28945. },
  28946. "properties": {
  28947. "type": "object",
  28948. "properties": {
  28949. "timestamp": {
  28950. "type": "number"
  28951. },
  28952. "sessionID": {
  28953. "type": "string",
  28954. "pattern": "^ses"
  28955. },
  28956. "messageID": {
  28957. "type": "string",
  28958. "pattern": "^msg_"
  28959. },
  28960. "reason": {
  28961. "type": "string",
  28962. "enum": ["auto", "manual"]
  28963. },
  28964. "text": {
  28965. "type": "string"
  28966. },
  28967. "recent": {
  28968. "type": "string"
  28969. }
  28970. },
  28971. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  28972. "additionalProperties": false
  28973. }
  28974. },
  28975. "required": ["id", "type", "properties"],
  28976. "additionalProperties": false
  28977. },
  28978. "EventMessagePartDelta": {
  28979. "type": "object",
  28980. "properties": {
  28981. "id": {
  28982. "type": "string",
  28983. "pattern": "^evt_"
  28984. },
  28985. "type": {
  28986. "type": "string",
  28987. "enum": ["message.part.delta"]
  28988. },
  28989. "properties": {
  28990. "type": "object",
  28991. "properties": {
  28992. "sessionID": {
  28993. "type": "string",
  28994. "pattern": "^ses"
  28995. },
  28996. "messageID": {
  28997. "type": "string",
  28998. "pattern": "^msg"
  28999. },
  29000. "partID": {
  29001. "type": "string",
  29002. "pattern": "^prt"
  29003. },
  29004. "field": {
  29005. "type": "string"
  29006. },
  29007. "delta": {
  29008. "type": "string"
  29009. }
  29010. },
  29011. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29012. "additionalProperties": false
  29013. }
  29014. },
  29015. "required": ["id", "type", "properties"],
  29016. "additionalProperties": false
  29017. },
  29018. "EventSessionDiff": {
  29019. "type": "object",
  29020. "properties": {
  29021. "id": {
  29022. "type": "string",
  29023. "pattern": "^evt_"
  29024. },
  29025. "type": {
  29026. "type": "string",
  29027. "enum": ["session.diff"]
  29028. },
  29029. "properties": {
  29030. "type": "object",
  29031. "properties": {
  29032. "sessionID": {
  29033. "type": "string",
  29034. "pattern": "^ses"
  29035. },
  29036. "diff": {
  29037. "type": "array",
  29038. "items": {
  29039. "$ref": "#/components/schemas/SnapshotFileDiff"
  29040. }
  29041. }
  29042. },
  29043. "required": ["sessionID", "diff"],
  29044. "additionalProperties": false
  29045. }
  29046. },
  29047. "required": ["id", "type", "properties"],
  29048. "additionalProperties": false
  29049. },
  29050. "EventSessionError": {
  29051. "type": "object",
  29052. "properties": {
  29053. "id": {
  29054. "type": "string",
  29055. "pattern": "^evt_"
  29056. },
  29057. "type": {
  29058. "type": "string",
  29059. "enum": ["session.error"]
  29060. },
  29061. "properties": {
  29062. "type": "object",
  29063. "properties": {
  29064. "sessionID": {
  29065. "type": "string",
  29066. "pattern": "^ses"
  29067. },
  29068. "error": {
  29069. "anyOf": [
  29070. {
  29071. "$ref": "#/components/schemas/ProviderAuthError"
  29072. },
  29073. {
  29074. "$ref": "#/components/schemas/UnknownError"
  29075. },
  29076. {
  29077. "$ref": "#/components/schemas/MessageOutputLengthError"
  29078. },
  29079. {
  29080. "$ref": "#/components/schemas/MessageAbortedError"
  29081. },
  29082. {
  29083. "$ref": "#/components/schemas/StructuredOutputError"
  29084. },
  29085. {
  29086. "$ref": "#/components/schemas/ContextOverflowError"
  29087. },
  29088. {
  29089. "$ref": "#/components/schemas/ContentFilterError"
  29090. },
  29091. {
  29092. "$ref": "#/components/schemas/APIError"
  29093. }
  29094. ]
  29095. }
  29096. },
  29097. "additionalProperties": false
  29098. }
  29099. },
  29100. "required": ["id", "type", "properties"],
  29101. "additionalProperties": false
  29102. },
  29103. "EventInstallationUpdated": {
  29104. "type": "object",
  29105. "properties": {
  29106. "id": {
  29107. "type": "string",
  29108. "pattern": "^evt_"
  29109. },
  29110. "type": {
  29111. "type": "string",
  29112. "enum": ["installation.updated"]
  29113. },
  29114. "properties": {
  29115. "type": "object",
  29116. "properties": {
  29117. "version": {
  29118. "type": "string"
  29119. }
  29120. },
  29121. "required": ["version"],
  29122. "additionalProperties": false
  29123. }
  29124. },
  29125. "required": ["id", "type", "properties"],
  29126. "additionalProperties": false
  29127. },
  29128. "EventInstallationUpdate-available": {
  29129. "type": "object",
  29130. "properties": {
  29131. "id": {
  29132. "type": "string",
  29133. "pattern": "^evt_"
  29134. },
  29135. "type": {
  29136. "type": "string",
  29137. "enum": ["installation.update-available"]
  29138. },
  29139. "properties": {
  29140. "type": "object",
  29141. "properties": {
  29142. "version": {
  29143. "type": "string"
  29144. }
  29145. },
  29146. "required": ["version"],
  29147. "additionalProperties": false
  29148. }
  29149. },
  29150. "required": ["id", "type", "properties"],
  29151. "additionalProperties": false
  29152. },
  29153. "EventFileEdited": {
  29154. "type": "object",
  29155. "properties": {
  29156. "id": {
  29157. "type": "string",
  29158. "pattern": "^evt_"
  29159. },
  29160. "type": {
  29161. "type": "string",
  29162. "enum": ["file.edited"]
  29163. },
  29164. "properties": {
  29165. "type": "object",
  29166. "properties": {
  29167. "file": {
  29168. "type": "string"
  29169. }
  29170. },
  29171. "required": ["file"],
  29172. "additionalProperties": false
  29173. }
  29174. },
  29175. "required": ["id", "type", "properties"],
  29176. "additionalProperties": false
  29177. },
  29178. "EventConnectorUpdated": {
  29179. "type": "object",
  29180. "properties": {
  29181. "id": {
  29182. "type": "string",
  29183. "pattern": "^evt_"
  29184. },
  29185. "type": {
  29186. "type": "string",
  29187. "enum": ["connector.updated"]
  29188. },
  29189. "properties": {
  29190. "type": "object",
  29191. "properties": {}
  29192. }
  29193. },
  29194. "required": ["id", "type", "properties"],
  29195. "additionalProperties": false
  29196. },
  29197. "EventPermissionV2Asked": {
  29198. "type": "object",
  29199. "properties": {
  29200. "id": {
  29201. "type": "string",
  29202. "pattern": "^evt_"
  29203. },
  29204. "type": {
  29205. "type": "string",
  29206. "enum": ["permission.v2.asked"]
  29207. },
  29208. "properties": {
  29209. "type": "object",
  29210. "properties": {
  29211. "id": {
  29212. "type": "string",
  29213. "pattern": "^per"
  29214. },
  29215. "sessionID": {
  29216. "type": "string",
  29217. "pattern": "^ses"
  29218. },
  29219. "action": {
  29220. "type": "string"
  29221. },
  29222. "resources": {
  29223. "type": "array",
  29224. "items": {
  29225. "type": "string"
  29226. }
  29227. },
  29228. "save": {
  29229. "type": "array",
  29230. "items": {
  29231. "type": "string"
  29232. }
  29233. },
  29234. "metadata": {
  29235. "type": "object"
  29236. },
  29237. "source": {
  29238. "$ref": "#/components/schemas/PermissionV2Source"
  29239. }
  29240. },
  29241. "required": ["id", "sessionID", "action", "resources"],
  29242. "additionalProperties": false
  29243. }
  29244. },
  29245. "required": ["id", "type", "properties"],
  29246. "additionalProperties": false
  29247. },
  29248. "EventPermissionV2Replied": {
  29249. "type": "object",
  29250. "properties": {
  29251. "id": {
  29252. "type": "string",
  29253. "pattern": "^evt_"
  29254. },
  29255. "type": {
  29256. "type": "string",
  29257. "enum": ["permission.v2.replied"]
  29258. },
  29259. "properties": {
  29260. "type": "object",
  29261. "properties": {
  29262. "sessionID": {
  29263. "type": "string",
  29264. "pattern": "^ses"
  29265. },
  29266. "requestID": {
  29267. "type": "string",
  29268. "pattern": "^per"
  29269. },
  29270. "reply": {
  29271. "$ref": "#/components/schemas/PermissionV2Reply"
  29272. }
  29273. },
  29274. "required": ["sessionID", "requestID", "reply"],
  29275. "additionalProperties": false
  29276. }
  29277. },
  29278. "required": ["id", "type", "properties"],
  29279. "additionalProperties": false
  29280. },
  29281. "EventReferenceUpdated": {
  29282. "type": "object",
  29283. "properties": {
  29284. "id": {
  29285. "type": "string",
  29286. "pattern": "^evt_"
  29287. },
  29288. "type": {
  29289. "type": "string",
  29290. "enum": ["reference.updated"]
  29291. },
  29292. "properties": {
  29293. "type": "object",
  29294. "properties": {}
  29295. }
  29296. },
  29297. "required": ["id", "type", "properties"],
  29298. "additionalProperties": false
  29299. },
  29300. "EventFileWatcherUpdated": {
  29301. "type": "object",
  29302. "properties": {
  29303. "id": {
  29304. "type": "string",
  29305. "pattern": "^evt_"
  29306. },
  29307. "type": {
  29308. "type": "string",
  29309. "enum": ["file.watcher.updated"]
  29310. },
  29311. "properties": {
  29312. "type": "object",
  29313. "properties": {
  29314. "file": {
  29315. "type": "string"
  29316. },
  29317. "event": {
  29318. "type": "string",
  29319. "enum": ["add", "change", "unlink"]
  29320. }
  29321. },
  29322. "required": ["file", "event"],
  29323. "additionalProperties": false
  29324. }
  29325. },
  29326. "required": ["id", "type", "properties"],
  29327. "additionalProperties": false
  29328. },
  29329. "EventPtyCreated": {
  29330. "type": "object",
  29331. "properties": {
  29332. "id": {
  29333. "type": "string",
  29334. "pattern": "^evt_"
  29335. },
  29336. "type": {
  29337. "type": "string",
  29338. "enum": ["pty.created"]
  29339. },
  29340. "properties": {
  29341. "type": "object",
  29342. "properties": {
  29343. "info": {
  29344. "$ref": "#/components/schemas/Pty"
  29345. }
  29346. },
  29347. "required": ["info"],
  29348. "additionalProperties": false
  29349. }
  29350. },
  29351. "required": ["id", "type", "properties"],
  29352. "additionalProperties": false
  29353. },
  29354. "EventPtyUpdated": {
  29355. "type": "object",
  29356. "properties": {
  29357. "id": {
  29358. "type": "string",
  29359. "pattern": "^evt_"
  29360. },
  29361. "type": {
  29362. "type": "string",
  29363. "enum": ["pty.updated"]
  29364. },
  29365. "properties": {
  29366. "type": "object",
  29367. "properties": {
  29368. "info": {
  29369. "$ref": "#/components/schemas/Pty"
  29370. }
  29371. },
  29372. "required": ["info"],
  29373. "additionalProperties": false
  29374. }
  29375. },
  29376. "required": ["id", "type", "properties"],
  29377. "additionalProperties": false
  29378. },
  29379. "EventPtyExited": {
  29380. "type": "object",
  29381. "properties": {
  29382. "id": {
  29383. "type": "string",
  29384. "pattern": "^evt_"
  29385. },
  29386. "type": {
  29387. "type": "string",
  29388. "enum": ["pty.exited"]
  29389. },
  29390. "properties": {
  29391. "type": "object",
  29392. "properties": {
  29393. "id": {
  29394. "type": "string",
  29395. "pattern": "^pty"
  29396. },
  29397. "exitCode": {
  29398. "type": "integer",
  29399. "minimum": 0
  29400. }
  29401. },
  29402. "required": ["id", "exitCode"],
  29403. "additionalProperties": false
  29404. }
  29405. },
  29406. "required": ["id", "type", "properties"],
  29407. "additionalProperties": false
  29408. },
  29409. "EventPtyDeleted": {
  29410. "type": "object",
  29411. "properties": {
  29412. "id": {
  29413. "type": "string",
  29414. "pattern": "^evt_"
  29415. },
  29416. "type": {
  29417. "type": "string",
  29418. "enum": ["pty.deleted"]
  29419. },
  29420. "properties": {
  29421. "type": "object",
  29422. "properties": {
  29423. "id": {
  29424. "type": "string",
  29425. "pattern": "^pty"
  29426. }
  29427. },
  29428. "required": ["id"],
  29429. "additionalProperties": false
  29430. }
  29431. },
  29432. "required": ["id", "type", "properties"],
  29433. "additionalProperties": false
  29434. },
  29435. "EventQuestionV2Asked": {
  29436. "type": "object",
  29437. "properties": {
  29438. "id": {
  29439. "type": "string",
  29440. "pattern": "^evt_"
  29441. },
  29442. "type": {
  29443. "type": "string",
  29444. "enum": ["question.v2.asked"]
  29445. },
  29446. "properties": {
  29447. "type": "object",
  29448. "properties": {
  29449. "id": {
  29450. "type": "string",
  29451. "pattern": "^que"
  29452. },
  29453. "sessionID": {
  29454. "type": "string",
  29455. "pattern": "^ses"
  29456. },
  29457. "questions": {
  29458. "type": "array",
  29459. "items": {
  29460. "$ref": "#/components/schemas/QuestionV2Info"
  29461. },
  29462. "description": "Questions to ask"
  29463. },
  29464. "tool": {
  29465. "$ref": "#/components/schemas/QuestionV2Tool"
  29466. }
  29467. },
  29468. "required": ["id", "sessionID", "questions"],
  29469. "additionalProperties": false
  29470. }
  29471. },
  29472. "required": ["id", "type", "properties"],
  29473. "additionalProperties": false
  29474. },
  29475. "EventQuestionV2Replied": {
  29476. "type": "object",
  29477. "properties": {
  29478. "id": {
  29479. "type": "string",
  29480. "pattern": "^evt_"
  29481. },
  29482. "type": {
  29483. "type": "string",
  29484. "enum": ["question.v2.replied"]
  29485. },
  29486. "properties": {
  29487. "type": "object",
  29488. "properties": {
  29489. "sessionID": {
  29490. "type": "string",
  29491. "pattern": "^ses"
  29492. },
  29493. "requestID": {
  29494. "type": "string",
  29495. "pattern": "^que"
  29496. },
  29497. "answers": {
  29498. "type": "array",
  29499. "items": {
  29500. "$ref": "#/components/schemas/QuestionV2Answer"
  29501. }
  29502. }
  29503. },
  29504. "required": ["sessionID", "requestID", "answers"],
  29505. "additionalProperties": false
  29506. }
  29507. },
  29508. "required": ["id", "type", "properties"],
  29509. "additionalProperties": false
  29510. },
  29511. "EventQuestionV2Rejected": {
  29512. "type": "object",
  29513. "properties": {
  29514. "id": {
  29515. "type": "string",
  29516. "pattern": "^evt_"
  29517. },
  29518. "type": {
  29519. "type": "string",
  29520. "enum": ["question.v2.rejected"]
  29521. },
  29522. "properties": {
  29523. "type": "object",
  29524. "properties": {
  29525. "sessionID": {
  29526. "type": "string",
  29527. "pattern": "^ses"
  29528. },
  29529. "requestID": {
  29530. "type": "string",
  29531. "pattern": "^que"
  29532. }
  29533. },
  29534. "required": ["sessionID", "requestID"],
  29535. "additionalProperties": false
  29536. }
  29537. },
  29538. "required": ["id", "type", "properties"],
  29539. "additionalProperties": false
  29540. },
  29541. "EventTodoUpdated": {
  29542. "type": "object",
  29543. "properties": {
  29544. "id": {
  29545. "type": "string",
  29546. "pattern": "^evt_"
  29547. },
  29548. "type": {
  29549. "type": "string",
  29550. "enum": ["todo.updated"]
  29551. },
  29552. "properties": {
  29553. "type": "object",
  29554. "properties": {
  29555. "sessionID": {
  29556. "type": "string",
  29557. "pattern": "^ses"
  29558. },
  29559. "todos": {
  29560. "type": "array",
  29561. "items": {
  29562. "$ref": "#/components/schemas/Todo"
  29563. }
  29564. }
  29565. },
  29566. "required": ["sessionID", "todos"],
  29567. "additionalProperties": false
  29568. }
  29569. },
  29570. "required": ["id", "type", "properties"],
  29571. "additionalProperties": false
  29572. },
  29573. "EventLspUpdated": {
  29574. "type": "object",
  29575. "properties": {
  29576. "id": {
  29577. "type": "string",
  29578. "pattern": "^evt_"
  29579. },
  29580. "type": {
  29581. "type": "string",
  29582. "enum": ["lsp.updated"]
  29583. },
  29584. "properties": {
  29585. "type": "object",
  29586. "properties": {}
  29587. }
  29588. },
  29589. "required": ["id", "type", "properties"],
  29590. "additionalProperties": false
  29591. },
  29592. "EventPermissionAsked": {
  29593. "type": "object",
  29594. "properties": {
  29595. "id": {
  29596. "type": "string",
  29597. "pattern": "^evt_"
  29598. },
  29599. "type": {
  29600. "type": "string",
  29601. "enum": ["permission.asked"]
  29602. },
  29603. "properties": {
  29604. "type": "object",
  29605. "properties": {
  29606. "id": {
  29607. "type": "string",
  29608. "pattern": "^per"
  29609. },
  29610. "sessionID": {
  29611. "type": "string",
  29612. "pattern": "^ses"
  29613. },
  29614. "permission": {
  29615. "type": "string"
  29616. },
  29617. "patterns": {
  29618. "type": "array",
  29619. "items": {
  29620. "type": "string"
  29621. }
  29622. },
  29623. "metadata": {
  29624. "type": "object"
  29625. },
  29626. "always": {
  29627. "type": "array",
  29628. "items": {
  29629. "type": "string"
  29630. }
  29631. },
  29632. "tool": {
  29633. "type": "object",
  29634. "properties": {
  29635. "messageID": {
  29636. "type": "string"
  29637. },
  29638. "callID": {
  29639. "type": "string"
  29640. }
  29641. },
  29642. "required": ["messageID", "callID"],
  29643. "additionalProperties": false
  29644. }
  29645. },
  29646. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  29647. "additionalProperties": false
  29648. }
  29649. },
  29650. "required": ["id", "type", "properties"],
  29651. "additionalProperties": false
  29652. },
  29653. "EventPermissionReplied": {
  29654. "type": "object",
  29655. "properties": {
  29656. "id": {
  29657. "type": "string",
  29658. "pattern": "^evt_"
  29659. },
  29660. "type": {
  29661. "type": "string",
  29662. "enum": ["permission.replied"]
  29663. },
  29664. "properties": {
  29665. "type": "object",
  29666. "properties": {
  29667. "sessionID": {
  29668. "type": "string",
  29669. "pattern": "^ses"
  29670. },
  29671. "requestID": {
  29672. "type": "string",
  29673. "pattern": "^per"
  29674. },
  29675. "reply": {
  29676. "type": "string",
  29677. "enum": ["once", "always", "reject"]
  29678. }
  29679. },
  29680. "required": ["sessionID", "requestID", "reply"],
  29681. "additionalProperties": false
  29682. }
  29683. },
  29684. "required": ["id", "type", "properties"],
  29685. "additionalProperties": false
  29686. },
  29687. "EventMcpToolsChanged": {
  29688. "type": "object",
  29689. "properties": {
  29690. "id": {
  29691. "type": "string",
  29692. "pattern": "^evt_"
  29693. },
  29694. "type": {
  29695. "type": "string",
  29696. "enum": ["mcp.tools.changed"]
  29697. },
  29698. "properties": {
  29699. "type": "object",
  29700. "properties": {
  29701. "server": {
  29702. "type": "string"
  29703. }
  29704. },
  29705. "required": ["server"],
  29706. "additionalProperties": false
  29707. }
  29708. },
  29709. "required": ["id", "type", "properties"],
  29710. "additionalProperties": false
  29711. },
  29712. "EventMcpBrowserOpenFailed": {
  29713. "type": "object",
  29714. "properties": {
  29715. "id": {
  29716. "type": "string",
  29717. "pattern": "^evt_"
  29718. },
  29719. "type": {
  29720. "type": "string",
  29721. "enum": ["mcp.browser.open.failed"]
  29722. },
  29723. "properties": {
  29724. "type": "object",
  29725. "properties": {
  29726. "mcpName": {
  29727. "type": "string"
  29728. },
  29729. "url": {
  29730. "type": "string"
  29731. }
  29732. },
  29733. "required": ["mcpName", "url"],
  29734. "additionalProperties": false
  29735. }
  29736. },
  29737. "required": ["id", "type", "properties"],
  29738. "additionalProperties": false
  29739. },
  29740. "EventCommandExecuted": {
  29741. "type": "object",
  29742. "properties": {
  29743. "id": {
  29744. "type": "string",
  29745. "pattern": "^evt_"
  29746. },
  29747. "type": {
  29748. "type": "string",
  29749. "enum": ["command.executed"]
  29750. },
  29751. "properties": {
  29752. "type": "object",
  29753. "properties": {
  29754. "name": {
  29755. "type": "string"
  29756. },
  29757. "sessionID": {
  29758. "type": "string",
  29759. "pattern": "^ses"
  29760. },
  29761. "arguments": {
  29762. "type": "string"
  29763. },
  29764. "messageID": {
  29765. "type": "string",
  29766. "pattern": "^msg"
  29767. }
  29768. },
  29769. "required": ["name", "sessionID", "arguments", "messageID"],
  29770. "additionalProperties": false
  29771. }
  29772. },
  29773. "required": ["id", "type", "properties"],
  29774. "additionalProperties": false
  29775. },
  29776. "EventProjectDirectoriesUpdated": {
  29777. "type": "object",
  29778. "properties": {
  29779. "id": {
  29780. "type": "string",
  29781. "pattern": "^evt_"
  29782. },
  29783. "type": {
  29784. "type": "string",
  29785. "enum": ["project.directories.updated"]
  29786. },
  29787. "properties": {
  29788. "type": "object",
  29789. "properties": {
  29790. "projectID": {
  29791. "type": "string"
  29792. }
  29793. },
  29794. "required": ["projectID"],
  29795. "additionalProperties": false
  29796. }
  29797. },
  29798. "required": ["id", "type", "properties"],
  29799. "additionalProperties": false
  29800. },
  29801. "EventProjectUpdated": {
  29802. "type": "object",
  29803. "properties": {
  29804. "id": {
  29805. "type": "string",
  29806. "pattern": "^evt_"
  29807. },
  29808. "type": {
  29809. "type": "string",
  29810. "enum": ["project.updated"]
  29811. },
  29812. "properties": {
  29813. "type": "object",
  29814. "properties": {
  29815. "id": {
  29816. "type": "string"
  29817. },
  29818. "worktree": {
  29819. "type": "string"
  29820. },
  29821. "vcs": {
  29822. "type": "string",
  29823. "enum": ["git"]
  29824. },
  29825. "name": {
  29826. "type": "string"
  29827. },
  29828. "icon": {
  29829. "type": "object",
  29830. "properties": {
  29831. "url": {
  29832. "type": "string"
  29833. },
  29834. "override": {
  29835. "type": "string"
  29836. },
  29837. "color": {
  29838. "type": "string"
  29839. }
  29840. },
  29841. "additionalProperties": false
  29842. },
  29843. "commands": {
  29844. "type": "object",
  29845. "properties": {
  29846. "start": {
  29847. "type": "string",
  29848. "description": "Startup script to run when creating a new workspace (worktree)"
  29849. }
  29850. },
  29851. "additionalProperties": false
  29852. },
  29853. "time": {
  29854. "type": "object",
  29855. "properties": {
  29856. "created": {
  29857. "type": "integer",
  29858. "minimum": 0
  29859. },
  29860. "updated": {
  29861. "type": "integer",
  29862. "minimum": 0
  29863. },
  29864. "initialized": {
  29865. "type": "integer",
  29866. "minimum": 0
  29867. }
  29868. },
  29869. "required": ["created", "updated"],
  29870. "additionalProperties": false
  29871. },
  29872. "sandboxes": {
  29873. "type": "array",
  29874. "items": {
  29875. "type": "string"
  29876. }
  29877. }
  29878. },
  29879. "required": ["id", "worktree", "time", "sandboxes"],
  29880. "additionalProperties": false
  29881. }
  29882. },
  29883. "required": ["id", "type", "properties"],
  29884. "additionalProperties": false
  29885. },
  29886. "EventVcsBranchUpdated": {
  29887. "type": "object",
  29888. "properties": {
  29889. "id": {
  29890. "type": "string",
  29891. "pattern": "^evt_"
  29892. },
  29893. "type": {
  29894. "type": "string",
  29895. "enum": ["vcs.branch.updated"]
  29896. },
  29897. "properties": {
  29898. "type": "object",
  29899. "properties": {
  29900. "branch": {
  29901. "type": "string"
  29902. }
  29903. },
  29904. "additionalProperties": false
  29905. }
  29906. },
  29907. "required": ["id", "type", "properties"],
  29908. "additionalProperties": false
  29909. },
  29910. "EventQuestionAsked": {
  29911. "type": "object",
  29912. "properties": {
  29913. "id": {
  29914. "type": "string",
  29915. "pattern": "^evt_"
  29916. },
  29917. "type": {
  29918. "type": "string",
  29919. "enum": ["question.asked"]
  29920. },
  29921. "properties": {
  29922. "type": "object",
  29923. "properties": {
  29924. "id": {
  29925. "type": "string",
  29926. "pattern": "^que"
  29927. },
  29928. "sessionID": {
  29929. "type": "string",
  29930. "pattern": "^ses"
  29931. },
  29932. "questions": {
  29933. "type": "array",
  29934. "items": {
  29935. "$ref": "#/components/schemas/QuestionInfo"
  29936. },
  29937. "description": "Questions to ask"
  29938. },
  29939. "tool": {
  29940. "$ref": "#/components/schemas/QuestionTool"
  29941. }
  29942. },
  29943. "required": ["id", "sessionID", "questions"],
  29944. "additionalProperties": false
  29945. }
  29946. },
  29947. "required": ["id", "type", "properties"],
  29948. "additionalProperties": false
  29949. },
  29950. "EventQuestionReplied": {
  29951. "type": "object",
  29952. "properties": {
  29953. "id": {
  29954. "type": "string",
  29955. "pattern": "^evt_"
  29956. },
  29957. "type": {
  29958. "type": "string",
  29959. "enum": ["question.replied"]
  29960. },
  29961. "properties": {
  29962. "type": "object",
  29963. "properties": {
  29964. "sessionID": {
  29965. "type": "string",
  29966. "pattern": "^ses"
  29967. },
  29968. "requestID": {
  29969. "type": "string",
  29970. "pattern": "^que"
  29971. },
  29972. "answers": {
  29973. "type": "array",
  29974. "items": {
  29975. "$ref": "#/components/schemas/QuestionAnswer"
  29976. }
  29977. }
  29978. },
  29979. "required": ["sessionID", "requestID", "answers"],
  29980. "additionalProperties": false
  29981. }
  29982. },
  29983. "required": ["id", "type", "properties"],
  29984. "additionalProperties": false
  29985. },
  29986. "EventQuestionRejected": {
  29987. "type": "object",
  29988. "properties": {
  29989. "id": {
  29990. "type": "string",
  29991. "pattern": "^evt_"
  29992. },
  29993. "type": {
  29994. "type": "string",
  29995. "enum": ["question.rejected"]
  29996. },
  29997. "properties": {
  29998. "type": "object",
  29999. "properties": {
  30000. "sessionID": {
  30001. "type": "string",
  30002. "pattern": "^ses"
  30003. },
  30004. "requestID": {
  30005. "type": "string",
  30006. "pattern": "^que"
  30007. }
  30008. },
  30009. "required": ["sessionID", "requestID"],
  30010. "additionalProperties": false
  30011. }
  30012. },
  30013. "required": ["id", "type", "properties"],
  30014. "additionalProperties": false
  30015. },
  30016. "EventSessionStatus": {
  30017. "type": "object",
  30018. "properties": {
  30019. "id": {
  30020. "type": "string",
  30021. "pattern": "^evt_"
  30022. },
  30023. "type": {
  30024. "type": "string",
  30025. "enum": ["session.status"]
  30026. },
  30027. "properties": {
  30028. "type": "object",
  30029. "properties": {
  30030. "sessionID": {
  30031. "type": "string",
  30032. "pattern": "^ses"
  30033. },
  30034. "status": {
  30035. "$ref": "#/components/schemas/SessionStatus"
  30036. }
  30037. },
  30038. "required": ["sessionID", "status"],
  30039. "additionalProperties": false
  30040. }
  30041. },
  30042. "required": ["id", "type", "properties"],
  30043. "additionalProperties": false
  30044. },
  30045. "EventSessionIdle": {
  30046. "type": "object",
  30047. "properties": {
  30048. "id": {
  30049. "type": "string",
  30050. "pattern": "^evt_"
  30051. },
  30052. "type": {
  30053. "type": "string",
  30054. "enum": ["session.idle"]
  30055. },
  30056. "properties": {
  30057. "type": "object",
  30058. "properties": {
  30059. "sessionID": {
  30060. "type": "string",
  30061. "pattern": "^ses"
  30062. }
  30063. },
  30064. "required": ["sessionID"],
  30065. "additionalProperties": false
  30066. }
  30067. },
  30068. "required": ["id", "type", "properties"],
  30069. "additionalProperties": false
  30070. },
  30071. "EventSessionCompacted": {
  30072. "type": "object",
  30073. "properties": {
  30074. "id": {
  30075. "type": "string",
  30076. "pattern": "^evt_"
  30077. },
  30078. "type": {
  30079. "type": "string",
  30080. "enum": ["session.compacted"]
  30081. },
  30082. "properties": {
  30083. "type": "object",
  30084. "properties": {
  30085. "sessionID": {
  30086. "type": "string",
  30087. "pattern": "^ses"
  30088. }
  30089. },
  30090. "required": ["sessionID"],
  30091. "additionalProperties": false
  30092. }
  30093. },
  30094. "required": ["id", "type", "properties"],
  30095. "additionalProperties": false
  30096. },
  30097. "EventWorktreeReady": {
  30098. "type": "object",
  30099. "properties": {
  30100. "id": {
  30101. "type": "string",
  30102. "pattern": "^evt_"
  30103. },
  30104. "type": {
  30105. "type": "string",
  30106. "enum": ["worktree.ready"]
  30107. },
  30108. "properties": {
  30109. "type": "object",
  30110. "properties": {
  30111. "name": {
  30112. "type": "string"
  30113. },
  30114. "branch": {
  30115. "type": "string"
  30116. }
  30117. },
  30118. "required": ["name"],
  30119. "additionalProperties": false
  30120. }
  30121. },
  30122. "required": ["id", "type", "properties"],
  30123. "additionalProperties": false
  30124. },
  30125. "EventWorktreeFailed": {
  30126. "type": "object",
  30127. "properties": {
  30128. "id": {
  30129. "type": "string",
  30130. "pattern": "^evt_"
  30131. },
  30132. "type": {
  30133. "type": "string",
  30134. "enum": ["worktree.failed"]
  30135. },
  30136. "properties": {
  30137. "type": "object",
  30138. "properties": {
  30139. "message": {
  30140. "type": "string"
  30141. }
  30142. },
  30143. "required": ["message"],
  30144. "additionalProperties": false
  30145. }
  30146. },
  30147. "required": ["id", "type", "properties"],
  30148. "additionalProperties": false
  30149. },
  30150. "EventWorkspaceReady": {
  30151. "type": "object",
  30152. "properties": {
  30153. "id": {
  30154. "type": "string",
  30155. "pattern": "^evt_"
  30156. },
  30157. "type": {
  30158. "type": "string",
  30159. "enum": ["workspace.ready"]
  30160. },
  30161. "properties": {
  30162. "type": "object",
  30163. "properties": {
  30164. "name": {
  30165. "type": "string"
  30166. }
  30167. },
  30168. "required": ["name"],
  30169. "additionalProperties": false
  30170. }
  30171. },
  30172. "required": ["id", "type", "properties"],
  30173. "additionalProperties": false
  30174. },
  30175. "EventWorkspaceFailed": {
  30176. "type": "object",
  30177. "properties": {
  30178. "id": {
  30179. "type": "string",
  30180. "pattern": "^evt_"
  30181. },
  30182. "type": {
  30183. "type": "string",
  30184. "enum": ["workspace.failed"]
  30185. },
  30186. "properties": {
  30187. "type": "object",
  30188. "properties": {
  30189. "message": {
  30190. "type": "string"
  30191. }
  30192. },
  30193. "required": ["message"],
  30194. "additionalProperties": false
  30195. }
  30196. },
  30197. "required": ["id", "type", "properties"],
  30198. "additionalProperties": false
  30199. },
  30200. "EventWorkspaceStatus": {
  30201. "type": "object",
  30202. "properties": {
  30203. "id": {
  30204. "type": "string",
  30205. "pattern": "^evt_"
  30206. },
  30207. "type": {
  30208. "type": "string",
  30209. "enum": ["workspace.status"]
  30210. },
  30211. "properties": {
  30212. "type": "object",
  30213. "properties": {
  30214. "workspaceID": {
  30215. "type": "string",
  30216. "pattern": "^wrk"
  30217. },
  30218. "status": {
  30219. "type": "string",
  30220. "enum": ["connected", "connecting", "disconnected", "error"]
  30221. }
  30222. },
  30223. "required": ["workspaceID", "status"],
  30224. "additionalProperties": false
  30225. }
  30226. },
  30227. "required": ["id", "type", "properties"],
  30228. "additionalProperties": false
  30229. },
  30230. "EventServerConnected": {
  30231. "type": "object",
  30232. "properties": {
  30233. "id": {
  30234. "type": "string",
  30235. "pattern": "^evt_"
  30236. },
  30237. "type": {
  30238. "type": "string",
  30239. "enum": ["server.connected"]
  30240. },
  30241. "properties": {
  30242. "type": "object",
  30243. "properties": {}
  30244. }
  30245. },
  30246. "required": ["id", "type", "properties"],
  30247. "additionalProperties": false
  30248. },
  30249. "EventGlobalDisposed": {
  30250. "type": "object",
  30251. "properties": {
  30252. "id": {
  30253. "type": "string",
  30254. "pattern": "^evt_"
  30255. },
  30256. "type": {
  30257. "type": "string",
  30258. "enum": ["global.disposed"]
  30259. },
  30260. "properties": {
  30261. "type": "object",
  30262. "properties": {}
  30263. }
  30264. },
  30265. "required": ["id", "type", "properties"],
  30266. "additionalProperties": false
  30267. },
  30268. "BadRequestError": {
  30269. "type": "object",
  30270. "required": ["name", "data"],
  30271. "properties": {
  30272. "name": {
  30273. "type": "string",
  30274. "enum": ["BadRequest"]
  30275. },
  30276. "data": {
  30277. "type": "object",
  30278. "required": ["message"],
  30279. "properties": {
  30280. "message": {
  30281. "type": "string"
  30282. },
  30283. "kind": {
  30284. "type": "string",
  30285. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30286. }
  30287. }
  30288. }
  30289. }
  30290. }
  30291. }
  30292. },
  30293. "security": [],
  30294. "tags": [
  30295. {
  30296. "name": "control",
  30297. "description": "Control plane routes."
  30298. },
  30299. {
  30300. "name": "controlPlane",
  30301. "description": "Control-plane orchestration routes."
  30302. },
  30303. {
  30304. "name": "global",
  30305. "description": "Global server routes."
  30306. },
  30307. {
  30308. "name": "event",
  30309. "description": "Instance event stream route."
  30310. },
  30311. {
  30312. "name": "config",
  30313. "description": "Experimental HttpApi config routes."
  30314. },
  30315. {
  30316. "name": "experimental",
  30317. "description": "Experimental HttpApi read-only routes."
  30318. },
  30319. {
  30320. "name": "file",
  30321. "description": "Experimental HttpApi file routes."
  30322. },
  30323. {
  30324. "name": "instance",
  30325. "description": "Experimental HttpApi instance read routes."
  30326. },
  30327. {
  30328. "name": "mcp",
  30329. "description": "Experimental HttpApi MCP routes."
  30330. },
  30331. {
  30332. "name": "project",
  30333. "description": "Experimental HttpApi project routes."
  30334. },
  30335. {
  30336. "name": "projectCopy",
  30337. "description": "Project copy management routes."
  30338. },
  30339. {
  30340. "name": "pty",
  30341. "description": "Experimental HttpApi PTY routes."
  30342. },
  30343. {
  30344. "name": "question",
  30345. "description": "Question routes."
  30346. },
  30347. {
  30348. "name": "permission",
  30349. "description": "Experimental HttpApi permission routes."
  30350. },
  30351. {
  30352. "name": "provider",
  30353. "description": "Experimental HttpApi provider routes."
  30354. },
  30355. {
  30356. "name": "session",
  30357. "description": "Experimental HttpApi session routes."
  30358. },
  30359. {
  30360. "name": "sync",
  30361. "description": "Experimental HttpApi sync routes."
  30362. },
  30363. {
  30364. "name": "tui",
  30365. "description": "Experimental HttpApi TUI routes."
  30366. },
  30367. {
  30368. "name": "workspace",
  30369. "description": "Experimental HttpApi workspace routes."
  30370. },
  30371. {
  30372. "name": "opencode HttpApi",
  30373. "description": "Experimental HttpApi surface for selected instance routes."
  30374. },
  30375. {
  30376. "name": "opencode HttpApi",
  30377. "description": "Experimental HttpApi surface for selected instance routes."
  30378. },
  30379. {
  30380. "name": "opencode HttpApi",
  30381. "description": "Experimental HttpApi surface for selected instance routes."
  30382. },
  30383. {
  30384. "name": "sessions",
  30385. "description": "Experimental session routes."
  30386. },
  30387. {
  30388. "name": "messages",
  30389. "description": "Experimental message routes."
  30390. },
  30391. {
  30392. "name": "models",
  30393. "description": "Experimental model routes."
  30394. },
  30395. {
  30396. "name": "providers",
  30397. "description": "Experimental provider routes."
  30398. },
  30399. {
  30400. "name": "connectors",
  30401. "description": "Connector discovery and authentication routes."
  30402. },
  30403. {
  30404. "name": "permissions",
  30405. "description": "Experimental permission routes."
  30406. },
  30407. {
  30408. "name": "filesystem",
  30409. "description": "Experimental location-scoped filesystem routes."
  30410. },
  30411. {
  30412. "name": "commands",
  30413. "description": "Experimental command routes."
  30414. },
  30415. {
  30416. "name": "skills",
  30417. "description": "Experimental skill routes."
  30418. },
  30419. {
  30420. "name": "events",
  30421. "description": "Experimental event stream route."
  30422. },
  30423. {
  30424. "name": "session questions",
  30425. "description": "Experimental session question routes."
  30426. },
  30427. {
  30428. "name": "reference",
  30429. "description": "Location-scoped project references."
  30430. },
  30431. {
  30432. "name": "pty",
  30433. "description": "PTY websocket route."
  30434. }
  30435. ]
  30436. }