openapi.json 751 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/project/{projectID}/directories": {
  3703. "get": {
  3704. "tags": ["project"],
  3705. "operationId": "project.directories",
  3706. "parameters": [
  3707. {
  3708. "name": "projectID",
  3709. "in": "path",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": true
  3714. },
  3715. {
  3716. "name": "directory",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. },
  3723. {
  3724. "name": "workspace",
  3725. "in": "query",
  3726. "schema": {
  3727. "type": "string"
  3728. },
  3729. "required": false
  3730. }
  3731. ],
  3732. "responses": {
  3733. "200": {
  3734. "description": "Project directories",
  3735. "content": {
  3736. "application/json": {
  3737. "schema": {
  3738. "$ref": "#/components/schemas/ProjectDirectories"
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "400": {
  3744. "description": "Bad request",
  3745. "content": {
  3746. "application/json": {
  3747. "schema": {
  3748. "$ref": "#/components/schemas/BadRequestError"
  3749. }
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "description": "List known local absolute directories for a project.",
  3755. "summary": "List project directories",
  3756. "x-codeSamples": [
  3757. {
  3758. "lang": "js",
  3759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3760. }
  3761. ]
  3762. }
  3763. },
  3764. "/experimental/project/{projectID}/copy": {
  3765. "post": {
  3766. "tags": ["projectCopy"],
  3767. "operationId": "experimental.projectCopy.create",
  3768. "parameters": [
  3769. {
  3770. "name": "projectID",
  3771. "in": "path",
  3772. "schema": {
  3773. "type": "string"
  3774. },
  3775. "required": true
  3776. },
  3777. {
  3778. "name": "directory",
  3779. "in": "query",
  3780. "schema": {
  3781. "type": "string"
  3782. },
  3783. "required": false
  3784. },
  3785. {
  3786. "name": "workspace",
  3787. "in": "query",
  3788. "schema": {
  3789. "type": "string"
  3790. },
  3791. "required": false
  3792. }
  3793. ],
  3794. "responses": {
  3795. "200": {
  3796. "description": "Project copy created",
  3797. "content": {
  3798. "application/json": {
  3799. "schema": {
  3800. "$ref": "#/components/schemas/ProjectCopyCopy"
  3801. }
  3802. }
  3803. }
  3804. },
  3805. "400": {
  3806. "description": "BadRequest | InvalidRequestError",
  3807. "content": {
  3808. "application/json": {
  3809. "schema": {
  3810. "anyOf": [
  3811. {
  3812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3813. },
  3814. {
  3815. "$ref": "#/components/schemas/InvalidRequestError"
  3816. }
  3817. ]
  3818. }
  3819. }
  3820. }
  3821. }
  3822. },
  3823. "description": "Create a local physical copy of a project using the selected strategy.",
  3824. "summary": "Create project copy",
  3825. "requestBody": {
  3826. "content": {
  3827. "application/json": {
  3828. "schema": {
  3829. "type": "object",
  3830. "properties": {
  3831. "strategy": {
  3832. "type": "string",
  3833. "enum": ["git_worktree"]
  3834. },
  3835. "directory": {
  3836. "type": "string"
  3837. }
  3838. },
  3839. "required": ["strategy", "directory"],
  3840. "additionalProperties": false
  3841. }
  3842. }
  3843. }
  3844. },
  3845. "x-codeSamples": [
  3846. {
  3847. "lang": "js",
  3848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3849. }
  3850. ]
  3851. },
  3852. "delete": {
  3853. "tags": ["projectCopy"],
  3854. "operationId": "experimental.projectCopy.remove",
  3855. "parameters": [
  3856. {
  3857. "name": "projectID",
  3858. "in": "path",
  3859. "schema": {
  3860. "type": "string"
  3861. },
  3862. "required": true
  3863. },
  3864. {
  3865. "name": "directory",
  3866. "in": "query",
  3867. "schema": {
  3868. "type": "string"
  3869. },
  3870. "required": false
  3871. },
  3872. {
  3873. "name": "workspace",
  3874. "in": "query",
  3875. "schema": {
  3876. "type": "string"
  3877. },
  3878. "required": false
  3879. }
  3880. ],
  3881. "responses": {
  3882. "204": {
  3883. "description": "Project copy removed"
  3884. },
  3885. "400": {
  3886. "description": "BadRequest | InvalidRequestError",
  3887. "content": {
  3888. "application/json": {
  3889. "schema": {
  3890. "anyOf": [
  3891. {
  3892. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3893. },
  3894. {
  3895. "$ref": "#/components/schemas/InvalidRequestError"
  3896. }
  3897. ]
  3898. }
  3899. }
  3900. }
  3901. }
  3902. },
  3903. "description": "Remove a local physical copy of a project using the selected strategy.",
  3904. "summary": "Remove project copy",
  3905. "requestBody": {
  3906. "content": {
  3907. "application/json": {
  3908. "schema": {
  3909. "type": "object",
  3910. "properties": {
  3911. "directory": {
  3912. "type": "string"
  3913. }
  3914. },
  3915. "required": ["directory"],
  3916. "additionalProperties": false
  3917. }
  3918. }
  3919. }
  3920. },
  3921. "x-codeSamples": [
  3922. {
  3923. "lang": "js",
  3924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  3925. }
  3926. ]
  3927. }
  3928. },
  3929. "/experimental/project/{projectID}/copy/refresh": {
  3930. "post": {
  3931. "tags": ["projectCopy"],
  3932. "operationId": "experimental.projectCopy.refresh",
  3933. "parameters": [
  3934. {
  3935. "name": "projectID",
  3936. "in": "path",
  3937. "schema": {
  3938. "type": "string"
  3939. },
  3940. "required": true
  3941. },
  3942. {
  3943. "name": "directory",
  3944. "in": "query",
  3945. "schema": {
  3946. "type": "string"
  3947. },
  3948. "required": false
  3949. },
  3950. {
  3951. "name": "workspace",
  3952. "in": "query",
  3953. "schema": {
  3954. "type": "string"
  3955. },
  3956. "required": false
  3957. }
  3958. ],
  3959. "responses": {
  3960. "204": {
  3961. "description": "Project copies refreshed"
  3962. },
  3963. "400": {
  3964. "description": "BadRequest | InvalidRequestError",
  3965. "content": {
  3966. "application/json": {
  3967. "schema": {
  3968. "anyOf": [
  3969. {
  3970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3971. },
  3972. {
  3973. "$ref": "#/components/schemas/InvalidRequestError"
  3974. }
  3975. ]
  3976. }
  3977. }
  3978. }
  3979. }
  3980. },
  3981. "description": "Discover local project copies using one or all configured strategies.",
  3982. "summary": "Refresh project copies",
  3983. "x-codeSamples": [
  3984. {
  3985. "lang": "js",
  3986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  3987. }
  3988. ]
  3989. }
  3990. },
  3991. "/pty/shells": {
  3992. "get": {
  3993. "tags": ["pty"],
  3994. "operationId": "pty.shells",
  3995. "parameters": [
  3996. {
  3997. "name": "directory",
  3998. "in": "query",
  3999. "schema": {
  4000. "type": "string"
  4001. },
  4002. "required": false
  4003. },
  4004. {
  4005. "name": "workspace",
  4006. "in": "query",
  4007. "schema": {
  4008. "type": "string"
  4009. },
  4010. "required": false
  4011. }
  4012. ],
  4013. "responses": {
  4014. "200": {
  4015. "description": "List of shells",
  4016. "content": {
  4017. "application/json": {
  4018. "schema": {
  4019. "type": "array",
  4020. "items": {
  4021. "type": "object",
  4022. "properties": {
  4023. "path": {
  4024. "type": "string"
  4025. },
  4026. "name": {
  4027. "type": "string"
  4028. },
  4029. "acceptable": {
  4030. "type": "boolean"
  4031. }
  4032. },
  4033. "required": ["path", "name", "acceptable"],
  4034. "additionalProperties": false
  4035. },
  4036. "description": "List of shells"
  4037. }
  4038. }
  4039. }
  4040. },
  4041. "400": {
  4042. "description": "Bad request",
  4043. "content": {
  4044. "application/json": {
  4045. "schema": {
  4046. "$ref": "#/components/schemas/BadRequestError"
  4047. }
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "description": "Get a list of available shells on the system.",
  4053. "summary": "List available shells",
  4054. "x-codeSamples": [
  4055. {
  4056. "lang": "js",
  4057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4058. }
  4059. ]
  4060. }
  4061. },
  4062. "/pty": {
  4063. "get": {
  4064. "tags": ["pty"],
  4065. "operationId": "pty.list",
  4066. "parameters": [
  4067. {
  4068. "name": "directory",
  4069. "in": "query",
  4070. "schema": {
  4071. "type": "string"
  4072. },
  4073. "required": false
  4074. },
  4075. {
  4076. "name": "workspace",
  4077. "in": "query",
  4078. "schema": {
  4079. "type": "string"
  4080. },
  4081. "required": false
  4082. }
  4083. ],
  4084. "responses": {
  4085. "200": {
  4086. "description": "List of sessions",
  4087. "content": {
  4088. "application/json": {
  4089. "schema": {
  4090. "type": "array",
  4091. "items": {
  4092. "$ref": "#/components/schemas/Pty"
  4093. },
  4094. "description": "List of sessions"
  4095. }
  4096. }
  4097. }
  4098. },
  4099. "400": {
  4100. "description": "Bad request",
  4101. "content": {
  4102. "application/json": {
  4103. "schema": {
  4104. "$ref": "#/components/schemas/BadRequestError"
  4105. }
  4106. }
  4107. }
  4108. }
  4109. },
  4110. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4111. "summary": "List PTY sessions",
  4112. "x-codeSamples": [
  4113. {
  4114. "lang": "js",
  4115. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4116. }
  4117. ]
  4118. },
  4119. "post": {
  4120. "tags": ["pty"],
  4121. "operationId": "pty.create",
  4122. "parameters": [
  4123. {
  4124. "name": "directory",
  4125. "in": "query",
  4126. "schema": {
  4127. "type": "string"
  4128. },
  4129. "required": false
  4130. },
  4131. {
  4132. "name": "workspace",
  4133. "in": "query",
  4134. "schema": {
  4135. "type": "string"
  4136. },
  4137. "required": false
  4138. }
  4139. ],
  4140. "responses": {
  4141. "200": {
  4142. "description": "Created session",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/Pty"
  4147. }
  4148. }
  4149. }
  4150. },
  4151. "400": {
  4152. "description": "BadRequest | InvalidRequestError",
  4153. "content": {
  4154. "application/json": {
  4155. "schema": {
  4156. "anyOf": [
  4157. {
  4158. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4159. },
  4160. {
  4161. "$ref": "#/components/schemas/InvalidRequestError"
  4162. }
  4163. ]
  4164. }
  4165. }
  4166. }
  4167. }
  4168. },
  4169. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4170. "summary": "Create PTY session",
  4171. "requestBody": {
  4172. "content": {
  4173. "application/json": {
  4174. "schema": {
  4175. "type": "object",
  4176. "properties": {
  4177. "command": {
  4178. "type": "string"
  4179. },
  4180. "args": {
  4181. "type": "array",
  4182. "items": {
  4183. "type": "string"
  4184. }
  4185. },
  4186. "cwd": {
  4187. "type": "string"
  4188. },
  4189. "title": {
  4190. "type": "string"
  4191. },
  4192. "env": {
  4193. "type": "object",
  4194. "additionalProperties": {
  4195. "type": "string"
  4196. }
  4197. }
  4198. },
  4199. "additionalProperties": false
  4200. }
  4201. }
  4202. }
  4203. },
  4204. "x-codeSamples": [
  4205. {
  4206. "lang": "js",
  4207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4208. }
  4209. ]
  4210. }
  4211. },
  4212. "/pty/{ptyID}": {
  4213. "get": {
  4214. "tags": ["pty"],
  4215. "operationId": "pty.get",
  4216. "parameters": [
  4217. {
  4218. "name": "ptyID",
  4219. "in": "path",
  4220. "schema": {
  4221. "type": "string",
  4222. "pattern": "^pty"
  4223. },
  4224. "required": true
  4225. },
  4226. {
  4227. "name": "directory",
  4228. "in": "query",
  4229. "schema": {
  4230. "type": "string"
  4231. },
  4232. "required": false
  4233. },
  4234. {
  4235. "name": "workspace",
  4236. "in": "query",
  4237. "schema": {
  4238. "type": "string"
  4239. },
  4240. "required": false
  4241. }
  4242. ],
  4243. "responses": {
  4244. "200": {
  4245. "description": "Session info",
  4246. "content": {
  4247. "application/json": {
  4248. "schema": {
  4249. "$ref": "#/components/schemas/Pty"
  4250. }
  4251. }
  4252. }
  4253. },
  4254. "400": {
  4255. "description": "Bad request",
  4256. "content": {
  4257. "application/json": {
  4258. "schema": {
  4259. "$ref": "#/components/schemas/BadRequestError"
  4260. }
  4261. }
  4262. }
  4263. },
  4264. "404": {
  4265. "description": "PtyNotFoundError",
  4266. "content": {
  4267. "application/json": {
  4268. "schema": {
  4269. "$ref": "#/components/schemas/PtyNotFoundError"
  4270. }
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4276. "summary": "Get PTY session",
  4277. "x-codeSamples": [
  4278. {
  4279. "lang": "js",
  4280. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4281. }
  4282. ]
  4283. },
  4284. "put": {
  4285. "tags": ["pty"],
  4286. "operationId": "pty.update",
  4287. "parameters": [
  4288. {
  4289. "name": "ptyID",
  4290. "in": "path",
  4291. "schema": {
  4292. "type": "string",
  4293. "pattern": "^pty"
  4294. },
  4295. "required": true
  4296. },
  4297. {
  4298. "name": "directory",
  4299. "in": "query",
  4300. "schema": {
  4301. "type": "string"
  4302. },
  4303. "required": false
  4304. },
  4305. {
  4306. "name": "workspace",
  4307. "in": "query",
  4308. "schema": {
  4309. "type": "string"
  4310. },
  4311. "required": false
  4312. }
  4313. ],
  4314. "responses": {
  4315. "200": {
  4316. "description": "Updated session",
  4317. "content": {
  4318. "application/json": {
  4319. "schema": {
  4320. "$ref": "#/components/schemas/Pty"
  4321. }
  4322. }
  4323. }
  4324. },
  4325. "400": {
  4326. "description": "BadRequest | InvalidRequestError",
  4327. "content": {
  4328. "application/json": {
  4329. "schema": {
  4330. "anyOf": [
  4331. {
  4332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4333. },
  4334. {
  4335. "$ref": "#/components/schemas/InvalidRequestError"
  4336. }
  4337. ]
  4338. }
  4339. }
  4340. }
  4341. },
  4342. "404": {
  4343. "description": "PtyNotFoundError",
  4344. "content": {
  4345. "application/json": {
  4346. "schema": {
  4347. "$ref": "#/components/schemas/PtyNotFoundError"
  4348. }
  4349. }
  4350. }
  4351. }
  4352. },
  4353. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4354. "summary": "Update PTY session",
  4355. "requestBody": {
  4356. "content": {
  4357. "application/json": {
  4358. "schema": {
  4359. "type": "object",
  4360. "properties": {
  4361. "title": {
  4362. "type": "string"
  4363. },
  4364. "size": {
  4365. "type": "object",
  4366. "properties": {
  4367. "rows": {
  4368. "type": "integer",
  4369. "exclusiveMinimum": 0
  4370. },
  4371. "cols": {
  4372. "type": "integer",
  4373. "exclusiveMinimum": 0
  4374. }
  4375. },
  4376. "required": ["rows", "cols"],
  4377. "additionalProperties": false
  4378. }
  4379. },
  4380. "additionalProperties": false
  4381. }
  4382. }
  4383. }
  4384. },
  4385. "x-codeSamples": [
  4386. {
  4387. "lang": "js",
  4388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4389. }
  4390. ]
  4391. },
  4392. "delete": {
  4393. "tags": ["pty"],
  4394. "operationId": "pty.remove",
  4395. "parameters": [
  4396. {
  4397. "name": "ptyID",
  4398. "in": "path",
  4399. "schema": {
  4400. "type": "string",
  4401. "pattern": "^pty"
  4402. },
  4403. "required": true
  4404. },
  4405. {
  4406. "name": "directory",
  4407. "in": "query",
  4408. "schema": {
  4409. "type": "string"
  4410. },
  4411. "required": false
  4412. },
  4413. {
  4414. "name": "workspace",
  4415. "in": "query",
  4416. "schema": {
  4417. "type": "string"
  4418. },
  4419. "required": false
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "description": "Session removed",
  4425. "content": {
  4426. "application/json": {
  4427. "schema": {
  4428. "type": "boolean",
  4429. "description": "Session removed"
  4430. }
  4431. }
  4432. }
  4433. },
  4434. "400": {
  4435. "description": "Bad request",
  4436. "content": {
  4437. "application/json": {
  4438. "schema": {
  4439. "$ref": "#/components/schemas/BadRequestError"
  4440. }
  4441. }
  4442. }
  4443. },
  4444. "404": {
  4445. "description": "PtyNotFoundError",
  4446. "content": {
  4447. "application/json": {
  4448. "schema": {
  4449. "$ref": "#/components/schemas/PtyNotFoundError"
  4450. }
  4451. }
  4452. }
  4453. }
  4454. },
  4455. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4456. "summary": "Remove PTY session",
  4457. "x-codeSamples": [
  4458. {
  4459. "lang": "js",
  4460. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4461. }
  4462. ]
  4463. }
  4464. },
  4465. "/pty/{ptyID}/connect-token": {
  4466. "post": {
  4467. "tags": ["pty"],
  4468. "operationId": "pty.connectToken",
  4469. "parameters": [
  4470. {
  4471. "name": "ptyID",
  4472. "in": "path",
  4473. "schema": {
  4474. "type": "string",
  4475. "pattern": "^pty"
  4476. },
  4477. "required": true
  4478. },
  4479. {
  4480. "name": "directory",
  4481. "in": "query",
  4482. "schema": {
  4483. "type": "string"
  4484. },
  4485. "required": false
  4486. },
  4487. {
  4488. "name": "workspace",
  4489. "in": "query",
  4490. "schema": {
  4491. "type": "string"
  4492. },
  4493. "required": false
  4494. }
  4495. ],
  4496. "responses": {
  4497. "200": {
  4498. "description": "WebSocket connect token",
  4499. "content": {
  4500. "application/json": {
  4501. "schema": {
  4502. "type": "object",
  4503. "properties": {
  4504. "ticket": {
  4505. "type": "string"
  4506. },
  4507. "expires_in": {
  4508. "type": "integer",
  4509. "exclusiveMinimum": 0
  4510. }
  4511. },
  4512. "required": ["ticket", "expires_in"],
  4513. "additionalProperties": false,
  4514. "description": "WebSocket connect token"
  4515. }
  4516. }
  4517. }
  4518. },
  4519. "400": {
  4520. "description": "Bad request",
  4521. "content": {
  4522. "application/json": {
  4523. "schema": {
  4524. "$ref": "#/components/schemas/BadRequestError"
  4525. }
  4526. }
  4527. }
  4528. },
  4529. "403": {
  4530. "description": "PtyForbiddenError",
  4531. "content": {
  4532. "application/json": {
  4533. "schema": {
  4534. "$ref": "#/components/schemas/PtyForbiddenError"
  4535. }
  4536. }
  4537. }
  4538. },
  4539. "404": {
  4540. "description": "PtyNotFoundError",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "$ref": "#/components/schemas/PtyNotFoundError"
  4545. }
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4551. "summary": "Create PTY WebSocket token",
  4552. "x-codeSamples": [
  4553. {
  4554. "lang": "js",
  4555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4556. }
  4557. ]
  4558. }
  4559. },
  4560. "/question": {
  4561. "get": {
  4562. "tags": ["question"],
  4563. "operationId": "question.list",
  4564. "parameters": [
  4565. {
  4566. "name": "directory",
  4567. "in": "query",
  4568. "schema": {
  4569. "type": "string"
  4570. },
  4571. "required": false
  4572. },
  4573. {
  4574. "name": "workspace",
  4575. "in": "query",
  4576. "schema": {
  4577. "type": "string"
  4578. },
  4579. "required": false
  4580. }
  4581. ],
  4582. "responses": {
  4583. "200": {
  4584. "description": "List of pending questions",
  4585. "content": {
  4586. "application/json": {
  4587. "schema": {
  4588. "type": "array",
  4589. "items": {
  4590. "$ref": "#/components/schemas/QuestionRequest"
  4591. },
  4592. "description": "List of pending questions"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "400": {
  4598. "description": "Bad request",
  4599. "content": {
  4600. "application/json": {
  4601. "schema": {
  4602. "$ref": "#/components/schemas/BadRequestError"
  4603. }
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "description": "Get all pending question requests across all sessions.",
  4609. "summary": "List pending questions",
  4610. "x-codeSamples": [
  4611. {
  4612. "lang": "js",
  4613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4614. }
  4615. ]
  4616. }
  4617. },
  4618. "/question/{requestID}/reply": {
  4619. "post": {
  4620. "tags": ["question"],
  4621. "operationId": "question.reply",
  4622. "parameters": [
  4623. {
  4624. "name": "requestID",
  4625. "in": "path",
  4626. "schema": {
  4627. "type": "string",
  4628. "pattern": "^que"
  4629. },
  4630. "required": true
  4631. },
  4632. {
  4633. "name": "directory",
  4634. "in": "query",
  4635. "schema": {
  4636. "type": "string"
  4637. },
  4638. "required": false
  4639. },
  4640. {
  4641. "name": "workspace",
  4642. "in": "query",
  4643. "schema": {
  4644. "type": "string"
  4645. },
  4646. "required": false
  4647. }
  4648. ],
  4649. "responses": {
  4650. "200": {
  4651. "description": "Question answered successfully",
  4652. "content": {
  4653. "application/json": {
  4654. "schema": {
  4655. "type": "boolean",
  4656. "description": "Question answered successfully"
  4657. }
  4658. }
  4659. }
  4660. },
  4661. "400": {
  4662. "description": "BadRequest | InvalidRequestError",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "anyOf": [
  4667. {
  4668. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4669. },
  4670. {
  4671. "$ref": "#/components/schemas/InvalidRequestError"
  4672. }
  4673. ]
  4674. }
  4675. }
  4676. }
  4677. },
  4678. "404": {
  4679. "description": "QuestionNotFoundError",
  4680. "content": {
  4681. "application/json": {
  4682. "schema": {
  4683. "$ref": "#/components/schemas/QuestionNotFoundError"
  4684. }
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "description": "Provide answers to a question request from the AI assistant.",
  4690. "summary": "Reply to question request",
  4691. "requestBody": {
  4692. "content": {
  4693. "application/json": {
  4694. "schema": {
  4695. "type": "object",
  4696. "properties": {
  4697. "answers": {
  4698. "type": "array",
  4699. "items": {
  4700. "$ref": "#/components/schemas/QuestionAnswer"
  4701. },
  4702. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4703. }
  4704. },
  4705. "required": ["answers"],
  4706. "additionalProperties": false
  4707. }
  4708. }
  4709. }
  4710. },
  4711. "x-codeSamples": [
  4712. {
  4713. "lang": "js",
  4714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4715. }
  4716. ]
  4717. }
  4718. },
  4719. "/question/{requestID}/reject": {
  4720. "post": {
  4721. "tags": ["question"],
  4722. "operationId": "question.reject",
  4723. "parameters": [
  4724. {
  4725. "name": "requestID",
  4726. "in": "path",
  4727. "schema": {
  4728. "type": "string",
  4729. "pattern": "^que"
  4730. },
  4731. "required": true
  4732. },
  4733. {
  4734. "name": "directory",
  4735. "in": "query",
  4736. "schema": {
  4737. "type": "string"
  4738. },
  4739. "required": false
  4740. },
  4741. {
  4742. "name": "workspace",
  4743. "in": "query",
  4744. "schema": {
  4745. "type": "string"
  4746. },
  4747. "required": false
  4748. }
  4749. ],
  4750. "responses": {
  4751. "200": {
  4752. "description": "Question rejected successfully",
  4753. "content": {
  4754. "application/json": {
  4755. "schema": {
  4756. "type": "boolean",
  4757. "description": "Question rejected successfully"
  4758. }
  4759. }
  4760. }
  4761. },
  4762. "400": {
  4763. "description": "BadRequest | InvalidRequestError",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "anyOf": [
  4768. {
  4769. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4770. },
  4771. {
  4772. "$ref": "#/components/schemas/InvalidRequestError"
  4773. }
  4774. ]
  4775. }
  4776. }
  4777. }
  4778. },
  4779. "404": {
  4780. "description": "QuestionNotFoundError",
  4781. "content": {
  4782. "application/json": {
  4783. "schema": {
  4784. "$ref": "#/components/schemas/QuestionNotFoundError"
  4785. }
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "description": "Reject a question request from the AI assistant.",
  4791. "summary": "Reject question request",
  4792. "x-codeSamples": [
  4793. {
  4794. "lang": "js",
  4795. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4796. }
  4797. ]
  4798. }
  4799. },
  4800. "/permission": {
  4801. "get": {
  4802. "tags": ["permission"],
  4803. "operationId": "permission.list",
  4804. "parameters": [
  4805. {
  4806. "name": "directory",
  4807. "in": "query",
  4808. "schema": {
  4809. "type": "string"
  4810. },
  4811. "required": false
  4812. },
  4813. {
  4814. "name": "workspace",
  4815. "in": "query",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": false
  4820. }
  4821. ],
  4822. "responses": {
  4823. "200": {
  4824. "description": "List of pending permissions",
  4825. "content": {
  4826. "application/json": {
  4827. "schema": {
  4828. "type": "array",
  4829. "items": {
  4830. "$ref": "#/components/schemas/PermissionRequest"
  4831. },
  4832. "description": "List of pending permissions"
  4833. }
  4834. }
  4835. }
  4836. },
  4837. "400": {
  4838. "description": "Bad request",
  4839. "content": {
  4840. "application/json": {
  4841. "schema": {
  4842. "$ref": "#/components/schemas/BadRequestError"
  4843. }
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "description": "Get all pending permission requests across all sessions.",
  4849. "summary": "List pending permissions",
  4850. "x-codeSamples": [
  4851. {
  4852. "lang": "js",
  4853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4854. }
  4855. ]
  4856. }
  4857. },
  4858. "/permission/{requestID}/reply": {
  4859. "post": {
  4860. "tags": ["permission"],
  4861. "operationId": "permission.reply",
  4862. "parameters": [
  4863. {
  4864. "name": "requestID",
  4865. "in": "path",
  4866. "schema": {
  4867. "type": "string",
  4868. "pattern": "^per"
  4869. },
  4870. "required": true
  4871. },
  4872. {
  4873. "name": "directory",
  4874. "in": "query",
  4875. "schema": {
  4876. "type": "string"
  4877. },
  4878. "required": false
  4879. },
  4880. {
  4881. "name": "workspace",
  4882. "in": "query",
  4883. "schema": {
  4884. "type": "string"
  4885. },
  4886. "required": false
  4887. }
  4888. ],
  4889. "responses": {
  4890. "200": {
  4891. "description": "Permission processed successfully",
  4892. "content": {
  4893. "application/json": {
  4894. "schema": {
  4895. "type": "boolean",
  4896. "description": "Permission processed successfully"
  4897. }
  4898. }
  4899. }
  4900. },
  4901. "400": {
  4902. "description": "BadRequest | InvalidRequestError",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "anyOf": [
  4907. {
  4908. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4909. },
  4910. {
  4911. "$ref": "#/components/schemas/InvalidRequestError"
  4912. }
  4913. ]
  4914. }
  4915. }
  4916. }
  4917. },
  4918. "404": {
  4919. "description": "PermissionNotFoundError",
  4920. "content": {
  4921. "application/json": {
  4922. "schema": {
  4923. "$ref": "#/components/schemas/PermissionNotFoundError"
  4924. }
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "description": "Approve or deny a permission request from the AI assistant.",
  4930. "summary": "Respond to permission request",
  4931. "requestBody": {
  4932. "content": {
  4933. "application/json": {
  4934. "schema": {
  4935. "type": "object",
  4936. "properties": {
  4937. "reply": {
  4938. "type": "string",
  4939. "enum": ["once", "always", "reject"]
  4940. },
  4941. "message": {
  4942. "type": "string"
  4943. }
  4944. },
  4945. "required": ["reply"],
  4946. "additionalProperties": false
  4947. }
  4948. }
  4949. }
  4950. },
  4951. "x-codeSamples": [
  4952. {
  4953. "lang": "js",
  4954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4955. }
  4956. ]
  4957. }
  4958. },
  4959. "/provider": {
  4960. "get": {
  4961. "tags": ["provider"],
  4962. "operationId": "provider.list",
  4963. "parameters": [
  4964. {
  4965. "name": "directory",
  4966. "in": "query",
  4967. "schema": {
  4968. "type": "string"
  4969. },
  4970. "required": false
  4971. },
  4972. {
  4973. "name": "workspace",
  4974. "in": "query",
  4975. "schema": {
  4976. "type": "string"
  4977. },
  4978. "required": false
  4979. }
  4980. ],
  4981. "responses": {
  4982. "200": {
  4983. "description": "List of providers",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "type": "object",
  4988. "properties": {
  4989. "all": {
  4990. "type": "array",
  4991. "items": {
  4992. "$ref": "#/components/schemas/Provider"
  4993. }
  4994. },
  4995. "default": {
  4996. "type": "object",
  4997. "additionalProperties": {
  4998. "type": "string"
  4999. }
  5000. },
  5001. "connected": {
  5002. "type": "array",
  5003. "items": {
  5004. "type": "string"
  5005. }
  5006. }
  5007. },
  5008. "required": ["all", "default", "connected"],
  5009. "additionalProperties": false,
  5010. "description": "List of providers"
  5011. }
  5012. }
  5013. }
  5014. },
  5015. "400": {
  5016. "description": "Bad request",
  5017. "content": {
  5018. "application/json": {
  5019. "schema": {
  5020. "$ref": "#/components/schemas/BadRequestError"
  5021. }
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5027. "summary": "List providers",
  5028. "x-codeSamples": [
  5029. {
  5030. "lang": "js",
  5031. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5032. }
  5033. ]
  5034. }
  5035. },
  5036. "/provider/auth": {
  5037. "get": {
  5038. "tags": ["provider"],
  5039. "operationId": "provider.auth",
  5040. "parameters": [
  5041. {
  5042. "name": "directory",
  5043. "in": "query",
  5044. "schema": {
  5045. "type": "string"
  5046. },
  5047. "required": false
  5048. },
  5049. {
  5050. "name": "workspace",
  5051. "in": "query",
  5052. "schema": {
  5053. "type": "string"
  5054. },
  5055. "required": false
  5056. }
  5057. ],
  5058. "responses": {
  5059. "200": {
  5060. "description": "Provider auth methods",
  5061. "content": {
  5062. "application/json": {
  5063. "schema": {
  5064. "type": "object",
  5065. "additionalProperties": {
  5066. "type": "array",
  5067. "items": {
  5068. "$ref": "#/components/schemas/ProviderAuthMethod"
  5069. }
  5070. },
  5071. "description": "Provider auth methods"
  5072. }
  5073. }
  5074. }
  5075. },
  5076. "400": {
  5077. "description": "Bad request",
  5078. "content": {
  5079. "application/json": {
  5080. "schema": {
  5081. "$ref": "#/components/schemas/BadRequestError"
  5082. }
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "description": "Retrieve available authentication methods for all AI providers.",
  5088. "summary": "Get provider auth methods",
  5089. "x-codeSamples": [
  5090. {
  5091. "lang": "js",
  5092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5093. }
  5094. ]
  5095. }
  5096. },
  5097. "/provider/{providerID}/oauth/authorize": {
  5098. "post": {
  5099. "tags": ["provider"],
  5100. "operationId": "provider.oauth.authorize",
  5101. "parameters": [
  5102. {
  5103. "name": "providerID",
  5104. "in": "path",
  5105. "schema": {
  5106. "type": "string"
  5107. },
  5108. "required": true
  5109. },
  5110. {
  5111. "name": "directory",
  5112. "in": "query",
  5113. "schema": {
  5114. "type": "string"
  5115. },
  5116. "required": false
  5117. },
  5118. {
  5119. "name": "workspace",
  5120. "in": "query",
  5121. "schema": {
  5122. "type": "string"
  5123. },
  5124. "required": false
  5125. }
  5126. ],
  5127. "responses": {
  5128. "200": {
  5129. "description": "Authorization URL and method",
  5130. "content": {
  5131. "application/json": {
  5132. "schema": {
  5133. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5134. }
  5135. }
  5136. }
  5137. },
  5138. "400": {
  5139. "description": "ProviderAuthError | InvalidRequestError",
  5140. "content": {
  5141. "application/json": {
  5142. "schema": {
  5143. "anyOf": [
  5144. {
  5145. "$ref": "#/components/schemas/ProviderAuthError1"
  5146. },
  5147. {
  5148. "$ref": "#/components/schemas/InvalidRequestError"
  5149. }
  5150. ]
  5151. }
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "description": "Start the OAuth authorization flow for a provider.",
  5157. "summary": "Start OAuth authorization",
  5158. "requestBody": {
  5159. "content": {
  5160. "application/json": {
  5161. "schema": {
  5162. "type": "object",
  5163. "properties": {
  5164. "method": {
  5165. "type": "number",
  5166. "description": "Auth method index"
  5167. },
  5168. "inputs": {
  5169. "type": "object",
  5170. "additionalProperties": {
  5171. "type": "string"
  5172. }
  5173. }
  5174. },
  5175. "required": ["method"],
  5176. "additionalProperties": false
  5177. }
  5178. }
  5179. }
  5180. },
  5181. "x-codeSamples": [
  5182. {
  5183. "lang": "js",
  5184. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5185. }
  5186. ]
  5187. }
  5188. },
  5189. "/provider/{providerID}/oauth/callback": {
  5190. "post": {
  5191. "tags": ["provider"],
  5192. "operationId": "provider.oauth.callback",
  5193. "parameters": [
  5194. {
  5195. "name": "providerID",
  5196. "in": "path",
  5197. "schema": {
  5198. "type": "string"
  5199. },
  5200. "required": true
  5201. },
  5202. {
  5203. "name": "directory",
  5204. "in": "query",
  5205. "schema": {
  5206. "type": "string"
  5207. },
  5208. "required": false
  5209. },
  5210. {
  5211. "name": "workspace",
  5212. "in": "query",
  5213. "schema": {
  5214. "type": "string"
  5215. },
  5216. "required": false
  5217. }
  5218. ],
  5219. "responses": {
  5220. "200": {
  5221. "description": "OAuth callback processed successfully",
  5222. "content": {
  5223. "application/json": {
  5224. "schema": {
  5225. "type": "boolean",
  5226. "description": "OAuth callback processed successfully"
  5227. }
  5228. }
  5229. }
  5230. },
  5231. "400": {
  5232. "description": "ProviderAuthError | InvalidRequestError",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "anyOf": [
  5237. {
  5238. "$ref": "#/components/schemas/ProviderAuthError1"
  5239. },
  5240. {
  5241. "$ref": "#/components/schemas/InvalidRequestError"
  5242. }
  5243. ]
  5244. }
  5245. }
  5246. }
  5247. }
  5248. },
  5249. "description": "Handle the OAuth callback from a provider after user authorization.",
  5250. "summary": "Handle OAuth callback",
  5251. "requestBody": {
  5252. "content": {
  5253. "application/json": {
  5254. "schema": {
  5255. "type": "object",
  5256. "properties": {
  5257. "method": {
  5258. "type": "number",
  5259. "description": "Auth method index"
  5260. },
  5261. "code": {
  5262. "type": "string"
  5263. }
  5264. },
  5265. "required": ["method"],
  5266. "additionalProperties": false
  5267. }
  5268. }
  5269. }
  5270. },
  5271. "x-codeSamples": [
  5272. {
  5273. "lang": "js",
  5274. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5275. }
  5276. ]
  5277. }
  5278. },
  5279. "/session": {
  5280. "get": {
  5281. "tags": ["session"],
  5282. "operationId": "session.list",
  5283. "parameters": [
  5284. {
  5285. "name": "directory",
  5286. "in": "query",
  5287. "schema": {
  5288. "type": "string"
  5289. },
  5290. "required": false
  5291. },
  5292. {
  5293. "name": "workspace",
  5294. "in": "query",
  5295. "schema": {
  5296. "type": "string"
  5297. },
  5298. "required": false
  5299. },
  5300. {
  5301. "name": "scope",
  5302. "in": "query",
  5303. "schema": {
  5304. "type": "string",
  5305. "enum": ["project"]
  5306. },
  5307. "required": false
  5308. },
  5309. {
  5310. "name": "path",
  5311. "in": "query",
  5312. "schema": {
  5313. "type": "string"
  5314. },
  5315. "required": false
  5316. },
  5317. {
  5318. "name": "roots",
  5319. "in": "query",
  5320. "schema": {
  5321. "anyOf": [
  5322. {
  5323. "type": "boolean"
  5324. },
  5325. {
  5326. "type": "string",
  5327. "enum": ["true", "false"]
  5328. }
  5329. ]
  5330. },
  5331. "required": false
  5332. },
  5333. {
  5334. "name": "start",
  5335. "in": "query",
  5336. "schema": {
  5337. "type": "number"
  5338. },
  5339. "required": false
  5340. },
  5341. {
  5342. "name": "search",
  5343. "in": "query",
  5344. "schema": {
  5345. "type": "string"
  5346. },
  5347. "required": false
  5348. },
  5349. {
  5350. "name": "limit",
  5351. "in": "query",
  5352. "schema": {
  5353. "type": "number"
  5354. },
  5355. "required": false
  5356. }
  5357. ],
  5358. "responses": {
  5359. "200": {
  5360. "description": "List of sessions",
  5361. "content": {
  5362. "application/json": {
  5363. "schema": {
  5364. "type": "array",
  5365. "items": {
  5366. "$ref": "#/components/schemas/Session"
  5367. },
  5368. "description": "List of sessions"
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "400": {
  5374. "description": "Bad request",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "$ref": "#/components/schemas/BadRequestError"
  5379. }
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5385. "summary": "List sessions",
  5386. "x-codeSamples": [
  5387. {
  5388. "lang": "js",
  5389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5390. }
  5391. ]
  5392. },
  5393. "post": {
  5394. "tags": ["session"],
  5395. "operationId": "session.create",
  5396. "parameters": [
  5397. {
  5398. "name": "directory",
  5399. "in": "query",
  5400. "schema": {
  5401. "type": "string"
  5402. },
  5403. "required": false
  5404. },
  5405. {
  5406. "name": "workspace",
  5407. "in": "query",
  5408. "schema": {
  5409. "type": "string"
  5410. },
  5411. "required": false
  5412. }
  5413. ],
  5414. "responses": {
  5415. "200": {
  5416. "description": "Successfully created session",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/Session"
  5421. }
  5422. }
  5423. }
  5424. },
  5425. "400": {
  5426. "description": "BadRequest | InvalidRequestError",
  5427. "content": {
  5428. "application/json": {
  5429. "schema": {
  5430. "anyOf": [
  5431. {
  5432. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5433. },
  5434. {
  5435. "$ref": "#/components/schemas/InvalidRequestError"
  5436. }
  5437. ]
  5438. }
  5439. }
  5440. }
  5441. }
  5442. },
  5443. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5444. "summary": "Create session",
  5445. "requestBody": {
  5446. "content": {
  5447. "application/json": {
  5448. "schema": {
  5449. "type": "object",
  5450. "properties": {
  5451. "parentID": {
  5452. "type": "string",
  5453. "pattern": "^ses"
  5454. },
  5455. "title": {
  5456. "type": "string"
  5457. },
  5458. "agent": {
  5459. "type": "string"
  5460. },
  5461. "model": {
  5462. "type": "object",
  5463. "properties": {
  5464. "id": {
  5465. "type": "string"
  5466. },
  5467. "providerID": {
  5468. "type": "string"
  5469. },
  5470. "variant": {
  5471. "type": "string"
  5472. }
  5473. },
  5474. "required": ["id", "providerID"],
  5475. "additionalProperties": false
  5476. },
  5477. "metadata": {
  5478. "type": "object"
  5479. },
  5480. "permission": {
  5481. "$ref": "#/components/schemas/PermissionRuleset"
  5482. },
  5483. "workspaceID": {
  5484. "type": "string",
  5485. "pattern": "^wrk"
  5486. }
  5487. },
  5488. "additionalProperties": false
  5489. }
  5490. }
  5491. }
  5492. },
  5493. "x-codeSamples": [
  5494. {
  5495. "lang": "js",
  5496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5497. }
  5498. ]
  5499. }
  5500. },
  5501. "/session/status": {
  5502. "get": {
  5503. "tags": ["session"],
  5504. "operationId": "session.status",
  5505. "parameters": [
  5506. {
  5507. "name": "directory",
  5508. "in": "query",
  5509. "schema": {
  5510. "type": "string"
  5511. },
  5512. "required": false
  5513. },
  5514. {
  5515. "name": "workspace",
  5516. "in": "query",
  5517. "schema": {
  5518. "type": "string"
  5519. },
  5520. "required": false
  5521. }
  5522. ],
  5523. "responses": {
  5524. "200": {
  5525. "description": "Get session status",
  5526. "content": {
  5527. "application/json": {
  5528. "schema": {
  5529. "type": "object",
  5530. "additionalProperties": {
  5531. "$ref": "#/components/schemas/SessionStatus"
  5532. },
  5533. "description": "Get session status"
  5534. }
  5535. }
  5536. }
  5537. },
  5538. "400": {
  5539. "description": "BadRequest | InvalidRequestError",
  5540. "content": {
  5541. "application/json": {
  5542. "schema": {
  5543. "anyOf": [
  5544. {
  5545. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5546. },
  5547. {
  5548. "$ref": "#/components/schemas/InvalidRequestError"
  5549. }
  5550. ]
  5551. }
  5552. }
  5553. }
  5554. }
  5555. },
  5556. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5557. "summary": "Get session status",
  5558. "x-codeSamples": [
  5559. {
  5560. "lang": "js",
  5561. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5562. }
  5563. ]
  5564. }
  5565. },
  5566. "/session/{sessionID}": {
  5567. "get": {
  5568. "tags": ["session"],
  5569. "operationId": "session.get",
  5570. "parameters": [
  5571. {
  5572. "name": "sessionID",
  5573. "in": "path",
  5574. "schema": {
  5575. "type": "string",
  5576. "pattern": "^ses"
  5577. },
  5578. "required": true
  5579. },
  5580. {
  5581. "name": "directory",
  5582. "in": "query",
  5583. "schema": {
  5584. "type": "string"
  5585. },
  5586. "required": false
  5587. },
  5588. {
  5589. "name": "workspace",
  5590. "in": "query",
  5591. "schema": {
  5592. "type": "string"
  5593. },
  5594. "required": false
  5595. }
  5596. ],
  5597. "responses": {
  5598. "200": {
  5599. "description": "Get session",
  5600. "content": {
  5601. "application/json": {
  5602. "schema": {
  5603. "$ref": "#/components/schemas/Session"
  5604. }
  5605. }
  5606. }
  5607. },
  5608. "400": {
  5609. "description": "BadRequest | InvalidRequestError",
  5610. "content": {
  5611. "application/json": {
  5612. "schema": {
  5613. "anyOf": [
  5614. {
  5615. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5616. },
  5617. {
  5618. "$ref": "#/components/schemas/InvalidRequestError"
  5619. }
  5620. ]
  5621. }
  5622. }
  5623. }
  5624. },
  5625. "404": {
  5626. "description": "NotFoundError",
  5627. "content": {
  5628. "application/json": {
  5629. "schema": {
  5630. "$ref": "#/components/schemas/NotFoundError"
  5631. }
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "description": "Retrieve detailed information about a specific OpenCode session.",
  5637. "summary": "Get session",
  5638. "x-codeSamples": [
  5639. {
  5640. "lang": "js",
  5641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5642. }
  5643. ]
  5644. },
  5645. "delete": {
  5646. "tags": ["session"],
  5647. "operationId": "session.delete",
  5648. "parameters": [
  5649. {
  5650. "name": "sessionID",
  5651. "in": "path",
  5652. "schema": {
  5653. "type": "string",
  5654. "pattern": "^ses"
  5655. },
  5656. "required": true
  5657. },
  5658. {
  5659. "name": "directory",
  5660. "in": "query",
  5661. "schema": {
  5662. "type": "string"
  5663. },
  5664. "required": false
  5665. },
  5666. {
  5667. "name": "workspace",
  5668. "in": "query",
  5669. "schema": {
  5670. "type": "string"
  5671. },
  5672. "required": false
  5673. }
  5674. ],
  5675. "responses": {
  5676. "200": {
  5677. "description": "Successfully deleted session",
  5678. "content": {
  5679. "application/json": {
  5680. "schema": {
  5681. "type": "boolean",
  5682. "description": "Successfully deleted session"
  5683. }
  5684. }
  5685. }
  5686. },
  5687. "400": {
  5688. "description": "BadRequest | InvalidRequestError",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "anyOf": [
  5693. {
  5694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5695. },
  5696. {
  5697. "$ref": "#/components/schemas/InvalidRequestError"
  5698. }
  5699. ]
  5700. }
  5701. }
  5702. }
  5703. },
  5704. "404": {
  5705. "description": "NotFoundError",
  5706. "content": {
  5707. "application/json": {
  5708. "schema": {
  5709. "$ref": "#/components/schemas/NotFoundError"
  5710. }
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5716. "summary": "Delete session",
  5717. "x-codeSamples": [
  5718. {
  5719. "lang": "js",
  5720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5721. }
  5722. ]
  5723. },
  5724. "patch": {
  5725. "tags": ["session"],
  5726. "operationId": "session.update",
  5727. "parameters": [
  5728. {
  5729. "name": "sessionID",
  5730. "in": "path",
  5731. "schema": {
  5732. "type": "string",
  5733. "pattern": "^ses"
  5734. },
  5735. "required": true
  5736. },
  5737. {
  5738. "name": "directory",
  5739. "in": "query",
  5740. "schema": {
  5741. "type": "string"
  5742. },
  5743. "required": false
  5744. },
  5745. {
  5746. "name": "workspace",
  5747. "in": "query",
  5748. "schema": {
  5749. "type": "string"
  5750. },
  5751. "required": false
  5752. }
  5753. ],
  5754. "responses": {
  5755. "200": {
  5756. "description": "Successfully updated session",
  5757. "content": {
  5758. "application/json": {
  5759. "schema": {
  5760. "$ref": "#/components/schemas/Session"
  5761. }
  5762. }
  5763. }
  5764. },
  5765. "400": {
  5766. "description": "BadRequest | InvalidRequestError",
  5767. "content": {
  5768. "application/json": {
  5769. "schema": {
  5770. "anyOf": [
  5771. {
  5772. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5773. },
  5774. {
  5775. "$ref": "#/components/schemas/InvalidRequestError"
  5776. }
  5777. ]
  5778. }
  5779. }
  5780. }
  5781. },
  5782. "404": {
  5783. "description": "NotFoundError",
  5784. "content": {
  5785. "application/json": {
  5786. "schema": {
  5787. "$ref": "#/components/schemas/NotFoundError"
  5788. }
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "description": "Update properties of an existing session, such as title or other metadata.",
  5794. "summary": "Update session",
  5795. "requestBody": {
  5796. "content": {
  5797. "application/json": {
  5798. "schema": {
  5799. "type": "object",
  5800. "properties": {
  5801. "title": {
  5802. "type": "string"
  5803. },
  5804. "metadata": {
  5805. "type": "object"
  5806. },
  5807. "permission": {
  5808. "$ref": "#/components/schemas/PermissionRuleset"
  5809. },
  5810. "time": {
  5811. "type": "object",
  5812. "properties": {
  5813. "archived": {
  5814. "type": "number"
  5815. }
  5816. },
  5817. "additionalProperties": false
  5818. }
  5819. },
  5820. "additionalProperties": false
  5821. }
  5822. }
  5823. }
  5824. },
  5825. "x-codeSamples": [
  5826. {
  5827. "lang": "js",
  5828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5829. }
  5830. ]
  5831. }
  5832. },
  5833. "/session/{sessionID}/children": {
  5834. "get": {
  5835. "tags": ["session"],
  5836. "operationId": "session.children",
  5837. "parameters": [
  5838. {
  5839. "name": "sessionID",
  5840. "in": "path",
  5841. "schema": {
  5842. "type": "string",
  5843. "pattern": "^ses"
  5844. },
  5845. "required": true
  5846. },
  5847. {
  5848. "name": "directory",
  5849. "in": "query",
  5850. "schema": {
  5851. "type": "string"
  5852. },
  5853. "required": false
  5854. },
  5855. {
  5856. "name": "workspace",
  5857. "in": "query",
  5858. "schema": {
  5859. "type": "string"
  5860. },
  5861. "required": false
  5862. }
  5863. ],
  5864. "responses": {
  5865. "200": {
  5866. "description": "List of children",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "type": "array",
  5871. "items": {
  5872. "$ref": "#/components/schemas/Session"
  5873. },
  5874. "description": "List of children"
  5875. }
  5876. }
  5877. }
  5878. },
  5879. "400": {
  5880. "description": "BadRequest | InvalidRequestError",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "anyOf": [
  5885. {
  5886. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5887. },
  5888. {
  5889. "$ref": "#/components/schemas/InvalidRequestError"
  5890. }
  5891. ]
  5892. }
  5893. }
  5894. }
  5895. },
  5896. "404": {
  5897. "description": "NotFoundError",
  5898. "content": {
  5899. "application/json": {
  5900. "schema": {
  5901. "$ref": "#/components/schemas/NotFoundError"
  5902. }
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5908. "summary": "Get session children",
  5909. "x-codeSamples": [
  5910. {
  5911. "lang": "js",
  5912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5913. }
  5914. ]
  5915. }
  5916. },
  5917. "/session/{sessionID}/todo": {
  5918. "get": {
  5919. "tags": ["session"],
  5920. "operationId": "session.todo",
  5921. "parameters": [
  5922. {
  5923. "name": "sessionID",
  5924. "in": "path",
  5925. "schema": {
  5926. "type": "string",
  5927. "pattern": "^ses"
  5928. },
  5929. "required": true
  5930. },
  5931. {
  5932. "name": "directory",
  5933. "in": "query",
  5934. "schema": {
  5935. "type": "string"
  5936. },
  5937. "required": false
  5938. },
  5939. {
  5940. "name": "workspace",
  5941. "in": "query",
  5942. "schema": {
  5943. "type": "string"
  5944. },
  5945. "required": false
  5946. }
  5947. ],
  5948. "responses": {
  5949. "200": {
  5950. "description": "Todo list",
  5951. "content": {
  5952. "application/json": {
  5953. "schema": {
  5954. "type": "array",
  5955. "items": {
  5956. "$ref": "#/components/schemas/Todo"
  5957. },
  5958. "description": "Todo list"
  5959. }
  5960. }
  5961. }
  5962. },
  5963. "400": {
  5964. "description": "BadRequest | InvalidRequestError",
  5965. "content": {
  5966. "application/json": {
  5967. "schema": {
  5968. "anyOf": [
  5969. {
  5970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5971. },
  5972. {
  5973. "$ref": "#/components/schemas/InvalidRequestError"
  5974. }
  5975. ]
  5976. }
  5977. }
  5978. }
  5979. },
  5980. "404": {
  5981. "description": "NotFoundError",
  5982. "content": {
  5983. "application/json": {
  5984. "schema": {
  5985. "$ref": "#/components/schemas/NotFoundError"
  5986. }
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5992. "summary": "Get session todos",
  5993. "x-codeSamples": [
  5994. {
  5995. "lang": "js",
  5996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5997. }
  5998. ]
  5999. }
  6000. },
  6001. "/session/{sessionID}/diff": {
  6002. "get": {
  6003. "tags": ["session"],
  6004. "operationId": "session.diff",
  6005. "parameters": [
  6006. {
  6007. "name": "sessionID",
  6008. "in": "path",
  6009. "schema": {
  6010. "type": "string",
  6011. "pattern": "^ses"
  6012. },
  6013. "required": true
  6014. },
  6015. {
  6016. "name": "directory",
  6017. "in": "query",
  6018. "schema": {
  6019. "type": "string"
  6020. },
  6021. "required": false
  6022. },
  6023. {
  6024. "name": "workspace",
  6025. "in": "query",
  6026. "schema": {
  6027. "type": "string"
  6028. },
  6029. "required": false
  6030. },
  6031. {
  6032. "name": "messageID",
  6033. "in": "query",
  6034. "schema": {
  6035. "type": "string",
  6036. "pattern": "^msg"
  6037. },
  6038. "required": false
  6039. }
  6040. ],
  6041. "responses": {
  6042. "200": {
  6043. "description": "Successfully retrieved diff",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "type": "array",
  6048. "items": {
  6049. "$ref": "#/components/schemas/SnapshotFileDiff"
  6050. },
  6051. "description": "Successfully retrieved diff"
  6052. }
  6053. }
  6054. }
  6055. },
  6056. "400": {
  6057. "description": "Bad request",
  6058. "content": {
  6059. "application/json": {
  6060. "schema": {
  6061. "$ref": "#/components/schemas/BadRequestError"
  6062. }
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6068. "summary": "Get message diff",
  6069. "x-codeSamples": [
  6070. {
  6071. "lang": "js",
  6072. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6073. }
  6074. ]
  6075. }
  6076. },
  6077. "/session/{sessionID}/message": {
  6078. "get": {
  6079. "tags": ["session"],
  6080. "operationId": "session.messages",
  6081. "parameters": [
  6082. {
  6083. "name": "sessionID",
  6084. "in": "path",
  6085. "schema": {
  6086. "type": "string",
  6087. "pattern": "^ses"
  6088. },
  6089. "required": true
  6090. },
  6091. {
  6092. "name": "directory",
  6093. "in": "query",
  6094. "schema": {
  6095. "type": "string"
  6096. },
  6097. "required": false
  6098. },
  6099. {
  6100. "name": "workspace",
  6101. "in": "query",
  6102. "schema": {
  6103. "type": "string"
  6104. },
  6105. "required": false
  6106. },
  6107. {
  6108. "name": "limit",
  6109. "in": "query",
  6110. "schema": {
  6111. "type": "integer",
  6112. "minimum": 0,
  6113. "maximum": 9007199254740991
  6114. },
  6115. "required": false
  6116. },
  6117. {
  6118. "name": "before",
  6119. "in": "query",
  6120. "schema": {
  6121. "type": "string"
  6122. },
  6123. "required": false
  6124. }
  6125. ],
  6126. "responses": {
  6127. "200": {
  6128. "description": "List of messages",
  6129. "content": {
  6130. "application/json": {
  6131. "schema": {
  6132. "type": "array",
  6133. "items": {
  6134. "type": "object",
  6135. "properties": {
  6136. "info": {
  6137. "$ref": "#/components/schemas/Message"
  6138. },
  6139. "parts": {
  6140. "type": "array",
  6141. "items": {
  6142. "$ref": "#/components/schemas/Part"
  6143. }
  6144. }
  6145. },
  6146. "required": ["info", "parts"],
  6147. "additionalProperties": false
  6148. },
  6149. "description": "List of messages"
  6150. }
  6151. }
  6152. }
  6153. },
  6154. "400": {
  6155. "description": "BadRequest | InvalidRequestError",
  6156. "content": {
  6157. "application/json": {
  6158. "schema": {
  6159. "anyOf": [
  6160. {
  6161. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6162. },
  6163. {
  6164. "$ref": "#/components/schemas/InvalidRequestError"
  6165. }
  6166. ]
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "404": {
  6172. "description": "NotFoundError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "$ref": "#/components/schemas/NotFoundError"
  6177. }
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6183. "summary": "Get session messages",
  6184. "x-codeSamples": [
  6185. {
  6186. "lang": "js",
  6187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6188. }
  6189. ]
  6190. },
  6191. "post": {
  6192. "tags": ["session"],
  6193. "operationId": "session.prompt",
  6194. "parameters": [
  6195. {
  6196. "name": "sessionID",
  6197. "in": "path",
  6198. "schema": {
  6199. "type": "string",
  6200. "pattern": "^ses"
  6201. },
  6202. "required": true
  6203. },
  6204. {
  6205. "name": "directory",
  6206. "in": "query",
  6207. "schema": {
  6208. "type": "string"
  6209. },
  6210. "required": false
  6211. },
  6212. {
  6213. "name": "workspace",
  6214. "in": "query",
  6215. "schema": {
  6216. "type": "string"
  6217. },
  6218. "required": false
  6219. }
  6220. ],
  6221. "responses": {
  6222. "200": {
  6223. "description": "Created message",
  6224. "content": {
  6225. "application/json": {
  6226. "schema": {
  6227. "type": "object",
  6228. "required": ["info", "parts"],
  6229. "properties": {
  6230. "info": {
  6231. "$ref": "#/components/schemas/AssistantMessage"
  6232. },
  6233. "parts": {
  6234. "type": "array",
  6235. "items": {
  6236. "$ref": "#/components/schemas/Part"
  6237. }
  6238. }
  6239. }
  6240. }
  6241. }
  6242. }
  6243. },
  6244. "400": {
  6245. "description": "BadRequest | InvalidRequestError",
  6246. "content": {
  6247. "application/json": {
  6248. "schema": {
  6249. "anyOf": [
  6250. {
  6251. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6252. },
  6253. {
  6254. "$ref": "#/components/schemas/InvalidRequestError"
  6255. }
  6256. ]
  6257. }
  6258. }
  6259. }
  6260. },
  6261. "404": {
  6262. "description": "NotFoundError",
  6263. "content": {
  6264. "application/json": {
  6265. "schema": {
  6266. "$ref": "#/components/schemas/NotFoundError"
  6267. }
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "description": "Create and send a new message to a session, streaming the AI response.",
  6273. "summary": "Send message",
  6274. "requestBody": {
  6275. "content": {
  6276. "application/json": {
  6277. "schema": {
  6278. "type": "object",
  6279. "properties": {
  6280. "messageID": {
  6281. "type": "string",
  6282. "pattern": "^msg"
  6283. },
  6284. "model": {
  6285. "type": "object",
  6286. "properties": {
  6287. "providerID": {
  6288. "type": "string"
  6289. },
  6290. "modelID": {
  6291. "type": "string"
  6292. }
  6293. },
  6294. "required": ["providerID", "modelID"],
  6295. "additionalProperties": false
  6296. },
  6297. "agent": {
  6298. "type": "string"
  6299. },
  6300. "noReply": {
  6301. "type": "boolean"
  6302. },
  6303. "tools": {
  6304. "type": "object",
  6305. "additionalProperties": {
  6306. "type": "boolean"
  6307. }
  6308. },
  6309. "format": {
  6310. "$ref": "#/components/schemas/OutputFormat"
  6311. },
  6312. "system": {
  6313. "type": "string"
  6314. },
  6315. "variant": {
  6316. "type": "string"
  6317. },
  6318. "parts": {
  6319. "type": "array",
  6320. "items": {
  6321. "anyOf": [
  6322. {
  6323. "$ref": "#/components/schemas/TextPartInput"
  6324. },
  6325. {
  6326. "$ref": "#/components/schemas/FilePartInput"
  6327. },
  6328. {
  6329. "$ref": "#/components/schemas/AgentPartInput"
  6330. },
  6331. {
  6332. "$ref": "#/components/schemas/SubtaskPartInput"
  6333. }
  6334. ]
  6335. }
  6336. }
  6337. },
  6338. "required": ["parts"],
  6339. "additionalProperties": false
  6340. }
  6341. }
  6342. }
  6343. },
  6344. "x-codeSamples": [
  6345. {
  6346. "lang": "js",
  6347. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6348. }
  6349. ]
  6350. }
  6351. },
  6352. "/session/{sessionID}/message/{messageID}": {
  6353. "get": {
  6354. "tags": ["session"],
  6355. "operationId": "session.message",
  6356. "parameters": [
  6357. {
  6358. "name": "sessionID",
  6359. "in": "path",
  6360. "schema": {
  6361. "type": "string",
  6362. "pattern": "^ses"
  6363. },
  6364. "required": true
  6365. },
  6366. {
  6367. "name": "messageID",
  6368. "in": "path",
  6369. "schema": {
  6370. "type": "string",
  6371. "pattern": "^msg"
  6372. },
  6373. "required": true
  6374. },
  6375. {
  6376. "name": "directory",
  6377. "in": "query",
  6378. "schema": {
  6379. "type": "string"
  6380. },
  6381. "required": false
  6382. },
  6383. {
  6384. "name": "workspace",
  6385. "in": "query",
  6386. "schema": {
  6387. "type": "string"
  6388. },
  6389. "required": false
  6390. }
  6391. ],
  6392. "responses": {
  6393. "200": {
  6394. "description": "Message",
  6395. "content": {
  6396. "application/json": {
  6397. "schema": {
  6398. "type": "object",
  6399. "properties": {
  6400. "info": {
  6401. "$ref": "#/components/schemas/Message"
  6402. },
  6403. "parts": {
  6404. "type": "array",
  6405. "items": {
  6406. "$ref": "#/components/schemas/Part"
  6407. }
  6408. }
  6409. },
  6410. "required": ["info", "parts"],
  6411. "additionalProperties": false,
  6412. "description": "Message"
  6413. }
  6414. }
  6415. }
  6416. },
  6417. "400": {
  6418. "description": "BadRequest | InvalidRequestError",
  6419. "content": {
  6420. "application/json": {
  6421. "schema": {
  6422. "anyOf": [
  6423. {
  6424. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6425. },
  6426. {
  6427. "$ref": "#/components/schemas/InvalidRequestError"
  6428. }
  6429. ]
  6430. }
  6431. }
  6432. }
  6433. },
  6434. "404": {
  6435. "description": "NotFoundError",
  6436. "content": {
  6437. "application/json": {
  6438. "schema": {
  6439. "$ref": "#/components/schemas/NotFoundError"
  6440. }
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "description": "Retrieve a specific message from a session by its message ID.",
  6446. "summary": "Get message",
  6447. "x-codeSamples": [
  6448. {
  6449. "lang": "js",
  6450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6451. }
  6452. ]
  6453. },
  6454. "delete": {
  6455. "tags": ["session"],
  6456. "operationId": "session.deleteMessage",
  6457. "parameters": [
  6458. {
  6459. "name": "sessionID",
  6460. "in": "path",
  6461. "schema": {
  6462. "type": "string",
  6463. "pattern": "^ses"
  6464. },
  6465. "required": true
  6466. },
  6467. {
  6468. "name": "messageID",
  6469. "in": "path",
  6470. "schema": {
  6471. "type": "string",
  6472. "pattern": "^msg"
  6473. },
  6474. "required": true
  6475. },
  6476. {
  6477. "name": "directory",
  6478. "in": "query",
  6479. "schema": {
  6480. "type": "string"
  6481. },
  6482. "required": false
  6483. },
  6484. {
  6485. "name": "workspace",
  6486. "in": "query",
  6487. "schema": {
  6488. "type": "string"
  6489. },
  6490. "required": false
  6491. }
  6492. ],
  6493. "responses": {
  6494. "200": {
  6495. "description": "Successfully deleted message",
  6496. "content": {
  6497. "application/json": {
  6498. "schema": {
  6499. "type": "boolean",
  6500. "description": "Successfully deleted message"
  6501. }
  6502. }
  6503. }
  6504. },
  6505. "400": {
  6506. "description": "BadRequest | InvalidRequestError",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "anyOf": [
  6511. {
  6512. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6513. },
  6514. {
  6515. "$ref": "#/components/schemas/InvalidRequestError"
  6516. }
  6517. ]
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "404": {
  6523. "description": "NotFoundError",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/NotFoundError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "409": {
  6533. "description": "SessionBusyError",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/SessionBusyError"
  6538. }
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6544. "summary": "Delete message",
  6545. "x-codeSamples": [
  6546. {
  6547. "lang": "js",
  6548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6549. }
  6550. ]
  6551. }
  6552. },
  6553. "/session/{sessionID}/fork": {
  6554. "post": {
  6555. "tags": ["session"],
  6556. "operationId": "session.fork",
  6557. "parameters": [
  6558. {
  6559. "name": "sessionID",
  6560. "in": "path",
  6561. "schema": {
  6562. "type": "string",
  6563. "pattern": "^ses"
  6564. },
  6565. "required": true
  6566. },
  6567. {
  6568. "name": "directory",
  6569. "in": "query",
  6570. "schema": {
  6571. "type": "string"
  6572. },
  6573. "required": false
  6574. },
  6575. {
  6576. "name": "workspace",
  6577. "in": "query",
  6578. "schema": {
  6579. "type": "string"
  6580. },
  6581. "required": false
  6582. }
  6583. ],
  6584. "responses": {
  6585. "200": {
  6586. "description": "200",
  6587. "content": {
  6588. "application/json": {
  6589. "schema": {
  6590. "$ref": "#/components/schemas/Session"
  6591. }
  6592. }
  6593. }
  6594. },
  6595. "400": {
  6596. "description": "BadRequest | InvalidRequestError",
  6597. "content": {
  6598. "application/json": {
  6599. "schema": {
  6600. "anyOf": [
  6601. {
  6602. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6603. },
  6604. {
  6605. "$ref": "#/components/schemas/InvalidRequestError"
  6606. }
  6607. ]
  6608. }
  6609. }
  6610. }
  6611. },
  6612. "404": {
  6613. "description": "NotFoundError",
  6614. "content": {
  6615. "application/json": {
  6616. "schema": {
  6617. "$ref": "#/components/schemas/NotFoundError"
  6618. }
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "description": "Create a new session by forking an existing session at a specific message point.",
  6624. "summary": "Fork session",
  6625. "requestBody": {
  6626. "content": {
  6627. "application/json": {
  6628. "schema": {
  6629. "type": "object",
  6630. "properties": {
  6631. "messageID": {
  6632. "type": "string",
  6633. "pattern": "^msg"
  6634. }
  6635. },
  6636. "additionalProperties": false
  6637. }
  6638. }
  6639. }
  6640. },
  6641. "x-codeSamples": [
  6642. {
  6643. "lang": "js",
  6644. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6645. }
  6646. ]
  6647. }
  6648. },
  6649. "/session/{sessionID}/abort": {
  6650. "post": {
  6651. "tags": ["session"],
  6652. "operationId": "session.abort",
  6653. "parameters": [
  6654. {
  6655. "name": "sessionID",
  6656. "in": "path",
  6657. "schema": {
  6658. "type": "string",
  6659. "pattern": "^ses"
  6660. },
  6661. "required": true
  6662. },
  6663. {
  6664. "name": "directory",
  6665. "in": "query",
  6666. "schema": {
  6667. "type": "string"
  6668. },
  6669. "required": false
  6670. },
  6671. {
  6672. "name": "workspace",
  6673. "in": "query",
  6674. "schema": {
  6675. "type": "string"
  6676. },
  6677. "required": false
  6678. }
  6679. ],
  6680. "responses": {
  6681. "200": {
  6682. "description": "Aborted session",
  6683. "content": {
  6684. "application/json": {
  6685. "schema": {
  6686. "type": "boolean",
  6687. "description": "Aborted session"
  6688. }
  6689. }
  6690. }
  6691. },
  6692. "400": {
  6693. "description": "BadRequest | InvalidRequestError",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "anyOf": [
  6698. {
  6699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6700. },
  6701. {
  6702. "$ref": "#/components/schemas/InvalidRequestError"
  6703. }
  6704. ]
  6705. }
  6706. }
  6707. }
  6708. }
  6709. },
  6710. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6711. "summary": "Abort session",
  6712. "x-codeSamples": [
  6713. {
  6714. "lang": "js",
  6715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6716. }
  6717. ]
  6718. }
  6719. },
  6720. "/session/{sessionID}/init": {
  6721. "post": {
  6722. "tags": ["session"],
  6723. "operationId": "session.init",
  6724. "parameters": [
  6725. {
  6726. "name": "sessionID",
  6727. "in": "path",
  6728. "schema": {
  6729. "type": "string",
  6730. "pattern": "^ses"
  6731. },
  6732. "required": true
  6733. },
  6734. {
  6735. "name": "directory",
  6736. "in": "query",
  6737. "schema": {
  6738. "type": "string"
  6739. },
  6740. "required": false
  6741. },
  6742. {
  6743. "name": "workspace",
  6744. "in": "query",
  6745. "schema": {
  6746. "type": "string"
  6747. },
  6748. "required": false
  6749. }
  6750. ],
  6751. "responses": {
  6752. "200": {
  6753. "description": "200",
  6754. "content": {
  6755. "application/json": {
  6756. "schema": {
  6757. "type": "boolean",
  6758. "description": "200"
  6759. }
  6760. }
  6761. }
  6762. },
  6763. "400": {
  6764. "description": "BadRequest | InvalidRequestError",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "anyOf": [
  6769. {
  6770. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6771. },
  6772. {
  6773. "$ref": "#/components/schemas/InvalidRequestError"
  6774. }
  6775. ]
  6776. }
  6777. }
  6778. }
  6779. },
  6780. "404": {
  6781. "description": "NotFoundError",
  6782. "content": {
  6783. "application/json": {
  6784. "schema": {
  6785. "$ref": "#/components/schemas/NotFoundError"
  6786. }
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6792. "summary": "Initialize session",
  6793. "requestBody": {
  6794. "content": {
  6795. "application/json": {
  6796. "schema": {
  6797. "type": "object",
  6798. "properties": {
  6799. "modelID": {
  6800. "type": "string"
  6801. },
  6802. "providerID": {
  6803. "type": "string"
  6804. },
  6805. "messageID": {
  6806. "type": "string",
  6807. "pattern": "^msg"
  6808. }
  6809. },
  6810. "required": ["modelID", "providerID", "messageID"],
  6811. "additionalProperties": false
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "x-codeSamples": [
  6817. {
  6818. "lang": "js",
  6819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6820. }
  6821. ]
  6822. }
  6823. },
  6824. "/session/{sessionID}/share": {
  6825. "post": {
  6826. "tags": ["session"],
  6827. "operationId": "session.share",
  6828. "parameters": [
  6829. {
  6830. "name": "sessionID",
  6831. "in": "path",
  6832. "schema": {
  6833. "type": "string",
  6834. "pattern": "^ses"
  6835. },
  6836. "required": true
  6837. },
  6838. {
  6839. "name": "directory",
  6840. "in": "query",
  6841. "schema": {
  6842. "type": "string"
  6843. },
  6844. "required": false
  6845. },
  6846. {
  6847. "name": "workspace",
  6848. "in": "query",
  6849. "schema": {
  6850. "type": "string"
  6851. },
  6852. "required": false
  6853. }
  6854. ],
  6855. "responses": {
  6856. "200": {
  6857. "description": "Successfully shared session",
  6858. "content": {
  6859. "application/json": {
  6860. "schema": {
  6861. "$ref": "#/components/schemas/Session"
  6862. }
  6863. }
  6864. }
  6865. },
  6866. "400": {
  6867. "description": "Bad request",
  6868. "content": {
  6869. "application/json": {
  6870. "schema": {
  6871. "$ref": "#/components/schemas/BadRequestError"
  6872. }
  6873. }
  6874. }
  6875. },
  6876. "404": {
  6877. "description": "NotFoundError",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "$ref": "#/components/schemas/NotFoundError"
  6882. }
  6883. }
  6884. }
  6885. },
  6886. "500": {
  6887. "description": "InternalServerError",
  6888. "content": {
  6889. "application/json": {
  6890. "schema": {
  6891. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6892. }
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6898. "summary": "Share session",
  6899. "x-codeSamples": [
  6900. {
  6901. "lang": "js",
  6902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6903. }
  6904. ]
  6905. },
  6906. "delete": {
  6907. "tags": ["session"],
  6908. "operationId": "session.unshare",
  6909. "parameters": [
  6910. {
  6911. "name": "sessionID",
  6912. "in": "path",
  6913. "schema": {
  6914. "type": "string",
  6915. "pattern": "^ses"
  6916. },
  6917. "required": true
  6918. },
  6919. {
  6920. "name": "directory",
  6921. "in": "query",
  6922. "schema": {
  6923. "type": "string"
  6924. },
  6925. "required": false
  6926. },
  6927. {
  6928. "name": "workspace",
  6929. "in": "query",
  6930. "schema": {
  6931. "type": "string"
  6932. },
  6933. "required": false
  6934. }
  6935. ],
  6936. "responses": {
  6937. "200": {
  6938. "description": "Successfully unshared session",
  6939. "content": {
  6940. "application/json": {
  6941. "schema": {
  6942. "$ref": "#/components/schemas/Session"
  6943. }
  6944. }
  6945. }
  6946. },
  6947. "400": {
  6948. "description": "Bad request",
  6949. "content": {
  6950. "application/json": {
  6951. "schema": {
  6952. "$ref": "#/components/schemas/BadRequestError"
  6953. }
  6954. }
  6955. }
  6956. },
  6957. "404": {
  6958. "description": "NotFoundError",
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "$ref": "#/components/schemas/NotFoundError"
  6963. }
  6964. }
  6965. }
  6966. },
  6967. "500": {
  6968. "description": "InternalServerError",
  6969. "content": {
  6970. "application/json": {
  6971. "schema": {
  6972. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6973. }
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "description": "Remove the shareable link for a session, making it private again.",
  6979. "summary": "Unshare session",
  6980. "x-codeSamples": [
  6981. {
  6982. "lang": "js",
  6983. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6984. }
  6985. ]
  6986. }
  6987. },
  6988. "/session/{sessionID}/summarize": {
  6989. "post": {
  6990. "tags": ["session"],
  6991. "operationId": "session.summarize",
  6992. "parameters": [
  6993. {
  6994. "name": "sessionID",
  6995. "in": "path",
  6996. "schema": {
  6997. "type": "string",
  6998. "pattern": "^ses"
  6999. },
  7000. "required": true
  7001. },
  7002. {
  7003. "name": "directory",
  7004. "in": "query",
  7005. "schema": {
  7006. "type": "string"
  7007. },
  7008. "required": false
  7009. },
  7010. {
  7011. "name": "workspace",
  7012. "in": "query",
  7013. "schema": {
  7014. "type": "string"
  7015. },
  7016. "required": false
  7017. }
  7018. ],
  7019. "responses": {
  7020. "200": {
  7021. "description": "Summarized session",
  7022. "content": {
  7023. "application/json": {
  7024. "schema": {
  7025. "type": "boolean",
  7026. "description": "Summarized session"
  7027. }
  7028. }
  7029. }
  7030. },
  7031. "400": {
  7032. "description": "BadRequest | InvalidRequestError",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "anyOf": [
  7037. {
  7038. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7039. },
  7040. {
  7041. "$ref": "#/components/schemas/InvalidRequestError"
  7042. }
  7043. ]
  7044. }
  7045. }
  7046. }
  7047. },
  7048. "404": {
  7049. "description": "NotFoundError",
  7050. "content": {
  7051. "application/json": {
  7052. "schema": {
  7053. "$ref": "#/components/schemas/NotFoundError"
  7054. }
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7060. "summary": "Summarize session",
  7061. "requestBody": {
  7062. "content": {
  7063. "application/json": {
  7064. "schema": {
  7065. "type": "object",
  7066. "properties": {
  7067. "providerID": {
  7068. "type": "string"
  7069. },
  7070. "modelID": {
  7071. "type": "string"
  7072. },
  7073. "auto": {
  7074. "type": "boolean"
  7075. }
  7076. },
  7077. "required": ["providerID", "modelID"],
  7078. "additionalProperties": false
  7079. }
  7080. }
  7081. }
  7082. },
  7083. "x-codeSamples": [
  7084. {
  7085. "lang": "js",
  7086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7087. }
  7088. ]
  7089. }
  7090. },
  7091. "/session/{sessionID}/prompt_async": {
  7092. "post": {
  7093. "tags": ["session"],
  7094. "operationId": "session.prompt_async",
  7095. "parameters": [
  7096. {
  7097. "name": "sessionID",
  7098. "in": "path",
  7099. "schema": {
  7100. "type": "string",
  7101. "pattern": "^ses"
  7102. },
  7103. "required": true
  7104. },
  7105. {
  7106. "name": "directory",
  7107. "in": "query",
  7108. "schema": {
  7109. "type": "string"
  7110. },
  7111. "required": false
  7112. },
  7113. {
  7114. "name": "workspace",
  7115. "in": "query",
  7116. "schema": {
  7117. "type": "string"
  7118. },
  7119. "required": false
  7120. }
  7121. ],
  7122. "responses": {
  7123. "204": {
  7124. "description": "Prompt accepted"
  7125. },
  7126. "400": {
  7127. "description": "BadRequest | InvalidRequestError",
  7128. "content": {
  7129. "application/json": {
  7130. "schema": {
  7131. "anyOf": [
  7132. {
  7133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7134. },
  7135. {
  7136. "$ref": "#/components/schemas/InvalidRequestError"
  7137. }
  7138. ]
  7139. }
  7140. }
  7141. }
  7142. },
  7143. "404": {
  7144. "description": "NotFoundError",
  7145. "content": {
  7146. "application/json": {
  7147. "schema": {
  7148. "$ref": "#/components/schemas/NotFoundError"
  7149. }
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7155. "summary": "Send async message",
  7156. "requestBody": {
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "type": "object",
  7161. "properties": {
  7162. "messageID": {
  7163. "type": "string",
  7164. "pattern": "^msg"
  7165. },
  7166. "model": {
  7167. "type": "object",
  7168. "properties": {
  7169. "providerID": {
  7170. "type": "string"
  7171. },
  7172. "modelID": {
  7173. "type": "string"
  7174. }
  7175. },
  7176. "required": ["providerID", "modelID"],
  7177. "additionalProperties": false
  7178. },
  7179. "agent": {
  7180. "type": "string"
  7181. },
  7182. "noReply": {
  7183. "type": "boolean"
  7184. },
  7185. "tools": {
  7186. "type": "object",
  7187. "additionalProperties": {
  7188. "type": "boolean"
  7189. }
  7190. },
  7191. "format": {
  7192. "$ref": "#/components/schemas/OutputFormat"
  7193. },
  7194. "system": {
  7195. "type": "string"
  7196. },
  7197. "variant": {
  7198. "type": "string"
  7199. },
  7200. "parts": {
  7201. "type": "array",
  7202. "items": {
  7203. "anyOf": [
  7204. {
  7205. "$ref": "#/components/schemas/TextPartInput"
  7206. },
  7207. {
  7208. "$ref": "#/components/schemas/FilePartInput"
  7209. },
  7210. {
  7211. "$ref": "#/components/schemas/AgentPartInput"
  7212. },
  7213. {
  7214. "$ref": "#/components/schemas/SubtaskPartInput"
  7215. }
  7216. ]
  7217. }
  7218. }
  7219. },
  7220. "required": ["parts"],
  7221. "additionalProperties": false
  7222. }
  7223. }
  7224. }
  7225. },
  7226. "x-codeSamples": [
  7227. {
  7228. "lang": "js",
  7229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7230. }
  7231. ]
  7232. }
  7233. },
  7234. "/session/{sessionID}/command": {
  7235. "post": {
  7236. "tags": ["session"],
  7237. "operationId": "session.command",
  7238. "parameters": [
  7239. {
  7240. "name": "sessionID",
  7241. "in": "path",
  7242. "schema": {
  7243. "type": "string",
  7244. "pattern": "^ses"
  7245. },
  7246. "required": true
  7247. },
  7248. {
  7249. "name": "directory",
  7250. "in": "query",
  7251. "schema": {
  7252. "type": "string"
  7253. },
  7254. "required": false
  7255. },
  7256. {
  7257. "name": "workspace",
  7258. "in": "query",
  7259. "schema": {
  7260. "type": "string"
  7261. },
  7262. "required": false
  7263. }
  7264. ],
  7265. "responses": {
  7266. "200": {
  7267. "description": "Created message",
  7268. "content": {
  7269. "application/json": {
  7270. "schema": {
  7271. "type": "object",
  7272. "required": ["info", "parts"],
  7273. "properties": {
  7274. "info": {
  7275. "$ref": "#/components/schemas/AssistantMessage"
  7276. },
  7277. "parts": {
  7278. "type": "array",
  7279. "items": {
  7280. "$ref": "#/components/schemas/Part"
  7281. }
  7282. }
  7283. }
  7284. }
  7285. }
  7286. }
  7287. },
  7288. "400": {
  7289. "description": "BadRequest | InvalidRequestError",
  7290. "content": {
  7291. "application/json": {
  7292. "schema": {
  7293. "anyOf": [
  7294. {
  7295. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7296. },
  7297. {
  7298. "$ref": "#/components/schemas/InvalidRequestError"
  7299. }
  7300. ]
  7301. }
  7302. }
  7303. }
  7304. },
  7305. "404": {
  7306. "description": "NotFoundError",
  7307. "content": {
  7308. "application/json": {
  7309. "schema": {
  7310. "$ref": "#/components/schemas/NotFoundError"
  7311. }
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "description": "Send a new command to a session for execution by the AI assistant.",
  7317. "summary": "Send command",
  7318. "requestBody": {
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "type": "object",
  7323. "properties": {
  7324. "messageID": {
  7325. "type": "string",
  7326. "pattern": "^msg"
  7327. },
  7328. "agent": {
  7329. "type": "string"
  7330. },
  7331. "model": {
  7332. "type": "string"
  7333. },
  7334. "arguments": {
  7335. "type": "string"
  7336. },
  7337. "command": {
  7338. "type": "string"
  7339. },
  7340. "variant": {
  7341. "type": "string"
  7342. },
  7343. "parts": {
  7344. "type": "array",
  7345. "items": {
  7346. "type": "object",
  7347. "properties": {
  7348. "id": {
  7349. "type": "string",
  7350. "pattern": "^prt"
  7351. },
  7352. "type": {
  7353. "type": "string",
  7354. "enum": ["file"]
  7355. },
  7356. "mime": {
  7357. "type": "string"
  7358. },
  7359. "filename": {
  7360. "type": "string"
  7361. },
  7362. "url": {
  7363. "type": "string"
  7364. },
  7365. "source": {
  7366. "$ref": "#/components/schemas/FilePartSource"
  7367. }
  7368. },
  7369. "required": ["type", "mime", "url"],
  7370. "additionalProperties": false
  7371. }
  7372. }
  7373. },
  7374. "required": ["arguments", "command"],
  7375. "additionalProperties": false
  7376. }
  7377. }
  7378. }
  7379. },
  7380. "x-codeSamples": [
  7381. {
  7382. "lang": "js",
  7383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7384. }
  7385. ]
  7386. }
  7387. },
  7388. "/session/{sessionID}/shell": {
  7389. "post": {
  7390. "tags": ["session"],
  7391. "operationId": "session.shell",
  7392. "parameters": [
  7393. {
  7394. "name": "sessionID",
  7395. "in": "path",
  7396. "schema": {
  7397. "type": "string",
  7398. "pattern": "^ses"
  7399. },
  7400. "required": true
  7401. },
  7402. {
  7403. "name": "directory",
  7404. "in": "query",
  7405. "schema": {
  7406. "type": "string"
  7407. },
  7408. "required": false
  7409. },
  7410. {
  7411. "name": "workspace",
  7412. "in": "query",
  7413. "schema": {
  7414. "type": "string"
  7415. },
  7416. "required": false
  7417. }
  7418. ],
  7419. "responses": {
  7420. "200": {
  7421. "description": "Created message",
  7422. "content": {
  7423. "application/json": {
  7424. "schema": {
  7425. "type": "object",
  7426. "properties": {
  7427. "info": {
  7428. "$ref": "#/components/schemas/Message"
  7429. },
  7430. "parts": {
  7431. "type": "array",
  7432. "items": {
  7433. "$ref": "#/components/schemas/Part"
  7434. }
  7435. }
  7436. },
  7437. "required": ["info", "parts"],
  7438. "additionalProperties": false,
  7439. "description": "Created message"
  7440. }
  7441. }
  7442. }
  7443. },
  7444. "400": {
  7445. "description": "BadRequest | InvalidRequestError",
  7446. "content": {
  7447. "application/json": {
  7448. "schema": {
  7449. "anyOf": [
  7450. {
  7451. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7452. },
  7453. {
  7454. "$ref": "#/components/schemas/InvalidRequestError"
  7455. }
  7456. ]
  7457. }
  7458. }
  7459. }
  7460. },
  7461. "404": {
  7462. "description": "NotFoundError",
  7463. "content": {
  7464. "application/json": {
  7465. "schema": {
  7466. "$ref": "#/components/schemas/NotFoundError"
  7467. }
  7468. }
  7469. }
  7470. },
  7471. "409": {
  7472. "description": "SessionBusyError",
  7473. "content": {
  7474. "application/json": {
  7475. "schema": {
  7476. "$ref": "#/components/schemas/SessionBusyError"
  7477. }
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "description": "Execute a shell command within the session context and return the AI's response.",
  7483. "summary": "Run shell command",
  7484. "requestBody": {
  7485. "content": {
  7486. "application/json": {
  7487. "schema": {
  7488. "type": "object",
  7489. "properties": {
  7490. "messageID": {
  7491. "type": "string",
  7492. "pattern": "^msg"
  7493. },
  7494. "agent": {
  7495. "type": "string"
  7496. },
  7497. "model": {
  7498. "type": "object",
  7499. "properties": {
  7500. "providerID": {
  7501. "type": "string"
  7502. },
  7503. "modelID": {
  7504. "type": "string"
  7505. }
  7506. },
  7507. "required": ["providerID", "modelID"],
  7508. "additionalProperties": false
  7509. },
  7510. "command": {
  7511. "type": "string"
  7512. }
  7513. },
  7514. "required": ["agent", "command"],
  7515. "additionalProperties": false
  7516. }
  7517. }
  7518. }
  7519. },
  7520. "x-codeSamples": [
  7521. {
  7522. "lang": "js",
  7523. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7524. }
  7525. ]
  7526. }
  7527. },
  7528. "/session/{sessionID}/revert": {
  7529. "post": {
  7530. "tags": ["session"],
  7531. "operationId": "session.revert",
  7532. "parameters": [
  7533. {
  7534. "name": "sessionID",
  7535. "in": "path",
  7536. "schema": {
  7537. "type": "string",
  7538. "pattern": "^ses"
  7539. },
  7540. "required": true
  7541. },
  7542. {
  7543. "name": "directory",
  7544. "in": "query",
  7545. "schema": {
  7546. "type": "string"
  7547. },
  7548. "required": false
  7549. },
  7550. {
  7551. "name": "workspace",
  7552. "in": "query",
  7553. "schema": {
  7554. "type": "string"
  7555. },
  7556. "required": false
  7557. }
  7558. ],
  7559. "responses": {
  7560. "200": {
  7561. "description": "Updated session",
  7562. "content": {
  7563. "application/json": {
  7564. "schema": {
  7565. "$ref": "#/components/schemas/Session"
  7566. }
  7567. }
  7568. }
  7569. },
  7570. "400": {
  7571. "description": "BadRequest | InvalidRequestError",
  7572. "content": {
  7573. "application/json": {
  7574. "schema": {
  7575. "anyOf": [
  7576. {
  7577. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7578. },
  7579. {
  7580. "$ref": "#/components/schemas/InvalidRequestError"
  7581. }
  7582. ]
  7583. }
  7584. }
  7585. }
  7586. },
  7587. "404": {
  7588. "description": "NotFoundError",
  7589. "content": {
  7590. "application/json": {
  7591. "schema": {
  7592. "$ref": "#/components/schemas/NotFoundError"
  7593. }
  7594. }
  7595. }
  7596. },
  7597. "409": {
  7598. "description": "SessionBusyError",
  7599. "content": {
  7600. "application/json": {
  7601. "schema": {
  7602. "$ref": "#/components/schemas/SessionBusyError"
  7603. }
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7609. "summary": "Revert message",
  7610. "requestBody": {
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "type": "object",
  7615. "properties": {
  7616. "messageID": {
  7617. "type": "string",
  7618. "pattern": "^msg"
  7619. },
  7620. "partID": {
  7621. "type": "string",
  7622. "pattern": "^prt"
  7623. }
  7624. },
  7625. "required": ["messageID"],
  7626. "additionalProperties": false
  7627. }
  7628. }
  7629. }
  7630. },
  7631. "x-codeSamples": [
  7632. {
  7633. "lang": "js",
  7634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7635. }
  7636. ]
  7637. }
  7638. },
  7639. "/session/{sessionID}/unrevert": {
  7640. "post": {
  7641. "tags": ["session"],
  7642. "operationId": "session.unrevert",
  7643. "parameters": [
  7644. {
  7645. "name": "sessionID",
  7646. "in": "path",
  7647. "schema": {
  7648. "type": "string",
  7649. "pattern": "^ses"
  7650. },
  7651. "required": true
  7652. },
  7653. {
  7654. "name": "directory",
  7655. "in": "query",
  7656. "schema": {
  7657. "type": "string"
  7658. },
  7659. "required": false
  7660. },
  7661. {
  7662. "name": "workspace",
  7663. "in": "query",
  7664. "schema": {
  7665. "type": "string"
  7666. },
  7667. "required": false
  7668. }
  7669. ],
  7670. "responses": {
  7671. "200": {
  7672. "description": "Updated session",
  7673. "content": {
  7674. "application/json": {
  7675. "schema": {
  7676. "$ref": "#/components/schemas/Session"
  7677. }
  7678. }
  7679. }
  7680. },
  7681. "400": {
  7682. "description": "BadRequest | InvalidRequestError",
  7683. "content": {
  7684. "application/json": {
  7685. "schema": {
  7686. "anyOf": [
  7687. {
  7688. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7689. },
  7690. {
  7691. "$ref": "#/components/schemas/InvalidRequestError"
  7692. }
  7693. ]
  7694. }
  7695. }
  7696. }
  7697. },
  7698. "404": {
  7699. "description": "NotFoundError",
  7700. "content": {
  7701. "application/json": {
  7702. "schema": {
  7703. "$ref": "#/components/schemas/NotFoundError"
  7704. }
  7705. }
  7706. }
  7707. },
  7708. "409": {
  7709. "description": "SessionBusyError",
  7710. "content": {
  7711. "application/json": {
  7712. "schema": {
  7713. "$ref": "#/components/schemas/SessionBusyError"
  7714. }
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "description": "Restore all previously reverted messages in a session.",
  7720. "summary": "Restore reverted messages",
  7721. "x-codeSamples": [
  7722. {
  7723. "lang": "js",
  7724. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7725. }
  7726. ]
  7727. }
  7728. },
  7729. "/session/{sessionID}/permissions/{permissionID}": {
  7730. "post": {
  7731. "tags": ["session"],
  7732. "operationId": "permission.respond",
  7733. "parameters": [
  7734. {
  7735. "name": "sessionID",
  7736. "in": "path",
  7737. "schema": {
  7738. "type": "string",
  7739. "pattern": "^ses"
  7740. },
  7741. "required": true
  7742. },
  7743. {
  7744. "name": "permissionID",
  7745. "in": "path",
  7746. "schema": {
  7747. "type": "string",
  7748. "pattern": "^per"
  7749. },
  7750. "required": true
  7751. },
  7752. {
  7753. "name": "directory",
  7754. "in": "query",
  7755. "schema": {
  7756. "type": "string"
  7757. },
  7758. "required": false
  7759. },
  7760. {
  7761. "name": "workspace",
  7762. "in": "query",
  7763. "schema": {
  7764. "type": "string"
  7765. },
  7766. "required": false
  7767. }
  7768. ],
  7769. "responses": {
  7770. "200": {
  7771. "description": "Permission processed successfully",
  7772. "content": {
  7773. "application/json": {
  7774. "schema": {
  7775. "type": "boolean",
  7776. "description": "Permission processed successfully"
  7777. }
  7778. }
  7779. }
  7780. },
  7781. "400": {
  7782. "description": "BadRequest | InvalidRequestError",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "anyOf": [
  7787. {
  7788. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7789. },
  7790. {
  7791. "$ref": "#/components/schemas/InvalidRequestError"
  7792. }
  7793. ]
  7794. }
  7795. }
  7796. }
  7797. },
  7798. "404": {
  7799. "description": "NotFoundError | PermissionNotFoundError",
  7800. "content": {
  7801. "application/json": {
  7802. "schema": {
  7803. "anyOf": [
  7804. {
  7805. "$ref": "#/components/schemas/NotFoundError"
  7806. },
  7807. {
  7808. "$ref": "#/components/schemas/PermissionNotFoundError"
  7809. }
  7810. ]
  7811. }
  7812. }
  7813. }
  7814. }
  7815. },
  7816. "description": "Approve or deny a permission request from the AI assistant.",
  7817. "summary": "Respond to permission",
  7818. "deprecated": true,
  7819. "requestBody": {
  7820. "content": {
  7821. "application/json": {
  7822. "schema": {
  7823. "type": "object",
  7824. "properties": {
  7825. "response": {
  7826. "type": "string",
  7827. "enum": ["once", "always", "reject"]
  7828. }
  7829. },
  7830. "required": ["response"],
  7831. "additionalProperties": false
  7832. }
  7833. }
  7834. }
  7835. },
  7836. "x-codeSamples": [
  7837. {
  7838. "lang": "js",
  7839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7840. }
  7841. ]
  7842. }
  7843. },
  7844. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7845. "delete": {
  7846. "tags": ["session"],
  7847. "operationId": "part.delete",
  7848. "parameters": [
  7849. {
  7850. "name": "sessionID",
  7851. "in": "path",
  7852. "schema": {
  7853. "type": "string",
  7854. "pattern": "^ses"
  7855. },
  7856. "required": true
  7857. },
  7858. {
  7859. "name": "messageID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^msg"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "partID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^prt"
  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": "Successfully deleted part",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Successfully deleted part"
  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",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "$ref": "#/components/schemas/NotFoundError"
  7928. }
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "description": "Delete a part from a message.",
  7934. "x-codeSamples": [
  7935. {
  7936. "lang": "js",
  7937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7938. }
  7939. ]
  7940. },
  7941. "patch": {
  7942. "tags": ["session"],
  7943. "operationId": "part.update",
  7944. "parameters": [
  7945. {
  7946. "name": "sessionID",
  7947. "in": "path",
  7948. "schema": {
  7949. "type": "string",
  7950. "pattern": "^ses"
  7951. },
  7952. "required": true
  7953. },
  7954. {
  7955. "name": "messageID",
  7956. "in": "path",
  7957. "schema": {
  7958. "type": "string",
  7959. "pattern": "^msg"
  7960. },
  7961. "required": true
  7962. },
  7963. {
  7964. "name": "partID",
  7965. "in": "path",
  7966. "schema": {
  7967. "type": "string",
  7968. "pattern": "^prt"
  7969. },
  7970. "required": true
  7971. },
  7972. {
  7973. "name": "directory",
  7974. "in": "query",
  7975. "schema": {
  7976. "type": "string"
  7977. },
  7978. "required": false
  7979. },
  7980. {
  7981. "name": "workspace",
  7982. "in": "query",
  7983. "schema": {
  7984. "type": "string"
  7985. },
  7986. "required": false
  7987. }
  7988. ],
  7989. "responses": {
  7990. "200": {
  7991. "description": "Successfully updated part",
  7992. "content": {
  7993. "application/json": {
  7994. "schema": {
  7995. "$ref": "#/components/schemas/Part"
  7996. }
  7997. }
  7998. }
  7999. },
  8000. "400": {
  8001. "description": "BadRequest | InvalidRequestError",
  8002. "content": {
  8003. "application/json": {
  8004. "schema": {
  8005. "anyOf": [
  8006. {
  8007. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8008. },
  8009. {
  8010. "$ref": "#/components/schemas/InvalidRequestError"
  8011. }
  8012. ]
  8013. }
  8014. }
  8015. }
  8016. },
  8017. "404": {
  8018. "description": "NotFoundError",
  8019. "content": {
  8020. "application/json": {
  8021. "schema": {
  8022. "$ref": "#/components/schemas/NotFoundError"
  8023. }
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "description": "Update a part in a message.",
  8029. "requestBody": {
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/Part"
  8034. }
  8035. }
  8036. }
  8037. },
  8038. "x-codeSamples": [
  8039. {
  8040. "lang": "js",
  8041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8042. }
  8043. ]
  8044. }
  8045. },
  8046. "/sync/start": {
  8047. "post": {
  8048. "tags": ["sync"],
  8049. "operationId": "sync.start",
  8050. "parameters": [
  8051. {
  8052. "name": "directory",
  8053. "in": "query",
  8054. "schema": {
  8055. "type": "string"
  8056. },
  8057. "required": false
  8058. },
  8059. {
  8060. "name": "workspace",
  8061. "in": "query",
  8062. "schema": {
  8063. "type": "string"
  8064. },
  8065. "required": false
  8066. }
  8067. ],
  8068. "responses": {
  8069. "200": {
  8070. "description": "Workspace sync started",
  8071. "content": {
  8072. "application/json": {
  8073. "schema": {
  8074. "type": "boolean",
  8075. "description": "Workspace sync started"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "400": {
  8081. "description": "Bad request",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "$ref": "#/components/schemas/BadRequestError"
  8086. }
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8092. "summary": "Start workspace sync",
  8093. "x-codeSamples": [
  8094. {
  8095. "lang": "js",
  8096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8097. }
  8098. ]
  8099. }
  8100. },
  8101. "/sync/replay": {
  8102. "post": {
  8103. "tags": ["sync"],
  8104. "operationId": "sync.replay",
  8105. "parameters": [
  8106. {
  8107. "name": "directory",
  8108. "in": "query",
  8109. "schema": {
  8110. "type": "string"
  8111. },
  8112. "required": false
  8113. },
  8114. {
  8115. "name": "workspace",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string"
  8119. },
  8120. "required": false
  8121. }
  8122. ],
  8123. "responses": {
  8124. "200": {
  8125. "description": "Replayed sync events",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "type": "object",
  8130. "properties": {
  8131. "sessionID": {
  8132. "type": "string"
  8133. }
  8134. },
  8135. "required": ["sessionID"],
  8136. "additionalProperties": false,
  8137. "description": "Replayed sync events"
  8138. }
  8139. }
  8140. }
  8141. },
  8142. "400": {
  8143. "description": "BadRequest | InvalidRequestError",
  8144. "content": {
  8145. "application/json": {
  8146. "schema": {
  8147. "anyOf": [
  8148. {
  8149. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8150. },
  8151. {
  8152. "$ref": "#/components/schemas/InvalidRequestError"
  8153. }
  8154. ]
  8155. }
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "description": "Validate and replay a complete sync event history.",
  8161. "summary": "Replay sync events",
  8162. "requestBody": {
  8163. "content": {
  8164. "application/json": {
  8165. "schema": {
  8166. "type": "object",
  8167. "properties": {
  8168. "directory": {
  8169. "type": "string"
  8170. },
  8171. "events": {
  8172. "type": "array",
  8173. "minItems": 1,
  8174. "items": {
  8175. "type": "object",
  8176. "properties": {
  8177. "id": {
  8178. "type": "string"
  8179. },
  8180. "aggregateID": {
  8181. "type": "string"
  8182. },
  8183. "seq": {
  8184. "type": "integer",
  8185. "minimum": 0
  8186. },
  8187. "type": {
  8188. "type": "string"
  8189. },
  8190. "data": {
  8191. "type": "object"
  8192. }
  8193. },
  8194. "required": ["id", "aggregateID", "seq", "type", "data"],
  8195. "additionalProperties": false
  8196. }
  8197. }
  8198. },
  8199. "required": ["directory", "events"],
  8200. "additionalProperties": false
  8201. }
  8202. }
  8203. }
  8204. },
  8205. "x-codeSamples": [
  8206. {
  8207. "lang": "js",
  8208. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8209. }
  8210. ]
  8211. }
  8212. },
  8213. "/sync/steal": {
  8214. "post": {
  8215. "tags": ["sync"],
  8216. "operationId": "sync.steal",
  8217. "parameters": [
  8218. {
  8219. "name": "directory",
  8220. "in": "query",
  8221. "schema": {
  8222. "type": "string"
  8223. },
  8224. "required": false
  8225. },
  8226. {
  8227. "name": "workspace",
  8228. "in": "query",
  8229. "schema": {
  8230. "type": "string"
  8231. },
  8232. "required": false
  8233. }
  8234. ],
  8235. "responses": {
  8236. "200": {
  8237. "description": "Session stolen into workspace",
  8238. "content": {
  8239. "application/json": {
  8240. "schema": {
  8241. "type": "object",
  8242. "properties": {
  8243. "sessionID": {
  8244. "type": "string",
  8245. "pattern": "^ses"
  8246. }
  8247. },
  8248. "required": ["sessionID"],
  8249. "additionalProperties": false,
  8250. "description": "Session stolen into workspace"
  8251. }
  8252. }
  8253. }
  8254. },
  8255. "400": {
  8256. "description": "BadRequest | InvalidRequestError",
  8257. "content": {
  8258. "application/json": {
  8259. "schema": {
  8260. "anyOf": [
  8261. {
  8262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8263. },
  8264. {
  8265. "$ref": "#/components/schemas/InvalidRequestError"
  8266. }
  8267. ]
  8268. }
  8269. }
  8270. }
  8271. }
  8272. },
  8273. "description": "Update a session to belong to the current workspace through the sync event system.",
  8274. "summary": "Steal session into workspace",
  8275. "requestBody": {
  8276. "content": {
  8277. "application/json": {
  8278. "schema": {
  8279. "type": "object",
  8280. "properties": {
  8281. "sessionID": {
  8282. "type": "string",
  8283. "pattern": "^ses"
  8284. }
  8285. },
  8286. "required": ["sessionID"],
  8287. "additionalProperties": false
  8288. }
  8289. }
  8290. }
  8291. },
  8292. "x-codeSamples": [
  8293. {
  8294. "lang": "js",
  8295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8296. }
  8297. ]
  8298. }
  8299. },
  8300. "/sync/history": {
  8301. "post": {
  8302. "tags": ["sync"],
  8303. "operationId": "sync.history.list",
  8304. "parameters": [
  8305. {
  8306. "name": "directory",
  8307. "in": "query",
  8308. "schema": {
  8309. "type": "string"
  8310. },
  8311. "required": false
  8312. },
  8313. {
  8314. "name": "workspace",
  8315. "in": "query",
  8316. "schema": {
  8317. "type": "string"
  8318. },
  8319. "required": false
  8320. }
  8321. ],
  8322. "responses": {
  8323. "200": {
  8324. "description": "Sync events",
  8325. "content": {
  8326. "application/json": {
  8327. "schema": {
  8328. "type": "array",
  8329. "items": {
  8330. "type": "object",
  8331. "properties": {
  8332. "id": {
  8333. "type": "string"
  8334. },
  8335. "aggregate_id": {
  8336. "type": "string"
  8337. },
  8338. "seq": {
  8339. "type": "integer",
  8340. "minimum": 0
  8341. },
  8342. "type": {
  8343. "type": "string"
  8344. },
  8345. "data": {
  8346. "type": "object"
  8347. }
  8348. },
  8349. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8350. "additionalProperties": false
  8351. },
  8352. "description": "Sync events"
  8353. }
  8354. }
  8355. }
  8356. },
  8357. "400": {
  8358. "description": "BadRequest | InvalidRequestError",
  8359. "content": {
  8360. "application/json": {
  8361. "schema": {
  8362. "anyOf": [
  8363. {
  8364. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8365. },
  8366. {
  8367. "$ref": "#/components/schemas/InvalidRequestError"
  8368. }
  8369. ]
  8370. }
  8371. }
  8372. }
  8373. }
  8374. },
  8375. "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.",
  8376. "summary": "List sync events",
  8377. "requestBody": {
  8378. "content": {
  8379. "application/json": {
  8380. "schema": {
  8381. "type": "object",
  8382. "additionalProperties": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. }
  8386. }
  8387. }
  8388. }
  8389. },
  8390. "x-codeSamples": [
  8391. {
  8392. "lang": "js",
  8393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8394. }
  8395. ]
  8396. }
  8397. },
  8398. "/tui/append-prompt": {
  8399. "post": {
  8400. "tags": ["tui"],
  8401. "operationId": "tui.appendPrompt",
  8402. "parameters": [
  8403. {
  8404. "name": "directory",
  8405. "in": "query",
  8406. "schema": {
  8407. "type": "string"
  8408. },
  8409. "required": false
  8410. },
  8411. {
  8412. "name": "workspace",
  8413. "in": "query",
  8414. "schema": {
  8415. "type": "string"
  8416. },
  8417. "required": false
  8418. }
  8419. ],
  8420. "responses": {
  8421. "200": {
  8422. "description": "Prompt processed successfully",
  8423. "content": {
  8424. "application/json": {
  8425. "schema": {
  8426. "type": "boolean",
  8427. "description": "Prompt processed successfully"
  8428. }
  8429. }
  8430. }
  8431. },
  8432. "400": {
  8433. "description": "BadRequest | InvalidRequestError",
  8434. "content": {
  8435. "application/json": {
  8436. "schema": {
  8437. "anyOf": [
  8438. {
  8439. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8440. },
  8441. {
  8442. "$ref": "#/components/schemas/InvalidRequestError"
  8443. }
  8444. ]
  8445. }
  8446. }
  8447. }
  8448. }
  8449. },
  8450. "description": "Append prompt to the TUI.",
  8451. "summary": "Append TUI prompt",
  8452. "requestBody": {
  8453. "content": {
  8454. "application/json": {
  8455. "schema": {
  8456. "type": "object",
  8457. "properties": {
  8458. "text": {
  8459. "type": "string"
  8460. }
  8461. },
  8462. "required": ["text"],
  8463. "additionalProperties": false
  8464. }
  8465. }
  8466. }
  8467. },
  8468. "x-codeSamples": [
  8469. {
  8470. "lang": "js",
  8471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8472. }
  8473. ]
  8474. }
  8475. },
  8476. "/tui/open-help": {
  8477. "post": {
  8478. "tags": ["tui"],
  8479. "operationId": "tui.openHelp",
  8480. "parameters": [
  8481. {
  8482. "name": "directory",
  8483. "in": "query",
  8484. "schema": {
  8485. "type": "string"
  8486. },
  8487. "required": false
  8488. },
  8489. {
  8490. "name": "workspace",
  8491. "in": "query",
  8492. "schema": {
  8493. "type": "string"
  8494. },
  8495. "required": false
  8496. }
  8497. ],
  8498. "responses": {
  8499. "200": {
  8500. "description": "Help dialog opened successfully",
  8501. "content": {
  8502. "application/json": {
  8503. "schema": {
  8504. "type": "boolean",
  8505. "description": "Help dialog opened successfully"
  8506. }
  8507. }
  8508. }
  8509. },
  8510. "400": {
  8511. "description": "Bad request",
  8512. "content": {
  8513. "application/json": {
  8514. "schema": {
  8515. "$ref": "#/components/schemas/BadRequestError"
  8516. }
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "description": "Open the help dialog in the TUI to display user assistance information.",
  8522. "summary": "Open help dialog",
  8523. "x-codeSamples": [
  8524. {
  8525. "lang": "js",
  8526. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8527. }
  8528. ]
  8529. }
  8530. },
  8531. "/tui/open-sessions": {
  8532. "post": {
  8533. "tags": ["tui"],
  8534. "operationId": "tui.openSessions",
  8535. "parameters": [
  8536. {
  8537. "name": "directory",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. },
  8544. {
  8545. "name": "workspace",
  8546. "in": "query",
  8547. "schema": {
  8548. "type": "string"
  8549. },
  8550. "required": false
  8551. }
  8552. ],
  8553. "responses": {
  8554. "200": {
  8555. "description": "Session dialog opened successfully",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "type": "boolean",
  8560. "description": "Session dialog opened successfully"
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "400": {
  8566. "description": "Bad request",
  8567. "content": {
  8568. "application/json": {
  8569. "schema": {
  8570. "$ref": "#/components/schemas/BadRequestError"
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Open the session dialog.",
  8577. "summary": "Open sessions dialog",
  8578. "x-codeSamples": [
  8579. {
  8580. "lang": "js",
  8581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8582. }
  8583. ]
  8584. }
  8585. },
  8586. "/tui/open-themes": {
  8587. "post": {
  8588. "tags": ["tui"],
  8589. "operationId": "tui.openThemes",
  8590. "parameters": [
  8591. {
  8592. "name": "directory",
  8593. "in": "query",
  8594. "schema": {
  8595. "type": "string"
  8596. },
  8597. "required": false
  8598. },
  8599. {
  8600. "name": "workspace",
  8601. "in": "query",
  8602. "schema": {
  8603. "type": "string"
  8604. },
  8605. "required": false
  8606. }
  8607. ],
  8608. "responses": {
  8609. "200": {
  8610. "description": "Theme dialog opened successfully",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "type": "boolean",
  8615. "description": "Theme dialog opened successfully"
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "400": {
  8621. "description": "Bad request",
  8622. "content": {
  8623. "application/json": {
  8624. "schema": {
  8625. "$ref": "#/components/schemas/BadRequestError"
  8626. }
  8627. }
  8628. }
  8629. }
  8630. },
  8631. "description": "Open the theme dialog.",
  8632. "summary": "Open themes dialog",
  8633. "x-codeSamples": [
  8634. {
  8635. "lang": "js",
  8636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8637. }
  8638. ]
  8639. }
  8640. },
  8641. "/tui/open-models": {
  8642. "post": {
  8643. "tags": ["tui"],
  8644. "operationId": "tui.openModels",
  8645. "parameters": [
  8646. {
  8647. "name": "directory",
  8648. "in": "query",
  8649. "schema": {
  8650. "type": "string"
  8651. },
  8652. "required": false
  8653. },
  8654. {
  8655. "name": "workspace",
  8656. "in": "query",
  8657. "schema": {
  8658. "type": "string"
  8659. },
  8660. "required": false
  8661. }
  8662. ],
  8663. "responses": {
  8664. "200": {
  8665. "description": "Model dialog opened successfully",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "type": "boolean",
  8670. "description": "Model dialog opened successfully"
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "400": {
  8676. "description": "Bad request",
  8677. "content": {
  8678. "application/json": {
  8679. "schema": {
  8680. "$ref": "#/components/schemas/BadRequestError"
  8681. }
  8682. }
  8683. }
  8684. }
  8685. },
  8686. "description": "Open the model dialog.",
  8687. "summary": "Open models dialog",
  8688. "x-codeSamples": [
  8689. {
  8690. "lang": "js",
  8691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8692. }
  8693. ]
  8694. }
  8695. },
  8696. "/tui/submit-prompt": {
  8697. "post": {
  8698. "tags": ["tui"],
  8699. "operationId": "tui.submitPrompt",
  8700. "parameters": [
  8701. {
  8702. "name": "directory",
  8703. "in": "query",
  8704. "schema": {
  8705. "type": "string"
  8706. },
  8707. "required": false
  8708. },
  8709. {
  8710. "name": "workspace",
  8711. "in": "query",
  8712. "schema": {
  8713. "type": "string"
  8714. },
  8715. "required": false
  8716. }
  8717. ],
  8718. "responses": {
  8719. "200": {
  8720. "description": "Prompt submitted successfully",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "type": "boolean",
  8725. "description": "Prompt submitted successfully"
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "400": {
  8731. "description": "Bad request",
  8732. "content": {
  8733. "application/json": {
  8734. "schema": {
  8735. "$ref": "#/components/schemas/BadRequestError"
  8736. }
  8737. }
  8738. }
  8739. }
  8740. },
  8741. "description": "Submit the prompt.",
  8742. "summary": "Submit TUI prompt",
  8743. "x-codeSamples": [
  8744. {
  8745. "lang": "js",
  8746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8747. }
  8748. ]
  8749. }
  8750. },
  8751. "/tui/clear-prompt": {
  8752. "post": {
  8753. "tags": ["tui"],
  8754. "operationId": "tui.clearPrompt",
  8755. "parameters": [
  8756. {
  8757. "name": "directory",
  8758. "in": "query",
  8759. "schema": {
  8760. "type": "string"
  8761. },
  8762. "required": false
  8763. },
  8764. {
  8765. "name": "workspace",
  8766. "in": "query",
  8767. "schema": {
  8768. "type": "string"
  8769. },
  8770. "required": false
  8771. }
  8772. ],
  8773. "responses": {
  8774. "200": {
  8775. "description": "Prompt cleared successfully",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "type": "boolean",
  8780. "description": "Prompt cleared successfully"
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "400": {
  8786. "description": "Bad request",
  8787. "content": {
  8788. "application/json": {
  8789. "schema": {
  8790. "$ref": "#/components/schemas/BadRequestError"
  8791. }
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "description": "Clear the prompt.",
  8797. "summary": "Clear TUI prompt",
  8798. "x-codeSamples": [
  8799. {
  8800. "lang": "js",
  8801. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8802. }
  8803. ]
  8804. }
  8805. },
  8806. "/tui/execute-command": {
  8807. "post": {
  8808. "tags": ["tui"],
  8809. "operationId": "tui.executeCommand",
  8810. "parameters": [
  8811. {
  8812. "name": "directory",
  8813. "in": "query",
  8814. "schema": {
  8815. "type": "string"
  8816. },
  8817. "required": false
  8818. },
  8819. {
  8820. "name": "workspace",
  8821. "in": "query",
  8822. "schema": {
  8823. "type": "string"
  8824. },
  8825. "required": false
  8826. }
  8827. ],
  8828. "responses": {
  8829. "200": {
  8830. "description": "Command executed successfully",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "type": "boolean",
  8835. "description": "Command executed successfully"
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "400": {
  8841. "description": "BadRequest | InvalidRequestError",
  8842. "content": {
  8843. "application/json": {
  8844. "schema": {
  8845. "anyOf": [
  8846. {
  8847. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8848. },
  8849. {
  8850. "$ref": "#/components/schemas/InvalidRequestError"
  8851. }
  8852. ]
  8853. }
  8854. }
  8855. }
  8856. }
  8857. },
  8858. "description": "Execute a TUI command.",
  8859. "summary": "Execute TUI command",
  8860. "requestBody": {
  8861. "content": {
  8862. "application/json": {
  8863. "schema": {
  8864. "type": "object",
  8865. "properties": {
  8866. "command": {
  8867. "type": "string"
  8868. }
  8869. },
  8870. "required": ["command"],
  8871. "additionalProperties": false
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "x-codeSamples": [
  8877. {
  8878. "lang": "js",
  8879. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8880. }
  8881. ]
  8882. }
  8883. },
  8884. "/tui/show-toast": {
  8885. "post": {
  8886. "tags": ["tui"],
  8887. "operationId": "tui.showToast",
  8888. "parameters": [
  8889. {
  8890. "name": "directory",
  8891. "in": "query",
  8892. "schema": {
  8893. "type": "string"
  8894. },
  8895. "required": false
  8896. },
  8897. {
  8898. "name": "workspace",
  8899. "in": "query",
  8900. "schema": {
  8901. "type": "string"
  8902. },
  8903. "required": false
  8904. }
  8905. ],
  8906. "responses": {
  8907. "200": {
  8908. "description": "Toast notification shown successfully",
  8909. "content": {
  8910. "application/json": {
  8911. "schema": {
  8912. "type": "boolean",
  8913. "description": "Toast notification shown successfully"
  8914. }
  8915. }
  8916. }
  8917. },
  8918. "400": {
  8919. "description": "Bad request",
  8920. "content": {
  8921. "application/json": {
  8922. "schema": {
  8923. "$ref": "#/components/schemas/BadRequestError"
  8924. }
  8925. }
  8926. }
  8927. }
  8928. },
  8929. "description": "Show a toast notification in the TUI.",
  8930. "summary": "Show TUI toast",
  8931. "requestBody": {
  8932. "content": {
  8933. "application/json": {
  8934. "schema": {
  8935. "type": "object",
  8936. "properties": {
  8937. "title": {
  8938. "type": "string"
  8939. },
  8940. "message": {
  8941. "type": "string"
  8942. },
  8943. "variant": {
  8944. "type": "string",
  8945. "enum": ["info", "success", "warning", "error"]
  8946. },
  8947. "duration": {
  8948. "type": "integer",
  8949. "exclusiveMinimum": 0
  8950. }
  8951. },
  8952. "required": ["message", "variant"],
  8953. "additionalProperties": false
  8954. }
  8955. }
  8956. }
  8957. },
  8958. "x-codeSamples": [
  8959. {
  8960. "lang": "js",
  8961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8962. }
  8963. ]
  8964. }
  8965. },
  8966. "/tui/publish": {
  8967. "post": {
  8968. "tags": ["tui"],
  8969. "operationId": "tui.publish",
  8970. "parameters": [
  8971. {
  8972. "name": "directory",
  8973. "in": "query",
  8974. "schema": {
  8975. "type": "string"
  8976. },
  8977. "required": false
  8978. },
  8979. {
  8980. "name": "workspace",
  8981. "in": "query",
  8982. "schema": {
  8983. "type": "string"
  8984. },
  8985. "required": false
  8986. }
  8987. ],
  8988. "responses": {
  8989. "200": {
  8990. "description": "Event published successfully",
  8991. "content": {
  8992. "application/json": {
  8993. "schema": {
  8994. "type": "boolean",
  8995. "description": "Event published successfully"
  8996. }
  8997. }
  8998. }
  8999. },
  9000. "400": {
  9001. "description": "BadRequest | InvalidRequestError",
  9002. "content": {
  9003. "application/json": {
  9004. "schema": {
  9005. "anyOf": [
  9006. {
  9007. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9008. },
  9009. {
  9010. "$ref": "#/components/schemas/InvalidRequestError"
  9011. }
  9012. ]
  9013. }
  9014. }
  9015. }
  9016. }
  9017. },
  9018. "description": "Publish a TUI event.",
  9019. "summary": "Publish TUI event",
  9020. "requestBody": {
  9021. "content": {
  9022. "application/json": {
  9023. "schema": {
  9024. "anyOf": [
  9025. {
  9026. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9027. },
  9028. {
  9029. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9030. },
  9031. {
  9032. "$ref": "#/components/schemas/EventTuiToastShow"
  9033. },
  9034. {
  9035. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9036. }
  9037. ]
  9038. }
  9039. }
  9040. }
  9041. },
  9042. "x-codeSamples": [
  9043. {
  9044. "lang": "js",
  9045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9046. }
  9047. ]
  9048. }
  9049. },
  9050. "/tui/select-session": {
  9051. "post": {
  9052. "tags": ["tui"],
  9053. "operationId": "tui.selectSession",
  9054. "parameters": [
  9055. {
  9056. "name": "directory",
  9057. "in": "query",
  9058. "schema": {
  9059. "type": "string"
  9060. },
  9061. "required": false
  9062. },
  9063. {
  9064. "name": "workspace",
  9065. "in": "query",
  9066. "schema": {
  9067. "type": "string"
  9068. },
  9069. "required": false
  9070. }
  9071. ],
  9072. "responses": {
  9073. "200": {
  9074. "description": "Session selected successfully",
  9075. "content": {
  9076. "application/json": {
  9077. "schema": {
  9078. "type": "boolean",
  9079. "description": "Session selected successfully"
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "400": {
  9085. "description": "BadRequest | InvalidRequestError",
  9086. "content": {
  9087. "application/json": {
  9088. "schema": {
  9089. "anyOf": [
  9090. {
  9091. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9092. },
  9093. {
  9094. "$ref": "#/components/schemas/InvalidRequestError"
  9095. }
  9096. ]
  9097. }
  9098. }
  9099. }
  9100. },
  9101. "404": {
  9102. "description": "NotFoundError",
  9103. "content": {
  9104. "application/json": {
  9105. "schema": {
  9106. "$ref": "#/components/schemas/NotFoundError"
  9107. }
  9108. }
  9109. }
  9110. }
  9111. },
  9112. "description": "Navigate the TUI to display the specified session.",
  9113. "summary": "Select session",
  9114. "requestBody": {
  9115. "content": {
  9116. "application/json": {
  9117. "schema": {
  9118. "type": "object",
  9119. "properties": {
  9120. "sessionID": {
  9121. "type": "string",
  9122. "pattern": "^ses",
  9123. "description": "Session ID to navigate to"
  9124. }
  9125. },
  9126. "required": ["sessionID"],
  9127. "additionalProperties": false
  9128. }
  9129. }
  9130. }
  9131. },
  9132. "x-codeSamples": [
  9133. {
  9134. "lang": "js",
  9135. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9136. }
  9137. ]
  9138. }
  9139. },
  9140. "/tui/control/next": {
  9141. "get": {
  9142. "tags": ["tui"],
  9143. "operationId": "tui.control.next",
  9144. "parameters": [
  9145. {
  9146. "name": "directory",
  9147. "in": "query",
  9148. "schema": {
  9149. "type": "string"
  9150. },
  9151. "required": false
  9152. },
  9153. {
  9154. "name": "workspace",
  9155. "in": "query",
  9156. "schema": {
  9157. "type": "string"
  9158. },
  9159. "required": false
  9160. }
  9161. ],
  9162. "responses": {
  9163. "200": {
  9164. "description": "Next TUI request",
  9165. "content": {
  9166. "application/json": {
  9167. "schema": {
  9168. "type": "object",
  9169. "properties": {
  9170. "path": {
  9171. "type": "string"
  9172. },
  9173. "body": {}
  9174. },
  9175. "required": ["path", "body"],
  9176. "additionalProperties": false,
  9177. "description": "Next TUI request"
  9178. }
  9179. }
  9180. }
  9181. },
  9182. "400": {
  9183. "description": "Bad request",
  9184. "content": {
  9185. "application/json": {
  9186. "schema": {
  9187. "$ref": "#/components/schemas/BadRequestError"
  9188. }
  9189. }
  9190. }
  9191. }
  9192. },
  9193. "description": "Retrieve the next TUI request from the queue for processing.",
  9194. "summary": "Get next TUI request",
  9195. "x-codeSamples": [
  9196. {
  9197. "lang": "js",
  9198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9199. }
  9200. ]
  9201. }
  9202. },
  9203. "/tui/control/response": {
  9204. "post": {
  9205. "tags": ["tui"],
  9206. "operationId": "tui.control.response",
  9207. "parameters": [
  9208. {
  9209. "name": "directory",
  9210. "in": "query",
  9211. "schema": {
  9212. "type": "string"
  9213. },
  9214. "required": false
  9215. },
  9216. {
  9217. "name": "workspace",
  9218. "in": "query",
  9219. "schema": {
  9220. "type": "string"
  9221. },
  9222. "required": false
  9223. }
  9224. ],
  9225. "responses": {
  9226. "200": {
  9227. "description": "Response submitted successfully",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "type": "boolean",
  9232. "description": "Response submitted successfully"
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "400": {
  9238. "description": "Bad request",
  9239. "content": {
  9240. "application/json": {
  9241. "schema": {
  9242. "$ref": "#/components/schemas/BadRequestError"
  9243. }
  9244. }
  9245. }
  9246. }
  9247. },
  9248. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9249. "summary": "Submit TUI response",
  9250. "requestBody": {
  9251. "content": {
  9252. "application/json": {
  9253. "schema": {}
  9254. }
  9255. }
  9256. },
  9257. "x-codeSamples": [
  9258. {
  9259. "lang": "js",
  9260. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9261. }
  9262. ]
  9263. }
  9264. },
  9265. "/experimental/workspace/adapter": {
  9266. "get": {
  9267. "tags": ["workspace"],
  9268. "operationId": "experimental.workspace.adapter.list",
  9269. "parameters": [
  9270. {
  9271. "name": "directory",
  9272. "in": "query",
  9273. "schema": {
  9274. "type": "string"
  9275. },
  9276. "required": false
  9277. },
  9278. {
  9279. "name": "workspace",
  9280. "in": "query",
  9281. "schema": {
  9282. "type": "string"
  9283. },
  9284. "required": false
  9285. }
  9286. ],
  9287. "responses": {
  9288. "200": {
  9289. "description": "Workspace adapters",
  9290. "content": {
  9291. "application/json": {
  9292. "schema": {
  9293. "type": "array",
  9294. "items": {
  9295. "type": "object",
  9296. "properties": {
  9297. "type": {
  9298. "type": "string"
  9299. },
  9300. "name": {
  9301. "type": "string"
  9302. },
  9303. "description": {
  9304. "type": "string"
  9305. }
  9306. },
  9307. "required": ["type", "name", "description"],
  9308. "additionalProperties": false
  9309. },
  9310. "description": "Workspace adapters"
  9311. }
  9312. }
  9313. }
  9314. },
  9315. "400": {
  9316. "description": "Bad request",
  9317. "content": {
  9318. "application/json": {
  9319. "schema": {
  9320. "$ref": "#/components/schemas/BadRequestError"
  9321. }
  9322. }
  9323. }
  9324. }
  9325. },
  9326. "description": "List all available workspace adapters for the current project.",
  9327. "summary": "List workspace adapters",
  9328. "x-codeSamples": [
  9329. {
  9330. "lang": "js",
  9331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9332. }
  9333. ]
  9334. }
  9335. },
  9336. "/experimental/workspace": {
  9337. "get": {
  9338. "tags": ["workspace"],
  9339. "operationId": "experimental.workspace.list",
  9340. "parameters": [
  9341. {
  9342. "name": "directory",
  9343. "in": "query",
  9344. "schema": {
  9345. "type": "string"
  9346. },
  9347. "required": false
  9348. },
  9349. {
  9350. "name": "workspace",
  9351. "in": "query",
  9352. "schema": {
  9353. "type": "string"
  9354. },
  9355. "required": false
  9356. }
  9357. ],
  9358. "responses": {
  9359. "200": {
  9360. "description": "Workspaces",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "type": "array",
  9365. "items": {
  9366. "$ref": "#/components/schemas/Workspace"
  9367. },
  9368. "description": "Workspaces"
  9369. }
  9370. }
  9371. }
  9372. },
  9373. "400": {
  9374. "description": "Bad request",
  9375. "content": {
  9376. "application/json": {
  9377. "schema": {
  9378. "$ref": "#/components/schemas/BadRequestError"
  9379. }
  9380. }
  9381. }
  9382. }
  9383. },
  9384. "description": "List all workspaces.",
  9385. "summary": "List workspaces",
  9386. "x-codeSamples": [
  9387. {
  9388. "lang": "js",
  9389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9390. }
  9391. ]
  9392. },
  9393. "post": {
  9394. "tags": ["workspace"],
  9395. "operationId": "experimental.workspace.create",
  9396. "parameters": [
  9397. {
  9398. "name": "directory",
  9399. "in": "query",
  9400. "schema": {
  9401. "type": "string"
  9402. },
  9403. "required": false
  9404. },
  9405. {
  9406. "name": "workspace",
  9407. "in": "query",
  9408. "schema": {
  9409. "type": "string"
  9410. },
  9411. "required": false
  9412. }
  9413. ],
  9414. "responses": {
  9415. "200": {
  9416. "description": "Workspace created",
  9417. "content": {
  9418. "application/json": {
  9419. "schema": {
  9420. "$ref": "#/components/schemas/Workspace"
  9421. }
  9422. }
  9423. }
  9424. },
  9425. "400": {
  9426. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9427. "content": {
  9428. "application/json": {
  9429. "schema": {
  9430. "anyOf": [
  9431. {
  9432. "$ref": "#/components/schemas/WorkspaceCreateError"
  9433. },
  9434. {
  9435. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9436. },
  9437. {
  9438. "$ref": "#/components/schemas/InvalidRequestError"
  9439. }
  9440. ]
  9441. }
  9442. }
  9443. }
  9444. }
  9445. },
  9446. "description": "Create a workspace for the current project.",
  9447. "summary": "Create workspace",
  9448. "requestBody": {
  9449. "content": {
  9450. "application/json": {
  9451. "schema": {
  9452. "type": "object",
  9453. "properties": {
  9454. "id": {
  9455. "type": "string",
  9456. "pattern": "^wrk"
  9457. },
  9458. "type": {
  9459. "type": "string"
  9460. },
  9461. "branch": {
  9462. "anyOf": [
  9463. {
  9464. "type": "string"
  9465. },
  9466. {
  9467. "type": "null"
  9468. }
  9469. ]
  9470. },
  9471. "extra": {
  9472. "anyOf": [
  9473. {},
  9474. {
  9475. "type": "null"
  9476. }
  9477. ]
  9478. }
  9479. },
  9480. "required": ["type"],
  9481. "additionalProperties": false
  9482. }
  9483. }
  9484. }
  9485. },
  9486. "x-codeSamples": [
  9487. {
  9488. "lang": "js",
  9489. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9490. }
  9491. ]
  9492. }
  9493. },
  9494. "/experimental/workspace/sync-list": {
  9495. "post": {
  9496. "tags": ["workspace"],
  9497. "operationId": "experimental.workspace.syncList",
  9498. "parameters": [
  9499. {
  9500. "name": "directory",
  9501. "in": "query",
  9502. "schema": {
  9503. "type": "string"
  9504. },
  9505. "required": false
  9506. },
  9507. {
  9508. "name": "workspace",
  9509. "in": "query",
  9510. "schema": {
  9511. "type": "string"
  9512. },
  9513. "required": false
  9514. }
  9515. ],
  9516. "responses": {
  9517. "204": {
  9518. "description": "Workspace list synced"
  9519. },
  9520. "400": {
  9521. "description": "Bad request",
  9522. "content": {
  9523. "application/json": {
  9524. "schema": {
  9525. "$ref": "#/components/schemas/BadRequestError"
  9526. }
  9527. }
  9528. }
  9529. }
  9530. },
  9531. "description": "Register missing workspaces returned by workspace adapters.",
  9532. "summary": "Sync workspace list",
  9533. "x-codeSamples": [
  9534. {
  9535. "lang": "js",
  9536. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9537. }
  9538. ]
  9539. }
  9540. },
  9541. "/experimental/workspace/status": {
  9542. "get": {
  9543. "tags": ["workspace"],
  9544. "operationId": "experimental.workspace.status",
  9545. "parameters": [
  9546. {
  9547. "name": "directory",
  9548. "in": "query",
  9549. "schema": {
  9550. "type": "string"
  9551. },
  9552. "required": false
  9553. },
  9554. {
  9555. "name": "workspace",
  9556. "in": "query",
  9557. "schema": {
  9558. "type": "string"
  9559. },
  9560. "required": false
  9561. }
  9562. ],
  9563. "responses": {
  9564. "200": {
  9565. "description": "Workspace status",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "type": "array",
  9570. "items": {
  9571. "type": "object",
  9572. "properties": {
  9573. "workspaceID": {
  9574. "type": "string",
  9575. "pattern": "^wrk"
  9576. },
  9577. "status": {
  9578. "type": "string",
  9579. "enum": ["connected", "connecting", "disconnected", "error"]
  9580. }
  9581. },
  9582. "required": ["workspaceID", "status"],
  9583. "additionalProperties": false
  9584. },
  9585. "description": "Workspace status"
  9586. }
  9587. }
  9588. }
  9589. },
  9590. "400": {
  9591. "description": "Bad request",
  9592. "content": {
  9593. "application/json": {
  9594. "schema": {
  9595. "$ref": "#/components/schemas/BadRequestError"
  9596. }
  9597. }
  9598. }
  9599. }
  9600. },
  9601. "description": "Get connection status for workspaces in the current project.",
  9602. "summary": "Workspace status",
  9603. "x-codeSamples": [
  9604. {
  9605. "lang": "js",
  9606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9607. }
  9608. ]
  9609. }
  9610. },
  9611. "/experimental/workspace/{id}": {
  9612. "delete": {
  9613. "tags": ["workspace"],
  9614. "operationId": "experimental.workspace.remove",
  9615. "parameters": [
  9616. {
  9617. "name": "id",
  9618. "in": "path",
  9619. "schema": {
  9620. "type": "string",
  9621. "pattern": "^wrk"
  9622. },
  9623. "required": true
  9624. },
  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. "200": {
  9644. "description": "Workspace removed",
  9645. "content": {
  9646. "application/json": {
  9647. "schema": {
  9648. "$ref": "#/components/schemas/Workspace"
  9649. }
  9650. }
  9651. }
  9652. },
  9653. "400": {
  9654. "description": "BadRequest | InvalidRequestError",
  9655. "content": {
  9656. "application/json": {
  9657. "schema": {
  9658. "anyOf": [
  9659. {
  9660. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9661. },
  9662. {
  9663. "$ref": "#/components/schemas/InvalidRequestError"
  9664. }
  9665. ]
  9666. }
  9667. }
  9668. }
  9669. }
  9670. },
  9671. "description": "Remove an existing workspace.",
  9672. "summary": "Remove workspace",
  9673. "x-codeSamples": [
  9674. {
  9675. "lang": "js",
  9676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9677. }
  9678. ]
  9679. }
  9680. },
  9681. "/experimental/workspace/warp": {
  9682. "post": {
  9683. "tags": ["workspace"],
  9684. "operationId": "experimental.workspace.warp",
  9685. "parameters": [
  9686. {
  9687. "name": "directory",
  9688. "in": "query",
  9689. "schema": {
  9690. "type": "string"
  9691. },
  9692. "required": false
  9693. },
  9694. {
  9695. "name": "workspace",
  9696. "in": "query",
  9697. "schema": {
  9698. "type": "string"
  9699. },
  9700. "required": false
  9701. }
  9702. ],
  9703. "responses": {
  9704. "204": {
  9705. "description": "Session warped"
  9706. },
  9707. "400": {
  9708. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9709. "content": {
  9710. "application/json": {
  9711. "schema": {
  9712. "anyOf": [
  9713. {
  9714. "$ref": "#/components/schemas/WorkspaceWarpError"
  9715. },
  9716. {
  9717. "$ref": "#/components/schemas/VcsApplyError"
  9718. },
  9719. {
  9720. "$ref": "#/components/schemas/InvalidRequestError"
  9721. }
  9722. ]
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "404": {
  9728. "description": "NotFoundError",
  9729. "content": {
  9730. "application/json": {
  9731. "schema": {
  9732. "$ref": "#/components/schemas/NotFoundError"
  9733. }
  9734. }
  9735. }
  9736. }
  9737. },
  9738. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9739. "summary": "Warp session into workspace",
  9740. "requestBody": {
  9741. "content": {
  9742. "application/json": {
  9743. "schema": {
  9744. "type": "object",
  9745. "properties": {
  9746. "id": {
  9747. "anyOf": [
  9748. {
  9749. "type": "string",
  9750. "pattern": "^wrk"
  9751. },
  9752. {
  9753. "type": "null"
  9754. }
  9755. ]
  9756. },
  9757. "sessionID": {
  9758. "type": "string",
  9759. "pattern": "^ses"
  9760. },
  9761. "copyChanges": {
  9762. "type": "boolean"
  9763. }
  9764. },
  9765. "required": ["id", "sessionID"],
  9766. "additionalProperties": false
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "x-codeSamples": [
  9772. {
  9773. "lang": "js",
  9774. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9775. }
  9776. ]
  9777. }
  9778. },
  9779. "/api/health": {
  9780. "get": {
  9781. "tags": ["opencode experimental HttpApi"],
  9782. "operationId": "v2.health.get",
  9783. "parameters": [],
  9784. "security": [],
  9785. "responses": {
  9786. "200": {
  9787. "description": "Success",
  9788. "content": {
  9789. "application/json": {
  9790. "schema": {
  9791. "type": "object",
  9792. "properties": {
  9793. "healthy": {
  9794. "type": "boolean",
  9795. "enum": [true]
  9796. }
  9797. },
  9798. "required": ["healthy"],
  9799. "additionalProperties": false
  9800. }
  9801. }
  9802. }
  9803. },
  9804. "400": {
  9805. "description": "InvalidRequestError",
  9806. "content": {
  9807. "application/json": {
  9808. "schema": {
  9809. "$ref": "#/components/schemas/InvalidRequestError"
  9810. }
  9811. }
  9812. }
  9813. },
  9814. "401": {
  9815. "description": "UnauthorizedError",
  9816. "content": {
  9817. "application/json": {
  9818. "schema": {
  9819. "$ref": "#/components/schemas/UnauthorizedError"
  9820. }
  9821. }
  9822. }
  9823. }
  9824. },
  9825. "description": "Check whether the v2 API server is ready to accept requests.",
  9826. "summary": "Check v2 server health",
  9827. "x-codeSamples": [
  9828. {
  9829. "lang": "js",
  9830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9831. }
  9832. ]
  9833. }
  9834. },
  9835. "/api/agent": {
  9836. "get": {
  9837. "tags": ["opencode experimental HttpApi"],
  9838. "operationId": "v2.agent.list",
  9839. "parameters": [
  9840. {
  9841. "name": "location",
  9842. "in": "query",
  9843. "schema": {
  9844. "type": "object",
  9845. "properties": {
  9846. "directory": {
  9847. "type": "string"
  9848. },
  9849. "workspace": {
  9850. "type": "string"
  9851. }
  9852. },
  9853. "additionalProperties": false
  9854. },
  9855. "required": false,
  9856. "style": "deepObject",
  9857. "explode": true
  9858. }
  9859. ],
  9860. "security": [],
  9861. "responses": {
  9862. "200": {
  9863. "description": "Success",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "type": "object",
  9868. "properties": {
  9869. "location": {
  9870. "$ref": "#/components/schemas/LocationInfo"
  9871. },
  9872. "data": {
  9873. "type": "array",
  9874. "items": {
  9875. "$ref": "#/components/schemas/AgentV2Info"
  9876. }
  9877. }
  9878. },
  9879. "required": ["location", "data"],
  9880. "additionalProperties": false
  9881. }
  9882. }
  9883. }
  9884. },
  9885. "400": {
  9886. "description": "InvalidRequestError",
  9887. "content": {
  9888. "application/json": {
  9889. "schema": {
  9890. "$ref": "#/components/schemas/InvalidRequestError"
  9891. }
  9892. }
  9893. }
  9894. },
  9895. "401": {
  9896. "description": "UnauthorizedError",
  9897. "content": {
  9898. "application/json": {
  9899. "schema": {
  9900. "$ref": "#/components/schemas/UnauthorizedError"
  9901. }
  9902. }
  9903. }
  9904. }
  9905. },
  9906. "description": "Retrieve currently registered v2 agents.",
  9907. "summary": "List v2 agents",
  9908. "x-codeSamples": [
  9909. {
  9910. "lang": "js",
  9911. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9912. }
  9913. ]
  9914. }
  9915. },
  9916. "/api/session": {
  9917. "get": {
  9918. "tags": ["v2"],
  9919. "operationId": "v2.session.list",
  9920. "parameters": [
  9921. {
  9922. "name": "workspace",
  9923. "in": "query",
  9924. "schema": {
  9925. "type": "string",
  9926. "pattern": "^wrk"
  9927. },
  9928. "required": false
  9929. },
  9930. {
  9931. "name": "limit",
  9932. "in": "query",
  9933. "schema": {
  9934. "type": "number"
  9935. },
  9936. "required": false
  9937. },
  9938. {
  9939. "name": "order",
  9940. "in": "query",
  9941. "schema": {
  9942. "type": "string",
  9943. "enum": ["asc", "desc"]
  9944. },
  9945. "required": false
  9946. },
  9947. {
  9948. "name": "search",
  9949. "in": "query",
  9950. "schema": {
  9951. "type": "string"
  9952. },
  9953. "required": false
  9954. },
  9955. {
  9956. "name": "directory",
  9957. "in": "query",
  9958. "schema": {
  9959. "type": "string"
  9960. },
  9961. "required": false
  9962. },
  9963. {
  9964. "name": "project",
  9965. "in": "query",
  9966. "schema": {
  9967. "type": "string"
  9968. },
  9969. "required": false
  9970. },
  9971. {
  9972. "name": "subpath",
  9973. "in": "query",
  9974. "schema": {
  9975. "type": "string"
  9976. },
  9977. "required": false
  9978. },
  9979. {
  9980. "name": "cursor",
  9981. "in": "query",
  9982. "schema": {
  9983. "type": "string",
  9984. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  9985. },
  9986. "required": false
  9987. }
  9988. ],
  9989. "security": [],
  9990. "responses": {
  9991. "200": {
  9992. "description": "V2SessionsResponse",
  9993. "content": {
  9994. "application/json": {
  9995. "schema": {
  9996. "$ref": "#/components/schemas/V2SessionsResponse"
  9997. }
  9998. }
  9999. }
  10000. },
  10001. "400": {
  10002. "description": "InvalidCursorError | InvalidRequestError",
  10003. "content": {
  10004. "application/json": {
  10005. "schema": {
  10006. "anyOf": [
  10007. {
  10008. "$ref": "#/components/schemas/InvalidCursorError"
  10009. },
  10010. {
  10011. "$ref": "#/components/schemas/InvalidRequestError"
  10012. },
  10013. {
  10014. "$ref": "#/components/schemas/InvalidRequestError"
  10015. }
  10016. ]
  10017. }
  10018. }
  10019. }
  10020. },
  10021. "401": {
  10022. "description": "UnauthorizedError",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "$ref": "#/components/schemas/UnauthorizedError"
  10027. }
  10028. }
  10029. }
  10030. }
  10031. },
  10032. "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.",
  10033. "summary": "List v2 sessions",
  10034. "x-codeSamples": [
  10035. {
  10036. "lang": "js",
  10037. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10038. }
  10039. ]
  10040. }
  10041. },
  10042. "/api/session/{sessionID}/prompt": {
  10043. "post": {
  10044. "tags": ["v2"],
  10045. "operationId": "v2.session.prompt",
  10046. "parameters": [
  10047. {
  10048. "name": "sessionID",
  10049. "in": "path",
  10050. "schema": {
  10051. "type": "string",
  10052. "pattern": "^ses"
  10053. },
  10054. "required": true
  10055. }
  10056. ],
  10057. "security": [],
  10058. "responses": {
  10059. "200": {
  10060. "description": "Success",
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "type": "object",
  10065. "properties": {
  10066. "data": {
  10067. "$ref": "#/components/schemas/SessionMessageUser"
  10068. }
  10069. },
  10070. "required": ["data"],
  10071. "additionalProperties": false
  10072. }
  10073. }
  10074. }
  10075. },
  10076. "400": {
  10077. "description": "InvalidRequestError",
  10078. "content": {
  10079. "application/json": {
  10080. "schema": {
  10081. "$ref": "#/components/schemas/InvalidRequestError"
  10082. }
  10083. }
  10084. }
  10085. },
  10086. "401": {
  10087. "description": "UnauthorizedError",
  10088. "content": {
  10089. "application/json": {
  10090. "schema": {
  10091. "$ref": "#/components/schemas/UnauthorizedError"
  10092. }
  10093. }
  10094. }
  10095. },
  10096. "404": {
  10097. "description": "SessionNotFoundError",
  10098. "content": {
  10099. "application/json": {
  10100. "schema": {
  10101. "$ref": "#/components/schemas/SessionNotFoundError"
  10102. }
  10103. }
  10104. }
  10105. },
  10106. "409": {
  10107. "description": "ConflictError",
  10108. "content": {
  10109. "application/json": {
  10110. "schema": {
  10111. "$ref": "#/components/schemas/ConflictError"
  10112. }
  10113. }
  10114. }
  10115. }
  10116. },
  10117. "description": "Durably admit one v2 session input and schedule agent-loop execution unless resume is false.",
  10118. "summary": "Send v2 message",
  10119. "requestBody": {
  10120. "content": {
  10121. "application/json": {
  10122. "schema": {
  10123. "type": "object",
  10124. "properties": {
  10125. "id": {
  10126. "type": "string"
  10127. },
  10128. "prompt": {
  10129. "$ref": "#/components/schemas/Prompt"
  10130. },
  10131. "delivery": {
  10132. "type": "string",
  10133. "enum": ["steer", "queue"]
  10134. },
  10135. "resume": {
  10136. "type": "boolean"
  10137. }
  10138. },
  10139. "required": ["prompt"],
  10140. "additionalProperties": false
  10141. }
  10142. }
  10143. },
  10144. "required": true
  10145. },
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10150. }
  10151. ]
  10152. }
  10153. },
  10154. "/api/session/{sessionID}/compact": {
  10155. "post": {
  10156. "tags": ["v2"],
  10157. "operationId": "v2.session.compact",
  10158. "parameters": [
  10159. {
  10160. "name": "sessionID",
  10161. "in": "path",
  10162. "schema": {
  10163. "type": "string",
  10164. "pattern": "^ses"
  10165. },
  10166. "required": true
  10167. }
  10168. ],
  10169. "security": [],
  10170. "responses": {
  10171. "204": {
  10172. "description": "<No Content>"
  10173. },
  10174. "400": {
  10175. "description": "InvalidRequestError",
  10176. "content": {
  10177. "application/json": {
  10178. "schema": {
  10179. "$ref": "#/components/schemas/InvalidRequestError"
  10180. }
  10181. }
  10182. }
  10183. },
  10184. "401": {
  10185. "description": "UnauthorizedError",
  10186. "content": {
  10187. "application/json": {
  10188. "schema": {
  10189. "$ref": "#/components/schemas/UnauthorizedError"
  10190. }
  10191. }
  10192. }
  10193. },
  10194. "404": {
  10195. "description": "SessionNotFoundError",
  10196. "content": {
  10197. "application/json": {
  10198. "schema": {
  10199. "$ref": "#/components/schemas/SessionNotFoundError"
  10200. }
  10201. }
  10202. }
  10203. },
  10204. "503": {
  10205. "description": "ServiceUnavailableError",
  10206. "content": {
  10207. "application/json": {
  10208. "schema": {
  10209. "$ref": "#/components/schemas/ServiceUnavailableError"
  10210. }
  10211. }
  10212. }
  10213. }
  10214. },
  10215. "description": "Compact a v2 session conversation.",
  10216. "summary": "Compact v2 session",
  10217. "x-codeSamples": [
  10218. {
  10219. "lang": "js",
  10220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10221. }
  10222. ]
  10223. }
  10224. },
  10225. "/api/session/{sessionID}/wait": {
  10226. "post": {
  10227. "tags": ["v2"],
  10228. "operationId": "v2.session.wait",
  10229. "parameters": [
  10230. {
  10231. "name": "sessionID",
  10232. "in": "path",
  10233. "schema": {
  10234. "type": "string",
  10235. "pattern": "^ses"
  10236. },
  10237. "required": true
  10238. }
  10239. ],
  10240. "security": [],
  10241. "responses": {
  10242. "204": {
  10243. "description": "<No Content>"
  10244. },
  10245. "400": {
  10246. "description": "InvalidRequestError",
  10247. "content": {
  10248. "application/json": {
  10249. "schema": {
  10250. "$ref": "#/components/schemas/InvalidRequestError"
  10251. }
  10252. }
  10253. }
  10254. },
  10255. "401": {
  10256. "description": "UnauthorizedError",
  10257. "content": {
  10258. "application/json": {
  10259. "schema": {
  10260. "$ref": "#/components/schemas/UnauthorizedError"
  10261. }
  10262. }
  10263. }
  10264. },
  10265. "404": {
  10266. "description": "SessionNotFoundError",
  10267. "content": {
  10268. "application/json": {
  10269. "schema": {
  10270. "$ref": "#/components/schemas/SessionNotFoundError"
  10271. }
  10272. }
  10273. }
  10274. },
  10275. "503": {
  10276. "description": "ServiceUnavailableError",
  10277. "content": {
  10278. "application/json": {
  10279. "schema": {
  10280. "$ref": "#/components/schemas/ServiceUnavailableError"
  10281. }
  10282. }
  10283. }
  10284. }
  10285. },
  10286. "description": "Wait for a v2 session agent loop to become idle.",
  10287. "summary": "Wait for v2 session",
  10288. "x-codeSamples": [
  10289. {
  10290. "lang": "js",
  10291. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10292. }
  10293. ]
  10294. }
  10295. },
  10296. "/api/session/{sessionID}/context": {
  10297. "get": {
  10298. "tags": ["v2"],
  10299. "operationId": "v2.session.context",
  10300. "parameters": [
  10301. {
  10302. "name": "sessionID",
  10303. "in": "path",
  10304. "schema": {
  10305. "type": "string",
  10306. "pattern": "^ses"
  10307. },
  10308. "required": true
  10309. }
  10310. ],
  10311. "security": [],
  10312. "responses": {
  10313. "200": {
  10314. "description": "Success",
  10315. "content": {
  10316. "application/json": {
  10317. "schema": {
  10318. "type": "object",
  10319. "properties": {
  10320. "data": {
  10321. "type": "array",
  10322. "items": {
  10323. "$ref": "#/components/schemas/SessionMessage"
  10324. }
  10325. }
  10326. },
  10327. "required": ["data"],
  10328. "additionalProperties": false
  10329. }
  10330. }
  10331. }
  10332. },
  10333. "400": {
  10334. "description": "InvalidRequestError",
  10335. "content": {
  10336. "application/json": {
  10337. "schema": {
  10338. "$ref": "#/components/schemas/InvalidRequestError"
  10339. }
  10340. }
  10341. }
  10342. },
  10343. "401": {
  10344. "description": "UnauthorizedError",
  10345. "content": {
  10346. "application/json": {
  10347. "schema": {
  10348. "$ref": "#/components/schemas/UnauthorizedError"
  10349. }
  10350. }
  10351. }
  10352. },
  10353. "404": {
  10354. "description": "SessionNotFoundError",
  10355. "content": {
  10356. "application/json": {
  10357. "schema": {
  10358. "$ref": "#/components/schemas/SessionNotFoundError"
  10359. }
  10360. }
  10361. }
  10362. },
  10363. "500": {
  10364. "description": "UnknownError",
  10365. "content": {
  10366. "application/json": {
  10367. "schema": {
  10368. "$ref": "#/components/schemas/UnknownError1"
  10369. }
  10370. }
  10371. }
  10372. }
  10373. },
  10374. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  10375. "summary": "Get v2 session context",
  10376. "x-codeSamples": [
  10377. {
  10378. "lang": "js",
  10379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10380. }
  10381. ]
  10382. }
  10383. },
  10384. "/api/session/{sessionID}/message": {
  10385. "get": {
  10386. "tags": ["v2 messages"],
  10387. "operationId": "v2.session.messages",
  10388. "parameters": [
  10389. {
  10390. "name": "sessionID",
  10391. "in": "path",
  10392. "schema": {
  10393. "type": "string",
  10394. "pattern": "^ses"
  10395. },
  10396. "required": true
  10397. },
  10398. {
  10399. "name": "limit",
  10400. "in": "query",
  10401. "schema": {
  10402. "type": "number"
  10403. },
  10404. "required": false
  10405. },
  10406. {
  10407. "name": "order",
  10408. "in": "query",
  10409. "schema": {
  10410. "type": "string",
  10411. "enum": ["asc", "desc"]
  10412. },
  10413. "required": false
  10414. },
  10415. {
  10416. "name": "cursor",
  10417. "in": "query",
  10418. "schema": {
  10419. "type": "string",
  10420. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10421. },
  10422. "required": false
  10423. }
  10424. ],
  10425. "security": [],
  10426. "responses": {
  10427. "200": {
  10428. "description": "V2SessionMessagesResponse",
  10429. "content": {
  10430. "application/json": {
  10431. "schema": {
  10432. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  10433. }
  10434. }
  10435. }
  10436. },
  10437. "400": {
  10438. "description": "InvalidCursorError | InvalidRequestError",
  10439. "content": {
  10440. "application/json": {
  10441. "schema": {
  10442. "anyOf": [
  10443. {
  10444. "$ref": "#/components/schemas/InvalidCursorError"
  10445. },
  10446. {
  10447. "$ref": "#/components/schemas/InvalidRequestError"
  10448. }
  10449. ]
  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. "$ref": "#/components/schemas/SessionNotFoundError"
  10470. }
  10471. }
  10472. }
  10473. },
  10474. "500": {
  10475. "description": "UnknownError",
  10476. "content": {
  10477. "application/json": {
  10478. "schema": {
  10479. "$ref": "#/components/schemas/UnknownError1"
  10480. }
  10481. }
  10482. }
  10483. }
  10484. },
  10485. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10486. "summary": "Get v2 session messages",
  10487. "x-codeSamples": [
  10488. {
  10489. "lang": "js",
  10490. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10491. }
  10492. ]
  10493. }
  10494. },
  10495. "/api/model": {
  10496. "get": {
  10497. "tags": ["v2 models"],
  10498. "operationId": "v2.model.list",
  10499. "parameters": [
  10500. {
  10501. "name": "location",
  10502. "in": "query",
  10503. "schema": {
  10504. "type": "object",
  10505. "properties": {
  10506. "directory": {
  10507. "type": "string"
  10508. },
  10509. "workspace": {
  10510. "type": "string"
  10511. }
  10512. },
  10513. "additionalProperties": false
  10514. },
  10515. "required": false,
  10516. "style": "deepObject",
  10517. "explode": true
  10518. }
  10519. ],
  10520. "security": [],
  10521. "responses": {
  10522. "200": {
  10523. "description": "Success",
  10524. "content": {
  10525. "application/json": {
  10526. "schema": {
  10527. "type": "object",
  10528. "properties": {
  10529. "location": {
  10530. "$ref": "#/components/schemas/LocationInfo"
  10531. },
  10532. "data": {
  10533. "type": "array",
  10534. "items": {
  10535. "$ref": "#/components/schemas/ModelV2Info"
  10536. }
  10537. }
  10538. },
  10539. "required": ["location", "data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "503": {
  10566. "description": "ServiceUnavailableError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "$ref": "#/components/schemas/ServiceUnavailableError"
  10571. }
  10572. }
  10573. }
  10574. }
  10575. },
  10576. "description": "Retrieve available v2 models ordered by release date.",
  10577. "summary": "List v2 models",
  10578. "x-codeSamples": [
  10579. {
  10580. "lang": "js",
  10581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10582. }
  10583. ]
  10584. }
  10585. },
  10586. "/api/provider": {
  10587. "get": {
  10588. "tags": ["v2 providers"],
  10589. "operationId": "v2.provider.list",
  10590. "parameters": [
  10591. {
  10592. "name": "location",
  10593. "in": "query",
  10594. "schema": {
  10595. "type": "object",
  10596. "properties": {
  10597. "directory": {
  10598. "type": "string"
  10599. },
  10600. "workspace": {
  10601. "type": "string"
  10602. }
  10603. },
  10604. "additionalProperties": false
  10605. },
  10606. "required": false,
  10607. "style": "deepObject",
  10608. "explode": true
  10609. }
  10610. ],
  10611. "security": [],
  10612. "responses": {
  10613. "200": {
  10614. "description": "Success",
  10615. "content": {
  10616. "application/json": {
  10617. "schema": {
  10618. "type": "object",
  10619. "properties": {
  10620. "location": {
  10621. "$ref": "#/components/schemas/LocationInfo"
  10622. },
  10623. "data": {
  10624. "type": "array",
  10625. "items": {
  10626. "$ref": "#/components/schemas/ProviderV2Info"
  10627. }
  10628. }
  10629. },
  10630. "required": ["location", "data"],
  10631. "additionalProperties": false
  10632. }
  10633. }
  10634. }
  10635. },
  10636. "400": {
  10637. "description": "InvalidRequestError",
  10638. "content": {
  10639. "application/json": {
  10640. "schema": {
  10641. "$ref": "#/components/schemas/InvalidRequestError"
  10642. }
  10643. }
  10644. }
  10645. },
  10646. "401": {
  10647. "description": "UnauthorizedError",
  10648. "content": {
  10649. "application/json": {
  10650. "schema": {
  10651. "$ref": "#/components/schemas/UnauthorizedError"
  10652. }
  10653. }
  10654. }
  10655. },
  10656. "503": {
  10657. "description": "ServiceUnavailableError",
  10658. "content": {
  10659. "application/json": {
  10660. "schema": {
  10661. "$ref": "#/components/schemas/ServiceUnavailableError"
  10662. }
  10663. }
  10664. }
  10665. }
  10666. },
  10667. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  10668. "summary": "List v2 providers",
  10669. "x-codeSamples": [
  10670. {
  10671. "lang": "js",
  10672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10673. }
  10674. ]
  10675. }
  10676. },
  10677. "/api/provider/{providerID}": {
  10678. "get": {
  10679. "tags": ["v2 providers"],
  10680. "operationId": "v2.provider.get",
  10681. "parameters": [
  10682. {
  10683. "name": "providerID",
  10684. "in": "path",
  10685. "schema": {
  10686. "type": "string"
  10687. },
  10688. "required": true
  10689. },
  10690. {
  10691. "name": "location",
  10692. "in": "query",
  10693. "schema": {
  10694. "type": "object",
  10695. "properties": {
  10696. "directory": {
  10697. "type": "string"
  10698. },
  10699. "workspace": {
  10700. "type": "string"
  10701. }
  10702. },
  10703. "additionalProperties": false
  10704. },
  10705. "required": false,
  10706. "style": "deepObject",
  10707. "explode": true
  10708. }
  10709. ],
  10710. "security": [],
  10711. "responses": {
  10712. "200": {
  10713. "description": "Success",
  10714. "content": {
  10715. "application/json": {
  10716. "schema": {
  10717. "type": "object",
  10718. "properties": {
  10719. "location": {
  10720. "$ref": "#/components/schemas/LocationInfo"
  10721. },
  10722. "data": {
  10723. "$ref": "#/components/schemas/ProviderV2Info"
  10724. }
  10725. },
  10726. "required": ["location", "data"],
  10727. "additionalProperties": false
  10728. }
  10729. }
  10730. }
  10731. },
  10732. "400": {
  10733. "description": "InvalidRequestError",
  10734. "content": {
  10735. "application/json": {
  10736. "schema": {
  10737. "$ref": "#/components/schemas/InvalidRequestError"
  10738. }
  10739. }
  10740. }
  10741. },
  10742. "401": {
  10743. "description": "UnauthorizedError",
  10744. "content": {
  10745. "application/json": {
  10746. "schema": {
  10747. "$ref": "#/components/schemas/UnauthorizedError"
  10748. }
  10749. }
  10750. }
  10751. },
  10752. "404": {
  10753. "description": "ProviderNotFoundError",
  10754. "content": {
  10755. "application/json": {
  10756. "schema": {
  10757. "$ref": "#/components/schemas/ProviderNotFoundError"
  10758. }
  10759. }
  10760. }
  10761. },
  10762. "503": {
  10763. "description": "ServiceUnavailableError",
  10764. "content": {
  10765. "application/json": {
  10766. "schema": {
  10767. "$ref": "#/components/schemas/ServiceUnavailableError"
  10768. }
  10769. }
  10770. }
  10771. }
  10772. },
  10773. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  10774. "summary": "Get v2 provider",
  10775. "x-codeSamples": [
  10776. {
  10777. "lang": "js",
  10778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10779. }
  10780. ]
  10781. }
  10782. },
  10783. "/api/permission/request": {
  10784. "get": {
  10785. "tags": ["v2 permissions"],
  10786. "operationId": "v2.permission.request.list",
  10787. "parameters": [
  10788. {
  10789. "name": "location",
  10790. "in": "query",
  10791. "schema": {
  10792. "type": "object",
  10793. "properties": {
  10794. "directory": {
  10795. "type": "string"
  10796. },
  10797. "workspace": {
  10798. "type": "string"
  10799. }
  10800. },
  10801. "additionalProperties": false
  10802. },
  10803. "required": false,
  10804. "style": "deepObject",
  10805. "explode": true
  10806. }
  10807. ],
  10808. "security": [],
  10809. "responses": {
  10810. "200": {
  10811. "description": "Success",
  10812. "content": {
  10813. "application/json": {
  10814. "schema": {
  10815. "type": "object",
  10816. "properties": {
  10817. "location": {
  10818. "$ref": "#/components/schemas/LocationInfo"
  10819. },
  10820. "data": {
  10821. "type": "array",
  10822. "items": {
  10823. "$ref": "#/components/schemas/PermissionV2Request"
  10824. }
  10825. }
  10826. },
  10827. "required": ["location", "data"],
  10828. "additionalProperties": false
  10829. }
  10830. }
  10831. }
  10832. },
  10833. "400": {
  10834. "description": "InvalidRequestError",
  10835. "content": {
  10836. "application/json": {
  10837. "schema": {
  10838. "$ref": "#/components/schemas/InvalidRequestError"
  10839. }
  10840. }
  10841. }
  10842. },
  10843. "401": {
  10844. "description": "UnauthorizedError",
  10845. "content": {
  10846. "application/json": {
  10847. "schema": {
  10848. "$ref": "#/components/schemas/UnauthorizedError"
  10849. }
  10850. }
  10851. }
  10852. }
  10853. },
  10854. "description": "Retrieve pending permission requests for a location.",
  10855. "summary": "List pending permission requests",
  10856. "x-codeSamples": [
  10857. {
  10858. "lang": "js",
  10859. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  10860. }
  10861. ]
  10862. }
  10863. },
  10864. "/api/session/{sessionID}/permission/request": {
  10865. "get": {
  10866. "tags": ["v2 session permissions"],
  10867. "operationId": "v2.session.permission.list",
  10868. "parameters": [
  10869. {
  10870. "name": "sessionID",
  10871. "in": "path",
  10872. "schema": {
  10873. "type": "string",
  10874. "pattern": "^ses"
  10875. },
  10876. "required": true
  10877. }
  10878. ],
  10879. "security": [],
  10880. "responses": {
  10881. "200": {
  10882. "description": "Success",
  10883. "content": {
  10884. "application/json": {
  10885. "schema": {
  10886. "type": "object",
  10887. "properties": {
  10888. "data": {
  10889. "type": "array",
  10890. "items": {
  10891. "$ref": "#/components/schemas/PermissionV2Request"
  10892. }
  10893. }
  10894. },
  10895. "required": ["data"],
  10896. "additionalProperties": false
  10897. }
  10898. }
  10899. }
  10900. },
  10901. "400": {
  10902. "description": "InvalidRequestError",
  10903. "content": {
  10904. "application/json": {
  10905. "schema": {
  10906. "$ref": "#/components/schemas/InvalidRequestError"
  10907. }
  10908. }
  10909. }
  10910. },
  10911. "401": {
  10912. "description": "UnauthorizedError",
  10913. "content": {
  10914. "application/json": {
  10915. "schema": {
  10916. "$ref": "#/components/schemas/UnauthorizedError"
  10917. }
  10918. }
  10919. }
  10920. },
  10921. "404": {
  10922. "description": "SessionNotFoundError",
  10923. "content": {
  10924. "application/json": {
  10925. "schema": {
  10926. "$ref": "#/components/schemas/SessionNotFoundError"
  10927. }
  10928. }
  10929. }
  10930. }
  10931. },
  10932. "description": "Retrieve pending permission requests owned by a session.",
  10933. "summary": "List session permission requests",
  10934. "x-codeSamples": [
  10935. {
  10936. "lang": "js",
  10937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  10938. }
  10939. ]
  10940. }
  10941. },
  10942. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  10943. "post": {
  10944. "tags": ["v2 session permissions"],
  10945. "operationId": "v2.session.permission.reply",
  10946. "parameters": [
  10947. {
  10948. "name": "sessionID",
  10949. "in": "path",
  10950. "schema": {
  10951. "type": "string",
  10952. "pattern": "^ses"
  10953. },
  10954. "required": true
  10955. },
  10956. {
  10957. "name": "requestID",
  10958. "in": "path",
  10959. "schema": {
  10960. "type": "string",
  10961. "pattern": "^per"
  10962. },
  10963. "required": true
  10964. }
  10965. ],
  10966. "security": [],
  10967. "responses": {
  10968. "204": {
  10969. "description": "<No Content>"
  10970. },
  10971. "400": {
  10972. "description": "InvalidRequestError",
  10973. "content": {
  10974. "application/json": {
  10975. "schema": {
  10976. "$ref": "#/components/schemas/InvalidRequestError"
  10977. }
  10978. }
  10979. }
  10980. },
  10981. "401": {
  10982. "description": "UnauthorizedError",
  10983. "content": {
  10984. "application/json": {
  10985. "schema": {
  10986. "$ref": "#/components/schemas/UnauthorizedError"
  10987. }
  10988. }
  10989. }
  10990. },
  10991. "404": {
  10992. "description": "SessionNotFoundError | PermissionNotFoundError",
  10993. "content": {
  10994. "application/json": {
  10995. "schema": {
  10996. "anyOf": [
  10997. {
  10998. "$ref": "#/components/schemas/SessionNotFoundError"
  10999. },
  11000. {
  11001. "$ref": "#/components/schemas/PermissionNotFoundError"
  11002. }
  11003. ]
  11004. }
  11005. }
  11006. }
  11007. }
  11008. },
  11009. "description": "Respond to a pending permission request owned by a session.",
  11010. "summary": "Reply to pending permission request",
  11011. "requestBody": {
  11012. "content": {
  11013. "application/json": {
  11014. "schema": {
  11015. "type": "object",
  11016. "properties": {
  11017. "reply": {
  11018. "$ref": "#/components/schemas/PermissionV2Reply"
  11019. },
  11020. "message": {
  11021. "type": "string"
  11022. }
  11023. },
  11024. "required": ["reply"],
  11025. "additionalProperties": false
  11026. }
  11027. }
  11028. },
  11029. "required": true
  11030. },
  11031. "x-codeSamples": [
  11032. {
  11033. "lang": "js",
  11034. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11035. }
  11036. ]
  11037. }
  11038. },
  11039. "/api/permission/saved": {
  11040. "get": {
  11041. "tags": ["v2 saved permissions"],
  11042. "operationId": "v2.permission.saved.list",
  11043. "parameters": [
  11044. {
  11045. "name": "projectID",
  11046. "in": "query",
  11047. "schema": {
  11048. "type": "string"
  11049. },
  11050. "required": false
  11051. }
  11052. ],
  11053. "security": [],
  11054. "responses": {
  11055. "200": {
  11056. "description": "Success",
  11057. "content": {
  11058. "application/json": {
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "data": {
  11063. "type": "array",
  11064. "items": {
  11065. "$ref": "#/components/schemas/PermissionSavedInfo"
  11066. }
  11067. }
  11068. },
  11069. "required": ["data"],
  11070. "additionalProperties": false
  11071. }
  11072. }
  11073. }
  11074. },
  11075. "400": {
  11076. "description": "InvalidRequestError",
  11077. "content": {
  11078. "application/json": {
  11079. "schema": {
  11080. "$ref": "#/components/schemas/InvalidRequestError"
  11081. }
  11082. }
  11083. }
  11084. },
  11085. "401": {
  11086. "description": "UnauthorizedError",
  11087. "content": {
  11088. "application/json": {
  11089. "schema": {
  11090. "$ref": "#/components/schemas/UnauthorizedError"
  11091. }
  11092. }
  11093. }
  11094. }
  11095. },
  11096. "description": "Retrieve saved permissions, optionally filtered by project.",
  11097. "summary": "List saved permissions",
  11098. "x-codeSamples": [
  11099. {
  11100. "lang": "js",
  11101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11102. }
  11103. ]
  11104. }
  11105. },
  11106. "/api/permission/saved/{id}": {
  11107. "delete": {
  11108. "tags": ["v2 saved permissions"],
  11109. "operationId": "v2.permission.saved.remove",
  11110. "parameters": [
  11111. {
  11112. "name": "id",
  11113. "in": "path",
  11114. "schema": {
  11115. "type": "string"
  11116. },
  11117. "required": true
  11118. }
  11119. ],
  11120. "security": [],
  11121. "responses": {
  11122. "204": {
  11123. "description": "<No Content>"
  11124. },
  11125. "400": {
  11126. "description": "InvalidRequestError",
  11127. "content": {
  11128. "application/json": {
  11129. "schema": {
  11130. "$ref": "#/components/schemas/InvalidRequestError"
  11131. }
  11132. }
  11133. }
  11134. },
  11135. "401": {
  11136. "description": "UnauthorizedError",
  11137. "content": {
  11138. "application/json": {
  11139. "schema": {
  11140. "$ref": "#/components/schemas/UnauthorizedError"
  11141. }
  11142. }
  11143. }
  11144. }
  11145. },
  11146. "description": "Remove a saved permission by ID.",
  11147. "summary": "Remove saved permission",
  11148. "x-codeSamples": [
  11149. {
  11150. "lang": "js",
  11151. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11152. }
  11153. ]
  11154. }
  11155. },
  11156. "/api/fs/read": {
  11157. "get": {
  11158. "tags": ["v2 filesystem"],
  11159. "operationId": "v2.fs.read",
  11160. "parameters": [
  11161. {
  11162. "name": "location",
  11163. "in": "query",
  11164. "schema": {
  11165. "type": "object",
  11166. "properties": {
  11167. "directory": {
  11168. "type": "string"
  11169. },
  11170. "workspace": {
  11171. "type": "string"
  11172. }
  11173. },
  11174. "additionalProperties": false
  11175. },
  11176. "required": false,
  11177. "style": "deepObject",
  11178. "explode": true
  11179. },
  11180. {
  11181. "name": "path",
  11182. "in": "query",
  11183. "schema": {
  11184. "type": "string"
  11185. },
  11186. "required": true
  11187. },
  11188. {
  11189. "name": "reference",
  11190. "in": "query",
  11191. "schema": {
  11192. "type": "string"
  11193. },
  11194. "required": false
  11195. }
  11196. ],
  11197. "security": [],
  11198. "responses": {
  11199. "200": {
  11200. "description": "Success",
  11201. "content": {
  11202. "application/json": {
  11203. "schema": {
  11204. "type": "object",
  11205. "properties": {
  11206. "location": {
  11207. "$ref": "#/components/schemas/LocationInfo"
  11208. },
  11209. "data": {
  11210. "anyOf": [
  11211. {
  11212. "$ref": "#/components/schemas/FileSystemTextContent"
  11213. },
  11214. {
  11215. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11216. }
  11217. ]
  11218. }
  11219. },
  11220. "required": ["location", "data"],
  11221. "additionalProperties": false
  11222. }
  11223. }
  11224. }
  11225. },
  11226. "400": {
  11227. "description": "InvalidRequestError",
  11228. "content": {
  11229. "application/json": {
  11230. "schema": {
  11231. "$ref": "#/components/schemas/InvalidRequestError"
  11232. }
  11233. }
  11234. }
  11235. },
  11236. "401": {
  11237. "description": "UnauthorizedError",
  11238. "content": {
  11239. "application/json": {
  11240. "schema": {
  11241. "$ref": "#/components/schemas/UnauthorizedError"
  11242. }
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "description": "Read one file relative to the requested location.",
  11248. "summary": "Read file",
  11249. "x-codeSamples": [
  11250. {
  11251. "lang": "js",
  11252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11253. }
  11254. ]
  11255. }
  11256. },
  11257. "/api/fs/list": {
  11258. "get": {
  11259. "tags": ["v2 filesystem"],
  11260. "operationId": "v2.fs.list",
  11261. "parameters": [
  11262. {
  11263. "name": "location",
  11264. "in": "query",
  11265. "schema": {
  11266. "type": "object",
  11267. "properties": {
  11268. "directory": {
  11269. "type": "string"
  11270. },
  11271. "workspace": {
  11272. "type": "string"
  11273. }
  11274. },
  11275. "additionalProperties": false
  11276. },
  11277. "required": false,
  11278. "style": "deepObject",
  11279. "explode": true
  11280. },
  11281. {
  11282. "name": "path",
  11283. "in": "query",
  11284. "schema": {
  11285. "type": "string"
  11286. },
  11287. "required": false
  11288. },
  11289. {
  11290. "name": "reference",
  11291. "in": "query",
  11292. "schema": {
  11293. "type": "string"
  11294. },
  11295. "required": false
  11296. }
  11297. ],
  11298. "security": [],
  11299. "responses": {
  11300. "200": {
  11301. "description": "Success",
  11302. "content": {
  11303. "application/json": {
  11304. "schema": {
  11305. "type": "object",
  11306. "properties": {
  11307. "location": {
  11308. "$ref": "#/components/schemas/LocationInfo"
  11309. },
  11310. "data": {
  11311. "type": "array",
  11312. "items": {
  11313. "$ref": "#/components/schemas/FileSystemEntry"
  11314. }
  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": "List direct children of one directory relative to the requested location.",
  11345. "summary": "List directory",
  11346. "x-codeSamples": [
  11347. {
  11348. "lang": "js",
  11349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11350. }
  11351. ]
  11352. }
  11353. },
  11354. "/api/command": {
  11355. "get": {
  11356. "tags": ["v2 commands"],
  11357. "operationId": "v2.command.list",
  11358. "parameters": [
  11359. {
  11360. "name": "location",
  11361. "in": "query",
  11362. "schema": {
  11363. "type": "object",
  11364. "properties": {
  11365. "directory": {
  11366. "type": "string"
  11367. },
  11368. "workspace": {
  11369. "type": "string"
  11370. }
  11371. },
  11372. "additionalProperties": false
  11373. },
  11374. "required": false,
  11375. "style": "deepObject",
  11376. "explode": true
  11377. }
  11378. ],
  11379. "security": [],
  11380. "responses": {
  11381. "200": {
  11382. "description": "Success",
  11383. "content": {
  11384. "application/json": {
  11385. "schema": {
  11386. "type": "object",
  11387. "properties": {
  11388. "location": {
  11389. "$ref": "#/components/schemas/LocationInfo"
  11390. },
  11391. "data": {
  11392. "type": "array",
  11393. "items": {
  11394. "$ref": "#/components/schemas/CommandV2Info"
  11395. }
  11396. }
  11397. },
  11398. "required": ["location", "data"],
  11399. "additionalProperties": false
  11400. }
  11401. }
  11402. }
  11403. },
  11404. "400": {
  11405. "description": "InvalidRequestError",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "$ref": "#/components/schemas/InvalidRequestError"
  11410. }
  11411. }
  11412. }
  11413. },
  11414. "401": {
  11415. "description": "UnauthorizedError",
  11416. "content": {
  11417. "application/json": {
  11418. "schema": {
  11419. "$ref": "#/components/schemas/UnauthorizedError"
  11420. }
  11421. }
  11422. }
  11423. }
  11424. },
  11425. "description": "Retrieve currently registered v2 commands.",
  11426. "summary": "List v2 commands",
  11427. "x-codeSamples": [
  11428. {
  11429. "lang": "js",
  11430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11431. }
  11432. ]
  11433. }
  11434. },
  11435. "/api/skill": {
  11436. "get": {
  11437. "tags": ["v2 skills"],
  11438. "operationId": "v2.skill.list",
  11439. "parameters": [
  11440. {
  11441. "name": "location",
  11442. "in": "query",
  11443. "schema": {
  11444. "type": "object",
  11445. "properties": {
  11446. "directory": {
  11447. "type": "string"
  11448. },
  11449. "workspace": {
  11450. "type": "string"
  11451. }
  11452. },
  11453. "additionalProperties": false
  11454. },
  11455. "required": false,
  11456. "style": "deepObject",
  11457. "explode": true
  11458. }
  11459. ],
  11460. "security": [],
  11461. "responses": {
  11462. "200": {
  11463. "description": "Success",
  11464. "content": {
  11465. "application/json": {
  11466. "schema": {
  11467. "type": "object",
  11468. "properties": {
  11469. "location": {
  11470. "$ref": "#/components/schemas/LocationInfo"
  11471. },
  11472. "data": {
  11473. "type": "array",
  11474. "items": {
  11475. "$ref": "#/components/schemas/SkillV2Info"
  11476. }
  11477. }
  11478. },
  11479. "required": ["location", "data"],
  11480. "additionalProperties": false
  11481. }
  11482. }
  11483. }
  11484. },
  11485. "400": {
  11486. "description": "InvalidRequestError",
  11487. "content": {
  11488. "application/json": {
  11489. "schema": {
  11490. "$ref": "#/components/schemas/InvalidRequestError"
  11491. }
  11492. }
  11493. }
  11494. },
  11495. "401": {
  11496. "description": "UnauthorizedError",
  11497. "content": {
  11498. "application/json": {
  11499. "schema": {
  11500. "$ref": "#/components/schemas/UnauthorizedError"
  11501. }
  11502. }
  11503. }
  11504. }
  11505. },
  11506. "description": "Retrieve currently registered v2 skills.",
  11507. "summary": "List v2 skills",
  11508. "x-codeSamples": [
  11509. {
  11510. "lang": "js",
  11511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11512. }
  11513. ]
  11514. }
  11515. },
  11516. "/api/event": {
  11517. "get": {
  11518. "tags": ["v2 events"],
  11519. "operationId": "v2.event.subscribe",
  11520. "parameters": [
  11521. {
  11522. "name": "location",
  11523. "in": "query",
  11524. "schema": {
  11525. "type": "object",
  11526. "properties": {
  11527. "directory": {
  11528. "type": "string"
  11529. },
  11530. "workspace": {
  11531. "type": "string"
  11532. }
  11533. },
  11534. "additionalProperties": false
  11535. },
  11536. "required": false,
  11537. "style": "deepObject",
  11538. "explode": true
  11539. }
  11540. ],
  11541. "security": [],
  11542. "responses": {
  11543. "200": {
  11544. "description": "Success",
  11545. "content": {
  11546. "text/event-stream": {
  11547. "schema": {
  11548. "type": "string"
  11549. }
  11550. }
  11551. }
  11552. },
  11553. "400": {
  11554. "description": "InvalidRequestError",
  11555. "content": {
  11556. "application/json": {
  11557. "schema": {
  11558. "$ref": "#/components/schemas/InvalidRequestError"
  11559. }
  11560. }
  11561. }
  11562. },
  11563. "401": {
  11564. "description": "UnauthorizedError",
  11565. "content": {
  11566. "application/json": {
  11567. "schema": {
  11568. "$ref": "#/components/schemas/UnauthorizedError"
  11569. }
  11570. }
  11571. }
  11572. }
  11573. },
  11574. "description": "Subscribe to native EventV2 payloads for a location.",
  11575. "summary": "Subscribe to v2 events",
  11576. "x-codeSamples": [
  11577. {
  11578. "lang": "js",
  11579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11580. }
  11581. ]
  11582. }
  11583. },
  11584. "/api/question/request": {
  11585. "get": {
  11586. "tags": ["v2 questions"],
  11587. "operationId": "v2.question.request.list",
  11588. "parameters": [
  11589. {
  11590. "name": "location",
  11591. "in": "query",
  11592. "schema": {
  11593. "type": "object",
  11594. "properties": {
  11595. "directory": {
  11596. "type": "string"
  11597. },
  11598. "workspace": {
  11599. "type": "string"
  11600. }
  11601. },
  11602. "additionalProperties": false
  11603. },
  11604. "required": false,
  11605. "style": "deepObject",
  11606. "explode": true
  11607. }
  11608. ],
  11609. "security": [],
  11610. "responses": {
  11611. "200": {
  11612. "description": "Success",
  11613. "content": {
  11614. "application/json": {
  11615. "schema": {
  11616. "type": "object",
  11617. "properties": {
  11618. "location": {
  11619. "$ref": "#/components/schemas/LocationInfo"
  11620. },
  11621. "data": {
  11622. "type": "array",
  11623. "items": {
  11624. "$ref": "#/components/schemas/QuestionV2Request"
  11625. }
  11626. }
  11627. },
  11628. "required": ["location", "data"],
  11629. "additionalProperties": false
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "400": {
  11635. "description": "InvalidRequestError",
  11636. "content": {
  11637. "application/json": {
  11638. "schema": {
  11639. "$ref": "#/components/schemas/InvalidRequestError"
  11640. }
  11641. }
  11642. }
  11643. },
  11644. "401": {
  11645. "description": "UnauthorizedError",
  11646. "content": {
  11647. "application/json": {
  11648. "schema": {
  11649. "$ref": "#/components/schemas/UnauthorizedError"
  11650. }
  11651. }
  11652. }
  11653. }
  11654. },
  11655. "description": "Retrieve pending question requests for a location.",
  11656. "summary": "List pending question requests",
  11657. "x-codeSamples": [
  11658. {
  11659. "lang": "js",
  11660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11661. }
  11662. ]
  11663. }
  11664. },
  11665. "/api/session/{sessionID}/question/request/{requestID}/reply": {
  11666. "post": {
  11667. "tags": ["v2 session questions"],
  11668. "operationId": "v2.session.question.reply",
  11669. "parameters": [
  11670. {
  11671. "name": "sessionID",
  11672. "in": "path",
  11673. "schema": {
  11674. "type": "string",
  11675. "pattern": "^ses"
  11676. },
  11677. "required": true
  11678. },
  11679. {
  11680. "name": "requestID",
  11681. "in": "path",
  11682. "schema": {
  11683. "type": "string",
  11684. "pattern": "^que"
  11685. },
  11686. "required": true
  11687. }
  11688. ],
  11689. "security": [],
  11690. "responses": {
  11691. "204": {
  11692. "description": "<No Content>"
  11693. },
  11694. "400": {
  11695. "description": "InvalidRequestError",
  11696. "content": {
  11697. "application/json": {
  11698. "schema": {
  11699. "$ref": "#/components/schemas/InvalidRequestError"
  11700. }
  11701. }
  11702. }
  11703. },
  11704. "401": {
  11705. "description": "UnauthorizedError",
  11706. "content": {
  11707. "application/json": {
  11708. "schema": {
  11709. "$ref": "#/components/schemas/UnauthorizedError"
  11710. }
  11711. }
  11712. }
  11713. },
  11714. "404": {
  11715. "description": "SessionNotFoundError | QuestionNotFoundError",
  11716. "content": {
  11717. "application/json": {
  11718. "schema": {
  11719. "anyOf": [
  11720. {
  11721. "$ref": "#/components/schemas/SessionNotFoundError"
  11722. },
  11723. {
  11724. "$ref": "#/components/schemas/QuestionNotFoundError"
  11725. }
  11726. ]
  11727. }
  11728. }
  11729. }
  11730. }
  11731. },
  11732. "description": "Answer a pending question request owned by a session.",
  11733. "summary": "Reply to pending question request",
  11734. "requestBody": {
  11735. "content": {
  11736. "application/json": {
  11737. "schema": {
  11738. "$ref": "#/components/schemas/QuestionV2Reply"
  11739. }
  11740. }
  11741. },
  11742. "required": true
  11743. },
  11744. "x-codeSamples": [
  11745. {
  11746. "lang": "js",
  11747. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11748. }
  11749. ]
  11750. }
  11751. },
  11752. "/api/session/{sessionID}/question/request/{requestID}/reject": {
  11753. "post": {
  11754. "tags": ["v2 session questions"],
  11755. "operationId": "v2.session.question.reject",
  11756. "parameters": [
  11757. {
  11758. "name": "sessionID",
  11759. "in": "path",
  11760. "schema": {
  11761. "type": "string",
  11762. "pattern": "^ses"
  11763. },
  11764. "required": true
  11765. },
  11766. {
  11767. "name": "requestID",
  11768. "in": "path",
  11769. "schema": {
  11770. "type": "string",
  11771. "pattern": "^que"
  11772. },
  11773. "required": true
  11774. }
  11775. ],
  11776. "security": [],
  11777. "responses": {
  11778. "204": {
  11779. "description": "<No Content>"
  11780. },
  11781. "400": {
  11782. "description": "InvalidRequestError",
  11783. "content": {
  11784. "application/json": {
  11785. "schema": {
  11786. "$ref": "#/components/schemas/InvalidRequestError"
  11787. }
  11788. }
  11789. }
  11790. },
  11791. "401": {
  11792. "description": "UnauthorizedError",
  11793. "content": {
  11794. "application/json": {
  11795. "schema": {
  11796. "$ref": "#/components/schemas/UnauthorizedError"
  11797. }
  11798. }
  11799. }
  11800. },
  11801. "404": {
  11802. "description": "SessionNotFoundError | QuestionNotFoundError",
  11803. "content": {
  11804. "application/json": {
  11805. "schema": {
  11806. "anyOf": [
  11807. {
  11808. "$ref": "#/components/schemas/SessionNotFoundError"
  11809. },
  11810. {
  11811. "$ref": "#/components/schemas/QuestionNotFoundError"
  11812. }
  11813. ]
  11814. }
  11815. }
  11816. }
  11817. }
  11818. },
  11819. "description": "Reject a pending question request owned by a session.",
  11820. "summary": "Reject pending question request",
  11821. "x-codeSamples": [
  11822. {
  11823. "lang": "js",
  11824. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11825. }
  11826. ]
  11827. }
  11828. },
  11829. "/pty/{ptyID}/connect": {
  11830. "get": {
  11831. "tags": ["pty"],
  11832. "operationId": "pty.connect",
  11833. "parameters": [
  11834. {
  11835. "name": "ptyID",
  11836. "in": "path",
  11837. "schema": {
  11838. "type": "string",
  11839. "pattern": "^pty"
  11840. },
  11841. "required": true
  11842. },
  11843. {
  11844. "in": "query",
  11845. "name": "directory",
  11846. "schema": {
  11847. "type": "string"
  11848. }
  11849. },
  11850. {
  11851. "in": "query",
  11852. "name": "workspace",
  11853. "schema": {
  11854. "type": "string"
  11855. }
  11856. },
  11857. {
  11858. "in": "query",
  11859. "name": "cursor",
  11860. "schema": {
  11861. "type": "string"
  11862. }
  11863. },
  11864. {
  11865. "in": "query",
  11866. "name": "ticket",
  11867. "schema": {
  11868. "type": "string"
  11869. }
  11870. }
  11871. ],
  11872. "responses": {
  11873. "200": {
  11874. "description": "Connected session",
  11875. "content": {
  11876. "application/json": {
  11877. "schema": {
  11878. "type": "boolean",
  11879. "description": "Connected session"
  11880. }
  11881. }
  11882. }
  11883. },
  11884. "403": {
  11885. "description": "Forbidden",
  11886. "content": {
  11887. "application/json": {
  11888. "schema": {
  11889. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  11890. }
  11891. }
  11892. }
  11893. },
  11894. "404": {
  11895. "description": "Not found",
  11896. "content": {
  11897. "application/json": {
  11898. "schema": {
  11899. "$ref": "#/components/schemas/NotFoundError"
  11900. }
  11901. }
  11902. }
  11903. }
  11904. },
  11905. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  11906. "summary": "Connect to PTY session",
  11907. "x-codeSamples": [
  11908. {
  11909. "lang": "js",
  11910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  11911. }
  11912. ]
  11913. }
  11914. }
  11915. },
  11916. "components": {
  11917. "schemas": {
  11918. "Event": {
  11919. "anyOf": [
  11920. {
  11921. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11922. },
  11923. {
  11924. "$ref": "#/components/schemas/EventPluginAdded"
  11925. },
  11926. {
  11927. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11928. },
  11929. {
  11930. "$ref": "#/components/schemas/EventSessionCreated"
  11931. },
  11932. {
  11933. "$ref": "#/components/schemas/EventSessionUpdated"
  11934. },
  11935. {
  11936. "$ref": "#/components/schemas/EventSessionDeleted"
  11937. },
  11938. {
  11939. "$ref": "#/components/schemas/EventMessageUpdated"
  11940. },
  11941. {
  11942. "$ref": "#/components/schemas/EventMessageRemoved"
  11943. },
  11944. {
  11945. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11946. },
  11947. {
  11948. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11949. },
  11950. {
  11951. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11952. },
  11953. {
  11954. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11955. },
  11956. {
  11957. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11958. },
  11959. {
  11960. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11961. },
  11962. {
  11963. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11964. },
  11965. {
  11966. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11967. },
  11968. {
  11969. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11970. },
  11971. {
  11972. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11973. },
  11974. {
  11975. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11976. },
  11977. {
  11978. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11979. },
  11980. {
  11981. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11982. },
  11983. {
  11984. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11985. },
  11986. {
  11987. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11988. },
  11989. {
  11990. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11991. },
  11992. {
  11993. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11994. },
  11995. {
  11996. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11997. },
  11998. {
  11999. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12000. },
  12001. {
  12002. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12003. },
  12004. {
  12005. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12006. },
  12007. {
  12008. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12009. },
  12010. {
  12011. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12012. },
  12013. {
  12014. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12015. },
  12016. {
  12017. "$ref": "#/components/schemas/EventSessionNextRetried"
  12018. },
  12019. {
  12020. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12021. },
  12022. {
  12023. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12024. },
  12025. {
  12026. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12027. },
  12028. {
  12029. "$ref": "#/components/schemas/EventMessagePartDelta"
  12030. },
  12031. {
  12032. "$ref": "#/components/schemas/EventSessionDiff"
  12033. },
  12034. {
  12035. "$ref": "#/components/schemas/EventSessionError"
  12036. },
  12037. {
  12038. "$ref": "#/components/schemas/EventInstallationUpdated"
  12039. },
  12040. {
  12041. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12042. },
  12043. {
  12044. "$ref": "#/components/schemas/EventFileEdited"
  12045. },
  12046. {
  12047. "$ref": "#/components/schemas/EventAccountAdded"
  12048. },
  12049. {
  12050. "$ref": "#/components/schemas/EventAccountRemoved"
  12051. },
  12052. {
  12053. "$ref": "#/components/schemas/EventAccountSwitched"
  12054. },
  12055. {
  12056. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12057. },
  12058. {
  12059. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12060. },
  12061. {
  12062. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12063. },
  12064. {
  12065. "$ref": "#/components/schemas/EventPtyCreated"
  12066. },
  12067. {
  12068. "$ref": "#/components/schemas/EventPtyUpdated"
  12069. },
  12070. {
  12071. "$ref": "#/components/schemas/EventPtyExited"
  12072. },
  12073. {
  12074. "$ref": "#/components/schemas/EventPtyDeleted"
  12075. },
  12076. {
  12077. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12078. },
  12079. {
  12080. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12081. },
  12082. {
  12083. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12084. },
  12085. {
  12086. "$ref": "#/components/schemas/EventTodoUpdated"
  12087. },
  12088. {
  12089. "$ref": "#/components/schemas/EventLspUpdated"
  12090. },
  12091. {
  12092. "$ref": "#/components/schemas/EventPermissionAsked"
  12093. },
  12094. {
  12095. "$ref": "#/components/schemas/EventPermissionReplied"
  12096. },
  12097. {
  12098. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12099. },
  12100. {
  12101. "$ref": "#/components/schemas/Event.tui.command.execute"
  12102. },
  12103. {
  12104. "$ref": "#/components/schemas/Event.tui.toast.show"
  12105. },
  12106. {
  12107. "$ref": "#/components/schemas/Event.tui.session.select"
  12108. },
  12109. {
  12110. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12111. },
  12112. {
  12113. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12114. },
  12115. {
  12116. "$ref": "#/components/schemas/EventCommandExecuted"
  12117. },
  12118. {
  12119. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12120. },
  12121. {
  12122. "$ref": "#/components/schemas/EventProjectUpdated"
  12123. },
  12124. {
  12125. "$ref": "#/components/schemas/EventQuestionAsked"
  12126. },
  12127. {
  12128. "$ref": "#/components/schemas/EventQuestionReplied"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/EventQuestionRejected"
  12132. },
  12133. {
  12134. "$ref": "#/components/schemas/EventSessionStatus"
  12135. },
  12136. {
  12137. "$ref": "#/components/schemas/EventSessionIdle"
  12138. },
  12139. {
  12140. "$ref": "#/components/schemas/EventSessionCompacted"
  12141. },
  12142. {
  12143. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12144. },
  12145. {
  12146. "$ref": "#/components/schemas/EventWorktreeReady"
  12147. },
  12148. {
  12149. "$ref": "#/components/schemas/EventWorktreeFailed"
  12150. },
  12151. {
  12152. "$ref": "#/components/schemas/EventWorkspaceReady"
  12153. },
  12154. {
  12155. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12156. },
  12157. {
  12158. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12159. },
  12160. {
  12161. "$ref": "#/components/schemas/EventServerConnected"
  12162. },
  12163. {
  12164. "$ref": "#/components/schemas/EventGlobalDisposed"
  12165. },
  12166. {
  12167. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12168. }
  12169. ]
  12170. },
  12171. "QuestionReplied": {
  12172. "type": "object",
  12173. "properties": {
  12174. "sessionID": {
  12175. "type": "string",
  12176. "pattern": "^ses"
  12177. },
  12178. "requestID": {
  12179. "type": "string",
  12180. "pattern": "^que"
  12181. },
  12182. "answers": {
  12183. "type": "array",
  12184. "items": {
  12185. "$ref": "#/components/schemas/QuestionAnswer"
  12186. }
  12187. }
  12188. },
  12189. "required": ["sessionID", "requestID", "answers"],
  12190. "additionalProperties": false
  12191. },
  12192. "QuestionRejected": {
  12193. "type": "object",
  12194. "properties": {
  12195. "sessionID": {
  12196. "type": "string",
  12197. "pattern": "^ses"
  12198. },
  12199. "requestID": {
  12200. "type": "string",
  12201. "pattern": "^que"
  12202. }
  12203. },
  12204. "required": ["sessionID", "requestID"],
  12205. "additionalProperties": false
  12206. },
  12207. "OAuth": {
  12208. "type": "object",
  12209. "properties": {
  12210. "type": {
  12211. "type": "string",
  12212. "enum": ["oauth"]
  12213. },
  12214. "refresh": {
  12215. "type": "string"
  12216. },
  12217. "access": {
  12218. "type": "string"
  12219. },
  12220. "expires": {
  12221. "type": "integer",
  12222. "minimum": 0
  12223. },
  12224. "accountId": {
  12225. "type": "string"
  12226. },
  12227. "enterpriseUrl": {
  12228. "type": "string"
  12229. }
  12230. },
  12231. "required": ["type", "refresh", "access", "expires"],
  12232. "additionalProperties": false
  12233. },
  12234. "ApiAuth": {
  12235. "type": "object",
  12236. "properties": {
  12237. "type": {
  12238. "type": "string",
  12239. "enum": ["api"]
  12240. },
  12241. "key": {
  12242. "type": "string"
  12243. },
  12244. "metadata": {
  12245. "type": "object",
  12246. "additionalProperties": {
  12247. "type": "string"
  12248. }
  12249. }
  12250. },
  12251. "required": ["type", "key"],
  12252. "additionalProperties": false
  12253. },
  12254. "WellKnownAuth": {
  12255. "type": "object",
  12256. "properties": {
  12257. "type": {
  12258. "type": "string",
  12259. "enum": ["wellknown"]
  12260. },
  12261. "key": {
  12262. "type": "string"
  12263. },
  12264. "token": {
  12265. "type": "string"
  12266. }
  12267. },
  12268. "required": ["type", "key", "token"],
  12269. "additionalProperties": false
  12270. },
  12271. "Auth": {
  12272. "anyOf": [
  12273. {
  12274. "$ref": "#/components/schemas/OAuth"
  12275. },
  12276. {
  12277. "$ref": "#/components/schemas/ApiAuth"
  12278. },
  12279. {
  12280. "$ref": "#/components/schemas/WellKnownAuth"
  12281. }
  12282. ]
  12283. },
  12284. "effect_HttpApiError_BadRequest": {
  12285. "type": "object",
  12286. "properties": {
  12287. "_tag": {
  12288. "type": "string",
  12289. "enum": ["BadRequest"]
  12290. }
  12291. },
  12292. "required": ["_tag"],
  12293. "additionalProperties": false
  12294. },
  12295. "InvalidRequestError": {
  12296. "type": "object",
  12297. "properties": {
  12298. "_tag": {
  12299. "type": "string",
  12300. "enum": ["InvalidRequestError"]
  12301. },
  12302. "message": {
  12303. "type": "string"
  12304. },
  12305. "kind": {
  12306. "type": "string"
  12307. },
  12308. "field": {
  12309. "type": "string"
  12310. }
  12311. },
  12312. "required": ["_tag", "message"],
  12313. "additionalProperties": false
  12314. },
  12315. "SnapshotFileDiff": {
  12316. "type": "object",
  12317. "properties": {
  12318. "file": {
  12319. "type": "string"
  12320. },
  12321. "patch": {
  12322. "type": "string"
  12323. },
  12324. "additions": {
  12325. "type": "number"
  12326. },
  12327. "deletions": {
  12328. "type": "number"
  12329. },
  12330. "status": {
  12331. "type": "string",
  12332. "enum": ["added", "deleted", "modified"]
  12333. }
  12334. },
  12335. "required": ["additions", "deletions"],
  12336. "additionalProperties": false
  12337. },
  12338. "PermissionAction": {
  12339. "type": "string",
  12340. "enum": ["allow", "deny", "ask"]
  12341. },
  12342. "PermissionRule": {
  12343. "type": "object",
  12344. "properties": {
  12345. "permission": {
  12346. "type": "string"
  12347. },
  12348. "pattern": {
  12349. "type": "string"
  12350. },
  12351. "action": {
  12352. "$ref": "#/components/schemas/PermissionAction"
  12353. }
  12354. },
  12355. "required": ["permission", "pattern", "action"],
  12356. "additionalProperties": false
  12357. },
  12358. "PermissionRuleset": {
  12359. "type": "array",
  12360. "items": {
  12361. "$ref": "#/components/schemas/PermissionRule"
  12362. }
  12363. },
  12364. "Session": {
  12365. "type": "object",
  12366. "properties": {
  12367. "id": {
  12368. "type": "string",
  12369. "pattern": "^ses"
  12370. },
  12371. "slug": {
  12372. "type": "string"
  12373. },
  12374. "projectID": {
  12375. "type": "string"
  12376. },
  12377. "workspaceID": {
  12378. "type": "string",
  12379. "pattern": "^wrk"
  12380. },
  12381. "directory": {
  12382. "type": "string"
  12383. },
  12384. "path": {
  12385. "type": "string"
  12386. },
  12387. "parentID": {
  12388. "type": "string",
  12389. "pattern": "^ses"
  12390. },
  12391. "summary": {
  12392. "type": "object",
  12393. "properties": {
  12394. "additions": {
  12395. "type": "number"
  12396. },
  12397. "deletions": {
  12398. "type": "number"
  12399. },
  12400. "files": {
  12401. "type": "number"
  12402. },
  12403. "diffs": {
  12404. "type": "array",
  12405. "items": {
  12406. "$ref": "#/components/schemas/SnapshotFileDiff"
  12407. }
  12408. }
  12409. },
  12410. "required": ["additions", "deletions", "files"],
  12411. "additionalProperties": false
  12412. },
  12413. "cost": {
  12414. "type": "number"
  12415. },
  12416. "tokens": {
  12417. "type": "object",
  12418. "properties": {
  12419. "input": {
  12420. "type": "number"
  12421. },
  12422. "output": {
  12423. "type": "number"
  12424. },
  12425. "reasoning": {
  12426. "type": "number"
  12427. },
  12428. "cache": {
  12429. "type": "object",
  12430. "properties": {
  12431. "read": {
  12432. "type": "number"
  12433. },
  12434. "write": {
  12435. "type": "number"
  12436. }
  12437. },
  12438. "required": ["read", "write"],
  12439. "additionalProperties": false
  12440. }
  12441. },
  12442. "required": ["input", "output", "reasoning", "cache"],
  12443. "additionalProperties": false
  12444. },
  12445. "share": {
  12446. "type": "object",
  12447. "properties": {
  12448. "url": {
  12449. "type": "string"
  12450. }
  12451. },
  12452. "required": ["url"],
  12453. "additionalProperties": false
  12454. },
  12455. "title": {
  12456. "type": "string"
  12457. },
  12458. "agent": {
  12459. "type": "string"
  12460. },
  12461. "model": {
  12462. "type": "object",
  12463. "properties": {
  12464. "id": {
  12465. "type": "string"
  12466. },
  12467. "providerID": {
  12468. "type": "string"
  12469. },
  12470. "variant": {
  12471. "type": "string"
  12472. }
  12473. },
  12474. "required": ["id", "providerID"],
  12475. "additionalProperties": false
  12476. },
  12477. "version": {
  12478. "type": "string"
  12479. },
  12480. "metadata": {
  12481. "type": "object"
  12482. },
  12483. "time": {
  12484. "type": "object",
  12485. "properties": {
  12486. "created": {
  12487. "type": "integer",
  12488. "minimum": 0
  12489. },
  12490. "updated": {
  12491. "type": "integer",
  12492. "minimum": 0
  12493. },
  12494. "compacting": {
  12495. "type": "integer",
  12496. "minimum": 0
  12497. },
  12498. "archived": {
  12499. "type": "number"
  12500. }
  12501. },
  12502. "required": ["created", "updated"],
  12503. "additionalProperties": false
  12504. },
  12505. "permission": {
  12506. "$ref": "#/components/schemas/PermissionRuleset"
  12507. },
  12508. "revert": {
  12509. "type": "object",
  12510. "properties": {
  12511. "messageID": {
  12512. "type": "string",
  12513. "pattern": "^msg"
  12514. },
  12515. "partID": {
  12516. "type": "string",
  12517. "pattern": "^prt"
  12518. },
  12519. "snapshot": {
  12520. "type": "string"
  12521. },
  12522. "diff": {
  12523. "type": "string"
  12524. }
  12525. },
  12526. "required": ["messageID"],
  12527. "additionalProperties": false
  12528. }
  12529. },
  12530. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12531. "additionalProperties": false
  12532. },
  12533. "OutputFormatText": {
  12534. "type": "object",
  12535. "properties": {
  12536. "type": {
  12537. "type": "string",
  12538. "enum": ["text"]
  12539. }
  12540. },
  12541. "required": ["type"],
  12542. "additionalProperties": false
  12543. },
  12544. "JSONSchema": {
  12545. "type": "object"
  12546. },
  12547. "OutputFormatJsonSchema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "type": {
  12551. "type": "string",
  12552. "enum": ["json_schema"]
  12553. },
  12554. "schema": {
  12555. "$ref": "#/components/schemas/JSONSchema"
  12556. },
  12557. "retryCount": {
  12558. "type": "integer",
  12559. "minimum": 0
  12560. }
  12561. },
  12562. "required": ["type", "schema"],
  12563. "additionalProperties": false
  12564. },
  12565. "OutputFormat": {
  12566. "anyOf": [
  12567. {
  12568. "$ref": "#/components/schemas/OutputFormatText"
  12569. },
  12570. {
  12571. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12572. }
  12573. ]
  12574. },
  12575. "UserMessage": {
  12576. "type": "object",
  12577. "properties": {
  12578. "id": {
  12579. "type": "string",
  12580. "pattern": "^msg"
  12581. },
  12582. "sessionID": {
  12583. "type": "string",
  12584. "pattern": "^ses"
  12585. },
  12586. "role": {
  12587. "type": "string",
  12588. "enum": ["user"]
  12589. },
  12590. "time": {
  12591. "type": "object",
  12592. "properties": {
  12593. "created": {
  12594. "type": "number",
  12595. "minimum": 0
  12596. }
  12597. },
  12598. "required": ["created"],
  12599. "additionalProperties": false
  12600. },
  12601. "format": {
  12602. "$ref": "#/components/schemas/OutputFormat"
  12603. },
  12604. "summary": {
  12605. "type": "object",
  12606. "properties": {
  12607. "title": {
  12608. "type": "string"
  12609. },
  12610. "body": {
  12611. "type": "string"
  12612. },
  12613. "diffs": {
  12614. "type": "array",
  12615. "items": {
  12616. "$ref": "#/components/schemas/SnapshotFileDiff"
  12617. }
  12618. }
  12619. },
  12620. "required": ["diffs"],
  12621. "additionalProperties": false
  12622. },
  12623. "agent": {
  12624. "type": "string"
  12625. },
  12626. "model": {
  12627. "type": "object",
  12628. "properties": {
  12629. "providerID": {
  12630. "type": "string"
  12631. },
  12632. "modelID": {
  12633. "type": "string"
  12634. },
  12635. "variant": {
  12636. "type": "string"
  12637. }
  12638. },
  12639. "required": ["providerID", "modelID"],
  12640. "additionalProperties": false
  12641. },
  12642. "system": {
  12643. "type": "string"
  12644. },
  12645. "tools": {
  12646. "type": "object",
  12647. "additionalProperties": {
  12648. "type": "boolean"
  12649. }
  12650. }
  12651. },
  12652. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12653. "additionalProperties": false
  12654. },
  12655. "ProviderAuthError": {
  12656. "type": "object",
  12657. "properties": {
  12658. "name": {
  12659. "type": "string",
  12660. "enum": ["ProviderAuthError"]
  12661. },
  12662. "data": {
  12663. "type": "object",
  12664. "properties": {
  12665. "providerID": {
  12666. "type": "string"
  12667. },
  12668. "message": {
  12669. "type": "string"
  12670. }
  12671. },
  12672. "required": ["providerID", "message"],
  12673. "additionalProperties": false
  12674. }
  12675. },
  12676. "required": ["name", "data"],
  12677. "additionalProperties": false
  12678. },
  12679. "UnknownError": {
  12680. "type": "object",
  12681. "properties": {
  12682. "name": {
  12683. "type": "string",
  12684. "enum": ["UnknownError"]
  12685. },
  12686. "data": {
  12687. "type": "object",
  12688. "properties": {
  12689. "message": {
  12690. "type": "string"
  12691. },
  12692. "ref": {
  12693. "type": "string"
  12694. }
  12695. },
  12696. "required": ["message"],
  12697. "additionalProperties": false
  12698. }
  12699. },
  12700. "required": ["name", "data"],
  12701. "additionalProperties": false
  12702. },
  12703. "MessageOutputLengthError": {
  12704. "type": "object",
  12705. "properties": {
  12706. "name": {
  12707. "type": "string",
  12708. "enum": ["MessageOutputLengthError"]
  12709. },
  12710. "data": {
  12711. "type": "object",
  12712. "properties": {}
  12713. }
  12714. },
  12715. "required": ["name", "data"],
  12716. "additionalProperties": false
  12717. },
  12718. "MessageAbortedError": {
  12719. "type": "object",
  12720. "properties": {
  12721. "name": {
  12722. "type": "string",
  12723. "enum": ["MessageAbortedError"]
  12724. },
  12725. "data": {
  12726. "type": "object",
  12727. "properties": {
  12728. "message": {
  12729. "type": "string"
  12730. }
  12731. },
  12732. "required": ["message"],
  12733. "additionalProperties": false
  12734. }
  12735. },
  12736. "required": ["name", "data"],
  12737. "additionalProperties": false
  12738. },
  12739. "StructuredOutputError": {
  12740. "type": "object",
  12741. "properties": {
  12742. "name": {
  12743. "type": "string",
  12744. "enum": ["StructuredOutputError"]
  12745. },
  12746. "data": {
  12747. "type": "object",
  12748. "properties": {
  12749. "message": {
  12750. "type": "string"
  12751. },
  12752. "retries": {
  12753. "type": "integer",
  12754. "minimum": 0
  12755. }
  12756. },
  12757. "required": ["message", "retries"],
  12758. "additionalProperties": false
  12759. }
  12760. },
  12761. "required": ["name", "data"],
  12762. "additionalProperties": false
  12763. },
  12764. "ContextOverflowError": {
  12765. "type": "object",
  12766. "properties": {
  12767. "name": {
  12768. "type": "string",
  12769. "enum": ["ContextOverflowError"]
  12770. },
  12771. "data": {
  12772. "type": "object",
  12773. "properties": {
  12774. "message": {
  12775. "type": "string"
  12776. },
  12777. "responseBody": {
  12778. "type": "string"
  12779. }
  12780. },
  12781. "required": ["message"],
  12782. "additionalProperties": false
  12783. }
  12784. },
  12785. "required": ["name", "data"],
  12786. "additionalProperties": false
  12787. },
  12788. "APIError": {
  12789. "type": "object",
  12790. "properties": {
  12791. "name": {
  12792. "type": "string",
  12793. "enum": ["APIError"]
  12794. },
  12795. "data": {
  12796. "type": "object",
  12797. "properties": {
  12798. "message": {
  12799. "type": "string"
  12800. },
  12801. "statusCode": {
  12802. "type": "integer",
  12803. "minimum": 0
  12804. },
  12805. "isRetryable": {
  12806. "type": "boolean"
  12807. },
  12808. "responseHeaders": {
  12809. "type": "object",
  12810. "additionalProperties": {
  12811. "type": "string"
  12812. }
  12813. },
  12814. "responseBody": {
  12815. "type": "string"
  12816. },
  12817. "metadata": {
  12818. "type": "object",
  12819. "additionalProperties": {
  12820. "type": "string"
  12821. }
  12822. }
  12823. },
  12824. "required": ["message", "isRetryable"],
  12825. "additionalProperties": false
  12826. }
  12827. },
  12828. "required": ["name", "data"],
  12829. "additionalProperties": false
  12830. },
  12831. "AssistantMessage": {
  12832. "type": "object",
  12833. "properties": {
  12834. "id": {
  12835. "type": "string",
  12836. "pattern": "^msg"
  12837. },
  12838. "sessionID": {
  12839. "type": "string",
  12840. "pattern": "^ses"
  12841. },
  12842. "role": {
  12843. "type": "string",
  12844. "enum": ["assistant"]
  12845. },
  12846. "time": {
  12847. "type": "object",
  12848. "properties": {
  12849. "created": {
  12850. "type": "integer",
  12851. "minimum": 0
  12852. },
  12853. "completed": {
  12854. "type": "integer",
  12855. "minimum": 0
  12856. }
  12857. },
  12858. "required": ["created"],
  12859. "additionalProperties": false
  12860. },
  12861. "error": {
  12862. "anyOf": [
  12863. {
  12864. "$ref": "#/components/schemas/ProviderAuthError"
  12865. },
  12866. {
  12867. "$ref": "#/components/schemas/UnknownError"
  12868. },
  12869. {
  12870. "$ref": "#/components/schemas/MessageOutputLengthError"
  12871. },
  12872. {
  12873. "$ref": "#/components/schemas/MessageAbortedError"
  12874. },
  12875. {
  12876. "$ref": "#/components/schemas/StructuredOutputError"
  12877. },
  12878. {
  12879. "$ref": "#/components/schemas/ContextOverflowError"
  12880. },
  12881. {
  12882. "$ref": "#/components/schemas/APIError"
  12883. }
  12884. ]
  12885. },
  12886. "parentID": {
  12887. "type": "string",
  12888. "pattern": "^msg"
  12889. },
  12890. "modelID": {
  12891. "type": "string"
  12892. },
  12893. "providerID": {
  12894. "type": "string"
  12895. },
  12896. "mode": {
  12897. "type": "string"
  12898. },
  12899. "agent": {
  12900. "type": "string"
  12901. },
  12902. "path": {
  12903. "type": "object",
  12904. "properties": {
  12905. "cwd": {
  12906. "type": "string"
  12907. },
  12908. "root": {
  12909. "type": "string"
  12910. }
  12911. },
  12912. "required": ["cwd", "root"],
  12913. "additionalProperties": false
  12914. },
  12915. "summary": {
  12916. "type": "boolean"
  12917. },
  12918. "cost": {
  12919. "type": "number"
  12920. },
  12921. "tokens": {
  12922. "type": "object",
  12923. "properties": {
  12924. "total": {
  12925. "type": "number"
  12926. },
  12927. "input": {
  12928. "type": "number"
  12929. },
  12930. "output": {
  12931. "type": "number"
  12932. },
  12933. "reasoning": {
  12934. "type": "number"
  12935. },
  12936. "cache": {
  12937. "type": "object",
  12938. "properties": {
  12939. "read": {
  12940. "type": "number"
  12941. },
  12942. "write": {
  12943. "type": "number"
  12944. }
  12945. },
  12946. "required": ["read", "write"],
  12947. "additionalProperties": false
  12948. }
  12949. },
  12950. "required": ["input", "output", "reasoning", "cache"],
  12951. "additionalProperties": false
  12952. },
  12953. "structured": {},
  12954. "variant": {
  12955. "type": "string"
  12956. },
  12957. "finish": {
  12958. "type": "string"
  12959. }
  12960. },
  12961. "required": [
  12962. "id",
  12963. "sessionID",
  12964. "role",
  12965. "time",
  12966. "parentID",
  12967. "modelID",
  12968. "providerID",
  12969. "mode",
  12970. "agent",
  12971. "path",
  12972. "cost",
  12973. "tokens"
  12974. ],
  12975. "additionalProperties": false
  12976. },
  12977. "Message": {
  12978. "anyOf": [
  12979. {
  12980. "$ref": "#/components/schemas/UserMessage"
  12981. },
  12982. {
  12983. "$ref": "#/components/schemas/AssistantMessage"
  12984. }
  12985. ]
  12986. },
  12987. "TextPart": {
  12988. "type": "object",
  12989. "properties": {
  12990. "id": {
  12991. "type": "string",
  12992. "pattern": "^prt"
  12993. },
  12994. "sessionID": {
  12995. "type": "string",
  12996. "pattern": "^ses"
  12997. },
  12998. "messageID": {
  12999. "type": "string",
  13000. "pattern": "^msg"
  13001. },
  13002. "type": {
  13003. "type": "string",
  13004. "enum": ["text"]
  13005. },
  13006. "text": {
  13007. "type": "string"
  13008. },
  13009. "synthetic": {
  13010. "type": "boolean"
  13011. },
  13012. "ignored": {
  13013. "type": "boolean"
  13014. },
  13015. "time": {
  13016. "type": "object",
  13017. "properties": {
  13018. "start": {
  13019. "type": "integer",
  13020. "minimum": 0
  13021. },
  13022. "end": {
  13023. "type": "integer",
  13024. "minimum": 0
  13025. }
  13026. },
  13027. "required": ["start"],
  13028. "additionalProperties": false
  13029. },
  13030. "metadata": {
  13031. "type": "object"
  13032. }
  13033. },
  13034. "required": ["id", "sessionID", "messageID", "type", "text"],
  13035. "additionalProperties": false
  13036. },
  13037. "SubtaskPart": {
  13038. "type": "object",
  13039. "properties": {
  13040. "id": {
  13041. "type": "string",
  13042. "pattern": "^prt"
  13043. },
  13044. "sessionID": {
  13045. "type": "string",
  13046. "pattern": "^ses"
  13047. },
  13048. "messageID": {
  13049. "type": "string",
  13050. "pattern": "^msg"
  13051. },
  13052. "type": {
  13053. "type": "string",
  13054. "enum": ["subtask"]
  13055. },
  13056. "prompt": {
  13057. "type": "string"
  13058. },
  13059. "description": {
  13060. "type": "string"
  13061. },
  13062. "agent": {
  13063. "type": "string"
  13064. },
  13065. "model": {
  13066. "type": "object",
  13067. "properties": {
  13068. "providerID": {
  13069. "type": "string"
  13070. },
  13071. "modelID": {
  13072. "type": "string"
  13073. }
  13074. },
  13075. "required": ["providerID", "modelID"],
  13076. "additionalProperties": false
  13077. },
  13078. "command": {
  13079. "type": "string"
  13080. }
  13081. },
  13082. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13083. "additionalProperties": false
  13084. },
  13085. "ReasoningPart": {
  13086. "type": "object",
  13087. "properties": {
  13088. "id": {
  13089. "type": "string",
  13090. "pattern": "^prt"
  13091. },
  13092. "sessionID": {
  13093. "type": "string",
  13094. "pattern": "^ses"
  13095. },
  13096. "messageID": {
  13097. "type": "string",
  13098. "pattern": "^msg"
  13099. },
  13100. "type": {
  13101. "type": "string",
  13102. "enum": ["reasoning"]
  13103. },
  13104. "text": {
  13105. "type": "string"
  13106. },
  13107. "metadata": {
  13108. "type": "object"
  13109. },
  13110. "time": {
  13111. "type": "object",
  13112. "properties": {
  13113. "start": {
  13114. "type": "integer",
  13115. "minimum": 0
  13116. },
  13117. "end": {
  13118. "type": "integer",
  13119. "minimum": 0
  13120. }
  13121. },
  13122. "required": ["start"],
  13123. "additionalProperties": false
  13124. }
  13125. },
  13126. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13127. "additionalProperties": false
  13128. },
  13129. "FilePartSourceText": {
  13130. "type": "object",
  13131. "properties": {
  13132. "value": {
  13133. "type": "string"
  13134. },
  13135. "start": {
  13136. "type": "number"
  13137. },
  13138. "end": {
  13139. "type": "number"
  13140. }
  13141. },
  13142. "required": ["value", "start", "end"],
  13143. "additionalProperties": false
  13144. },
  13145. "FileSource": {
  13146. "type": "object",
  13147. "properties": {
  13148. "text": {
  13149. "$ref": "#/components/schemas/FilePartSourceText"
  13150. },
  13151. "type": {
  13152. "type": "string",
  13153. "enum": ["file"]
  13154. },
  13155. "path": {
  13156. "type": "string"
  13157. }
  13158. },
  13159. "required": ["text", "type", "path"],
  13160. "additionalProperties": false
  13161. },
  13162. "Range": {
  13163. "type": "object",
  13164. "properties": {
  13165. "start": {
  13166. "type": "object",
  13167. "properties": {
  13168. "line": {
  13169. "type": "integer",
  13170. "minimum": 0
  13171. },
  13172. "character": {
  13173. "type": "integer",
  13174. "minimum": 0
  13175. }
  13176. },
  13177. "required": ["line", "character"],
  13178. "additionalProperties": false
  13179. },
  13180. "end": {
  13181. "type": "object",
  13182. "properties": {
  13183. "line": {
  13184. "type": "integer",
  13185. "minimum": 0
  13186. },
  13187. "character": {
  13188. "type": "integer",
  13189. "minimum": 0
  13190. }
  13191. },
  13192. "required": ["line", "character"],
  13193. "additionalProperties": false
  13194. }
  13195. },
  13196. "required": ["start", "end"],
  13197. "additionalProperties": false
  13198. },
  13199. "SymbolSource": {
  13200. "type": "object",
  13201. "properties": {
  13202. "text": {
  13203. "$ref": "#/components/schemas/FilePartSourceText"
  13204. },
  13205. "type": {
  13206. "type": "string",
  13207. "enum": ["symbol"]
  13208. },
  13209. "path": {
  13210. "type": "string"
  13211. },
  13212. "range": {
  13213. "$ref": "#/components/schemas/Range"
  13214. },
  13215. "name": {
  13216. "type": "string"
  13217. },
  13218. "kind": {
  13219. "type": "integer",
  13220. "minimum": 0
  13221. }
  13222. },
  13223. "required": ["text", "type", "path", "range", "name", "kind"],
  13224. "additionalProperties": false
  13225. },
  13226. "ResourceSource": {
  13227. "type": "object",
  13228. "properties": {
  13229. "text": {
  13230. "$ref": "#/components/schemas/FilePartSourceText"
  13231. },
  13232. "type": {
  13233. "type": "string",
  13234. "enum": ["resource"]
  13235. },
  13236. "clientName": {
  13237. "type": "string"
  13238. },
  13239. "uri": {
  13240. "type": "string"
  13241. }
  13242. },
  13243. "required": ["text", "type", "clientName", "uri"],
  13244. "additionalProperties": false
  13245. },
  13246. "FilePartSource": {
  13247. "anyOf": [
  13248. {
  13249. "$ref": "#/components/schemas/FileSource"
  13250. },
  13251. {
  13252. "$ref": "#/components/schemas/SymbolSource"
  13253. },
  13254. {
  13255. "$ref": "#/components/schemas/ResourceSource"
  13256. }
  13257. ]
  13258. },
  13259. "FilePart": {
  13260. "type": "object",
  13261. "properties": {
  13262. "id": {
  13263. "type": "string",
  13264. "pattern": "^prt"
  13265. },
  13266. "sessionID": {
  13267. "type": "string",
  13268. "pattern": "^ses"
  13269. },
  13270. "messageID": {
  13271. "type": "string",
  13272. "pattern": "^msg"
  13273. },
  13274. "type": {
  13275. "type": "string",
  13276. "enum": ["file"]
  13277. },
  13278. "mime": {
  13279. "type": "string"
  13280. },
  13281. "filename": {
  13282. "type": "string"
  13283. },
  13284. "url": {
  13285. "type": "string"
  13286. },
  13287. "source": {
  13288. "$ref": "#/components/schemas/FilePartSource"
  13289. }
  13290. },
  13291. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13292. "additionalProperties": false
  13293. },
  13294. "ToolStatePending": {
  13295. "type": "object",
  13296. "properties": {
  13297. "status": {
  13298. "type": "string",
  13299. "enum": ["pending"]
  13300. },
  13301. "input": {
  13302. "type": "object"
  13303. },
  13304. "raw": {
  13305. "type": "string"
  13306. }
  13307. },
  13308. "required": ["status", "input", "raw"],
  13309. "additionalProperties": false
  13310. },
  13311. "ToolStateRunning": {
  13312. "type": "object",
  13313. "properties": {
  13314. "status": {
  13315. "type": "string",
  13316. "enum": ["running"]
  13317. },
  13318. "input": {
  13319. "type": "object"
  13320. },
  13321. "title": {
  13322. "type": "string"
  13323. },
  13324. "metadata": {
  13325. "type": "object"
  13326. },
  13327. "time": {
  13328. "type": "object",
  13329. "properties": {
  13330. "start": {
  13331. "type": "integer",
  13332. "minimum": 0
  13333. }
  13334. },
  13335. "required": ["start"],
  13336. "additionalProperties": false
  13337. }
  13338. },
  13339. "required": ["status", "input", "time"],
  13340. "additionalProperties": false
  13341. },
  13342. "ToolStateCompleted": {
  13343. "type": "object",
  13344. "properties": {
  13345. "status": {
  13346. "type": "string",
  13347. "enum": ["completed"]
  13348. },
  13349. "input": {
  13350. "type": "object"
  13351. },
  13352. "output": {
  13353. "type": "string"
  13354. },
  13355. "title": {
  13356. "type": "string"
  13357. },
  13358. "metadata": {
  13359. "type": "object"
  13360. },
  13361. "time": {
  13362. "type": "object",
  13363. "properties": {
  13364. "start": {
  13365. "type": "integer",
  13366. "minimum": 0
  13367. },
  13368. "end": {
  13369. "type": "integer",
  13370. "minimum": 0
  13371. },
  13372. "compacted": {
  13373. "type": "integer",
  13374. "minimum": 0
  13375. }
  13376. },
  13377. "required": ["start", "end"],
  13378. "additionalProperties": false
  13379. },
  13380. "attachments": {
  13381. "type": "array",
  13382. "items": {
  13383. "$ref": "#/components/schemas/FilePart"
  13384. }
  13385. }
  13386. },
  13387. "required": ["status", "input", "output", "title", "metadata", "time"],
  13388. "additionalProperties": false
  13389. },
  13390. "ToolStateError": {
  13391. "type": "object",
  13392. "properties": {
  13393. "status": {
  13394. "type": "string",
  13395. "enum": ["error"]
  13396. },
  13397. "input": {
  13398. "type": "object"
  13399. },
  13400. "error": {
  13401. "type": "string"
  13402. },
  13403. "metadata": {
  13404. "type": "object"
  13405. },
  13406. "time": {
  13407. "type": "object",
  13408. "properties": {
  13409. "start": {
  13410. "type": "integer",
  13411. "minimum": 0
  13412. },
  13413. "end": {
  13414. "type": "integer",
  13415. "minimum": 0
  13416. }
  13417. },
  13418. "required": ["start", "end"],
  13419. "additionalProperties": false
  13420. }
  13421. },
  13422. "required": ["status", "input", "error", "time"],
  13423. "additionalProperties": false
  13424. },
  13425. "ToolState": {
  13426. "anyOf": [
  13427. {
  13428. "$ref": "#/components/schemas/ToolStatePending"
  13429. },
  13430. {
  13431. "$ref": "#/components/schemas/ToolStateRunning"
  13432. },
  13433. {
  13434. "$ref": "#/components/schemas/ToolStateCompleted"
  13435. },
  13436. {
  13437. "$ref": "#/components/schemas/ToolStateError"
  13438. }
  13439. ]
  13440. },
  13441. "ToolPart": {
  13442. "type": "object",
  13443. "properties": {
  13444. "id": {
  13445. "type": "string",
  13446. "pattern": "^prt"
  13447. },
  13448. "sessionID": {
  13449. "type": "string",
  13450. "pattern": "^ses"
  13451. },
  13452. "messageID": {
  13453. "type": "string",
  13454. "pattern": "^msg"
  13455. },
  13456. "type": {
  13457. "type": "string",
  13458. "enum": ["tool"]
  13459. },
  13460. "callID": {
  13461. "type": "string"
  13462. },
  13463. "tool": {
  13464. "type": "string"
  13465. },
  13466. "state": {
  13467. "$ref": "#/components/schemas/ToolState"
  13468. },
  13469. "metadata": {
  13470. "type": "object"
  13471. }
  13472. },
  13473. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13474. "additionalProperties": false
  13475. },
  13476. "StepStartPart": {
  13477. "type": "object",
  13478. "properties": {
  13479. "id": {
  13480. "type": "string",
  13481. "pattern": "^prt"
  13482. },
  13483. "sessionID": {
  13484. "type": "string",
  13485. "pattern": "^ses"
  13486. },
  13487. "messageID": {
  13488. "type": "string",
  13489. "pattern": "^msg"
  13490. },
  13491. "type": {
  13492. "type": "string",
  13493. "enum": ["step-start"]
  13494. },
  13495. "snapshot": {
  13496. "type": "string"
  13497. }
  13498. },
  13499. "required": ["id", "sessionID", "messageID", "type"],
  13500. "additionalProperties": false
  13501. },
  13502. "StepFinishPart": {
  13503. "type": "object",
  13504. "properties": {
  13505. "id": {
  13506. "type": "string",
  13507. "pattern": "^prt"
  13508. },
  13509. "sessionID": {
  13510. "type": "string",
  13511. "pattern": "^ses"
  13512. },
  13513. "messageID": {
  13514. "type": "string",
  13515. "pattern": "^msg"
  13516. },
  13517. "type": {
  13518. "type": "string",
  13519. "enum": ["step-finish"]
  13520. },
  13521. "reason": {
  13522. "type": "string"
  13523. },
  13524. "snapshot": {
  13525. "type": "string"
  13526. },
  13527. "cost": {
  13528. "type": "number"
  13529. },
  13530. "tokens": {
  13531. "type": "object",
  13532. "properties": {
  13533. "total": {
  13534. "type": "number"
  13535. },
  13536. "input": {
  13537. "type": "number"
  13538. },
  13539. "output": {
  13540. "type": "number"
  13541. },
  13542. "reasoning": {
  13543. "type": "number"
  13544. },
  13545. "cache": {
  13546. "type": "object",
  13547. "properties": {
  13548. "read": {
  13549. "type": "number"
  13550. },
  13551. "write": {
  13552. "type": "number"
  13553. }
  13554. },
  13555. "required": ["read", "write"],
  13556. "additionalProperties": false
  13557. }
  13558. },
  13559. "required": ["input", "output", "reasoning", "cache"],
  13560. "additionalProperties": false
  13561. }
  13562. },
  13563. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13564. "additionalProperties": false
  13565. },
  13566. "SnapshotPart": {
  13567. "type": "object",
  13568. "properties": {
  13569. "id": {
  13570. "type": "string",
  13571. "pattern": "^prt"
  13572. },
  13573. "sessionID": {
  13574. "type": "string",
  13575. "pattern": "^ses"
  13576. },
  13577. "messageID": {
  13578. "type": "string",
  13579. "pattern": "^msg"
  13580. },
  13581. "type": {
  13582. "type": "string",
  13583. "enum": ["snapshot"]
  13584. },
  13585. "snapshot": {
  13586. "type": "string"
  13587. }
  13588. },
  13589. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13590. "additionalProperties": false
  13591. },
  13592. "PatchPart": {
  13593. "type": "object",
  13594. "properties": {
  13595. "id": {
  13596. "type": "string",
  13597. "pattern": "^prt"
  13598. },
  13599. "sessionID": {
  13600. "type": "string",
  13601. "pattern": "^ses"
  13602. },
  13603. "messageID": {
  13604. "type": "string",
  13605. "pattern": "^msg"
  13606. },
  13607. "type": {
  13608. "type": "string",
  13609. "enum": ["patch"]
  13610. },
  13611. "hash": {
  13612. "type": "string"
  13613. },
  13614. "files": {
  13615. "type": "array",
  13616. "items": {
  13617. "type": "string"
  13618. }
  13619. }
  13620. },
  13621. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13622. "additionalProperties": false
  13623. },
  13624. "AgentPart": {
  13625. "type": "object",
  13626. "properties": {
  13627. "id": {
  13628. "type": "string",
  13629. "pattern": "^prt"
  13630. },
  13631. "sessionID": {
  13632. "type": "string",
  13633. "pattern": "^ses"
  13634. },
  13635. "messageID": {
  13636. "type": "string",
  13637. "pattern": "^msg"
  13638. },
  13639. "type": {
  13640. "type": "string",
  13641. "enum": ["agent"]
  13642. },
  13643. "name": {
  13644. "type": "string"
  13645. },
  13646. "source": {
  13647. "type": "object",
  13648. "properties": {
  13649. "value": {
  13650. "type": "string"
  13651. },
  13652. "start": {
  13653. "type": "integer",
  13654. "minimum": 0
  13655. },
  13656. "end": {
  13657. "type": "integer",
  13658. "minimum": 0
  13659. }
  13660. },
  13661. "required": ["value", "start", "end"],
  13662. "additionalProperties": false
  13663. }
  13664. },
  13665. "required": ["id", "sessionID", "messageID", "type", "name"],
  13666. "additionalProperties": false
  13667. },
  13668. "RetryPart": {
  13669. "type": "object",
  13670. "properties": {
  13671. "id": {
  13672. "type": "string",
  13673. "pattern": "^prt"
  13674. },
  13675. "sessionID": {
  13676. "type": "string",
  13677. "pattern": "^ses"
  13678. },
  13679. "messageID": {
  13680. "type": "string",
  13681. "pattern": "^msg"
  13682. },
  13683. "type": {
  13684. "type": "string",
  13685. "enum": ["retry"]
  13686. },
  13687. "attempt": {
  13688. "type": "integer",
  13689. "minimum": 0
  13690. },
  13691. "error": {
  13692. "$ref": "#/components/schemas/APIError"
  13693. },
  13694. "time": {
  13695. "type": "object",
  13696. "properties": {
  13697. "created": {
  13698. "type": "integer",
  13699. "minimum": 0
  13700. }
  13701. },
  13702. "required": ["created"],
  13703. "additionalProperties": false
  13704. }
  13705. },
  13706. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13707. "additionalProperties": false
  13708. },
  13709. "CompactionPart": {
  13710. "type": "object",
  13711. "properties": {
  13712. "id": {
  13713. "type": "string",
  13714. "pattern": "^prt"
  13715. },
  13716. "sessionID": {
  13717. "type": "string",
  13718. "pattern": "^ses"
  13719. },
  13720. "messageID": {
  13721. "type": "string",
  13722. "pattern": "^msg"
  13723. },
  13724. "type": {
  13725. "type": "string",
  13726. "enum": ["compaction"]
  13727. },
  13728. "auto": {
  13729. "type": "boolean"
  13730. },
  13731. "overflow": {
  13732. "type": "boolean"
  13733. },
  13734. "tail_start_id": {
  13735. "type": "string",
  13736. "pattern": "^msg"
  13737. }
  13738. },
  13739. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13740. "additionalProperties": false
  13741. },
  13742. "Part": {
  13743. "anyOf": [
  13744. {
  13745. "$ref": "#/components/schemas/TextPart"
  13746. },
  13747. {
  13748. "$ref": "#/components/schemas/SubtaskPart"
  13749. },
  13750. {
  13751. "$ref": "#/components/schemas/ReasoningPart"
  13752. },
  13753. {
  13754. "$ref": "#/components/schemas/FilePart"
  13755. },
  13756. {
  13757. "$ref": "#/components/schemas/ToolPart"
  13758. },
  13759. {
  13760. "$ref": "#/components/schemas/StepStartPart"
  13761. },
  13762. {
  13763. "$ref": "#/components/schemas/StepFinishPart"
  13764. },
  13765. {
  13766. "$ref": "#/components/schemas/SnapshotPart"
  13767. },
  13768. {
  13769. "$ref": "#/components/schemas/PatchPart"
  13770. },
  13771. {
  13772. "$ref": "#/components/schemas/AgentPart"
  13773. },
  13774. {
  13775. "$ref": "#/components/schemas/RetryPart"
  13776. },
  13777. {
  13778. "$ref": "#/components/schemas/CompactionPart"
  13779. }
  13780. ]
  13781. },
  13782. "Prompt": {
  13783. "type": "object",
  13784. "properties": {
  13785. "text": {
  13786. "type": "string"
  13787. },
  13788. "files": {
  13789. "type": "array",
  13790. "items": {
  13791. "$ref": "#/components/schemas/PromptFileAttachment"
  13792. }
  13793. },
  13794. "agents": {
  13795. "type": "array",
  13796. "items": {
  13797. "$ref": "#/components/schemas/PromptAgentAttachment"
  13798. }
  13799. },
  13800. "references": {
  13801. "type": "array",
  13802. "items": {
  13803. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13804. }
  13805. }
  13806. },
  13807. "required": ["text"],
  13808. "additionalProperties": false
  13809. },
  13810. "Pty": {
  13811. "type": "object",
  13812. "properties": {
  13813. "id": {
  13814. "type": "string",
  13815. "pattern": "^pty"
  13816. },
  13817. "title": {
  13818. "type": "string"
  13819. },
  13820. "command": {
  13821. "type": "string"
  13822. },
  13823. "args": {
  13824. "type": "array",
  13825. "items": {
  13826. "type": "string"
  13827. }
  13828. },
  13829. "cwd": {
  13830. "type": "string"
  13831. },
  13832. "status": {
  13833. "type": "string",
  13834. "enum": ["running", "exited"]
  13835. },
  13836. "pid": {
  13837. "type": "integer",
  13838. "minimum": 0
  13839. }
  13840. },
  13841. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  13842. "additionalProperties": false
  13843. },
  13844. "Todo": {
  13845. "type": "object",
  13846. "properties": {
  13847. "content": {
  13848. "type": "string",
  13849. "description": "Brief description of the task"
  13850. },
  13851. "status": {
  13852. "type": "string",
  13853. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  13854. },
  13855. "priority": {
  13856. "type": "string",
  13857. "description": "Priority level of the task: high, medium, low"
  13858. }
  13859. },
  13860. "required": ["content", "status", "priority"],
  13861. "additionalProperties": false
  13862. },
  13863. "QuestionOption": {
  13864. "type": "object",
  13865. "properties": {
  13866. "label": {
  13867. "type": "string",
  13868. "description": "Display text (1-5 words, concise)"
  13869. },
  13870. "description": {
  13871. "type": "string",
  13872. "description": "Explanation of choice"
  13873. }
  13874. },
  13875. "required": ["label", "description"],
  13876. "additionalProperties": false
  13877. },
  13878. "QuestionInfo": {
  13879. "type": "object",
  13880. "properties": {
  13881. "question": {
  13882. "type": "string",
  13883. "description": "Complete question"
  13884. },
  13885. "header": {
  13886. "type": "string",
  13887. "description": "Very short label (max 30 chars)"
  13888. },
  13889. "options": {
  13890. "type": "array",
  13891. "items": {
  13892. "$ref": "#/components/schemas/QuestionOption"
  13893. },
  13894. "description": "Available choices"
  13895. },
  13896. "multiple": {
  13897. "type": "boolean"
  13898. },
  13899. "custom": {
  13900. "type": "boolean"
  13901. }
  13902. },
  13903. "required": ["question", "header", "options"],
  13904. "additionalProperties": false
  13905. },
  13906. "QuestionTool": {
  13907. "type": "object",
  13908. "properties": {
  13909. "messageID": {
  13910. "type": "string",
  13911. "pattern": "^msg"
  13912. },
  13913. "callID": {
  13914. "type": "string"
  13915. }
  13916. },
  13917. "required": ["messageID", "callID"],
  13918. "additionalProperties": false
  13919. },
  13920. "QuestionAnswer": {
  13921. "type": "array",
  13922. "items": {
  13923. "type": "string"
  13924. }
  13925. },
  13926. "SessionStatus": {
  13927. "anyOf": [
  13928. {
  13929. "type": "object",
  13930. "properties": {
  13931. "type": {
  13932. "type": "string",
  13933. "enum": ["idle"]
  13934. }
  13935. },
  13936. "required": ["type"],
  13937. "additionalProperties": false
  13938. },
  13939. {
  13940. "type": "object",
  13941. "properties": {
  13942. "type": {
  13943. "type": "string",
  13944. "enum": ["retry"]
  13945. },
  13946. "attempt": {
  13947. "type": "integer",
  13948. "minimum": 0
  13949. },
  13950. "message": {
  13951. "type": "string"
  13952. },
  13953. "action": {
  13954. "type": "object",
  13955. "properties": {
  13956. "reason": {
  13957. "type": "string"
  13958. },
  13959. "provider": {
  13960. "type": "string"
  13961. },
  13962. "title": {
  13963. "type": "string"
  13964. },
  13965. "message": {
  13966. "type": "string"
  13967. },
  13968. "label": {
  13969. "type": "string"
  13970. },
  13971. "link": {
  13972. "type": "string"
  13973. }
  13974. },
  13975. "required": ["reason", "provider", "title", "message", "label"],
  13976. "additionalProperties": false
  13977. },
  13978. "next": {
  13979. "type": "integer",
  13980. "minimum": 0
  13981. }
  13982. },
  13983. "required": ["type", "attempt", "message", "next"],
  13984. "additionalProperties": false
  13985. },
  13986. {
  13987. "type": "object",
  13988. "properties": {
  13989. "type": {
  13990. "type": "string",
  13991. "enum": ["busy"]
  13992. }
  13993. },
  13994. "required": ["type"],
  13995. "additionalProperties": false
  13996. }
  13997. ]
  13998. },
  13999. "GlobalEvent": {
  14000. "type": "object",
  14001. "properties": {
  14002. "directory": {
  14003. "type": "string"
  14004. },
  14005. "project": {
  14006. "type": "string"
  14007. },
  14008. "workspace": {
  14009. "type": "string"
  14010. },
  14011. "payload": {
  14012. "anyOf": [
  14013. {
  14014. "type": "object",
  14015. "properties": {
  14016. "id": {
  14017. "type": "string"
  14018. },
  14019. "type": {
  14020. "type": "string",
  14021. "enum": ["models-dev.refreshed"]
  14022. },
  14023. "properties": {
  14024. "type": "object",
  14025. "properties": {}
  14026. }
  14027. },
  14028. "required": ["id", "type", "properties"],
  14029. "additionalProperties": false
  14030. },
  14031. {
  14032. "type": "object",
  14033. "properties": {
  14034. "id": {
  14035. "type": "string"
  14036. },
  14037. "type": {
  14038. "type": "string",
  14039. "enum": ["plugin.added"]
  14040. },
  14041. "properties": {
  14042. "type": "object",
  14043. "properties": {
  14044. "id": {
  14045. "type": "string"
  14046. }
  14047. },
  14048. "required": ["id"],
  14049. "additionalProperties": false
  14050. }
  14051. },
  14052. "required": ["id", "type", "properties"],
  14053. "additionalProperties": false
  14054. },
  14055. {
  14056. "type": "object",
  14057. "properties": {
  14058. "id": {
  14059. "type": "string"
  14060. },
  14061. "type": {
  14062. "type": "string",
  14063. "enum": ["catalog.model.updated"]
  14064. },
  14065. "properties": {
  14066. "type": "object",
  14067. "properties": {
  14068. "model": {
  14069. "$ref": "#/components/schemas/ModelV2Info"
  14070. }
  14071. },
  14072. "required": ["model"],
  14073. "additionalProperties": false
  14074. }
  14075. },
  14076. "required": ["id", "type", "properties"],
  14077. "additionalProperties": false
  14078. },
  14079. {
  14080. "type": "object",
  14081. "properties": {
  14082. "id": {
  14083. "type": "string"
  14084. },
  14085. "type": {
  14086. "type": "string",
  14087. "enum": ["session.created"]
  14088. },
  14089. "properties": {
  14090. "type": "object",
  14091. "properties": {
  14092. "sessionID": {
  14093. "type": "string",
  14094. "pattern": "^ses"
  14095. },
  14096. "info": {
  14097. "$ref": "#/components/schemas/Session"
  14098. }
  14099. },
  14100. "required": ["sessionID", "info"],
  14101. "additionalProperties": false
  14102. }
  14103. },
  14104. "required": ["id", "type", "properties"],
  14105. "additionalProperties": false
  14106. },
  14107. {
  14108. "type": "object",
  14109. "properties": {
  14110. "id": {
  14111. "type": "string"
  14112. },
  14113. "type": {
  14114. "type": "string",
  14115. "enum": ["session.updated"]
  14116. },
  14117. "properties": {
  14118. "type": "object",
  14119. "properties": {
  14120. "sessionID": {
  14121. "type": "string",
  14122. "pattern": "^ses"
  14123. },
  14124. "info": {
  14125. "$ref": "#/components/schemas/Session"
  14126. }
  14127. },
  14128. "required": ["sessionID", "info"],
  14129. "additionalProperties": false
  14130. }
  14131. },
  14132. "required": ["id", "type", "properties"],
  14133. "additionalProperties": false
  14134. },
  14135. {
  14136. "type": "object",
  14137. "properties": {
  14138. "id": {
  14139. "type": "string"
  14140. },
  14141. "type": {
  14142. "type": "string",
  14143. "enum": ["session.deleted"]
  14144. },
  14145. "properties": {
  14146. "type": "object",
  14147. "properties": {
  14148. "sessionID": {
  14149. "type": "string",
  14150. "pattern": "^ses"
  14151. },
  14152. "info": {
  14153. "$ref": "#/components/schemas/Session"
  14154. }
  14155. },
  14156. "required": ["sessionID", "info"],
  14157. "additionalProperties": false
  14158. }
  14159. },
  14160. "required": ["id", "type", "properties"],
  14161. "additionalProperties": false
  14162. },
  14163. {
  14164. "type": "object",
  14165. "properties": {
  14166. "id": {
  14167. "type": "string"
  14168. },
  14169. "type": {
  14170. "type": "string",
  14171. "enum": ["message.updated"]
  14172. },
  14173. "properties": {
  14174. "type": "object",
  14175. "properties": {
  14176. "sessionID": {
  14177. "type": "string",
  14178. "pattern": "^ses"
  14179. },
  14180. "info": {
  14181. "$ref": "#/components/schemas/Message"
  14182. }
  14183. },
  14184. "required": ["sessionID", "info"],
  14185. "additionalProperties": false
  14186. }
  14187. },
  14188. "required": ["id", "type", "properties"],
  14189. "additionalProperties": false
  14190. },
  14191. {
  14192. "type": "object",
  14193. "properties": {
  14194. "id": {
  14195. "type": "string"
  14196. },
  14197. "type": {
  14198. "type": "string",
  14199. "enum": ["message.removed"]
  14200. },
  14201. "properties": {
  14202. "type": "object",
  14203. "properties": {
  14204. "sessionID": {
  14205. "type": "string",
  14206. "pattern": "^ses"
  14207. },
  14208. "messageID": {
  14209. "type": "string",
  14210. "pattern": "^msg"
  14211. }
  14212. },
  14213. "required": ["sessionID", "messageID"],
  14214. "additionalProperties": false
  14215. }
  14216. },
  14217. "required": ["id", "type", "properties"],
  14218. "additionalProperties": false
  14219. },
  14220. {
  14221. "type": "object",
  14222. "properties": {
  14223. "id": {
  14224. "type": "string"
  14225. },
  14226. "type": {
  14227. "type": "string",
  14228. "enum": ["message.part.updated"]
  14229. },
  14230. "properties": {
  14231. "type": "object",
  14232. "properties": {
  14233. "sessionID": {
  14234. "type": "string",
  14235. "pattern": "^ses"
  14236. },
  14237. "part": {
  14238. "$ref": "#/components/schemas/Part"
  14239. },
  14240. "time": {
  14241. "type": "number"
  14242. }
  14243. },
  14244. "required": ["sessionID", "part", "time"],
  14245. "additionalProperties": false
  14246. }
  14247. },
  14248. "required": ["id", "type", "properties"],
  14249. "additionalProperties": false
  14250. },
  14251. {
  14252. "type": "object",
  14253. "properties": {
  14254. "id": {
  14255. "type": "string"
  14256. },
  14257. "type": {
  14258. "type": "string",
  14259. "enum": ["message.part.removed"]
  14260. },
  14261. "properties": {
  14262. "type": "object",
  14263. "properties": {
  14264. "sessionID": {
  14265. "type": "string",
  14266. "pattern": "^ses"
  14267. },
  14268. "messageID": {
  14269. "type": "string",
  14270. "pattern": "^msg"
  14271. },
  14272. "partID": {
  14273. "type": "string",
  14274. "pattern": "^prt"
  14275. }
  14276. },
  14277. "required": ["sessionID", "messageID", "partID"],
  14278. "additionalProperties": false
  14279. }
  14280. },
  14281. "required": ["id", "type", "properties"],
  14282. "additionalProperties": false
  14283. },
  14284. {
  14285. "type": "object",
  14286. "properties": {
  14287. "id": {
  14288. "type": "string"
  14289. },
  14290. "type": {
  14291. "type": "string",
  14292. "enum": ["session.next.agent.switched"]
  14293. },
  14294. "properties": {
  14295. "type": "object",
  14296. "properties": {
  14297. "timestamp": {
  14298. "type": "number"
  14299. },
  14300. "sessionID": {
  14301. "type": "string",
  14302. "pattern": "^ses"
  14303. },
  14304. "agent": {
  14305. "type": "string"
  14306. }
  14307. },
  14308. "required": ["timestamp", "sessionID", "agent"],
  14309. "additionalProperties": false
  14310. }
  14311. },
  14312. "required": ["id", "type", "properties"],
  14313. "additionalProperties": false
  14314. },
  14315. {
  14316. "type": "object",
  14317. "properties": {
  14318. "id": {
  14319. "type": "string"
  14320. },
  14321. "type": {
  14322. "type": "string",
  14323. "enum": ["session.next.model.switched"]
  14324. },
  14325. "properties": {
  14326. "type": "object",
  14327. "properties": {
  14328. "timestamp": {
  14329. "type": "number"
  14330. },
  14331. "sessionID": {
  14332. "type": "string",
  14333. "pattern": "^ses"
  14334. },
  14335. "model": {
  14336. "type": "object",
  14337. "properties": {
  14338. "id": {
  14339. "type": "string"
  14340. },
  14341. "providerID": {
  14342. "type": "string"
  14343. },
  14344. "variant": {
  14345. "type": "string"
  14346. }
  14347. },
  14348. "required": ["id", "providerID"],
  14349. "additionalProperties": false
  14350. }
  14351. },
  14352. "required": ["timestamp", "sessionID", "model"],
  14353. "additionalProperties": false
  14354. }
  14355. },
  14356. "required": ["id", "type", "properties"],
  14357. "additionalProperties": false
  14358. },
  14359. {
  14360. "type": "object",
  14361. "properties": {
  14362. "id": {
  14363. "type": "string"
  14364. },
  14365. "type": {
  14366. "type": "string",
  14367. "enum": ["session.next.prompted"]
  14368. },
  14369. "properties": {
  14370. "type": "object",
  14371. "properties": {
  14372. "timestamp": {
  14373. "type": "number"
  14374. },
  14375. "sessionID": {
  14376. "type": "string",
  14377. "pattern": "^ses"
  14378. },
  14379. "prompt": {
  14380. "$ref": "#/components/schemas/Prompt"
  14381. },
  14382. "delivery": {
  14383. "type": "string",
  14384. "enum": ["steer", "queue"]
  14385. }
  14386. },
  14387. "required": ["timestamp", "sessionID", "prompt", "delivery"],
  14388. "additionalProperties": false
  14389. }
  14390. },
  14391. "required": ["id", "type", "properties"],
  14392. "additionalProperties": false
  14393. },
  14394. {
  14395. "type": "object",
  14396. "properties": {
  14397. "id": {
  14398. "type": "string"
  14399. },
  14400. "type": {
  14401. "type": "string",
  14402. "enum": ["session.next.synthetic"]
  14403. },
  14404. "properties": {
  14405. "type": "object",
  14406. "properties": {
  14407. "timestamp": {
  14408. "type": "number"
  14409. },
  14410. "sessionID": {
  14411. "type": "string",
  14412. "pattern": "^ses"
  14413. },
  14414. "text": {
  14415. "type": "string"
  14416. }
  14417. },
  14418. "required": ["timestamp", "sessionID", "text"],
  14419. "additionalProperties": false
  14420. }
  14421. },
  14422. "required": ["id", "type", "properties"],
  14423. "additionalProperties": false
  14424. },
  14425. {
  14426. "type": "object",
  14427. "properties": {
  14428. "id": {
  14429. "type": "string"
  14430. },
  14431. "type": {
  14432. "type": "string",
  14433. "enum": ["session.next.shell.started"]
  14434. },
  14435. "properties": {
  14436. "type": "object",
  14437. "properties": {
  14438. "timestamp": {
  14439. "type": "number"
  14440. },
  14441. "sessionID": {
  14442. "type": "string",
  14443. "pattern": "^ses"
  14444. },
  14445. "callID": {
  14446. "type": "string"
  14447. },
  14448. "command": {
  14449. "type": "string"
  14450. }
  14451. },
  14452. "required": ["timestamp", "sessionID", "callID", "command"],
  14453. "additionalProperties": false
  14454. }
  14455. },
  14456. "required": ["id", "type", "properties"],
  14457. "additionalProperties": false
  14458. },
  14459. {
  14460. "type": "object",
  14461. "properties": {
  14462. "id": {
  14463. "type": "string"
  14464. },
  14465. "type": {
  14466. "type": "string",
  14467. "enum": ["session.next.shell.ended"]
  14468. },
  14469. "properties": {
  14470. "type": "object",
  14471. "properties": {
  14472. "timestamp": {
  14473. "type": "number"
  14474. },
  14475. "sessionID": {
  14476. "type": "string",
  14477. "pattern": "^ses"
  14478. },
  14479. "callID": {
  14480. "type": "string"
  14481. },
  14482. "output": {
  14483. "type": "string"
  14484. }
  14485. },
  14486. "required": ["timestamp", "sessionID", "callID", "output"],
  14487. "additionalProperties": false
  14488. }
  14489. },
  14490. "required": ["id", "type", "properties"],
  14491. "additionalProperties": false
  14492. },
  14493. {
  14494. "type": "object",
  14495. "properties": {
  14496. "id": {
  14497. "type": "string"
  14498. },
  14499. "type": {
  14500. "type": "string",
  14501. "enum": ["session.next.step.started"]
  14502. },
  14503. "properties": {
  14504. "type": "object",
  14505. "properties": {
  14506. "timestamp": {
  14507. "type": "number"
  14508. },
  14509. "sessionID": {
  14510. "type": "string",
  14511. "pattern": "^ses"
  14512. },
  14513. "agent": {
  14514. "type": "string"
  14515. },
  14516. "model": {
  14517. "type": "object",
  14518. "properties": {
  14519. "id": {
  14520. "type": "string"
  14521. },
  14522. "providerID": {
  14523. "type": "string"
  14524. },
  14525. "variant": {
  14526. "type": "string"
  14527. }
  14528. },
  14529. "required": ["id", "providerID"],
  14530. "additionalProperties": false
  14531. },
  14532. "snapshot": {
  14533. "type": "string"
  14534. }
  14535. },
  14536. "required": ["timestamp", "sessionID", "agent", "model"],
  14537. "additionalProperties": false
  14538. }
  14539. },
  14540. "required": ["id", "type", "properties"],
  14541. "additionalProperties": false
  14542. },
  14543. {
  14544. "type": "object",
  14545. "properties": {
  14546. "id": {
  14547. "type": "string"
  14548. },
  14549. "type": {
  14550. "type": "string",
  14551. "enum": ["session.next.step.ended"]
  14552. },
  14553. "properties": {
  14554. "type": "object",
  14555. "properties": {
  14556. "timestamp": {
  14557. "type": "number"
  14558. },
  14559. "sessionID": {
  14560. "type": "string",
  14561. "pattern": "^ses"
  14562. },
  14563. "assistantMessageID": {
  14564. "type": "string"
  14565. },
  14566. "finish": {
  14567. "type": "string"
  14568. },
  14569. "cost": {
  14570. "type": "number"
  14571. },
  14572. "tokens": {
  14573. "type": "object",
  14574. "properties": {
  14575. "input": {
  14576. "type": "number"
  14577. },
  14578. "output": {
  14579. "type": "number"
  14580. },
  14581. "reasoning": {
  14582. "type": "number"
  14583. },
  14584. "cache": {
  14585. "type": "object",
  14586. "properties": {
  14587. "read": {
  14588. "type": "number"
  14589. },
  14590. "write": {
  14591. "type": "number"
  14592. }
  14593. },
  14594. "required": ["read", "write"],
  14595. "additionalProperties": false
  14596. }
  14597. },
  14598. "required": ["input", "output", "reasoning", "cache"],
  14599. "additionalProperties": false
  14600. },
  14601. "snapshot": {
  14602. "type": "string"
  14603. }
  14604. },
  14605. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14606. "additionalProperties": false
  14607. }
  14608. },
  14609. "required": ["id", "type", "properties"],
  14610. "additionalProperties": false
  14611. },
  14612. {
  14613. "type": "object",
  14614. "properties": {
  14615. "id": {
  14616. "type": "string"
  14617. },
  14618. "type": {
  14619. "type": "string",
  14620. "enum": ["session.next.step.failed"]
  14621. },
  14622. "properties": {
  14623. "type": "object",
  14624. "properties": {
  14625. "timestamp": {
  14626. "type": "number"
  14627. },
  14628. "sessionID": {
  14629. "type": "string",
  14630. "pattern": "^ses"
  14631. },
  14632. "assistantMessageID": {
  14633. "type": "string"
  14634. },
  14635. "error": {
  14636. "$ref": "#/components/schemas/SessionErrorUnknown"
  14637. }
  14638. },
  14639. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  14640. "additionalProperties": false
  14641. }
  14642. },
  14643. "required": ["id", "type", "properties"],
  14644. "additionalProperties": false
  14645. },
  14646. {
  14647. "type": "object",
  14648. "properties": {
  14649. "id": {
  14650. "type": "string"
  14651. },
  14652. "type": {
  14653. "type": "string",
  14654. "enum": ["session.next.text.started"]
  14655. },
  14656. "properties": {
  14657. "type": "object",
  14658. "properties": {
  14659. "timestamp": {
  14660. "type": "number"
  14661. },
  14662. "sessionID": {
  14663. "type": "string",
  14664. "pattern": "^ses"
  14665. },
  14666. "textID": {
  14667. "type": "string"
  14668. }
  14669. },
  14670. "required": ["timestamp", "sessionID", "textID"],
  14671. "additionalProperties": false
  14672. }
  14673. },
  14674. "required": ["id", "type", "properties"],
  14675. "additionalProperties": false
  14676. },
  14677. {
  14678. "type": "object",
  14679. "properties": {
  14680. "id": {
  14681. "type": "string"
  14682. },
  14683. "type": {
  14684. "type": "string",
  14685. "enum": ["session.next.text.delta"]
  14686. },
  14687. "properties": {
  14688. "type": "object",
  14689. "properties": {
  14690. "timestamp": {
  14691. "type": "number"
  14692. },
  14693. "sessionID": {
  14694. "type": "string",
  14695. "pattern": "^ses"
  14696. },
  14697. "textID": {
  14698. "type": "string"
  14699. },
  14700. "delta": {
  14701. "type": "string"
  14702. }
  14703. },
  14704. "required": ["timestamp", "sessionID", "textID", "delta"],
  14705. "additionalProperties": false
  14706. }
  14707. },
  14708. "required": ["id", "type", "properties"],
  14709. "additionalProperties": false
  14710. },
  14711. {
  14712. "type": "object",
  14713. "properties": {
  14714. "id": {
  14715. "type": "string"
  14716. },
  14717. "type": {
  14718. "type": "string",
  14719. "enum": ["session.next.text.ended"]
  14720. },
  14721. "properties": {
  14722. "type": "object",
  14723. "properties": {
  14724. "timestamp": {
  14725. "type": "number"
  14726. },
  14727. "sessionID": {
  14728. "type": "string",
  14729. "pattern": "^ses"
  14730. },
  14731. "textID": {
  14732. "type": "string"
  14733. },
  14734. "text": {
  14735. "type": "string"
  14736. }
  14737. },
  14738. "required": ["timestamp", "sessionID", "textID", "text"],
  14739. "additionalProperties": false
  14740. }
  14741. },
  14742. "required": ["id", "type", "properties"],
  14743. "additionalProperties": false
  14744. },
  14745. {
  14746. "type": "object",
  14747. "properties": {
  14748. "id": {
  14749. "type": "string"
  14750. },
  14751. "type": {
  14752. "type": "string",
  14753. "enum": ["session.next.reasoning.started"]
  14754. },
  14755. "properties": {
  14756. "type": "object",
  14757. "properties": {
  14758. "timestamp": {
  14759. "type": "number"
  14760. },
  14761. "sessionID": {
  14762. "type": "string",
  14763. "pattern": "^ses"
  14764. },
  14765. "reasoningID": {
  14766. "type": "string"
  14767. },
  14768. "providerMetadata": {
  14769. "type": "object",
  14770. "additionalProperties": {
  14771. "type": "object"
  14772. }
  14773. }
  14774. },
  14775. "required": ["timestamp", "sessionID", "reasoningID"],
  14776. "additionalProperties": false
  14777. }
  14778. },
  14779. "required": ["id", "type", "properties"],
  14780. "additionalProperties": false
  14781. },
  14782. {
  14783. "type": "object",
  14784. "properties": {
  14785. "id": {
  14786. "type": "string"
  14787. },
  14788. "type": {
  14789. "type": "string",
  14790. "enum": ["session.next.reasoning.delta"]
  14791. },
  14792. "properties": {
  14793. "type": "object",
  14794. "properties": {
  14795. "timestamp": {
  14796. "type": "number"
  14797. },
  14798. "sessionID": {
  14799. "type": "string",
  14800. "pattern": "^ses"
  14801. },
  14802. "reasoningID": {
  14803. "type": "string"
  14804. },
  14805. "delta": {
  14806. "type": "string"
  14807. }
  14808. },
  14809. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  14810. "additionalProperties": false
  14811. }
  14812. },
  14813. "required": ["id", "type", "properties"],
  14814. "additionalProperties": false
  14815. },
  14816. {
  14817. "type": "object",
  14818. "properties": {
  14819. "id": {
  14820. "type": "string"
  14821. },
  14822. "type": {
  14823. "type": "string",
  14824. "enum": ["session.next.reasoning.ended"]
  14825. },
  14826. "properties": {
  14827. "type": "object",
  14828. "properties": {
  14829. "timestamp": {
  14830. "type": "number"
  14831. },
  14832. "sessionID": {
  14833. "type": "string",
  14834. "pattern": "^ses"
  14835. },
  14836. "reasoningID": {
  14837. "type": "string"
  14838. },
  14839. "text": {
  14840. "type": "string"
  14841. },
  14842. "providerMetadata": {
  14843. "type": "object",
  14844. "additionalProperties": {
  14845. "type": "object"
  14846. }
  14847. }
  14848. },
  14849. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  14850. "additionalProperties": false
  14851. }
  14852. },
  14853. "required": ["id", "type", "properties"],
  14854. "additionalProperties": false
  14855. },
  14856. {
  14857. "type": "object",
  14858. "properties": {
  14859. "id": {
  14860. "type": "string"
  14861. },
  14862. "type": {
  14863. "type": "string",
  14864. "enum": ["session.next.tool.input.started"]
  14865. },
  14866. "properties": {
  14867. "type": "object",
  14868. "properties": {
  14869. "timestamp": {
  14870. "type": "number"
  14871. },
  14872. "sessionID": {
  14873. "type": "string",
  14874. "pattern": "^ses"
  14875. },
  14876. "assistantMessageID": {
  14877. "type": "string"
  14878. },
  14879. "callID": {
  14880. "type": "string"
  14881. },
  14882. "name": {
  14883. "type": "string"
  14884. }
  14885. },
  14886. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  14887. "additionalProperties": false
  14888. }
  14889. },
  14890. "required": ["id", "type", "properties"],
  14891. "additionalProperties": false
  14892. },
  14893. {
  14894. "type": "object",
  14895. "properties": {
  14896. "id": {
  14897. "type": "string"
  14898. },
  14899. "type": {
  14900. "type": "string",
  14901. "enum": ["session.next.tool.input.delta"]
  14902. },
  14903. "properties": {
  14904. "type": "object",
  14905. "properties": {
  14906. "timestamp": {
  14907. "type": "number"
  14908. },
  14909. "sessionID": {
  14910. "type": "string",
  14911. "pattern": "^ses"
  14912. },
  14913. "assistantMessageID": {
  14914. "type": "string"
  14915. },
  14916. "callID": {
  14917. "type": "string"
  14918. },
  14919. "delta": {
  14920. "type": "string"
  14921. }
  14922. },
  14923. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  14924. "additionalProperties": false
  14925. }
  14926. },
  14927. "required": ["id", "type", "properties"],
  14928. "additionalProperties": false
  14929. },
  14930. {
  14931. "type": "object",
  14932. "properties": {
  14933. "id": {
  14934. "type": "string"
  14935. },
  14936. "type": {
  14937. "type": "string",
  14938. "enum": ["session.next.tool.input.ended"]
  14939. },
  14940. "properties": {
  14941. "type": "object",
  14942. "properties": {
  14943. "timestamp": {
  14944. "type": "number"
  14945. },
  14946. "sessionID": {
  14947. "type": "string",
  14948. "pattern": "^ses"
  14949. },
  14950. "assistantMessageID": {
  14951. "type": "string"
  14952. },
  14953. "callID": {
  14954. "type": "string"
  14955. },
  14956. "text": {
  14957. "type": "string"
  14958. }
  14959. },
  14960. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  14961. "additionalProperties": false
  14962. }
  14963. },
  14964. "required": ["id", "type", "properties"],
  14965. "additionalProperties": false
  14966. },
  14967. {
  14968. "type": "object",
  14969. "properties": {
  14970. "id": {
  14971. "type": "string"
  14972. },
  14973. "type": {
  14974. "type": "string",
  14975. "enum": ["session.next.tool.called"]
  14976. },
  14977. "properties": {
  14978. "type": "object",
  14979. "properties": {
  14980. "timestamp": {
  14981. "type": "number"
  14982. },
  14983. "sessionID": {
  14984. "type": "string",
  14985. "pattern": "^ses"
  14986. },
  14987. "assistantMessageID": {
  14988. "type": "string"
  14989. },
  14990. "callID": {
  14991. "type": "string"
  14992. },
  14993. "tool": {
  14994. "type": "string"
  14995. },
  14996. "input": {
  14997. "type": "object"
  14998. },
  14999. "provider": {
  15000. "type": "object",
  15001. "properties": {
  15002. "executed": {
  15003. "type": "boolean"
  15004. },
  15005. "metadata": {
  15006. "type": "object",
  15007. "additionalProperties": {
  15008. "type": "object"
  15009. }
  15010. }
  15011. },
  15012. "required": ["executed"],
  15013. "additionalProperties": false
  15014. }
  15015. },
  15016. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15017. "additionalProperties": false
  15018. }
  15019. },
  15020. "required": ["id", "type", "properties"],
  15021. "additionalProperties": false
  15022. },
  15023. {
  15024. "type": "object",
  15025. "properties": {
  15026. "id": {
  15027. "type": "string"
  15028. },
  15029. "type": {
  15030. "type": "string",
  15031. "enum": ["session.next.tool.progress"]
  15032. },
  15033. "properties": {
  15034. "type": "object",
  15035. "properties": {
  15036. "timestamp": {
  15037. "type": "number"
  15038. },
  15039. "sessionID": {
  15040. "type": "string",
  15041. "pattern": "^ses"
  15042. },
  15043. "assistantMessageID": {
  15044. "type": "string"
  15045. },
  15046. "callID": {
  15047. "type": "string"
  15048. },
  15049. "structured": {
  15050. "type": "object"
  15051. },
  15052. "content": {
  15053. "type": "array",
  15054. "items": {
  15055. "anyOf": [
  15056. {
  15057. "$ref": "#/components/schemas/ToolTextContent"
  15058. },
  15059. {
  15060. "$ref": "#/components/schemas/ToolFileContent"
  15061. }
  15062. ]
  15063. }
  15064. }
  15065. },
  15066. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15067. "additionalProperties": false
  15068. }
  15069. },
  15070. "required": ["id", "type", "properties"],
  15071. "additionalProperties": false
  15072. },
  15073. {
  15074. "type": "object",
  15075. "properties": {
  15076. "id": {
  15077. "type": "string"
  15078. },
  15079. "type": {
  15080. "type": "string",
  15081. "enum": ["session.next.tool.success"]
  15082. },
  15083. "properties": {
  15084. "type": "object",
  15085. "properties": {
  15086. "timestamp": {
  15087. "type": "number"
  15088. },
  15089. "sessionID": {
  15090. "type": "string",
  15091. "pattern": "^ses"
  15092. },
  15093. "assistantMessageID": {
  15094. "type": "string"
  15095. },
  15096. "callID": {
  15097. "type": "string"
  15098. },
  15099. "structured": {
  15100. "type": "object"
  15101. },
  15102. "content": {
  15103. "type": "array",
  15104. "items": {
  15105. "anyOf": [
  15106. {
  15107. "$ref": "#/components/schemas/ToolTextContent"
  15108. },
  15109. {
  15110. "$ref": "#/components/schemas/ToolFileContent"
  15111. }
  15112. ]
  15113. }
  15114. },
  15115. "result": {},
  15116. "provider": {
  15117. "type": "object",
  15118. "properties": {
  15119. "executed": {
  15120. "type": "boolean"
  15121. },
  15122. "metadata": {
  15123. "type": "object",
  15124. "additionalProperties": {
  15125. "type": "object"
  15126. }
  15127. }
  15128. },
  15129. "required": ["executed"],
  15130. "additionalProperties": false
  15131. }
  15132. },
  15133. "required": [
  15134. "timestamp",
  15135. "sessionID",
  15136. "assistantMessageID",
  15137. "callID",
  15138. "structured",
  15139. "content",
  15140. "provider"
  15141. ],
  15142. "additionalProperties": false
  15143. }
  15144. },
  15145. "required": ["id", "type", "properties"],
  15146. "additionalProperties": false
  15147. },
  15148. {
  15149. "type": "object",
  15150. "properties": {
  15151. "id": {
  15152. "type": "string"
  15153. },
  15154. "type": {
  15155. "type": "string",
  15156. "enum": ["session.next.tool.failed"]
  15157. },
  15158. "properties": {
  15159. "type": "object",
  15160. "properties": {
  15161. "timestamp": {
  15162. "type": "number"
  15163. },
  15164. "sessionID": {
  15165. "type": "string",
  15166. "pattern": "^ses"
  15167. },
  15168. "assistantMessageID": {
  15169. "type": "string"
  15170. },
  15171. "callID": {
  15172. "type": "string"
  15173. },
  15174. "error": {
  15175. "$ref": "#/components/schemas/SessionErrorUnknown"
  15176. },
  15177. "result": {},
  15178. "provider": {
  15179. "type": "object",
  15180. "properties": {
  15181. "executed": {
  15182. "type": "boolean"
  15183. },
  15184. "metadata": {
  15185. "type": "object",
  15186. "additionalProperties": {
  15187. "type": "object"
  15188. }
  15189. }
  15190. },
  15191. "required": ["executed"],
  15192. "additionalProperties": false
  15193. }
  15194. },
  15195. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15196. "additionalProperties": false
  15197. }
  15198. },
  15199. "required": ["id", "type", "properties"],
  15200. "additionalProperties": false
  15201. },
  15202. {
  15203. "type": "object",
  15204. "properties": {
  15205. "id": {
  15206. "type": "string"
  15207. },
  15208. "type": {
  15209. "type": "string",
  15210. "enum": ["session.next.retried"]
  15211. },
  15212. "properties": {
  15213. "type": "object",
  15214. "properties": {
  15215. "timestamp": {
  15216. "type": "number"
  15217. },
  15218. "sessionID": {
  15219. "type": "string",
  15220. "pattern": "^ses"
  15221. },
  15222. "attempt": {
  15223. "type": "number"
  15224. },
  15225. "error": {
  15226. "$ref": "#/components/schemas/SessionNextRetry_error"
  15227. }
  15228. },
  15229. "required": ["timestamp", "sessionID", "attempt", "error"],
  15230. "additionalProperties": false
  15231. }
  15232. },
  15233. "required": ["id", "type", "properties"],
  15234. "additionalProperties": false
  15235. },
  15236. {
  15237. "type": "object",
  15238. "properties": {
  15239. "id": {
  15240. "type": "string"
  15241. },
  15242. "type": {
  15243. "type": "string",
  15244. "enum": ["session.next.compaction.started"]
  15245. },
  15246. "properties": {
  15247. "type": "object",
  15248. "properties": {
  15249. "timestamp": {
  15250. "type": "number"
  15251. },
  15252. "sessionID": {
  15253. "type": "string",
  15254. "pattern": "^ses"
  15255. },
  15256. "reason": {
  15257. "type": "string",
  15258. "enum": ["auto", "manual"]
  15259. }
  15260. },
  15261. "required": ["timestamp", "sessionID", "reason"],
  15262. "additionalProperties": false
  15263. }
  15264. },
  15265. "required": ["id", "type", "properties"],
  15266. "additionalProperties": false
  15267. },
  15268. {
  15269. "type": "object",
  15270. "properties": {
  15271. "id": {
  15272. "type": "string"
  15273. },
  15274. "type": {
  15275. "type": "string",
  15276. "enum": ["session.next.compaction.delta"]
  15277. },
  15278. "properties": {
  15279. "type": "object",
  15280. "properties": {
  15281. "timestamp": {
  15282. "type": "number"
  15283. },
  15284. "sessionID": {
  15285. "type": "string",
  15286. "pattern": "^ses"
  15287. },
  15288. "text": {
  15289. "type": "string"
  15290. }
  15291. },
  15292. "required": ["timestamp", "sessionID", "text"],
  15293. "additionalProperties": false
  15294. }
  15295. },
  15296. "required": ["id", "type", "properties"],
  15297. "additionalProperties": false
  15298. },
  15299. {
  15300. "type": "object",
  15301. "properties": {
  15302. "id": {
  15303. "type": "string"
  15304. },
  15305. "type": {
  15306. "type": "string",
  15307. "enum": ["session.next.compaction.ended"]
  15308. },
  15309. "properties": {
  15310. "type": "object",
  15311. "properties": {
  15312. "timestamp": {
  15313. "type": "number"
  15314. },
  15315. "sessionID": {
  15316. "type": "string",
  15317. "pattern": "^ses"
  15318. },
  15319. "text": {
  15320. "type": "string"
  15321. },
  15322. "include": {
  15323. "type": "string"
  15324. }
  15325. },
  15326. "required": ["timestamp", "sessionID", "text"],
  15327. "additionalProperties": false
  15328. }
  15329. },
  15330. "required": ["id", "type", "properties"],
  15331. "additionalProperties": false
  15332. },
  15333. {
  15334. "type": "object",
  15335. "properties": {
  15336. "id": {
  15337. "type": "string"
  15338. },
  15339. "type": {
  15340. "type": "string",
  15341. "enum": ["message.part.delta"]
  15342. },
  15343. "properties": {
  15344. "type": "object",
  15345. "properties": {
  15346. "sessionID": {
  15347. "type": "string",
  15348. "pattern": "^ses"
  15349. },
  15350. "messageID": {
  15351. "type": "string",
  15352. "pattern": "^msg"
  15353. },
  15354. "partID": {
  15355. "type": "string",
  15356. "pattern": "^prt"
  15357. },
  15358. "field": {
  15359. "type": "string"
  15360. },
  15361. "delta": {
  15362. "type": "string"
  15363. }
  15364. },
  15365. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15366. "additionalProperties": false
  15367. }
  15368. },
  15369. "required": ["id", "type", "properties"],
  15370. "additionalProperties": false
  15371. },
  15372. {
  15373. "type": "object",
  15374. "properties": {
  15375. "id": {
  15376. "type": "string"
  15377. },
  15378. "type": {
  15379. "type": "string",
  15380. "enum": ["session.diff"]
  15381. },
  15382. "properties": {
  15383. "type": "object",
  15384. "properties": {
  15385. "sessionID": {
  15386. "type": "string",
  15387. "pattern": "^ses"
  15388. },
  15389. "diff": {
  15390. "type": "array",
  15391. "items": {
  15392. "$ref": "#/components/schemas/SnapshotFileDiff"
  15393. }
  15394. }
  15395. },
  15396. "required": ["sessionID", "diff"],
  15397. "additionalProperties": false
  15398. }
  15399. },
  15400. "required": ["id", "type", "properties"],
  15401. "additionalProperties": false
  15402. },
  15403. {
  15404. "type": "object",
  15405. "properties": {
  15406. "id": {
  15407. "type": "string"
  15408. },
  15409. "type": {
  15410. "type": "string",
  15411. "enum": ["session.error"]
  15412. },
  15413. "properties": {
  15414. "type": "object",
  15415. "properties": {
  15416. "sessionID": {
  15417. "type": "string",
  15418. "pattern": "^ses"
  15419. },
  15420. "error": {
  15421. "anyOf": [
  15422. {
  15423. "$ref": "#/components/schemas/ProviderAuthError"
  15424. },
  15425. {
  15426. "$ref": "#/components/schemas/UnknownError"
  15427. },
  15428. {
  15429. "$ref": "#/components/schemas/MessageOutputLengthError"
  15430. },
  15431. {
  15432. "$ref": "#/components/schemas/MessageAbortedError"
  15433. },
  15434. {
  15435. "$ref": "#/components/schemas/StructuredOutputError"
  15436. },
  15437. {
  15438. "$ref": "#/components/schemas/ContextOverflowError"
  15439. },
  15440. {
  15441. "$ref": "#/components/schemas/APIError"
  15442. }
  15443. ]
  15444. }
  15445. },
  15446. "additionalProperties": false
  15447. }
  15448. },
  15449. "required": ["id", "type", "properties"],
  15450. "additionalProperties": false
  15451. },
  15452. {
  15453. "type": "object",
  15454. "properties": {
  15455. "id": {
  15456. "type": "string"
  15457. },
  15458. "type": {
  15459. "type": "string",
  15460. "enum": ["installation.updated"]
  15461. },
  15462. "properties": {
  15463. "type": "object",
  15464. "properties": {
  15465. "version": {
  15466. "type": "string"
  15467. }
  15468. },
  15469. "required": ["version"],
  15470. "additionalProperties": false
  15471. }
  15472. },
  15473. "required": ["id", "type", "properties"],
  15474. "additionalProperties": false
  15475. },
  15476. {
  15477. "type": "object",
  15478. "properties": {
  15479. "id": {
  15480. "type": "string"
  15481. },
  15482. "type": {
  15483. "type": "string",
  15484. "enum": ["installation.update-available"]
  15485. },
  15486. "properties": {
  15487. "type": "object",
  15488. "properties": {
  15489. "version": {
  15490. "type": "string"
  15491. }
  15492. },
  15493. "required": ["version"],
  15494. "additionalProperties": false
  15495. }
  15496. },
  15497. "required": ["id", "type", "properties"],
  15498. "additionalProperties": false
  15499. },
  15500. {
  15501. "type": "object",
  15502. "properties": {
  15503. "id": {
  15504. "type": "string"
  15505. },
  15506. "type": {
  15507. "type": "string",
  15508. "enum": ["file.edited"]
  15509. },
  15510. "properties": {
  15511. "type": "object",
  15512. "properties": {
  15513. "file": {
  15514. "type": "string"
  15515. }
  15516. },
  15517. "required": ["file"],
  15518. "additionalProperties": false
  15519. }
  15520. },
  15521. "required": ["id", "type", "properties"],
  15522. "additionalProperties": false
  15523. },
  15524. {
  15525. "type": "object",
  15526. "properties": {
  15527. "id": {
  15528. "type": "string"
  15529. },
  15530. "type": {
  15531. "type": "string",
  15532. "enum": ["account.added"]
  15533. },
  15534. "properties": {
  15535. "type": "object",
  15536. "properties": {
  15537. "account": {
  15538. "$ref": "#/components/schemas/AuthInfo"
  15539. }
  15540. },
  15541. "required": ["account"],
  15542. "additionalProperties": false
  15543. }
  15544. },
  15545. "required": ["id", "type", "properties"],
  15546. "additionalProperties": false
  15547. },
  15548. {
  15549. "type": "object",
  15550. "properties": {
  15551. "id": {
  15552. "type": "string"
  15553. },
  15554. "type": {
  15555. "type": "string",
  15556. "enum": ["account.removed"]
  15557. },
  15558. "properties": {
  15559. "type": "object",
  15560. "properties": {
  15561. "account": {
  15562. "$ref": "#/components/schemas/AuthInfo"
  15563. }
  15564. },
  15565. "required": ["account"],
  15566. "additionalProperties": false
  15567. }
  15568. },
  15569. "required": ["id", "type", "properties"],
  15570. "additionalProperties": false
  15571. },
  15572. {
  15573. "type": "object",
  15574. "properties": {
  15575. "id": {
  15576. "type": "string"
  15577. },
  15578. "type": {
  15579. "type": "string",
  15580. "enum": ["account.switched"]
  15581. },
  15582. "properties": {
  15583. "type": "object",
  15584. "properties": {
  15585. "serviceID": {
  15586. "type": "string"
  15587. },
  15588. "from": {
  15589. "type": "string"
  15590. },
  15591. "to": {
  15592. "type": "string"
  15593. }
  15594. },
  15595. "required": ["serviceID"],
  15596. "additionalProperties": false
  15597. }
  15598. },
  15599. "required": ["id", "type", "properties"],
  15600. "additionalProperties": false
  15601. },
  15602. {
  15603. "type": "object",
  15604. "properties": {
  15605. "id": {
  15606. "type": "string"
  15607. },
  15608. "type": {
  15609. "type": "string",
  15610. "enum": ["permission.v2.asked"]
  15611. },
  15612. "properties": {
  15613. "type": "object",
  15614. "properties": {
  15615. "id": {
  15616. "type": "string",
  15617. "pattern": "^per"
  15618. },
  15619. "sessionID": {
  15620. "type": "string",
  15621. "pattern": "^ses"
  15622. },
  15623. "action": {
  15624. "type": "string"
  15625. },
  15626. "resources": {
  15627. "type": "array",
  15628. "items": {
  15629. "type": "string"
  15630. }
  15631. },
  15632. "save": {
  15633. "type": "array",
  15634. "items": {
  15635. "type": "string"
  15636. }
  15637. },
  15638. "metadata": {
  15639. "type": "object"
  15640. },
  15641. "source": {
  15642. "$ref": "#/components/schemas/PermissionV2Source"
  15643. }
  15644. },
  15645. "required": ["id", "sessionID", "action", "resources"],
  15646. "additionalProperties": false
  15647. }
  15648. },
  15649. "required": ["id", "type", "properties"],
  15650. "additionalProperties": false
  15651. },
  15652. {
  15653. "type": "object",
  15654. "properties": {
  15655. "id": {
  15656. "type": "string"
  15657. },
  15658. "type": {
  15659. "type": "string",
  15660. "enum": ["permission.v2.replied"]
  15661. },
  15662. "properties": {
  15663. "type": "object",
  15664. "properties": {
  15665. "sessionID": {
  15666. "type": "string",
  15667. "pattern": "^ses"
  15668. },
  15669. "requestID": {
  15670. "type": "string",
  15671. "pattern": "^per"
  15672. },
  15673. "reply": {
  15674. "$ref": "#/components/schemas/PermissionV2Reply"
  15675. }
  15676. },
  15677. "required": ["sessionID", "requestID", "reply"],
  15678. "additionalProperties": false
  15679. }
  15680. },
  15681. "required": ["id", "type", "properties"],
  15682. "additionalProperties": false
  15683. },
  15684. {
  15685. "type": "object",
  15686. "properties": {
  15687. "id": {
  15688. "type": "string"
  15689. },
  15690. "type": {
  15691. "type": "string",
  15692. "enum": ["file.watcher.updated"]
  15693. },
  15694. "properties": {
  15695. "type": "object",
  15696. "properties": {
  15697. "file": {
  15698. "type": "string"
  15699. },
  15700. "event": {
  15701. "type": "string",
  15702. "enum": ["add", "change", "unlink"]
  15703. }
  15704. },
  15705. "required": ["file", "event"],
  15706. "additionalProperties": false
  15707. }
  15708. },
  15709. "required": ["id", "type", "properties"],
  15710. "additionalProperties": false
  15711. },
  15712. {
  15713. "type": "object",
  15714. "properties": {
  15715. "id": {
  15716. "type": "string"
  15717. },
  15718. "type": {
  15719. "type": "string",
  15720. "enum": ["pty.created"]
  15721. },
  15722. "properties": {
  15723. "type": "object",
  15724. "properties": {
  15725. "info": {
  15726. "$ref": "#/components/schemas/Pty"
  15727. }
  15728. },
  15729. "required": ["info"],
  15730. "additionalProperties": false
  15731. }
  15732. },
  15733. "required": ["id", "type", "properties"],
  15734. "additionalProperties": false
  15735. },
  15736. {
  15737. "type": "object",
  15738. "properties": {
  15739. "id": {
  15740. "type": "string"
  15741. },
  15742. "type": {
  15743. "type": "string",
  15744. "enum": ["pty.updated"]
  15745. },
  15746. "properties": {
  15747. "type": "object",
  15748. "properties": {
  15749. "info": {
  15750. "$ref": "#/components/schemas/Pty"
  15751. }
  15752. },
  15753. "required": ["info"],
  15754. "additionalProperties": false
  15755. }
  15756. },
  15757. "required": ["id", "type", "properties"],
  15758. "additionalProperties": false
  15759. },
  15760. {
  15761. "type": "object",
  15762. "properties": {
  15763. "id": {
  15764. "type": "string"
  15765. },
  15766. "type": {
  15767. "type": "string",
  15768. "enum": ["pty.exited"]
  15769. },
  15770. "properties": {
  15771. "type": "object",
  15772. "properties": {
  15773. "id": {
  15774. "type": "string",
  15775. "pattern": "^pty"
  15776. },
  15777. "exitCode": {
  15778. "type": "integer",
  15779. "minimum": 0
  15780. }
  15781. },
  15782. "required": ["id", "exitCode"],
  15783. "additionalProperties": false
  15784. }
  15785. },
  15786. "required": ["id", "type", "properties"],
  15787. "additionalProperties": false
  15788. },
  15789. {
  15790. "type": "object",
  15791. "properties": {
  15792. "id": {
  15793. "type": "string"
  15794. },
  15795. "type": {
  15796. "type": "string",
  15797. "enum": ["pty.deleted"]
  15798. },
  15799. "properties": {
  15800. "type": "object",
  15801. "properties": {
  15802. "id": {
  15803. "type": "string",
  15804. "pattern": "^pty"
  15805. }
  15806. },
  15807. "required": ["id"],
  15808. "additionalProperties": false
  15809. }
  15810. },
  15811. "required": ["id", "type", "properties"],
  15812. "additionalProperties": false
  15813. },
  15814. {
  15815. "type": "object",
  15816. "properties": {
  15817. "id": {
  15818. "type": "string"
  15819. },
  15820. "type": {
  15821. "type": "string",
  15822. "enum": ["question.v2.asked"]
  15823. },
  15824. "properties": {
  15825. "type": "object",
  15826. "properties": {
  15827. "id": {
  15828. "type": "string",
  15829. "pattern": "^que"
  15830. },
  15831. "sessionID": {
  15832. "type": "string",
  15833. "pattern": "^ses"
  15834. },
  15835. "questions": {
  15836. "type": "array",
  15837. "items": {
  15838. "$ref": "#/components/schemas/QuestionV2Info"
  15839. },
  15840. "description": "Questions to ask"
  15841. },
  15842. "tool": {
  15843. "$ref": "#/components/schemas/QuestionV2Tool"
  15844. }
  15845. },
  15846. "required": ["id", "sessionID", "questions"],
  15847. "additionalProperties": false
  15848. }
  15849. },
  15850. "required": ["id", "type", "properties"],
  15851. "additionalProperties": false
  15852. },
  15853. {
  15854. "type": "object",
  15855. "properties": {
  15856. "id": {
  15857. "type": "string"
  15858. },
  15859. "type": {
  15860. "type": "string",
  15861. "enum": ["question.v2.replied"]
  15862. },
  15863. "properties": {
  15864. "type": "object",
  15865. "properties": {
  15866. "sessionID": {
  15867. "type": "string",
  15868. "pattern": "^ses"
  15869. },
  15870. "requestID": {
  15871. "type": "string",
  15872. "pattern": "^que"
  15873. },
  15874. "answers": {
  15875. "type": "array",
  15876. "items": {
  15877. "$ref": "#/components/schemas/QuestionV2Answer"
  15878. }
  15879. }
  15880. },
  15881. "required": ["sessionID", "requestID", "answers"],
  15882. "additionalProperties": false
  15883. }
  15884. },
  15885. "required": ["id", "type", "properties"],
  15886. "additionalProperties": false
  15887. },
  15888. {
  15889. "type": "object",
  15890. "properties": {
  15891. "id": {
  15892. "type": "string"
  15893. },
  15894. "type": {
  15895. "type": "string",
  15896. "enum": ["question.v2.rejected"]
  15897. },
  15898. "properties": {
  15899. "type": "object",
  15900. "properties": {
  15901. "sessionID": {
  15902. "type": "string",
  15903. "pattern": "^ses"
  15904. },
  15905. "requestID": {
  15906. "type": "string",
  15907. "pattern": "^que"
  15908. }
  15909. },
  15910. "required": ["sessionID", "requestID"],
  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. },
  15923. "type": {
  15924. "type": "string",
  15925. "enum": ["todo.updated"]
  15926. },
  15927. "properties": {
  15928. "type": "object",
  15929. "properties": {
  15930. "sessionID": {
  15931. "type": "string",
  15932. "pattern": "^ses"
  15933. },
  15934. "todos": {
  15935. "type": "array",
  15936. "items": {
  15937. "$ref": "#/components/schemas/Todo"
  15938. }
  15939. }
  15940. },
  15941. "required": ["sessionID", "todos"],
  15942. "additionalProperties": false
  15943. }
  15944. },
  15945. "required": ["id", "type", "properties"],
  15946. "additionalProperties": false
  15947. },
  15948. {
  15949. "type": "object",
  15950. "properties": {
  15951. "id": {
  15952. "type": "string"
  15953. },
  15954. "type": {
  15955. "type": "string",
  15956. "enum": ["lsp.updated"]
  15957. },
  15958. "properties": {
  15959. "type": "object",
  15960. "properties": {}
  15961. }
  15962. },
  15963. "required": ["id", "type", "properties"],
  15964. "additionalProperties": false
  15965. },
  15966. {
  15967. "type": "object",
  15968. "properties": {
  15969. "id": {
  15970. "type": "string"
  15971. },
  15972. "type": {
  15973. "type": "string",
  15974. "enum": ["permission.asked"]
  15975. },
  15976. "properties": {
  15977. "type": "object",
  15978. "properties": {
  15979. "id": {
  15980. "type": "string",
  15981. "pattern": "^per"
  15982. },
  15983. "sessionID": {
  15984. "type": "string",
  15985. "pattern": "^ses"
  15986. },
  15987. "permission": {
  15988. "type": "string"
  15989. },
  15990. "patterns": {
  15991. "type": "array",
  15992. "items": {
  15993. "type": "string"
  15994. }
  15995. },
  15996. "metadata": {
  15997. "type": "object"
  15998. },
  15999. "always": {
  16000. "type": "array",
  16001. "items": {
  16002. "type": "string"
  16003. }
  16004. },
  16005. "tool": {
  16006. "type": "object",
  16007. "properties": {
  16008. "messageID": {
  16009. "type": "string"
  16010. },
  16011. "callID": {
  16012. "type": "string"
  16013. }
  16014. },
  16015. "required": ["messageID", "callID"],
  16016. "additionalProperties": false
  16017. }
  16018. },
  16019. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16020. "additionalProperties": false
  16021. }
  16022. },
  16023. "required": ["id", "type", "properties"],
  16024. "additionalProperties": false
  16025. },
  16026. {
  16027. "type": "object",
  16028. "properties": {
  16029. "id": {
  16030. "type": "string"
  16031. },
  16032. "type": {
  16033. "type": "string",
  16034. "enum": ["permission.replied"]
  16035. },
  16036. "properties": {
  16037. "type": "object",
  16038. "properties": {
  16039. "sessionID": {
  16040. "type": "string",
  16041. "pattern": "^ses"
  16042. },
  16043. "requestID": {
  16044. "type": "string",
  16045. "pattern": "^per"
  16046. },
  16047. "reply": {
  16048. "type": "string",
  16049. "enum": ["once", "always", "reject"]
  16050. }
  16051. },
  16052. "required": ["sessionID", "requestID", "reply"],
  16053. "additionalProperties": false
  16054. }
  16055. },
  16056. "required": ["id", "type", "properties"],
  16057. "additionalProperties": false
  16058. },
  16059. {
  16060. "type": "object",
  16061. "properties": {
  16062. "id": {
  16063. "type": "string"
  16064. },
  16065. "type": {
  16066. "type": "string",
  16067. "enum": ["tui.prompt.append"]
  16068. },
  16069. "properties": {
  16070. "type": "object",
  16071. "properties": {
  16072. "text": {
  16073. "type": "string"
  16074. }
  16075. },
  16076. "required": ["text"],
  16077. "additionalProperties": false
  16078. }
  16079. },
  16080. "required": ["id", "type", "properties"],
  16081. "additionalProperties": false
  16082. },
  16083. {
  16084. "type": "object",
  16085. "properties": {
  16086. "id": {
  16087. "type": "string"
  16088. },
  16089. "type": {
  16090. "type": "string",
  16091. "enum": ["tui.command.execute"]
  16092. },
  16093. "properties": {
  16094. "type": "object",
  16095. "properties": {
  16096. "command": {
  16097. "anyOf": [
  16098. {
  16099. "type": "string",
  16100. "enum": [
  16101. "session.list",
  16102. "session.new",
  16103. "session.share",
  16104. "session.interrupt",
  16105. "session.compact",
  16106. "session.page.up",
  16107. "session.page.down",
  16108. "session.line.up",
  16109. "session.line.down",
  16110. "session.half.page.up",
  16111. "session.half.page.down",
  16112. "session.first",
  16113. "session.last",
  16114. "prompt.clear",
  16115. "prompt.submit",
  16116. "agent.cycle"
  16117. ]
  16118. },
  16119. {
  16120. "type": "string"
  16121. }
  16122. ]
  16123. }
  16124. },
  16125. "required": ["command"],
  16126. "additionalProperties": false
  16127. }
  16128. },
  16129. "required": ["id", "type", "properties"],
  16130. "additionalProperties": false
  16131. },
  16132. {
  16133. "type": "object",
  16134. "properties": {
  16135. "id": {
  16136. "type": "string"
  16137. },
  16138. "type": {
  16139. "type": "string",
  16140. "enum": ["tui.toast.show"]
  16141. },
  16142. "properties": {
  16143. "type": "object",
  16144. "properties": {
  16145. "title": {
  16146. "type": "string"
  16147. },
  16148. "message": {
  16149. "type": "string"
  16150. },
  16151. "variant": {
  16152. "type": "string",
  16153. "enum": ["info", "success", "warning", "error"]
  16154. },
  16155. "duration": {
  16156. "type": "integer",
  16157. "exclusiveMinimum": 0
  16158. }
  16159. },
  16160. "required": ["message", "variant"],
  16161. "additionalProperties": false
  16162. }
  16163. },
  16164. "required": ["id", "type", "properties"],
  16165. "additionalProperties": false
  16166. },
  16167. {
  16168. "type": "object",
  16169. "properties": {
  16170. "id": {
  16171. "type": "string"
  16172. },
  16173. "type": {
  16174. "type": "string",
  16175. "enum": ["tui.session.select"]
  16176. },
  16177. "properties": {
  16178. "type": "object",
  16179. "properties": {
  16180. "sessionID": {
  16181. "type": "string",
  16182. "pattern": "^ses",
  16183. "description": "Session ID to navigate to"
  16184. }
  16185. },
  16186. "required": ["sessionID"],
  16187. "additionalProperties": false
  16188. }
  16189. },
  16190. "required": ["id", "type", "properties"],
  16191. "additionalProperties": false
  16192. },
  16193. {
  16194. "type": "object",
  16195. "properties": {
  16196. "id": {
  16197. "type": "string"
  16198. },
  16199. "type": {
  16200. "type": "string",
  16201. "enum": ["mcp.tools.changed"]
  16202. },
  16203. "properties": {
  16204. "type": "object",
  16205. "properties": {
  16206. "server": {
  16207. "type": "string"
  16208. }
  16209. },
  16210. "required": ["server"],
  16211. "additionalProperties": false
  16212. }
  16213. },
  16214. "required": ["id", "type", "properties"],
  16215. "additionalProperties": false
  16216. },
  16217. {
  16218. "type": "object",
  16219. "properties": {
  16220. "id": {
  16221. "type": "string"
  16222. },
  16223. "type": {
  16224. "type": "string",
  16225. "enum": ["mcp.browser.open.failed"]
  16226. },
  16227. "properties": {
  16228. "type": "object",
  16229. "properties": {
  16230. "mcpName": {
  16231. "type": "string"
  16232. },
  16233. "url": {
  16234. "type": "string"
  16235. }
  16236. },
  16237. "required": ["mcpName", "url"],
  16238. "additionalProperties": false
  16239. }
  16240. },
  16241. "required": ["id", "type", "properties"],
  16242. "additionalProperties": false
  16243. },
  16244. {
  16245. "type": "object",
  16246. "properties": {
  16247. "id": {
  16248. "type": "string"
  16249. },
  16250. "type": {
  16251. "type": "string",
  16252. "enum": ["command.executed"]
  16253. },
  16254. "properties": {
  16255. "type": "object",
  16256. "properties": {
  16257. "name": {
  16258. "type": "string"
  16259. },
  16260. "sessionID": {
  16261. "type": "string",
  16262. "pattern": "^ses"
  16263. },
  16264. "arguments": {
  16265. "type": "string"
  16266. },
  16267. "messageID": {
  16268. "type": "string",
  16269. "pattern": "^msg"
  16270. }
  16271. },
  16272. "required": ["name", "sessionID", "arguments", "messageID"],
  16273. "additionalProperties": false
  16274. }
  16275. },
  16276. "required": ["id", "type", "properties"],
  16277. "additionalProperties": false
  16278. },
  16279. {
  16280. "type": "object",
  16281. "properties": {
  16282. "id": {
  16283. "type": "string"
  16284. },
  16285. "type": {
  16286. "type": "string",
  16287. "enum": ["project.directories.updated"]
  16288. },
  16289. "properties": {
  16290. "type": "object",
  16291. "properties": {
  16292. "projectID": {
  16293. "type": "string"
  16294. }
  16295. },
  16296. "required": ["projectID"],
  16297. "additionalProperties": false
  16298. }
  16299. },
  16300. "required": ["id", "type", "properties"],
  16301. "additionalProperties": false
  16302. },
  16303. {
  16304. "type": "object",
  16305. "properties": {
  16306. "id": {
  16307. "type": "string"
  16308. },
  16309. "type": {
  16310. "type": "string",
  16311. "enum": ["project.updated"]
  16312. },
  16313. "properties": {
  16314. "type": "object",
  16315. "properties": {
  16316. "id": {
  16317. "type": "string"
  16318. },
  16319. "worktree": {
  16320. "type": "string"
  16321. },
  16322. "vcs": {
  16323. "type": "string",
  16324. "enum": ["git"]
  16325. },
  16326. "name": {
  16327. "type": "string"
  16328. },
  16329. "icon": {
  16330. "type": "object",
  16331. "properties": {
  16332. "url": {
  16333. "type": "string"
  16334. },
  16335. "override": {
  16336. "type": "string"
  16337. },
  16338. "color": {
  16339. "type": "string"
  16340. }
  16341. },
  16342. "additionalProperties": false
  16343. },
  16344. "commands": {
  16345. "type": "object",
  16346. "properties": {
  16347. "start": {
  16348. "type": "string",
  16349. "description": "Startup script to run when creating a new workspace (worktree)"
  16350. }
  16351. },
  16352. "additionalProperties": false
  16353. },
  16354. "time": {
  16355. "type": "object",
  16356. "properties": {
  16357. "created": {
  16358. "type": "integer",
  16359. "minimum": 0
  16360. },
  16361. "updated": {
  16362. "type": "integer",
  16363. "minimum": 0
  16364. },
  16365. "initialized": {
  16366. "type": "integer",
  16367. "minimum": 0
  16368. }
  16369. },
  16370. "required": ["created", "updated"],
  16371. "additionalProperties": false
  16372. },
  16373. "sandboxes": {
  16374. "type": "array",
  16375. "items": {
  16376. "type": "string"
  16377. }
  16378. }
  16379. },
  16380. "required": ["id", "worktree", "time", "sandboxes"],
  16381. "additionalProperties": false
  16382. }
  16383. },
  16384. "required": ["id", "type", "properties"],
  16385. "additionalProperties": false
  16386. },
  16387. {
  16388. "type": "object",
  16389. "properties": {
  16390. "id": {
  16391. "type": "string"
  16392. },
  16393. "type": {
  16394. "type": "string",
  16395. "enum": ["question.asked"]
  16396. },
  16397. "properties": {
  16398. "type": "object",
  16399. "properties": {
  16400. "id": {
  16401. "type": "string",
  16402. "pattern": "^que"
  16403. },
  16404. "sessionID": {
  16405. "type": "string",
  16406. "pattern": "^ses"
  16407. },
  16408. "questions": {
  16409. "type": "array",
  16410. "items": {
  16411. "$ref": "#/components/schemas/QuestionInfo"
  16412. },
  16413. "description": "Questions to ask"
  16414. },
  16415. "tool": {
  16416. "$ref": "#/components/schemas/QuestionTool"
  16417. }
  16418. },
  16419. "required": ["id", "sessionID", "questions"],
  16420. "additionalProperties": false
  16421. }
  16422. },
  16423. "required": ["id", "type", "properties"],
  16424. "additionalProperties": false
  16425. },
  16426. {
  16427. "type": "object",
  16428. "properties": {
  16429. "id": {
  16430. "type": "string"
  16431. },
  16432. "type": {
  16433. "type": "string",
  16434. "enum": ["question.replied"]
  16435. },
  16436. "properties": {
  16437. "type": "object",
  16438. "properties": {
  16439. "sessionID": {
  16440. "type": "string",
  16441. "pattern": "^ses"
  16442. },
  16443. "requestID": {
  16444. "type": "string",
  16445. "pattern": "^que"
  16446. },
  16447. "answers": {
  16448. "type": "array",
  16449. "items": {
  16450. "$ref": "#/components/schemas/QuestionAnswer"
  16451. }
  16452. }
  16453. },
  16454. "required": ["sessionID", "requestID", "answers"],
  16455. "additionalProperties": false
  16456. }
  16457. },
  16458. "required": ["id", "type", "properties"],
  16459. "additionalProperties": false
  16460. },
  16461. {
  16462. "type": "object",
  16463. "properties": {
  16464. "id": {
  16465. "type": "string"
  16466. },
  16467. "type": {
  16468. "type": "string",
  16469. "enum": ["question.rejected"]
  16470. },
  16471. "properties": {
  16472. "type": "object",
  16473. "properties": {
  16474. "sessionID": {
  16475. "type": "string",
  16476. "pattern": "^ses"
  16477. },
  16478. "requestID": {
  16479. "type": "string",
  16480. "pattern": "^que"
  16481. }
  16482. },
  16483. "required": ["sessionID", "requestID"],
  16484. "additionalProperties": false
  16485. }
  16486. },
  16487. "required": ["id", "type", "properties"],
  16488. "additionalProperties": false
  16489. },
  16490. {
  16491. "type": "object",
  16492. "properties": {
  16493. "id": {
  16494. "type": "string"
  16495. },
  16496. "type": {
  16497. "type": "string",
  16498. "enum": ["session.status"]
  16499. },
  16500. "properties": {
  16501. "type": "object",
  16502. "properties": {
  16503. "sessionID": {
  16504. "type": "string",
  16505. "pattern": "^ses"
  16506. },
  16507. "status": {
  16508. "$ref": "#/components/schemas/SessionStatus"
  16509. }
  16510. },
  16511. "required": ["sessionID", "status"],
  16512. "additionalProperties": false
  16513. }
  16514. },
  16515. "required": ["id", "type", "properties"],
  16516. "additionalProperties": false
  16517. },
  16518. {
  16519. "type": "object",
  16520. "properties": {
  16521. "id": {
  16522. "type": "string"
  16523. },
  16524. "type": {
  16525. "type": "string",
  16526. "enum": ["session.idle"]
  16527. },
  16528. "properties": {
  16529. "type": "object",
  16530. "properties": {
  16531. "sessionID": {
  16532. "type": "string",
  16533. "pattern": "^ses"
  16534. }
  16535. },
  16536. "required": ["sessionID"],
  16537. "additionalProperties": false
  16538. }
  16539. },
  16540. "required": ["id", "type", "properties"],
  16541. "additionalProperties": false
  16542. },
  16543. {
  16544. "type": "object",
  16545. "properties": {
  16546. "id": {
  16547. "type": "string"
  16548. },
  16549. "type": {
  16550. "type": "string",
  16551. "enum": ["session.compacted"]
  16552. },
  16553. "properties": {
  16554. "type": "object",
  16555. "properties": {
  16556. "sessionID": {
  16557. "type": "string",
  16558. "pattern": "^ses"
  16559. }
  16560. },
  16561. "required": ["sessionID"],
  16562. "additionalProperties": false
  16563. }
  16564. },
  16565. "required": ["id", "type", "properties"],
  16566. "additionalProperties": false
  16567. },
  16568. {
  16569. "type": "object",
  16570. "properties": {
  16571. "id": {
  16572. "type": "string"
  16573. },
  16574. "type": {
  16575. "type": "string",
  16576. "enum": ["vcs.branch.updated"]
  16577. },
  16578. "properties": {
  16579. "type": "object",
  16580. "properties": {
  16581. "branch": {
  16582. "type": "string"
  16583. }
  16584. },
  16585. "additionalProperties": false
  16586. }
  16587. },
  16588. "required": ["id", "type", "properties"],
  16589. "additionalProperties": false
  16590. },
  16591. {
  16592. "type": "object",
  16593. "properties": {
  16594. "id": {
  16595. "type": "string"
  16596. },
  16597. "type": {
  16598. "type": "string",
  16599. "enum": ["worktree.ready"]
  16600. },
  16601. "properties": {
  16602. "type": "object",
  16603. "properties": {
  16604. "name": {
  16605. "type": "string"
  16606. },
  16607. "branch": {
  16608. "type": "string"
  16609. }
  16610. },
  16611. "required": ["name"],
  16612. "additionalProperties": false
  16613. }
  16614. },
  16615. "required": ["id", "type", "properties"],
  16616. "additionalProperties": false
  16617. },
  16618. {
  16619. "type": "object",
  16620. "properties": {
  16621. "id": {
  16622. "type": "string"
  16623. },
  16624. "type": {
  16625. "type": "string",
  16626. "enum": ["worktree.failed"]
  16627. },
  16628. "properties": {
  16629. "type": "object",
  16630. "properties": {
  16631. "message": {
  16632. "type": "string"
  16633. }
  16634. },
  16635. "required": ["message"],
  16636. "additionalProperties": false
  16637. }
  16638. },
  16639. "required": ["id", "type", "properties"],
  16640. "additionalProperties": false
  16641. },
  16642. {
  16643. "type": "object",
  16644. "properties": {
  16645. "id": {
  16646. "type": "string"
  16647. },
  16648. "type": {
  16649. "type": "string",
  16650. "enum": ["workspace.ready"]
  16651. },
  16652. "properties": {
  16653. "type": "object",
  16654. "properties": {
  16655. "name": {
  16656. "type": "string"
  16657. }
  16658. },
  16659. "required": ["name"],
  16660. "additionalProperties": false
  16661. }
  16662. },
  16663. "required": ["id", "type", "properties"],
  16664. "additionalProperties": false
  16665. },
  16666. {
  16667. "type": "object",
  16668. "properties": {
  16669. "id": {
  16670. "type": "string"
  16671. },
  16672. "type": {
  16673. "type": "string",
  16674. "enum": ["workspace.failed"]
  16675. },
  16676. "properties": {
  16677. "type": "object",
  16678. "properties": {
  16679. "message": {
  16680. "type": "string"
  16681. }
  16682. },
  16683. "required": ["message"],
  16684. "additionalProperties": false
  16685. }
  16686. },
  16687. "required": ["id", "type", "properties"],
  16688. "additionalProperties": false
  16689. },
  16690. {
  16691. "type": "object",
  16692. "properties": {
  16693. "id": {
  16694. "type": "string"
  16695. },
  16696. "type": {
  16697. "type": "string",
  16698. "enum": ["workspace.status"]
  16699. },
  16700. "properties": {
  16701. "type": "object",
  16702. "properties": {
  16703. "workspaceID": {
  16704. "type": "string",
  16705. "pattern": "^wrk"
  16706. },
  16707. "status": {
  16708. "type": "string",
  16709. "enum": ["connected", "connecting", "disconnected", "error"]
  16710. }
  16711. },
  16712. "required": ["workspaceID", "status"],
  16713. "additionalProperties": false
  16714. }
  16715. },
  16716. "required": ["id", "type", "properties"],
  16717. "additionalProperties": false
  16718. },
  16719. {
  16720. "type": "object",
  16721. "properties": {
  16722. "id": {
  16723. "type": "string"
  16724. },
  16725. "type": {
  16726. "type": "string",
  16727. "enum": ["server.connected"]
  16728. },
  16729. "properties": {
  16730. "type": "object",
  16731. "properties": {}
  16732. }
  16733. },
  16734. "required": ["id", "type", "properties"],
  16735. "additionalProperties": false
  16736. },
  16737. {
  16738. "type": "object",
  16739. "properties": {
  16740. "id": {
  16741. "type": "string"
  16742. },
  16743. "type": {
  16744. "type": "string",
  16745. "enum": ["global.disposed"]
  16746. },
  16747. "properties": {
  16748. "type": "object",
  16749. "properties": {}
  16750. }
  16751. },
  16752. "required": ["id", "type", "properties"],
  16753. "additionalProperties": false
  16754. },
  16755. {
  16756. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  16757. },
  16758. {
  16759. "$ref": "#/components/schemas/SyncEventSessionCreated"
  16760. },
  16761. {
  16762. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  16763. },
  16764. {
  16765. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  16766. },
  16767. {
  16768. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  16769. },
  16770. {
  16771. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  16772. },
  16773. {
  16774. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  16775. },
  16776. {
  16777. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  16778. },
  16779. {
  16780. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  16781. },
  16782. {
  16783. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  16784. },
  16785. {
  16786. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  16787. },
  16788. {
  16789. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  16790. },
  16791. {
  16792. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  16793. },
  16794. {
  16795. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  16796. },
  16797. {
  16798. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  16799. },
  16800. {
  16801. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  16802. },
  16803. {
  16804. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  16805. },
  16806. {
  16807. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  16808. },
  16809. {
  16810. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  16811. },
  16812. {
  16813. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  16814. },
  16815. {
  16816. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  16817. },
  16818. {
  16819. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  16820. },
  16821. {
  16822. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  16823. },
  16824. {
  16825. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  16826. },
  16827. {
  16828. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  16829. },
  16830. {
  16831. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  16832. },
  16833. {
  16834. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  16835. },
  16836. {
  16837. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  16838. },
  16839. {
  16840. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  16841. },
  16842. {
  16843. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  16844. },
  16845. {
  16846. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  16847. }
  16848. ]
  16849. }
  16850. },
  16851. "required": ["directory", "payload"],
  16852. "additionalProperties": false
  16853. },
  16854. "LogLevel": {
  16855. "type": "string",
  16856. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  16857. "description": "Log level"
  16858. },
  16859. "ServerConfig": {
  16860. "type": "object",
  16861. "properties": {
  16862. "port": {
  16863. "type": "integer",
  16864. "exclusiveMinimum": 0
  16865. },
  16866. "hostname": {
  16867. "type": "string"
  16868. },
  16869. "mdns": {
  16870. "type": "boolean"
  16871. },
  16872. "mdnsDomain": {
  16873. "type": "string"
  16874. },
  16875. "cors": {
  16876. "type": "array",
  16877. "items": {
  16878. "type": "string"
  16879. }
  16880. }
  16881. },
  16882. "additionalProperties": false,
  16883. "description": "Server configuration for opencode serve and web commands"
  16884. },
  16885. "ReferenceConfigEntry": {
  16886. "anyOf": [
  16887. {
  16888. "type": "string"
  16889. },
  16890. {
  16891. "type": "object",
  16892. "properties": {
  16893. "repository": {
  16894. "type": "string",
  16895. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  16896. },
  16897. "branch": {
  16898. "type": "string"
  16899. }
  16900. },
  16901. "required": ["repository"],
  16902. "additionalProperties": false
  16903. },
  16904. {
  16905. "type": "object",
  16906. "properties": {
  16907. "path": {
  16908. "type": "string",
  16909. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  16910. }
  16911. },
  16912. "required": ["path"],
  16913. "additionalProperties": false
  16914. }
  16915. ]
  16916. },
  16917. "ReferenceConfig": {
  16918. "type": "object",
  16919. "additionalProperties": {
  16920. "$ref": "#/components/schemas/ReferenceConfigEntry"
  16921. }
  16922. },
  16923. "PermissionActionConfig": {
  16924. "type": "string",
  16925. "enum": ["ask", "allow", "deny"]
  16926. },
  16927. "PermissionObjectConfig": {
  16928. "type": "object",
  16929. "additionalProperties": {
  16930. "$ref": "#/components/schemas/PermissionActionConfig"
  16931. }
  16932. },
  16933. "PermissionRuleConfig": {
  16934. "anyOf": [
  16935. {
  16936. "$ref": "#/components/schemas/PermissionActionConfig"
  16937. },
  16938. {
  16939. "$ref": "#/components/schemas/PermissionObjectConfig"
  16940. }
  16941. ]
  16942. },
  16943. "PermissionConfig": {
  16944. "anyOf": [
  16945. {
  16946. "$ref": "#/components/schemas/PermissionActionConfig"
  16947. },
  16948. {
  16949. "type": "object",
  16950. "properties": {
  16951. "read": {
  16952. "$ref": "#/components/schemas/PermissionRuleConfig"
  16953. },
  16954. "edit": {
  16955. "$ref": "#/components/schemas/PermissionRuleConfig"
  16956. },
  16957. "glob": {
  16958. "$ref": "#/components/schemas/PermissionRuleConfig"
  16959. },
  16960. "grep": {
  16961. "$ref": "#/components/schemas/PermissionRuleConfig"
  16962. },
  16963. "list": {
  16964. "$ref": "#/components/schemas/PermissionRuleConfig"
  16965. },
  16966. "bash": {
  16967. "$ref": "#/components/schemas/PermissionRuleConfig"
  16968. },
  16969. "task": {
  16970. "$ref": "#/components/schemas/PermissionRuleConfig"
  16971. },
  16972. "external_directory": {
  16973. "$ref": "#/components/schemas/PermissionRuleConfig"
  16974. },
  16975. "todowrite": {
  16976. "$ref": "#/components/schemas/PermissionActionConfig"
  16977. },
  16978. "question": {
  16979. "$ref": "#/components/schemas/PermissionActionConfig"
  16980. },
  16981. "webfetch": {
  16982. "$ref": "#/components/schemas/PermissionActionConfig"
  16983. },
  16984. "websearch": {
  16985. "$ref": "#/components/schemas/PermissionActionConfig"
  16986. },
  16987. "lsp": {
  16988. "$ref": "#/components/schemas/PermissionRuleConfig"
  16989. },
  16990. "doom_loop": {
  16991. "$ref": "#/components/schemas/PermissionActionConfig"
  16992. },
  16993. "skill": {
  16994. "$ref": "#/components/schemas/PermissionRuleConfig"
  16995. }
  16996. },
  16997. "additionalProperties": {
  16998. "$ref": "#/components/schemas/PermissionRuleConfig"
  16999. }
  17000. }
  17001. ]
  17002. },
  17003. "AgentConfig": {
  17004. "type": "object",
  17005. "properties": {
  17006. "model": {
  17007. "type": "string"
  17008. },
  17009. "variant": {
  17010. "type": "string"
  17011. },
  17012. "temperature": {
  17013. "type": "number"
  17014. },
  17015. "top_p": {
  17016. "type": "number"
  17017. },
  17018. "prompt": {
  17019. "type": "string"
  17020. },
  17021. "tools": {
  17022. "type": "object",
  17023. "additionalProperties": {
  17024. "type": "boolean"
  17025. }
  17026. },
  17027. "disable": {
  17028. "type": "boolean"
  17029. },
  17030. "description": {
  17031. "type": "string"
  17032. },
  17033. "mode": {
  17034. "type": "string",
  17035. "enum": ["subagent", "primary", "all"]
  17036. },
  17037. "hidden": {
  17038. "type": "boolean"
  17039. },
  17040. "options": {
  17041. "type": "object"
  17042. },
  17043. "color": {
  17044. "anyOf": [
  17045. {
  17046. "type": "string",
  17047. "pattern": "^#[0-9a-fA-F]{6}$"
  17048. },
  17049. {
  17050. "type": "string",
  17051. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17052. }
  17053. ],
  17054. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17055. },
  17056. "steps": {
  17057. "type": "integer",
  17058. "exclusiveMinimum": 0
  17059. },
  17060. "maxSteps": {
  17061. "type": "integer",
  17062. "exclusiveMinimum": 0
  17063. },
  17064. "permission": {
  17065. "$ref": "#/components/schemas/PermissionConfig"
  17066. }
  17067. },
  17068. "additionalProperties": {}
  17069. },
  17070. "ProviderConfig": {
  17071. "type": "object",
  17072. "properties": {
  17073. "api": {
  17074. "type": "string"
  17075. },
  17076. "name": {
  17077. "type": "string"
  17078. },
  17079. "env": {
  17080. "type": "array",
  17081. "items": {
  17082. "type": "string"
  17083. }
  17084. },
  17085. "id": {
  17086. "type": "string"
  17087. },
  17088. "npm": {
  17089. "type": "string"
  17090. },
  17091. "whitelist": {
  17092. "type": "array",
  17093. "items": {
  17094. "type": "string"
  17095. }
  17096. },
  17097. "blacklist": {
  17098. "type": "array",
  17099. "items": {
  17100. "type": "string"
  17101. }
  17102. },
  17103. "options": {
  17104. "type": "object",
  17105. "properties": {
  17106. "apiKey": {
  17107. "type": "string"
  17108. },
  17109. "baseURL": {
  17110. "type": "string"
  17111. },
  17112. "enterpriseUrl": {
  17113. "type": "string"
  17114. },
  17115. "setCacheKey": {
  17116. "type": "boolean"
  17117. },
  17118. "timeout": {
  17119. "anyOf": [
  17120. {
  17121. "type": "integer",
  17122. "exclusiveMinimum": 0
  17123. },
  17124. {
  17125. "type": "boolean",
  17126. "enum": [false]
  17127. }
  17128. ],
  17129. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17130. },
  17131. "headerTimeout": {
  17132. "anyOf": [
  17133. {
  17134. "type": "integer",
  17135. "exclusiveMinimum": 0
  17136. },
  17137. {
  17138. "type": "boolean",
  17139. "enum": [false]
  17140. }
  17141. ],
  17142. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17143. },
  17144. "chunkTimeout": {
  17145. "type": "integer",
  17146. "exclusiveMinimum": 0
  17147. }
  17148. },
  17149. "additionalProperties": {}
  17150. },
  17151. "models": {
  17152. "type": "object",
  17153. "additionalProperties": {
  17154. "type": "object",
  17155. "properties": {
  17156. "id": {
  17157. "type": "string"
  17158. },
  17159. "name": {
  17160. "type": "string"
  17161. },
  17162. "family": {
  17163. "type": "string"
  17164. },
  17165. "release_date": {
  17166. "type": "string"
  17167. },
  17168. "attachment": {
  17169. "type": "boolean"
  17170. },
  17171. "reasoning": {
  17172. "type": "boolean"
  17173. },
  17174. "temperature": {
  17175. "type": "boolean"
  17176. },
  17177. "tool_call": {
  17178. "type": "boolean"
  17179. },
  17180. "interleaved": {
  17181. "anyOf": [
  17182. {
  17183. "type": "boolean",
  17184. "enum": [true]
  17185. },
  17186. {
  17187. "type": "object",
  17188. "properties": {
  17189. "field": {
  17190. "type": "string",
  17191. "enum": ["reasoning_content", "reasoning_details"]
  17192. }
  17193. },
  17194. "required": ["field"],
  17195. "additionalProperties": false
  17196. }
  17197. ]
  17198. },
  17199. "cost": {
  17200. "type": "object",
  17201. "properties": {
  17202. "input": {
  17203. "type": "number"
  17204. },
  17205. "output": {
  17206. "type": "number"
  17207. },
  17208. "cache_read": {
  17209. "type": "number"
  17210. },
  17211. "cache_write": {
  17212. "type": "number"
  17213. },
  17214. "context_over_200k": {
  17215. "type": "object",
  17216. "properties": {
  17217. "input": {
  17218. "type": "number"
  17219. },
  17220. "output": {
  17221. "type": "number"
  17222. },
  17223. "cache_read": {
  17224. "type": "number"
  17225. },
  17226. "cache_write": {
  17227. "type": "number"
  17228. }
  17229. },
  17230. "required": ["input", "output"],
  17231. "additionalProperties": false
  17232. }
  17233. },
  17234. "required": ["input", "output"],
  17235. "additionalProperties": false
  17236. },
  17237. "limit": {
  17238. "type": "object",
  17239. "properties": {
  17240. "context": {
  17241. "type": "number"
  17242. },
  17243. "input": {
  17244. "type": "number"
  17245. },
  17246. "output": {
  17247. "type": "number"
  17248. }
  17249. },
  17250. "required": ["context", "output"],
  17251. "additionalProperties": false
  17252. },
  17253. "modalities": {
  17254. "type": "object",
  17255. "properties": {
  17256. "input": {
  17257. "type": "array",
  17258. "items": {
  17259. "type": "string",
  17260. "enum": ["text", "audio", "image", "video", "pdf"]
  17261. }
  17262. },
  17263. "output": {
  17264. "type": "array",
  17265. "items": {
  17266. "type": "string",
  17267. "enum": ["text", "audio", "image", "video", "pdf"]
  17268. }
  17269. }
  17270. },
  17271. "additionalProperties": false
  17272. },
  17273. "experimental": {
  17274. "type": "boolean"
  17275. },
  17276. "status": {
  17277. "type": "string",
  17278. "enum": ["alpha", "beta", "deprecated", "active"]
  17279. },
  17280. "provider": {
  17281. "type": "object",
  17282. "properties": {
  17283. "npm": {
  17284. "type": "string"
  17285. },
  17286. "api": {
  17287. "type": "string"
  17288. }
  17289. },
  17290. "additionalProperties": false
  17291. },
  17292. "options": {
  17293. "type": "object"
  17294. },
  17295. "headers": {
  17296. "type": "object",
  17297. "additionalProperties": {
  17298. "type": "string"
  17299. }
  17300. },
  17301. "variants": {
  17302. "type": "object",
  17303. "additionalProperties": {
  17304. "type": "object",
  17305. "properties": {
  17306. "disabled": {
  17307. "type": "boolean"
  17308. }
  17309. },
  17310. "additionalProperties": {}
  17311. },
  17312. "description": "Variant-specific configuration"
  17313. }
  17314. },
  17315. "additionalProperties": false
  17316. }
  17317. }
  17318. },
  17319. "additionalProperties": false
  17320. },
  17321. "McpLocalConfig": {
  17322. "type": "object",
  17323. "properties": {
  17324. "type": {
  17325. "type": "string",
  17326. "enum": ["local"],
  17327. "description": "Type of MCP server connection"
  17328. },
  17329. "command": {
  17330. "type": "array",
  17331. "items": {
  17332. "type": "string"
  17333. },
  17334. "description": "Command and arguments to run the MCP server"
  17335. },
  17336. "environment": {
  17337. "type": "object",
  17338. "additionalProperties": {
  17339. "type": "string"
  17340. }
  17341. },
  17342. "enabled": {
  17343. "type": "boolean"
  17344. },
  17345. "timeout": {
  17346. "type": "integer",
  17347. "exclusiveMinimum": 0
  17348. }
  17349. },
  17350. "required": ["type", "command"],
  17351. "additionalProperties": false
  17352. },
  17353. "McpOAuthConfig": {
  17354. "type": "object",
  17355. "properties": {
  17356. "clientId": {
  17357. "type": "string"
  17358. },
  17359. "clientSecret": {
  17360. "type": "string"
  17361. },
  17362. "scope": {
  17363. "type": "string"
  17364. },
  17365. "callbackPort": {
  17366. "type": "integer",
  17367. "minimum": 1,
  17368. "maximum": 65535
  17369. },
  17370. "redirectUri": {
  17371. "type": "string"
  17372. }
  17373. },
  17374. "additionalProperties": false
  17375. },
  17376. "McpRemoteConfig": {
  17377. "type": "object",
  17378. "properties": {
  17379. "type": {
  17380. "type": "string",
  17381. "enum": ["remote"],
  17382. "description": "Type of MCP server connection"
  17383. },
  17384. "url": {
  17385. "type": "string",
  17386. "description": "URL of the remote MCP server"
  17387. },
  17388. "enabled": {
  17389. "type": "boolean"
  17390. },
  17391. "headers": {
  17392. "type": "object",
  17393. "additionalProperties": {
  17394. "type": "string"
  17395. }
  17396. },
  17397. "oauth": {
  17398. "anyOf": [
  17399. {
  17400. "$ref": "#/components/schemas/McpOAuthConfig"
  17401. },
  17402. {
  17403. "type": "boolean",
  17404. "enum": [false]
  17405. }
  17406. ],
  17407. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17408. },
  17409. "timeout": {
  17410. "type": "integer",
  17411. "exclusiveMinimum": 0
  17412. }
  17413. },
  17414. "required": ["type", "url"],
  17415. "additionalProperties": false
  17416. },
  17417. "LayoutConfig": {
  17418. "type": "string",
  17419. "enum": ["auto", "stretch"],
  17420. "description": "@deprecated Always uses stretch layout."
  17421. },
  17422. "ImageAttachmentConfig": {
  17423. "type": "object",
  17424. "properties": {
  17425. "auto_resize": {
  17426. "type": "boolean"
  17427. },
  17428. "max_width": {
  17429. "type": "integer",
  17430. "exclusiveMinimum": 0
  17431. },
  17432. "max_height": {
  17433. "type": "integer",
  17434. "exclusiveMinimum": 0
  17435. },
  17436. "max_base64_bytes": {
  17437. "type": "integer",
  17438. "exclusiveMinimum": 0
  17439. }
  17440. },
  17441. "additionalProperties": false
  17442. },
  17443. "AttachmentConfig": {
  17444. "type": "object",
  17445. "properties": {
  17446. "image": {
  17447. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17448. }
  17449. },
  17450. "additionalProperties": false
  17451. },
  17452. "Config": {
  17453. "type": "object",
  17454. "properties": {
  17455. "$schema": {
  17456. "type": "string"
  17457. },
  17458. "shell": {
  17459. "type": "string"
  17460. },
  17461. "logLevel": {
  17462. "$ref": "#/components/schemas/LogLevel"
  17463. },
  17464. "server": {
  17465. "$ref": "#/components/schemas/ServerConfig"
  17466. },
  17467. "command": {
  17468. "type": "object",
  17469. "additionalProperties": {
  17470. "type": "object",
  17471. "properties": {
  17472. "template": {
  17473. "type": "string"
  17474. },
  17475. "description": {
  17476. "type": "string"
  17477. },
  17478. "agent": {
  17479. "type": "string"
  17480. },
  17481. "model": {
  17482. "type": "string"
  17483. },
  17484. "variant": {
  17485. "type": "string"
  17486. },
  17487. "subtask": {
  17488. "type": "boolean"
  17489. }
  17490. },
  17491. "required": ["template"],
  17492. "additionalProperties": false
  17493. }
  17494. },
  17495. "skills": {
  17496. "type": "object",
  17497. "properties": {
  17498. "paths": {
  17499. "type": "array",
  17500. "items": {
  17501. "type": "string"
  17502. }
  17503. },
  17504. "urls": {
  17505. "type": "array",
  17506. "items": {
  17507. "type": "string"
  17508. }
  17509. }
  17510. },
  17511. "additionalProperties": false
  17512. },
  17513. "reference": {
  17514. "$ref": "#/components/schemas/ReferenceConfig"
  17515. },
  17516. "watcher": {
  17517. "type": "object",
  17518. "properties": {
  17519. "ignore": {
  17520. "type": "array",
  17521. "items": {
  17522. "type": "string"
  17523. }
  17524. }
  17525. },
  17526. "additionalProperties": false
  17527. },
  17528. "snapshot": {
  17529. "type": "boolean"
  17530. },
  17531. "plugin": {
  17532. "type": "array",
  17533. "items": {
  17534. "anyOf": [
  17535. {
  17536. "type": "string"
  17537. },
  17538. {
  17539. "type": "array",
  17540. "prefixItems": [
  17541. {
  17542. "type": "string"
  17543. },
  17544. {
  17545. "type": "object"
  17546. }
  17547. ],
  17548. "maxItems": 2,
  17549. "minItems": 2
  17550. }
  17551. ]
  17552. }
  17553. },
  17554. "share": {
  17555. "type": "string",
  17556. "enum": ["manual", "auto", "disabled"]
  17557. },
  17558. "autoshare": {
  17559. "type": "boolean"
  17560. },
  17561. "autoupdate": {
  17562. "anyOf": [
  17563. {
  17564. "type": "boolean"
  17565. },
  17566. {
  17567. "type": "string",
  17568. "enum": ["notify"]
  17569. }
  17570. ],
  17571. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  17572. },
  17573. "disabled_providers": {
  17574. "type": "array",
  17575. "items": {
  17576. "type": "string"
  17577. }
  17578. },
  17579. "enabled_providers": {
  17580. "type": "array",
  17581. "items": {
  17582. "type": "string"
  17583. }
  17584. },
  17585. "model": {
  17586. "type": "string"
  17587. },
  17588. "small_model": {
  17589. "type": "string"
  17590. },
  17591. "default_agent": {
  17592. "type": "string"
  17593. },
  17594. "username": {
  17595. "type": "string"
  17596. },
  17597. "mode": {
  17598. "type": "object",
  17599. "properties": {
  17600. "build": {
  17601. "$ref": "#/components/schemas/AgentConfig"
  17602. },
  17603. "plan": {
  17604. "$ref": "#/components/schemas/AgentConfig"
  17605. }
  17606. },
  17607. "additionalProperties": {
  17608. "$ref": "#/components/schemas/AgentConfig"
  17609. }
  17610. },
  17611. "agent": {
  17612. "type": "object",
  17613. "properties": {
  17614. "plan": {
  17615. "$ref": "#/components/schemas/AgentConfig"
  17616. },
  17617. "build": {
  17618. "$ref": "#/components/schemas/AgentConfig"
  17619. },
  17620. "general": {
  17621. "$ref": "#/components/schemas/AgentConfig"
  17622. },
  17623. "explore": {
  17624. "$ref": "#/components/schemas/AgentConfig"
  17625. },
  17626. "title": {
  17627. "$ref": "#/components/schemas/AgentConfig"
  17628. },
  17629. "summary": {
  17630. "$ref": "#/components/schemas/AgentConfig"
  17631. },
  17632. "compaction": {
  17633. "$ref": "#/components/schemas/AgentConfig"
  17634. }
  17635. },
  17636. "additionalProperties": {
  17637. "$ref": "#/components/schemas/AgentConfig"
  17638. }
  17639. },
  17640. "provider": {
  17641. "type": "object",
  17642. "additionalProperties": {
  17643. "$ref": "#/components/schemas/ProviderConfig"
  17644. }
  17645. },
  17646. "mcp": {
  17647. "type": "object",
  17648. "additionalProperties": {
  17649. "anyOf": [
  17650. {
  17651. "$ref": "#/components/schemas/McpLocalConfig"
  17652. },
  17653. {
  17654. "$ref": "#/components/schemas/McpRemoteConfig"
  17655. },
  17656. {
  17657. "type": "object",
  17658. "properties": {
  17659. "enabled": {
  17660. "type": "boolean"
  17661. }
  17662. },
  17663. "required": ["enabled"],
  17664. "additionalProperties": false
  17665. }
  17666. ]
  17667. }
  17668. },
  17669. "formatter": {
  17670. "anyOf": [
  17671. {
  17672. "type": "boolean"
  17673. },
  17674. {
  17675. "type": "object",
  17676. "additionalProperties": {
  17677. "type": "object",
  17678. "properties": {
  17679. "disabled": {
  17680. "type": "boolean"
  17681. },
  17682. "command": {
  17683. "type": "array",
  17684. "items": {
  17685. "type": "string"
  17686. }
  17687. },
  17688. "environment": {
  17689. "type": "object",
  17690. "additionalProperties": {
  17691. "type": "string"
  17692. }
  17693. },
  17694. "extensions": {
  17695. "type": "array",
  17696. "items": {
  17697. "type": "string"
  17698. }
  17699. }
  17700. },
  17701. "additionalProperties": false
  17702. }
  17703. }
  17704. ],
  17705. "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."
  17706. },
  17707. "lsp": {
  17708. "anyOf": [
  17709. {
  17710. "type": "boolean"
  17711. },
  17712. {
  17713. "type": "object",
  17714. "additionalProperties": {
  17715. "anyOf": [
  17716. {
  17717. "type": "object",
  17718. "properties": {
  17719. "disabled": {
  17720. "type": "boolean",
  17721. "enum": [true]
  17722. }
  17723. },
  17724. "required": ["disabled"],
  17725. "additionalProperties": false
  17726. },
  17727. {
  17728. "type": "object",
  17729. "properties": {
  17730. "command": {
  17731. "type": "array",
  17732. "items": {
  17733. "type": "string"
  17734. }
  17735. },
  17736. "extensions": {
  17737. "type": "array",
  17738. "items": {
  17739. "type": "string"
  17740. }
  17741. },
  17742. "disabled": {
  17743. "type": "boolean"
  17744. },
  17745. "env": {
  17746. "type": "object",
  17747. "additionalProperties": {
  17748. "type": "string"
  17749. }
  17750. },
  17751. "initialization": {
  17752. "type": "object"
  17753. }
  17754. },
  17755. "required": ["command"],
  17756. "additionalProperties": false
  17757. }
  17758. ]
  17759. }
  17760. }
  17761. ],
  17762. "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."
  17763. },
  17764. "instructions": {
  17765. "type": "array",
  17766. "items": {
  17767. "type": "string"
  17768. }
  17769. },
  17770. "layout": {
  17771. "$ref": "#/components/schemas/LayoutConfig"
  17772. },
  17773. "permission": {
  17774. "$ref": "#/components/schemas/PermissionConfig"
  17775. },
  17776. "tools": {
  17777. "type": "object",
  17778. "additionalProperties": {
  17779. "type": "boolean"
  17780. }
  17781. },
  17782. "attachment": {
  17783. "$ref": "#/components/schemas/AttachmentConfig"
  17784. },
  17785. "enterprise": {
  17786. "type": "object",
  17787. "properties": {
  17788. "url": {
  17789. "type": "string"
  17790. }
  17791. },
  17792. "additionalProperties": false
  17793. },
  17794. "tool_output": {
  17795. "type": "object",
  17796. "properties": {
  17797. "max_lines": {
  17798. "type": "integer",
  17799. "exclusiveMinimum": 0
  17800. },
  17801. "max_bytes": {
  17802. "type": "integer",
  17803. "exclusiveMinimum": 0
  17804. }
  17805. },
  17806. "additionalProperties": false
  17807. },
  17808. "compaction": {
  17809. "type": "object",
  17810. "properties": {
  17811. "auto": {
  17812. "type": "boolean"
  17813. },
  17814. "prune": {
  17815. "type": "boolean"
  17816. },
  17817. "tail_turns": {
  17818. "type": "integer",
  17819. "minimum": 0
  17820. },
  17821. "preserve_recent_tokens": {
  17822. "type": "integer",
  17823. "minimum": 0
  17824. },
  17825. "reserved": {
  17826. "type": "integer",
  17827. "minimum": 0
  17828. }
  17829. },
  17830. "additionalProperties": false
  17831. },
  17832. "experimental": {
  17833. "type": "object",
  17834. "properties": {
  17835. "disable_paste_summary": {
  17836. "type": "boolean"
  17837. },
  17838. "batch_tool": {
  17839. "type": "boolean"
  17840. },
  17841. "openTelemetry": {
  17842. "type": "boolean"
  17843. },
  17844. "primary_tools": {
  17845. "type": "array",
  17846. "items": {
  17847. "type": "string"
  17848. }
  17849. },
  17850. "continue_loop_on_deny": {
  17851. "type": "boolean"
  17852. },
  17853. "mcp_timeout": {
  17854. "type": "integer",
  17855. "exclusiveMinimum": 0
  17856. },
  17857. "policies": {
  17858. "type": "array",
  17859. "items": {
  17860. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  17861. }
  17862. }
  17863. },
  17864. "additionalProperties": false
  17865. }
  17866. },
  17867. "additionalProperties": false
  17868. },
  17869. "Model": {
  17870. "type": "object",
  17871. "properties": {
  17872. "id": {
  17873. "type": "string"
  17874. },
  17875. "providerID": {
  17876. "type": "string"
  17877. },
  17878. "api": {
  17879. "type": "object",
  17880. "properties": {
  17881. "id": {
  17882. "type": "string"
  17883. },
  17884. "url": {
  17885. "type": "string"
  17886. },
  17887. "npm": {
  17888. "type": "string"
  17889. }
  17890. },
  17891. "required": ["id", "url", "npm"],
  17892. "additionalProperties": false
  17893. },
  17894. "name": {
  17895. "type": "string"
  17896. },
  17897. "family": {
  17898. "type": "string"
  17899. },
  17900. "capabilities": {
  17901. "type": "object",
  17902. "properties": {
  17903. "temperature": {
  17904. "type": "boolean"
  17905. },
  17906. "reasoning": {
  17907. "type": "boolean"
  17908. },
  17909. "attachment": {
  17910. "type": "boolean"
  17911. },
  17912. "toolcall": {
  17913. "type": "boolean"
  17914. },
  17915. "input": {
  17916. "type": "object",
  17917. "properties": {
  17918. "text": {
  17919. "type": "boolean"
  17920. },
  17921. "audio": {
  17922. "type": "boolean"
  17923. },
  17924. "image": {
  17925. "type": "boolean"
  17926. },
  17927. "video": {
  17928. "type": "boolean"
  17929. },
  17930. "pdf": {
  17931. "type": "boolean"
  17932. }
  17933. },
  17934. "required": ["text", "audio", "image", "video", "pdf"],
  17935. "additionalProperties": false
  17936. },
  17937. "output": {
  17938. "type": "object",
  17939. "properties": {
  17940. "text": {
  17941. "type": "boolean"
  17942. },
  17943. "audio": {
  17944. "type": "boolean"
  17945. },
  17946. "image": {
  17947. "type": "boolean"
  17948. },
  17949. "video": {
  17950. "type": "boolean"
  17951. },
  17952. "pdf": {
  17953. "type": "boolean"
  17954. }
  17955. },
  17956. "required": ["text", "audio", "image", "video", "pdf"],
  17957. "additionalProperties": false
  17958. },
  17959. "interleaved": {
  17960. "anyOf": [
  17961. {
  17962. "type": "boolean"
  17963. },
  17964. {
  17965. "type": "object",
  17966. "properties": {
  17967. "field": {
  17968. "type": "string",
  17969. "enum": ["reasoning_content", "reasoning_details"]
  17970. }
  17971. },
  17972. "required": ["field"],
  17973. "additionalProperties": false
  17974. }
  17975. ]
  17976. }
  17977. },
  17978. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  17979. "additionalProperties": false
  17980. },
  17981. "cost": {
  17982. "type": "object",
  17983. "properties": {
  17984. "input": {
  17985. "type": "number"
  17986. },
  17987. "output": {
  17988. "type": "number"
  17989. },
  17990. "cache": {
  17991. "type": "object",
  17992. "properties": {
  17993. "read": {
  17994. "type": "number"
  17995. },
  17996. "write": {
  17997. "type": "number"
  17998. }
  17999. },
  18000. "required": ["read", "write"],
  18001. "additionalProperties": false
  18002. },
  18003. "tiers": {
  18004. "type": "array",
  18005. "items": {
  18006. "type": "object",
  18007. "properties": {
  18008. "input": {
  18009. "type": "number"
  18010. },
  18011. "output": {
  18012. "type": "number"
  18013. },
  18014. "cache": {
  18015. "type": "object",
  18016. "properties": {
  18017. "read": {
  18018. "type": "number"
  18019. },
  18020. "write": {
  18021. "type": "number"
  18022. }
  18023. },
  18024. "required": ["read", "write"],
  18025. "additionalProperties": false
  18026. },
  18027. "tier": {
  18028. "type": "object",
  18029. "properties": {
  18030. "type": {
  18031. "type": "string",
  18032. "enum": ["context"]
  18033. },
  18034. "size": {
  18035. "type": "number"
  18036. }
  18037. },
  18038. "required": ["type", "size"],
  18039. "additionalProperties": false
  18040. }
  18041. },
  18042. "required": ["input", "output", "cache", "tier"],
  18043. "additionalProperties": false
  18044. }
  18045. },
  18046. "experimentalOver200K": {
  18047. "type": "object",
  18048. "properties": {
  18049. "input": {
  18050. "type": "number"
  18051. },
  18052. "output": {
  18053. "type": "number"
  18054. },
  18055. "cache": {
  18056. "type": "object",
  18057. "properties": {
  18058. "read": {
  18059. "type": "number"
  18060. },
  18061. "write": {
  18062. "type": "number"
  18063. }
  18064. },
  18065. "required": ["read", "write"],
  18066. "additionalProperties": false
  18067. }
  18068. },
  18069. "required": ["input", "output", "cache"],
  18070. "additionalProperties": false
  18071. }
  18072. },
  18073. "required": ["input", "output", "cache"],
  18074. "additionalProperties": false
  18075. },
  18076. "limit": {
  18077. "type": "object",
  18078. "properties": {
  18079. "context": {
  18080. "type": "number"
  18081. },
  18082. "input": {
  18083. "type": "number"
  18084. },
  18085. "output": {
  18086. "type": "number"
  18087. }
  18088. },
  18089. "required": ["context", "output"],
  18090. "additionalProperties": false
  18091. },
  18092. "status": {
  18093. "type": "string",
  18094. "enum": ["alpha", "beta", "deprecated", "active"]
  18095. },
  18096. "options": {
  18097. "type": "object"
  18098. },
  18099. "headers": {
  18100. "type": "object",
  18101. "additionalProperties": {
  18102. "type": "string"
  18103. }
  18104. },
  18105. "release_date": {
  18106. "type": "string"
  18107. },
  18108. "variants": {
  18109. "type": "object",
  18110. "additionalProperties": {
  18111. "type": "object"
  18112. }
  18113. }
  18114. },
  18115. "required": [
  18116. "id",
  18117. "providerID",
  18118. "api",
  18119. "name",
  18120. "capabilities",
  18121. "cost",
  18122. "limit",
  18123. "status",
  18124. "options",
  18125. "headers",
  18126. "release_date"
  18127. ],
  18128. "additionalProperties": false
  18129. },
  18130. "Provider": {
  18131. "type": "object",
  18132. "properties": {
  18133. "id": {
  18134. "type": "string"
  18135. },
  18136. "name": {
  18137. "type": "string"
  18138. },
  18139. "source": {
  18140. "type": "string",
  18141. "enum": ["env", "config", "custom", "api"]
  18142. },
  18143. "env": {
  18144. "type": "array",
  18145. "items": {
  18146. "type": "string"
  18147. }
  18148. },
  18149. "key": {
  18150. "type": "string"
  18151. },
  18152. "options": {
  18153. "type": "object"
  18154. },
  18155. "models": {
  18156. "type": "object",
  18157. "additionalProperties": {
  18158. "$ref": "#/components/schemas/Model"
  18159. }
  18160. }
  18161. },
  18162. "required": ["id", "name", "source", "env", "options", "models"],
  18163. "additionalProperties": false
  18164. },
  18165. "ConsoleState": {
  18166. "type": "object",
  18167. "properties": {
  18168. "consoleManagedProviders": {
  18169. "type": "array",
  18170. "items": {
  18171. "type": "string"
  18172. }
  18173. },
  18174. "activeOrgName": {
  18175. "type": "string"
  18176. },
  18177. "switchableOrgCount": {
  18178. "type": "integer",
  18179. "minimum": 0
  18180. }
  18181. },
  18182. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18183. "additionalProperties": false
  18184. },
  18185. "effect_HttpApiError_InternalServerError": {
  18186. "type": "object",
  18187. "properties": {
  18188. "_tag": {
  18189. "type": "string",
  18190. "enum": ["InternalServerError"]
  18191. }
  18192. },
  18193. "required": ["_tag"],
  18194. "additionalProperties": false
  18195. },
  18196. "ToolListItem": {
  18197. "type": "object",
  18198. "properties": {
  18199. "id": {
  18200. "type": "string"
  18201. },
  18202. "description": {
  18203. "type": "string"
  18204. },
  18205. "parameters": {}
  18206. },
  18207. "required": ["id", "description", "parameters"],
  18208. "additionalProperties": false
  18209. },
  18210. "ToolList": {
  18211. "type": "array",
  18212. "items": {
  18213. "$ref": "#/components/schemas/ToolListItem"
  18214. }
  18215. },
  18216. "ToolIDs": {
  18217. "type": "array",
  18218. "items": {
  18219. "type": "string"
  18220. }
  18221. },
  18222. "WorktreeError": {
  18223. "type": "object",
  18224. "properties": {
  18225. "name": {
  18226. "type": "string",
  18227. "enum": [
  18228. "WorktreeNotGitError",
  18229. "WorktreeNameGenerationFailedError",
  18230. "WorktreeCreateFailedError",
  18231. "WorktreeStartCommandFailedError",
  18232. "WorktreeRemoveFailedError",
  18233. "WorktreeResetFailedError",
  18234. "WorktreeListFailedError"
  18235. ]
  18236. },
  18237. "data": {
  18238. "type": "object",
  18239. "properties": {
  18240. "message": {
  18241. "type": "string"
  18242. }
  18243. },
  18244. "required": ["message"],
  18245. "additionalProperties": false
  18246. }
  18247. },
  18248. "required": ["name", "data"],
  18249. "additionalProperties": false
  18250. },
  18251. "WorktreeCreateInput": {
  18252. "type": "object",
  18253. "properties": {
  18254. "name": {
  18255. "type": "string"
  18256. },
  18257. "startCommand": {
  18258. "type": "string",
  18259. "description": "Additional startup script to run after the project's start command"
  18260. }
  18261. },
  18262. "additionalProperties": false
  18263. },
  18264. "Worktree": {
  18265. "type": "object",
  18266. "properties": {
  18267. "name": {
  18268. "type": "string"
  18269. },
  18270. "branch": {
  18271. "type": "string"
  18272. },
  18273. "directory": {
  18274. "type": "string"
  18275. }
  18276. },
  18277. "required": ["name", "directory"],
  18278. "additionalProperties": false
  18279. },
  18280. "WorktreeRemoveInput": {
  18281. "type": "object",
  18282. "properties": {
  18283. "directory": {
  18284. "type": "string"
  18285. }
  18286. },
  18287. "required": ["directory"],
  18288. "additionalProperties": false
  18289. },
  18290. "WorktreeResetInput": {
  18291. "type": "object",
  18292. "properties": {
  18293. "directory": {
  18294. "type": "string"
  18295. }
  18296. },
  18297. "required": ["directory"],
  18298. "additionalProperties": false
  18299. },
  18300. "ProjectSummary": {
  18301. "type": "object",
  18302. "properties": {
  18303. "id": {
  18304. "type": "string"
  18305. },
  18306. "name": {
  18307. "type": "string"
  18308. },
  18309. "worktree": {
  18310. "type": "string"
  18311. }
  18312. },
  18313. "required": ["id", "worktree"],
  18314. "additionalProperties": false
  18315. },
  18316. "GlobalSession": {
  18317. "type": "object",
  18318. "properties": {
  18319. "id": {
  18320. "type": "string",
  18321. "pattern": "^ses"
  18322. },
  18323. "slug": {
  18324. "type": "string"
  18325. },
  18326. "projectID": {
  18327. "type": "string"
  18328. },
  18329. "workspaceID": {
  18330. "type": "string",
  18331. "pattern": "^wrk"
  18332. },
  18333. "directory": {
  18334. "type": "string"
  18335. },
  18336. "path": {
  18337. "type": "string"
  18338. },
  18339. "parentID": {
  18340. "type": "string",
  18341. "pattern": "^ses"
  18342. },
  18343. "summary": {
  18344. "type": "object",
  18345. "properties": {
  18346. "additions": {
  18347. "type": "number"
  18348. },
  18349. "deletions": {
  18350. "type": "number"
  18351. },
  18352. "files": {
  18353. "type": "number"
  18354. },
  18355. "diffs": {
  18356. "type": "array",
  18357. "items": {
  18358. "$ref": "#/components/schemas/SnapshotFileDiff"
  18359. }
  18360. }
  18361. },
  18362. "required": ["additions", "deletions", "files"],
  18363. "additionalProperties": false
  18364. },
  18365. "cost": {
  18366. "type": "number"
  18367. },
  18368. "tokens": {
  18369. "type": "object",
  18370. "properties": {
  18371. "input": {
  18372. "type": "number"
  18373. },
  18374. "output": {
  18375. "type": "number"
  18376. },
  18377. "reasoning": {
  18378. "type": "number"
  18379. },
  18380. "cache": {
  18381. "type": "object",
  18382. "properties": {
  18383. "read": {
  18384. "type": "number"
  18385. },
  18386. "write": {
  18387. "type": "number"
  18388. }
  18389. },
  18390. "required": ["read", "write"],
  18391. "additionalProperties": false
  18392. }
  18393. },
  18394. "required": ["input", "output", "reasoning", "cache"],
  18395. "additionalProperties": false
  18396. },
  18397. "share": {
  18398. "type": "object",
  18399. "properties": {
  18400. "url": {
  18401. "type": "string"
  18402. }
  18403. },
  18404. "required": ["url"],
  18405. "additionalProperties": false
  18406. },
  18407. "title": {
  18408. "type": "string"
  18409. },
  18410. "agent": {
  18411. "type": "string"
  18412. },
  18413. "model": {
  18414. "type": "object",
  18415. "properties": {
  18416. "id": {
  18417. "type": "string"
  18418. },
  18419. "providerID": {
  18420. "type": "string"
  18421. },
  18422. "variant": {
  18423. "type": "string"
  18424. }
  18425. },
  18426. "required": ["id", "providerID"],
  18427. "additionalProperties": false
  18428. },
  18429. "version": {
  18430. "type": "string"
  18431. },
  18432. "metadata": {
  18433. "type": "object"
  18434. },
  18435. "time": {
  18436. "type": "object",
  18437. "properties": {
  18438. "created": {
  18439. "type": "integer",
  18440. "minimum": 0
  18441. },
  18442. "updated": {
  18443. "type": "integer",
  18444. "minimum": 0
  18445. },
  18446. "compacting": {
  18447. "type": "integer",
  18448. "minimum": 0
  18449. },
  18450. "archived": {
  18451. "type": "number"
  18452. }
  18453. },
  18454. "required": ["created", "updated"],
  18455. "additionalProperties": false
  18456. },
  18457. "permission": {
  18458. "$ref": "#/components/schemas/PermissionRuleset"
  18459. },
  18460. "revert": {
  18461. "type": "object",
  18462. "properties": {
  18463. "messageID": {
  18464. "type": "string",
  18465. "pattern": "^msg"
  18466. },
  18467. "partID": {
  18468. "type": "string",
  18469. "pattern": "^prt"
  18470. },
  18471. "snapshot": {
  18472. "type": "string"
  18473. },
  18474. "diff": {
  18475. "type": "string"
  18476. }
  18477. },
  18478. "required": ["messageID"],
  18479. "additionalProperties": false
  18480. },
  18481. "project": {
  18482. "anyOf": [
  18483. {
  18484. "$ref": "#/components/schemas/ProjectSummary"
  18485. },
  18486. {
  18487. "type": "null"
  18488. }
  18489. ]
  18490. }
  18491. },
  18492. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  18493. "additionalProperties": false
  18494. },
  18495. "McpResource": {
  18496. "type": "object",
  18497. "properties": {
  18498. "name": {
  18499. "type": "string"
  18500. },
  18501. "uri": {
  18502. "type": "string"
  18503. },
  18504. "description": {
  18505. "type": "string"
  18506. },
  18507. "mimeType": {
  18508. "type": "string"
  18509. },
  18510. "client": {
  18511. "type": "string"
  18512. }
  18513. },
  18514. "required": ["name", "uri", "client"],
  18515. "additionalProperties": false
  18516. },
  18517. "Symbol": {
  18518. "type": "object",
  18519. "properties": {
  18520. "name": {
  18521. "type": "string"
  18522. },
  18523. "kind": {
  18524. "type": "integer",
  18525. "minimum": 0
  18526. },
  18527. "location": {
  18528. "type": "object",
  18529. "properties": {
  18530. "uri": {
  18531. "type": "string"
  18532. },
  18533. "range": {
  18534. "$ref": "#/components/schemas/Range"
  18535. }
  18536. },
  18537. "required": ["uri", "range"],
  18538. "additionalProperties": false
  18539. }
  18540. },
  18541. "required": ["name", "kind", "location"],
  18542. "additionalProperties": false
  18543. },
  18544. "FileNode": {
  18545. "type": "object",
  18546. "properties": {
  18547. "name": {
  18548. "type": "string"
  18549. },
  18550. "path": {
  18551. "type": "string"
  18552. },
  18553. "absolute": {
  18554. "type": "string"
  18555. },
  18556. "type": {
  18557. "type": "string",
  18558. "enum": ["file", "directory"]
  18559. },
  18560. "ignored": {
  18561. "type": "boolean"
  18562. }
  18563. },
  18564. "required": ["name", "path", "absolute", "type", "ignored"],
  18565. "additionalProperties": false
  18566. },
  18567. "FileContent": {
  18568. "type": "object",
  18569. "properties": {
  18570. "type": {
  18571. "type": "string",
  18572. "enum": ["text", "binary"]
  18573. },
  18574. "content": {
  18575. "type": "string"
  18576. },
  18577. "diff": {
  18578. "type": "string"
  18579. },
  18580. "patch": {
  18581. "type": "object",
  18582. "properties": {
  18583. "oldFileName": {
  18584. "type": "string"
  18585. },
  18586. "newFileName": {
  18587. "type": "string"
  18588. },
  18589. "oldHeader": {
  18590. "type": "string"
  18591. },
  18592. "newHeader": {
  18593. "type": "string"
  18594. },
  18595. "hunks": {
  18596. "type": "array",
  18597. "items": {
  18598. "type": "object",
  18599. "properties": {
  18600. "oldStart": {
  18601. "type": "integer",
  18602. "minimum": 0
  18603. },
  18604. "oldLines": {
  18605. "type": "integer",
  18606. "minimum": 0
  18607. },
  18608. "newStart": {
  18609. "type": "integer",
  18610. "minimum": 0
  18611. },
  18612. "newLines": {
  18613. "type": "integer",
  18614. "minimum": 0
  18615. },
  18616. "lines": {
  18617. "type": "array",
  18618. "items": {
  18619. "type": "string"
  18620. }
  18621. }
  18622. },
  18623. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  18624. "additionalProperties": false
  18625. }
  18626. },
  18627. "index": {
  18628. "type": "string"
  18629. }
  18630. },
  18631. "required": ["oldFileName", "newFileName", "hunks"],
  18632. "additionalProperties": false
  18633. },
  18634. "encoding": {
  18635. "type": "string",
  18636. "enum": ["base64"]
  18637. },
  18638. "mimeType": {
  18639. "type": "string"
  18640. }
  18641. },
  18642. "required": ["type", "content"],
  18643. "additionalProperties": false
  18644. },
  18645. "File": {
  18646. "type": "object",
  18647. "properties": {
  18648. "path": {
  18649. "type": "string"
  18650. },
  18651. "added": {
  18652. "type": "integer",
  18653. "minimum": 0
  18654. },
  18655. "removed": {
  18656. "type": "integer",
  18657. "minimum": 0
  18658. },
  18659. "status": {
  18660. "type": "string",
  18661. "enum": ["added", "deleted", "modified"]
  18662. }
  18663. },
  18664. "required": ["path", "added", "removed", "status"],
  18665. "additionalProperties": false
  18666. },
  18667. "Path": {
  18668. "type": "object",
  18669. "properties": {
  18670. "home": {
  18671. "type": "string"
  18672. },
  18673. "state": {
  18674. "type": "string"
  18675. },
  18676. "config": {
  18677. "type": "string"
  18678. },
  18679. "worktree": {
  18680. "type": "string"
  18681. },
  18682. "directory": {
  18683. "type": "string"
  18684. }
  18685. },
  18686. "required": ["home", "state", "config", "worktree", "directory"],
  18687. "additionalProperties": false
  18688. },
  18689. "VcsInfo": {
  18690. "type": "object",
  18691. "properties": {
  18692. "branch": {
  18693. "type": "string"
  18694. },
  18695. "default_branch": {
  18696. "type": "string"
  18697. }
  18698. },
  18699. "additionalProperties": false
  18700. },
  18701. "VcsFileStatus": {
  18702. "type": "object",
  18703. "properties": {
  18704. "file": {
  18705. "type": "string"
  18706. },
  18707. "additions": {
  18708. "type": "number"
  18709. },
  18710. "deletions": {
  18711. "type": "number"
  18712. },
  18713. "status": {
  18714. "type": "string",
  18715. "enum": ["added", "deleted", "modified"]
  18716. }
  18717. },
  18718. "required": ["file", "additions", "deletions", "status"],
  18719. "additionalProperties": false
  18720. },
  18721. "VcsFileDiff": {
  18722. "type": "object",
  18723. "properties": {
  18724. "file": {
  18725. "type": "string"
  18726. },
  18727. "patch": {
  18728. "type": "string"
  18729. },
  18730. "additions": {
  18731. "type": "number"
  18732. },
  18733. "deletions": {
  18734. "type": "number"
  18735. },
  18736. "status": {
  18737. "type": "string",
  18738. "enum": ["added", "deleted", "modified"]
  18739. }
  18740. },
  18741. "required": ["file", "additions", "deletions"],
  18742. "additionalProperties": false
  18743. },
  18744. "VcsApplyError": {
  18745. "type": "object",
  18746. "properties": {
  18747. "name": {
  18748. "type": "string",
  18749. "enum": ["VcsApplyError"]
  18750. },
  18751. "data": {
  18752. "type": "object",
  18753. "properties": {
  18754. "message": {
  18755. "type": "string"
  18756. },
  18757. "reason": {
  18758. "type": "string",
  18759. "enum": ["non-git", "not-clean"]
  18760. }
  18761. },
  18762. "required": ["message", "reason"],
  18763. "additionalProperties": false
  18764. }
  18765. },
  18766. "required": ["name", "data"],
  18767. "additionalProperties": false
  18768. },
  18769. "Command": {
  18770. "type": "object",
  18771. "properties": {
  18772. "name": {
  18773. "type": "string"
  18774. },
  18775. "description": {
  18776. "type": "string"
  18777. },
  18778. "agent": {
  18779. "type": "string"
  18780. },
  18781. "model": {
  18782. "type": "string"
  18783. },
  18784. "source": {
  18785. "type": "string",
  18786. "enum": ["command", "mcp", "skill"]
  18787. },
  18788. "template": {
  18789. "type": "string"
  18790. },
  18791. "subtask": {
  18792. "type": "boolean"
  18793. },
  18794. "hints": {
  18795. "type": "array",
  18796. "items": {
  18797. "type": "string"
  18798. }
  18799. }
  18800. },
  18801. "required": ["name", "template", "hints"],
  18802. "additionalProperties": false
  18803. },
  18804. "Agent": {
  18805. "type": "object",
  18806. "properties": {
  18807. "name": {
  18808. "type": "string"
  18809. },
  18810. "description": {
  18811. "type": "string"
  18812. },
  18813. "mode": {
  18814. "type": "string",
  18815. "enum": ["subagent", "primary", "all"]
  18816. },
  18817. "native": {
  18818. "type": "boolean"
  18819. },
  18820. "hidden": {
  18821. "type": "boolean"
  18822. },
  18823. "topP": {
  18824. "type": "number"
  18825. },
  18826. "temperature": {
  18827. "type": "number"
  18828. },
  18829. "color": {
  18830. "type": "string"
  18831. },
  18832. "permission": {
  18833. "$ref": "#/components/schemas/PermissionRuleset"
  18834. },
  18835. "model": {
  18836. "type": "object",
  18837. "properties": {
  18838. "modelID": {
  18839. "type": "string"
  18840. },
  18841. "providerID": {
  18842. "type": "string"
  18843. }
  18844. },
  18845. "required": ["modelID", "providerID"],
  18846. "additionalProperties": false
  18847. },
  18848. "variant": {
  18849. "type": "string"
  18850. },
  18851. "prompt": {
  18852. "type": "string"
  18853. },
  18854. "options": {
  18855. "type": "object"
  18856. },
  18857. "steps": {
  18858. "type": "number"
  18859. }
  18860. },
  18861. "required": ["name", "mode", "permission", "options"],
  18862. "additionalProperties": false
  18863. },
  18864. "LSPStatus": {
  18865. "type": "object",
  18866. "properties": {
  18867. "id": {
  18868. "type": "string"
  18869. },
  18870. "name": {
  18871. "type": "string"
  18872. },
  18873. "root": {
  18874. "type": "string"
  18875. },
  18876. "status": {
  18877. "type": "string",
  18878. "enum": ["connected", "error"]
  18879. }
  18880. },
  18881. "required": ["id", "name", "root", "status"],
  18882. "additionalProperties": false
  18883. },
  18884. "FormatterStatus": {
  18885. "type": "object",
  18886. "properties": {
  18887. "name": {
  18888. "type": "string"
  18889. },
  18890. "extensions": {
  18891. "type": "array",
  18892. "items": {
  18893. "type": "string"
  18894. }
  18895. },
  18896. "enabled": {
  18897. "type": "boolean"
  18898. }
  18899. },
  18900. "required": ["name", "extensions", "enabled"],
  18901. "additionalProperties": false
  18902. },
  18903. "MCPStatusConnected": {
  18904. "type": "object",
  18905. "properties": {
  18906. "status": {
  18907. "type": "string",
  18908. "enum": ["connected"]
  18909. }
  18910. },
  18911. "required": ["status"],
  18912. "additionalProperties": false
  18913. },
  18914. "MCPStatusDisabled": {
  18915. "type": "object",
  18916. "properties": {
  18917. "status": {
  18918. "type": "string",
  18919. "enum": ["disabled"]
  18920. }
  18921. },
  18922. "required": ["status"],
  18923. "additionalProperties": false
  18924. },
  18925. "MCPStatusFailed": {
  18926. "type": "object",
  18927. "properties": {
  18928. "status": {
  18929. "type": "string",
  18930. "enum": ["failed"]
  18931. },
  18932. "error": {
  18933. "type": "string"
  18934. }
  18935. },
  18936. "required": ["status", "error"],
  18937. "additionalProperties": false
  18938. },
  18939. "MCPStatusNeedsAuth": {
  18940. "type": "object",
  18941. "properties": {
  18942. "status": {
  18943. "type": "string",
  18944. "enum": ["needs_auth"]
  18945. }
  18946. },
  18947. "required": ["status"],
  18948. "additionalProperties": false
  18949. },
  18950. "MCPStatusNeedsClientRegistration": {
  18951. "type": "object",
  18952. "properties": {
  18953. "status": {
  18954. "type": "string",
  18955. "enum": ["needs_client_registration"]
  18956. },
  18957. "error": {
  18958. "type": "string"
  18959. }
  18960. },
  18961. "required": ["status", "error"],
  18962. "additionalProperties": false
  18963. },
  18964. "MCPStatus": {
  18965. "anyOf": [
  18966. {
  18967. "$ref": "#/components/schemas/MCPStatusConnected"
  18968. },
  18969. {
  18970. "$ref": "#/components/schemas/MCPStatusDisabled"
  18971. },
  18972. {
  18973. "$ref": "#/components/schemas/MCPStatusFailed"
  18974. },
  18975. {
  18976. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  18977. },
  18978. {
  18979. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  18980. }
  18981. ]
  18982. },
  18983. "McpUnsupportedOAuthError": {
  18984. "type": "object",
  18985. "properties": {
  18986. "error": {
  18987. "type": "string"
  18988. }
  18989. },
  18990. "required": ["error"],
  18991. "additionalProperties": false
  18992. },
  18993. "McpServerNotFoundError": {
  18994. "type": "object",
  18995. "properties": {
  18996. "_tag": {
  18997. "type": "string",
  18998. "enum": ["McpServerNotFoundError"]
  18999. },
  19000. "name": {
  19001. "type": "string"
  19002. },
  19003. "message": {
  19004. "type": "string"
  19005. }
  19006. },
  19007. "required": ["_tag", "name", "message"],
  19008. "additionalProperties": false
  19009. },
  19010. "Project": {
  19011. "type": "object",
  19012. "properties": {
  19013. "id": {
  19014. "type": "string"
  19015. },
  19016. "worktree": {
  19017. "type": "string"
  19018. },
  19019. "vcs": {
  19020. "type": "string",
  19021. "enum": ["git"]
  19022. },
  19023. "name": {
  19024. "type": "string"
  19025. },
  19026. "icon": {
  19027. "type": "object",
  19028. "properties": {
  19029. "url": {
  19030. "type": "string"
  19031. },
  19032. "override": {
  19033. "type": "string"
  19034. },
  19035. "color": {
  19036. "type": "string"
  19037. }
  19038. },
  19039. "additionalProperties": false
  19040. },
  19041. "commands": {
  19042. "type": "object",
  19043. "properties": {
  19044. "start": {
  19045. "type": "string",
  19046. "description": "Startup script to run when creating a new workspace (worktree)"
  19047. }
  19048. },
  19049. "additionalProperties": false
  19050. },
  19051. "time": {
  19052. "type": "object",
  19053. "properties": {
  19054. "created": {
  19055. "type": "integer",
  19056. "minimum": 0
  19057. },
  19058. "updated": {
  19059. "type": "integer",
  19060. "minimum": 0
  19061. },
  19062. "initialized": {
  19063. "type": "integer",
  19064. "minimum": 0
  19065. }
  19066. },
  19067. "required": ["created", "updated"],
  19068. "additionalProperties": false
  19069. },
  19070. "sandboxes": {
  19071. "type": "array",
  19072. "items": {
  19073. "type": "string"
  19074. }
  19075. }
  19076. },
  19077. "required": ["id", "worktree", "time", "sandboxes"],
  19078. "additionalProperties": false
  19079. },
  19080. "ProjectNotFoundError": {
  19081. "type": "object",
  19082. "properties": {
  19083. "_tag": {
  19084. "type": "string",
  19085. "enum": ["ProjectNotFoundError"]
  19086. },
  19087. "projectID": {
  19088. "type": "string"
  19089. },
  19090. "message": {
  19091. "type": "string"
  19092. }
  19093. },
  19094. "required": ["_tag", "projectID", "message"],
  19095. "additionalProperties": false
  19096. },
  19097. "PtyNotFoundError": {
  19098. "type": "object",
  19099. "properties": {
  19100. "_tag": {
  19101. "type": "string",
  19102. "enum": ["PtyNotFoundError"]
  19103. },
  19104. "ptyID": {
  19105. "type": "string"
  19106. },
  19107. "message": {
  19108. "type": "string"
  19109. }
  19110. },
  19111. "required": ["_tag", "ptyID", "message"],
  19112. "additionalProperties": false
  19113. },
  19114. "PtyForbiddenError": {
  19115. "type": "object",
  19116. "properties": {
  19117. "_tag": {
  19118. "type": "string",
  19119. "enum": ["PtyForbiddenError"]
  19120. },
  19121. "message": {
  19122. "type": "string"
  19123. }
  19124. },
  19125. "required": ["_tag", "message"],
  19126. "additionalProperties": false
  19127. },
  19128. "QuestionRequest": {
  19129. "type": "object",
  19130. "properties": {
  19131. "id": {
  19132. "type": "string",
  19133. "pattern": "^que"
  19134. },
  19135. "sessionID": {
  19136. "type": "string",
  19137. "pattern": "^ses"
  19138. },
  19139. "questions": {
  19140. "type": "array",
  19141. "items": {
  19142. "$ref": "#/components/schemas/QuestionInfo"
  19143. },
  19144. "description": "Questions to ask"
  19145. },
  19146. "tool": {
  19147. "$ref": "#/components/schemas/QuestionTool"
  19148. }
  19149. },
  19150. "required": ["id", "sessionID", "questions"],
  19151. "additionalProperties": false
  19152. },
  19153. "QuestionNotFoundError": {
  19154. "type": "object",
  19155. "properties": {
  19156. "_tag": {
  19157. "type": "string",
  19158. "enum": ["QuestionNotFoundError"]
  19159. },
  19160. "requestID": {
  19161. "type": "string"
  19162. },
  19163. "message": {
  19164. "type": "string"
  19165. }
  19166. },
  19167. "required": ["_tag", "requestID", "message"],
  19168. "additionalProperties": false
  19169. },
  19170. "PermissionRequest": {
  19171. "type": "object",
  19172. "properties": {
  19173. "id": {
  19174. "type": "string",
  19175. "pattern": "^per"
  19176. },
  19177. "sessionID": {
  19178. "type": "string",
  19179. "pattern": "^ses"
  19180. },
  19181. "permission": {
  19182. "type": "string"
  19183. },
  19184. "patterns": {
  19185. "type": "array",
  19186. "items": {
  19187. "type": "string"
  19188. }
  19189. },
  19190. "metadata": {
  19191. "type": "object"
  19192. },
  19193. "always": {
  19194. "type": "array",
  19195. "items": {
  19196. "type": "string"
  19197. }
  19198. },
  19199. "tool": {
  19200. "type": "object",
  19201. "properties": {
  19202. "messageID": {
  19203. "type": "string"
  19204. },
  19205. "callID": {
  19206. "type": "string"
  19207. }
  19208. },
  19209. "required": ["messageID", "callID"],
  19210. "additionalProperties": false
  19211. }
  19212. },
  19213. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19214. "additionalProperties": false
  19215. },
  19216. "PermissionNotFoundError": {
  19217. "type": "object",
  19218. "properties": {
  19219. "_tag": {
  19220. "type": "string",
  19221. "enum": ["PermissionNotFoundError"]
  19222. },
  19223. "requestID": {
  19224. "type": "string"
  19225. },
  19226. "message": {
  19227. "type": "string"
  19228. }
  19229. },
  19230. "required": ["_tag", "requestID", "message"],
  19231. "additionalProperties": false
  19232. },
  19233. "ProviderAuthMethod": {
  19234. "type": "object",
  19235. "properties": {
  19236. "type": {
  19237. "type": "string",
  19238. "enum": ["oauth", "api"]
  19239. },
  19240. "label": {
  19241. "type": "string"
  19242. },
  19243. "prompts": {
  19244. "type": "array",
  19245. "items": {
  19246. "anyOf": [
  19247. {
  19248. "type": "object",
  19249. "properties": {
  19250. "type": {
  19251. "type": "string",
  19252. "enum": ["text"]
  19253. },
  19254. "key": {
  19255. "type": "string"
  19256. },
  19257. "message": {
  19258. "type": "string"
  19259. },
  19260. "placeholder": {
  19261. "type": "string"
  19262. },
  19263. "when": {
  19264. "type": "object",
  19265. "properties": {
  19266. "key": {
  19267. "type": "string"
  19268. },
  19269. "op": {
  19270. "type": "string",
  19271. "enum": ["eq", "neq"]
  19272. },
  19273. "value": {
  19274. "type": "string"
  19275. }
  19276. },
  19277. "required": ["key", "op", "value"],
  19278. "additionalProperties": false
  19279. }
  19280. },
  19281. "required": ["type", "key", "message"],
  19282. "additionalProperties": false
  19283. },
  19284. {
  19285. "type": "object",
  19286. "properties": {
  19287. "type": {
  19288. "type": "string",
  19289. "enum": ["select"]
  19290. },
  19291. "key": {
  19292. "type": "string"
  19293. },
  19294. "message": {
  19295. "type": "string"
  19296. },
  19297. "options": {
  19298. "type": "array",
  19299. "items": {
  19300. "type": "object",
  19301. "properties": {
  19302. "label": {
  19303. "type": "string"
  19304. },
  19305. "value": {
  19306. "type": "string"
  19307. },
  19308. "hint": {
  19309. "type": "string"
  19310. }
  19311. },
  19312. "required": ["label", "value"],
  19313. "additionalProperties": false
  19314. }
  19315. },
  19316. "when": {
  19317. "type": "object",
  19318. "properties": {
  19319. "key": {
  19320. "type": "string"
  19321. },
  19322. "op": {
  19323. "type": "string",
  19324. "enum": ["eq", "neq"]
  19325. },
  19326. "value": {
  19327. "type": "string"
  19328. }
  19329. },
  19330. "required": ["key", "op", "value"],
  19331. "additionalProperties": false
  19332. }
  19333. },
  19334. "required": ["type", "key", "message", "options"],
  19335. "additionalProperties": false
  19336. }
  19337. ]
  19338. }
  19339. }
  19340. },
  19341. "required": ["type", "label"],
  19342. "additionalProperties": false
  19343. },
  19344. "ProviderAuthAuthorization": {
  19345. "type": "object",
  19346. "properties": {
  19347. "url": {
  19348. "type": "string"
  19349. },
  19350. "method": {
  19351. "type": "string",
  19352. "enum": ["auto", "code"]
  19353. },
  19354. "instructions": {
  19355. "type": "string"
  19356. }
  19357. },
  19358. "required": ["url", "method", "instructions"],
  19359. "additionalProperties": false
  19360. },
  19361. "ProviderAuthError1": {
  19362. "type": "object",
  19363. "properties": {
  19364. "name": {
  19365. "type": "string",
  19366. "enum": [
  19367. "BadRequest",
  19368. "ProviderAuthOauthMissing",
  19369. "ProviderAuthOauthCodeMissing",
  19370. "ProviderAuthOauthCallbackFailed",
  19371. "ProviderAuthValidationFailed"
  19372. ]
  19373. },
  19374. "data": {
  19375. "type": "object",
  19376. "properties": {
  19377. "providerID": {
  19378. "type": "string"
  19379. },
  19380. "field": {
  19381. "type": "string"
  19382. },
  19383. "message": {
  19384. "type": "string"
  19385. },
  19386. "kind": {
  19387. "type": "string"
  19388. }
  19389. },
  19390. "additionalProperties": false
  19391. }
  19392. },
  19393. "required": ["name", "data"],
  19394. "additionalProperties": false
  19395. },
  19396. "NotFoundError": {
  19397. "type": "object",
  19398. "required": ["name", "data"],
  19399. "properties": {
  19400. "name": {
  19401. "type": "string",
  19402. "enum": ["NotFoundError"]
  19403. },
  19404. "data": {
  19405. "type": "object",
  19406. "required": ["message"],
  19407. "properties": {
  19408. "message": {
  19409. "type": "string"
  19410. }
  19411. }
  19412. }
  19413. }
  19414. },
  19415. "TextPartInput": {
  19416. "type": "object",
  19417. "properties": {
  19418. "id": {
  19419. "type": "string",
  19420. "pattern": "^prt"
  19421. },
  19422. "type": {
  19423. "type": "string",
  19424. "enum": ["text"]
  19425. },
  19426. "text": {
  19427. "type": "string"
  19428. },
  19429. "synthetic": {
  19430. "type": "boolean"
  19431. },
  19432. "ignored": {
  19433. "type": "boolean"
  19434. },
  19435. "time": {
  19436. "type": "object",
  19437. "properties": {
  19438. "start": {
  19439. "type": "integer",
  19440. "minimum": 0
  19441. },
  19442. "end": {
  19443. "type": "integer",
  19444. "minimum": 0
  19445. }
  19446. },
  19447. "required": ["start"],
  19448. "additionalProperties": false
  19449. },
  19450. "metadata": {
  19451. "type": "object"
  19452. }
  19453. },
  19454. "required": ["type", "text"],
  19455. "additionalProperties": false
  19456. },
  19457. "FilePartInput": {
  19458. "type": "object",
  19459. "properties": {
  19460. "id": {
  19461. "type": "string",
  19462. "pattern": "^prt"
  19463. },
  19464. "type": {
  19465. "type": "string",
  19466. "enum": ["file"]
  19467. },
  19468. "mime": {
  19469. "type": "string"
  19470. },
  19471. "filename": {
  19472. "type": "string"
  19473. },
  19474. "url": {
  19475. "type": "string"
  19476. },
  19477. "source": {
  19478. "$ref": "#/components/schemas/FilePartSource"
  19479. }
  19480. },
  19481. "required": ["type", "mime", "url"],
  19482. "additionalProperties": false
  19483. },
  19484. "AgentPartInput": {
  19485. "type": "object",
  19486. "properties": {
  19487. "id": {
  19488. "type": "string",
  19489. "pattern": "^prt"
  19490. },
  19491. "type": {
  19492. "type": "string",
  19493. "enum": ["agent"]
  19494. },
  19495. "name": {
  19496. "type": "string"
  19497. },
  19498. "source": {
  19499. "type": "object",
  19500. "properties": {
  19501. "value": {
  19502. "type": "string"
  19503. },
  19504. "start": {
  19505. "type": "integer",
  19506. "minimum": 0
  19507. },
  19508. "end": {
  19509. "type": "integer",
  19510. "minimum": 0
  19511. }
  19512. },
  19513. "required": ["value", "start", "end"],
  19514. "additionalProperties": false
  19515. }
  19516. },
  19517. "required": ["type", "name"],
  19518. "additionalProperties": false
  19519. },
  19520. "SubtaskPartInput": {
  19521. "type": "object",
  19522. "properties": {
  19523. "id": {
  19524. "type": "string",
  19525. "pattern": "^prt"
  19526. },
  19527. "type": {
  19528. "type": "string",
  19529. "enum": ["subtask"]
  19530. },
  19531. "prompt": {
  19532. "type": "string"
  19533. },
  19534. "description": {
  19535. "type": "string"
  19536. },
  19537. "agent": {
  19538. "type": "string"
  19539. },
  19540. "model": {
  19541. "type": "object",
  19542. "properties": {
  19543. "providerID": {
  19544. "type": "string"
  19545. },
  19546. "modelID": {
  19547. "type": "string"
  19548. }
  19549. },
  19550. "required": ["providerID", "modelID"],
  19551. "additionalProperties": false
  19552. },
  19553. "command": {
  19554. "type": "string"
  19555. }
  19556. },
  19557. "required": ["type", "prompt", "description", "agent"],
  19558. "additionalProperties": false
  19559. },
  19560. "SessionBusyError": {
  19561. "type": "object",
  19562. "properties": {
  19563. "_tag": {
  19564. "type": "string",
  19565. "enum": ["SessionBusyError"]
  19566. },
  19567. "sessionID": {
  19568. "type": "string"
  19569. },
  19570. "message": {
  19571. "type": "string"
  19572. }
  19573. },
  19574. "required": ["_tag", "sessionID", "message"],
  19575. "additionalProperties": false
  19576. },
  19577. "EventTuiPromptAppend": {
  19578. "type": "object",
  19579. "properties": {
  19580. "type": {
  19581. "type": "string",
  19582. "enum": ["tui.prompt.append"]
  19583. },
  19584. "properties": {
  19585. "type": "object",
  19586. "properties": {
  19587. "text": {
  19588. "type": "string"
  19589. }
  19590. },
  19591. "required": ["text"],
  19592. "additionalProperties": false
  19593. }
  19594. },
  19595. "required": ["type", "properties"],
  19596. "additionalProperties": false
  19597. },
  19598. "EventTuiCommandExecute": {
  19599. "type": "object",
  19600. "properties": {
  19601. "type": {
  19602. "type": "string",
  19603. "enum": ["tui.command.execute"]
  19604. },
  19605. "properties": {
  19606. "type": "object",
  19607. "properties": {
  19608. "command": {
  19609. "anyOf": [
  19610. {
  19611. "type": "string",
  19612. "enum": [
  19613. "session.list",
  19614. "session.new",
  19615. "session.share",
  19616. "session.interrupt",
  19617. "session.compact",
  19618. "session.page.up",
  19619. "session.page.down",
  19620. "session.line.up",
  19621. "session.line.down",
  19622. "session.half.page.up",
  19623. "session.half.page.down",
  19624. "session.first",
  19625. "session.last",
  19626. "prompt.clear",
  19627. "prompt.submit",
  19628. "agent.cycle"
  19629. ]
  19630. },
  19631. {
  19632. "type": "string"
  19633. }
  19634. ]
  19635. }
  19636. },
  19637. "required": ["command"],
  19638. "additionalProperties": false
  19639. }
  19640. },
  19641. "required": ["type", "properties"],
  19642. "additionalProperties": false
  19643. },
  19644. "EventTuiToastShow": {
  19645. "type": "object",
  19646. "properties": {
  19647. "type": {
  19648. "type": "string",
  19649. "enum": ["tui.toast.show"]
  19650. },
  19651. "properties": {
  19652. "type": "object",
  19653. "properties": {
  19654. "title": {
  19655. "type": "string"
  19656. },
  19657. "message": {
  19658. "type": "string"
  19659. },
  19660. "variant": {
  19661. "type": "string",
  19662. "enum": ["info", "success", "warning", "error"]
  19663. },
  19664. "duration": {
  19665. "type": "integer",
  19666. "exclusiveMinimum": 0
  19667. }
  19668. },
  19669. "required": ["message", "variant"],
  19670. "additionalProperties": false
  19671. }
  19672. },
  19673. "required": ["type", "properties"],
  19674. "additionalProperties": false
  19675. },
  19676. "EventTuiSessionSelect": {
  19677. "type": "object",
  19678. "properties": {
  19679. "type": {
  19680. "type": "string",
  19681. "enum": ["tui.session.select"]
  19682. },
  19683. "properties": {
  19684. "type": "object",
  19685. "properties": {
  19686. "sessionID": {
  19687. "type": "string",
  19688. "pattern": "^ses",
  19689. "description": "Session ID to navigate to"
  19690. }
  19691. },
  19692. "required": ["sessionID"],
  19693. "additionalProperties": false
  19694. }
  19695. },
  19696. "required": ["type", "properties"],
  19697. "additionalProperties": false
  19698. },
  19699. "Workspace": {
  19700. "type": "object",
  19701. "properties": {
  19702. "id": {
  19703. "type": "string",
  19704. "pattern": "^wrk"
  19705. },
  19706. "type": {
  19707. "type": "string"
  19708. },
  19709. "name": {
  19710. "type": "string"
  19711. },
  19712. "branch": {
  19713. "anyOf": [
  19714. {
  19715. "type": "string"
  19716. },
  19717. {
  19718. "type": "null"
  19719. }
  19720. ]
  19721. },
  19722. "directory": {
  19723. "anyOf": [
  19724. {
  19725. "type": "string"
  19726. },
  19727. {
  19728. "type": "null"
  19729. }
  19730. ]
  19731. },
  19732. "extra": {
  19733. "anyOf": [
  19734. {},
  19735. {
  19736. "type": "null"
  19737. }
  19738. ]
  19739. },
  19740. "projectID": {
  19741. "type": "string"
  19742. },
  19743. "timeUsed": {
  19744. "anyOf": [
  19745. {
  19746. "type": "number"
  19747. },
  19748. {
  19749. "type": "string",
  19750. "enum": ["NaN"]
  19751. },
  19752. {
  19753. "type": "string",
  19754. "enum": ["Infinity"]
  19755. },
  19756. {
  19757. "type": "string",
  19758. "enum": ["-Infinity"]
  19759. },
  19760. {
  19761. "type": "string",
  19762. "enum": ["Infinity", "-Infinity", "NaN"]
  19763. }
  19764. ]
  19765. }
  19766. },
  19767. "required": ["id", "type", "name", "projectID", "timeUsed"],
  19768. "additionalProperties": false
  19769. },
  19770. "WorkspaceCreateError": {
  19771. "type": "object",
  19772. "properties": {
  19773. "name": {
  19774. "type": "string",
  19775. "enum": ["WorkspaceCreateError"]
  19776. },
  19777. "data": {
  19778. "type": "object",
  19779. "properties": {
  19780. "message": {
  19781. "type": "string"
  19782. }
  19783. },
  19784. "required": ["message"],
  19785. "additionalProperties": false
  19786. }
  19787. },
  19788. "required": ["name", "data"],
  19789. "additionalProperties": false
  19790. },
  19791. "WorkspaceWarpError": {
  19792. "type": "object",
  19793. "properties": {
  19794. "name": {
  19795. "type": "string",
  19796. "enum": ["WorkspaceWarpError"]
  19797. },
  19798. "data": {
  19799. "type": "object",
  19800. "properties": {
  19801. "message": {
  19802. "type": "string"
  19803. }
  19804. },
  19805. "required": ["message"],
  19806. "additionalProperties": false
  19807. }
  19808. },
  19809. "required": ["name", "data"],
  19810. "additionalProperties": false
  19811. },
  19812. "UnauthorizedError": {
  19813. "type": "object",
  19814. "properties": {
  19815. "_tag": {
  19816. "type": "string",
  19817. "enum": ["UnauthorizedError"]
  19818. },
  19819. "message": {
  19820. "type": "string"
  19821. }
  19822. },
  19823. "required": ["_tag", "message"],
  19824. "additionalProperties": false
  19825. },
  19826. "V2SessionsResponse": {
  19827. "type": "object",
  19828. "properties": {
  19829. "data": {
  19830. "type": "array",
  19831. "items": {
  19832. "$ref": "#/components/schemas/SessionV2Info"
  19833. }
  19834. },
  19835. "cursor": {
  19836. "type": "object",
  19837. "properties": {
  19838. "previous": {
  19839. "type": "string"
  19840. },
  19841. "next": {
  19842. "type": "string"
  19843. }
  19844. },
  19845. "additionalProperties": false
  19846. }
  19847. },
  19848. "required": ["data", "cursor"],
  19849. "additionalProperties": false
  19850. },
  19851. "InvalidCursorError": {
  19852. "type": "object",
  19853. "properties": {
  19854. "_tag": {
  19855. "type": "string",
  19856. "enum": ["InvalidCursorError"]
  19857. },
  19858. "message": {
  19859. "type": "string"
  19860. }
  19861. },
  19862. "required": ["_tag", "message"],
  19863. "additionalProperties": false
  19864. },
  19865. "ConflictError": {
  19866. "type": "object",
  19867. "properties": {
  19868. "_tag": {
  19869. "type": "string",
  19870. "enum": ["ConflictError"]
  19871. },
  19872. "message": {
  19873. "type": "string"
  19874. },
  19875. "resource": {
  19876. "type": "string"
  19877. }
  19878. },
  19879. "required": ["_tag", "message"],
  19880. "additionalProperties": false
  19881. },
  19882. "SessionNotFoundError": {
  19883. "type": "object",
  19884. "properties": {
  19885. "_tag": {
  19886. "type": "string",
  19887. "enum": ["SessionNotFoundError"]
  19888. },
  19889. "sessionID": {
  19890. "type": "string"
  19891. },
  19892. "message": {
  19893. "type": "string"
  19894. }
  19895. },
  19896. "required": ["_tag", "sessionID", "message"],
  19897. "additionalProperties": false
  19898. },
  19899. "ServiceUnavailableError": {
  19900. "type": "object",
  19901. "properties": {
  19902. "_tag": {
  19903. "type": "string",
  19904. "enum": ["ServiceUnavailableError"]
  19905. },
  19906. "message": {
  19907. "type": "string"
  19908. },
  19909. "service": {
  19910. "type": "string"
  19911. }
  19912. },
  19913. "required": ["_tag", "message"],
  19914. "additionalProperties": false
  19915. },
  19916. "UnknownError1": {
  19917. "type": "object",
  19918. "properties": {
  19919. "_tag": {
  19920. "type": "string",
  19921. "enum": ["UnknownError"]
  19922. },
  19923. "message": {
  19924. "type": "string"
  19925. },
  19926. "ref": {
  19927. "type": "string"
  19928. }
  19929. },
  19930. "required": ["_tag", "message"],
  19931. "additionalProperties": false
  19932. },
  19933. "V2SessionMessagesResponse": {
  19934. "type": "object",
  19935. "properties": {
  19936. "data": {
  19937. "type": "array",
  19938. "items": {
  19939. "$ref": "#/components/schemas/SessionMessage"
  19940. }
  19941. },
  19942. "cursor": {
  19943. "type": "object",
  19944. "properties": {
  19945. "previous": {
  19946. "type": "string"
  19947. },
  19948. "next": {
  19949. "type": "string"
  19950. }
  19951. },
  19952. "additionalProperties": false
  19953. }
  19954. },
  19955. "required": ["data", "cursor"],
  19956. "additionalProperties": false
  19957. },
  19958. "ProviderNotFoundError": {
  19959. "type": "object",
  19960. "properties": {
  19961. "_tag": {
  19962. "type": "string",
  19963. "enum": ["ProviderNotFoundError"]
  19964. },
  19965. "providerID": {
  19966. "type": "string"
  19967. },
  19968. "message": {
  19969. "type": "string"
  19970. }
  19971. },
  19972. "required": ["_tag", "providerID", "message"],
  19973. "additionalProperties": false
  19974. },
  19975. "effect_HttpApiError_Forbidden": {
  19976. "type": "object",
  19977. "properties": {
  19978. "_tag": {
  19979. "type": "string",
  19980. "enum": ["Forbidden"]
  19981. }
  19982. },
  19983. "required": ["_tag"],
  19984. "additionalProperties": false
  19985. },
  19986. "Event.tui.prompt.append": {
  19987. "type": "object",
  19988. "properties": {
  19989. "id": {
  19990. "type": "string"
  19991. },
  19992. "type": {
  19993. "type": "string",
  19994. "enum": ["tui.prompt.append"]
  19995. },
  19996. "properties": {
  19997. "type": "object",
  19998. "properties": {
  19999. "text": {
  20000. "type": "string"
  20001. }
  20002. },
  20003. "required": ["text"],
  20004. "additionalProperties": false
  20005. }
  20006. },
  20007. "required": ["id", "type", "properties"],
  20008. "additionalProperties": false
  20009. },
  20010. "Event.tui.command.execute": {
  20011. "type": "object",
  20012. "properties": {
  20013. "id": {
  20014. "type": "string"
  20015. },
  20016. "type": {
  20017. "type": "string",
  20018. "enum": ["tui.command.execute"]
  20019. },
  20020. "properties": {
  20021. "type": "object",
  20022. "properties": {
  20023. "command": {
  20024. "anyOf": [
  20025. {
  20026. "type": "string",
  20027. "enum": [
  20028. "session.list",
  20029. "session.new",
  20030. "session.share",
  20031. "session.interrupt",
  20032. "session.compact",
  20033. "session.page.up",
  20034. "session.page.down",
  20035. "session.line.up",
  20036. "session.line.down",
  20037. "session.half.page.up",
  20038. "session.half.page.down",
  20039. "session.first",
  20040. "session.last",
  20041. "prompt.clear",
  20042. "prompt.submit",
  20043. "agent.cycle"
  20044. ]
  20045. },
  20046. {
  20047. "type": "string"
  20048. }
  20049. ]
  20050. }
  20051. },
  20052. "required": ["command"],
  20053. "additionalProperties": false
  20054. }
  20055. },
  20056. "required": ["id", "type", "properties"],
  20057. "additionalProperties": false
  20058. },
  20059. "Event.tui.toast.show": {
  20060. "type": "object",
  20061. "properties": {
  20062. "id": {
  20063. "type": "string"
  20064. },
  20065. "type": {
  20066. "type": "string",
  20067. "enum": ["tui.toast.show"]
  20068. },
  20069. "properties": {
  20070. "type": "object",
  20071. "properties": {
  20072. "title": {
  20073. "type": "string"
  20074. },
  20075. "message": {
  20076. "type": "string"
  20077. },
  20078. "variant": {
  20079. "type": "string",
  20080. "enum": ["info", "success", "warning", "error"]
  20081. },
  20082. "duration": {
  20083. "type": "integer",
  20084. "exclusiveMinimum": 0
  20085. }
  20086. },
  20087. "required": ["message", "variant"],
  20088. "additionalProperties": false
  20089. }
  20090. },
  20091. "required": ["id", "type", "properties"],
  20092. "additionalProperties": false
  20093. },
  20094. "Event.tui.session.select": {
  20095. "type": "object",
  20096. "properties": {
  20097. "id": {
  20098. "type": "string"
  20099. },
  20100. "type": {
  20101. "type": "string",
  20102. "enum": ["tui.session.select"]
  20103. },
  20104. "properties": {
  20105. "type": "object",
  20106. "properties": {
  20107. "sessionID": {
  20108. "type": "string",
  20109. "pattern": "^ses",
  20110. "description": "Session ID to navigate to"
  20111. }
  20112. },
  20113. "required": ["sessionID"],
  20114. "additionalProperties": false
  20115. }
  20116. },
  20117. "required": ["id", "type", "properties"],
  20118. "additionalProperties": false
  20119. },
  20120. "ModelV2Info": {
  20121. "type": "object",
  20122. "properties": {
  20123. "id": {
  20124. "type": "string"
  20125. },
  20126. "providerID": {
  20127. "type": "string"
  20128. },
  20129. "family": {
  20130. "type": "string"
  20131. },
  20132. "name": {
  20133. "type": "string"
  20134. },
  20135. "api": {
  20136. "anyOf": [
  20137. {
  20138. "type": "object",
  20139. "properties": {
  20140. "id": {
  20141. "type": "string"
  20142. },
  20143. "type": {
  20144. "type": "string",
  20145. "enum": ["aisdk"]
  20146. },
  20147. "package": {
  20148. "type": "string"
  20149. },
  20150. "url": {
  20151. "type": "string"
  20152. },
  20153. "settings": {
  20154. "type": "object"
  20155. }
  20156. },
  20157. "required": ["id", "type", "package"],
  20158. "additionalProperties": false
  20159. },
  20160. {
  20161. "type": "object",
  20162. "properties": {
  20163. "id": {
  20164. "type": "string"
  20165. },
  20166. "type": {
  20167. "type": "string",
  20168. "enum": ["native"]
  20169. },
  20170. "url": {
  20171. "type": "string"
  20172. },
  20173. "settings": {
  20174. "type": "object"
  20175. }
  20176. },
  20177. "required": ["id", "type", "settings"],
  20178. "additionalProperties": false
  20179. }
  20180. ]
  20181. },
  20182. "capabilities": {
  20183. "type": "object",
  20184. "properties": {
  20185. "tools": {
  20186. "type": "boolean"
  20187. },
  20188. "input": {
  20189. "type": "array",
  20190. "items": {
  20191. "type": "string"
  20192. }
  20193. },
  20194. "output": {
  20195. "type": "array",
  20196. "items": {
  20197. "type": "string"
  20198. }
  20199. }
  20200. },
  20201. "required": ["tools", "input", "output"],
  20202. "additionalProperties": false
  20203. },
  20204. "request": {
  20205. "type": "object",
  20206. "properties": {
  20207. "headers": {
  20208. "type": "object",
  20209. "additionalProperties": {
  20210. "type": "string"
  20211. }
  20212. },
  20213. "body": {
  20214. "type": "object"
  20215. },
  20216. "variant": {
  20217. "type": "string"
  20218. }
  20219. },
  20220. "required": ["headers", "body"],
  20221. "additionalProperties": false
  20222. },
  20223. "variants": {
  20224. "type": "array",
  20225. "items": {
  20226. "type": "object",
  20227. "properties": {
  20228. "id": {
  20229. "type": "string"
  20230. },
  20231. "headers": {
  20232. "type": "object",
  20233. "additionalProperties": {
  20234. "type": "string"
  20235. }
  20236. },
  20237. "body": {
  20238. "type": "object"
  20239. }
  20240. },
  20241. "required": ["id", "headers", "body"],
  20242. "additionalProperties": false
  20243. }
  20244. },
  20245. "time": {
  20246. "type": "object",
  20247. "properties": {
  20248. "released": {
  20249. "anyOf": [
  20250. {
  20251. "type": "number"
  20252. },
  20253. {
  20254. "type": "string",
  20255. "enum": ["NaN"]
  20256. },
  20257. {
  20258. "type": "string",
  20259. "enum": ["Infinity"]
  20260. },
  20261. {
  20262. "type": "string",
  20263. "enum": ["-Infinity"]
  20264. },
  20265. {
  20266. "type": "string",
  20267. "enum": ["Infinity", "-Infinity", "NaN"]
  20268. }
  20269. ]
  20270. }
  20271. },
  20272. "required": ["released"],
  20273. "additionalProperties": false
  20274. },
  20275. "cost": {
  20276. "type": "array",
  20277. "items": {
  20278. "type": "object",
  20279. "properties": {
  20280. "tier": {
  20281. "type": "object",
  20282. "properties": {
  20283. "type": {
  20284. "type": "string",
  20285. "enum": ["context"]
  20286. },
  20287. "size": {
  20288. "type": "integer"
  20289. }
  20290. },
  20291. "required": ["type", "size"],
  20292. "additionalProperties": false
  20293. },
  20294. "input": {
  20295. "type": "number"
  20296. },
  20297. "output": {
  20298. "type": "number"
  20299. },
  20300. "cache": {
  20301. "type": "object",
  20302. "properties": {
  20303. "read": {
  20304. "type": "number"
  20305. },
  20306. "write": {
  20307. "type": "number"
  20308. }
  20309. },
  20310. "required": ["read", "write"],
  20311. "additionalProperties": false
  20312. }
  20313. },
  20314. "required": ["input", "output", "cache"],
  20315. "additionalProperties": false
  20316. }
  20317. },
  20318. "status": {
  20319. "type": "string",
  20320. "enum": ["alpha", "beta", "deprecated", "active"]
  20321. },
  20322. "enabled": {
  20323. "type": "boolean"
  20324. },
  20325. "limit": {
  20326. "type": "object",
  20327. "properties": {
  20328. "context": {
  20329. "type": "integer"
  20330. },
  20331. "input": {
  20332. "type": "integer"
  20333. },
  20334. "output": {
  20335. "type": "integer"
  20336. }
  20337. },
  20338. "required": ["context", "output"],
  20339. "additionalProperties": false
  20340. }
  20341. },
  20342. "required": [
  20343. "id",
  20344. "providerID",
  20345. "name",
  20346. "api",
  20347. "capabilities",
  20348. "request",
  20349. "variants",
  20350. "time",
  20351. "cost",
  20352. "status",
  20353. "enabled",
  20354. "limit"
  20355. ],
  20356. "additionalProperties": false
  20357. },
  20358. "PromptSource": {
  20359. "type": "object",
  20360. "properties": {
  20361. "start": {
  20362. "type": "number"
  20363. },
  20364. "end": {
  20365. "type": "number"
  20366. },
  20367. "text": {
  20368. "type": "string"
  20369. }
  20370. },
  20371. "required": ["start", "end", "text"],
  20372. "additionalProperties": false
  20373. },
  20374. "PromptFileAttachment": {
  20375. "type": "object",
  20376. "properties": {
  20377. "uri": {
  20378. "type": "string"
  20379. },
  20380. "mime": {
  20381. "type": "string"
  20382. },
  20383. "name": {
  20384. "type": "string"
  20385. },
  20386. "description": {
  20387. "type": "string"
  20388. },
  20389. "source": {
  20390. "$ref": "#/components/schemas/PromptSource"
  20391. }
  20392. },
  20393. "required": ["uri", "mime"],
  20394. "additionalProperties": false
  20395. },
  20396. "PromptAgentAttachment": {
  20397. "type": "object",
  20398. "properties": {
  20399. "name": {
  20400. "type": "string"
  20401. },
  20402. "source": {
  20403. "$ref": "#/components/schemas/PromptSource"
  20404. }
  20405. },
  20406. "required": ["name"],
  20407. "additionalProperties": false
  20408. },
  20409. "PromptReferenceAttachment": {
  20410. "type": "object",
  20411. "properties": {
  20412. "name": {
  20413. "type": "string"
  20414. },
  20415. "kind": {
  20416. "type": "string",
  20417. "enum": ["local", "git", "invalid"]
  20418. },
  20419. "uri": {
  20420. "type": "string"
  20421. },
  20422. "repository": {
  20423. "type": "string"
  20424. },
  20425. "branch": {
  20426. "type": "string"
  20427. },
  20428. "target": {
  20429. "type": "string"
  20430. },
  20431. "targetUri": {
  20432. "type": "string"
  20433. },
  20434. "problem": {
  20435. "type": "string"
  20436. },
  20437. "source": {
  20438. "$ref": "#/components/schemas/PromptSource"
  20439. }
  20440. },
  20441. "required": ["name", "kind"],
  20442. "additionalProperties": false
  20443. },
  20444. "SessionErrorUnknown": {
  20445. "type": "object",
  20446. "properties": {
  20447. "type": {
  20448. "type": "string",
  20449. "enum": ["unknown"]
  20450. },
  20451. "message": {
  20452. "type": "string"
  20453. }
  20454. },
  20455. "required": ["type", "message"],
  20456. "additionalProperties": false
  20457. },
  20458. "ToolTextContent": {
  20459. "type": "object",
  20460. "properties": {
  20461. "type": {
  20462. "type": "string",
  20463. "enum": ["text"]
  20464. },
  20465. "text": {
  20466. "type": "string"
  20467. }
  20468. },
  20469. "required": ["type", "text"],
  20470. "additionalProperties": false
  20471. },
  20472. "ToolFileContent": {
  20473. "type": "object",
  20474. "properties": {
  20475. "type": {
  20476. "type": "string",
  20477. "enum": ["file"]
  20478. },
  20479. "source": {
  20480. "anyOf": [
  20481. {
  20482. "type": "object",
  20483. "properties": {
  20484. "type": {
  20485. "type": "string",
  20486. "enum": ["data"]
  20487. },
  20488. "data": {
  20489. "type": "string"
  20490. }
  20491. },
  20492. "required": ["type", "data"],
  20493. "additionalProperties": false
  20494. },
  20495. {
  20496. "type": "object",
  20497. "properties": {
  20498. "type": {
  20499. "type": "string",
  20500. "enum": ["url"]
  20501. },
  20502. "url": {
  20503. "type": "string"
  20504. }
  20505. },
  20506. "required": ["type", "url"],
  20507. "additionalProperties": false
  20508. },
  20509. {
  20510. "type": "object",
  20511. "properties": {
  20512. "type": {
  20513. "type": "string",
  20514. "enum": ["file"]
  20515. },
  20516. "uri": {
  20517. "type": "string"
  20518. }
  20519. },
  20520. "required": ["type", "uri"],
  20521. "additionalProperties": false
  20522. }
  20523. ]
  20524. },
  20525. "mime": {
  20526. "type": "string"
  20527. },
  20528. "name": {
  20529. "type": "string"
  20530. }
  20531. },
  20532. "required": ["type", "source", "mime"],
  20533. "additionalProperties": false
  20534. },
  20535. "SessionNextRetry_error": {
  20536. "type": "object",
  20537. "properties": {
  20538. "message": {
  20539. "type": "string"
  20540. },
  20541. "statusCode": {
  20542. "type": "number"
  20543. },
  20544. "isRetryable": {
  20545. "type": "boolean"
  20546. },
  20547. "responseHeaders": {
  20548. "type": "object",
  20549. "additionalProperties": {
  20550. "type": "string"
  20551. }
  20552. },
  20553. "responseBody": {
  20554. "type": "string"
  20555. },
  20556. "metadata": {
  20557. "type": "object",
  20558. "additionalProperties": {
  20559. "type": "string"
  20560. }
  20561. }
  20562. },
  20563. "required": ["message", "isRetryable"],
  20564. "additionalProperties": false
  20565. },
  20566. "AuthOAuthCredential": {
  20567. "type": "object",
  20568. "properties": {
  20569. "type": {
  20570. "type": "string",
  20571. "enum": ["oauth"]
  20572. },
  20573. "refresh": {
  20574. "type": "string"
  20575. },
  20576. "access": {
  20577. "type": "string"
  20578. },
  20579. "expires": {
  20580. "type": "integer",
  20581. "minimum": 0
  20582. }
  20583. },
  20584. "required": ["type", "refresh", "access", "expires"],
  20585. "additionalProperties": false
  20586. },
  20587. "AuthApiKeyCredential": {
  20588. "type": "object",
  20589. "properties": {
  20590. "type": {
  20591. "type": "string",
  20592. "enum": ["api"]
  20593. },
  20594. "key": {
  20595. "type": "string"
  20596. },
  20597. "metadata": {
  20598. "type": "object",
  20599. "additionalProperties": {
  20600. "type": "string"
  20601. }
  20602. }
  20603. },
  20604. "required": ["type", "key"],
  20605. "additionalProperties": false
  20606. },
  20607. "AuthCredential": {
  20608. "anyOf": [
  20609. {
  20610. "$ref": "#/components/schemas/AuthOAuthCredential"
  20611. },
  20612. {
  20613. "$ref": "#/components/schemas/AuthApiKeyCredential"
  20614. }
  20615. ]
  20616. },
  20617. "AuthInfo": {
  20618. "type": "object",
  20619. "properties": {
  20620. "id": {
  20621. "type": "string"
  20622. },
  20623. "serviceID": {
  20624. "type": "string"
  20625. },
  20626. "description": {
  20627. "type": "string"
  20628. },
  20629. "credential": {
  20630. "$ref": "#/components/schemas/AuthCredential"
  20631. }
  20632. },
  20633. "required": ["id", "serviceID", "description", "credential"],
  20634. "additionalProperties": false
  20635. },
  20636. "PermissionV2Source": {
  20637. "type": "object",
  20638. "properties": {
  20639. "type": {
  20640. "type": "string",
  20641. "enum": ["tool"]
  20642. },
  20643. "messageID": {
  20644. "type": "string"
  20645. },
  20646. "callID": {
  20647. "type": "string"
  20648. }
  20649. },
  20650. "required": ["type", "messageID", "callID"],
  20651. "additionalProperties": false
  20652. },
  20653. "PermissionV2Reply": {
  20654. "type": "string",
  20655. "enum": ["once", "always", "reject"]
  20656. },
  20657. "QuestionV2Option": {
  20658. "type": "object",
  20659. "properties": {
  20660. "label": {
  20661. "type": "string",
  20662. "description": "Display text (1-5 words, concise)"
  20663. },
  20664. "description": {
  20665. "type": "string",
  20666. "description": "Explanation of choice"
  20667. }
  20668. },
  20669. "required": ["label", "description"],
  20670. "additionalProperties": false
  20671. },
  20672. "QuestionV2Info": {
  20673. "type": "object",
  20674. "properties": {
  20675. "question": {
  20676. "type": "string",
  20677. "description": "Complete question"
  20678. },
  20679. "header": {
  20680. "type": "string",
  20681. "description": "Very short label (max 30 chars)"
  20682. },
  20683. "options": {
  20684. "type": "array",
  20685. "items": {
  20686. "$ref": "#/components/schemas/QuestionV2Option"
  20687. },
  20688. "description": "Available choices"
  20689. },
  20690. "multiple": {
  20691. "type": "boolean"
  20692. },
  20693. "custom": {
  20694. "type": "boolean"
  20695. }
  20696. },
  20697. "required": ["question", "header", "options"],
  20698. "additionalProperties": false
  20699. },
  20700. "QuestionV2Tool": {
  20701. "type": "object",
  20702. "properties": {
  20703. "messageID": {
  20704. "type": "string"
  20705. },
  20706. "callID": {
  20707. "type": "string"
  20708. }
  20709. },
  20710. "required": ["messageID", "callID"],
  20711. "additionalProperties": false
  20712. },
  20713. "QuestionV2Answer": {
  20714. "type": "array",
  20715. "items": {
  20716. "type": "string"
  20717. }
  20718. },
  20719. "EventServerInstanceDisposed": {
  20720. "type": "object",
  20721. "properties": {
  20722. "id": {
  20723. "type": "string"
  20724. },
  20725. "type": {
  20726. "type": "string",
  20727. "enum": ["server.instance.disposed"]
  20728. },
  20729. "properties": {
  20730. "type": "object",
  20731. "properties": {
  20732. "directory": {
  20733. "type": "string"
  20734. }
  20735. },
  20736. "required": ["directory"],
  20737. "additionalProperties": false
  20738. }
  20739. },
  20740. "required": ["id", "type", "properties"],
  20741. "additionalProperties": false
  20742. },
  20743. "SyncEventSessionCreated": {
  20744. "type": "object",
  20745. "properties": {
  20746. "type": {
  20747. "type": "string",
  20748. "enum": ["sync"]
  20749. },
  20750. "id": {
  20751. "type": "string"
  20752. },
  20753. "syncEvent": {
  20754. "type": "object",
  20755. "properties": {
  20756. "type": {
  20757. "type": "string",
  20758. "enum": ["session.created.1"]
  20759. },
  20760. "id": {
  20761. "type": "string"
  20762. },
  20763. "seq": {
  20764. "type": "number"
  20765. },
  20766. "aggregateID": {
  20767. "type": "string"
  20768. },
  20769. "data": {
  20770. "type": "object",
  20771. "properties": {
  20772. "sessionID": {
  20773. "type": "string",
  20774. "pattern": "^ses"
  20775. },
  20776. "info": {
  20777. "$ref": "#/components/schemas/Session"
  20778. }
  20779. },
  20780. "required": ["sessionID", "info"],
  20781. "additionalProperties": false
  20782. }
  20783. },
  20784. "required": ["type", "id", "seq", "aggregateID", "data"],
  20785. "additionalProperties": false
  20786. }
  20787. },
  20788. "required": ["type", "id", "syncEvent"],
  20789. "additionalProperties": false
  20790. },
  20791. "SyncEventSessionUpdated": {
  20792. "type": "object",
  20793. "properties": {
  20794. "type": {
  20795. "type": "string",
  20796. "enum": ["sync"]
  20797. },
  20798. "id": {
  20799. "type": "string"
  20800. },
  20801. "syncEvent": {
  20802. "type": "object",
  20803. "properties": {
  20804. "type": {
  20805. "type": "string",
  20806. "enum": ["session.updated.1"]
  20807. },
  20808. "id": {
  20809. "type": "string"
  20810. },
  20811. "seq": {
  20812. "type": "number"
  20813. },
  20814. "aggregateID": {
  20815. "type": "string"
  20816. },
  20817. "data": {
  20818. "type": "object",
  20819. "properties": {
  20820. "sessionID": {
  20821. "type": "string",
  20822. "pattern": "^ses"
  20823. },
  20824. "info": {
  20825. "$ref": "#/components/schemas/Session"
  20826. }
  20827. },
  20828. "required": ["sessionID", "info"],
  20829. "additionalProperties": false
  20830. }
  20831. },
  20832. "required": ["type", "id", "seq", "aggregateID", "data"],
  20833. "additionalProperties": false
  20834. }
  20835. },
  20836. "required": ["type", "id", "syncEvent"],
  20837. "additionalProperties": false
  20838. },
  20839. "SyncEventSessionDeleted": {
  20840. "type": "object",
  20841. "properties": {
  20842. "type": {
  20843. "type": "string",
  20844. "enum": ["sync"]
  20845. },
  20846. "id": {
  20847. "type": "string"
  20848. },
  20849. "syncEvent": {
  20850. "type": "object",
  20851. "properties": {
  20852. "type": {
  20853. "type": "string",
  20854. "enum": ["session.deleted.1"]
  20855. },
  20856. "id": {
  20857. "type": "string"
  20858. },
  20859. "seq": {
  20860. "type": "number"
  20861. },
  20862. "aggregateID": {
  20863. "type": "string"
  20864. },
  20865. "data": {
  20866. "type": "object",
  20867. "properties": {
  20868. "sessionID": {
  20869. "type": "string",
  20870. "pattern": "^ses"
  20871. },
  20872. "info": {
  20873. "$ref": "#/components/schemas/Session"
  20874. }
  20875. },
  20876. "required": ["sessionID", "info"],
  20877. "additionalProperties": false
  20878. }
  20879. },
  20880. "required": ["type", "id", "seq", "aggregateID", "data"],
  20881. "additionalProperties": false
  20882. }
  20883. },
  20884. "required": ["type", "id", "syncEvent"],
  20885. "additionalProperties": false
  20886. },
  20887. "SyncEventMessageUpdated": {
  20888. "type": "object",
  20889. "properties": {
  20890. "type": {
  20891. "type": "string",
  20892. "enum": ["sync"]
  20893. },
  20894. "id": {
  20895. "type": "string"
  20896. },
  20897. "syncEvent": {
  20898. "type": "object",
  20899. "properties": {
  20900. "type": {
  20901. "type": "string",
  20902. "enum": ["message.updated.1"]
  20903. },
  20904. "id": {
  20905. "type": "string"
  20906. },
  20907. "seq": {
  20908. "type": "number"
  20909. },
  20910. "aggregateID": {
  20911. "type": "string"
  20912. },
  20913. "data": {
  20914. "type": "object",
  20915. "properties": {
  20916. "sessionID": {
  20917. "type": "string",
  20918. "pattern": "^ses"
  20919. },
  20920. "info": {
  20921. "$ref": "#/components/schemas/Message"
  20922. }
  20923. },
  20924. "required": ["sessionID", "info"],
  20925. "additionalProperties": false
  20926. }
  20927. },
  20928. "required": ["type", "id", "seq", "aggregateID", "data"],
  20929. "additionalProperties": false
  20930. }
  20931. },
  20932. "required": ["type", "id", "syncEvent"],
  20933. "additionalProperties": false
  20934. },
  20935. "SyncEventMessageRemoved": {
  20936. "type": "object",
  20937. "properties": {
  20938. "type": {
  20939. "type": "string",
  20940. "enum": ["sync"]
  20941. },
  20942. "id": {
  20943. "type": "string"
  20944. },
  20945. "syncEvent": {
  20946. "type": "object",
  20947. "properties": {
  20948. "type": {
  20949. "type": "string",
  20950. "enum": ["message.removed.1"]
  20951. },
  20952. "id": {
  20953. "type": "string"
  20954. },
  20955. "seq": {
  20956. "type": "number"
  20957. },
  20958. "aggregateID": {
  20959. "type": "string"
  20960. },
  20961. "data": {
  20962. "type": "object",
  20963. "properties": {
  20964. "sessionID": {
  20965. "type": "string",
  20966. "pattern": "^ses"
  20967. },
  20968. "messageID": {
  20969. "type": "string",
  20970. "pattern": "^msg"
  20971. }
  20972. },
  20973. "required": ["sessionID", "messageID"],
  20974. "additionalProperties": false
  20975. }
  20976. },
  20977. "required": ["type", "id", "seq", "aggregateID", "data"],
  20978. "additionalProperties": false
  20979. }
  20980. },
  20981. "required": ["type", "id", "syncEvent"],
  20982. "additionalProperties": false
  20983. },
  20984. "SyncEventMessagePartUpdated": {
  20985. "type": "object",
  20986. "properties": {
  20987. "type": {
  20988. "type": "string",
  20989. "enum": ["sync"]
  20990. },
  20991. "id": {
  20992. "type": "string"
  20993. },
  20994. "syncEvent": {
  20995. "type": "object",
  20996. "properties": {
  20997. "type": {
  20998. "type": "string",
  20999. "enum": ["message.part.updated.1"]
  21000. },
  21001. "id": {
  21002. "type": "string"
  21003. },
  21004. "seq": {
  21005. "type": "number"
  21006. },
  21007. "aggregateID": {
  21008. "type": "string"
  21009. },
  21010. "data": {
  21011. "type": "object",
  21012. "properties": {
  21013. "sessionID": {
  21014. "type": "string",
  21015. "pattern": "^ses"
  21016. },
  21017. "part": {
  21018. "$ref": "#/components/schemas/Part"
  21019. },
  21020. "time": {
  21021. "type": "number"
  21022. }
  21023. },
  21024. "required": ["sessionID", "part", "time"],
  21025. "additionalProperties": false
  21026. }
  21027. },
  21028. "required": ["type", "id", "seq", "aggregateID", "data"],
  21029. "additionalProperties": false
  21030. }
  21031. },
  21032. "required": ["type", "id", "syncEvent"],
  21033. "additionalProperties": false
  21034. },
  21035. "SyncEventMessagePartRemoved": {
  21036. "type": "object",
  21037. "properties": {
  21038. "type": {
  21039. "type": "string",
  21040. "enum": ["sync"]
  21041. },
  21042. "id": {
  21043. "type": "string"
  21044. },
  21045. "syncEvent": {
  21046. "type": "object",
  21047. "properties": {
  21048. "type": {
  21049. "type": "string",
  21050. "enum": ["message.part.removed.1"]
  21051. },
  21052. "id": {
  21053. "type": "string"
  21054. },
  21055. "seq": {
  21056. "type": "number"
  21057. },
  21058. "aggregateID": {
  21059. "type": "string"
  21060. },
  21061. "data": {
  21062. "type": "object",
  21063. "properties": {
  21064. "sessionID": {
  21065. "type": "string",
  21066. "pattern": "^ses"
  21067. },
  21068. "messageID": {
  21069. "type": "string",
  21070. "pattern": "^msg"
  21071. },
  21072. "partID": {
  21073. "type": "string",
  21074. "pattern": "^prt"
  21075. }
  21076. },
  21077. "required": ["sessionID", "messageID", "partID"],
  21078. "additionalProperties": false
  21079. }
  21080. },
  21081. "required": ["type", "id", "seq", "aggregateID", "data"],
  21082. "additionalProperties": false
  21083. }
  21084. },
  21085. "required": ["type", "id", "syncEvent"],
  21086. "additionalProperties": false
  21087. },
  21088. "SyncEventSessionNextAgentSwitched": {
  21089. "type": "object",
  21090. "properties": {
  21091. "type": {
  21092. "type": "string",
  21093. "enum": ["sync"]
  21094. },
  21095. "id": {
  21096. "type": "string"
  21097. },
  21098. "syncEvent": {
  21099. "type": "object",
  21100. "properties": {
  21101. "type": {
  21102. "type": "string",
  21103. "enum": ["session.next.agent.switched.1"]
  21104. },
  21105. "id": {
  21106. "type": "string"
  21107. },
  21108. "seq": {
  21109. "type": "number"
  21110. },
  21111. "aggregateID": {
  21112. "type": "string"
  21113. },
  21114. "data": {
  21115. "type": "object",
  21116. "properties": {
  21117. "timestamp": {
  21118. "type": "number"
  21119. },
  21120. "sessionID": {
  21121. "type": "string",
  21122. "pattern": "^ses"
  21123. },
  21124. "agent": {
  21125. "type": "string"
  21126. }
  21127. },
  21128. "required": ["timestamp", "sessionID", "agent"],
  21129. "additionalProperties": false
  21130. }
  21131. },
  21132. "required": ["type", "id", "seq", "aggregateID", "data"],
  21133. "additionalProperties": false
  21134. }
  21135. },
  21136. "required": ["type", "id", "syncEvent"],
  21137. "additionalProperties": false
  21138. },
  21139. "SyncEventSessionNextModelSwitched": {
  21140. "type": "object",
  21141. "properties": {
  21142. "type": {
  21143. "type": "string",
  21144. "enum": ["sync"]
  21145. },
  21146. "id": {
  21147. "type": "string"
  21148. },
  21149. "syncEvent": {
  21150. "type": "object",
  21151. "properties": {
  21152. "type": {
  21153. "type": "string",
  21154. "enum": ["session.next.model.switched.1"]
  21155. },
  21156. "id": {
  21157. "type": "string"
  21158. },
  21159. "seq": {
  21160. "type": "number"
  21161. },
  21162. "aggregateID": {
  21163. "type": "string"
  21164. },
  21165. "data": {
  21166. "type": "object",
  21167. "properties": {
  21168. "timestamp": {
  21169. "type": "number"
  21170. },
  21171. "sessionID": {
  21172. "type": "string",
  21173. "pattern": "^ses"
  21174. },
  21175. "model": {
  21176. "type": "object",
  21177. "properties": {
  21178. "id": {
  21179. "type": "string"
  21180. },
  21181. "providerID": {
  21182. "type": "string"
  21183. },
  21184. "variant": {
  21185. "type": "string"
  21186. }
  21187. },
  21188. "required": ["id", "providerID"],
  21189. "additionalProperties": false
  21190. }
  21191. },
  21192. "required": ["timestamp", "sessionID", "model"],
  21193. "additionalProperties": false
  21194. }
  21195. },
  21196. "required": ["type", "id", "seq", "aggregateID", "data"],
  21197. "additionalProperties": false
  21198. }
  21199. },
  21200. "required": ["type", "id", "syncEvent"],
  21201. "additionalProperties": false
  21202. },
  21203. "SyncEventSessionNextPrompted": {
  21204. "type": "object",
  21205. "properties": {
  21206. "type": {
  21207. "type": "string",
  21208. "enum": ["sync"]
  21209. },
  21210. "id": {
  21211. "type": "string"
  21212. },
  21213. "syncEvent": {
  21214. "type": "object",
  21215. "properties": {
  21216. "type": {
  21217. "type": "string",
  21218. "enum": ["session.next.prompted.1"]
  21219. },
  21220. "id": {
  21221. "type": "string"
  21222. },
  21223. "seq": {
  21224. "type": "number"
  21225. },
  21226. "aggregateID": {
  21227. "type": "string"
  21228. },
  21229. "data": {
  21230. "type": "object",
  21231. "properties": {
  21232. "timestamp": {
  21233. "type": "number"
  21234. },
  21235. "sessionID": {
  21236. "type": "string",
  21237. "pattern": "^ses"
  21238. },
  21239. "prompt": {
  21240. "$ref": "#/components/schemas/Prompt"
  21241. },
  21242. "delivery": {
  21243. "type": "string",
  21244. "enum": ["steer", "queue"]
  21245. }
  21246. },
  21247. "required": ["timestamp", "sessionID", "prompt", "delivery"],
  21248. "additionalProperties": false
  21249. }
  21250. },
  21251. "required": ["type", "id", "seq", "aggregateID", "data"],
  21252. "additionalProperties": false
  21253. }
  21254. },
  21255. "required": ["type", "id", "syncEvent"],
  21256. "additionalProperties": false
  21257. },
  21258. "SyncEventSessionNextSynthetic": {
  21259. "type": "object",
  21260. "properties": {
  21261. "type": {
  21262. "type": "string",
  21263. "enum": ["sync"]
  21264. },
  21265. "id": {
  21266. "type": "string"
  21267. },
  21268. "syncEvent": {
  21269. "type": "object",
  21270. "properties": {
  21271. "type": {
  21272. "type": "string",
  21273. "enum": ["session.next.synthetic.1"]
  21274. },
  21275. "id": {
  21276. "type": "string"
  21277. },
  21278. "seq": {
  21279. "type": "number"
  21280. },
  21281. "aggregateID": {
  21282. "type": "string"
  21283. },
  21284. "data": {
  21285. "type": "object",
  21286. "properties": {
  21287. "timestamp": {
  21288. "type": "number"
  21289. },
  21290. "sessionID": {
  21291. "type": "string",
  21292. "pattern": "^ses"
  21293. },
  21294. "text": {
  21295. "type": "string"
  21296. }
  21297. },
  21298. "required": ["timestamp", "sessionID", "text"],
  21299. "additionalProperties": false
  21300. }
  21301. },
  21302. "required": ["type", "id", "seq", "aggregateID", "data"],
  21303. "additionalProperties": false
  21304. }
  21305. },
  21306. "required": ["type", "id", "syncEvent"],
  21307. "additionalProperties": false
  21308. },
  21309. "SyncEventSessionNextShellStarted": {
  21310. "type": "object",
  21311. "properties": {
  21312. "type": {
  21313. "type": "string",
  21314. "enum": ["sync"]
  21315. },
  21316. "id": {
  21317. "type": "string"
  21318. },
  21319. "syncEvent": {
  21320. "type": "object",
  21321. "properties": {
  21322. "type": {
  21323. "type": "string",
  21324. "enum": ["session.next.shell.started.1"]
  21325. },
  21326. "id": {
  21327. "type": "string"
  21328. },
  21329. "seq": {
  21330. "type": "number"
  21331. },
  21332. "aggregateID": {
  21333. "type": "string"
  21334. },
  21335. "data": {
  21336. "type": "object",
  21337. "properties": {
  21338. "timestamp": {
  21339. "type": "number"
  21340. },
  21341. "sessionID": {
  21342. "type": "string",
  21343. "pattern": "^ses"
  21344. },
  21345. "callID": {
  21346. "type": "string"
  21347. },
  21348. "command": {
  21349. "type": "string"
  21350. }
  21351. },
  21352. "required": ["timestamp", "sessionID", "callID", "command"],
  21353. "additionalProperties": false
  21354. }
  21355. },
  21356. "required": ["type", "id", "seq", "aggregateID", "data"],
  21357. "additionalProperties": false
  21358. }
  21359. },
  21360. "required": ["type", "id", "syncEvent"],
  21361. "additionalProperties": false
  21362. },
  21363. "SyncEventSessionNextShellEnded": {
  21364. "type": "object",
  21365. "properties": {
  21366. "type": {
  21367. "type": "string",
  21368. "enum": ["sync"]
  21369. },
  21370. "id": {
  21371. "type": "string"
  21372. },
  21373. "syncEvent": {
  21374. "type": "object",
  21375. "properties": {
  21376. "type": {
  21377. "type": "string",
  21378. "enum": ["session.next.shell.ended.1"]
  21379. },
  21380. "id": {
  21381. "type": "string"
  21382. },
  21383. "seq": {
  21384. "type": "number"
  21385. },
  21386. "aggregateID": {
  21387. "type": "string"
  21388. },
  21389. "data": {
  21390. "type": "object",
  21391. "properties": {
  21392. "timestamp": {
  21393. "type": "number"
  21394. },
  21395. "sessionID": {
  21396. "type": "string",
  21397. "pattern": "^ses"
  21398. },
  21399. "callID": {
  21400. "type": "string"
  21401. },
  21402. "output": {
  21403. "type": "string"
  21404. }
  21405. },
  21406. "required": ["timestamp", "sessionID", "callID", "output"],
  21407. "additionalProperties": false
  21408. }
  21409. },
  21410. "required": ["type", "id", "seq", "aggregateID", "data"],
  21411. "additionalProperties": false
  21412. }
  21413. },
  21414. "required": ["type", "id", "syncEvent"],
  21415. "additionalProperties": false
  21416. },
  21417. "SyncEventSessionNextStepStarted": {
  21418. "type": "object",
  21419. "properties": {
  21420. "type": {
  21421. "type": "string",
  21422. "enum": ["sync"]
  21423. },
  21424. "id": {
  21425. "type": "string"
  21426. },
  21427. "syncEvent": {
  21428. "type": "object",
  21429. "properties": {
  21430. "type": {
  21431. "type": "string",
  21432. "enum": ["session.next.step.started.1"]
  21433. },
  21434. "id": {
  21435. "type": "string"
  21436. },
  21437. "seq": {
  21438. "type": "number"
  21439. },
  21440. "aggregateID": {
  21441. "type": "string"
  21442. },
  21443. "data": {
  21444. "type": "object",
  21445. "properties": {
  21446. "timestamp": {
  21447. "type": "number"
  21448. },
  21449. "sessionID": {
  21450. "type": "string",
  21451. "pattern": "^ses"
  21452. },
  21453. "agent": {
  21454. "type": "string"
  21455. },
  21456. "model": {
  21457. "type": "object",
  21458. "properties": {
  21459. "id": {
  21460. "type": "string"
  21461. },
  21462. "providerID": {
  21463. "type": "string"
  21464. },
  21465. "variant": {
  21466. "type": "string"
  21467. }
  21468. },
  21469. "required": ["id", "providerID"],
  21470. "additionalProperties": false
  21471. },
  21472. "snapshot": {
  21473. "type": "string"
  21474. }
  21475. },
  21476. "required": ["timestamp", "sessionID", "agent", "model"],
  21477. "additionalProperties": false
  21478. }
  21479. },
  21480. "required": ["type", "id", "seq", "aggregateID", "data"],
  21481. "additionalProperties": false
  21482. }
  21483. },
  21484. "required": ["type", "id", "syncEvent"],
  21485. "additionalProperties": false
  21486. },
  21487. "SyncEventSessionNextStepEnded": {
  21488. "type": "object",
  21489. "properties": {
  21490. "type": {
  21491. "type": "string",
  21492. "enum": ["sync"]
  21493. },
  21494. "id": {
  21495. "type": "string"
  21496. },
  21497. "syncEvent": {
  21498. "type": "object",
  21499. "properties": {
  21500. "type": {
  21501. "type": "string",
  21502. "enum": ["session.next.step.ended.2"]
  21503. },
  21504. "id": {
  21505. "type": "string"
  21506. },
  21507. "seq": {
  21508. "type": "number"
  21509. },
  21510. "aggregateID": {
  21511. "type": "string"
  21512. },
  21513. "data": {
  21514. "type": "object",
  21515. "properties": {
  21516. "timestamp": {
  21517. "type": "number"
  21518. },
  21519. "sessionID": {
  21520. "type": "string",
  21521. "pattern": "^ses"
  21522. },
  21523. "assistantMessageID": {
  21524. "type": "string"
  21525. },
  21526. "finish": {
  21527. "type": "string"
  21528. },
  21529. "cost": {
  21530. "type": "number"
  21531. },
  21532. "tokens": {
  21533. "type": "object",
  21534. "properties": {
  21535. "input": {
  21536. "type": "number"
  21537. },
  21538. "output": {
  21539. "type": "number"
  21540. },
  21541. "reasoning": {
  21542. "type": "number"
  21543. },
  21544. "cache": {
  21545. "type": "object",
  21546. "properties": {
  21547. "read": {
  21548. "type": "number"
  21549. },
  21550. "write": {
  21551. "type": "number"
  21552. }
  21553. },
  21554. "required": ["read", "write"],
  21555. "additionalProperties": false
  21556. }
  21557. },
  21558. "required": ["input", "output", "reasoning", "cache"],
  21559. "additionalProperties": false
  21560. },
  21561. "snapshot": {
  21562. "type": "string"
  21563. }
  21564. },
  21565. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  21566. "additionalProperties": false
  21567. }
  21568. },
  21569. "required": ["type", "id", "seq", "aggregateID", "data"],
  21570. "additionalProperties": false
  21571. }
  21572. },
  21573. "required": ["type", "id", "syncEvent"],
  21574. "additionalProperties": false
  21575. },
  21576. "SyncEventSessionNextStepFailed": {
  21577. "type": "object",
  21578. "properties": {
  21579. "type": {
  21580. "type": "string",
  21581. "enum": ["sync"]
  21582. },
  21583. "id": {
  21584. "type": "string"
  21585. },
  21586. "syncEvent": {
  21587. "type": "object",
  21588. "properties": {
  21589. "type": {
  21590. "type": "string",
  21591. "enum": ["session.next.step.failed.2"]
  21592. },
  21593. "id": {
  21594. "type": "string"
  21595. },
  21596. "seq": {
  21597. "type": "number"
  21598. },
  21599. "aggregateID": {
  21600. "type": "string"
  21601. },
  21602. "data": {
  21603. "type": "object",
  21604. "properties": {
  21605. "timestamp": {
  21606. "type": "number"
  21607. },
  21608. "sessionID": {
  21609. "type": "string",
  21610. "pattern": "^ses"
  21611. },
  21612. "assistantMessageID": {
  21613. "type": "string"
  21614. },
  21615. "error": {
  21616. "$ref": "#/components/schemas/SessionErrorUnknown"
  21617. }
  21618. },
  21619. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  21620. "additionalProperties": false
  21621. }
  21622. },
  21623. "required": ["type", "id", "seq", "aggregateID", "data"],
  21624. "additionalProperties": false
  21625. }
  21626. },
  21627. "required": ["type", "id", "syncEvent"],
  21628. "additionalProperties": false
  21629. },
  21630. "SyncEventSessionNextTextStarted": {
  21631. "type": "object",
  21632. "properties": {
  21633. "type": {
  21634. "type": "string",
  21635. "enum": ["sync"]
  21636. },
  21637. "id": {
  21638. "type": "string"
  21639. },
  21640. "syncEvent": {
  21641. "type": "object",
  21642. "properties": {
  21643. "type": {
  21644. "type": "string",
  21645. "enum": ["session.next.text.started.1"]
  21646. },
  21647. "id": {
  21648. "type": "string"
  21649. },
  21650. "seq": {
  21651. "type": "number"
  21652. },
  21653. "aggregateID": {
  21654. "type": "string"
  21655. },
  21656. "data": {
  21657. "type": "object",
  21658. "properties": {
  21659. "timestamp": {
  21660. "type": "number"
  21661. },
  21662. "sessionID": {
  21663. "type": "string",
  21664. "pattern": "^ses"
  21665. },
  21666. "textID": {
  21667. "type": "string"
  21668. }
  21669. },
  21670. "required": ["timestamp", "sessionID", "textID"],
  21671. "additionalProperties": false
  21672. }
  21673. },
  21674. "required": ["type", "id", "seq", "aggregateID", "data"],
  21675. "additionalProperties": false
  21676. }
  21677. },
  21678. "required": ["type", "id", "syncEvent"],
  21679. "additionalProperties": false
  21680. },
  21681. "SyncEventSessionNextTextEnded": {
  21682. "type": "object",
  21683. "properties": {
  21684. "type": {
  21685. "type": "string",
  21686. "enum": ["sync"]
  21687. },
  21688. "id": {
  21689. "type": "string"
  21690. },
  21691. "syncEvent": {
  21692. "type": "object",
  21693. "properties": {
  21694. "type": {
  21695. "type": "string",
  21696. "enum": ["session.next.text.ended.1"]
  21697. },
  21698. "id": {
  21699. "type": "string"
  21700. },
  21701. "seq": {
  21702. "type": "number"
  21703. },
  21704. "aggregateID": {
  21705. "type": "string"
  21706. },
  21707. "data": {
  21708. "type": "object",
  21709. "properties": {
  21710. "timestamp": {
  21711. "type": "number"
  21712. },
  21713. "sessionID": {
  21714. "type": "string",
  21715. "pattern": "^ses"
  21716. },
  21717. "textID": {
  21718. "type": "string"
  21719. },
  21720. "text": {
  21721. "type": "string"
  21722. }
  21723. },
  21724. "required": ["timestamp", "sessionID", "textID", "text"],
  21725. "additionalProperties": false
  21726. }
  21727. },
  21728. "required": ["type", "id", "seq", "aggregateID", "data"],
  21729. "additionalProperties": false
  21730. }
  21731. },
  21732. "required": ["type", "id", "syncEvent"],
  21733. "additionalProperties": false
  21734. },
  21735. "SyncEventSessionNextReasoningStarted": {
  21736. "type": "object",
  21737. "properties": {
  21738. "type": {
  21739. "type": "string",
  21740. "enum": ["sync"]
  21741. },
  21742. "id": {
  21743. "type": "string"
  21744. },
  21745. "syncEvent": {
  21746. "type": "object",
  21747. "properties": {
  21748. "type": {
  21749. "type": "string",
  21750. "enum": ["session.next.reasoning.started.1"]
  21751. },
  21752. "id": {
  21753. "type": "string"
  21754. },
  21755. "seq": {
  21756. "type": "number"
  21757. },
  21758. "aggregateID": {
  21759. "type": "string"
  21760. },
  21761. "data": {
  21762. "type": "object",
  21763. "properties": {
  21764. "timestamp": {
  21765. "type": "number"
  21766. },
  21767. "sessionID": {
  21768. "type": "string",
  21769. "pattern": "^ses"
  21770. },
  21771. "reasoningID": {
  21772. "type": "string"
  21773. },
  21774. "providerMetadata": {
  21775. "type": "object",
  21776. "additionalProperties": {
  21777. "type": "object"
  21778. }
  21779. }
  21780. },
  21781. "required": ["timestamp", "sessionID", "reasoningID"],
  21782. "additionalProperties": false
  21783. }
  21784. },
  21785. "required": ["type", "id", "seq", "aggregateID", "data"],
  21786. "additionalProperties": false
  21787. }
  21788. },
  21789. "required": ["type", "id", "syncEvent"],
  21790. "additionalProperties": false
  21791. },
  21792. "SyncEventSessionNextReasoningEnded": {
  21793. "type": "object",
  21794. "properties": {
  21795. "type": {
  21796. "type": "string",
  21797. "enum": ["sync"]
  21798. },
  21799. "id": {
  21800. "type": "string"
  21801. },
  21802. "syncEvent": {
  21803. "type": "object",
  21804. "properties": {
  21805. "type": {
  21806. "type": "string",
  21807. "enum": ["session.next.reasoning.ended.1"]
  21808. },
  21809. "id": {
  21810. "type": "string"
  21811. },
  21812. "seq": {
  21813. "type": "number"
  21814. },
  21815. "aggregateID": {
  21816. "type": "string"
  21817. },
  21818. "data": {
  21819. "type": "object",
  21820. "properties": {
  21821. "timestamp": {
  21822. "type": "number"
  21823. },
  21824. "sessionID": {
  21825. "type": "string",
  21826. "pattern": "^ses"
  21827. },
  21828. "reasoningID": {
  21829. "type": "string"
  21830. },
  21831. "text": {
  21832. "type": "string"
  21833. },
  21834. "providerMetadata": {
  21835. "type": "object",
  21836. "additionalProperties": {
  21837. "type": "object"
  21838. }
  21839. }
  21840. },
  21841. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  21842. "additionalProperties": false
  21843. }
  21844. },
  21845. "required": ["type", "id", "seq", "aggregateID", "data"],
  21846. "additionalProperties": false
  21847. }
  21848. },
  21849. "required": ["type", "id", "syncEvent"],
  21850. "additionalProperties": false
  21851. },
  21852. "SyncEventSessionNextToolInputStarted": {
  21853. "type": "object",
  21854. "properties": {
  21855. "type": {
  21856. "type": "string",
  21857. "enum": ["sync"]
  21858. },
  21859. "id": {
  21860. "type": "string"
  21861. },
  21862. "syncEvent": {
  21863. "type": "object",
  21864. "properties": {
  21865. "type": {
  21866. "type": "string",
  21867. "enum": ["session.next.tool.input.started.1"]
  21868. },
  21869. "id": {
  21870. "type": "string"
  21871. },
  21872. "seq": {
  21873. "type": "number"
  21874. },
  21875. "aggregateID": {
  21876. "type": "string"
  21877. },
  21878. "data": {
  21879. "type": "object",
  21880. "properties": {
  21881. "timestamp": {
  21882. "type": "number"
  21883. },
  21884. "sessionID": {
  21885. "type": "string",
  21886. "pattern": "^ses"
  21887. },
  21888. "assistantMessageID": {
  21889. "type": "string"
  21890. },
  21891. "callID": {
  21892. "type": "string"
  21893. },
  21894. "name": {
  21895. "type": "string"
  21896. }
  21897. },
  21898. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  21899. "additionalProperties": false
  21900. }
  21901. },
  21902. "required": ["type", "id", "seq", "aggregateID", "data"],
  21903. "additionalProperties": false
  21904. }
  21905. },
  21906. "required": ["type", "id", "syncEvent"],
  21907. "additionalProperties": false
  21908. },
  21909. "SyncEventSessionNextToolInputEnded": {
  21910. "type": "object",
  21911. "properties": {
  21912. "type": {
  21913. "type": "string",
  21914. "enum": ["sync"]
  21915. },
  21916. "id": {
  21917. "type": "string"
  21918. },
  21919. "syncEvent": {
  21920. "type": "object",
  21921. "properties": {
  21922. "type": {
  21923. "type": "string",
  21924. "enum": ["session.next.tool.input.ended.1"]
  21925. },
  21926. "id": {
  21927. "type": "string"
  21928. },
  21929. "seq": {
  21930. "type": "number"
  21931. },
  21932. "aggregateID": {
  21933. "type": "string"
  21934. },
  21935. "data": {
  21936. "type": "object",
  21937. "properties": {
  21938. "timestamp": {
  21939. "type": "number"
  21940. },
  21941. "sessionID": {
  21942. "type": "string",
  21943. "pattern": "^ses"
  21944. },
  21945. "assistantMessageID": {
  21946. "type": "string"
  21947. },
  21948. "callID": {
  21949. "type": "string"
  21950. },
  21951. "text": {
  21952. "type": "string"
  21953. }
  21954. },
  21955. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  21956. "additionalProperties": false
  21957. }
  21958. },
  21959. "required": ["type", "id", "seq", "aggregateID", "data"],
  21960. "additionalProperties": false
  21961. }
  21962. },
  21963. "required": ["type", "id", "syncEvent"],
  21964. "additionalProperties": false
  21965. },
  21966. "SyncEventSessionNextToolCalled": {
  21967. "type": "object",
  21968. "properties": {
  21969. "type": {
  21970. "type": "string",
  21971. "enum": ["sync"]
  21972. },
  21973. "id": {
  21974. "type": "string"
  21975. },
  21976. "syncEvent": {
  21977. "type": "object",
  21978. "properties": {
  21979. "type": {
  21980. "type": "string",
  21981. "enum": ["session.next.tool.called.1"]
  21982. },
  21983. "id": {
  21984. "type": "string"
  21985. },
  21986. "seq": {
  21987. "type": "number"
  21988. },
  21989. "aggregateID": {
  21990. "type": "string"
  21991. },
  21992. "data": {
  21993. "type": "object",
  21994. "properties": {
  21995. "timestamp": {
  21996. "type": "number"
  21997. },
  21998. "sessionID": {
  21999. "type": "string",
  22000. "pattern": "^ses"
  22001. },
  22002. "assistantMessageID": {
  22003. "type": "string"
  22004. },
  22005. "callID": {
  22006. "type": "string"
  22007. },
  22008. "tool": {
  22009. "type": "string"
  22010. },
  22011. "input": {
  22012. "type": "object"
  22013. },
  22014. "provider": {
  22015. "type": "object",
  22016. "properties": {
  22017. "executed": {
  22018. "type": "boolean"
  22019. },
  22020. "metadata": {
  22021. "type": "object",
  22022. "additionalProperties": {
  22023. "type": "object"
  22024. }
  22025. }
  22026. },
  22027. "required": ["executed"],
  22028. "additionalProperties": false
  22029. }
  22030. },
  22031. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  22032. "additionalProperties": false
  22033. }
  22034. },
  22035. "required": ["type", "id", "seq", "aggregateID", "data"],
  22036. "additionalProperties": false
  22037. }
  22038. },
  22039. "required": ["type", "id", "syncEvent"],
  22040. "additionalProperties": false
  22041. },
  22042. "SyncEventSessionNextToolProgress": {
  22043. "type": "object",
  22044. "properties": {
  22045. "type": {
  22046. "type": "string",
  22047. "enum": ["sync"]
  22048. },
  22049. "id": {
  22050. "type": "string"
  22051. },
  22052. "syncEvent": {
  22053. "type": "object",
  22054. "properties": {
  22055. "type": {
  22056. "type": "string",
  22057. "enum": ["session.next.tool.progress.1"]
  22058. },
  22059. "id": {
  22060. "type": "string"
  22061. },
  22062. "seq": {
  22063. "type": "number"
  22064. },
  22065. "aggregateID": {
  22066. "type": "string"
  22067. },
  22068. "data": {
  22069. "type": "object",
  22070. "properties": {
  22071. "timestamp": {
  22072. "type": "number"
  22073. },
  22074. "sessionID": {
  22075. "type": "string",
  22076. "pattern": "^ses"
  22077. },
  22078. "assistantMessageID": {
  22079. "type": "string"
  22080. },
  22081. "callID": {
  22082. "type": "string"
  22083. },
  22084. "structured": {
  22085. "type": "object"
  22086. },
  22087. "content": {
  22088. "type": "array",
  22089. "items": {
  22090. "anyOf": [
  22091. {
  22092. "$ref": "#/components/schemas/ToolTextContent"
  22093. },
  22094. {
  22095. "$ref": "#/components/schemas/ToolFileContent"
  22096. }
  22097. ]
  22098. }
  22099. }
  22100. },
  22101. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  22102. "additionalProperties": false
  22103. }
  22104. },
  22105. "required": ["type", "id", "seq", "aggregateID", "data"],
  22106. "additionalProperties": false
  22107. }
  22108. },
  22109. "required": ["type", "id", "syncEvent"],
  22110. "additionalProperties": false
  22111. },
  22112. "SyncEventSessionNextToolSuccess": {
  22113. "type": "object",
  22114. "properties": {
  22115. "type": {
  22116. "type": "string",
  22117. "enum": ["sync"]
  22118. },
  22119. "id": {
  22120. "type": "string"
  22121. },
  22122. "syncEvent": {
  22123. "type": "object",
  22124. "properties": {
  22125. "type": {
  22126. "type": "string",
  22127. "enum": ["session.next.tool.success.1"]
  22128. },
  22129. "id": {
  22130. "type": "string"
  22131. },
  22132. "seq": {
  22133. "type": "number"
  22134. },
  22135. "aggregateID": {
  22136. "type": "string"
  22137. },
  22138. "data": {
  22139. "type": "object",
  22140. "properties": {
  22141. "timestamp": {
  22142. "type": "number"
  22143. },
  22144. "sessionID": {
  22145. "type": "string",
  22146. "pattern": "^ses"
  22147. },
  22148. "assistantMessageID": {
  22149. "type": "string"
  22150. },
  22151. "callID": {
  22152. "type": "string"
  22153. },
  22154. "structured": {
  22155. "type": "object"
  22156. },
  22157. "content": {
  22158. "type": "array",
  22159. "items": {
  22160. "anyOf": [
  22161. {
  22162. "$ref": "#/components/schemas/ToolTextContent"
  22163. },
  22164. {
  22165. "$ref": "#/components/schemas/ToolFileContent"
  22166. }
  22167. ]
  22168. }
  22169. },
  22170. "result": {},
  22171. "provider": {
  22172. "type": "object",
  22173. "properties": {
  22174. "executed": {
  22175. "type": "boolean"
  22176. },
  22177. "metadata": {
  22178. "type": "object",
  22179. "additionalProperties": {
  22180. "type": "object"
  22181. }
  22182. }
  22183. },
  22184. "required": ["executed"],
  22185. "additionalProperties": false
  22186. }
  22187. },
  22188. "required": [
  22189. "timestamp",
  22190. "sessionID",
  22191. "assistantMessageID",
  22192. "callID",
  22193. "structured",
  22194. "content",
  22195. "provider"
  22196. ],
  22197. "additionalProperties": false
  22198. }
  22199. },
  22200. "required": ["type", "id", "seq", "aggregateID", "data"],
  22201. "additionalProperties": false
  22202. }
  22203. },
  22204. "required": ["type", "id", "syncEvent"],
  22205. "additionalProperties": false
  22206. },
  22207. "SyncEventSessionNextToolFailed": {
  22208. "type": "object",
  22209. "properties": {
  22210. "type": {
  22211. "type": "string",
  22212. "enum": ["sync"]
  22213. },
  22214. "id": {
  22215. "type": "string"
  22216. },
  22217. "syncEvent": {
  22218. "type": "object",
  22219. "properties": {
  22220. "type": {
  22221. "type": "string",
  22222. "enum": ["session.next.tool.failed.1"]
  22223. },
  22224. "id": {
  22225. "type": "string"
  22226. },
  22227. "seq": {
  22228. "type": "number"
  22229. },
  22230. "aggregateID": {
  22231. "type": "string"
  22232. },
  22233. "data": {
  22234. "type": "object",
  22235. "properties": {
  22236. "timestamp": {
  22237. "type": "number"
  22238. },
  22239. "sessionID": {
  22240. "type": "string",
  22241. "pattern": "^ses"
  22242. },
  22243. "assistantMessageID": {
  22244. "type": "string"
  22245. },
  22246. "callID": {
  22247. "type": "string"
  22248. },
  22249. "error": {
  22250. "$ref": "#/components/schemas/SessionErrorUnknown"
  22251. },
  22252. "result": {},
  22253. "provider": {
  22254. "type": "object",
  22255. "properties": {
  22256. "executed": {
  22257. "type": "boolean"
  22258. },
  22259. "metadata": {
  22260. "type": "object",
  22261. "additionalProperties": {
  22262. "type": "object"
  22263. }
  22264. }
  22265. },
  22266. "required": ["executed"],
  22267. "additionalProperties": false
  22268. }
  22269. },
  22270. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  22271. "additionalProperties": false
  22272. }
  22273. },
  22274. "required": ["type", "id", "seq", "aggregateID", "data"],
  22275. "additionalProperties": false
  22276. }
  22277. },
  22278. "required": ["type", "id", "syncEvent"],
  22279. "additionalProperties": false
  22280. },
  22281. "SyncEventSessionNextRetried": {
  22282. "type": "object",
  22283. "properties": {
  22284. "type": {
  22285. "type": "string",
  22286. "enum": ["sync"]
  22287. },
  22288. "id": {
  22289. "type": "string"
  22290. },
  22291. "syncEvent": {
  22292. "type": "object",
  22293. "properties": {
  22294. "type": {
  22295. "type": "string",
  22296. "enum": ["session.next.retried.1"]
  22297. },
  22298. "id": {
  22299. "type": "string"
  22300. },
  22301. "seq": {
  22302. "type": "number"
  22303. },
  22304. "aggregateID": {
  22305. "type": "string"
  22306. },
  22307. "data": {
  22308. "type": "object",
  22309. "properties": {
  22310. "timestamp": {
  22311. "type": "number"
  22312. },
  22313. "sessionID": {
  22314. "type": "string",
  22315. "pattern": "^ses"
  22316. },
  22317. "attempt": {
  22318. "type": "number"
  22319. },
  22320. "error": {
  22321. "$ref": "#/components/schemas/SessionNextRetry_error"
  22322. }
  22323. },
  22324. "required": ["timestamp", "sessionID", "attempt", "error"],
  22325. "additionalProperties": false
  22326. }
  22327. },
  22328. "required": ["type", "id", "seq", "aggregateID", "data"],
  22329. "additionalProperties": false
  22330. }
  22331. },
  22332. "required": ["type", "id", "syncEvent"],
  22333. "additionalProperties": false
  22334. },
  22335. "SyncEventSessionNextCompactionStarted": {
  22336. "type": "object",
  22337. "properties": {
  22338. "type": {
  22339. "type": "string",
  22340. "enum": ["sync"]
  22341. },
  22342. "id": {
  22343. "type": "string"
  22344. },
  22345. "syncEvent": {
  22346. "type": "object",
  22347. "properties": {
  22348. "type": {
  22349. "type": "string",
  22350. "enum": ["session.next.compaction.started.1"]
  22351. },
  22352. "id": {
  22353. "type": "string"
  22354. },
  22355. "seq": {
  22356. "type": "number"
  22357. },
  22358. "aggregateID": {
  22359. "type": "string"
  22360. },
  22361. "data": {
  22362. "type": "object",
  22363. "properties": {
  22364. "timestamp": {
  22365. "type": "number"
  22366. },
  22367. "sessionID": {
  22368. "type": "string",
  22369. "pattern": "^ses"
  22370. },
  22371. "reason": {
  22372. "type": "string",
  22373. "enum": ["auto", "manual"]
  22374. }
  22375. },
  22376. "required": ["timestamp", "sessionID", "reason"],
  22377. "additionalProperties": false
  22378. }
  22379. },
  22380. "required": ["type", "id", "seq", "aggregateID", "data"],
  22381. "additionalProperties": false
  22382. }
  22383. },
  22384. "required": ["type", "id", "syncEvent"],
  22385. "additionalProperties": false
  22386. },
  22387. "SyncEventSessionNextCompactionDelta": {
  22388. "type": "object",
  22389. "properties": {
  22390. "type": {
  22391. "type": "string",
  22392. "enum": ["sync"]
  22393. },
  22394. "id": {
  22395. "type": "string"
  22396. },
  22397. "syncEvent": {
  22398. "type": "object",
  22399. "properties": {
  22400. "type": {
  22401. "type": "string",
  22402. "enum": ["session.next.compaction.delta.1"]
  22403. },
  22404. "id": {
  22405. "type": "string"
  22406. },
  22407. "seq": {
  22408. "type": "number"
  22409. },
  22410. "aggregateID": {
  22411. "type": "string"
  22412. },
  22413. "data": {
  22414. "type": "object",
  22415. "properties": {
  22416. "timestamp": {
  22417. "type": "number"
  22418. },
  22419. "sessionID": {
  22420. "type": "string",
  22421. "pattern": "^ses"
  22422. },
  22423. "text": {
  22424. "type": "string"
  22425. }
  22426. },
  22427. "required": ["timestamp", "sessionID", "text"],
  22428. "additionalProperties": false
  22429. }
  22430. },
  22431. "required": ["type", "id", "seq", "aggregateID", "data"],
  22432. "additionalProperties": false
  22433. }
  22434. },
  22435. "required": ["type", "id", "syncEvent"],
  22436. "additionalProperties": false
  22437. },
  22438. "SyncEventSessionNextCompactionEnded": {
  22439. "type": "object",
  22440. "properties": {
  22441. "type": {
  22442. "type": "string",
  22443. "enum": ["sync"]
  22444. },
  22445. "id": {
  22446. "type": "string"
  22447. },
  22448. "syncEvent": {
  22449. "type": "object",
  22450. "properties": {
  22451. "type": {
  22452. "type": "string",
  22453. "enum": ["session.next.compaction.ended.1"]
  22454. },
  22455. "id": {
  22456. "type": "string"
  22457. },
  22458. "seq": {
  22459. "type": "number"
  22460. },
  22461. "aggregateID": {
  22462. "type": "string"
  22463. },
  22464. "data": {
  22465. "type": "object",
  22466. "properties": {
  22467. "timestamp": {
  22468. "type": "number"
  22469. },
  22470. "sessionID": {
  22471. "type": "string",
  22472. "pattern": "^ses"
  22473. },
  22474. "text": {
  22475. "type": "string"
  22476. },
  22477. "include": {
  22478. "type": "string"
  22479. }
  22480. },
  22481. "required": ["timestamp", "sessionID", "text"],
  22482. "additionalProperties": false
  22483. }
  22484. },
  22485. "required": ["type", "id", "seq", "aggregateID", "data"],
  22486. "additionalProperties": false
  22487. }
  22488. },
  22489. "required": ["type", "id", "syncEvent"],
  22490. "additionalProperties": false
  22491. },
  22492. "PolicyEffect": {
  22493. "type": "string",
  22494. "enum": ["allow", "deny"]
  22495. },
  22496. "ConfigV2ExperimentalPolicy": {
  22497. "type": "object",
  22498. "properties": {
  22499. "action": {
  22500. "type": "string",
  22501. "enum": ["provider.use"]
  22502. },
  22503. "effect": {
  22504. "$ref": "#/components/schemas/PolicyEffect"
  22505. },
  22506. "resource": {
  22507. "type": "string"
  22508. }
  22509. },
  22510. "required": ["action", "effect", "resource"],
  22511. "additionalProperties": false
  22512. },
  22513. "ProjectDirectories": {
  22514. "type": "array",
  22515. "items": {
  22516. "type": "string"
  22517. }
  22518. },
  22519. "ProjectCopyCopy": {
  22520. "type": "object",
  22521. "properties": {
  22522. "directory": {
  22523. "type": "string"
  22524. }
  22525. },
  22526. "required": ["directory"],
  22527. "additionalProperties": false
  22528. },
  22529. "LocationInfo": {
  22530. "type": "object",
  22531. "properties": {
  22532. "directory": {
  22533. "type": "string"
  22534. },
  22535. "workspaceID": {
  22536. "type": "string",
  22537. "pattern": "^wrk"
  22538. },
  22539. "project": {
  22540. "type": "object",
  22541. "properties": {
  22542. "id": {
  22543. "type": "string"
  22544. },
  22545. "directory": {
  22546. "type": "string"
  22547. }
  22548. },
  22549. "required": ["id", "directory"],
  22550. "additionalProperties": false
  22551. }
  22552. },
  22553. "required": ["directory", "project"],
  22554. "additionalProperties": false
  22555. },
  22556. "PermissionV2Effect": {
  22557. "type": "string",
  22558. "enum": ["allow", "deny", "ask"]
  22559. },
  22560. "PermissionV2Rule": {
  22561. "type": "object",
  22562. "properties": {
  22563. "action": {
  22564. "type": "string"
  22565. },
  22566. "resource": {
  22567. "type": "string"
  22568. },
  22569. "effect": {
  22570. "$ref": "#/components/schemas/PermissionV2Effect"
  22571. }
  22572. },
  22573. "required": ["action", "resource", "effect"],
  22574. "additionalProperties": false
  22575. },
  22576. "PermissionV2Ruleset": {
  22577. "type": "array",
  22578. "items": {
  22579. "$ref": "#/components/schemas/PermissionV2Rule"
  22580. }
  22581. },
  22582. "AgentV2Info": {
  22583. "type": "object",
  22584. "properties": {
  22585. "id": {
  22586. "type": "string"
  22587. },
  22588. "model": {
  22589. "type": "object",
  22590. "properties": {
  22591. "id": {
  22592. "type": "string"
  22593. },
  22594. "providerID": {
  22595. "type": "string"
  22596. },
  22597. "variant": {
  22598. "type": "string"
  22599. }
  22600. },
  22601. "required": ["id", "providerID"],
  22602. "additionalProperties": false
  22603. },
  22604. "request": {
  22605. "type": "object",
  22606. "properties": {
  22607. "headers": {
  22608. "type": "object",
  22609. "additionalProperties": {
  22610. "type": "string"
  22611. }
  22612. },
  22613. "body": {
  22614. "type": "object"
  22615. }
  22616. },
  22617. "required": ["headers", "body"],
  22618. "additionalProperties": false
  22619. },
  22620. "system": {
  22621. "type": "string"
  22622. },
  22623. "description": {
  22624. "type": "string"
  22625. },
  22626. "mode": {
  22627. "type": "string",
  22628. "enum": ["subagent", "primary", "all"]
  22629. },
  22630. "hidden": {
  22631. "type": "boolean"
  22632. },
  22633. "color": {
  22634. "anyOf": [
  22635. {
  22636. "type": "string",
  22637. "pattern": "^#[0-9a-fA-F]{6}$"
  22638. },
  22639. {
  22640. "type": "string",
  22641. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  22642. }
  22643. ]
  22644. },
  22645. "steps": {
  22646. "type": "integer",
  22647. "exclusiveMinimum": 0
  22648. },
  22649. "permissions": {
  22650. "$ref": "#/components/schemas/PermissionV2Ruleset"
  22651. }
  22652. },
  22653. "required": ["id", "request", "mode", "hidden", "permissions"],
  22654. "additionalProperties": false
  22655. },
  22656. "LocationRef": {
  22657. "type": "object",
  22658. "properties": {
  22659. "directory": {
  22660. "type": "string"
  22661. },
  22662. "workspaceID": {
  22663. "type": "string",
  22664. "pattern": "^wrk"
  22665. }
  22666. },
  22667. "required": ["directory"],
  22668. "additionalProperties": false
  22669. },
  22670. "SessionV2Info": {
  22671. "type": "object",
  22672. "properties": {
  22673. "id": {
  22674. "type": "string",
  22675. "pattern": "^ses"
  22676. },
  22677. "parentID": {
  22678. "type": "string",
  22679. "pattern": "^ses"
  22680. },
  22681. "projectID": {
  22682. "type": "string"
  22683. },
  22684. "agent": {
  22685. "type": "string"
  22686. },
  22687. "model": {
  22688. "type": "object",
  22689. "properties": {
  22690. "id": {
  22691. "type": "string"
  22692. },
  22693. "providerID": {
  22694. "type": "string"
  22695. },
  22696. "variant": {
  22697. "type": "string"
  22698. }
  22699. },
  22700. "required": ["id", "providerID"],
  22701. "additionalProperties": false
  22702. },
  22703. "cost": {
  22704. "type": "number"
  22705. },
  22706. "tokens": {
  22707. "type": "object",
  22708. "properties": {
  22709. "input": {
  22710. "type": "number"
  22711. },
  22712. "output": {
  22713. "type": "number"
  22714. },
  22715. "reasoning": {
  22716. "type": "number"
  22717. },
  22718. "cache": {
  22719. "type": "object",
  22720. "properties": {
  22721. "read": {
  22722. "type": "number"
  22723. },
  22724. "write": {
  22725. "type": "number"
  22726. }
  22727. },
  22728. "required": ["read", "write"],
  22729. "additionalProperties": false
  22730. }
  22731. },
  22732. "required": ["input", "output", "reasoning", "cache"],
  22733. "additionalProperties": false
  22734. },
  22735. "time": {
  22736. "type": "object",
  22737. "properties": {
  22738. "created": {
  22739. "type": "number"
  22740. },
  22741. "updated": {
  22742. "type": "number"
  22743. },
  22744. "archived": {
  22745. "type": "number"
  22746. }
  22747. },
  22748. "required": ["created", "updated"],
  22749. "additionalProperties": false
  22750. },
  22751. "title": {
  22752. "type": "string"
  22753. },
  22754. "location": {
  22755. "$ref": "#/components/schemas/LocationRef"
  22756. },
  22757. "subpath": {
  22758. "type": "string"
  22759. }
  22760. },
  22761. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  22762. "additionalProperties": false
  22763. },
  22764. "SessionMessageUser": {
  22765. "type": "object",
  22766. "properties": {
  22767. "id": {
  22768. "type": "string"
  22769. },
  22770. "metadata": {
  22771. "type": "object"
  22772. },
  22773. "time": {
  22774. "type": "object",
  22775. "properties": {
  22776. "created": {
  22777. "type": "number"
  22778. }
  22779. },
  22780. "required": ["created"],
  22781. "additionalProperties": false
  22782. },
  22783. "text": {
  22784. "type": "string"
  22785. },
  22786. "files": {
  22787. "type": "array",
  22788. "items": {
  22789. "$ref": "#/components/schemas/PromptFileAttachment"
  22790. }
  22791. },
  22792. "agents": {
  22793. "type": "array",
  22794. "items": {
  22795. "$ref": "#/components/schemas/PromptAgentAttachment"
  22796. }
  22797. },
  22798. "references": {
  22799. "type": "array",
  22800. "items": {
  22801. "$ref": "#/components/schemas/PromptReferenceAttachment"
  22802. }
  22803. },
  22804. "type": {
  22805. "type": "string",
  22806. "enum": ["user"]
  22807. }
  22808. },
  22809. "required": ["id", "time", "text", "type"],
  22810. "additionalProperties": false
  22811. },
  22812. "SessionMessageAgentSwitched": {
  22813. "type": "object",
  22814. "properties": {
  22815. "id": {
  22816. "type": "string"
  22817. },
  22818. "metadata": {
  22819. "type": "object"
  22820. },
  22821. "time": {
  22822. "type": "object",
  22823. "properties": {
  22824. "created": {
  22825. "type": "number"
  22826. }
  22827. },
  22828. "required": ["created"],
  22829. "additionalProperties": false
  22830. },
  22831. "type": {
  22832. "type": "string",
  22833. "enum": ["agent-switched"]
  22834. },
  22835. "agent": {
  22836. "type": "string"
  22837. }
  22838. },
  22839. "required": ["id", "time", "type", "agent"],
  22840. "additionalProperties": false
  22841. },
  22842. "SessionMessageModelSwitched": {
  22843. "type": "object",
  22844. "properties": {
  22845. "id": {
  22846. "type": "string"
  22847. },
  22848. "metadata": {
  22849. "type": "object"
  22850. },
  22851. "time": {
  22852. "type": "object",
  22853. "properties": {
  22854. "created": {
  22855. "type": "number"
  22856. }
  22857. },
  22858. "required": ["created"],
  22859. "additionalProperties": false
  22860. },
  22861. "type": {
  22862. "type": "string",
  22863. "enum": ["model-switched"]
  22864. },
  22865. "model": {
  22866. "type": "object",
  22867. "properties": {
  22868. "id": {
  22869. "type": "string"
  22870. },
  22871. "providerID": {
  22872. "type": "string"
  22873. },
  22874. "variant": {
  22875. "type": "string"
  22876. }
  22877. },
  22878. "required": ["id", "providerID"],
  22879. "additionalProperties": false
  22880. }
  22881. },
  22882. "required": ["id", "time", "type", "model"],
  22883. "additionalProperties": false
  22884. },
  22885. "SessionMessageSynthetic": {
  22886. "type": "object",
  22887. "properties": {
  22888. "id": {
  22889. "type": "string"
  22890. },
  22891. "metadata": {
  22892. "type": "object"
  22893. },
  22894. "time": {
  22895. "type": "object",
  22896. "properties": {
  22897. "created": {
  22898. "type": "number"
  22899. }
  22900. },
  22901. "required": ["created"],
  22902. "additionalProperties": false
  22903. },
  22904. "sessionID": {
  22905. "type": "string",
  22906. "pattern": "^ses"
  22907. },
  22908. "text": {
  22909. "type": "string"
  22910. },
  22911. "type": {
  22912. "type": "string",
  22913. "enum": ["synthetic"]
  22914. }
  22915. },
  22916. "required": ["id", "time", "sessionID", "text", "type"],
  22917. "additionalProperties": false
  22918. },
  22919. "SessionMessageShell": {
  22920. "type": "object",
  22921. "properties": {
  22922. "id": {
  22923. "type": "string"
  22924. },
  22925. "metadata": {
  22926. "type": "object"
  22927. },
  22928. "time": {
  22929. "type": "object",
  22930. "properties": {
  22931. "created": {
  22932. "type": "number"
  22933. },
  22934. "completed": {
  22935. "type": "number"
  22936. }
  22937. },
  22938. "required": ["created"],
  22939. "additionalProperties": false
  22940. },
  22941. "type": {
  22942. "type": "string",
  22943. "enum": ["shell"]
  22944. },
  22945. "callID": {
  22946. "type": "string"
  22947. },
  22948. "command": {
  22949. "type": "string"
  22950. },
  22951. "output": {
  22952. "type": "string"
  22953. }
  22954. },
  22955. "required": ["id", "time", "type", "callID", "command", "output"],
  22956. "additionalProperties": false
  22957. },
  22958. "SessionMessageAssistantText": {
  22959. "type": "object",
  22960. "properties": {
  22961. "type": {
  22962. "type": "string",
  22963. "enum": ["text"]
  22964. },
  22965. "id": {
  22966. "type": "string"
  22967. },
  22968. "text": {
  22969. "type": "string"
  22970. }
  22971. },
  22972. "required": ["type", "id", "text"],
  22973. "additionalProperties": false
  22974. },
  22975. "SessionMessageAssistantReasoning": {
  22976. "type": "object",
  22977. "properties": {
  22978. "type": {
  22979. "type": "string",
  22980. "enum": ["reasoning"]
  22981. },
  22982. "id": {
  22983. "type": "string"
  22984. },
  22985. "text": {
  22986. "type": "string"
  22987. },
  22988. "providerMetadata": {
  22989. "type": "object",
  22990. "additionalProperties": {
  22991. "type": "object"
  22992. }
  22993. }
  22994. },
  22995. "required": ["type", "id", "text"],
  22996. "additionalProperties": false
  22997. },
  22998. "SessionMessageToolStatePending": {
  22999. "type": "object",
  23000. "properties": {
  23001. "status": {
  23002. "type": "string",
  23003. "enum": ["pending"]
  23004. },
  23005. "input": {
  23006. "type": "string"
  23007. }
  23008. },
  23009. "required": ["status", "input"],
  23010. "additionalProperties": false
  23011. },
  23012. "SessionMessageToolStateRunning": {
  23013. "type": "object",
  23014. "properties": {
  23015. "status": {
  23016. "type": "string",
  23017. "enum": ["running"]
  23018. },
  23019. "input": {
  23020. "type": "object"
  23021. },
  23022. "structured": {
  23023. "type": "object"
  23024. },
  23025. "content": {
  23026. "type": "array",
  23027. "items": {
  23028. "anyOf": [
  23029. {
  23030. "$ref": "#/components/schemas/ToolTextContent"
  23031. },
  23032. {
  23033. "$ref": "#/components/schemas/ToolFileContent"
  23034. }
  23035. ]
  23036. }
  23037. }
  23038. },
  23039. "required": ["status", "input", "structured", "content"],
  23040. "additionalProperties": false
  23041. },
  23042. "SessionMessageToolStateCompleted": {
  23043. "type": "object",
  23044. "properties": {
  23045. "status": {
  23046. "type": "string",
  23047. "enum": ["completed"]
  23048. },
  23049. "input": {
  23050. "type": "object"
  23051. },
  23052. "attachments": {
  23053. "type": "array",
  23054. "items": {
  23055. "$ref": "#/components/schemas/PromptFileAttachment"
  23056. }
  23057. },
  23058. "content": {
  23059. "type": "array",
  23060. "items": {
  23061. "anyOf": [
  23062. {
  23063. "$ref": "#/components/schemas/ToolTextContent"
  23064. },
  23065. {
  23066. "$ref": "#/components/schemas/ToolFileContent"
  23067. }
  23068. ]
  23069. }
  23070. },
  23071. "structured": {
  23072. "type": "object"
  23073. },
  23074. "result": {}
  23075. },
  23076. "required": ["status", "input", "content", "structured"],
  23077. "additionalProperties": false
  23078. },
  23079. "SessionMessageToolStateError": {
  23080. "type": "object",
  23081. "properties": {
  23082. "status": {
  23083. "type": "string",
  23084. "enum": ["error"]
  23085. },
  23086. "input": {
  23087. "type": "object"
  23088. },
  23089. "content": {
  23090. "type": "array",
  23091. "items": {
  23092. "anyOf": [
  23093. {
  23094. "$ref": "#/components/schemas/ToolTextContent"
  23095. },
  23096. {
  23097. "$ref": "#/components/schemas/ToolFileContent"
  23098. }
  23099. ]
  23100. }
  23101. },
  23102. "structured": {
  23103. "type": "object"
  23104. },
  23105. "error": {
  23106. "$ref": "#/components/schemas/SessionErrorUnknown"
  23107. },
  23108. "result": {}
  23109. },
  23110. "required": ["status", "input", "content", "structured", "error"],
  23111. "additionalProperties": false
  23112. },
  23113. "SessionMessageAssistantTool": {
  23114. "type": "object",
  23115. "properties": {
  23116. "type": {
  23117. "type": "string",
  23118. "enum": ["tool"]
  23119. },
  23120. "id": {
  23121. "type": "string"
  23122. },
  23123. "name": {
  23124. "type": "string"
  23125. },
  23126. "provider": {
  23127. "type": "object",
  23128. "properties": {
  23129. "executed": {
  23130. "type": "boolean"
  23131. },
  23132. "metadata": {
  23133. "type": "object",
  23134. "additionalProperties": {
  23135. "type": "object"
  23136. }
  23137. },
  23138. "resultMetadata": {
  23139. "type": "object",
  23140. "additionalProperties": {
  23141. "type": "object"
  23142. }
  23143. }
  23144. },
  23145. "required": ["executed"],
  23146. "additionalProperties": false
  23147. },
  23148. "state": {
  23149. "anyOf": [
  23150. {
  23151. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  23152. },
  23153. {
  23154. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  23155. },
  23156. {
  23157. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  23158. },
  23159. {
  23160. "$ref": "#/components/schemas/SessionMessageToolStateError"
  23161. }
  23162. ]
  23163. },
  23164. "time": {
  23165. "type": "object",
  23166. "properties": {
  23167. "created": {
  23168. "type": "number"
  23169. },
  23170. "ran": {
  23171. "type": "number"
  23172. },
  23173. "completed": {
  23174. "type": "number"
  23175. },
  23176. "pruned": {
  23177. "type": "number"
  23178. }
  23179. },
  23180. "required": ["created"],
  23181. "additionalProperties": false
  23182. }
  23183. },
  23184. "required": ["type", "id", "name", "state", "time"],
  23185. "additionalProperties": false
  23186. },
  23187. "SessionMessageAssistant": {
  23188. "type": "object",
  23189. "properties": {
  23190. "id": {
  23191. "type": "string"
  23192. },
  23193. "metadata": {
  23194. "type": "object"
  23195. },
  23196. "time": {
  23197. "type": "object",
  23198. "properties": {
  23199. "created": {
  23200. "type": "number"
  23201. },
  23202. "completed": {
  23203. "type": "number"
  23204. }
  23205. },
  23206. "required": ["created"],
  23207. "additionalProperties": false
  23208. },
  23209. "type": {
  23210. "type": "string",
  23211. "enum": ["assistant"]
  23212. },
  23213. "agent": {
  23214. "type": "string"
  23215. },
  23216. "model": {
  23217. "type": "object",
  23218. "properties": {
  23219. "id": {
  23220. "type": "string"
  23221. },
  23222. "providerID": {
  23223. "type": "string"
  23224. },
  23225. "variant": {
  23226. "type": "string"
  23227. }
  23228. },
  23229. "required": ["id", "providerID"],
  23230. "additionalProperties": false
  23231. },
  23232. "content": {
  23233. "type": "array",
  23234. "items": {
  23235. "anyOf": [
  23236. {
  23237. "$ref": "#/components/schemas/SessionMessageAssistantText"
  23238. },
  23239. {
  23240. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  23241. },
  23242. {
  23243. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  23244. }
  23245. ]
  23246. }
  23247. },
  23248. "snapshot": {
  23249. "type": "object",
  23250. "properties": {
  23251. "start": {
  23252. "type": "string"
  23253. },
  23254. "end": {
  23255. "type": "string"
  23256. }
  23257. },
  23258. "additionalProperties": false
  23259. },
  23260. "finish": {
  23261. "type": "string"
  23262. },
  23263. "cost": {
  23264. "type": "number"
  23265. },
  23266. "tokens": {
  23267. "type": "object",
  23268. "properties": {
  23269. "input": {
  23270. "type": "number"
  23271. },
  23272. "output": {
  23273. "type": "number"
  23274. },
  23275. "reasoning": {
  23276. "type": "number"
  23277. },
  23278. "cache": {
  23279. "type": "object",
  23280. "properties": {
  23281. "read": {
  23282. "type": "number"
  23283. },
  23284. "write": {
  23285. "type": "number"
  23286. }
  23287. },
  23288. "required": ["read", "write"],
  23289. "additionalProperties": false
  23290. }
  23291. },
  23292. "required": ["input", "output", "reasoning", "cache"],
  23293. "additionalProperties": false
  23294. },
  23295. "error": {
  23296. "$ref": "#/components/schemas/SessionErrorUnknown"
  23297. }
  23298. },
  23299. "required": ["id", "time", "type", "agent", "model", "content"],
  23300. "additionalProperties": false
  23301. },
  23302. "SessionMessageCompaction": {
  23303. "type": "object",
  23304. "properties": {
  23305. "type": {
  23306. "type": "string",
  23307. "enum": ["compaction"]
  23308. },
  23309. "reason": {
  23310. "type": "string",
  23311. "enum": ["auto", "manual"]
  23312. },
  23313. "summary": {
  23314. "type": "string"
  23315. },
  23316. "include": {
  23317. "type": "string"
  23318. },
  23319. "id": {
  23320. "type": "string"
  23321. },
  23322. "metadata": {
  23323. "type": "object"
  23324. },
  23325. "time": {
  23326. "type": "object",
  23327. "properties": {
  23328. "created": {
  23329. "type": "number"
  23330. }
  23331. },
  23332. "required": ["created"],
  23333. "additionalProperties": false
  23334. }
  23335. },
  23336. "required": ["type", "reason", "summary", "id", "time"],
  23337. "additionalProperties": false
  23338. },
  23339. "SessionMessage": {
  23340. "anyOf": [
  23341. {
  23342. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  23343. },
  23344. {
  23345. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  23346. },
  23347. {
  23348. "$ref": "#/components/schemas/SessionMessageUser"
  23349. },
  23350. {
  23351. "$ref": "#/components/schemas/SessionMessageSynthetic"
  23352. },
  23353. {
  23354. "$ref": "#/components/schemas/SessionMessageShell"
  23355. },
  23356. {
  23357. "$ref": "#/components/schemas/SessionMessageAssistant"
  23358. },
  23359. {
  23360. "$ref": "#/components/schemas/SessionMessageCompaction"
  23361. }
  23362. ]
  23363. },
  23364. "ProviderV2Info": {
  23365. "type": "object",
  23366. "properties": {
  23367. "id": {
  23368. "type": "string"
  23369. },
  23370. "name": {
  23371. "type": "string"
  23372. },
  23373. "enabled": {
  23374. "anyOf": [
  23375. {
  23376. "type": "boolean",
  23377. "enum": [false]
  23378. },
  23379. {
  23380. "type": "object",
  23381. "properties": {
  23382. "via": {
  23383. "type": "string",
  23384. "enum": ["env"]
  23385. },
  23386. "name": {
  23387. "type": "string"
  23388. }
  23389. },
  23390. "required": ["via", "name"],
  23391. "additionalProperties": false
  23392. },
  23393. {
  23394. "type": "object",
  23395. "properties": {
  23396. "via": {
  23397. "type": "string",
  23398. "enum": ["account"]
  23399. },
  23400. "service": {
  23401. "type": "string"
  23402. }
  23403. },
  23404. "required": ["via", "service"],
  23405. "additionalProperties": false
  23406. },
  23407. {
  23408. "type": "object",
  23409. "properties": {
  23410. "via": {
  23411. "type": "string",
  23412. "enum": ["custom"]
  23413. },
  23414. "data": {
  23415. "type": "object"
  23416. }
  23417. },
  23418. "required": ["via", "data"],
  23419. "additionalProperties": false
  23420. }
  23421. ]
  23422. },
  23423. "env": {
  23424. "type": "array",
  23425. "items": {
  23426. "type": "string"
  23427. }
  23428. },
  23429. "api": {
  23430. "anyOf": [
  23431. {
  23432. "type": "object",
  23433. "properties": {
  23434. "type": {
  23435. "type": "string",
  23436. "enum": ["aisdk"]
  23437. },
  23438. "package": {
  23439. "type": "string"
  23440. },
  23441. "url": {
  23442. "type": "string"
  23443. },
  23444. "settings": {
  23445. "type": "object"
  23446. }
  23447. },
  23448. "required": ["type", "package"],
  23449. "additionalProperties": false
  23450. },
  23451. {
  23452. "type": "object",
  23453. "properties": {
  23454. "type": {
  23455. "type": "string",
  23456. "enum": ["native"]
  23457. },
  23458. "url": {
  23459. "type": "string"
  23460. },
  23461. "settings": {
  23462. "type": "object"
  23463. }
  23464. },
  23465. "required": ["type", "settings"],
  23466. "additionalProperties": false
  23467. }
  23468. ]
  23469. },
  23470. "request": {
  23471. "type": "object",
  23472. "properties": {
  23473. "headers": {
  23474. "type": "object",
  23475. "additionalProperties": {
  23476. "type": "string"
  23477. }
  23478. },
  23479. "body": {
  23480. "type": "object"
  23481. }
  23482. },
  23483. "required": ["headers", "body"],
  23484. "additionalProperties": false
  23485. }
  23486. },
  23487. "required": ["id", "name", "enabled", "env", "api", "request"],
  23488. "additionalProperties": false
  23489. },
  23490. "PermissionV2Request": {
  23491. "type": "object",
  23492. "properties": {
  23493. "id": {
  23494. "type": "string",
  23495. "pattern": "^per"
  23496. },
  23497. "sessionID": {
  23498. "type": "string",
  23499. "pattern": "^ses"
  23500. },
  23501. "action": {
  23502. "type": "string"
  23503. },
  23504. "resources": {
  23505. "type": "array",
  23506. "items": {
  23507. "type": "string"
  23508. }
  23509. },
  23510. "save": {
  23511. "type": "array",
  23512. "items": {
  23513. "type": "string"
  23514. }
  23515. },
  23516. "metadata": {
  23517. "type": "object"
  23518. },
  23519. "source": {
  23520. "$ref": "#/components/schemas/PermissionV2Source"
  23521. }
  23522. },
  23523. "required": ["id", "sessionID", "action", "resources"],
  23524. "additionalProperties": false
  23525. },
  23526. "PermissionSavedInfo": {
  23527. "type": "object",
  23528. "properties": {
  23529. "id": {
  23530. "type": "string"
  23531. },
  23532. "projectID": {
  23533. "type": "string"
  23534. },
  23535. "action": {
  23536. "type": "string"
  23537. },
  23538. "resource": {
  23539. "type": "string"
  23540. }
  23541. },
  23542. "required": ["id", "projectID", "action", "resource"],
  23543. "additionalProperties": false
  23544. },
  23545. "FileSystemTextContent": {
  23546. "type": "object",
  23547. "properties": {
  23548. "type": {
  23549. "type": "string",
  23550. "enum": ["text"]
  23551. },
  23552. "content": {
  23553. "type": "string"
  23554. },
  23555. "mime": {
  23556. "type": "string"
  23557. }
  23558. },
  23559. "required": ["type", "content", "mime"],
  23560. "additionalProperties": false
  23561. },
  23562. "FileSystemBinaryContent": {
  23563. "type": "object",
  23564. "properties": {
  23565. "type": {
  23566. "type": "string",
  23567. "enum": ["binary"]
  23568. },
  23569. "content": {
  23570. "type": "string"
  23571. },
  23572. "encoding": {
  23573. "type": "string",
  23574. "enum": ["base64"]
  23575. },
  23576. "mime": {
  23577. "type": "string"
  23578. }
  23579. },
  23580. "required": ["type", "content", "encoding", "mime"],
  23581. "additionalProperties": false
  23582. },
  23583. "FileSystemEntry": {
  23584. "type": "object",
  23585. "properties": {
  23586. "path": {
  23587. "type": "string"
  23588. },
  23589. "uri": {
  23590. "type": "string"
  23591. },
  23592. "type": {
  23593. "type": "string",
  23594. "enum": ["file", "directory"]
  23595. },
  23596. "mime": {
  23597. "type": "string"
  23598. }
  23599. },
  23600. "required": ["path", "uri", "type", "mime"],
  23601. "additionalProperties": false
  23602. },
  23603. "CommandV2Info": {
  23604. "type": "object",
  23605. "properties": {
  23606. "name": {
  23607. "type": "string"
  23608. },
  23609. "template": {
  23610. "type": "string"
  23611. },
  23612. "description": {
  23613. "type": "string"
  23614. },
  23615. "agent": {
  23616. "type": "string"
  23617. },
  23618. "model": {
  23619. "type": "object",
  23620. "properties": {
  23621. "id": {
  23622. "type": "string"
  23623. },
  23624. "providerID": {
  23625. "type": "string"
  23626. },
  23627. "variant": {
  23628. "type": "string"
  23629. }
  23630. },
  23631. "required": ["id", "providerID"],
  23632. "additionalProperties": false
  23633. },
  23634. "subtask": {
  23635. "type": "boolean"
  23636. }
  23637. },
  23638. "required": ["name", "template"],
  23639. "additionalProperties": false
  23640. },
  23641. "SkillV2Info": {
  23642. "type": "object",
  23643. "properties": {
  23644. "name": {
  23645. "type": "string"
  23646. },
  23647. "description": {
  23648. "type": "string"
  23649. },
  23650. "slash": {
  23651. "type": "boolean"
  23652. },
  23653. "location": {
  23654. "type": "string"
  23655. },
  23656. "content": {
  23657. "type": "string"
  23658. }
  23659. },
  23660. "required": ["name", "location", "content"],
  23661. "additionalProperties": false
  23662. },
  23663. "QuestionV2Request": {
  23664. "type": "object",
  23665. "properties": {
  23666. "id": {
  23667. "type": "string",
  23668. "pattern": "^que"
  23669. },
  23670. "sessionID": {
  23671. "type": "string",
  23672. "pattern": "^ses"
  23673. },
  23674. "questions": {
  23675. "type": "array",
  23676. "items": {
  23677. "$ref": "#/components/schemas/QuestionV2Info"
  23678. },
  23679. "description": "Questions to ask"
  23680. },
  23681. "tool": {
  23682. "$ref": "#/components/schemas/QuestionV2Tool"
  23683. }
  23684. },
  23685. "required": ["id", "sessionID", "questions"],
  23686. "additionalProperties": false
  23687. },
  23688. "QuestionV2Reply": {
  23689. "type": "object",
  23690. "properties": {
  23691. "answers": {
  23692. "type": "array",
  23693. "items": {
  23694. "$ref": "#/components/schemas/QuestionV2Answer"
  23695. },
  23696. "description": "User answers in order of questions (each answer is an array of selected labels)"
  23697. }
  23698. },
  23699. "required": ["answers"],
  23700. "additionalProperties": false
  23701. },
  23702. "EventModels-devRefreshed": {
  23703. "type": "object",
  23704. "properties": {
  23705. "id": {
  23706. "type": "string"
  23707. },
  23708. "type": {
  23709. "type": "string",
  23710. "enum": ["models-dev.refreshed"]
  23711. },
  23712. "properties": {
  23713. "type": "object",
  23714. "properties": {}
  23715. }
  23716. },
  23717. "required": ["id", "type", "properties"],
  23718. "additionalProperties": false
  23719. },
  23720. "EventPluginAdded": {
  23721. "type": "object",
  23722. "properties": {
  23723. "id": {
  23724. "type": "string"
  23725. },
  23726. "type": {
  23727. "type": "string",
  23728. "enum": ["plugin.added"]
  23729. },
  23730. "properties": {
  23731. "type": "object",
  23732. "properties": {
  23733. "id": {
  23734. "type": "string"
  23735. }
  23736. },
  23737. "required": ["id"],
  23738. "additionalProperties": false
  23739. }
  23740. },
  23741. "required": ["id", "type", "properties"],
  23742. "additionalProperties": false
  23743. },
  23744. "ModelV2Info1": {
  23745. "type": "object",
  23746. "properties": {
  23747. "id": {
  23748. "type": "string"
  23749. },
  23750. "providerID": {
  23751. "type": "string"
  23752. },
  23753. "family": {
  23754. "type": "string"
  23755. },
  23756. "name": {
  23757. "type": "string"
  23758. },
  23759. "api": {
  23760. "anyOf": [
  23761. {
  23762. "type": "object",
  23763. "properties": {
  23764. "id": {
  23765. "type": "string"
  23766. },
  23767. "type": {
  23768. "type": "string",
  23769. "enum": ["aisdk"]
  23770. },
  23771. "package": {
  23772. "type": "string"
  23773. },
  23774. "url": {
  23775. "type": "string"
  23776. },
  23777. "settings": {
  23778. "type": "object"
  23779. }
  23780. },
  23781. "required": ["id", "type", "package"],
  23782. "additionalProperties": false
  23783. },
  23784. {
  23785. "type": "object",
  23786. "properties": {
  23787. "id": {
  23788. "type": "string"
  23789. },
  23790. "type": {
  23791. "type": "string",
  23792. "enum": ["native"]
  23793. },
  23794. "url": {
  23795. "type": "string"
  23796. },
  23797. "settings": {
  23798. "type": "object"
  23799. }
  23800. },
  23801. "required": ["id", "type", "settings"],
  23802. "additionalProperties": false
  23803. }
  23804. ]
  23805. },
  23806. "capabilities": {
  23807. "type": "object",
  23808. "properties": {
  23809. "tools": {
  23810. "type": "boolean"
  23811. },
  23812. "input": {
  23813. "type": "array",
  23814. "items": {
  23815. "type": "string"
  23816. }
  23817. },
  23818. "output": {
  23819. "type": "array",
  23820. "items": {
  23821. "type": "string"
  23822. }
  23823. }
  23824. },
  23825. "required": ["tools", "input", "output"],
  23826. "additionalProperties": false
  23827. },
  23828. "request": {
  23829. "type": "object",
  23830. "properties": {
  23831. "headers": {
  23832. "type": "object",
  23833. "additionalProperties": {
  23834. "type": "string"
  23835. }
  23836. },
  23837. "body": {
  23838. "type": "object"
  23839. },
  23840. "variant": {
  23841. "type": "string"
  23842. }
  23843. },
  23844. "required": ["headers", "body"],
  23845. "additionalProperties": false
  23846. },
  23847. "variants": {
  23848. "type": "array",
  23849. "items": {
  23850. "type": "object",
  23851. "properties": {
  23852. "id": {
  23853. "type": "string"
  23854. },
  23855. "headers": {
  23856. "type": "object",
  23857. "additionalProperties": {
  23858. "type": "string"
  23859. }
  23860. },
  23861. "body": {
  23862. "type": "object"
  23863. }
  23864. },
  23865. "required": ["id", "headers", "body"],
  23866. "additionalProperties": false
  23867. }
  23868. },
  23869. "time": {
  23870. "type": "object",
  23871. "properties": {
  23872. "released": {
  23873. "anyOf": [
  23874. {
  23875. "type": "number"
  23876. },
  23877. {
  23878. "type": "string",
  23879. "enum": ["NaN"]
  23880. },
  23881. {
  23882. "type": "string",
  23883. "enum": ["Infinity"]
  23884. },
  23885. {
  23886. "type": "string",
  23887. "enum": ["-Infinity"]
  23888. }
  23889. ]
  23890. }
  23891. },
  23892. "required": ["released"],
  23893. "additionalProperties": false
  23894. },
  23895. "cost": {
  23896. "type": "array",
  23897. "items": {
  23898. "type": "object",
  23899. "properties": {
  23900. "tier": {
  23901. "type": "object",
  23902. "properties": {
  23903. "type": {
  23904. "type": "string",
  23905. "enum": ["context"]
  23906. },
  23907. "size": {
  23908. "type": "integer"
  23909. }
  23910. },
  23911. "required": ["type", "size"],
  23912. "additionalProperties": false
  23913. },
  23914. "input": {
  23915. "type": "number"
  23916. },
  23917. "output": {
  23918. "type": "number"
  23919. },
  23920. "cache": {
  23921. "type": "object",
  23922. "properties": {
  23923. "read": {
  23924. "type": "number"
  23925. },
  23926. "write": {
  23927. "type": "number"
  23928. }
  23929. },
  23930. "required": ["read", "write"],
  23931. "additionalProperties": false
  23932. }
  23933. },
  23934. "required": ["input", "output", "cache"],
  23935. "additionalProperties": false
  23936. }
  23937. },
  23938. "status": {
  23939. "type": "string",
  23940. "enum": ["alpha", "beta", "deprecated", "active"]
  23941. },
  23942. "enabled": {
  23943. "type": "boolean"
  23944. },
  23945. "limit": {
  23946. "type": "object",
  23947. "properties": {
  23948. "context": {
  23949. "type": "integer"
  23950. },
  23951. "input": {
  23952. "type": "integer"
  23953. },
  23954. "output": {
  23955. "type": "integer"
  23956. }
  23957. },
  23958. "required": ["context", "output"],
  23959. "additionalProperties": false
  23960. }
  23961. },
  23962. "required": [
  23963. "id",
  23964. "providerID",
  23965. "name",
  23966. "api",
  23967. "capabilities",
  23968. "request",
  23969. "variants",
  23970. "time",
  23971. "cost",
  23972. "status",
  23973. "enabled",
  23974. "limit"
  23975. ],
  23976. "additionalProperties": false
  23977. },
  23978. "EventCatalogModelUpdated": {
  23979. "type": "object",
  23980. "properties": {
  23981. "id": {
  23982. "type": "string"
  23983. },
  23984. "type": {
  23985. "type": "string",
  23986. "enum": ["catalog.model.updated"]
  23987. },
  23988. "properties": {
  23989. "type": "object",
  23990. "properties": {
  23991. "model": {
  23992. "$ref": "#/components/schemas/ModelV2Info1"
  23993. }
  23994. },
  23995. "required": ["model"],
  23996. "additionalProperties": false
  23997. }
  23998. },
  23999. "required": ["id", "type", "properties"],
  24000. "additionalProperties": false
  24001. },
  24002. "EventSessionCreated": {
  24003. "type": "object",
  24004. "properties": {
  24005. "id": {
  24006. "type": "string"
  24007. },
  24008. "type": {
  24009. "type": "string",
  24010. "enum": ["session.created"]
  24011. },
  24012. "properties": {
  24013. "type": "object",
  24014. "properties": {
  24015. "sessionID": {
  24016. "type": "string",
  24017. "pattern": "^ses"
  24018. },
  24019. "info": {
  24020. "$ref": "#/components/schemas/Session"
  24021. }
  24022. },
  24023. "required": ["sessionID", "info"],
  24024. "additionalProperties": false
  24025. }
  24026. },
  24027. "required": ["id", "type", "properties"],
  24028. "additionalProperties": false
  24029. },
  24030. "EventSessionUpdated": {
  24031. "type": "object",
  24032. "properties": {
  24033. "id": {
  24034. "type": "string"
  24035. },
  24036. "type": {
  24037. "type": "string",
  24038. "enum": ["session.updated"]
  24039. },
  24040. "properties": {
  24041. "type": "object",
  24042. "properties": {
  24043. "sessionID": {
  24044. "type": "string",
  24045. "pattern": "^ses"
  24046. },
  24047. "info": {
  24048. "$ref": "#/components/schemas/Session"
  24049. }
  24050. },
  24051. "required": ["sessionID", "info"],
  24052. "additionalProperties": false
  24053. }
  24054. },
  24055. "required": ["id", "type", "properties"],
  24056. "additionalProperties": false
  24057. },
  24058. "EventSessionDeleted": {
  24059. "type": "object",
  24060. "properties": {
  24061. "id": {
  24062. "type": "string"
  24063. },
  24064. "type": {
  24065. "type": "string",
  24066. "enum": ["session.deleted"]
  24067. },
  24068. "properties": {
  24069. "type": "object",
  24070. "properties": {
  24071. "sessionID": {
  24072. "type": "string",
  24073. "pattern": "^ses"
  24074. },
  24075. "info": {
  24076. "$ref": "#/components/schemas/Session"
  24077. }
  24078. },
  24079. "required": ["sessionID", "info"],
  24080. "additionalProperties": false
  24081. }
  24082. },
  24083. "required": ["id", "type", "properties"],
  24084. "additionalProperties": false
  24085. },
  24086. "EventMessageUpdated": {
  24087. "type": "object",
  24088. "properties": {
  24089. "id": {
  24090. "type": "string"
  24091. },
  24092. "type": {
  24093. "type": "string",
  24094. "enum": ["message.updated"]
  24095. },
  24096. "properties": {
  24097. "type": "object",
  24098. "properties": {
  24099. "sessionID": {
  24100. "type": "string",
  24101. "pattern": "^ses"
  24102. },
  24103. "info": {
  24104. "$ref": "#/components/schemas/Message"
  24105. }
  24106. },
  24107. "required": ["sessionID", "info"],
  24108. "additionalProperties": false
  24109. }
  24110. },
  24111. "required": ["id", "type", "properties"],
  24112. "additionalProperties": false
  24113. },
  24114. "EventMessageRemoved": {
  24115. "type": "object",
  24116. "properties": {
  24117. "id": {
  24118. "type": "string"
  24119. },
  24120. "type": {
  24121. "type": "string",
  24122. "enum": ["message.removed"]
  24123. },
  24124. "properties": {
  24125. "type": "object",
  24126. "properties": {
  24127. "sessionID": {
  24128. "type": "string",
  24129. "pattern": "^ses"
  24130. },
  24131. "messageID": {
  24132. "type": "string",
  24133. "pattern": "^msg"
  24134. }
  24135. },
  24136. "required": ["sessionID", "messageID"],
  24137. "additionalProperties": false
  24138. }
  24139. },
  24140. "required": ["id", "type", "properties"],
  24141. "additionalProperties": false
  24142. },
  24143. "EventMessagePartUpdated": {
  24144. "type": "object",
  24145. "properties": {
  24146. "id": {
  24147. "type": "string"
  24148. },
  24149. "type": {
  24150. "type": "string",
  24151. "enum": ["message.part.updated"]
  24152. },
  24153. "properties": {
  24154. "type": "object",
  24155. "properties": {
  24156. "sessionID": {
  24157. "type": "string",
  24158. "pattern": "^ses"
  24159. },
  24160. "part": {
  24161. "$ref": "#/components/schemas/Part"
  24162. },
  24163. "time": {
  24164. "type": "number"
  24165. }
  24166. },
  24167. "required": ["sessionID", "part", "time"],
  24168. "additionalProperties": false
  24169. }
  24170. },
  24171. "required": ["id", "type", "properties"],
  24172. "additionalProperties": false
  24173. },
  24174. "EventMessagePartRemoved": {
  24175. "type": "object",
  24176. "properties": {
  24177. "id": {
  24178. "type": "string"
  24179. },
  24180. "type": {
  24181. "type": "string",
  24182. "enum": ["message.part.removed"]
  24183. },
  24184. "properties": {
  24185. "type": "object",
  24186. "properties": {
  24187. "sessionID": {
  24188. "type": "string",
  24189. "pattern": "^ses"
  24190. },
  24191. "messageID": {
  24192. "type": "string",
  24193. "pattern": "^msg"
  24194. },
  24195. "partID": {
  24196. "type": "string",
  24197. "pattern": "^prt"
  24198. }
  24199. },
  24200. "required": ["sessionID", "messageID", "partID"],
  24201. "additionalProperties": false
  24202. }
  24203. },
  24204. "required": ["id", "type", "properties"],
  24205. "additionalProperties": false
  24206. },
  24207. "EventSessionNextAgentSwitched": {
  24208. "type": "object",
  24209. "properties": {
  24210. "id": {
  24211. "type": "string"
  24212. },
  24213. "type": {
  24214. "type": "string",
  24215. "enum": ["session.next.agent.switched"]
  24216. },
  24217. "properties": {
  24218. "type": "object",
  24219. "properties": {
  24220. "timestamp": {
  24221. "type": "number"
  24222. },
  24223. "sessionID": {
  24224. "type": "string",
  24225. "pattern": "^ses"
  24226. },
  24227. "agent": {
  24228. "type": "string"
  24229. }
  24230. },
  24231. "required": ["timestamp", "sessionID", "agent"],
  24232. "additionalProperties": false
  24233. }
  24234. },
  24235. "required": ["id", "type", "properties"],
  24236. "additionalProperties": false
  24237. },
  24238. "EventSessionNextModelSwitched": {
  24239. "type": "object",
  24240. "properties": {
  24241. "id": {
  24242. "type": "string"
  24243. },
  24244. "type": {
  24245. "type": "string",
  24246. "enum": ["session.next.model.switched"]
  24247. },
  24248. "properties": {
  24249. "type": "object",
  24250. "properties": {
  24251. "timestamp": {
  24252. "type": "number"
  24253. },
  24254. "sessionID": {
  24255. "type": "string",
  24256. "pattern": "^ses"
  24257. },
  24258. "model": {
  24259. "type": "object",
  24260. "properties": {
  24261. "id": {
  24262. "type": "string"
  24263. },
  24264. "providerID": {
  24265. "type": "string"
  24266. },
  24267. "variant": {
  24268. "type": "string"
  24269. }
  24270. },
  24271. "required": ["id", "providerID"],
  24272. "additionalProperties": false
  24273. }
  24274. },
  24275. "required": ["timestamp", "sessionID", "model"],
  24276. "additionalProperties": false
  24277. }
  24278. },
  24279. "required": ["id", "type", "properties"],
  24280. "additionalProperties": false
  24281. },
  24282. "EventSessionNextPrompted": {
  24283. "type": "object",
  24284. "properties": {
  24285. "id": {
  24286. "type": "string"
  24287. },
  24288. "type": {
  24289. "type": "string",
  24290. "enum": ["session.next.prompted"]
  24291. },
  24292. "properties": {
  24293. "type": "object",
  24294. "properties": {
  24295. "timestamp": {
  24296. "type": "number"
  24297. },
  24298. "sessionID": {
  24299. "type": "string",
  24300. "pattern": "^ses"
  24301. },
  24302. "prompt": {
  24303. "$ref": "#/components/schemas/Prompt"
  24304. },
  24305. "delivery": {
  24306. "type": "string",
  24307. "enum": ["steer", "queue"]
  24308. }
  24309. },
  24310. "required": ["timestamp", "sessionID", "prompt", "delivery"],
  24311. "additionalProperties": false
  24312. }
  24313. },
  24314. "required": ["id", "type", "properties"],
  24315. "additionalProperties": false
  24316. },
  24317. "EventSessionNextSynthetic": {
  24318. "type": "object",
  24319. "properties": {
  24320. "id": {
  24321. "type": "string"
  24322. },
  24323. "type": {
  24324. "type": "string",
  24325. "enum": ["session.next.synthetic"]
  24326. },
  24327. "properties": {
  24328. "type": "object",
  24329. "properties": {
  24330. "timestamp": {
  24331. "type": "number"
  24332. },
  24333. "sessionID": {
  24334. "type": "string",
  24335. "pattern": "^ses"
  24336. },
  24337. "text": {
  24338. "type": "string"
  24339. }
  24340. },
  24341. "required": ["timestamp", "sessionID", "text"],
  24342. "additionalProperties": false
  24343. }
  24344. },
  24345. "required": ["id", "type", "properties"],
  24346. "additionalProperties": false
  24347. },
  24348. "EventSessionNextShellStarted": {
  24349. "type": "object",
  24350. "properties": {
  24351. "id": {
  24352. "type": "string"
  24353. },
  24354. "type": {
  24355. "type": "string",
  24356. "enum": ["session.next.shell.started"]
  24357. },
  24358. "properties": {
  24359. "type": "object",
  24360. "properties": {
  24361. "timestamp": {
  24362. "type": "number"
  24363. },
  24364. "sessionID": {
  24365. "type": "string",
  24366. "pattern": "^ses"
  24367. },
  24368. "callID": {
  24369. "type": "string"
  24370. },
  24371. "command": {
  24372. "type": "string"
  24373. }
  24374. },
  24375. "required": ["timestamp", "sessionID", "callID", "command"],
  24376. "additionalProperties": false
  24377. }
  24378. },
  24379. "required": ["id", "type", "properties"],
  24380. "additionalProperties": false
  24381. },
  24382. "EventSessionNextShellEnded": {
  24383. "type": "object",
  24384. "properties": {
  24385. "id": {
  24386. "type": "string"
  24387. },
  24388. "type": {
  24389. "type": "string",
  24390. "enum": ["session.next.shell.ended"]
  24391. },
  24392. "properties": {
  24393. "type": "object",
  24394. "properties": {
  24395. "timestamp": {
  24396. "type": "number"
  24397. },
  24398. "sessionID": {
  24399. "type": "string",
  24400. "pattern": "^ses"
  24401. },
  24402. "callID": {
  24403. "type": "string"
  24404. },
  24405. "output": {
  24406. "type": "string"
  24407. }
  24408. },
  24409. "required": ["timestamp", "sessionID", "callID", "output"],
  24410. "additionalProperties": false
  24411. }
  24412. },
  24413. "required": ["id", "type", "properties"],
  24414. "additionalProperties": false
  24415. },
  24416. "EventSessionNextStepStarted": {
  24417. "type": "object",
  24418. "properties": {
  24419. "id": {
  24420. "type": "string"
  24421. },
  24422. "type": {
  24423. "type": "string",
  24424. "enum": ["session.next.step.started"]
  24425. },
  24426. "properties": {
  24427. "type": "object",
  24428. "properties": {
  24429. "timestamp": {
  24430. "type": "number"
  24431. },
  24432. "sessionID": {
  24433. "type": "string",
  24434. "pattern": "^ses"
  24435. },
  24436. "agent": {
  24437. "type": "string"
  24438. },
  24439. "model": {
  24440. "type": "object",
  24441. "properties": {
  24442. "id": {
  24443. "type": "string"
  24444. },
  24445. "providerID": {
  24446. "type": "string"
  24447. },
  24448. "variant": {
  24449. "type": "string"
  24450. }
  24451. },
  24452. "required": ["id", "providerID"],
  24453. "additionalProperties": false
  24454. },
  24455. "snapshot": {
  24456. "type": "string"
  24457. }
  24458. },
  24459. "required": ["timestamp", "sessionID", "agent", "model"],
  24460. "additionalProperties": false
  24461. }
  24462. },
  24463. "required": ["id", "type", "properties"],
  24464. "additionalProperties": false
  24465. },
  24466. "EventSessionNextStepEnded": {
  24467. "type": "object",
  24468. "properties": {
  24469. "id": {
  24470. "type": "string"
  24471. },
  24472. "type": {
  24473. "type": "string",
  24474. "enum": ["session.next.step.ended"]
  24475. },
  24476. "properties": {
  24477. "type": "object",
  24478. "properties": {
  24479. "timestamp": {
  24480. "type": "number"
  24481. },
  24482. "sessionID": {
  24483. "type": "string",
  24484. "pattern": "^ses"
  24485. },
  24486. "assistantMessageID": {
  24487. "type": "string"
  24488. },
  24489. "finish": {
  24490. "type": "string"
  24491. },
  24492. "cost": {
  24493. "type": "number"
  24494. },
  24495. "tokens": {
  24496. "type": "object",
  24497. "properties": {
  24498. "input": {
  24499. "type": "number"
  24500. },
  24501. "output": {
  24502. "type": "number"
  24503. },
  24504. "reasoning": {
  24505. "type": "number"
  24506. },
  24507. "cache": {
  24508. "type": "object",
  24509. "properties": {
  24510. "read": {
  24511. "type": "number"
  24512. },
  24513. "write": {
  24514. "type": "number"
  24515. }
  24516. },
  24517. "required": ["read", "write"],
  24518. "additionalProperties": false
  24519. }
  24520. },
  24521. "required": ["input", "output", "reasoning", "cache"],
  24522. "additionalProperties": false
  24523. },
  24524. "snapshot": {
  24525. "type": "string"
  24526. }
  24527. },
  24528. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24529. "additionalProperties": false
  24530. }
  24531. },
  24532. "required": ["id", "type", "properties"],
  24533. "additionalProperties": false
  24534. },
  24535. "EventSessionNextStepFailed": {
  24536. "type": "object",
  24537. "properties": {
  24538. "id": {
  24539. "type": "string"
  24540. },
  24541. "type": {
  24542. "type": "string",
  24543. "enum": ["session.next.step.failed"]
  24544. },
  24545. "properties": {
  24546. "type": "object",
  24547. "properties": {
  24548. "timestamp": {
  24549. "type": "number"
  24550. },
  24551. "sessionID": {
  24552. "type": "string",
  24553. "pattern": "^ses"
  24554. },
  24555. "assistantMessageID": {
  24556. "type": "string"
  24557. },
  24558. "error": {
  24559. "$ref": "#/components/schemas/SessionErrorUnknown"
  24560. }
  24561. },
  24562. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24563. "additionalProperties": false
  24564. }
  24565. },
  24566. "required": ["id", "type", "properties"],
  24567. "additionalProperties": false
  24568. },
  24569. "EventSessionNextTextStarted": {
  24570. "type": "object",
  24571. "properties": {
  24572. "id": {
  24573. "type": "string"
  24574. },
  24575. "type": {
  24576. "type": "string",
  24577. "enum": ["session.next.text.started"]
  24578. },
  24579. "properties": {
  24580. "type": "object",
  24581. "properties": {
  24582. "timestamp": {
  24583. "type": "number"
  24584. },
  24585. "sessionID": {
  24586. "type": "string",
  24587. "pattern": "^ses"
  24588. },
  24589. "textID": {
  24590. "type": "string"
  24591. }
  24592. },
  24593. "required": ["timestamp", "sessionID", "textID"],
  24594. "additionalProperties": false
  24595. }
  24596. },
  24597. "required": ["id", "type", "properties"],
  24598. "additionalProperties": false
  24599. },
  24600. "EventSessionNextTextDelta": {
  24601. "type": "object",
  24602. "properties": {
  24603. "id": {
  24604. "type": "string"
  24605. },
  24606. "type": {
  24607. "type": "string",
  24608. "enum": ["session.next.text.delta"]
  24609. },
  24610. "properties": {
  24611. "type": "object",
  24612. "properties": {
  24613. "timestamp": {
  24614. "type": "number"
  24615. },
  24616. "sessionID": {
  24617. "type": "string",
  24618. "pattern": "^ses"
  24619. },
  24620. "textID": {
  24621. "type": "string"
  24622. },
  24623. "delta": {
  24624. "type": "string"
  24625. }
  24626. },
  24627. "required": ["timestamp", "sessionID", "textID", "delta"],
  24628. "additionalProperties": false
  24629. }
  24630. },
  24631. "required": ["id", "type", "properties"],
  24632. "additionalProperties": false
  24633. },
  24634. "EventSessionNextTextEnded": {
  24635. "type": "object",
  24636. "properties": {
  24637. "id": {
  24638. "type": "string"
  24639. },
  24640. "type": {
  24641. "type": "string",
  24642. "enum": ["session.next.text.ended"]
  24643. },
  24644. "properties": {
  24645. "type": "object",
  24646. "properties": {
  24647. "timestamp": {
  24648. "type": "number"
  24649. },
  24650. "sessionID": {
  24651. "type": "string",
  24652. "pattern": "^ses"
  24653. },
  24654. "textID": {
  24655. "type": "string"
  24656. },
  24657. "text": {
  24658. "type": "string"
  24659. }
  24660. },
  24661. "required": ["timestamp", "sessionID", "textID", "text"],
  24662. "additionalProperties": false
  24663. }
  24664. },
  24665. "required": ["id", "type", "properties"],
  24666. "additionalProperties": false
  24667. },
  24668. "EventSessionNextReasoningStarted": {
  24669. "type": "object",
  24670. "properties": {
  24671. "id": {
  24672. "type": "string"
  24673. },
  24674. "type": {
  24675. "type": "string",
  24676. "enum": ["session.next.reasoning.started"]
  24677. },
  24678. "properties": {
  24679. "type": "object",
  24680. "properties": {
  24681. "timestamp": {
  24682. "type": "number"
  24683. },
  24684. "sessionID": {
  24685. "type": "string",
  24686. "pattern": "^ses"
  24687. },
  24688. "reasoningID": {
  24689. "type": "string"
  24690. },
  24691. "providerMetadata": {
  24692. "type": "object",
  24693. "additionalProperties": {
  24694. "type": "object"
  24695. }
  24696. }
  24697. },
  24698. "required": ["timestamp", "sessionID", "reasoningID"],
  24699. "additionalProperties": false
  24700. }
  24701. },
  24702. "required": ["id", "type", "properties"],
  24703. "additionalProperties": false
  24704. },
  24705. "EventSessionNextReasoningDelta": {
  24706. "type": "object",
  24707. "properties": {
  24708. "id": {
  24709. "type": "string"
  24710. },
  24711. "type": {
  24712. "type": "string",
  24713. "enum": ["session.next.reasoning.delta"]
  24714. },
  24715. "properties": {
  24716. "type": "object",
  24717. "properties": {
  24718. "timestamp": {
  24719. "type": "number"
  24720. },
  24721. "sessionID": {
  24722. "type": "string",
  24723. "pattern": "^ses"
  24724. },
  24725. "reasoningID": {
  24726. "type": "string"
  24727. },
  24728. "delta": {
  24729. "type": "string"
  24730. }
  24731. },
  24732. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  24733. "additionalProperties": false
  24734. }
  24735. },
  24736. "required": ["id", "type", "properties"],
  24737. "additionalProperties": false
  24738. },
  24739. "EventSessionNextReasoningEnded": {
  24740. "type": "object",
  24741. "properties": {
  24742. "id": {
  24743. "type": "string"
  24744. },
  24745. "type": {
  24746. "type": "string",
  24747. "enum": ["session.next.reasoning.ended"]
  24748. },
  24749. "properties": {
  24750. "type": "object",
  24751. "properties": {
  24752. "timestamp": {
  24753. "type": "number"
  24754. },
  24755. "sessionID": {
  24756. "type": "string",
  24757. "pattern": "^ses"
  24758. },
  24759. "reasoningID": {
  24760. "type": "string"
  24761. },
  24762. "text": {
  24763. "type": "string"
  24764. },
  24765. "providerMetadata": {
  24766. "type": "object",
  24767. "additionalProperties": {
  24768. "type": "object"
  24769. }
  24770. }
  24771. },
  24772. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  24773. "additionalProperties": false
  24774. }
  24775. },
  24776. "required": ["id", "type", "properties"],
  24777. "additionalProperties": false
  24778. },
  24779. "EventSessionNextToolInputStarted": {
  24780. "type": "object",
  24781. "properties": {
  24782. "id": {
  24783. "type": "string"
  24784. },
  24785. "type": {
  24786. "type": "string",
  24787. "enum": ["session.next.tool.input.started"]
  24788. },
  24789. "properties": {
  24790. "type": "object",
  24791. "properties": {
  24792. "timestamp": {
  24793. "type": "number"
  24794. },
  24795. "sessionID": {
  24796. "type": "string",
  24797. "pattern": "^ses"
  24798. },
  24799. "assistantMessageID": {
  24800. "type": "string"
  24801. },
  24802. "callID": {
  24803. "type": "string"
  24804. },
  24805. "name": {
  24806. "type": "string"
  24807. }
  24808. },
  24809. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  24810. "additionalProperties": false
  24811. }
  24812. },
  24813. "required": ["id", "type", "properties"],
  24814. "additionalProperties": false
  24815. },
  24816. "EventSessionNextToolInputDelta": {
  24817. "type": "object",
  24818. "properties": {
  24819. "id": {
  24820. "type": "string"
  24821. },
  24822. "type": {
  24823. "type": "string",
  24824. "enum": ["session.next.tool.input.delta"]
  24825. },
  24826. "properties": {
  24827. "type": "object",
  24828. "properties": {
  24829. "timestamp": {
  24830. "type": "number"
  24831. },
  24832. "sessionID": {
  24833. "type": "string",
  24834. "pattern": "^ses"
  24835. },
  24836. "assistantMessageID": {
  24837. "type": "string"
  24838. },
  24839. "callID": {
  24840. "type": "string"
  24841. },
  24842. "delta": {
  24843. "type": "string"
  24844. }
  24845. },
  24846. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  24847. "additionalProperties": false
  24848. }
  24849. },
  24850. "required": ["id", "type", "properties"],
  24851. "additionalProperties": false
  24852. },
  24853. "EventSessionNextToolInputEnded": {
  24854. "type": "object",
  24855. "properties": {
  24856. "id": {
  24857. "type": "string"
  24858. },
  24859. "type": {
  24860. "type": "string",
  24861. "enum": ["session.next.tool.input.ended"]
  24862. },
  24863. "properties": {
  24864. "type": "object",
  24865. "properties": {
  24866. "timestamp": {
  24867. "type": "number"
  24868. },
  24869. "sessionID": {
  24870. "type": "string",
  24871. "pattern": "^ses"
  24872. },
  24873. "assistantMessageID": {
  24874. "type": "string"
  24875. },
  24876. "callID": {
  24877. "type": "string"
  24878. },
  24879. "text": {
  24880. "type": "string"
  24881. }
  24882. },
  24883. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  24884. "additionalProperties": false
  24885. }
  24886. },
  24887. "required": ["id", "type", "properties"],
  24888. "additionalProperties": false
  24889. },
  24890. "EventSessionNextToolCalled": {
  24891. "type": "object",
  24892. "properties": {
  24893. "id": {
  24894. "type": "string"
  24895. },
  24896. "type": {
  24897. "type": "string",
  24898. "enum": ["session.next.tool.called"]
  24899. },
  24900. "properties": {
  24901. "type": "object",
  24902. "properties": {
  24903. "timestamp": {
  24904. "type": "number"
  24905. },
  24906. "sessionID": {
  24907. "type": "string",
  24908. "pattern": "^ses"
  24909. },
  24910. "assistantMessageID": {
  24911. "type": "string"
  24912. },
  24913. "callID": {
  24914. "type": "string"
  24915. },
  24916. "tool": {
  24917. "type": "string"
  24918. },
  24919. "input": {
  24920. "type": "object"
  24921. },
  24922. "provider": {
  24923. "type": "object",
  24924. "properties": {
  24925. "executed": {
  24926. "type": "boolean"
  24927. },
  24928. "metadata": {
  24929. "type": "object",
  24930. "additionalProperties": {
  24931. "type": "object"
  24932. }
  24933. }
  24934. },
  24935. "required": ["executed"],
  24936. "additionalProperties": false
  24937. }
  24938. },
  24939. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  24940. "additionalProperties": false
  24941. }
  24942. },
  24943. "required": ["id", "type", "properties"],
  24944. "additionalProperties": false
  24945. },
  24946. "EventSessionNextToolProgress": {
  24947. "type": "object",
  24948. "properties": {
  24949. "id": {
  24950. "type": "string"
  24951. },
  24952. "type": {
  24953. "type": "string",
  24954. "enum": ["session.next.tool.progress"]
  24955. },
  24956. "properties": {
  24957. "type": "object",
  24958. "properties": {
  24959. "timestamp": {
  24960. "type": "number"
  24961. },
  24962. "sessionID": {
  24963. "type": "string",
  24964. "pattern": "^ses"
  24965. },
  24966. "assistantMessageID": {
  24967. "type": "string"
  24968. },
  24969. "callID": {
  24970. "type": "string"
  24971. },
  24972. "structured": {
  24973. "type": "object"
  24974. },
  24975. "content": {
  24976. "type": "array",
  24977. "items": {
  24978. "anyOf": [
  24979. {
  24980. "$ref": "#/components/schemas/ToolTextContent"
  24981. },
  24982. {
  24983. "$ref": "#/components/schemas/ToolFileContent"
  24984. }
  24985. ]
  24986. }
  24987. }
  24988. },
  24989. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  24990. "additionalProperties": false
  24991. }
  24992. },
  24993. "required": ["id", "type", "properties"],
  24994. "additionalProperties": false
  24995. },
  24996. "EventSessionNextToolSuccess": {
  24997. "type": "object",
  24998. "properties": {
  24999. "id": {
  25000. "type": "string"
  25001. },
  25002. "type": {
  25003. "type": "string",
  25004. "enum": ["session.next.tool.success"]
  25005. },
  25006. "properties": {
  25007. "type": "object",
  25008. "properties": {
  25009. "timestamp": {
  25010. "type": "number"
  25011. },
  25012. "sessionID": {
  25013. "type": "string",
  25014. "pattern": "^ses"
  25015. },
  25016. "assistantMessageID": {
  25017. "type": "string"
  25018. },
  25019. "callID": {
  25020. "type": "string"
  25021. },
  25022. "structured": {
  25023. "type": "object"
  25024. },
  25025. "content": {
  25026. "type": "array",
  25027. "items": {
  25028. "anyOf": [
  25029. {
  25030. "$ref": "#/components/schemas/ToolTextContent"
  25031. },
  25032. {
  25033. "$ref": "#/components/schemas/ToolFileContent"
  25034. }
  25035. ]
  25036. }
  25037. },
  25038. "result": {},
  25039. "provider": {
  25040. "type": "object",
  25041. "properties": {
  25042. "executed": {
  25043. "type": "boolean"
  25044. },
  25045. "metadata": {
  25046. "type": "object",
  25047. "additionalProperties": {
  25048. "type": "object"
  25049. }
  25050. }
  25051. },
  25052. "required": ["executed"],
  25053. "additionalProperties": false
  25054. }
  25055. },
  25056. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  25057. "additionalProperties": false
  25058. }
  25059. },
  25060. "required": ["id", "type", "properties"],
  25061. "additionalProperties": false
  25062. },
  25063. "EventSessionNextToolFailed": {
  25064. "type": "object",
  25065. "properties": {
  25066. "id": {
  25067. "type": "string"
  25068. },
  25069. "type": {
  25070. "type": "string",
  25071. "enum": ["session.next.tool.failed"]
  25072. },
  25073. "properties": {
  25074. "type": "object",
  25075. "properties": {
  25076. "timestamp": {
  25077. "type": "number"
  25078. },
  25079. "sessionID": {
  25080. "type": "string",
  25081. "pattern": "^ses"
  25082. },
  25083. "assistantMessageID": {
  25084. "type": "string"
  25085. },
  25086. "callID": {
  25087. "type": "string"
  25088. },
  25089. "error": {
  25090. "$ref": "#/components/schemas/SessionErrorUnknown"
  25091. },
  25092. "result": {},
  25093. "provider": {
  25094. "type": "object",
  25095. "properties": {
  25096. "executed": {
  25097. "type": "boolean"
  25098. },
  25099. "metadata": {
  25100. "type": "object",
  25101. "additionalProperties": {
  25102. "type": "object"
  25103. }
  25104. }
  25105. },
  25106. "required": ["executed"],
  25107. "additionalProperties": false
  25108. }
  25109. },
  25110. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25111. "additionalProperties": false
  25112. }
  25113. },
  25114. "required": ["id", "type", "properties"],
  25115. "additionalProperties": false
  25116. },
  25117. "EventSessionNextRetried": {
  25118. "type": "object",
  25119. "properties": {
  25120. "id": {
  25121. "type": "string"
  25122. },
  25123. "type": {
  25124. "type": "string",
  25125. "enum": ["session.next.retried"]
  25126. },
  25127. "properties": {
  25128. "type": "object",
  25129. "properties": {
  25130. "timestamp": {
  25131. "type": "number"
  25132. },
  25133. "sessionID": {
  25134. "type": "string",
  25135. "pattern": "^ses"
  25136. },
  25137. "attempt": {
  25138. "type": "number"
  25139. },
  25140. "error": {
  25141. "$ref": "#/components/schemas/SessionNextRetry_error"
  25142. }
  25143. },
  25144. "required": ["timestamp", "sessionID", "attempt", "error"],
  25145. "additionalProperties": false
  25146. }
  25147. },
  25148. "required": ["id", "type", "properties"],
  25149. "additionalProperties": false
  25150. },
  25151. "EventSessionNextCompactionStarted": {
  25152. "type": "object",
  25153. "properties": {
  25154. "id": {
  25155. "type": "string"
  25156. },
  25157. "type": {
  25158. "type": "string",
  25159. "enum": ["session.next.compaction.started"]
  25160. },
  25161. "properties": {
  25162. "type": "object",
  25163. "properties": {
  25164. "timestamp": {
  25165. "type": "number"
  25166. },
  25167. "sessionID": {
  25168. "type": "string",
  25169. "pattern": "^ses"
  25170. },
  25171. "reason": {
  25172. "type": "string",
  25173. "enum": ["auto", "manual"]
  25174. }
  25175. },
  25176. "required": ["timestamp", "sessionID", "reason"],
  25177. "additionalProperties": false
  25178. }
  25179. },
  25180. "required": ["id", "type", "properties"],
  25181. "additionalProperties": false
  25182. },
  25183. "EventSessionNextCompactionDelta": {
  25184. "type": "object",
  25185. "properties": {
  25186. "id": {
  25187. "type": "string"
  25188. },
  25189. "type": {
  25190. "type": "string",
  25191. "enum": ["session.next.compaction.delta"]
  25192. },
  25193. "properties": {
  25194. "type": "object",
  25195. "properties": {
  25196. "timestamp": {
  25197. "type": "number"
  25198. },
  25199. "sessionID": {
  25200. "type": "string",
  25201. "pattern": "^ses"
  25202. },
  25203. "text": {
  25204. "type": "string"
  25205. }
  25206. },
  25207. "required": ["timestamp", "sessionID", "text"],
  25208. "additionalProperties": false
  25209. }
  25210. },
  25211. "required": ["id", "type", "properties"],
  25212. "additionalProperties": false
  25213. },
  25214. "EventSessionNextCompactionEnded": {
  25215. "type": "object",
  25216. "properties": {
  25217. "id": {
  25218. "type": "string"
  25219. },
  25220. "type": {
  25221. "type": "string",
  25222. "enum": ["session.next.compaction.ended"]
  25223. },
  25224. "properties": {
  25225. "type": "object",
  25226. "properties": {
  25227. "timestamp": {
  25228. "type": "number"
  25229. },
  25230. "sessionID": {
  25231. "type": "string",
  25232. "pattern": "^ses"
  25233. },
  25234. "text": {
  25235. "type": "string"
  25236. },
  25237. "include": {
  25238. "type": "string"
  25239. }
  25240. },
  25241. "required": ["timestamp", "sessionID", "text"],
  25242. "additionalProperties": false
  25243. }
  25244. },
  25245. "required": ["id", "type", "properties"],
  25246. "additionalProperties": false
  25247. },
  25248. "EventMessagePartDelta": {
  25249. "type": "object",
  25250. "properties": {
  25251. "id": {
  25252. "type": "string"
  25253. },
  25254. "type": {
  25255. "type": "string",
  25256. "enum": ["message.part.delta"]
  25257. },
  25258. "properties": {
  25259. "type": "object",
  25260. "properties": {
  25261. "sessionID": {
  25262. "type": "string",
  25263. "pattern": "^ses"
  25264. },
  25265. "messageID": {
  25266. "type": "string",
  25267. "pattern": "^msg"
  25268. },
  25269. "partID": {
  25270. "type": "string",
  25271. "pattern": "^prt"
  25272. },
  25273. "field": {
  25274. "type": "string"
  25275. },
  25276. "delta": {
  25277. "type": "string"
  25278. }
  25279. },
  25280. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  25281. "additionalProperties": false
  25282. }
  25283. },
  25284. "required": ["id", "type", "properties"],
  25285. "additionalProperties": false
  25286. },
  25287. "EventSessionDiff": {
  25288. "type": "object",
  25289. "properties": {
  25290. "id": {
  25291. "type": "string"
  25292. },
  25293. "type": {
  25294. "type": "string",
  25295. "enum": ["session.diff"]
  25296. },
  25297. "properties": {
  25298. "type": "object",
  25299. "properties": {
  25300. "sessionID": {
  25301. "type": "string",
  25302. "pattern": "^ses"
  25303. },
  25304. "diff": {
  25305. "type": "array",
  25306. "items": {
  25307. "$ref": "#/components/schemas/SnapshotFileDiff"
  25308. }
  25309. }
  25310. },
  25311. "required": ["sessionID", "diff"],
  25312. "additionalProperties": false
  25313. }
  25314. },
  25315. "required": ["id", "type", "properties"],
  25316. "additionalProperties": false
  25317. },
  25318. "EventSessionError": {
  25319. "type": "object",
  25320. "properties": {
  25321. "id": {
  25322. "type": "string"
  25323. },
  25324. "type": {
  25325. "type": "string",
  25326. "enum": ["session.error"]
  25327. },
  25328. "properties": {
  25329. "type": "object",
  25330. "properties": {
  25331. "sessionID": {
  25332. "type": "string",
  25333. "pattern": "^ses"
  25334. },
  25335. "error": {
  25336. "anyOf": [
  25337. {
  25338. "$ref": "#/components/schemas/ProviderAuthError"
  25339. },
  25340. {
  25341. "$ref": "#/components/schemas/UnknownError"
  25342. },
  25343. {
  25344. "$ref": "#/components/schemas/MessageOutputLengthError"
  25345. },
  25346. {
  25347. "$ref": "#/components/schemas/MessageAbortedError"
  25348. },
  25349. {
  25350. "$ref": "#/components/schemas/StructuredOutputError"
  25351. },
  25352. {
  25353. "$ref": "#/components/schemas/ContextOverflowError"
  25354. },
  25355. {
  25356. "$ref": "#/components/schemas/APIError"
  25357. }
  25358. ]
  25359. }
  25360. },
  25361. "additionalProperties": false
  25362. }
  25363. },
  25364. "required": ["id", "type", "properties"],
  25365. "additionalProperties": false
  25366. },
  25367. "EventInstallationUpdated": {
  25368. "type": "object",
  25369. "properties": {
  25370. "id": {
  25371. "type": "string"
  25372. },
  25373. "type": {
  25374. "type": "string",
  25375. "enum": ["installation.updated"]
  25376. },
  25377. "properties": {
  25378. "type": "object",
  25379. "properties": {
  25380. "version": {
  25381. "type": "string"
  25382. }
  25383. },
  25384. "required": ["version"],
  25385. "additionalProperties": false
  25386. }
  25387. },
  25388. "required": ["id", "type", "properties"],
  25389. "additionalProperties": false
  25390. },
  25391. "EventInstallationUpdate-available": {
  25392. "type": "object",
  25393. "properties": {
  25394. "id": {
  25395. "type": "string"
  25396. },
  25397. "type": {
  25398. "type": "string",
  25399. "enum": ["installation.update-available"]
  25400. },
  25401. "properties": {
  25402. "type": "object",
  25403. "properties": {
  25404. "version": {
  25405. "type": "string"
  25406. }
  25407. },
  25408. "required": ["version"],
  25409. "additionalProperties": false
  25410. }
  25411. },
  25412. "required": ["id", "type", "properties"],
  25413. "additionalProperties": false
  25414. },
  25415. "EventFileEdited": {
  25416. "type": "object",
  25417. "properties": {
  25418. "id": {
  25419. "type": "string"
  25420. },
  25421. "type": {
  25422. "type": "string",
  25423. "enum": ["file.edited"]
  25424. },
  25425. "properties": {
  25426. "type": "object",
  25427. "properties": {
  25428. "file": {
  25429. "type": "string"
  25430. }
  25431. },
  25432. "required": ["file"],
  25433. "additionalProperties": false
  25434. }
  25435. },
  25436. "required": ["id", "type", "properties"],
  25437. "additionalProperties": false
  25438. },
  25439. "EventAccountAdded": {
  25440. "type": "object",
  25441. "properties": {
  25442. "id": {
  25443. "type": "string"
  25444. },
  25445. "type": {
  25446. "type": "string",
  25447. "enum": ["account.added"]
  25448. },
  25449. "properties": {
  25450. "type": "object",
  25451. "properties": {
  25452. "account": {
  25453. "$ref": "#/components/schemas/AuthInfo"
  25454. }
  25455. },
  25456. "required": ["account"],
  25457. "additionalProperties": false
  25458. }
  25459. },
  25460. "required": ["id", "type", "properties"],
  25461. "additionalProperties": false
  25462. },
  25463. "EventAccountRemoved": {
  25464. "type": "object",
  25465. "properties": {
  25466. "id": {
  25467. "type": "string"
  25468. },
  25469. "type": {
  25470. "type": "string",
  25471. "enum": ["account.removed"]
  25472. },
  25473. "properties": {
  25474. "type": "object",
  25475. "properties": {
  25476. "account": {
  25477. "$ref": "#/components/schemas/AuthInfo"
  25478. }
  25479. },
  25480. "required": ["account"],
  25481. "additionalProperties": false
  25482. }
  25483. },
  25484. "required": ["id", "type", "properties"],
  25485. "additionalProperties": false
  25486. },
  25487. "EventAccountSwitched": {
  25488. "type": "object",
  25489. "properties": {
  25490. "id": {
  25491. "type": "string"
  25492. },
  25493. "type": {
  25494. "type": "string",
  25495. "enum": ["account.switched"]
  25496. },
  25497. "properties": {
  25498. "type": "object",
  25499. "properties": {
  25500. "serviceID": {
  25501. "type": "string"
  25502. },
  25503. "from": {
  25504. "type": "string"
  25505. },
  25506. "to": {
  25507. "type": "string"
  25508. }
  25509. },
  25510. "required": ["serviceID"],
  25511. "additionalProperties": false
  25512. }
  25513. },
  25514. "required": ["id", "type", "properties"],
  25515. "additionalProperties": false
  25516. },
  25517. "EventPermissionV2Asked": {
  25518. "type": "object",
  25519. "properties": {
  25520. "id": {
  25521. "type": "string"
  25522. },
  25523. "type": {
  25524. "type": "string",
  25525. "enum": ["permission.v2.asked"]
  25526. },
  25527. "properties": {
  25528. "type": "object",
  25529. "properties": {
  25530. "id": {
  25531. "type": "string",
  25532. "pattern": "^per"
  25533. },
  25534. "sessionID": {
  25535. "type": "string",
  25536. "pattern": "^ses"
  25537. },
  25538. "action": {
  25539. "type": "string"
  25540. },
  25541. "resources": {
  25542. "type": "array",
  25543. "items": {
  25544. "type": "string"
  25545. }
  25546. },
  25547. "save": {
  25548. "type": "array",
  25549. "items": {
  25550. "type": "string"
  25551. }
  25552. },
  25553. "metadata": {
  25554. "type": "object"
  25555. },
  25556. "source": {
  25557. "$ref": "#/components/schemas/PermissionV2Source"
  25558. }
  25559. },
  25560. "required": ["id", "sessionID", "action", "resources"],
  25561. "additionalProperties": false
  25562. }
  25563. },
  25564. "required": ["id", "type", "properties"],
  25565. "additionalProperties": false
  25566. },
  25567. "EventPermissionV2Replied": {
  25568. "type": "object",
  25569. "properties": {
  25570. "id": {
  25571. "type": "string"
  25572. },
  25573. "type": {
  25574. "type": "string",
  25575. "enum": ["permission.v2.replied"]
  25576. },
  25577. "properties": {
  25578. "type": "object",
  25579. "properties": {
  25580. "sessionID": {
  25581. "type": "string",
  25582. "pattern": "^ses"
  25583. },
  25584. "requestID": {
  25585. "type": "string",
  25586. "pattern": "^per"
  25587. },
  25588. "reply": {
  25589. "$ref": "#/components/schemas/PermissionV2Reply"
  25590. }
  25591. },
  25592. "required": ["sessionID", "requestID", "reply"],
  25593. "additionalProperties": false
  25594. }
  25595. },
  25596. "required": ["id", "type", "properties"],
  25597. "additionalProperties": false
  25598. },
  25599. "EventFileWatcherUpdated": {
  25600. "type": "object",
  25601. "properties": {
  25602. "id": {
  25603. "type": "string"
  25604. },
  25605. "type": {
  25606. "type": "string",
  25607. "enum": ["file.watcher.updated"]
  25608. },
  25609. "properties": {
  25610. "type": "object",
  25611. "properties": {
  25612. "file": {
  25613. "type": "string"
  25614. },
  25615. "event": {
  25616. "type": "string",
  25617. "enum": ["add", "change", "unlink"]
  25618. }
  25619. },
  25620. "required": ["file", "event"],
  25621. "additionalProperties": false
  25622. }
  25623. },
  25624. "required": ["id", "type", "properties"],
  25625. "additionalProperties": false
  25626. },
  25627. "EventPtyCreated": {
  25628. "type": "object",
  25629. "properties": {
  25630. "id": {
  25631. "type": "string"
  25632. },
  25633. "type": {
  25634. "type": "string",
  25635. "enum": ["pty.created"]
  25636. },
  25637. "properties": {
  25638. "type": "object",
  25639. "properties": {
  25640. "info": {
  25641. "$ref": "#/components/schemas/Pty"
  25642. }
  25643. },
  25644. "required": ["info"],
  25645. "additionalProperties": false
  25646. }
  25647. },
  25648. "required": ["id", "type", "properties"],
  25649. "additionalProperties": false
  25650. },
  25651. "EventPtyUpdated": {
  25652. "type": "object",
  25653. "properties": {
  25654. "id": {
  25655. "type": "string"
  25656. },
  25657. "type": {
  25658. "type": "string",
  25659. "enum": ["pty.updated"]
  25660. },
  25661. "properties": {
  25662. "type": "object",
  25663. "properties": {
  25664. "info": {
  25665. "$ref": "#/components/schemas/Pty"
  25666. }
  25667. },
  25668. "required": ["info"],
  25669. "additionalProperties": false
  25670. }
  25671. },
  25672. "required": ["id", "type", "properties"],
  25673. "additionalProperties": false
  25674. },
  25675. "EventPtyExited": {
  25676. "type": "object",
  25677. "properties": {
  25678. "id": {
  25679. "type": "string"
  25680. },
  25681. "type": {
  25682. "type": "string",
  25683. "enum": ["pty.exited"]
  25684. },
  25685. "properties": {
  25686. "type": "object",
  25687. "properties": {
  25688. "id": {
  25689. "type": "string",
  25690. "pattern": "^pty"
  25691. },
  25692. "exitCode": {
  25693. "type": "integer",
  25694. "minimum": 0
  25695. }
  25696. },
  25697. "required": ["id", "exitCode"],
  25698. "additionalProperties": false
  25699. }
  25700. },
  25701. "required": ["id", "type", "properties"],
  25702. "additionalProperties": false
  25703. },
  25704. "EventPtyDeleted": {
  25705. "type": "object",
  25706. "properties": {
  25707. "id": {
  25708. "type": "string"
  25709. },
  25710. "type": {
  25711. "type": "string",
  25712. "enum": ["pty.deleted"]
  25713. },
  25714. "properties": {
  25715. "type": "object",
  25716. "properties": {
  25717. "id": {
  25718. "type": "string",
  25719. "pattern": "^pty"
  25720. }
  25721. },
  25722. "required": ["id"],
  25723. "additionalProperties": false
  25724. }
  25725. },
  25726. "required": ["id", "type", "properties"],
  25727. "additionalProperties": false
  25728. },
  25729. "EventQuestionV2Asked": {
  25730. "type": "object",
  25731. "properties": {
  25732. "id": {
  25733. "type": "string"
  25734. },
  25735. "type": {
  25736. "type": "string",
  25737. "enum": ["question.v2.asked"]
  25738. },
  25739. "properties": {
  25740. "type": "object",
  25741. "properties": {
  25742. "id": {
  25743. "type": "string",
  25744. "pattern": "^que"
  25745. },
  25746. "sessionID": {
  25747. "type": "string",
  25748. "pattern": "^ses"
  25749. },
  25750. "questions": {
  25751. "type": "array",
  25752. "items": {
  25753. "$ref": "#/components/schemas/QuestionV2Info"
  25754. },
  25755. "description": "Questions to ask"
  25756. },
  25757. "tool": {
  25758. "$ref": "#/components/schemas/QuestionV2Tool"
  25759. }
  25760. },
  25761. "required": ["id", "sessionID", "questions"],
  25762. "additionalProperties": false
  25763. }
  25764. },
  25765. "required": ["id", "type", "properties"],
  25766. "additionalProperties": false
  25767. },
  25768. "EventQuestionV2Replied": {
  25769. "type": "object",
  25770. "properties": {
  25771. "id": {
  25772. "type": "string"
  25773. },
  25774. "type": {
  25775. "type": "string",
  25776. "enum": ["question.v2.replied"]
  25777. },
  25778. "properties": {
  25779. "type": "object",
  25780. "properties": {
  25781. "sessionID": {
  25782. "type": "string",
  25783. "pattern": "^ses"
  25784. },
  25785. "requestID": {
  25786. "type": "string",
  25787. "pattern": "^que"
  25788. },
  25789. "answers": {
  25790. "type": "array",
  25791. "items": {
  25792. "$ref": "#/components/schemas/QuestionV2Answer"
  25793. }
  25794. }
  25795. },
  25796. "required": ["sessionID", "requestID", "answers"],
  25797. "additionalProperties": false
  25798. }
  25799. },
  25800. "required": ["id", "type", "properties"],
  25801. "additionalProperties": false
  25802. },
  25803. "EventQuestionV2Rejected": {
  25804. "type": "object",
  25805. "properties": {
  25806. "id": {
  25807. "type": "string"
  25808. },
  25809. "type": {
  25810. "type": "string",
  25811. "enum": ["question.v2.rejected"]
  25812. },
  25813. "properties": {
  25814. "type": "object",
  25815. "properties": {
  25816. "sessionID": {
  25817. "type": "string",
  25818. "pattern": "^ses"
  25819. },
  25820. "requestID": {
  25821. "type": "string",
  25822. "pattern": "^que"
  25823. }
  25824. },
  25825. "required": ["sessionID", "requestID"],
  25826. "additionalProperties": false
  25827. }
  25828. },
  25829. "required": ["id", "type", "properties"],
  25830. "additionalProperties": false
  25831. },
  25832. "EventTodoUpdated": {
  25833. "type": "object",
  25834. "properties": {
  25835. "id": {
  25836. "type": "string"
  25837. },
  25838. "type": {
  25839. "type": "string",
  25840. "enum": ["todo.updated"]
  25841. },
  25842. "properties": {
  25843. "type": "object",
  25844. "properties": {
  25845. "sessionID": {
  25846. "type": "string",
  25847. "pattern": "^ses"
  25848. },
  25849. "todos": {
  25850. "type": "array",
  25851. "items": {
  25852. "$ref": "#/components/schemas/Todo"
  25853. }
  25854. }
  25855. },
  25856. "required": ["sessionID", "todos"],
  25857. "additionalProperties": false
  25858. }
  25859. },
  25860. "required": ["id", "type", "properties"],
  25861. "additionalProperties": false
  25862. },
  25863. "EventLspUpdated": {
  25864. "type": "object",
  25865. "properties": {
  25866. "id": {
  25867. "type": "string"
  25868. },
  25869. "type": {
  25870. "type": "string",
  25871. "enum": ["lsp.updated"]
  25872. },
  25873. "properties": {
  25874. "type": "object",
  25875. "properties": {}
  25876. }
  25877. },
  25878. "required": ["id", "type", "properties"],
  25879. "additionalProperties": false
  25880. },
  25881. "EventPermissionAsked": {
  25882. "type": "object",
  25883. "properties": {
  25884. "id": {
  25885. "type": "string"
  25886. },
  25887. "type": {
  25888. "type": "string",
  25889. "enum": ["permission.asked"]
  25890. },
  25891. "properties": {
  25892. "type": "object",
  25893. "properties": {
  25894. "id": {
  25895. "type": "string",
  25896. "pattern": "^per"
  25897. },
  25898. "sessionID": {
  25899. "type": "string",
  25900. "pattern": "^ses"
  25901. },
  25902. "permission": {
  25903. "type": "string"
  25904. },
  25905. "patterns": {
  25906. "type": "array",
  25907. "items": {
  25908. "type": "string"
  25909. }
  25910. },
  25911. "metadata": {
  25912. "type": "object"
  25913. },
  25914. "always": {
  25915. "type": "array",
  25916. "items": {
  25917. "type": "string"
  25918. }
  25919. },
  25920. "tool": {
  25921. "type": "object",
  25922. "properties": {
  25923. "messageID": {
  25924. "type": "string"
  25925. },
  25926. "callID": {
  25927. "type": "string"
  25928. }
  25929. },
  25930. "required": ["messageID", "callID"],
  25931. "additionalProperties": false
  25932. }
  25933. },
  25934. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  25935. "additionalProperties": false
  25936. }
  25937. },
  25938. "required": ["id", "type", "properties"],
  25939. "additionalProperties": false
  25940. },
  25941. "EventPermissionReplied": {
  25942. "type": "object",
  25943. "properties": {
  25944. "id": {
  25945. "type": "string"
  25946. },
  25947. "type": {
  25948. "type": "string",
  25949. "enum": ["permission.replied"]
  25950. },
  25951. "properties": {
  25952. "type": "object",
  25953. "properties": {
  25954. "sessionID": {
  25955. "type": "string",
  25956. "pattern": "^ses"
  25957. },
  25958. "requestID": {
  25959. "type": "string",
  25960. "pattern": "^per"
  25961. },
  25962. "reply": {
  25963. "type": "string",
  25964. "enum": ["once", "always", "reject"]
  25965. }
  25966. },
  25967. "required": ["sessionID", "requestID", "reply"],
  25968. "additionalProperties": false
  25969. }
  25970. },
  25971. "required": ["id", "type", "properties"],
  25972. "additionalProperties": false
  25973. },
  25974. "EventMcpToolsChanged": {
  25975. "type": "object",
  25976. "properties": {
  25977. "id": {
  25978. "type": "string"
  25979. },
  25980. "type": {
  25981. "type": "string",
  25982. "enum": ["mcp.tools.changed"]
  25983. },
  25984. "properties": {
  25985. "type": "object",
  25986. "properties": {
  25987. "server": {
  25988. "type": "string"
  25989. }
  25990. },
  25991. "required": ["server"],
  25992. "additionalProperties": false
  25993. }
  25994. },
  25995. "required": ["id", "type", "properties"],
  25996. "additionalProperties": false
  25997. },
  25998. "EventMcpBrowserOpenFailed": {
  25999. "type": "object",
  26000. "properties": {
  26001. "id": {
  26002. "type": "string"
  26003. },
  26004. "type": {
  26005. "type": "string",
  26006. "enum": ["mcp.browser.open.failed"]
  26007. },
  26008. "properties": {
  26009. "type": "object",
  26010. "properties": {
  26011. "mcpName": {
  26012. "type": "string"
  26013. },
  26014. "url": {
  26015. "type": "string"
  26016. }
  26017. },
  26018. "required": ["mcpName", "url"],
  26019. "additionalProperties": false
  26020. }
  26021. },
  26022. "required": ["id", "type", "properties"],
  26023. "additionalProperties": false
  26024. },
  26025. "EventCommandExecuted": {
  26026. "type": "object",
  26027. "properties": {
  26028. "id": {
  26029. "type": "string"
  26030. },
  26031. "type": {
  26032. "type": "string",
  26033. "enum": ["command.executed"]
  26034. },
  26035. "properties": {
  26036. "type": "object",
  26037. "properties": {
  26038. "name": {
  26039. "type": "string"
  26040. },
  26041. "sessionID": {
  26042. "type": "string",
  26043. "pattern": "^ses"
  26044. },
  26045. "arguments": {
  26046. "type": "string"
  26047. },
  26048. "messageID": {
  26049. "type": "string",
  26050. "pattern": "^msg"
  26051. }
  26052. },
  26053. "required": ["name", "sessionID", "arguments", "messageID"],
  26054. "additionalProperties": false
  26055. }
  26056. },
  26057. "required": ["id", "type", "properties"],
  26058. "additionalProperties": false
  26059. },
  26060. "EventProjectDirectoriesUpdated": {
  26061. "type": "object",
  26062. "properties": {
  26063. "id": {
  26064. "type": "string"
  26065. },
  26066. "type": {
  26067. "type": "string",
  26068. "enum": ["project.directories.updated"]
  26069. },
  26070. "properties": {
  26071. "type": "object",
  26072. "properties": {
  26073. "projectID": {
  26074. "type": "string"
  26075. }
  26076. },
  26077. "required": ["projectID"],
  26078. "additionalProperties": false
  26079. }
  26080. },
  26081. "required": ["id", "type", "properties"],
  26082. "additionalProperties": false
  26083. },
  26084. "EventProjectUpdated": {
  26085. "type": "object",
  26086. "properties": {
  26087. "id": {
  26088. "type": "string"
  26089. },
  26090. "type": {
  26091. "type": "string",
  26092. "enum": ["project.updated"]
  26093. },
  26094. "properties": {
  26095. "type": "object",
  26096. "properties": {
  26097. "id": {
  26098. "type": "string"
  26099. },
  26100. "worktree": {
  26101. "type": "string"
  26102. },
  26103. "vcs": {
  26104. "type": "string",
  26105. "enum": ["git"]
  26106. },
  26107. "name": {
  26108. "type": "string"
  26109. },
  26110. "icon": {
  26111. "type": "object",
  26112. "properties": {
  26113. "url": {
  26114. "type": "string"
  26115. },
  26116. "override": {
  26117. "type": "string"
  26118. },
  26119. "color": {
  26120. "type": "string"
  26121. }
  26122. },
  26123. "additionalProperties": false
  26124. },
  26125. "commands": {
  26126. "type": "object",
  26127. "properties": {
  26128. "start": {
  26129. "type": "string",
  26130. "description": "Startup script to run when creating a new workspace (worktree)"
  26131. }
  26132. },
  26133. "additionalProperties": false
  26134. },
  26135. "time": {
  26136. "type": "object",
  26137. "properties": {
  26138. "created": {
  26139. "type": "integer",
  26140. "minimum": 0
  26141. },
  26142. "updated": {
  26143. "type": "integer",
  26144. "minimum": 0
  26145. },
  26146. "initialized": {
  26147. "type": "integer",
  26148. "minimum": 0
  26149. }
  26150. },
  26151. "required": ["created", "updated"],
  26152. "additionalProperties": false
  26153. },
  26154. "sandboxes": {
  26155. "type": "array",
  26156. "items": {
  26157. "type": "string"
  26158. }
  26159. }
  26160. },
  26161. "required": ["id", "worktree", "time", "sandboxes"],
  26162. "additionalProperties": false
  26163. }
  26164. },
  26165. "required": ["id", "type", "properties"],
  26166. "additionalProperties": false
  26167. },
  26168. "EventQuestionAsked": {
  26169. "type": "object",
  26170. "properties": {
  26171. "id": {
  26172. "type": "string"
  26173. },
  26174. "type": {
  26175. "type": "string",
  26176. "enum": ["question.asked"]
  26177. },
  26178. "properties": {
  26179. "type": "object",
  26180. "properties": {
  26181. "id": {
  26182. "type": "string",
  26183. "pattern": "^que"
  26184. },
  26185. "sessionID": {
  26186. "type": "string",
  26187. "pattern": "^ses"
  26188. },
  26189. "questions": {
  26190. "type": "array",
  26191. "items": {
  26192. "$ref": "#/components/schemas/QuestionInfo"
  26193. },
  26194. "description": "Questions to ask"
  26195. },
  26196. "tool": {
  26197. "$ref": "#/components/schemas/QuestionTool"
  26198. }
  26199. },
  26200. "required": ["id", "sessionID", "questions"],
  26201. "additionalProperties": false
  26202. }
  26203. },
  26204. "required": ["id", "type", "properties"],
  26205. "additionalProperties": false
  26206. },
  26207. "EventQuestionReplied": {
  26208. "type": "object",
  26209. "properties": {
  26210. "id": {
  26211. "type": "string"
  26212. },
  26213. "type": {
  26214. "type": "string",
  26215. "enum": ["question.replied"]
  26216. },
  26217. "properties": {
  26218. "type": "object",
  26219. "properties": {
  26220. "sessionID": {
  26221. "type": "string",
  26222. "pattern": "^ses"
  26223. },
  26224. "requestID": {
  26225. "type": "string",
  26226. "pattern": "^que"
  26227. },
  26228. "answers": {
  26229. "type": "array",
  26230. "items": {
  26231. "$ref": "#/components/schemas/QuestionAnswer"
  26232. }
  26233. }
  26234. },
  26235. "required": ["sessionID", "requestID", "answers"],
  26236. "additionalProperties": false
  26237. }
  26238. },
  26239. "required": ["id", "type", "properties"],
  26240. "additionalProperties": false
  26241. },
  26242. "EventQuestionRejected": {
  26243. "type": "object",
  26244. "properties": {
  26245. "id": {
  26246. "type": "string"
  26247. },
  26248. "type": {
  26249. "type": "string",
  26250. "enum": ["question.rejected"]
  26251. },
  26252. "properties": {
  26253. "type": "object",
  26254. "properties": {
  26255. "sessionID": {
  26256. "type": "string",
  26257. "pattern": "^ses"
  26258. },
  26259. "requestID": {
  26260. "type": "string",
  26261. "pattern": "^que"
  26262. }
  26263. },
  26264. "required": ["sessionID", "requestID"],
  26265. "additionalProperties": false
  26266. }
  26267. },
  26268. "required": ["id", "type", "properties"],
  26269. "additionalProperties": false
  26270. },
  26271. "EventSessionStatus": {
  26272. "type": "object",
  26273. "properties": {
  26274. "id": {
  26275. "type": "string"
  26276. },
  26277. "type": {
  26278. "type": "string",
  26279. "enum": ["session.status"]
  26280. },
  26281. "properties": {
  26282. "type": "object",
  26283. "properties": {
  26284. "sessionID": {
  26285. "type": "string",
  26286. "pattern": "^ses"
  26287. },
  26288. "status": {
  26289. "$ref": "#/components/schemas/SessionStatus"
  26290. }
  26291. },
  26292. "required": ["sessionID", "status"],
  26293. "additionalProperties": false
  26294. }
  26295. },
  26296. "required": ["id", "type", "properties"],
  26297. "additionalProperties": false
  26298. },
  26299. "EventSessionIdle": {
  26300. "type": "object",
  26301. "properties": {
  26302. "id": {
  26303. "type": "string"
  26304. },
  26305. "type": {
  26306. "type": "string",
  26307. "enum": ["session.idle"]
  26308. },
  26309. "properties": {
  26310. "type": "object",
  26311. "properties": {
  26312. "sessionID": {
  26313. "type": "string",
  26314. "pattern": "^ses"
  26315. }
  26316. },
  26317. "required": ["sessionID"],
  26318. "additionalProperties": false
  26319. }
  26320. },
  26321. "required": ["id", "type", "properties"],
  26322. "additionalProperties": false
  26323. },
  26324. "EventSessionCompacted": {
  26325. "type": "object",
  26326. "properties": {
  26327. "id": {
  26328. "type": "string"
  26329. },
  26330. "type": {
  26331. "type": "string",
  26332. "enum": ["session.compacted"]
  26333. },
  26334. "properties": {
  26335. "type": "object",
  26336. "properties": {
  26337. "sessionID": {
  26338. "type": "string",
  26339. "pattern": "^ses"
  26340. }
  26341. },
  26342. "required": ["sessionID"],
  26343. "additionalProperties": false
  26344. }
  26345. },
  26346. "required": ["id", "type", "properties"],
  26347. "additionalProperties": false
  26348. },
  26349. "EventVcsBranchUpdated": {
  26350. "type": "object",
  26351. "properties": {
  26352. "id": {
  26353. "type": "string"
  26354. },
  26355. "type": {
  26356. "type": "string",
  26357. "enum": ["vcs.branch.updated"]
  26358. },
  26359. "properties": {
  26360. "type": "object",
  26361. "properties": {
  26362. "branch": {
  26363. "type": "string"
  26364. }
  26365. },
  26366. "additionalProperties": false
  26367. }
  26368. },
  26369. "required": ["id", "type", "properties"],
  26370. "additionalProperties": false
  26371. },
  26372. "EventWorktreeReady": {
  26373. "type": "object",
  26374. "properties": {
  26375. "id": {
  26376. "type": "string"
  26377. },
  26378. "type": {
  26379. "type": "string",
  26380. "enum": ["worktree.ready"]
  26381. },
  26382. "properties": {
  26383. "type": "object",
  26384. "properties": {
  26385. "name": {
  26386. "type": "string"
  26387. },
  26388. "branch": {
  26389. "type": "string"
  26390. }
  26391. },
  26392. "required": ["name"],
  26393. "additionalProperties": false
  26394. }
  26395. },
  26396. "required": ["id", "type", "properties"],
  26397. "additionalProperties": false
  26398. },
  26399. "EventWorktreeFailed": {
  26400. "type": "object",
  26401. "properties": {
  26402. "id": {
  26403. "type": "string"
  26404. },
  26405. "type": {
  26406. "type": "string",
  26407. "enum": ["worktree.failed"]
  26408. },
  26409. "properties": {
  26410. "type": "object",
  26411. "properties": {
  26412. "message": {
  26413. "type": "string"
  26414. }
  26415. },
  26416. "required": ["message"],
  26417. "additionalProperties": false
  26418. }
  26419. },
  26420. "required": ["id", "type", "properties"],
  26421. "additionalProperties": false
  26422. },
  26423. "EventWorkspaceReady": {
  26424. "type": "object",
  26425. "properties": {
  26426. "id": {
  26427. "type": "string"
  26428. },
  26429. "type": {
  26430. "type": "string",
  26431. "enum": ["workspace.ready"]
  26432. },
  26433. "properties": {
  26434. "type": "object",
  26435. "properties": {
  26436. "name": {
  26437. "type": "string"
  26438. }
  26439. },
  26440. "required": ["name"],
  26441. "additionalProperties": false
  26442. }
  26443. },
  26444. "required": ["id", "type", "properties"],
  26445. "additionalProperties": false
  26446. },
  26447. "EventWorkspaceFailed": {
  26448. "type": "object",
  26449. "properties": {
  26450. "id": {
  26451. "type": "string"
  26452. },
  26453. "type": {
  26454. "type": "string",
  26455. "enum": ["workspace.failed"]
  26456. },
  26457. "properties": {
  26458. "type": "object",
  26459. "properties": {
  26460. "message": {
  26461. "type": "string"
  26462. }
  26463. },
  26464. "required": ["message"],
  26465. "additionalProperties": false
  26466. }
  26467. },
  26468. "required": ["id", "type", "properties"],
  26469. "additionalProperties": false
  26470. },
  26471. "EventWorkspaceStatus": {
  26472. "type": "object",
  26473. "properties": {
  26474. "id": {
  26475. "type": "string"
  26476. },
  26477. "type": {
  26478. "type": "string",
  26479. "enum": ["workspace.status"]
  26480. },
  26481. "properties": {
  26482. "type": "object",
  26483. "properties": {
  26484. "workspaceID": {
  26485. "type": "string",
  26486. "pattern": "^wrk"
  26487. },
  26488. "status": {
  26489. "type": "string",
  26490. "enum": ["connected", "connecting", "disconnected", "error"]
  26491. }
  26492. },
  26493. "required": ["workspaceID", "status"],
  26494. "additionalProperties": false
  26495. }
  26496. },
  26497. "required": ["id", "type", "properties"],
  26498. "additionalProperties": false
  26499. },
  26500. "EventServerConnected": {
  26501. "type": "object",
  26502. "properties": {
  26503. "id": {
  26504. "type": "string"
  26505. },
  26506. "type": {
  26507. "type": "string",
  26508. "enum": ["server.connected"]
  26509. },
  26510. "properties": {
  26511. "type": "object",
  26512. "properties": {}
  26513. }
  26514. },
  26515. "required": ["id", "type", "properties"],
  26516. "additionalProperties": false
  26517. },
  26518. "EventGlobalDisposed": {
  26519. "type": "object",
  26520. "properties": {
  26521. "id": {
  26522. "type": "string"
  26523. },
  26524. "type": {
  26525. "type": "string",
  26526. "enum": ["global.disposed"]
  26527. },
  26528. "properties": {
  26529. "type": "object",
  26530. "properties": {}
  26531. }
  26532. },
  26533. "required": ["id", "type", "properties"],
  26534. "additionalProperties": false
  26535. },
  26536. "BadRequestError": {
  26537. "type": "object",
  26538. "required": ["name", "data"],
  26539. "properties": {
  26540. "name": {
  26541. "type": "string",
  26542. "enum": ["BadRequest"]
  26543. },
  26544. "data": {
  26545. "type": "object",
  26546. "required": ["message"],
  26547. "properties": {
  26548. "message": {
  26549. "type": "string"
  26550. },
  26551. "kind": {
  26552. "type": "string",
  26553. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  26554. }
  26555. }
  26556. }
  26557. }
  26558. }
  26559. }
  26560. },
  26561. "security": [],
  26562. "tags": [
  26563. {
  26564. "name": "control",
  26565. "description": "Control plane routes."
  26566. },
  26567. {
  26568. "name": "global",
  26569. "description": "Global server routes."
  26570. },
  26571. {
  26572. "name": "event",
  26573. "description": "Instance event stream route."
  26574. },
  26575. {
  26576. "name": "config",
  26577. "description": "Experimental HttpApi config routes."
  26578. },
  26579. {
  26580. "name": "experimental",
  26581. "description": "Experimental HttpApi read-only routes."
  26582. },
  26583. {
  26584. "name": "file",
  26585. "description": "Experimental HttpApi file routes."
  26586. },
  26587. {
  26588. "name": "instance",
  26589. "description": "Experimental HttpApi instance read routes."
  26590. },
  26591. {
  26592. "name": "mcp",
  26593. "description": "Experimental HttpApi MCP routes."
  26594. },
  26595. {
  26596. "name": "project",
  26597. "description": "Experimental HttpApi project routes."
  26598. },
  26599. {
  26600. "name": "projectCopy",
  26601. "description": "Project copy management routes."
  26602. },
  26603. {
  26604. "name": "pty",
  26605. "description": "Experimental HttpApi PTY routes."
  26606. },
  26607. {
  26608. "name": "question",
  26609. "description": "Question routes."
  26610. },
  26611. {
  26612. "name": "permission",
  26613. "description": "Experimental HttpApi permission routes."
  26614. },
  26615. {
  26616. "name": "provider",
  26617. "description": "Experimental HttpApi provider routes."
  26618. },
  26619. {
  26620. "name": "session",
  26621. "description": "Experimental HttpApi session routes."
  26622. },
  26623. {
  26624. "name": "sync",
  26625. "description": "Experimental HttpApi sync routes."
  26626. },
  26627. {
  26628. "name": "tui",
  26629. "description": "Experimental HttpApi TUI routes."
  26630. },
  26631. {
  26632. "name": "workspace",
  26633. "description": "Experimental HttpApi workspace routes."
  26634. },
  26635. {
  26636. "name": "opencode experimental HttpApi",
  26637. "description": "Experimental HttpApi surface for selected instance routes."
  26638. },
  26639. {
  26640. "name": "opencode experimental HttpApi",
  26641. "description": "Experimental HttpApi surface for selected instance routes."
  26642. },
  26643. {
  26644. "name": "v2",
  26645. "description": "Experimental v2 routes."
  26646. },
  26647. {
  26648. "name": "v2 messages",
  26649. "description": "Experimental v2 message routes."
  26650. },
  26651. {
  26652. "name": "v2 models",
  26653. "description": "Experimental v2 model routes."
  26654. },
  26655. {
  26656. "name": "v2 providers",
  26657. "description": "Experimental v2 provider routes."
  26658. },
  26659. {
  26660. "name": "v2 permissions",
  26661. "description": "Experimental v2 permission routes."
  26662. },
  26663. {
  26664. "name": "v2 session permissions",
  26665. "description": "Experimental v2 session permission routes."
  26666. },
  26667. {
  26668. "name": "v2 saved permissions",
  26669. "description": "Experimental v2 saved permission routes."
  26670. },
  26671. {
  26672. "name": "v2 filesystem",
  26673. "description": "Experimental v2 location-scoped filesystem routes."
  26674. },
  26675. {
  26676. "name": "v2 commands",
  26677. "description": "Experimental v2 command routes."
  26678. },
  26679. {
  26680. "name": "v2 skills",
  26681. "description": "Experimental v2 skill routes."
  26682. },
  26683. {
  26684. "name": "v2 events",
  26685. "description": "Experimental v2 event stream route."
  26686. },
  26687. {
  26688. "name": "v2 questions",
  26689. "description": "Experimental v2 question routes."
  26690. },
  26691. {
  26692. "name": "v2 session questions",
  26693. "description": "Experimental v2 session question routes."
  26694. },
  26695. {
  26696. "name": "pty",
  26697. "description": "PTY websocket route."
  26698. }
  26699. ]
  26700. }