openapi.json 758 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/resource": {
  1572. "get": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.resource.list",
  1575. "parameters": [
  1576. {
  1577. "name": "directory",
  1578. "in": "query",
  1579. "schema": {
  1580. "type": "string"
  1581. },
  1582. "required": false
  1583. },
  1584. {
  1585. "name": "workspace",
  1586. "in": "query",
  1587. "schema": {
  1588. "type": "string"
  1589. },
  1590. "required": false
  1591. }
  1592. ],
  1593. "responses": {
  1594. "200": {
  1595. "description": "MCP resources",
  1596. "content": {
  1597. "application/json": {
  1598. "schema": {
  1599. "type": "object",
  1600. "additionalProperties": {
  1601. "$ref": "#/components/schemas/McpResource"
  1602. },
  1603. "description": "MCP resources"
  1604. }
  1605. }
  1606. }
  1607. },
  1608. "400": {
  1609. "description": "Bad request",
  1610. "content": {
  1611. "application/json": {
  1612. "schema": {
  1613. "$ref": "#/components/schemas/BadRequestError"
  1614. }
  1615. }
  1616. }
  1617. }
  1618. },
  1619. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1620. "summary": "Get MCP resources",
  1621. "x-codeSamples": [
  1622. {
  1623. "lang": "js",
  1624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1625. }
  1626. ]
  1627. }
  1628. },
  1629. "/find": {
  1630. "get": {
  1631. "tags": ["file"],
  1632. "operationId": "find.text",
  1633. "parameters": [
  1634. {
  1635. "name": "directory",
  1636. "in": "query",
  1637. "schema": {
  1638. "type": "string"
  1639. },
  1640. "required": false
  1641. },
  1642. {
  1643. "name": "workspace",
  1644. "in": "query",
  1645. "schema": {
  1646. "type": "string"
  1647. },
  1648. "required": false
  1649. },
  1650. {
  1651. "name": "pattern",
  1652. "in": "query",
  1653. "schema": {
  1654. "type": "string"
  1655. },
  1656. "required": true
  1657. }
  1658. ],
  1659. "responses": {
  1660. "200": {
  1661. "description": "Matches",
  1662. "content": {
  1663. "application/json": {
  1664. "schema": {
  1665. "type": "array",
  1666. "items": {
  1667. "type": "object",
  1668. "properties": {
  1669. "path": {
  1670. "type": "object",
  1671. "properties": {
  1672. "text": {
  1673. "type": "string"
  1674. }
  1675. },
  1676. "required": ["text"],
  1677. "additionalProperties": false
  1678. },
  1679. "lines": {
  1680. "type": "object",
  1681. "properties": {
  1682. "text": {
  1683. "type": "string"
  1684. }
  1685. },
  1686. "required": ["text"],
  1687. "additionalProperties": false
  1688. },
  1689. "line_number": {
  1690. "type": "integer",
  1691. "minimum": 0
  1692. },
  1693. "absolute_offset": {
  1694. "type": "integer",
  1695. "minimum": 0
  1696. },
  1697. "submatches": {
  1698. "type": "array",
  1699. "items": {
  1700. "type": "object",
  1701. "properties": {
  1702. "match": {
  1703. "type": "object",
  1704. "properties": {
  1705. "text": {
  1706. "type": "string"
  1707. }
  1708. },
  1709. "required": ["text"],
  1710. "additionalProperties": false
  1711. },
  1712. "start": {
  1713. "type": "integer",
  1714. "minimum": 0
  1715. },
  1716. "end": {
  1717. "type": "integer",
  1718. "minimum": 0
  1719. }
  1720. },
  1721. "required": ["match", "start", "end"],
  1722. "additionalProperties": false
  1723. }
  1724. }
  1725. },
  1726. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1727. "additionalProperties": false
  1728. },
  1729. "description": "Matches"
  1730. }
  1731. }
  1732. }
  1733. },
  1734. "400": {
  1735. "description": "Bad request",
  1736. "content": {
  1737. "application/json": {
  1738. "schema": {
  1739. "$ref": "#/components/schemas/BadRequestError"
  1740. }
  1741. }
  1742. }
  1743. }
  1744. },
  1745. "description": "Search for text patterns across files in the project using ripgrep.",
  1746. "summary": "Find text",
  1747. "x-codeSamples": [
  1748. {
  1749. "lang": "js",
  1750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1751. }
  1752. ]
  1753. }
  1754. },
  1755. "/find/file": {
  1756. "get": {
  1757. "tags": ["file"],
  1758. "operationId": "find.files",
  1759. "parameters": [
  1760. {
  1761. "name": "directory",
  1762. "in": "query",
  1763. "schema": {
  1764. "type": "string"
  1765. },
  1766. "required": false
  1767. },
  1768. {
  1769. "name": "workspace",
  1770. "in": "query",
  1771. "schema": {
  1772. "type": "string"
  1773. },
  1774. "required": false
  1775. },
  1776. {
  1777. "name": "query",
  1778. "in": "query",
  1779. "schema": {
  1780. "type": "string"
  1781. },
  1782. "required": true
  1783. },
  1784. {
  1785. "name": "dirs",
  1786. "in": "query",
  1787. "schema": {
  1788. "type": "string",
  1789. "enum": ["true", "false"]
  1790. },
  1791. "required": false
  1792. },
  1793. {
  1794. "name": "type",
  1795. "in": "query",
  1796. "schema": {
  1797. "type": "string",
  1798. "enum": ["file", "directory"]
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "limit",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "integer",
  1807. "minimum": 1,
  1808. "maximum": 200
  1809. },
  1810. "required": false
  1811. }
  1812. ],
  1813. "responses": {
  1814. "200": {
  1815. "description": "File paths",
  1816. "content": {
  1817. "application/json": {
  1818. "schema": {
  1819. "type": "array",
  1820. "items": {
  1821. "type": "string"
  1822. },
  1823. "description": "File paths"
  1824. }
  1825. }
  1826. }
  1827. },
  1828. "400": {
  1829. "description": "Bad request",
  1830. "content": {
  1831. "application/json": {
  1832. "schema": {
  1833. "$ref": "#/components/schemas/BadRequestError"
  1834. }
  1835. }
  1836. }
  1837. }
  1838. },
  1839. "description": "Search for files or directories by name or pattern in the project directory.",
  1840. "summary": "Find files",
  1841. "x-codeSamples": [
  1842. {
  1843. "lang": "js",
  1844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1845. }
  1846. ]
  1847. }
  1848. },
  1849. "/find/symbol": {
  1850. "get": {
  1851. "tags": ["file"],
  1852. "operationId": "find.symbols",
  1853. "parameters": [
  1854. {
  1855. "name": "directory",
  1856. "in": "query",
  1857. "schema": {
  1858. "type": "string"
  1859. },
  1860. "required": false
  1861. },
  1862. {
  1863. "name": "workspace",
  1864. "in": "query",
  1865. "schema": {
  1866. "type": "string"
  1867. },
  1868. "required": false
  1869. },
  1870. {
  1871. "name": "query",
  1872. "in": "query",
  1873. "schema": {
  1874. "type": "string"
  1875. },
  1876. "required": true
  1877. }
  1878. ],
  1879. "responses": {
  1880. "200": {
  1881. "description": "Symbols",
  1882. "content": {
  1883. "application/json": {
  1884. "schema": {
  1885. "type": "array",
  1886. "items": {
  1887. "$ref": "#/components/schemas/Symbol"
  1888. },
  1889. "description": "Symbols"
  1890. }
  1891. }
  1892. }
  1893. },
  1894. "400": {
  1895. "description": "Bad request",
  1896. "content": {
  1897. "application/json": {
  1898. "schema": {
  1899. "$ref": "#/components/schemas/BadRequestError"
  1900. }
  1901. }
  1902. }
  1903. }
  1904. },
  1905. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1906. "summary": "Find symbols",
  1907. "x-codeSamples": [
  1908. {
  1909. "lang": "js",
  1910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1911. }
  1912. ]
  1913. }
  1914. },
  1915. "/file": {
  1916. "get": {
  1917. "tags": ["file"],
  1918. "operationId": "file.list",
  1919. "parameters": [
  1920. {
  1921. "name": "directory",
  1922. "in": "query",
  1923. "schema": {
  1924. "type": "string"
  1925. },
  1926. "required": false
  1927. },
  1928. {
  1929. "name": "workspace",
  1930. "in": "query",
  1931. "schema": {
  1932. "type": "string"
  1933. },
  1934. "required": false
  1935. },
  1936. {
  1937. "name": "path",
  1938. "in": "query",
  1939. "schema": {
  1940. "type": "string"
  1941. },
  1942. "required": true
  1943. }
  1944. ],
  1945. "responses": {
  1946. "200": {
  1947. "description": "Files and directories",
  1948. "content": {
  1949. "application/json": {
  1950. "schema": {
  1951. "type": "array",
  1952. "items": {
  1953. "$ref": "#/components/schemas/FileNode"
  1954. },
  1955. "description": "Files and directories"
  1956. }
  1957. }
  1958. }
  1959. },
  1960. "400": {
  1961. "description": "Bad request",
  1962. "content": {
  1963. "application/json": {
  1964. "schema": {
  1965. "$ref": "#/components/schemas/BadRequestError"
  1966. }
  1967. }
  1968. }
  1969. }
  1970. },
  1971. "description": "List files and directories in a specified path.",
  1972. "summary": "List files",
  1973. "x-codeSamples": [
  1974. {
  1975. "lang": "js",
  1976. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1977. }
  1978. ]
  1979. }
  1980. },
  1981. "/file/content": {
  1982. "get": {
  1983. "tags": ["file"],
  1984. "operationId": "file.read",
  1985. "parameters": [
  1986. {
  1987. "name": "directory",
  1988. "in": "query",
  1989. "schema": {
  1990. "type": "string"
  1991. },
  1992. "required": false
  1993. },
  1994. {
  1995. "name": "workspace",
  1996. "in": "query",
  1997. "schema": {
  1998. "type": "string"
  1999. },
  2000. "required": false
  2001. },
  2002. {
  2003. "name": "path",
  2004. "in": "query",
  2005. "schema": {
  2006. "type": "string"
  2007. },
  2008. "required": true
  2009. }
  2010. ],
  2011. "responses": {
  2012. "200": {
  2013. "description": "File content",
  2014. "content": {
  2015. "application/json": {
  2016. "schema": {
  2017. "$ref": "#/components/schemas/FileContent"
  2018. }
  2019. }
  2020. }
  2021. },
  2022. "400": {
  2023. "description": "Bad request",
  2024. "content": {
  2025. "application/json": {
  2026. "schema": {
  2027. "$ref": "#/components/schemas/BadRequestError"
  2028. }
  2029. }
  2030. }
  2031. }
  2032. },
  2033. "description": "Read the content of a specified file.",
  2034. "summary": "Read file",
  2035. "x-codeSamples": [
  2036. {
  2037. "lang": "js",
  2038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2039. }
  2040. ]
  2041. }
  2042. },
  2043. "/file/status": {
  2044. "get": {
  2045. "tags": ["file"],
  2046. "operationId": "file.status",
  2047. "parameters": [
  2048. {
  2049. "name": "directory",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. },
  2056. {
  2057. "name": "workspace",
  2058. "in": "query",
  2059. "schema": {
  2060. "type": "string"
  2061. },
  2062. "required": false
  2063. }
  2064. ],
  2065. "responses": {
  2066. "200": {
  2067. "description": "File status",
  2068. "content": {
  2069. "application/json": {
  2070. "schema": {
  2071. "type": "array",
  2072. "items": {
  2073. "$ref": "#/components/schemas/File"
  2074. },
  2075. "description": "File status"
  2076. }
  2077. }
  2078. }
  2079. },
  2080. "400": {
  2081. "description": "Bad request",
  2082. "content": {
  2083. "application/json": {
  2084. "schema": {
  2085. "$ref": "#/components/schemas/BadRequestError"
  2086. }
  2087. }
  2088. }
  2089. }
  2090. },
  2091. "description": "Get the git status of all files in the project.",
  2092. "summary": "Get file status",
  2093. "x-codeSamples": [
  2094. {
  2095. "lang": "js",
  2096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2097. }
  2098. ]
  2099. }
  2100. },
  2101. "/instance/dispose": {
  2102. "post": {
  2103. "tags": ["instance"],
  2104. "operationId": "instance.dispose",
  2105. "parameters": [
  2106. {
  2107. "name": "directory",
  2108. "in": "query",
  2109. "schema": {
  2110. "type": "string"
  2111. },
  2112. "required": false
  2113. },
  2114. {
  2115. "name": "workspace",
  2116. "in": "query",
  2117. "schema": {
  2118. "type": "string"
  2119. },
  2120. "required": false
  2121. }
  2122. ],
  2123. "responses": {
  2124. "200": {
  2125. "description": "Instance disposed",
  2126. "content": {
  2127. "application/json": {
  2128. "schema": {
  2129. "type": "boolean",
  2130. "description": "Instance disposed"
  2131. }
  2132. }
  2133. }
  2134. },
  2135. "400": {
  2136. "description": "Bad request",
  2137. "content": {
  2138. "application/json": {
  2139. "schema": {
  2140. "$ref": "#/components/schemas/BadRequestError"
  2141. }
  2142. }
  2143. }
  2144. }
  2145. },
  2146. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2147. "summary": "Dispose instance",
  2148. "x-codeSamples": [
  2149. {
  2150. "lang": "js",
  2151. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2152. }
  2153. ]
  2154. }
  2155. },
  2156. "/path": {
  2157. "get": {
  2158. "tags": ["instance"],
  2159. "operationId": "path.get",
  2160. "parameters": [
  2161. {
  2162. "name": "directory",
  2163. "in": "query",
  2164. "schema": {
  2165. "type": "string"
  2166. },
  2167. "required": false
  2168. },
  2169. {
  2170. "name": "workspace",
  2171. "in": "query",
  2172. "schema": {
  2173. "type": "string"
  2174. },
  2175. "required": false
  2176. }
  2177. ],
  2178. "responses": {
  2179. "200": {
  2180. "description": "Path",
  2181. "content": {
  2182. "application/json": {
  2183. "schema": {
  2184. "$ref": "#/components/schemas/Path"
  2185. }
  2186. }
  2187. }
  2188. },
  2189. "400": {
  2190. "description": "Bad request",
  2191. "content": {
  2192. "application/json": {
  2193. "schema": {
  2194. "$ref": "#/components/schemas/BadRequestError"
  2195. }
  2196. }
  2197. }
  2198. }
  2199. },
  2200. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2201. "summary": "Get paths",
  2202. "x-codeSamples": [
  2203. {
  2204. "lang": "js",
  2205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2206. }
  2207. ]
  2208. }
  2209. },
  2210. "/vcs": {
  2211. "get": {
  2212. "tags": ["instance"],
  2213. "operationId": "vcs.get",
  2214. "parameters": [
  2215. {
  2216. "name": "directory",
  2217. "in": "query",
  2218. "schema": {
  2219. "type": "string"
  2220. },
  2221. "required": false
  2222. },
  2223. {
  2224. "name": "workspace",
  2225. "in": "query",
  2226. "schema": {
  2227. "type": "string"
  2228. },
  2229. "required": false
  2230. }
  2231. ],
  2232. "responses": {
  2233. "200": {
  2234. "description": "VCS info",
  2235. "content": {
  2236. "application/json": {
  2237. "schema": {
  2238. "$ref": "#/components/schemas/VcsInfo"
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "400": {
  2244. "description": "Bad request",
  2245. "content": {
  2246. "application/json": {
  2247. "schema": {
  2248. "$ref": "#/components/schemas/BadRequestError"
  2249. }
  2250. }
  2251. }
  2252. }
  2253. },
  2254. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2255. "summary": "Get VCS info",
  2256. "x-codeSamples": [
  2257. {
  2258. "lang": "js",
  2259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2260. }
  2261. ]
  2262. }
  2263. },
  2264. "/vcs/status": {
  2265. "get": {
  2266. "tags": ["instance"],
  2267. "operationId": "vcs.status",
  2268. "parameters": [
  2269. {
  2270. "name": "directory",
  2271. "in": "query",
  2272. "schema": {
  2273. "type": "string"
  2274. },
  2275. "required": false
  2276. },
  2277. {
  2278. "name": "workspace",
  2279. "in": "query",
  2280. "schema": {
  2281. "type": "string"
  2282. },
  2283. "required": false
  2284. }
  2285. ],
  2286. "responses": {
  2287. "200": {
  2288. "description": "VCS status",
  2289. "content": {
  2290. "application/json": {
  2291. "schema": {
  2292. "type": "array",
  2293. "items": {
  2294. "$ref": "#/components/schemas/VcsFileStatus"
  2295. },
  2296. "description": "VCS status"
  2297. }
  2298. }
  2299. }
  2300. },
  2301. "400": {
  2302. "description": "Bad request",
  2303. "content": {
  2304. "application/json": {
  2305. "schema": {
  2306. "$ref": "#/components/schemas/BadRequestError"
  2307. }
  2308. }
  2309. }
  2310. }
  2311. },
  2312. "description": "Retrieve changed files in the current working tree without patches.",
  2313. "summary": "Get VCS status",
  2314. "x-codeSamples": [
  2315. {
  2316. "lang": "js",
  2317. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2318. }
  2319. ]
  2320. }
  2321. },
  2322. "/vcs/diff": {
  2323. "get": {
  2324. "tags": ["instance"],
  2325. "operationId": "vcs.diff",
  2326. "parameters": [
  2327. {
  2328. "name": "directory",
  2329. "in": "query",
  2330. "schema": {
  2331. "type": "string"
  2332. },
  2333. "required": false
  2334. },
  2335. {
  2336. "name": "workspace",
  2337. "in": "query",
  2338. "schema": {
  2339. "type": "string"
  2340. },
  2341. "required": false
  2342. },
  2343. {
  2344. "name": "mode",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string",
  2348. "enum": ["git", "branch"]
  2349. },
  2350. "required": true
  2351. },
  2352. {
  2353. "name": "context",
  2354. "in": "query",
  2355. "schema": {
  2356. "type": "integer",
  2357. "minimum": 0
  2358. },
  2359. "required": false
  2360. }
  2361. ],
  2362. "responses": {
  2363. "200": {
  2364. "description": "VCS diff",
  2365. "content": {
  2366. "application/json": {
  2367. "schema": {
  2368. "type": "array",
  2369. "items": {
  2370. "$ref": "#/components/schemas/VcsFileDiff"
  2371. },
  2372. "description": "VCS diff"
  2373. }
  2374. }
  2375. }
  2376. },
  2377. "400": {
  2378. "description": "Bad request",
  2379. "content": {
  2380. "application/json": {
  2381. "schema": {
  2382. "$ref": "#/components/schemas/BadRequestError"
  2383. }
  2384. }
  2385. }
  2386. }
  2387. },
  2388. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2389. "summary": "Get VCS diff",
  2390. "x-codeSamples": [
  2391. {
  2392. "lang": "js",
  2393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2394. }
  2395. ]
  2396. }
  2397. },
  2398. "/vcs/diff/raw": {
  2399. "get": {
  2400. "tags": ["instance"],
  2401. "operationId": "vcs.diff.raw",
  2402. "parameters": [
  2403. {
  2404. "name": "directory",
  2405. "in": "query",
  2406. "schema": {
  2407. "type": "string"
  2408. },
  2409. "required": false
  2410. },
  2411. {
  2412. "name": "workspace",
  2413. "in": "query",
  2414. "schema": {
  2415. "type": "string"
  2416. },
  2417. "required": false
  2418. }
  2419. ],
  2420. "responses": {
  2421. "200": {
  2422. "description": "Raw VCS diff",
  2423. "content": {
  2424. "text/x-diff; charset=utf-8": {
  2425. "schema": {
  2426. "type": "string"
  2427. }
  2428. }
  2429. }
  2430. },
  2431. "400": {
  2432. "description": "Bad request",
  2433. "content": {
  2434. "application/json": {
  2435. "schema": {
  2436. "$ref": "#/components/schemas/BadRequestError"
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Retrieve a raw patch for current uncommitted changes.",
  2443. "summary": "Get raw VCS diff",
  2444. "x-codeSamples": [
  2445. {
  2446. "lang": "js",
  2447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2448. }
  2449. ]
  2450. }
  2451. },
  2452. "/vcs/apply": {
  2453. "post": {
  2454. "tags": ["instance"],
  2455. "operationId": "vcs.apply",
  2456. "parameters": [
  2457. {
  2458. "name": "directory",
  2459. "in": "query",
  2460. "schema": {
  2461. "type": "string"
  2462. },
  2463. "required": false
  2464. },
  2465. {
  2466. "name": "workspace",
  2467. "in": "query",
  2468. "schema": {
  2469. "type": "string"
  2470. },
  2471. "required": false
  2472. }
  2473. ],
  2474. "responses": {
  2475. "200": {
  2476. "description": "VCS patch applied",
  2477. "content": {
  2478. "application/json": {
  2479. "schema": {
  2480. "type": "object",
  2481. "properties": {
  2482. "applied": {
  2483. "type": "boolean"
  2484. }
  2485. },
  2486. "required": ["applied"],
  2487. "additionalProperties": false,
  2488. "description": "VCS patch applied"
  2489. }
  2490. }
  2491. }
  2492. },
  2493. "400": {
  2494. "description": "VcsApplyError | InvalidRequestError",
  2495. "content": {
  2496. "application/json": {
  2497. "schema": {
  2498. "anyOf": [
  2499. {
  2500. "$ref": "#/components/schemas/VcsApplyError"
  2501. },
  2502. {
  2503. "$ref": "#/components/schemas/InvalidRequestError"
  2504. }
  2505. ]
  2506. }
  2507. }
  2508. }
  2509. }
  2510. },
  2511. "description": "Apply a raw patch to the current working tree.",
  2512. "summary": "Apply VCS patch",
  2513. "requestBody": {
  2514. "content": {
  2515. "application/json": {
  2516. "schema": {
  2517. "type": "object",
  2518. "properties": {
  2519. "patch": {
  2520. "type": "string"
  2521. }
  2522. },
  2523. "required": ["patch"],
  2524. "additionalProperties": false
  2525. }
  2526. }
  2527. }
  2528. },
  2529. "x-codeSamples": [
  2530. {
  2531. "lang": "js",
  2532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2533. }
  2534. ]
  2535. }
  2536. },
  2537. "/command": {
  2538. "get": {
  2539. "tags": ["instance"],
  2540. "operationId": "command.list",
  2541. "parameters": [
  2542. {
  2543. "name": "directory",
  2544. "in": "query",
  2545. "schema": {
  2546. "type": "string"
  2547. },
  2548. "required": false
  2549. },
  2550. {
  2551. "name": "workspace",
  2552. "in": "query",
  2553. "schema": {
  2554. "type": "string"
  2555. },
  2556. "required": false
  2557. }
  2558. ],
  2559. "responses": {
  2560. "200": {
  2561. "description": "List of commands",
  2562. "content": {
  2563. "application/json": {
  2564. "schema": {
  2565. "type": "array",
  2566. "items": {
  2567. "$ref": "#/components/schemas/Command"
  2568. },
  2569. "description": "List of commands"
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "400": {
  2575. "description": "Bad request",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "$ref": "#/components/schemas/BadRequestError"
  2580. }
  2581. }
  2582. }
  2583. }
  2584. },
  2585. "description": "Get a list of all available commands in the OpenCode system.",
  2586. "summary": "List commands",
  2587. "x-codeSamples": [
  2588. {
  2589. "lang": "js",
  2590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2591. }
  2592. ]
  2593. }
  2594. },
  2595. "/agent": {
  2596. "get": {
  2597. "tags": ["instance"],
  2598. "operationId": "app.agents",
  2599. "parameters": [
  2600. {
  2601. "name": "directory",
  2602. "in": "query",
  2603. "schema": {
  2604. "type": "string"
  2605. },
  2606. "required": false
  2607. },
  2608. {
  2609. "name": "workspace",
  2610. "in": "query",
  2611. "schema": {
  2612. "type": "string"
  2613. },
  2614. "required": false
  2615. }
  2616. ],
  2617. "responses": {
  2618. "200": {
  2619. "description": "List of agents",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "type": "array",
  2624. "items": {
  2625. "$ref": "#/components/schemas/Agent"
  2626. },
  2627. "description": "List of agents"
  2628. }
  2629. }
  2630. }
  2631. },
  2632. "400": {
  2633. "description": "Bad request",
  2634. "content": {
  2635. "application/json": {
  2636. "schema": {
  2637. "$ref": "#/components/schemas/BadRequestError"
  2638. }
  2639. }
  2640. }
  2641. }
  2642. },
  2643. "description": "Get a list of all available AI agents in the OpenCode system.",
  2644. "summary": "List agents",
  2645. "x-codeSamples": [
  2646. {
  2647. "lang": "js",
  2648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2649. }
  2650. ]
  2651. }
  2652. },
  2653. "/skill": {
  2654. "get": {
  2655. "tags": ["instance"],
  2656. "operationId": "app.skills",
  2657. "parameters": [
  2658. {
  2659. "name": "directory",
  2660. "in": "query",
  2661. "schema": {
  2662. "type": "string"
  2663. },
  2664. "required": false
  2665. },
  2666. {
  2667. "name": "workspace",
  2668. "in": "query",
  2669. "schema": {
  2670. "type": "string"
  2671. },
  2672. "required": false
  2673. }
  2674. ],
  2675. "responses": {
  2676. "200": {
  2677. "description": "List of skills",
  2678. "content": {
  2679. "application/json": {
  2680. "schema": {
  2681. "type": "array",
  2682. "items": {
  2683. "type": "object",
  2684. "properties": {
  2685. "name": {
  2686. "type": "string"
  2687. },
  2688. "description": {
  2689. "type": "string"
  2690. },
  2691. "location": {
  2692. "type": "string"
  2693. },
  2694. "content": {
  2695. "type": "string"
  2696. }
  2697. },
  2698. "required": ["name", "location", "content"],
  2699. "additionalProperties": false
  2700. },
  2701. "description": "List of skills"
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "400": {
  2707. "description": "Bad request",
  2708. "content": {
  2709. "application/json": {
  2710. "schema": {
  2711. "$ref": "#/components/schemas/BadRequestError"
  2712. }
  2713. }
  2714. }
  2715. }
  2716. },
  2717. "description": "Get a list of all available skills in the OpenCode system.",
  2718. "summary": "List skills",
  2719. "x-codeSamples": [
  2720. {
  2721. "lang": "js",
  2722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2723. }
  2724. ]
  2725. }
  2726. },
  2727. "/lsp": {
  2728. "get": {
  2729. "tags": ["instance"],
  2730. "operationId": "lsp.status",
  2731. "parameters": [
  2732. {
  2733. "name": "directory",
  2734. "in": "query",
  2735. "schema": {
  2736. "type": "string"
  2737. },
  2738. "required": false
  2739. },
  2740. {
  2741. "name": "workspace",
  2742. "in": "query",
  2743. "schema": {
  2744. "type": "string"
  2745. },
  2746. "required": false
  2747. }
  2748. ],
  2749. "responses": {
  2750. "200": {
  2751. "description": "LSP server status",
  2752. "content": {
  2753. "application/json": {
  2754. "schema": {
  2755. "type": "array",
  2756. "items": {
  2757. "$ref": "#/components/schemas/LSPStatus"
  2758. },
  2759. "description": "LSP server status"
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "400": {
  2765. "description": "Bad request",
  2766. "content": {
  2767. "application/json": {
  2768. "schema": {
  2769. "$ref": "#/components/schemas/BadRequestError"
  2770. }
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "description": "Get LSP server status",
  2776. "summary": "Get LSP status",
  2777. "x-codeSamples": [
  2778. {
  2779. "lang": "js",
  2780. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2781. }
  2782. ]
  2783. }
  2784. },
  2785. "/formatter": {
  2786. "get": {
  2787. "tags": ["instance"],
  2788. "operationId": "formatter.status",
  2789. "parameters": [
  2790. {
  2791. "name": "directory",
  2792. "in": "query",
  2793. "schema": {
  2794. "type": "string"
  2795. },
  2796. "required": false
  2797. },
  2798. {
  2799. "name": "workspace",
  2800. "in": "query",
  2801. "schema": {
  2802. "type": "string"
  2803. },
  2804. "required": false
  2805. }
  2806. ],
  2807. "responses": {
  2808. "200": {
  2809. "description": "Formatter status",
  2810. "content": {
  2811. "application/json": {
  2812. "schema": {
  2813. "type": "array",
  2814. "items": {
  2815. "$ref": "#/components/schemas/FormatterStatus"
  2816. },
  2817. "description": "Formatter status"
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "400": {
  2823. "description": "Bad request",
  2824. "content": {
  2825. "application/json": {
  2826. "schema": {
  2827. "$ref": "#/components/schemas/BadRequestError"
  2828. }
  2829. }
  2830. }
  2831. }
  2832. },
  2833. "description": "Get formatter status",
  2834. "summary": "Get formatter status",
  2835. "x-codeSamples": [
  2836. {
  2837. "lang": "js",
  2838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2839. }
  2840. ]
  2841. }
  2842. },
  2843. "/mcp": {
  2844. "get": {
  2845. "tags": ["mcp"],
  2846. "operationId": "mcp.status",
  2847. "parameters": [
  2848. {
  2849. "name": "directory",
  2850. "in": "query",
  2851. "schema": {
  2852. "type": "string"
  2853. },
  2854. "required": false
  2855. },
  2856. {
  2857. "name": "workspace",
  2858. "in": "query",
  2859. "schema": {
  2860. "type": "string"
  2861. },
  2862. "required": false
  2863. }
  2864. ],
  2865. "responses": {
  2866. "200": {
  2867. "description": "MCP server status",
  2868. "content": {
  2869. "application/json": {
  2870. "schema": {
  2871. "type": "object",
  2872. "additionalProperties": {
  2873. "$ref": "#/components/schemas/MCPStatus"
  2874. },
  2875. "description": "MCP server status"
  2876. }
  2877. }
  2878. }
  2879. },
  2880. "400": {
  2881. "description": "Bad request",
  2882. "content": {
  2883. "application/json": {
  2884. "schema": {
  2885. "$ref": "#/components/schemas/BadRequestError"
  2886. }
  2887. }
  2888. }
  2889. }
  2890. },
  2891. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2892. "summary": "Get MCP status",
  2893. "x-codeSamples": [
  2894. {
  2895. "lang": "js",
  2896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2897. }
  2898. ]
  2899. },
  2900. "post": {
  2901. "tags": ["mcp"],
  2902. "operationId": "mcp.add",
  2903. "parameters": [
  2904. {
  2905. "name": "directory",
  2906. "in": "query",
  2907. "schema": {
  2908. "type": "string"
  2909. },
  2910. "required": false
  2911. },
  2912. {
  2913. "name": "workspace",
  2914. "in": "query",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": false
  2919. }
  2920. ],
  2921. "responses": {
  2922. "200": {
  2923. "description": "MCP server added successfully",
  2924. "content": {
  2925. "application/json": {
  2926. "schema": {
  2927. "type": "object",
  2928. "additionalProperties": {
  2929. "$ref": "#/components/schemas/MCPStatus"
  2930. },
  2931. "description": "MCP server added successfully"
  2932. }
  2933. }
  2934. }
  2935. },
  2936. "400": {
  2937. "description": "BadRequest | InvalidRequestError",
  2938. "content": {
  2939. "application/json": {
  2940. "schema": {
  2941. "anyOf": [
  2942. {
  2943. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2944. },
  2945. {
  2946. "$ref": "#/components/schemas/InvalidRequestError"
  2947. }
  2948. ]
  2949. }
  2950. }
  2951. }
  2952. }
  2953. },
  2954. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2955. "summary": "Add MCP server",
  2956. "requestBody": {
  2957. "content": {
  2958. "application/json": {
  2959. "schema": {
  2960. "type": "object",
  2961. "properties": {
  2962. "name": {
  2963. "type": "string"
  2964. },
  2965. "config": {
  2966. "anyOf": [
  2967. {
  2968. "$ref": "#/components/schemas/McpLocalConfig"
  2969. },
  2970. {
  2971. "$ref": "#/components/schemas/McpRemoteConfig"
  2972. }
  2973. ]
  2974. }
  2975. },
  2976. "required": ["name", "config"],
  2977. "additionalProperties": false
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "x-codeSamples": [
  2983. {
  2984. "lang": "js",
  2985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2986. }
  2987. ]
  2988. }
  2989. },
  2990. "/mcp/{name}/auth": {
  2991. "post": {
  2992. "tags": ["mcp"],
  2993. "operationId": "mcp.auth.start",
  2994. "parameters": [
  2995. {
  2996. "name": "name",
  2997. "in": "path",
  2998. "schema": {
  2999. "type": "string"
  3000. },
  3001. "required": true
  3002. },
  3003. {
  3004. "name": "directory",
  3005. "in": "query",
  3006. "schema": {
  3007. "type": "string"
  3008. },
  3009. "required": false
  3010. },
  3011. {
  3012. "name": "workspace",
  3013. "in": "query",
  3014. "schema": {
  3015. "type": "string"
  3016. },
  3017. "required": false
  3018. }
  3019. ],
  3020. "responses": {
  3021. "200": {
  3022. "description": "OAuth flow started",
  3023. "content": {
  3024. "application/json": {
  3025. "schema": {
  3026. "type": "object",
  3027. "properties": {
  3028. "authorizationUrl": {
  3029. "type": "string"
  3030. },
  3031. "oauthState": {
  3032. "type": "string"
  3033. }
  3034. },
  3035. "required": ["authorizationUrl", "oauthState"],
  3036. "additionalProperties": false,
  3037. "description": "OAuth flow started"
  3038. }
  3039. }
  3040. }
  3041. },
  3042. "400": {
  3043. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3044. "content": {
  3045. "application/json": {
  3046. "schema": {
  3047. "anyOf": [
  3048. {
  3049. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3050. },
  3051. {
  3052. "$ref": "#/components/schemas/InvalidRequestError"
  3053. }
  3054. ]
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "404": {
  3060. "description": "McpServerNotFoundError",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/McpServerNotFoundError"
  3065. }
  3066. }
  3067. }
  3068. }
  3069. },
  3070. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3071. "summary": "Start MCP OAuth",
  3072. "x-codeSamples": [
  3073. {
  3074. "lang": "js",
  3075. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3076. }
  3077. ]
  3078. },
  3079. "delete": {
  3080. "tags": ["mcp"],
  3081. "operationId": "mcp.auth.remove",
  3082. "parameters": [
  3083. {
  3084. "name": "name",
  3085. "in": "path",
  3086. "schema": {
  3087. "type": "string"
  3088. },
  3089. "required": true
  3090. },
  3091. {
  3092. "name": "directory",
  3093. "in": "query",
  3094. "schema": {
  3095. "type": "string"
  3096. },
  3097. "required": false
  3098. },
  3099. {
  3100. "name": "workspace",
  3101. "in": "query",
  3102. "schema": {
  3103. "type": "string"
  3104. },
  3105. "required": false
  3106. }
  3107. ],
  3108. "responses": {
  3109. "200": {
  3110. "description": "OAuth credentials removed",
  3111. "content": {
  3112. "application/json": {
  3113. "schema": {
  3114. "type": "object",
  3115. "properties": {
  3116. "success": {
  3117. "type": "boolean",
  3118. "enum": [true]
  3119. }
  3120. },
  3121. "required": ["success"],
  3122. "additionalProperties": false,
  3123. "description": "OAuth credentials removed"
  3124. }
  3125. }
  3126. }
  3127. },
  3128. "400": {
  3129. "description": "Bad request",
  3130. "content": {
  3131. "application/json": {
  3132. "schema": {
  3133. "$ref": "#/components/schemas/BadRequestError"
  3134. }
  3135. }
  3136. }
  3137. },
  3138. "404": {
  3139. "description": "McpServerNotFoundError",
  3140. "content": {
  3141. "application/json": {
  3142. "schema": {
  3143. "$ref": "#/components/schemas/McpServerNotFoundError"
  3144. }
  3145. }
  3146. }
  3147. }
  3148. },
  3149. "description": "Remove OAuth credentials for an MCP server.",
  3150. "summary": "Remove MCP OAuth",
  3151. "x-codeSamples": [
  3152. {
  3153. "lang": "js",
  3154. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3155. }
  3156. ]
  3157. }
  3158. },
  3159. "/mcp/{name}/auth/callback": {
  3160. "post": {
  3161. "tags": ["mcp"],
  3162. "operationId": "mcp.auth.callback",
  3163. "parameters": [
  3164. {
  3165. "name": "name",
  3166. "in": "path",
  3167. "schema": {
  3168. "type": "string"
  3169. },
  3170. "required": true
  3171. },
  3172. {
  3173. "name": "directory",
  3174. "in": "query",
  3175. "schema": {
  3176. "type": "string"
  3177. },
  3178. "required": false
  3179. },
  3180. {
  3181. "name": "workspace",
  3182. "in": "query",
  3183. "schema": {
  3184. "type": "string"
  3185. },
  3186. "required": false
  3187. }
  3188. ],
  3189. "responses": {
  3190. "200": {
  3191. "description": "OAuth authentication completed",
  3192. "content": {
  3193. "application/json": {
  3194. "schema": {
  3195. "$ref": "#/components/schemas/MCPStatus"
  3196. }
  3197. }
  3198. }
  3199. },
  3200. "400": {
  3201. "description": "BadRequest | InvalidRequestError",
  3202. "content": {
  3203. "application/json": {
  3204. "schema": {
  3205. "anyOf": [
  3206. {
  3207. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3208. },
  3209. {
  3210. "$ref": "#/components/schemas/InvalidRequestError"
  3211. }
  3212. ]
  3213. }
  3214. }
  3215. }
  3216. },
  3217. "404": {
  3218. "description": "McpServerNotFoundError",
  3219. "content": {
  3220. "application/json": {
  3221. "schema": {
  3222. "$ref": "#/components/schemas/McpServerNotFoundError"
  3223. }
  3224. }
  3225. }
  3226. }
  3227. },
  3228. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3229. "summary": "Complete MCP OAuth",
  3230. "requestBody": {
  3231. "content": {
  3232. "application/json": {
  3233. "schema": {
  3234. "type": "object",
  3235. "properties": {
  3236. "code": {
  3237. "type": "string"
  3238. }
  3239. },
  3240. "required": ["code"],
  3241. "additionalProperties": false
  3242. }
  3243. }
  3244. }
  3245. },
  3246. "x-codeSamples": [
  3247. {
  3248. "lang": "js",
  3249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3250. }
  3251. ]
  3252. }
  3253. },
  3254. "/mcp/{name}/auth/authenticate": {
  3255. "post": {
  3256. "tags": ["mcp"],
  3257. "operationId": "mcp.auth.authenticate",
  3258. "parameters": [
  3259. {
  3260. "name": "name",
  3261. "in": "path",
  3262. "schema": {
  3263. "type": "string"
  3264. },
  3265. "required": true
  3266. },
  3267. {
  3268. "name": "directory",
  3269. "in": "query",
  3270. "schema": {
  3271. "type": "string"
  3272. },
  3273. "required": false
  3274. },
  3275. {
  3276. "name": "workspace",
  3277. "in": "query",
  3278. "schema": {
  3279. "type": "string"
  3280. },
  3281. "required": false
  3282. }
  3283. ],
  3284. "responses": {
  3285. "200": {
  3286. "description": "OAuth authentication completed",
  3287. "content": {
  3288. "application/json": {
  3289. "schema": {
  3290. "$ref": "#/components/schemas/MCPStatus"
  3291. }
  3292. }
  3293. }
  3294. },
  3295. "400": {
  3296. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "anyOf": [
  3301. {
  3302. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3303. },
  3304. {
  3305. "$ref": "#/components/schemas/InvalidRequestError"
  3306. }
  3307. ]
  3308. }
  3309. }
  3310. }
  3311. },
  3312. "404": {
  3313. "description": "McpServerNotFoundError",
  3314. "content": {
  3315. "application/json": {
  3316. "schema": {
  3317. "$ref": "#/components/schemas/McpServerNotFoundError"
  3318. }
  3319. }
  3320. }
  3321. }
  3322. },
  3323. "description": "Start OAuth flow and wait for callback (opens browser).",
  3324. "summary": "Authenticate MCP OAuth",
  3325. "x-codeSamples": [
  3326. {
  3327. "lang": "js",
  3328. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3329. }
  3330. ]
  3331. }
  3332. },
  3333. "/mcp/{name}/connect": {
  3334. "post": {
  3335. "tags": ["mcp"],
  3336. "operationId": "mcp.connect",
  3337. "parameters": [
  3338. {
  3339. "name": "name",
  3340. "in": "path",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": true
  3345. },
  3346. {
  3347. "name": "directory",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. },
  3354. {
  3355. "name": "workspace",
  3356. "in": "query",
  3357. "schema": {
  3358. "type": "string"
  3359. },
  3360. "required": false
  3361. }
  3362. ],
  3363. "responses": {
  3364. "200": {
  3365. "description": "MCP server connected successfully",
  3366. "content": {
  3367. "application/json": {
  3368. "schema": {
  3369. "type": "boolean",
  3370. "description": "MCP server connected successfully"
  3371. }
  3372. }
  3373. }
  3374. },
  3375. "400": {
  3376. "description": "Bad request",
  3377. "content": {
  3378. "application/json": {
  3379. "schema": {
  3380. "$ref": "#/components/schemas/BadRequestError"
  3381. }
  3382. }
  3383. }
  3384. },
  3385. "404": {
  3386. "description": "McpServerNotFoundError",
  3387. "content": {
  3388. "application/json": {
  3389. "schema": {
  3390. "$ref": "#/components/schemas/McpServerNotFoundError"
  3391. }
  3392. }
  3393. }
  3394. }
  3395. },
  3396. "description": "Connect an MCP server.",
  3397. "x-codeSamples": [
  3398. {
  3399. "lang": "js",
  3400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3401. }
  3402. ]
  3403. }
  3404. },
  3405. "/mcp/{name}/disconnect": {
  3406. "post": {
  3407. "tags": ["mcp"],
  3408. "operationId": "mcp.disconnect",
  3409. "parameters": [
  3410. {
  3411. "name": "name",
  3412. "in": "path",
  3413. "schema": {
  3414. "type": "string"
  3415. },
  3416. "required": true
  3417. },
  3418. {
  3419. "name": "directory",
  3420. "in": "query",
  3421. "schema": {
  3422. "type": "string"
  3423. },
  3424. "required": false
  3425. },
  3426. {
  3427. "name": "workspace",
  3428. "in": "query",
  3429. "schema": {
  3430. "type": "string"
  3431. },
  3432. "required": false
  3433. }
  3434. ],
  3435. "responses": {
  3436. "200": {
  3437. "description": "MCP server disconnected successfully",
  3438. "content": {
  3439. "application/json": {
  3440. "schema": {
  3441. "type": "boolean",
  3442. "description": "MCP server disconnected successfully"
  3443. }
  3444. }
  3445. }
  3446. },
  3447. "400": {
  3448. "description": "Bad request",
  3449. "content": {
  3450. "application/json": {
  3451. "schema": {
  3452. "$ref": "#/components/schemas/BadRequestError"
  3453. }
  3454. }
  3455. }
  3456. },
  3457. "404": {
  3458. "description": "McpServerNotFoundError",
  3459. "content": {
  3460. "application/json": {
  3461. "schema": {
  3462. "$ref": "#/components/schemas/McpServerNotFoundError"
  3463. }
  3464. }
  3465. }
  3466. }
  3467. },
  3468. "description": "Disconnect an MCP server.",
  3469. "x-codeSamples": [
  3470. {
  3471. "lang": "js",
  3472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3473. }
  3474. ]
  3475. }
  3476. },
  3477. "/project": {
  3478. "get": {
  3479. "tags": ["project"],
  3480. "operationId": "project.list",
  3481. "parameters": [
  3482. {
  3483. "name": "directory",
  3484. "in": "query",
  3485. "schema": {
  3486. "type": "string"
  3487. },
  3488. "required": false
  3489. },
  3490. {
  3491. "name": "workspace",
  3492. "in": "query",
  3493. "schema": {
  3494. "type": "string"
  3495. },
  3496. "required": false
  3497. }
  3498. ],
  3499. "responses": {
  3500. "200": {
  3501. "description": "List of projects",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "type": "array",
  3506. "items": {
  3507. "$ref": "#/components/schemas/Project"
  3508. },
  3509. "description": "List of projects"
  3510. }
  3511. }
  3512. }
  3513. },
  3514. "400": {
  3515. "description": "Bad request",
  3516. "content": {
  3517. "application/json": {
  3518. "schema": {
  3519. "$ref": "#/components/schemas/BadRequestError"
  3520. }
  3521. }
  3522. }
  3523. }
  3524. },
  3525. "description": "Get a list of projects that have been opened with OpenCode.",
  3526. "summary": "List all projects",
  3527. "x-codeSamples": [
  3528. {
  3529. "lang": "js",
  3530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3531. }
  3532. ]
  3533. }
  3534. },
  3535. "/project/current": {
  3536. "get": {
  3537. "tags": ["project"],
  3538. "operationId": "project.current",
  3539. "parameters": [
  3540. {
  3541. "name": "directory",
  3542. "in": "query",
  3543. "schema": {
  3544. "type": "string"
  3545. },
  3546. "required": false
  3547. },
  3548. {
  3549. "name": "workspace",
  3550. "in": "query",
  3551. "schema": {
  3552. "type": "string"
  3553. },
  3554. "required": false
  3555. }
  3556. ],
  3557. "responses": {
  3558. "200": {
  3559. "description": "Current project information",
  3560. "content": {
  3561. "application/json": {
  3562. "schema": {
  3563. "$ref": "#/components/schemas/Project"
  3564. }
  3565. }
  3566. }
  3567. },
  3568. "400": {
  3569. "description": "Bad request",
  3570. "content": {
  3571. "application/json": {
  3572. "schema": {
  3573. "$ref": "#/components/schemas/BadRequestError"
  3574. }
  3575. }
  3576. }
  3577. }
  3578. },
  3579. "description": "Retrieve the currently active project that OpenCode is working with.",
  3580. "summary": "Get current project",
  3581. "x-codeSamples": [
  3582. {
  3583. "lang": "js",
  3584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3585. }
  3586. ]
  3587. }
  3588. },
  3589. "/project/git/init": {
  3590. "post": {
  3591. "tags": ["project"],
  3592. "operationId": "project.initGit",
  3593. "parameters": [
  3594. {
  3595. "name": "directory",
  3596. "in": "query",
  3597. "schema": {
  3598. "type": "string"
  3599. },
  3600. "required": false
  3601. },
  3602. {
  3603. "name": "workspace",
  3604. "in": "query",
  3605. "schema": {
  3606. "type": "string"
  3607. },
  3608. "required": false
  3609. }
  3610. ],
  3611. "responses": {
  3612. "200": {
  3613. "description": "Project information after git initialization",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/Project"
  3618. }
  3619. }
  3620. }
  3621. },
  3622. "400": {
  3623. "description": "Bad request",
  3624. "content": {
  3625. "application/json": {
  3626. "schema": {
  3627. "$ref": "#/components/schemas/BadRequestError"
  3628. }
  3629. }
  3630. }
  3631. }
  3632. },
  3633. "description": "Create a git repository for the current project and return the refreshed project info.",
  3634. "summary": "Initialize git repository",
  3635. "x-codeSamples": [
  3636. {
  3637. "lang": "js",
  3638. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3639. }
  3640. ]
  3641. }
  3642. },
  3643. "/project/{projectID}": {
  3644. "patch": {
  3645. "tags": ["project"],
  3646. "operationId": "project.update",
  3647. "parameters": [
  3648. {
  3649. "name": "projectID",
  3650. "in": "path",
  3651. "schema": {
  3652. "type": "string"
  3653. },
  3654. "required": true
  3655. },
  3656. {
  3657. "name": "directory",
  3658. "in": "query",
  3659. "schema": {
  3660. "type": "string"
  3661. },
  3662. "required": false
  3663. },
  3664. {
  3665. "name": "workspace",
  3666. "in": "query",
  3667. "schema": {
  3668. "type": "string"
  3669. },
  3670. "required": false
  3671. }
  3672. ],
  3673. "responses": {
  3674. "200": {
  3675. "description": "Updated project information",
  3676. "content": {
  3677. "application/json": {
  3678. "schema": {
  3679. "$ref": "#/components/schemas/Project"
  3680. }
  3681. }
  3682. }
  3683. },
  3684. "400": {
  3685. "description": "BadRequest | InvalidRequestError",
  3686. "content": {
  3687. "application/json": {
  3688. "schema": {
  3689. "anyOf": [
  3690. {
  3691. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3692. },
  3693. {
  3694. "$ref": "#/components/schemas/InvalidRequestError"
  3695. }
  3696. ]
  3697. }
  3698. }
  3699. }
  3700. },
  3701. "404": {
  3702. "description": "ProjectNotFoundError",
  3703. "content": {
  3704. "application/json": {
  3705. "schema": {
  3706. "$ref": "#/components/schemas/ProjectNotFoundError"
  3707. }
  3708. }
  3709. }
  3710. }
  3711. },
  3712. "description": "Update project properties such as name, icon, and commands.",
  3713. "summary": "Update project",
  3714. "requestBody": {
  3715. "content": {
  3716. "application/json": {
  3717. "schema": {
  3718. "type": "object",
  3719. "properties": {
  3720. "name": {
  3721. "type": "string"
  3722. },
  3723. "icon": {
  3724. "type": "object",
  3725. "properties": {
  3726. "url": {
  3727. "type": "string"
  3728. },
  3729. "override": {
  3730. "type": "string"
  3731. },
  3732. "color": {
  3733. "type": "string"
  3734. }
  3735. },
  3736. "additionalProperties": false
  3737. },
  3738. "commands": {
  3739. "type": "object",
  3740. "properties": {
  3741. "start": {
  3742. "type": "string",
  3743. "description": "Startup script to run when creating a new workspace (worktree)"
  3744. }
  3745. },
  3746. "additionalProperties": false
  3747. }
  3748. },
  3749. "additionalProperties": false
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "x-codeSamples": [
  3755. {
  3756. "lang": "js",
  3757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3758. }
  3759. ]
  3760. }
  3761. },
  3762. "/project/{projectID}/directories": {
  3763. "get": {
  3764. "tags": ["project"],
  3765. "operationId": "project.directories",
  3766. "parameters": [
  3767. {
  3768. "name": "projectID",
  3769. "in": "path",
  3770. "schema": {
  3771. "type": "string"
  3772. },
  3773. "required": true
  3774. },
  3775. {
  3776. "name": "directory",
  3777. "in": "query",
  3778. "schema": {
  3779. "type": "string"
  3780. },
  3781. "required": false
  3782. },
  3783. {
  3784. "name": "workspace",
  3785. "in": "query",
  3786. "schema": {
  3787. "type": "string"
  3788. },
  3789. "required": false
  3790. }
  3791. ],
  3792. "responses": {
  3793. "200": {
  3794. "description": "Project directories",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/ProjectDirectories"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "400": {
  3804. "description": "Bad request",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/BadRequestError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "List known local absolute directories for a project.",
  3815. "summary": "List project directories",
  3816. "x-codeSamples": [
  3817. {
  3818. "lang": "js",
  3819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3820. }
  3821. ]
  3822. }
  3823. },
  3824. "/experimental/project/{projectID}/copy": {
  3825. "post": {
  3826. "tags": ["projectCopy"],
  3827. "operationId": "experimental.projectCopy.create",
  3828. "parameters": [
  3829. {
  3830. "name": "projectID",
  3831. "in": "path",
  3832. "schema": {
  3833. "type": "string"
  3834. },
  3835. "required": true
  3836. },
  3837. {
  3838. "name": "workspace",
  3839. "in": "query",
  3840. "schema": {
  3841. "type": "string"
  3842. },
  3843. "required": false
  3844. }
  3845. ],
  3846. "responses": {
  3847. "200": {
  3848. "description": "Project copy created",
  3849. "content": {
  3850. "application/json": {
  3851. "schema": {
  3852. "$ref": "#/components/schemas/ProjectCopyCopy"
  3853. }
  3854. }
  3855. }
  3856. },
  3857. "400": {
  3858. "description": "ProjectCopyError | InvalidRequestError",
  3859. "content": {
  3860. "application/json": {
  3861. "schema": {
  3862. "anyOf": [
  3863. {
  3864. "$ref": "#/components/schemas/ProjectCopyError"
  3865. },
  3866. {
  3867. "$ref": "#/components/schemas/InvalidRequestError"
  3868. }
  3869. ]
  3870. }
  3871. }
  3872. }
  3873. }
  3874. },
  3875. "description": "Create a local physical copy of a project using the selected strategy.",
  3876. "summary": "Create project copy",
  3877. "requestBody": {
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "object",
  3882. "properties": {
  3883. "strategy": {
  3884. "type": "string",
  3885. "enum": ["git_worktree"]
  3886. },
  3887. "directory": {
  3888. "type": "string"
  3889. },
  3890. "name": {
  3891. "type": "string"
  3892. },
  3893. "context": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "required": ["strategy", "directory"],
  3898. "additionalProperties": false
  3899. }
  3900. }
  3901. }
  3902. },
  3903. "x-codeSamples": [
  3904. {
  3905. "lang": "js",
  3906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3907. }
  3908. ]
  3909. },
  3910. "delete": {
  3911. "tags": ["projectCopy"],
  3912. "operationId": "experimental.projectCopy.remove",
  3913. "parameters": [
  3914. {
  3915. "name": "projectID",
  3916. "in": "path",
  3917. "schema": {
  3918. "type": "string"
  3919. },
  3920. "required": true
  3921. },
  3922. {
  3923. "name": "directory",
  3924. "in": "query",
  3925. "schema": {
  3926. "type": "string"
  3927. },
  3928. "required": false
  3929. },
  3930. {
  3931. "name": "workspace",
  3932. "in": "query",
  3933. "schema": {
  3934. "type": "string"
  3935. },
  3936. "required": false
  3937. }
  3938. ],
  3939. "responses": {
  3940. "204": {
  3941. "description": "Project copy removed"
  3942. },
  3943. "400": {
  3944. "description": "ProjectCopyError | InvalidRequestError",
  3945. "content": {
  3946. "application/json": {
  3947. "schema": {
  3948. "anyOf": [
  3949. {
  3950. "$ref": "#/components/schemas/ProjectCopyError"
  3951. },
  3952. {
  3953. "$ref": "#/components/schemas/InvalidRequestError"
  3954. }
  3955. ]
  3956. }
  3957. }
  3958. }
  3959. }
  3960. },
  3961. "description": "Remove a local physical copy of a project using the selected strategy.",
  3962. "summary": "Remove project copy",
  3963. "requestBody": {
  3964. "content": {
  3965. "application/json": {
  3966. "schema": {
  3967. "type": "object",
  3968. "properties": {
  3969. "directory": {
  3970. "type": "string"
  3971. }
  3972. },
  3973. "required": ["directory"],
  3974. "additionalProperties": false
  3975. }
  3976. }
  3977. }
  3978. },
  3979. "x-codeSamples": [
  3980. {
  3981. "lang": "js",
  3982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  3983. }
  3984. ]
  3985. }
  3986. },
  3987. "/experimental/project/{projectID}/copy/refresh": {
  3988. "post": {
  3989. "tags": ["projectCopy"],
  3990. "operationId": "experimental.projectCopy.refresh",
  3991. "parameters": [
  3992. {
  3993. "name": "projectID",
  3994. "in": "path",
  3995. "schema": {
  3996. "type": "string"
  3997. },
  3998. "required": true
  3999. },
  4000. {
  4001. "name": "directory",
  4002. "in": "query",
  4003. "schema": {
  4004. "type": "string"
  4005. },
  4006. "required": false
  4007. },
  4008. {
  4009. "name": "workspace",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. }
  4016. ],
  4017. "responses": {
  4018. "204": {
  4019. "description": "Project copies refreshed"
  4020. },
  4021. "400": {
  4022. "description": "ProjectCopyError | InvalidRequestError",
  4023. "content": {
  4024. "application/json": {
  4025. "schema": {
  4026. "anyOf": [
  4027. {
  4028. "$ref": "#/components/schemas/ProjectCopyError"
  4029. },
  4030. {
  4031. "$ref": "#/components/schemas/InvalidRequestError"
  4032. }
  4033. ]
  4034. }
  4035. }
  4036. }
  4037. }
  4038. },
  4039. "description": "Discover local project copies using one or all configured strategies.",
  4040. "summary": "Refresh project copies",
  4041. "x-codeSamples": [
  4042. {
  4043. "lang": "js",
  4044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4045. }
  4046. ]
  4047. }
  4048. },
  4049. "/pty/shells": {
  4050. "get": {
  4051. "tags": ["pty"],
  4052. "operationId": "pty.shells",
  4053. "parameters": [
  4054. {
  4055. "name": "directory",
  4056. "in": "query",
  4057. "schema": {
  4058. "type": "string"
  4059. },
  4060. "required": false
  4061. },
  4062. {
  4063. "name": "workspace",
  4064. "in": "query",
  4065. "schema": {
  4066. "type": "string"
  4067. },
  4068. "required": false
  4069. }
  4070. ],
  4071. "responses": {
  4072. "200": {
  4073. "description": "List of shells",
  4074. "content": {
  4075. "application/json": {
  4076. "schema": {
  4077. "type": "array",
  4078. "items": {
  4079. "type": "object",
  4080. "properties": {
  4081. "path": {
  4082. "type": "string"
  4083. },
  4084. "name": {
  4085. "type": "string"
  4086. },
  4087. "acceptable": {
  4088. "type": "boolean"
  4089. }
  4090. },
  4091. "required": ["path", "name", "acceptable"],
  4092. "additionalProperties": false
  4093. },
  4094. "description": "List of shells"
  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 available shells on the system.",
  4111. "summary": "List available shells",
  4112. "x-codeSamples": [
  4113. {
  4114. "lang": "js",
  4115. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4116. }
  4117. ]
  4118. }
  4119. },
  4120. "/pty": {
  4121. "get": {
  4122. "tags": ["pty"],
  4123. "operationId": "pty.list",
  4124. "parameters": [
  4125. {
  4126. "name": "directory",
  4127. "in": "query",
  4128. "schema": {
  4129. "type": "string"
  4130. },
  4131. "required": false
  4132. },
  4133. {
  4134. "name": "workspace",
  4135. "in": "query",
  4136. "schema": {
  4137. "type": "string"
  4138. },
  4139. "required": false
  4140. }
  4141. ],
  4142. "responses": {
  4143. "200": {
  4144. "description": "List of sessions",
  4145. "content": {
  4146. "application/json": {
  4147. "schema": {
  4148. "type": "array",
  4149. "items": {
  4150. "$ref": "#/components/schemas/Pty"
  4151. },
  4152. "description": "List of sessions"
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "400": {
  4158. "description": "Bad request",
  4159. "content": {
  4160. "application/json": {
  4161. "schema": {
  4162. "$ref": "#/components/schemas/BadRequestError"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4169. "summary": "List PTY sessions",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4174. }
  4175. ]
  4176. },
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.create",
  4180. "parameters": [
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "Created session",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "$ref": "#/components/schemas/Pty"
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "400": {
  4210. "description": "BadRequest | InvalidRequestError",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "anyOf": [
  4215. {
  4216. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4217. },
  4218. {
  4219. "$ref": "#/components/schemas/InvalidRequestError"
  4220. }
  4221. ]
  4222. }
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4228. "summary": "Create PTY session",
  4229. "requestBody": {
  4230. "content": {
  4231. "application/json": {
  4232. "schema": {
  4233. "type": "object",
  4234. "properties": {
  4235. "command": {
  4236. "type": "string"
  4237. },
  4238. "args": {
  4239. "type": "array",
  4240. "items": {
  4241. "type": "string"
  4242. }
  4243. },
  4244. "cwd": {
  4245. "type": "string"
  4246. },
  4247. "title": {
  4248. "type": "string"
  4249. },
  4250. "env": {
  4251. "type": "object",
  4252. "additionalProperties": {
  4253. "type": "string"
  4254. }
  4255. }
  4256. },
  4257. "additionalProperties": false
  4258. }
  4259. }
  4260. }
  4261. },
  4262. "x-codeSamples": [
  4263. {
  4264. "lang": "js",
  4265. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4266. }
  4267. ]
  4268. }
  4269. },
  4270. "/pty/{ptyID}": {
  4271. "get": {
  4272. "tags": ["pty"],
  4273. "operationId": "pty.get",
  4274. "parameters": [
  4275. {
  4276. "name": "ptyID",
  4277. "in": "path",
  4278. "schema": {
  4279. "type": "string",
  4280. "pattern": "^pty"
  4281. },
  4282. "required": true
  4283. },
  4284. {
  4285. "name": "directory",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. },
  4292. {
  4293. "name": "workspace",
  4294. "in": "query",
  4295. "schema": {
  4296. "type": "string"
  4297. },
  4298. "required": false
  4299. }
  4300. ],
  4301. "responses": {
  4302. "200": {
  4303. "description": "Session info",
  4304. "content": {
  4305. "application/json": {
  4306. "schema": {
  4307. "$ref": "#/components/schemas/Pty"
  4308. }
  4309. }
  4310. }
  4311. },
  4312. "400": {
  4313. "description": "Bad request",
  4314. "content": {
  4315. "application/json": {
  4316. "schema": {
  4317. "$ref": "#/components/schemas/BadRequestError"
  4318. }
  4319. }
  4320. }
  4321. },
  4322. "404": {
  4323. "description": "PtyNotFoundError",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "$ref": "#/components/schemas/PtyNotFoundError"
  4328. }
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4334. "summary": "Get PTY session",
  4335. "x-codeSamples": [
  4336. {
  4337. "lang": "js",
  4338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4339. }
  4340. ]
  4341. },
  4342. "put": {
  4343. "tags": ["pty"],
  4344. "operationId": "pty.update",
  4345. "parameters": [
  4346. {
  4347. "name": "ptyID",
  4348. "in": "path",
  4349. "schema": {
  4350. "type": "string",
  4351. "pattern": "^pty"
  4352. },
  4353. "required": true
  4354. },
  4355. {
  4356. "name": "directory",
  4357. "in": "query",
  4358. "schema": {
  4359. "type": "string"
  4360. },
  4361. "required": false
  4362. },
  4363. {
  4364. "name": "workspace",
  4365. "in": "query",
  4366. "schema": {
  4367. "type": "string"
  4368. },
  4369. "required": false
  4370. }
  4371. ],
  4372. "responses": {
  4373. "200": {
  4374. "description": "Updated session",
  4375. "content": {
  4376. "application/json": {
  4377. "schema": {
  4378. "$ref": "#/components/schemas/Pty"
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "400": {
  4384. "description": "BadRequest | InvalidRequestError",
  4385. "content": {
  4386. "application/json": {
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4391. },
  4392. {
  4393. "$ref": "#/components/schemas/InvalidRequestError"
  4394. }
  4395. ]
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "404": {
  4401. "description": "PtyNotFoundError",
  4402. "content": {
  4403. "application/json": {
  4404. "schema": {
  4405. "$ref": "#/components/schemas/PtyNotFoundError"
  4406. }
  4407. }
  4408. }
  4409. }
  4410. },
  4411. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4412. "summary": "Update PTY session",
  4413. "requestBody": {
  4414. "content": {
  4415. "application/json": {
  4416. "schema": {
  4417. "type": "object",
  4418. "properties": {
  4419. "title": {
  4420. "type": "string"
  4421. },
  4422. "size": {
  4423. "type": "object",
  4424. "properties": {
  4425. "rows": {
  4426. "type": "integer",
  4427. "exclusiveMinimum": 0
  4428. },
  4429. "cols": {
  4430. "type": "integer",
  4431. "exclusiveMinimum": 0
  4432. }
  4433. },
  4434. "required": ["rows", "cols"],
  4435. "additionalProperties": false
  4436. }
  4437. },
  4438. "additionalProperties": false
  4439. }
  4440. }
  4441. }
  4442. },
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "delete": {
  4451. "tags": ["pty"],
  4452. "operationId": "pty.remove",
  4453. "parameters": [
  4454. {
  4455. "name": "ptyID",
  4456. "in": "path",
  4457. "schema": {
  4458. "type": "string",
  4459. "pattern": "^pty"
  4460. },
  4461. "required": true
  4462. },
  4463. {
  4464. "name": "directory",
  4465. "in": "query",
  4466. "schema": {
  4467. "type": "string"
  4468. },
  4469. "required": false
  4470. },
  4471. {
  4472. "name": "workspace",
  4473. "in": "query",
  4474. "schema": {
  4475. "type": "string"
  4476. },
  4477. "required": false
  4478. }
  4479. ],
  4480. "responses": {
  4481. "200": {
  4482. "description": "Session removed",
  4483. "content": {
  4484. "application/json": {
  4485. "schema": {
  4486. "type": "boolean",
  4487. "description": "Session removed"
  4488. }
  4489. }
  4490. }
  4491. },
  4492. "400": {
  4493. "description": "Bad request",
  4494. "content": {
  4495. "application/json": {
  4496. "schema": {
  4497. "$ref": "#/components/schemas/BadRequestError"
  4498. }
  4499. }
  4500. }
  4501. },
  4502. "404": {
  4503. "description": "PtyNotFoundError",
  4504. "content": {
  4505. "application/json": {
  4506. "schema": {
  4507. "$ref": "#/components/schemas/PtyNotFoundError"
  4508. }
  4509. }
  4510. }
  4511. }
  4512. },
  4513. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4514. "summary": "Remove PTY session",
  4515. "x-codeSamples": [
  4516. {
  4517. "lang": "js",
  4518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4519. }
  4520. ]
  4521. }
  4522. },
  4523. "/pty/{ptyID}/connect-token": {
  4524. "post": {
  4525. "tags": ["pty"],
  4526. "operationId": "pty.connectToken",
  4527. "parameters": [
  4528. {
  4529. "name": "ptyID",
  4530. "in": "path",
  4531. "schema": {
  4532. "type": "string",
  4533. "pattern": "^pty"
  4534. },
  4535. "required": true
  4536. },
  4537. {
  4538. "name": "directory",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. },
  4545. {
  4546. "name": "workspace",
  4547. "in": "query",
  4548. "schema": {
  4549. "type": "string"
  4550. },
  4551. "required": false
  4552. }
  4553. ],
  4554. "responses": {
  4555. "200": {
  4556. "description": "WebSocket connect token",
  4557. "content": {
  4558. "application/json": {
  4559. "schema": {
  4560. "type": "object",
  4561. "properties": {
  4562. "ticket": {
  4563. "type": "string"
  4564. },
  4565. "expires_in": {
  4566. "type": "integer",
  4567. "exclusiveMinimum": 0
  4568. }
  4569. },
  4570. "required": ["ticket", "expires_in"],
  4571. "additionalProperties": false,
  4572. "description": "WebSocket connect token"
  4573. }
  4574. }
  4575. }
  4576. },
  4577. "400": {
  4578. "description": "Bad request",
  4579. "content": {
  4580. "application/json": {
  4581. "schema": {
  4582. "$ref": "#/components/schemas/BadRequestError"
  4583. }
  4584. }
  4585. }
  4586. },
  4587. "403": {
  4588. "description": "PtyForbiddenError",
  4589. "content": {
  4590. "application/json": {
  4591. "schema": {
  4592. "$ref": "#/components/schemas/PtyForbiddenError"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "404": {
  4598. "description": "PtyNotFoundError",
  4599. "content": {
  4600. "application/json": {
  4601. "schema": {
  4602. "$ref": "#/components/schemas/PtyNotFoundError"
  4603. }
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4609. "summary": "Create PTY WebSocket token",
  4610. "x-codeSamples": [
  4611. {
  4612. "lang": "js",
  4613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4614. }
  4615. ]
  4616. }
  4617. },
  4618. "/question": {
  4619. "get": {
  4620. "tags": ["question"],
  4621. "operationId": "question.list",
  4622. "parameters": [
  4623. {
  4624. "name": "directory",
  4625. "in": "query",
  4626. "schema": {
  4627. "type": "string"
  4628. },
  4629. "required": false
  4630. },
  4631. {
  4632. "name": "workspace",
  4633. "in": "query",
  4634. "schema": {
  4635. "type": "string"
  4636. },
  4637. "required": false
  4638. }
  4639. ],
  4640. "responses": {
  4641. "200": {
  4642. "description": "List of pending questions",
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "array",
  4647. "items": {
  4648. "$ref": "#/components/schemas/QuestionRequest"
  4649. },
  4650. "description": "List of pending questions"
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "400": {
  4656. "description": "Bad request",
  4657. "content": {
  4658. "application/json": {
  4659. "schema": {
  4660. "$ref": "#/components/schemas/BadRequestError"
  4661. }
  4662. }
  4663. }
  4664. }
  4665. },
  4666. "description": "Get all pending question requests across all sessions.",
  4667. "summary": "List pending questions",
  4668. "x-codeSamples": [
  4669. {
  4670. "lang": "js",
  4671. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4672. }
  4673. ]
  4674. }
  4675. },
  4676. "/question/{requestID}/reply": {
  4677. "post": {
  4678. "tags": ["question"],
  4679. "operationId": "question.reply",
  4680. "parameters": [
  4681. {
  4682. "name": "requestID",
  4683. "in": "path",
  4684. "schema": {
  4685. "type": "string",
  4686. "pattern": "^que"
  4687. },
  4688. "required": true
  4689. },
  4690. {
  4691. "name": "directory",
  4692. "in": "query",
  4693. "schema": {
  4694. "type": "string"
  4695. },
  4696. "required": false
  4697. },
  4698. {
  4699. "name": "workspace",
  4700. "in": "query",
  4701. "schema": {
  4702. "type": "string"
  4703. },
  4704. "required": false
  4705. }
  4706. ],
  4707. "responses": {
  4708. "200": {
  4709. "description": "Question answered successfully",
  4710. "content": {
  4711. "application/json": {
  4712. "schema": {
  4713. "type": "boolean",
  4714. "description": "Question answered successfully"
  4715. }
  4716. }
  4717. }
  4718. },
  4719. "400": {
  4720. "description": "BadRequest | InvalidRequestError",
  4721. "content": {
  4722. "application/json": {
  4723. "schema": {
  4724. "anyOf": [
  4725. {
  4726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4727. },
  4728. {
  4729. "$ref": "#/components/schemas/InvalidRequestError"
  4730. }
  4731. ]
  4732. }
  4733. }
  4734. }
  4735. },
  4736. "404": {
  4737. "description": "QuestionNotFoundError",
  4738. "content": {
  4739. "application/json": {
  4740. "schema": {
  4741. "$ref": "#/components/schemas/QuestionNotFoundError"
  4742. }
  4743. }
  4744. }
  4745. }
  4746. },
  4747. "description": "Provide answers to a question request from the AI assistant.",
  4748. "summary": "Reply to question request",
  4749. "requestBody": {
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "type": "object",
  4754. "properties": {
  4755. "answers": {
  4756. "type": "array",
  4757. "items": {
  4758. "$ref": "#/components/schemas/QuestionAnswer"
  4759. },
  4760. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4761. }
  4762. },
  4763. "required": ["answers"],
  4764. "additionalProperties": false
  4765. }
  4766. }
  4767. }
  4768. },
  4769. "x-codeSamples": [
  4770. {
  4771. "lang": "js",
  4772. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4773. }
  4774. ]
  4775. }
  4776. },
  4777. "/question/{requestID}/reject": {
  4778. "post": {
  4779. "tags": ["question"],
  4780. "operationId": "question.reject",
  4781. "parameters": [
  4782. {
  4783. "name": "requestID",
  4784. "in": "path",
  4785. "schema": {
  4786. "type": "string",
  4787. "pattern": "^que"
  4788. },
  4789. "required": true
  4790. },
  4791. {
  4792. "name": "directory",
  4793. "in": "query",
  4794. "schema": {
  4795. "type": "string"
  4796. },
  4797. "required": false
  4798. },
  4799. {
  4800. "name": "workspace",
  4801. "in": "query",
  4802. "schema": {
  4803. "type": "string"
  4804. },
  4805. "required": false
  4806. }
  4807. ],
  4808. "responses": {
  4809. "200": {
  4810. "description": "Question rejected successfully",
  4811. "content": {
  4812. "application/json": {
  4813. "schema": {
  4814. "type": "boolean",
  4815. "description": "Question rejected successfully"
  4816. }
  4817. }
  4818. }
  4819. },
  4820. "400": {
  4821. "description": "BadRequest | InvalidRequestError",
  4822. "content": {
  4823. "application/json": {
  4824. "schema": {
  4825. "anyOf": [
  4826. {
  4827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4828. },
  4829. {
  4830. "$ref": "#/components/schemas/InvalidRequestError"
  4831. }
  4832. ]
  4833. }
  4834. }
  4835. }
  4836. },
  4837. "404": {
  4838. "description": "QuestionNotFoundError",
  4839. "content": {
  4840. "application/json": {
  4841. "schema": {
  4842. "$ref": "#/components/schemas/QuestionNotFoundError"
  4843. }
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "description": "Reject a question request from the AI assistant.",
  4849. "summary": "Reject question request",
  4850. "x-codeSamples": [
  4851. {
  4852. "lang": "js",
  4853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4854. }
  4855. ]
  4856. }
  4857. },
  4858. "/permission": {
  4859. "get": {
  4860. "tags": ["permission"],
  4861. "operationId": "permission.list",
  4862. "parameters": [
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of pending permissions",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/PermissionRequest"
  4889. },
  4890. "description": "List of pending permissions"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "description": "Get all pending permission requests across all sessions.",
  4907. "summary": "List pending permissions",
  4908. "x-codeSamples": [
  4909. {
  4910. "lang": "js",
  4911. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4912. }
  4913. ]
  4914. }
  4915. },
  4916. "/permission/{requestID}/reply": {
  4917. "post": {
  4918. "tags": ["permission"],
  4919. "operationId": "permission.reply",
  4920. "parameters": [
  4921. {
  4922. "name": "requestID",
  4923. "in": "path",
  4924. "schema": {
  4925. "type": "string",
  4926. "pattern": "^per"
  4927. },
  4928. "required": true
  4929. },
  4930. {
  4931. "name": "directory",
  4932. "in": "query",
  4933. "schema": {
  4934. "type": "string"
  4935. },
  4936. "required": false
  4937. },
  4938. {
  4939. "name": "workspace",
  4940. "in": "query",
  4941. "schema": {
  4942. "type": "string"
  4943. },
  4944. "required": false
  4945. }
  4946. ],
  4947. "responses": {
  4948. "200": {
  4949. "description": "Permission processed successfully",
  4950. "content": {
  4951. "application/json": {
  4952. "schema": {
  4953. "type": "boolean",
  4954. "description": "Permission processed successfully"
  4955. }
  4956. }
  4957. }
  4958. },
  4959. "400": {
  4960. "description": "BadRequest | InvalidRequestError",
  4961. "content": {
  4962. "application/json": {
  4963. "schema": {
  4964. "anyOf": [
  4965. {
  4966. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4967. },
  4968. {
  4969. "$ref": "#/components/schemas/InvalidRequestError"
  4970. }
  4971. ]
  4972. }
  4973. }
  4974. }
  4975. },
  4976. "404": {
  4977. "description": "PermissionNotFoundError",
  4978. "content": {
  4979. "application/json": {
  4980. "schema": {
  4981. "$ref": "#/components/schemas/PermissionNotFoundError"
  4982. }
  4983. }
  4984. }
  4985. }
  4986. },
  4987. "description": "Approve or deny a permission request from the AI assistant.",
  4988. "summary": "Respond to permission request",
  4989. "requestBody": {
  4990. "content": {
  4991. "application/json": {
  4992. "schema": {
  4993. "type": "object",
  4994. "properties": {
  4995. "reply": {
  4996. "type": "string",
  4997. "enum": ["once", "always", "reject"]
  4998. },
  4999. "message": {
  5000. "type": "string"
  5001. }
  5002. },
  5003. "required": ["reply"],
  5004. "additionalProperties": false
  5005. }
  5006. }
  5007. }
  5008. },
  5009. "x-codeSamples": [
  5010. {
  5011. "lang": "js",
  5012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5013. }
  5014. ]
  5015. }
  5016. },
  5017. "/provider": {
  5018. "get": {
  5019. "tags": ["provider"],
  5020. "operationId": "provider.list",
  5021. "parameters": [
  5022. {
  5023. "name": "directory",
  5024. "in": "query",
  5025. "schema": {
  5026. "type": "string"
  5027. },
  5028. "required": false
  5029. },
  5030. {
  5031. "name": "workspace",
  5032. "in": "query",
  5033. "schema": {
  5034. "type": "string"
  5035. },
  5036. "required": false
  5037. }
  5038. ],
  5039. "responses": {
  5040. "200": {
  5041. "description": "List of providers",
  5042. "content": {
  5043. "application/json": {
  5044. "schema": {
  5045. "type": "object",
  5046. "properties": {
  5047. "all": {
  5048. "type": "array",
  5049. "items": {
  5050. "$ref": "#/components/schemas/Provider"
  5051. }
  5052. },
  5053. "default": {
  5054. "type": "object",
  5055. "additionalProperties": {
  5056. "type": "string"
  5057. }
  5058. },
  5059. "connected": {
  5060. "type": "array",
  5061. "items": {
  5062. "type": "string"
  5063. }
  5064. }
  5065. },
  5066. "required": ["all", "default", "connected"],
  5067. "additionalProperties": false,
  5068. "description": "List of providers"
  5069. }
  5070. }
  5071. }
  5072. },
  5073. "400": {
  5074. "description": "Bad request",
  5075. "content": {
  5076. "application/json": {
  5077. "schema": {
  5078. "$ref": "#/components/schemas/BadRequestError"
  5079. }
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5085. "summary": "List providers",
  5086. "x-codeSamples": [
  5087. {
  5088. "lang": "js",
  5089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5090. }
  5091. ]
  5092. }
  5093. },
  5094. "/provider/auth": {
  5095. "get": {
  5096. "tags": ["provider"],
  5097. "operationId": "provider.auth",
  5098. "parameters": [
  5099. {
  5100. "name": "directory",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "string"
  5104. },
  5105. "required": false
  5106. },
  5107. {
  5108. "name": "workspace",
  5109. "in": "query",
  5110. "schema": {
  5111. "type": "string"
  5112. },
  5113. "required": false
  5114. }
  5115. ],
  5116. "responses": {
  5117. "200": {
  5118. "description": "Provider auth methods",
  5119. "content": {
  5120. "application/json": {
  5121. "schema": {
  5122. "type": "object",
  5123. "additionalProperties": {
  5124. "type": "array",
  5125. "items": {
  5126. "$ref": "#/components/schemas/ProviderAuthMethod"
  5127. }
  5128. },
  5129. "description": "Provider auth methods"
  5130. }
  5131. }
  5132. }
  5133. },
  5134. "400": {
  5135. "description": "Bad request",
  5136. "content": {
  5137. "application/json": {
  5138. "schema": {
  5139. "$ref": "#/components/schemas/BadRequestError"
  5140. }
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "description": "Retrieve available authentication methods for all AI providers.",
  5146. "summary": "Get provider auth methods",
  5147. "x-codeSamples": [
  5148. {
  5149. "lang": "js",
  5150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5151. }
  5152. ]
  5153. }
  5154. },
  5155. "/provider/{providerID}/oauth/authorize": {
  5156. "post": {
  5157. "tags": ["provider"],
  5158. "operationId": "provider.oauth.authorize",
  5159. "parameters": [
  5160. {
  5161. "name": "providerID",
  5162. "in": "path",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": true
  5167. },
  5168. {
  5169. "name": "directory",
  5170. "in": "query",
  5171. "schema": {
  5172. "type": "string"
  5173. },
  5174. "required": false
  5175. },
  5176. {
  5177. "name": "workspace",
  5178. "in": "query",
  5179. "schema": {
  5180. "type": "string"
  5181. },
  5182. "required": false
  5183. }
  5184. ],
  5185. "responses": {
  5186. "200": {
  5187. "description": "Authorization URL and method",
  5188. "content": {
  5189. "application/json": {
  5190. "schema": {
  5191. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5192. }
  5193. }
  5194. }
  5195. },
  5196. "400": {
  5197. "description": "ProviderAuthError | InvalidRequestError",
  5198. "content": {
  5199. "application/json": {
  5200. "schema": {
  5201. "anyOf": [
  5202. {
  5203. "$ref": "#/components/schemas/ProviderAuthError1"
  5204. },
  5205. {
  5206. "$ref": "#/components/schemas/InvalidRequestError"
  5207. }
  5208. ]
  5209. }
  5210. }
  5211. }
  5212. }
  5213. },
  5214. "description": "Start the OAuth authorization flow for a provider.",
  5215. "summary": "Start OAuth authorization",
  5216. "requestBody": {
  5217. "content": {
  5218. "application/json": {
  5219. "schema": {
  5220. "type": "object",
  5221. "properties": {
  5222. "method": {
  5223. "type": "number",
  5224. "description": "Auth method index"
  5225. },
  5226. "inputs": {
  5227. "type": "object",
  5228. "additionalProperties": {
  5229. "type": "string"
  5230. }
  5231. }
  5232. },
  5233. "required": ["method"],
  5234. "additionalProperties": false
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "x-codeSamples": [
  5240. {
  5241. "lang": "js",
  5242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5243. }
  5244. ]
  5245. }
  5246. },
  5247. "/provider/{providerID}/oauth/callback": {
  5248. "post": {
  5249. "tags": ["provider"],
  5250. "operationId": "provider.oauth.callback",
  5251. "parameters": [
  5252. {
  5253. "name": "providerID",
  5254. "in": "path",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": true
  5259. },
  5260. {
  5261. "name": "directory",
  5262. "in": "query",
  5263. "schema": {
  5264. "type": "string"
  5265. },
  5266. "required": false
  5267. },
  5268. {
  5269. "name": "workspace",
  5270. "in": "query",
  5271. "schema": {
  5272. "type": "string"
  5273. },
  5274. "required": false
  5275. }
  5276. ],
  5277. "responses": {
  5278. "200": {
  5279. "description": "OAuth callback processed successfully",
  5280. "content": {
  5281. "application/json": {
  5282. "schema": {
  5283. "type": "boolean",
  5284. "description": "OAuth callback processed successfully"
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "400": {
  5290. "description": "ProviderAuthError | InvalidRequestError",
  5291. "content": {
  5292. "application/json": {
  5293. "schema": {
  5294. "anyOf": [
  5295. {
  5296. "$ref": "#/components/schemas/ProviderAuthError1"
  5297. },
  5298. {
  5299. "$ref": "#/components/schemas/InvalidRequestError"
  5300. }
  5301. ]
  5302. }
  5303. }
  5304. }
  5305. }
  5306. },
  5307. "description": "Handle the OAuth callback from a provider after user authorization.",
  5308. "summary": "Handle OAuth callback",
  5309. "requestBody": {
  5310. "content": {
  5311. "application/json": {
  5312. "schema": {
  5313. "type": "object",
  5314. "properties": {
  5315. "method": {
  5316. "type": "number",
  5317. "description": "Auth method index"
  5318. },
  5319. "code": {
  5320. "type": "string"
  5321. }
  5322. },
  5323. "required": ["method"],
  5324. "additionalProperties": false
  5325. }
  5326. }
  5327. }
  5328. },
  5329. "x-codeSamples": [
  5330. {
  5331. "lang": "js",
  5332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5333. }
  5334. ]
  5335. }
  5336. },
  5337. "/session": {
  5338. "get": {
  5339. "tags": ["session"],
  5340. "operationId": "session.list",
  5341. "parameters": [
  5342. {
  5343. "name": "directory",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string"
  5347. },
  5348. "required": false
  5349. },
  5350. {
  5351. "name": "workspace",
  5352. "in": "query",
  5353. "schema": {
  5354. "type": "string"
  5355. },
  5356. "required": false
  5357. },
  5358. {
  5359. "name": "scope",
  5360. "in": "query",
  5361. "schema": {
  5362. "type": "string",
  5363. "enum": ["project"]
  5364. },
  5365. "required": false
  5366. },
  5367. {
  5368. "name": "path",
  5369. "in": "query",
  5370. "schema": {
  5371. "type": "string"
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "roots",
  5377. "in": "query",
  5378. "schema": {
  5379. "anyOf": [
  5380. {
  5381. "type": "boolean"
  5382. },
  5383. {
  5384. "type": "string",
  5385. "enum": ["true", "false"]
  5386. }
  5387. ]
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "start",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. },
  5399. {
  5400. "name": "search",
  5401. "in": "query",
  5402. "schema": {
  5403. "type": "string"
  5404. },
  5405. "required": false
  5406. },
  5407. {
  5408. "name": "limit",
  5409. "in": "query",
  5410. "schema": {
  5411. "type": "number"
  5412. },
  5413. "required": false
  5414. }
  5415. ],
  5416. "responses": {
  5417. "200": {
  5418. "description": "List of sessions",
  5419. "content": {
  5420. "application/json": {
  5421. "schema": {
  5422. "type": "array",
  5423. "items": {
  5424. "$ref": "#/components/schemas/Session"
  5425. },
  5426. "description": "List of sessions"
  5427. }
  5428. }
  5429. }
  5430. },
  5431. "400": {
  5432. "description": "Bad request",
  5433. "content": {
  5434. "application/json": {
  5435. "schema": {
  5436. "$ref": "#/components/schemas/BadRequestError"
  5437. }
  5438. }
  5439. }
  5440. }
  5441. },
  5442. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5443. "summary": "List sessions",
  5444. "x-codeSamples": [
  5445. {
  5446. "lang": "js",
  5447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5448. }
  5449. ]
  5450. },
  5451. "post": {
  5452. "tags": ["session"],
  5453. "operationId": "session.create",
  5454. "parameters": [
  5455. {
  5456. "name": "directory",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. },
  5463. {
  5464. "name": "workspace",
  5465. "in": "query",
  5466. "schema": {
  5467. "type": "string"
  5468. },
  5469. "required": false
  5470. }
  5471. ],
  5472. "responses": {
  5473. "200": {
  5474. "description": "Successfully created session",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "$ref": "#/components/schemas/Session"
  5479. }
  5480. }
  5481. }
  5482. },
  5483. "400": {
  5484. "description": "BadRequest | InvalidRequestError",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "anyOf": [
  5489. {
  5490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5491. },
  5492. {
  5493. "$ref": "#/components/schemas/InvalidRequestError"
  5494. }
  5495. ]
  5496. }
  5497. }
  5498. }
  5499. }
  5500. },
  5501. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5502. "summary": "Create session",
  5503. "requestBody": {
  5504. "content": {
  5505. "application/json": {
  5506. "schema": {
  5507. "type": "object",
  5508. "properties": {
  5509. "parentID": {
  5510. "type": "string",
  5511. "pattern": "^ses"
  5512. },
  5513. "title": {
  5514. "type": "string"
  5515. },
  5516. "agent": {
  5517. "type": "string"
  5518. },
  5519. "model": {
  5520. "type": "object",
  5521. "properties": {
  5522. "id": {
  5523. "type": "string"
  5524. },
  5525. "providerID": {
  5526. "type": "string"
  5527. },
  5528. "variant": {
  5529. "type": "string"
  5530. }
  5531. },
  5532. "required": ["id", "providerID"],
  5533. "additionalProperties": false
  5534. },
  5535. "metadata": {
  5536. "type": "object"
  5537. },
  5538. "permission": {
  5539. "$ref": "#/components/schemas/PermissionRuleset"
  5540. },
  5541. "workspaceID": {
  5542. "type": "string",
  5543. "pattern": "^wrk"
  5544. }
  5545. },
  5546. "additionalProperties": false
  5547. }
  5548. }
  5549. }
  5550. },
  5551. "x-codeSamples": [
  5552. {
  5553. "lang": "js",
  5554. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5555. }
  5556. ]
  5557. }
  5558. },
  5559. "/session/status": {
  5560. "get": {
  5561. "tags": ["session"],
  5562. "operationId": "session.status",
  5563. "parameters": [
  5564. {
  5565. "name": "directory",
  5566. "in": "query",
  5567. "schema": {
  5568. "type": "string"
  5569. },
  5570. "required": false
  5571. },
  5572. {
  5573. "name": "workspace",
  5574. "in": "query",
  5575. "schema": {
  5576. "type": "string"
  5577. },
  5578. "required": false
  5579. }
  5580. ],
  5581. "responses": {
  5582. "200": {
  5583. "description": "Get session status",
  5584. "content": {
  5585. "application/json": {
  5586. "schema": {
  5587. "type": "object",
  5588. "additionalProperties": {
  5589. "$ref": "#/components/schemas/SessionStatus"
  5590. },
  5591. "description": "Get session status"
  5592. }
  5593. }
  5594. }
  5595. },
  5596. "400": {
  5597. "description": "BadRequest | InvalidRequestError",
  5598. "content": {
  5599. "application/json": {
  5600. "schema": {
  5601. "anyOf": [
  5602. {
  5603. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5604. },
  5605. {
  5606. "$ref": "#/components/schemas/InvalidRequestError"
  5607. }
  5608. ]
  5609. }
  5610. }
  5611. }
  5612. }
  5613. },
  5614. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5615. "summary": "Get session status",
  5616. "x-codeSamples": [
  5617. {
  5618. "lang": "js",
  5619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5620. }
  5621. ]
  5622. }
  5623. },
  5624. "/session/{sessionID}": {
  5625. "get": {
  5626. "tags": ["session"],
  5627. "operationId": "session.get",
  5628. "parameters": [
  5629. {
  5630. "name": "sessionID",
  5631. "in": "path",
  5632. "schema": {
  5633. "type": "string",
  5634. "pattern": "^ses"
  5635. },
  5636. "required": true
  5637. },
  5638. {
  5639. "name": "directory",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. },
  5646. {
  5647. "name": "workspace",
  5648. "in": "query",
  5649. "schema": {
  5650. "type": "string"
  5651. },
  5652. "required": false
  5653. }
  5654. ],
  5655. "responses": {
  5656. "200": {
  5657. "description": "Get session",
  5658. "content": {
  5659. "application/json": {
  5660. "schema": {
  5661. "$ref": "#/components/schemas/Session"
  5662. }
  5663. }
  5664. }
  5665. },
  5666. "400": {
  5667. "description": "BadRequest | InvalidRequestError",
  5668. "content": {
  5669. "application/json": {
  5670. "schema": {
  5671. "anyOf": [
  5672. {
  5673. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5674. },
  5675. {
  5676. "$ref": "#/components/schemas/InvalidRequestError"
  5677. }
  5678. ]
  5679. }
  5680. }
  5681. }
  5682. },
  5683. "404": {
  5684. "description": "NotFoundError",
  5685. "content": {
  5686. "application/json": {
  5687. "schema": {
  5688. "$ref": "#/components/schemas/NotFoundError"
  5689. }
  5690. }
  5691. }
  5692. }
  5693. },
  5694. "description": "Retrieve detailed information about a specific OpenCode session.",
  5695. "summary": "Get session",
  5696. "x-codeSamples": [
  5697. {
  5698. "lang": "js",
  5699. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5700. }
  5701. ]
  5702. },
  5703. "delete": {
  5704. "tags": ["session"],
  5705. "operationId": "session.delete",
  5706. "parameters": [
  5707. {
  5708. "name": "sessionID",
  5709. "in": "path",
  5710. "schema": {
  5711. "type": "string",
  5712. "pattern": "^ses"
  5713. },
  5714. "required": true
  5715. },
  5716. {
  5717. "name": "directory",
  5718. "in": "query",
  5719. "schema": {
  5720. "type": "string"
  5721. },
  5722. "required": false
  5723. },
  5724. {
  5725. "name": "workspace",
  5726. "in": "query",
  5727. "schema": {
  5728. "type": "string"
  5729. },
  5730. "required": false
  5731. }
  5732. ],
  5733. "responses": {
  5734. "200": {
  5735. "description": "Successfully deleted session",
  5736. "content": {
  5737. "application/json": {
  5738. "schema": {
  5739. "type": "boolean",
  5740. "description": "Successfully deleted session"
  5741. }
  5742. }
  5743. }
  5744. },
  5745. "400": {
  5746. "description": "BadRequest | InvalidRequestError",
  5747. "content": {
  5748. "application/json": {
  5749. "schema": {
  5750. "anyOf": [
  5751. {
  5752. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5753. },
  5754. {
  5755. "$ref": "#/components/schemas/InvalidRequestError"
  5756. }
  5757. ]
  5758. }
  5759. }
  5760. }
  5761. },
  5762. "404": {
  5763. "description": "NotFoundError",
  5764. "content": {
  5765. "application/json": {
  5766. "schema": {
  5767. "$ref": "#/components/schemas/NotFoundError"
  5768. }
  5769. }
  5770. }
  5771. }
  5772. },
  5773. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5774. "summary": "Delete session",
  5775. "x-codeSamples": [
  5776. {
  5777. "lang": "js",
  5778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5779. }
  5780. ]
  5781. },
  5782. "patch": {
  5783. "tags": ["session"],
  5784. "operationId": "session.update",
  5785. "parameters": [
  5786. {
  5787. "name": "sessionID",
  5788. "in": "path",
  5789. "schema": {
  5790. "type": "string",
  5791. "pattern": "^ses"
  5792. },
  5793. "required": true
  5794. },
  5795. {
  5796. "name": "directory",
  5797. "in": "query",
  5798. "schema": {
  5799. "type": "string"
  5800. },
  5801. "required": false
  5802. },
  5803. {
  5804. "name": "workspace",
  5805. "in": "query",
  5806. "schema": {
  5807. "type": "string"
  5808. },
  5809. "required": false
  5810. }
  5811. ],
  5812. "responses": {
  5813. "200": {
  5814. "description": "Successfully updated session",
  5815. "content": {
  5816. "application/json": {
  5817. "schema": {
  5818. "$ref": "#/components/schemas/Session"
  5819. }
  5820. }
  5821. }
  5822. },
  5823. "400": {
  5824. "description": "BadRequest | InvalidRequestError",
  5825. "content": {
  5826. "application/json": {
  5827. "schema": {
  5828. "anyOf": [
  5829. {
  5830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5831. },
  5832. {
  5833. "$ref": "#/components/schemas/InvalidRequestError"
  5834. }
  5835. ]
  5836. }
  5837. }
  5838. }
  5839. },
  5840. "404": {
  5841. "description": "NotFoundError",
  5842. "content": {
  5843. "application/json": {
  5844. "schema": {
  5845. "$ref": "#/components/schemas/NotFoundError"
  5846. }
  5847. }
  5848. }
  5849. }
  5850. },
  5851. "description": "Update properties of an existing session, such as title or other metadata.",
  5852. "summary": "Update session",
  5853. "requestBody": {
  5854. "content": {
  5855. "application/json": {
  5856. "schema": {
  5857. "type": "object",
  5858. "properties": {
  5859. "title": {
  5860. "type": "string"
  5861. },
  5862. "metadata": {
  5863. "type": "object"
  5864. },
  5865. "permission": {
  5866. "$ref": "#/components/schemas/PermissionRuleset"
  5867. },
  5868. "time": {
  5869. "type": "object",
  5870. "properties": {
  5871. "archived": {
  5872. "type": "number"
  5873. }
  5874. },
  5875. "additionalProperties": false
  5876. }
  5877. },
  5878. "additionalProperties": false
  5879. }
  5880. }
  5881. }
  5882. },
  5883. "x-codeSamples": [
  5884. {
  5885. "lang": "js",
  5886. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5887. }
  5888. ]
  5889. }
  5890. },
  5891. "/session/{sessionID}/children": {
  5892. "get": {
  5893. "tags": ["session"],
  5894. "operationId": "session.children",
  5895. "parameters": [
  5896. {
  5897. "name": "sessionID",
  5898. "in": "path",
  5899. "schema": {
  5900. "type": "string",
  5901. "pattern": "^ses"
  5902. },
  5903. "required": true
  5904. },
  5905. {
  5906. "name": "directory",
  5907. "in": "query",
  5908. "schema": {
  5909. "type": "string"
  5910. },
  5911. "required": false
  5912. },
  5913. {
  5914. "name": "workspace",
  5915. "in": "query",
  5916. "schema": {
  5917. "type": "string"
  5918. },
  5919. "required": false
  5920. }
  5921. ],
  5922. "responses": {
  5923. "200": {
  5924. "description": "List of children",
  5925. "content": {
  5926. "application/json": {
  5927. "schema": {
  5928. "type": "array",
  5929. "items": {
  5930. "$ref": "#/components/schemas/Session"
  5931. },
  5932. "description": "List of children"
  5933. }
  5934. }
  5935. }
  5936. },
  5937. "400": {
  5938. "description": "BadRequest | InvalidRequestError",
  5939. "content": {
  5940. "application/json": {
  5941. "schema": {
  5942. "anyOf": [
  5943. {
  5944. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5945. },
  5946. {
  5947. "$ref": "#/components/schemas/InvalidRequestError"
  5948. }
  5949. ]
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5966. "summary": "Get session children",
  5967. "x-codeSamples": [
  5968. {
  5969. "lang": "js",
  5970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5971. }
  5972. ]
  5973. }
  5974. },
  5975. "/session/{sessionID}/todo": {
  5976. "get": {
  5977. "tags": ["session"],
  5978. "operationId": "session.todo",
  5979. "parameters": [
  5980. {
  5981. "name": "sessionID",
  5982. "in": "path",
  5983. "schema": {
  5984. "type": "string",
  5985. "pattern": "^ses"
  5986. },
  5987. "required": true
  5988. },
  5989. {
  5990. "name": "directory",
  5991. "in": "query",
  5992. "schema": {
  5993. "type": "string"
  5994. },
  5995. "required": false
  5996. },
  5997. {
  5998. "name": "workspace",
  5999. "in": "query",
  6000. "schema": {
  6001. "type": "string"
  6002. },
  6003. "required": false
  6004. }
  6005. ],
  6006. "responses": {
  6007. "200": {
  6008. "description": "Todo list",
  6009. "content": {
  6010. "application/json": {
  6011. "schema": {
  6012. "type": "array",
  6013. "items": {
  6014. "$ref": "#/components/schemas/Todo"
  6015. },
  6016. "description": "Todo list"
  6017. }
  6018. }
  6019. }
  6020. },
  6021. "400": {
  6022. "description": "BadRequest | InvalidRequestError",
  6023. "content": {
  6024. "application/json": {
  6025. "schema": {
  6026. "anyOf": [
  6027. {
  6028. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6029. },
  6030. {
  6031. "$ref": "#/components/schemas/InvalidRequestError"
  6032. }
  6033. ]
  6034. }
  6035. }
  6036. }
  6037. },
  6038. "404": {
  6039. "description": "NotFoundError",
  6040. "content": {
  6041. "application/json": {
  6042. "schema": {
  6043. "$ref": "#/components/schemas/NotFoundError"
  6044. }
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6050. "summary": "Get session todos",
  6051. "x-codeSamples": [
  6052. {
  6053. "lang": "js",
  6054. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6055. }
  6056. ]
  6057. }
  6058. },
  6059. "/session/{sessionID}/diff": {
  6060. "get": {
  6061. "tags": ["session"],
  6062. "operationId": "session.diff",
  6063. "parameters": [
  6064. {
  6065. "name": "sessionID",
  6066. "in": "path",
  6067. "schema": {
  6068. "type": "string",
  6069. "pattern": "^ses"
  6070. },
  6071. "required": true
  6072. },
  6073. {
  6074. "name": "directory",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string"
  6078. },
  6079. "required": false
  6080. },
  6081. {
  6082. "name": "workspace",
  6083. "in": "query",
  6084. "schema": {
  6085. "type": "string"
  6086. },
  6087. "required": false
  6088. },
  6089. {
  6090. "name": "messageID",
  6091. "in": "query",
  6092. "schema": {
  6093. "type": "string",
  6094. "pattern": "^msg"
  6095. },
  6096. "required": false
  6097. }
  6098. ],
  6099. "responses": {
  6100. "200": {
  6101. "description": "Successfully retrieved diff",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "type": "array",
  6106. "items": {
  6107. "$ref": "#/components/schemas/SnapshotFileDiff"
  6108. },
  6109. "description": "Successfully retrieved diff"
  6110. }
  6111. }
  6112. }
  6113. },
  6114. "400": {
  6115. "description": "Bad request",
  6116. "content": {
  6117. "application/json": {
  6118. "schema": {
  6119. "$ref": "#/components/schemas/BadRequestError"
  6120. }
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6126. "summary": "Get message diff",
  6127. "x-codeSamples": [
  6128. {
  6129. "lang": "js",
  6130. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6131. }
  6132. ]
  6133. }
  6134. },
  6135. "/session/{sessionID}/message": {
  6136. "get": {
  6137. "tags": ["session"],
  6138. "operationId": "session.messages",
  6139. "parameters": [
  6140. {
  6141. "name": "sessionID",
  6142. "in": "path",
  6143. "schema": {
  6144. "type": "string",
  6145. "pattern": "^ses"
  6146. },
  6147. "required": true
  6148. },
  6149. {
  6150. "name": "directory",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "string"
  6154. },
  6155. "required": false
  6156. },
  6157. {
  6158. "name": "workspace",
  6159. "in": "query",
  6160. "schema": {
  6161. "type": "string"
  6162. },
  6163. "required": false
  6164. },
  6165. {
  6166. "name": "limit",
  6167. "in": "query",
  6168. "schema": {
  6169. "type": "integer",
  6170. "minimum": 0,
  6171. "maximum": 9007199254740991
  6172. },
  6173. "required": false
  6174. },
  6175. {
  6176. "name": "before",
  6177. "in": "query",
  6178. "schema": {
  6179. "type": "string"
  6180. },
  6181. "required": false
  6182. }
  6183. ],
  6184. "responses": {
  6185. "200": {
  6186. "description": "List of messages",
  6187. "content": {
  6188. "application/json": {
  6189. "schema": {
  6190. "type": "array",
  6191. "items": {
  6192. "type": "object",
  6193. "properties": {
  6194. "info": {
  6195. "$ref": "#/components/schemas/Message"
  6196. },
  6197. "parts": {
  6198. "type": "array",
  6199. "items": {
  6200. "$ref": "#/components/schemas/Part"
  6201. }
  6202. }
  6203. },
  6204. "required": ["info", "parts"],
  6205. "additionalProperties": false
  6206. },
  6207. "description": "List of messages"
  6208. }
  6209. }
  6210. }
  6211. },
  6212. "400": {
  6213. "description": "BadRequest | InvalidRequestError",
  6214. "content": {
  6215. "application/json": {
  6216. "schema": {
  6217. "anyOf": [
  6218. {
  6219. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6220. },
  6221. {
  6222. "$ref": "#/components/schemas/InvalidRequestError"
  6223. }
  6224. ]
  6225. }
  6226. }
  6227. }
  6228. },
  6229. "404": {
  6230. "description": "NotFoundError",
  6231. "content": {
  6232. "application/json": {
  6233. "schema": {
  6234. "$ref": "#/components/schemas/NotFoundError"
  6235. }
  6236. }
  6237. }
  6238. }
  6239. },
  6240. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6241. "summary": "Get session messages",
  6242. "x-codeSamples": [
  6243. {
  6244. "lang": "js",
  6245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6246. }
  6247. ]
  6248. },
  6249. "post": {
  6250. "tags": ["session"],
  6251. "operationId": "session.prompt",
  6252. "parameters": [
  6253. {
  6254. "name": "sessionID",
  6255. "in": "path",
  6256. "schema": {
  6257. "type": "string",
  6258. "pattern": "^ses"
  6259. },
  6260. "required": true
  6261. },
  6262. {
  6263. "name": "directory",
  6264. "in": "query",
  6265. "schema": {
  6266. "type": "string"
  6267. },
  6268. "required": false
  6269. },
  6270. {
  6271. "name": "workspace",
  6272. "in": "query",
  6273. "schema": {
  6274. "type": "string"
  6275. },
  6276. "required": false
  6277. }
  6278. ],
  6279. "responses": {
  6280. "200": {
  6281. "description": "Created message",
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "required": ["info", "parts"],
  6287. "properties": {
  6288. "info": {
  6289. "$ref": "#/components/schemas/AssistantMessage"
  6290. },
  6291. "parts": {
  6292. "type": "array",
  6293. "items": {
  6294. "$ref": "#/components/schemas/Part"
  6295. }
  6296. }
  6297. }
  6298. }
  6299. }
  6300. }
  6301. },
  6302. "400": {
  6303. "description": "BadRequest | InvalidRequestError",
  6304. "content": {
  6305. "application/json": {
  6306. "schema": {
  6307. "anyOf": [
  6308. {
  6309. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6310. },
  6311. {
  6312. "$ref": "#/components/schemas/InvalidRequestError"
  6313. }
  6314. ]
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "404": {
  6320. "description": "NotFoundError",
  6321. "content": {
  6322. "application/json": {
  6323. "schema": {
  6324. "$ref": "#/components/schemas/NotFoundError"
  6325. }
  6326. }
  6327. }
  6328. }
  6329. },
  6330. "description": "Create and send a new message to a session, streaming the AI response.",
  6331. "summary": "Send message",
  6332. "requestBody": {
  6333. "content": {
  6334. "application/json": {
  6335. "schema": {
  6336. "type": "object",
  6337. "properties": {
  6338. "messageID": {
  6339. "type": "string",
  6340. "pattern": "^msg"
  6341. },
  6342. "model": {
  6343. "type": "object",
  6344. "properties": {
  6345. "providerID": {
  6346. "type": "string"
  6347. },
  6348. "modelID": {
  6349. "type": "string"
  6350. }
  6351. },
  6352. "required": ["providerID", "modelID"],
  6353. "additionalProperties": false
  6354. },
  6355. "agent": {
  6356. "type": "string"
  6357. },
  6358. "noReply": {
  6359. "type": "boolean"
  6360. },
  6361. "tools": {
  6362. "type": "object",
  6363. "additionalProperties": {
  6364. "type": "boolean"
  6365. }
  6366. },
  6367. "format": {
  6368. "$ref": "#/components/schemas/OutputFormat"
  6369. },
  6370. "system": {
  6371. "type": "string"
  6372. },
  6373. "variant": {
  6374. "type": "string"
  6375. },
  6376. "parts": {
  6377. "type": "array",
  6378. "items": {
  6379. "anyOf": [
  6380. {
  6381. "$ref": "#/components/schemas/TextPartInput"
  6382. },
  6383. {
  6384. "$ref": "#/components/schemas/FilePartInput"
  6385. },
  6386. {
  6387. "$ref": "#/components/schemas/AgentPartInput"
  6388. },
  6389. {
  6390. "$ref": "#/components/schemas/SubtaskPartInput"
  6391. }
  6392. ]
  6393. }
  6394. }
  6395. },
  6396. "required": ["parts"],
  6397. "additionalProperties": false
  6398. }
  6399. }
  6400. }
  6401. },
  6402. "x-codeSamples": [
  6403. {
  6404. "lang": "js",
  6405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6406. }
  6407. ]
  6408. }
  6409. },
  6410. "/session/{sessionID}/message/{messageID}": {
  6411. "get": {
  6412. "tags": ["session"],
  6413. "operationId": "session.message",
  6414. "parameters": [
  6415. {
  6416. "name": "sessionID",
  6417. "in": "path",
  6418. "schema": {
  6419. "type": "string",
  6420. "pattern": "^ses"
  6421. },
  6422. "required": true
  6423. },
  6424. {
  6425. "name": "messageID",
  6426. "in": "path",
  6427. "schema": {
  6428. "type": "string",
  6429. "pattern": "^msg"
  6430. },
  6431. "required": true
  6432. },
  6433. {
  6434. "name": "directory",
  6435. "in": "query",
  6436. "schema": {
  6437. "type": "string"
  6438. },
  6439. "required": false
  6440. },
  6441. {
  6442. "name": "workspace",
  6443. "in": "query",
  6444. "schema": {
  6445. "type": "string"
  6446. },
  6447. "required": false
  6448. }
  6449. ],
  6450. "responses": {
  6451. "200": {
  6452. "description": "Message",
  6453. "content": {
  6454. "application/json": {
  6455. "schema": {
  6456. "type": "object",
  6457. "properties": {
  6458. "info": {
  6459. "$ref": "#/components/schemas/Message"
  6460. },
  6461. "parts": {
  6462. "type": "array",
  6463. "items": {
  6464. "$ref": "#/components/schemas/Part"
  6465. }
  6466. }
  6467. },
  6468. "required": ["info", "parts"],
  6469. "additionalProperties": false,
  6470. "description": "Message"
  6471. }
  6472. }
  6473. }
  6474. },
  6475. "400": {
  6476. "description": "BadRequest | InvalidRequestError",
  6477. "content": {
  6478. "application/json": {
  6479. "schema": {
  6480. "anyOf": [
  6481. {
  6482. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6483. },
  6484. {
  6485. "$ref": "#/components/schemas/InvalidRequestError"
  6486. }
  6487. ]
  6488. }
  6489. }
  6490. }
  6491. },
  6492. "404": {
  6493. "description": "NotFoundError",
  6494. "content": {
  6495. "application/json": {
  6496. "schema": {
  6497. "$ref": "#/components/schemas/NotFoundError"
  6498. }
  6499. }
  6500. }
  6501. }
  6502. },
  6503. "description": "Retrieve a specific message from a session by its message ID.",
  6504. "summary": "Get message",
  6505. "x-codeSamples": [
  6506. {
  6507. "lang": "js",
  6508. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6509. }
  6510. ]
  6511. },
  6512. "delete": {
  6513. "tags": ["session"],
  6514. "operationId": "session.deleteMessage",
  6515. "parameters": [
  6516. {
  6517. "name": "sessionID",
  6518. "in": "path",
  6519. "schema": {
  6520. "type": "string",
  6521. "pattern": "^ses"
  6522. },
  6523. "required": true
  6524. },
  6525. {
  6526. "name": "messageID",
  6527. "in": "path",
  6528. "schema": {
  6529. "type": "string",
  6530. "pattern": "^msg"
  6531. },
  6532. "required": true
  6533. },
  6534. {
  6535. "name": "directory",
  6536. "in": "query",
  6537. "schema": {
  6538. "type": "string"
  6539. },
  6540. "required": false
  6541. },
  6542. {
  6543. "name": "workspace",
  6544. "in": "query",
  6545. "schema": {
  6546. "type": "string"
  6547. },
  6548. "required": false
  6549. }
  6550. ],
  6551. "responses": {
  6552. "200": {
  6553. "description": "Successfully deleted message",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "type": "boolean",
  6558. "description": "Successfully deleted message"
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "400": {
  6564. "description": "BadRequest | InvalidRequestError",
  6565. "content": {
  6566. "application/json": {
  6567. "schema": {
  6568. "anyOf": [
  6569. {
  6570. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6571. },
  6572. {
  6573. "$ref": "#/components/schemas/InvalidRequestError"
  6574. }
  6575. ]
  6576. }
  6577. }
  6578. }
  6579. },
  6580. "404": {
  6581. "description": "NotFoundError",
  6582. "content": {
  6583. "application/json": {
  6584. "schema": {
  6585. "$ref": "#/components/schemas/NotFoundError"
  6586. }
  6587. }
  6588. }
  6589. },
  6590. "409": {
  6591. "description": "SessionBusyError",
  6592. "content": {
  6593. "application/json": {
  6594. "schema": {
  6595. "$ref": "#/components/schemas/SessionBusyError"
  6596. }
  6597. }
  6598. }
  6599. }
  6600. },
  6601. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6602. "summary": "Delete message",
  6603. "x-codeSamples": [
  6604. {
  6605. "lang": "js",
  6606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6607. }
  6608. ]
  6609. }
  6610. },
  6611. "/session/{sessionID}/fork": {
  6612. "post": {
  6613. "tags": ["session"],
  6614. "operationId": "session.fork",
  6615. "parameters": [
  6616. {
  6617. "name": "sessionID",
  6618. "in": "path",
  6619. "schema": {
  6620. "type": "string",
  6621. "pattern": "^ses"
  6622. },
  6623. "required": true
  6624. },
  6625. {
  6626. "name": "directory",
  6627. "in": "query",
  6628. "schema": {
  6629. "type": "string"
  6630. },
  6631. "required": false
  6632. },
  6633. {
  6634. "name": "workspace",
  6635. "in": "query",
  6636. "schema": {
  6637. "type": "string"
  6638. },
  6639. "required": false
  6640. }
  6641. ],
  6642. "responses": {
  6643. "200": {
  6644. "description": "200",
  6645. "content": {
  6646. "application/json": {
  6647. "schema": {
  6648. "$ref": "#/components/schemas/Session"
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "400": {
  6654. "description": "BadRequest | InvalidRequestError",
  6655. "content": {
  6656. "application/json": {
  6657. "schema": {
  6658. "anyOf": [
  6659. {
  6660. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6661. },
  6662. {
  6663. "$ref": "#/components/schemas/InvalidRequestError"
  6664. }
  6665. ]
  6666. }
  6667. }
  6668. }
  6669. },
  6670. "404": {
  6671. "description": "NotFoundError",
  6672. "content": {
  6673. "application/json": {
  6674. "schema": {
  6675. "$ref": "#/components/schemas/NotFoundError"
  6676. }
  6677. }
  6678. }
  6679. }
  6680. },
  6681. "description": "Create a new session by forking an existing session at a specific message point.",
  6682. "summary": "Fork session",
  6683. "requestBody": {
  6684. "content": {
  6685. "application/json": {
  6686. "schema": {
  6687. "type": "object",
  6688. "properties": {
  6689. "messageID": {
  6690. "type": "string",
  6691. "pattern": "^msg"
  6692. }
  6693. },
  6694. "additionalProperties": false
  6695. }
  6696. }
  6697. }
  6698. },
  6699. "x-codeSamples": [
  6700. {
  6701. "lang": "js",
  6702. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6703. }
  6704. ]
  6705. }
  6706. },
  6707. "/session/{sessionID}/abort": {
  6708. "post": {
  6709. "tags": ["session"],
  6710. "operationId": "session.abort",
  6711. "parameters": [
  6712. {
  6713. "name": "sessionID",
  6714. "in": "path",
  6715. "schema": {
  6716. "type": "string",
  6717. "pattern": "^ses"
  6718. },
  6719. "required": true
  6720. },
  6721. {
  6722. "name": "directory",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. },
  6729. {
  6730. "name": "workspace",
  6731. "in": "query",
  6732. "schema": {
  6733. "type": "string"
  6734. },
  6735. "required": false
  6736. }
  6737. ],
  6738. "responses": {
  6739. "200": {
  6740. "description": "Aborted session",
  6741. "content": {
  6742. "application/json": {
  6743. "schema": {
  6744. "type": "boolean",
  6745. "description": "Aborted session"
  6746. }
  6747. }
  6748. }
  6749. },
  6750. "400": {
  6751. "description": "BadRequest | InvalidRequestError",
  6752. "content": {
  6753. "application/json": {
  6754. "schema": {
  6755. "anyOf": [
  6756. {
  6757. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6758. },
  6759. {
  6760. "$ref": "#/components/schemas/InvalidRequestError"
  6761. }
  6762. ]
  6763. }
  6764. }
  6765. }
  6766. }
  6767. },
  6768. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6769. "summary": "Abort session",
  6770. "x-codeSamples": [
  6771. {
  6772. "lang": "js",
  6773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6774. }
  6775. ]
  6776. }
  6777. },
  6778. "/session/{sessionID}/init": {
  6779. "post": {
  6780. "tags": ["session"],
  6781. "operationId": "session.init",
  6782. "parameters": [
  6783. {
  6784. "name": "sessionID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^ses"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "200",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "type": "boolean",
  6816. "description": "200"
  6817. }
  6818. }
  6819. }
  6820. },
  6821. "400": {
  6822. "description": "BadRequest | InvalidRequestError",
  6823. "content": {
  6824. "application/json": {
  6825. "schema": {
  6826. "anyOf": [
  6827. {
  6828. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6829. },
  6830. {
  6831. "$ref": "#/components/schemas/InvalidRequestError"
  6832. }
  6833. ]
  6834. }
  6835. }
  6836. }
  6837. },
  6838. "404": {
  6839. "description": "NotFoundError",
  6840. "content": {
  6841. "application/json": {
  6842. "schema": {
  6843. "$ref": "#/components/schemas/NotFoundError"
  6844. }
  6845. }
  6846. }
  6847. }
  6848. },
  6849. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6850. "summary": "Initialize session",
  6851. "requestBody": {
  6852. "content": {
  6853. "application/json": {
  6854. "schema": {
  6855. "type": "object",
  6856. "properties": {
  6857. "modelID": {
  6858. "type": "string"
  6859. },
  6860. "providerID": {
  6861. "type": "string"
  6862. },
  6863. "messageID": {
  6864. "type": "string",
  6865. "pattern": "^msg"
  6866. }
  6867. },
  6868. "required": ["modelID", "providerID", "messageID"],
  6869. "additionalProperties": false
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "x-codeSamples": [
  6875. {
  6876. "lang": "js",
  6877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6878. }
  6879. ]
  6880. }
  6881. },
  6882. "/session/{sessionID}/share": {
  6883. "post": {
  6884. "tags": ["session"],
  6885. "operationId": "session.share",
  6886. "parameters": [
  6887. {
  6888. "name": "sessionID",
  6889. "in": "path",
  6890. "schema": {
  6891. "type": "string",
  6892. "pattern": "^ses"
  6893. },
  6894. "required": true
  6895. },
  6896. {
  6897. "name": "directory",
  6898. "in": "query",
  6899. "schema": {
  6900. "type": "string"
  6901. },
  6902. "required": false
  6903. },
  6904. {
  6905. "name": "workspace",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. }
  6912. ],
  6913. "responses": {
  6914. "200": {
  6915. "description": "Successfully shared session",
  6916. "content": {
  6917. "application/json": {
  6918. "schema": {
  6919. "$ref": "#/components/schemas/Session"
  6920. }
  6921. }
  6922. }
  6923. },
  6924. "400": {
  6925. "description": "Bad request",
  6926. "content": {
  6927. "application/json": {
  6928. "schema": {
  6929. "$ref": "#/components/schemas/BadRequestError"
  6930. }
  6931. }
  6932. }
  6933. },
  6934. "404": {
  6935. "description": "NotFoundError",
  6936. "content": {
  6937. "application/json": {
  6938. "schema": {
  6939. "$ref": "#/components/schemas/NotFoundError"
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "500": {
  6945. "description": "InternalServerError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6950. }
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6956. "summary": "Share session",
  6957. "x-codeSamples": [
  6958. {
  6959. "lang": "js",
  6960. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6961. }
  6962. ]
  6963. },
  6964. "delete": {
  6965. "tags": ["session"],
  6966. "operationId": "session.unshare",
  6967. "parameters": [
  6968. {
  6969. "name": "sessionID",
  6970. "in": "path",
  6971. "schema": {
  6972. "type": "string",
  6973. "pattern": "^ses"
  6974. },
  6975. "required": true
  6976. },
  6977. {
  6978. "name": "directory",
  6979. "in": "query",
  6980. "schema": {
  6981. "type": "string"
  6982. },
  6983. "required": false
  6984. },
  6985. {
  6986. "name": "workspace",
  6987. "in": "query",
  6988. "schema": {
  6989. "type": "string"
  6990. },
  6991. "required": false
  6992. }
  6993. ],
  6994. "responses": {
  6995. "200": {
  6996. "description": "Successfully unshared session",
  6997. "content": {
  6998. "application/json": {
  6999. "schema": {
  7000. "$ref": "#/components/schemas/Session"
  7001. }
  7002. }
  7003. }
  7004. },
  7005. "400": {
  7006. "description": "Bad request",
  7007. "content": {
  7008. "application/json": {
  7009. "schema": {
  7010. "$ref": "#/components/schemas/BadRequestError"
  7011. }
  7012. }
  7013. }
  7014. },
  7015. "404": {
  7016. "description": "NotFoundError",
  7017. "content": {
  7018. "application/json": {
  7019. "schema": {
  7020. "$ref": "#/components/schemas/NotFoundError"
  7021. }
  7022. }
  7023. }
  7024. },
  7025. "500": {
  7026. "description": "InternalServerError",
  7027. "content": {
  7028. "application/json": {
  7029. "schema": {
  7030. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7031. }
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "description": "Remove the shareable link for a session, making it private again.",
  7037. "summary": "Unshare session",
  7038. "x-codeSamples": [
  7039. {
  7040. "lang": "js",
  7041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7042. }
  7043. ]
  7044. }
  7045. },
  7046. "/session/{sessionID}/summarize": {
  7047. "post": {
  7048. "tags": ["session"],
  7049. "operationId": "session.summarize",
  7050. "parameters": [
  7051. {
  7052. "name": "sessionID",
  7053. "in": "path",
  7054. "schema": {
  7055. "type": "string",
  7056. "pattern": "^ses"
  7057. },
  7058. "required": true
  7059. },
  7060. {
  7061. "name": "directory",
  7062. "in": "query",
  7063. "schema": {
  7064. "type": "string"
  7065. },
  7066. "required": false
  7067. },
  7068. {
  7069. "name": "workspace",
  7070. "in": "query",
  7071. "schema": {
  7072. "type": "string"
  7073. },
  7074. "required": false
  7075. }
  7076. ],
  7077. "responses": {
  7078. "200": {
  7079. "description": "Summarized session",
  7080. "content": {
  7081. "application/json": {
  7082. "schema": {
  7083. "type": "boolean",
  7084. "description": "Summarized session"
  7085. }
  7086. }
  7087. }
  7088. },
  7089. "400": {
  7090. "description": "BadRequest | InvalidRequestError",
  7091. "content": {
  7092. "application/json": {
  7093. "schema": {
  7094. "anyOf": [
  7095. {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7097. },
  7098. {
  7099. "$ref": "#/components/schemas/InvalidRequestError"
  7100. }
  7101. ]
  7102. }
  7103. }
  7104. }
  7105. },
  7106. "404": {
  7107. "description": "NotFoundError",
  7108. "content": {
  7109. "application/json": {
  7110. "schema": {
  7111. "$ref": "#/components/schemas/NotFoundError"
  7112. }
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7118. "summary": "Summarize session",
  7119. "requestBody": {
  7120. "content": {
  7121. "application/json": {
  7122. "schema": {
  7123. "type": "object",
  7124. "properties": {
  7125. "providerID": {
  7126. "type": "string"
  7127. },
  7128. "modelID": {
  7129. "type": "string"
  7130. },
  7131. "auto": {
  7132. "type": "boolean"
  7133. }
  7134. },
  7135. "required": ["providerID", "modelID"],
  7136. "additionalProperties": false
  7137. }
  7138. }
  7139. }
  7140. },
  7141. "x-codeSamples": [
  7142. {
  7143. "lang": "js",
  7144. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7145. }
  7146. ]
  7147. }
  7148. },
  7149. "/session/{sessionID}/prompt_async": {
  7150. "post": {
  7151. "tags": ["session"],
  7152. "operationId": "session.prompt_async",
  7153. "parameters": [
  7154. {
  7155. "name": "sessionID",
  7156. "in": "path",
  7157. "schema": {
  7158. "type": "string",
  7159. "pattern": "^ses"
  7160. },
  7161. "required": true
  7162. },
  7163. {
  7164. "name": "directory",
  7165. "in": "query",
  7166. "schema": {
  7167. "type": "string"
  7168. },
  7169. "required": false
  7170. },
  7171. {
  7172. "name": "workspace",
  7173. "in": "query",
  7174. "schema": {
  7175. "type": "string"
  7176. },
  7177. "required": false
  7178. }
  7179. ],
  7180. "responses": {
  7181. "204": {
  7182. "description": "Prompt accepted"
  7183. },
  7184. "400": {
  7185. "description": "BadRequest | InvalidRequestError",
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "anyOf": [
  7190. {
  7191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7192. },
  7193. {
  7194. "$ref": "#/components/schemas/InvalidRequestError"
  7195. }
  7196. ]
  7197. }
  7198. }
  7199. }
  7200. },
  7201. "404": {
  7202. "description": "NotFoundError",
  7203. "content": {
  7204. "application/json": {
  7205. "schema": {
  7206. "$ref": "#/components/schemas/NotFoundError"
  7207. }
  7208. }
  7209. }
  7210. }
  7211. },
  7212. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7213. "summary": "Send async message",
  7214. "requestBody": {
  7215. "content": {
  7216. "application/json": {
  7217. "schema": {
  7218. "type": "object",
  7219. "properties": {
  7220. "messageID": {
  7221. "type": "string",
  7222. "pattern": "^msg"
  7223. },
  7224. "model": {
  7225. "type": "object",
  7226. "properties": {
  7227. "providerID": {
  7228. "type": "string"
  7229. },
  7230. "modelID": {
  7231. "type": "string"
  7232. }
  7233. },
  7234. "required": ["providerID", "modelID"],
  7235. "additionalProperties": false
  7236. },
  7237. "agent": {
  7238. "type": "string"
  7239. },
  7240. "noReply": {
  7241. "type": "boolean"
  7242. },
  7243. "tools": {
  7244. "type": "object",
  7245. "additionalProperties": {
  7246. "type": "boolean"
  7247. }
  7248. },
  7249. "format": {
  7250. "$ref": "#/components/schemas/OutputFormat"
  7251. },
  7252. "system": {
  7253. "type": "string"
  7254. },
  7255. "variant": {
  7256. "type": "string"
  7257. },
  7258. "parts": {
  7259. "type": "array",
  7260. "items": {
  7261. "anyOf": [
  7262. {
  7263. "$ref": "#/components/schemas/TextPartInput"
  7264. },
  7265. {
  7266. "$ref": "#/components/schemas/FilePartInput"
  7267. },
  7268. {
  7269. "$ref": "#/components/schemas/AgentPartInput"
  7270. },
  7271. {
  7272. "$ref": "#/components/schemas/SubtaskPartInput"
  7273. }
  7274. ]
  7275. }
  7276. }
  7277. },
  7278. "required": ["parts"],
  7279. "additionalProperties": false
  7280. }
  7281. }
  7282. }
  7283. },
  7284. "x-codeSamples": [
  7285. {
  7286. "lang": "js",
  7287. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7288. }
  7289. ]
  7290. }
  7291. },
  7292. "/session/{sessionID}/command": {
  7293. "post": {
  7294. "tags": ["session"],
  7295. "operationId": "session.command",
  7296. "parameters": [
  7297. {
  7298. "name": "sessionID",
  7299. "in": "path",
  7300. "schema": {
  7301. "type": "string",
  7302. "pattern": "^ses"
  7303. },
  7304. "required": true
  7305. },
  7306. {
  7307. "name": "directory",
  7308. "in": "query",
  7309. "schema": {
  7310. "type": "string"
  7311. },
  7312. "required": false
  7313. },
  7314. {
  7315. "name": "workspace",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. }
  7322. ],
  7323. "responses": {
  7324. "200": {
  7325. "description": "Created message",
  7326. "content": {
  7327. "application/json": {
  7328. "schema": {
  7329. "type": "object",
  7330. "required": ["info", "parts"],
  7331. "properties": {
  7332. "info": {
  7333. "$ref": "#/components/schemas/AssistantMessage"
  7334. },
  7335. "parts": {
  7336. "type": "array",
  7337. "items": {
  7338. "$ref": "#/components/schemas/Part"
  7339. }
  7340. }
  7341. }
  7342. }
  7343. }
  7344. }
  7345. },
  7346. "400": {
  7347. "description": "BadRequest | InvalidRequestError",
  7348. "content": {
  7349. "application/json": {
  7350. "schema": {
  7351. "anyOf": [
  7352. {
  7353. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7354. },
  7355. {
  7356. "$ref": "#/components/schemas/InvalidRequestError"
  7357. }
  7358. ]
  7359. }
  7360. }
  7361. }
  7362. },
  7363. "404": {
  7364. "description": "NotFoundError",
  7365. "content": {
  7366. "application/json": {
  7367. "schema": {
  7368. "$ref": "#/components/schemas/NotFoundError"
  7369. }
  7370. }
  7371. }
  7372. }
  7373. },
  7374. "description": "Send a new command to a session for execution by the AI assistant.",
  7375. "summary": "Send command",
  7376. "requestBody": {
  7377. "content": {
  7378. "application/json": {
  7379. "schema": {
  7380. "type": "object",
  7381. "properties": {
  7382. "messageID": {
  7383. "type": "string",
  7384. "pattern": "^msg"
  7385. },
  7386. "agent": {
  7387. "type": "string"
  7388. },
  7389. "model": {
  7390. "type": "string"
  7391. },
  7392. "arguments": {
  7393. "type": "string"
  7394. },
  7395. "command": {
  7396. "type": "string"
  7397. },
  7398. "variant": {
  7399. "type": "string"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "type": "object",
  7405. "properties": {
  7406. "id": {
  7407. "type": "string",
  7408. "pattern": "^prt"
  7409. },
  7410. "type": {
  7411. "type": "string",
  7412. "enum": ["file"]
  7413. },
  7414. "mime": {
  7415. "type": "string"
  7416. },
  7417. "filename": {
  7418. "type": "string"
  7419. },
  7420. "url": {
  7421. "type": "string"
  7422. },
  7423. "source": {
  7424. "$ref": "#/components/schemas/FilePartSource"
  7425. }
  7426. },
  7427. "required": ["type", "mime", "url"],
  7428. "additionalProperties": false
  7429. }
  7430. }
  7431. },
  7432. "required": ["arguments", "command"],
  7433. "additionalProperties": false
  7434. }
  7435. }
  7436. }
  7437. },
  7438. "x-codeSamples": [
  7439. {
  7440. "lang": "js",
  7441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7442. }
  7443. ]
  7444. }
  7445. },
  7446. "/session/{sessionID}/shell": {
  7447. "post": {
  7448. "tags": ["session"],
  7449. "operationId": "session.shell",
  7450. "parameters": [
  7451. {
  7452. "name": "sessionID",
  7453. "in": "path",
  7454. "schema": {
  7455. "type": "string",
  7456. "pattern": "^ses"
  7457. },
  7458. "required": true
  7459. },
  7460. {
  7461. "name": "directory",
  7462. "in": "query",
  7463. "schema": {
  7464. "type": "string"
  7465. },
  7466. "required": false
  7467. },
  7468. {
  7469. "name": "workspace",
  7470. "in": "query",
  7471. "schema": {
  7472. "type": "string"
  7473. },
  7474. "required": false
  7475. }
  7476. ],
  7477. "responses": {
  7478. "200": {
  7479. "description": "Created message",
  7480. "content": {
  7481. "application/json": {
  7482. "schema": {
  7483. "type": "object",
  7484. "properties": {
  7485. "info": {
  7486. "$ref": "#/components/schemas/Message"
  7487. },
  7488. "parts": {
  7489. "type": "array",
  7490. "items": {
  7491. "$ref": "#/components/schemas/Part"
  7492. }
  7493. }
  7494. },
  7495. "required": ["info", "parts"],
  7496. "additionalProperties": false,
  7497. "description": "Created message"
  7498. }
  7499. }
  7500. }
  7501. },
  7502. "400": {
  7503. "description": "BadRequest | InvalidRequestError",
  7504. "content": {
  7505. "application/json": {
  7506. "schema": {
  7507. "anyOf": [
  7508. {
  7509. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7510. },
  7511. {
  7512. "$ref": "#/components/schemas/InvalidRequestError"
  7513. }
  7514. ]
  7515. }
  7516. }
  7517. }
  7518. },
  7519. "404": {
  7520. "description": "NotFoundError",
  7521. "content": {
  7522. "application/json": {
  7523. "schema": {
  7524. "$ref": "#/components/schemas/NotFoundError"
  7525. }
  7526. }
  7527. }
  7528. },
  7529. "409": {
  7530. "description": "SessionBusyError",
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "$ref": "#/components/schemas/SessionBusyError"
  7535. }
  7536. }
  7537. }
  7538. }
  7539. },
  7540. "description": "Execute a shell command within the session context and return the AI's response.",
  7541. "summary": "Run shell command",
  7542. "requestBody": {
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "type": "object",
  7547. "properties": {
  7548. "messageID": {
  7549. "type": "string",
  7550. "pattern": "^msg"
  7551. },
  7552. "agent": {
  7553. "type": "string"
  7554. },
  7555. "model": {
  7556. "type": "object",
  7557. "properties": {
  7558. "providerID": {
  7559. "type": "string"
  7560. },
  7561. "modelID": {
  7562. "type": "string"
  7563. }
  7564. },
  7565. "required": ["providerID", "modelID"],
  7566. "additionalProperties": false
  7567. },
  7568. "command": {
  7569. "type": "string"
  7570. }
  7571. },
  7572. "required": ["agent", "command"],
  7573. "additionalProperties": false
  7574. }
  7575. }
  7576. }
  7577. },
  7578. "x-codeSamples": [
  7579. {
  7580. "lang": "js",
  7581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7582. }
  7583. ]
  7584. }
  7585. },
  7586. "/session/{sessionID}/revert": {
  7587. "post": {
  7588. "tags": ["session"],
  7589. "operationId": "session.revert",
  7590. "parameters": [
  7591. {
  7592. "name": "sessionID",
  7593. "in": "path",
  7594. "schema": {
  7595. "type": "string",
  7596. "pattern": "^ses"
  7597. },
  7598. "required": true
  7599. },
  7600. {
  7601. "name": "directory",
  7602. "in": "query",
  7603. "schema": {
  7604. "type": "string"
  7605. },
  7606. "required": false
  7607. },
  7608. {
  7609. "name": "workspace",
  7610. "in": "query",
  7611. "schema": {
  7612. "type": "string"
  7613. },
  7614. "required": false
  7615. }
  7616. ],
  7617. "responses": {
  7618. "200": {
  7619. "description": "Updated session",
  7620. "content": {
  7621. "application/json": {
  7622. "schema": {
  7623. "$ref": "#/components/schemas/Session"
  7624. }
  7625. }
  7626. }
  7627. },
  7628. "400": {
  7629. "description": "BadRequest | InvalidRequestError",
  7630. "content": {
  7631. "application/json": {
  7632. "schema": {
  7633. "anyOf": [
  7634. {
  7635. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7636. },
  7637. {
  7638. "$ref": "#/components/schemas/InvalidRequestError"
  7639. }
  7640. ]
  7641. }
  7642. }
  7643. }
  7644. },
  7645. "404": {
  7646. "description": "NotFoundError",
  7647. "content": {
  7648. "application/json": {
  7649. "schema": {
  7650. "$ref": "#/components/schemas/NotFoundError"
  7651. }
  7652. }
  7653. }
  7654. },
  7655. "409": {
  7656. "description": "SessionBusyError",
  7657. "content": {
  7658. "application/json": {
  7659. "schema": {
  7660. "$ref": "#/components/schemas/SessionBusyError"
  7661. }
  7662. }
  7663. }
  7664. }
  7665. },
  7666. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7667. "summary": "Revert message",
  7668. "requestBody": {
  7669. "content": {
  7670. "application/json": {
  7671. "schema": {
  7672. "type": "object",
  7673. "properties": {
  7674. "messageID": {
  7675. "type": "string",
  7676. "pattern": "^msg"
  7677. },
  7678. "partID": {
  7679. "type": "string",
  7680. "pattern": "^prt"
  7681. }
  7682. },
  7683. "required": ["messageID"],
  7684. "additionalProperties": false
  7685. }
  7686. }
  7687. }
  7688. },
  7689. "x-codeSamples": [
  7690. {
  7691. "lang": "js",
  7692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7693. }
  7694. ]
  7695. }
  7696. },
  7697. "/session/{sessionID}/unrevert": {
  7698. "post": {
  7699. "tags": ["session"],
  7700. "operationId": "session.unrevert",
  7701. "parameters": [
  7702. {
  7703. "name": "sessionID",
  7704. "in": "path",
  7705. "schema": {
  7706. "type": "string",
  7707. "pattern": "^ses"
  7708. },
  7709. "required": true
  7710. },
  7711. {
  7712. "name": "directory",
  7713. "in": "query",
  7714. "schema": {
  7715. "type": "string"
  7716. },
  7717. "required": false
  7718. },
  7719. {
  7720. "name": "workspace",
  7721. "in": "query",
  7722. "schema": {
  7723. "type": "string"
  7724. },
  7725. "required": false
  7726. }
  7727. ],
  7728. "responses": {
  7729. "200": {
  7730. "description": "Updated session",
  7731. "content": {
  7732. "application/json": {
  7733. "schema": {
  7734. "$ref": "#/components/schemas/Session"
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "400": {
  7740. "description": "BadRequest | InvalidRequestError",
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "anyOf": [
  7745. {
  7746. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7747. },
  7748. {
  7749. "$ref": "#/components/schemas/InvalidRequestError"
  7750. }
  7751. ]
  7752. }
  7753. }
  7754. }
  7755. },
  7756. "404": {
  7757. "description": "NotFoundError",
  7758. "content": {
  7759. "application/json": {
  7760. "schema": {
  7761. "$ref": "#/components/schemas/NotFoundError"
  7762. }
  7763. }
  7764. }
  7765. },
  7766. "409": {
  7767. "description": "SessionBusyError",
  7768. "content": {
  7769. "application/json": {
  7770. "schema": {
  7771. "$ref": "#/components/schemas/SessionBusyError"
  7772. }
  7773. }
  7774. }
  7775. }
  7776. },
  7777. "description": "Restore all previously reverted messages in a session.",
  7778. "summary": "Restore reverted messages",
  7779. "x-codeSamples": [
  7780. {
  7781. "lang": "js",
  7782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7783. }
  7784. ]
  7785. }
  7786. },
  7787. "/session/{sessionID}/permissions/{permissionID}": {
  7788. "post": {
  7789. "tags": ["session"],
  7790. "operationId": "permission.respond",
  7791. "parameters": [
  7792. {
  7793. "name": "sessionID",
  7794. "in": "path",
  7795. "schema": {
  7796. "type": "string",
  7797. "pattern": "^ses"
  7798. },
  7799. "required": true
  7800. },
  7801. {
  7802. "name": "permissionID",
  7803. "in": "path",
  7804. "schema": {
  7805. "type": "string",
  7806. "pattern": "^per"
  7807. },
  7808. "required": true
  7809. },
  7810. {
  7811. "name": "directory",
  7812. "in": "query",
  7813. "schema": {
  7814. "type": "string"
  7815. },
  7816. "required": false
  7817. },
  7818. {
  7819. "name": "workspace",
  7820. "in": "query",
  7821. "schema": {
  7822. "type": "string"
  7823. },
  7824. "required": false
  7825. }
  7826. ],
  7827. "responses": {
  7828. "200": {
  7829. "description": "Permission processed successfully",
  7830. "content": {
  7831. "application/json": {
  7832. "schema": {
  7833. "type": "boolean",
  7834. "description": "Permission processed successfully"
  7835. }
  7836. }
  7837. }
  7838. },
  7839. "400": {
  7840. "description": "BadRequest | InvalidRequestError",
  7841. "content": {
  7842. "application/json": {
  7843. "schema": {
  7844. "anyOf": [
  7845. {
  7846. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7847. },
  7848. {
  7849. "$ref": "#/components/schemas/InvalidRequestError"
  7850. }
  7851. ]
  7852. }
  7853. }
  7854. }
  7855. },
  7856. "404": {
  7857. "description": "NotFoundError | PermissionNotFoundError",
  7858. "content": {
  7859. "application/json": {
  7860. "schema": {
  7861. "anyOf": [
  7862. {
  7863. "$ref": "#/components/schemas/NotFoundError"
  7864. },
  7865. {
  7866. "$ref": "#/components/schemas/PermissionNotFoundError"
  7867. }
  7868. ]
  7869. }
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "description": "Approve or deny a permission request from the AI assistant.",
  7875. "summary": "Respond to permission",
  7876. "deprecated": true,
  7877. "requestBody": {
  7878. "content": {
  7879. "application/json": {
  7880. "schema": {
  7881. "type": "object",
  7882. "properties": {
  7883. "response": {
  7884. "type": "string",
  7885. "enum": ["once", "always", "reject"]
  7886. }
  7887. },
  7888. "required": ["response"],
  7889. "additionalProperties": false
  7890. }
  7891. }
  7892. }
  7893. },
  7894. "x-codeSamples": [
  7895. {
  7896. "lang": "js",
  7897. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7898. }
  7899. ]
  7900. }
  7901. },
  7902. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7903. "delete": {
  7904. "tags": ["session"],
  7905. "operationId": "part.delete",
  7906. "parameters": [
  7907. {
  7908. "name": "sessionID",
  7909. "in": "path",
  7910. "schema": {
  7911. "type": "string",
  7912. "pattern": "^ses"
  7913. },
  7914. "required": true
  7915. },
  7916. {
  7917. "name": "messageID",
  7918. "in": "path",
  7919. "schema": {
  7920. "type": "string",
  7921. "pattern": "^msg"
  7922. },
  7923. "required": true
  7924. },
  7925. {
  7926. "name": "partID",
  7927. "in": "path",
  7928. "schema": {
  7929. "type": "string",
  7930. "pattern": "^prt"
  7931. },
  7932. "required": true
  7933. },
  7934. {
  7935. "name": "directory",
  7936. "in": "query",
  7937. "schema": {
  7938. "type": "string"
  7939. },
  7940. "required": false
  7941. },
  7942. {
  7943. "name": "workspace",
  7944. "in": "query",
  7945. "schema": {
  7946. "type": "string"
  7947. },
  7948. "required": false
  7949. }
  7950. ],
  7951. "responses": {
  7952. "200": {
  7953. "description": "Successfully deleted part",
  7954. "content": {
  7955. "application/json": {
  7956. "schema": {
  7957. "type": "boolean",
  7958. "description": "Successfully deleted part"
  7959. }
  7960. }
  7961. }
  7962. },
  7963. "400": {
  7964. "description": "BadRequest | InvalidRequestError",
  7965. "content": {
  7966. "application/json": {
  7967. "schema": {
  7968. "anyOf": [
  7969. {
  7970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7971. },
  7972. {
  7973. "$ref": "#/components/schemas/InvalidRequestError"
  7974. }
  7975. ]
  7976. }
  7977. }
  7978. }
  7979. },
  7980. "404": {
  7981. "description": "NotFoundError",
  7982. "content": {
  7983. "application/json": {
  7984. "schema": {
  7985. "$ref": "#/components/schemas/NotFoundError"
  7986. }
  7987. }
  7988. }
  7989. }
  7990. },
  7991. "description": "Delete a part from a message.",
  7992. "x-codeSamples": [
  7993. {
  7994. "lang": "js",
  7995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7996. }
  7997. ]
  7998. },
  7999. "patch": {
  8000. "tags": ["session"],
  8001. "operationId": "part.update",
  8002. "parameters": [
  8003. {
  8004. "name": "sessionID",
  8005. "in": "path",
  8006. "schema": {
  8007. "type": "string",
  8008. "pattern": "^ses"
  8009. },
  8010. "required": true
  8011. },
  8012. {
  8013. "name": "messageID",
  8014. "in": "path",
  8015. "schema": {
  8016. "type": "string",
  8017. "pattern": "^msg"
  8018. },
  8019. "required": true
  8020. },
  8021. {
  8022. "name": "partID",
  8023. "in": "path",
  8024. "schema": {
  8025. "type": "string",
  8026. "pattern": "^prt"
  8027. },
  8028. "required": true
  8029. },
  8030. {
  8031. "name": "directory",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "workspace",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "string"
  8043. },
  8044. "required": false
  8045. }
  8046. ],
  8047. "responses": {
  8048. "200": {
  8049. "description": "Successfully updated part",
  8050. "content": {
  8051. "application/json": {
  8052. "schema": {
  8053. "$ref": "#/components/schemas/Part"
  8054. }
  8055. }
  8056. }
  8057. },
  8058. "400": {
  8059. "description": "BadRequest | InvalidRequestError",
  8060. "content": {
  8061. "application/json": {
  8062. "schema": {
  8063. "anyOf": [
  8064. {
  8065. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8066. },
  8067. {
  8068. "$ref": "#/components/schemas/InvalidRequestError"
  8069. }
  8070. ]
  8071. }
  8072. }
  8073. }
  8074. },
  8075. "404": {
  8076. "description": "NotFoundError",
  8077. "content": {
  8078. "application/json": {
  8079. "schema": {
  8080. "$ref": "#/components/schemas/NotFoundError"
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "description": "Update a part in a message.",
  8087. "requestBody": {
  8088. "content": {
  8089. "application/json": {
  8090. "schema": {
  8091. "$ref": "#/components/schemas/Part"
  8092. }
  8093. }
  8094. }
  8095. },
  8096. "x-codeSamples": [
  8097. {
  8098. "lang": "js",
  8099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8100. }
  8101. ]
  8102. }
  8103. },
  8104. "/sync/start": {
  8105. "post": {
  8106. "tags": ["sync"],
  8107. "operationId": "sync.start",
  8108. "parameters": [
  8109. {
  8110. "name": "directory",
  8111. "in": "query",
  8112. "schema": {
  8113. "type": "string"
  8114. },
  8115. "required": false
  8116. },
  8117. {
  8118. "name": "workspace",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. }
  8125. ],
  8126. "responses": {
  8127. "200": {
  8128. "description": "Workspace sync started",
  8129. "content": {
  8130. "application/json": {
  8131. "schema": {
  8132. "type": "boolean",
  8133. "description": "Workspace sync started"
  8134. }
  8135. }
  8136. }
  8137. },
  8138. "400": {
  8139. "description": "Bad request",
  8140. "content": {
  8141. "application/json": {
  8142. "schema": {
  8143. "$ref": "#/components/schemas/BadRequestError"
  8144. }
  8145. }
  8146. }
  8147. }
  8148. },
  8149. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8150. "summary": "Start workspace sync",
  8151. "x-codeSamples": [
  8152. {
  8153. "lang": "js",
  8154. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8155. }
  8156. ]
  8157. }
  8158. },
  8159. "/sync/replay": {
  8160. "post": {
  8161. "tags": ["sync"],
  8162. "operationId": "sync.replay",
  8163. "parameters": [
  8164. {
  8165. "name": "directory",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "workspace",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. }
  8180. ],
  8181. "responses": {
  8182. "200": {
  8183. "description": "Replayed sync events",
  8184. "content": {
  8185. "application/json": {
  8186. "schema": {
  8187. "type": "object",
  8188. "properties": {
  8189. "sessionID": {
  8190. "type": "string"
  8191. }
  8192. },
  8193. "required": ["sessionID"],
  8194. "additionalProperties": false,
  8195. "description": "Replayed sync events"
  8196. }
  8197. }
  8198. }
  8199. },
  8200. "400": {
  8201. "description": "BadRequest | InvalidRequestError",
  8202. "content": {
  8203. "application/json": {
  8204. "schema": {
  8205. "anyOf": [
  8206. {
  8207. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8208. },
  8209. {
  8210. "$ref": "#/components/schemas/InvalidRequestError"
  8211. }
  8212. ]
  8213. }
  8214. }
  8215. }
  8216. }
  8217. },
  8218. "description": "Validate and replay a complete sync event history.",
  8219. "summary": "Replay sync events",
  8220. "requestBody": {
  8221. "content": {
  8222. "application/json": {
  8223. "schema": {
  8224. "type": "object",
  8225. "properties": {
  8226. "directory": {
  8227. "type": "string"
  8228. },
  8229. "events": {
  8230. "type": "array",
  8231. "minItems": 1,
  8232. "items": {
  8233. "type": "object",
  8234. "properties": {
  8235. "id": {
  8236. "type": "string"
  8237. },
  8238. "aggregateID": {
  8239. "type": "string"
  8240. },
  8241. "seq": {
  8242. "type": "integer",
  8243. "minimum": 0
  8244. },
  8245. "type": {
  8246. "type": "string"
  8247. },
  8248. "data": {
  8249. "type": "object"
  8250. }
  8251. },
  8252. "required": ["id", "aggregateID", "seq", "type", "data"],
  8253. "additionalProperties": false
  8254. }
  8255. }
  8256. },
  8257. "required": ["directory", "events"],
  8258. "additionalProperties": false
  8259. }
  8260. }
  8261. }
  8262. },
  8263. "x-codeSamples": [
  8264. {
  8265. "lang": "js",
  8266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8267. }
  8268. ]
  8269. }
  8270. },
  8271. "/sync/steal": {
  8272. "post": {
  8273. "tags": ["sync"],
  8274. "operationId": "sync.steal",
  8275. "parameters": [
  8276. {
  8277. "name": "directory",
  8278. "in": "query",
  8279. "schema": {
  8280. "type": "string"
  8281. },
  8282. "required": false
  8283. },
  8284. {
  8285. "name": "workspace",
  8286. "in": "query",
  8287. "schema": {
  8288. "type": "string"
  8289. },
  8290. "required": false
  8291. }
  8292. ],
  8293. "responses": {
  8294. "200": {
  8295. "description": "Session stolen into workspace",
  8296. "content": {
  8297. "application/json": {
  8298. "schema": {
  8299. "type": "object",
  8300. "properties": {
  8301. "sessionID": {
  8302. "type": "string",
  8303. "pattern": "^ses"
  8304. }
  8305. },
  8306. "required": ["sessionID"],
  8307. "additionalProperties": false,
  8308. "description": "Session stolen into workspace"
  8309. }
  8310. }
  8311. }
  8312. },
  8313. "400": {
  8314. "description": "BadRequest | InvalidRequestError",
  8315. "content": {
  8316. "application/json": {
  8317. "schema": {
  8318. "anyOf": [
  8319. {
  8320. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8321. },
  8322. {
  8323. "$ref": "#/components/schemas/InvalidRequestError"
  8324. }
  8325. ]
  8326. }
  8327. }
  8328. }
  8329. }
  8330. },
  8331. "description": "Update a session to belong to the current workspace through the sync event system.",
  8332. "summary": "Steal session into workspace",
  8333. "requestBody": {
  8334. "content": {
  8335. "application/json": {
  8336. "schema": {
  8337. "type": "object",
  8338. "properties": {
  8339. "sessionID": {
  8340. "type": "string",
  8341. "pattern": "^ses"
  8342. }
  8343. },
  8344. "required": ["sessionID"],
  8345. "additionalProperties": false
  8346. }
  8347. }
  8348. }
  8349. },
  8350. "x-codeSamples": [
  8351. {
  8352. "lang": "js",
  8353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8354. }
  8355. ]
  8356. }
  8357. },
  8358. "/sync/history": {
  8359. "post": {
  8360. "tags": ["sync"],
  8361. "operationId": "sync.history.list",
  8362. "parameters": [
  8363. {
  8364. "name": "directory",
  8365. "in": "query",
  8366. "schema": {
  8367. "type": "string"
  8368. },
  8369. "required": false
  8370. },
  8371. {
  8372. "name": "workspace",
  8373. "in": "query",
  8374. "schema": {
  8375. "type": "string"
  8376. },
  8377. "required": false
  8378. }
  8379. ],
  8380. "responses": {
  8381. "200": {
  8382. "description": "Sync events",
  8383. "content": {
  8384. "application/json": {
  8385. "schema": {
  8386. "type": "array",
  8387. "items": {
  8388. "type": "object",
  8389. "properties": {
  8390. "id": {
  8391. "type": "string"
  8392. },
  8393. "aggregate_id": {
  8394. "type": "string"
  8395. },
  8396. "seq": {
  8397. "type": "integer",
  8398. "minimum": 0
  8399. },
  8400. "type": {
  8401. "type": "string"
  8402. },
  8403. "data": {
  8404. "type": "object"
  8405. }
  8406. },
  8407. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8408. "additionalProperties": false
  8409. },
  8410. "description": "Sync events"
  8411. }
  8412. }
  8413. }
  8414. },
  8415. "400": {
  8416. "description": "BadRequest | InvalidRequestError",
  8417. "content": {
  8418. "application/json": {
  8419. "schema": {
  8420. "anyOf": [
  8421. {
  8422. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8423. },
  8424. {
  8425. "$ref": "#/components/schemas/InvalidRequestError"
  8426. }
  8427. ]
  8428. }
  8429. }
  8430. }
  8431. }
  8432. },
  8433. "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.",
  8434. "summary": "List sync events",
  8435. "requestBody": {
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "object",
  8440. "additionalProperties": {
  8441. "type": "integer",
  8442. "minimum": 0
  8443. }
  8444. }
  8445. }
  8446. }
  8447. },
  8448. "x-codeSamples": [
  8449. {
  8450. "lang": "js",
  8451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8452. }
  8453. ]
  8454. }
  8455. },
  8456. "/tui/append-prompt": {
  8457. "post": {
  8458. "tags": ["tui"],
  8459. "operationId": "tui.appendPrompt",
  8460. "parameters": [
  8461. {
  8462. "name": "directory",
  8463. "in": "query",
  8464. "schema": {
  8465. "type": "string"
  8466. },
  8467. "required": false
  8468. },
  8469. {
  8470. "name": "workspace",
  8471. "in": "query",
  8472. "schema": {
  8473. "type": "string"
  8474. },
  8475. "required": false
  8476. }
  8477. ],
  8478. "responses": {
  8479. "200": {
  8480. "description": "Prompt processed successfully",
  8481. "content": {
  8482. "application/json": {
  8483. "schema": {
  8484. "type": "boolean",
  8485. "description": "Prompt processed successfully"
  8486. }
  8487. }
  8488. }
  8489. },
  8490. "400": {
  8491. "description": "BadRequest | InvalidRequestError",
  8492. "content": {
  8493. "application/json": {
  8494. "schema": {
  8495. "anyOf": [
  8496. {
  8497. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8498. },
  8499. {
  8500. "$ref": "#/components/schemas/InvalidRequestError"
  8501. }
  8502. ]
  8503. }
  8504. }
  8505. }
  8506. }
  8507. },
  8508. "description": "Append prompt to the TUI.",
  8509. "summary": "Append TUI prompt",
  8510. "requestBody": {
  8511. "content": {
  8512. "application/json": {
  8513. "schema": {
  8514. "type": "object",
  8515. "properties": {
  8516. "text": {
  8517. "type": "string"
  8518. }
  8519. },
  8520. "required": ["text"],
  8521. "additionalProperties": false
  8522. }
  8523. }
  8524. }
  8525. },
  8526. "x-codeSamples": [
  8527. {
  8528. "lang": "js",
  8529. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8530. }
  8531. ]
  8532. }
  8533. },
  8534. "/tui/open-help": {
  8535. "post": {
  8536. "tags": ["tui"],
  8537. "operationId": "tui.openHelp",
  8538. "parameters": [
  8539. {
  8540. "name": "directory",
  8541. "in": "query",
  8542. "schema": {
  8543. "type": "string"
  8544. },
  8545. "required": false
  8546. },
  8547. {
  8548. "name": "workspace",
  8549. "in": "query",
  8550. "schema": {
  8551. "type": "string"
  8552. },
  8553. "required": false
  8554. }
  8555. ],
  8556. "responses": {
  8557. "200": {
  8558. "description": "Help dialog opened successfully",
  8559. "content": {
  8560. "application/json": {
  8561. "schema": {
  8562. "type": "boolean",
  8563. "description": "Help dialog opened successfully"
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "400": {
  8569. "description": "Bad request",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/BadRequestError"
  8574. }
  8575. }
  8576. }
  8577. }
  8578. },
  8579. "description": "Open the help dialog in the TUI to display user assistance information.",
  8580. "summary": "Open help dialog",
  8581. "x-codeSamples": [
  8582. {
  8583. "lang": "js",
  8584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8585. }
  8586. ]
  8587. }
  8588. },
  8589. "/tui/open-sessions": {
  8590. "post": {
  8591. "tags": ["tui"],
  8592. "operationId": "tui.openSessions",
  8593. "parameters": [
  8594. {
  8595. "name": "directory",
  8596. "in": "query",
  8597. "schema": {
  8598. "type": "string"
  8599. },
  8600. "required": false
  8601. },
  8602. {
  8603. "name": "workspace",
  8604. "in": "query",
  8605. "schema": {
  8606. "type": "string"
  8607. },
  8608. "required": false
  8609. }
  8610. ],
  8611. "responses": {
  8612. "200": {
  8613. "description": "Session dialog opened successfully",
  8614. "content": {
  8615. "application/json": {
  8616. "schema": {
  8617. "type": "boolean",
  8618. "description": "Session dialog opened successfully"
  8619. }
  8620. }
  8621. }
  8622. },
  8623. "400": {
  8624. "description": "Bad request",
  8625. "content": {
  8626. "application/json": {
  8627. "schema": {
  8628. "$ref": "#/components/schemas/BadRequestError"
  8629. }
  8630. }
  8631. }
  8632. }
  8633. },
  8634. "description": "Open the session dialog.",
  8635. "summary": "Open sessions dialog",
  8636. "x-codeSamples": [
  8637. {
  8638. "lang": "js",
  8639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8640. }
  8641. ]
  8642. }
  8643. },
  8644. "/tui/open-themes": {
  8645. "post": {
  8646. "tags": ["tui"],
  8647. "operationId": "tui.openThemes",
  8648. "parameters": [
  8649. {
  8650. "name": "directory",
  8651. "in": "query",
  8652. "schema": {
  8653. "type": "string"
  8654. },
  8655. "required": false
  8656. },
  8657. {
  8658. "name": "workspace",
  8659. "in": "query",
  8660. "schema": {
  8661. "type": "string"
  8662. },
  8663. "required": false
  8664. }
  8665. ],
  8666. "responses": {
  8667. "200": {
  8668. "description": "Theme dialog opened successfully",
  8669. "content": {
  8670. "application/json": {
  8671. "schema": {
  8672. "type": "boolean",
  8673. "description": "Theme dialog opened successfully"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "400": {
  8679. "description": "Bad request",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/BadRequestError"
  8684. }
  8685. }
  8686. }
  8687. }
  8688. },
  8689. "description": "Open the theme dialog.",
  8690. "summary": "Open themes dialog",
  8691. "x-codeSamples": [
  8692. {
  8693. "lang": "js",
  8694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8695. }
  8696. ]
  8697. }
  8698. },
  8699. "/tui/open-models": {
  8700. "post": {
  8701. "tags": ["tui"],
  8702. "operationId": "tui.openModels",
  8703. "parameters": [
  8704. {
  8705. "name": "directory",
  8706. "in": "query",
  8707. "schema": {
  8708. "type": "string"
  8709. },
  8710. "required": false
  8711. },
  8712. {
  8713. "name": "workspace",
  8714. "in": "query",
  8715. "schema": {
  8716. "type": "string"
  8717. },
  8718. "required": false
  8719. }
  8720. ],
  8721. "responses": {
  8722. "200": {
  8723. "description": "Model dialog opened successfully",
  8724. "content": {
  8725. "application/json": {
  8726. "schema": {
  8727. "type": "boolean",
  8728. "description": "Model dialog opened successfully"
  8729. }
  8730. }
  8731. }
  8732. },
  8733. "400": {
  8734. "description": "Bad request",
  8735. "content": {
  8736. "application/json": {
  8737. "schema": {
  8738. "$ref": "#/components/schemas/BadRequestError"
  8739. }
  8740. }
  8741. }
  8742. }
  8743. },
  8744. "description": "Open the model dialog.",
  8745. "summary": "Open models dialog",
  8746. "x-codeSamples": [
  8747. {
  8748. "lang": "js",
  8749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8750. }
  8751. ]
  8752. }
  8753. },
  8754. "/tui/submit-prompt": {
  8755. "post": {
  8756. "tags": ["tui"],
  8757. "operationId": "tui.submitPrompt",
  8758. "parameters": [
  8759. {
  8760. "name": "directory",
  8761. "in": "query",
  8762. "schema": {
  8763. "type": "string"
  8764. },
  8765. "required": false
  8766. },
  8767. {
  8768. "name": "workspace",
  8769. "in": "query",
  8770. "schema": {
  8771. "type": "string"
  8772. },
  8773. "required": false
  8774. }
  8775. ],
  8776. "responses": {
  8777. "200": {
  8778. "description": "Prompt submitted successfully",
  8779. "content": {
  8780. "application/json": {
  8781. "schema": {
  8782. "type": "boolean",
  8783. "description": "Prompt submitted successfully"
  8784. }
  8785. }
  8786. }
  8787. },
  8788. "400": {
  8789. "description": "Bad request",
  8790. "content": {
  8791. "application/json": {
  8792. "schema": {
  8793. "$ref": "#/components/schemas/BadRequestError"
  8794. }
  8795. }
  8796. }
  8797. }
  8798. },
  8799. "description": "Submit the prompt.",
  8800. "summary": "Submit TUI prompt",
  8801. "x-codeSamples": [
  8802. {
  8803. "lang": "js",
  8804. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8805. }
  8806. ]
  8807. }
  8808. },
  8809. "/tui/clear-prompt": {
  8810. "post": {
  8811. "tags": ["tui"],
  8812. "operationId": "tui.clearPrompt",
  8813. "parameters": [
  8814. {
  8815. "name": "directory",
  8816. "in": "query",
  8817. "schema": {
  8818. "type": "string"
  8819. },
  8820. "required": false
  8821. },
  8822. {
  8823. "name": "workspace",
  8824. "in": "query",
  8825. "schema": {
  8826. "type": "string"
  8827. },
  8828. "required": false
  8829. }
  8830. ],
  8831. "responses": {
  8832. "200": {
  8833. "description": "Prompt cleared successfully",
  8834. "content": {
  8835. "application/json": {
  8836. "schema": {
  8837. "type": "boolean",
  8838. "description": "Prompt cleared successfully"
  8839. }
  8840. }
  8841. }
  8842. },
  8843. "400": {
  8844. "description": "Bad request",
  8845. "content": {
  8846. "application/json": {
  8847. "schema": {
  8848. "$ref": "#/components/schemas/BadRequestError"
  8849. }
  8850. }
  8851. }
  8852. }
  8853. },
  8854. "description": "Clear the prompt.",
  8855. "summary": "Clear TUI prompt",
  8856. "x-codeSamples": [
  8857. {
  8858. "lang": "js",
  8859. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8860. }
  8861. ]
  8862. }
  8863. },
  8864. "/tui/execute-command": {
  8865. "post": {
  8866. "tags": ["tui"],
  8867. "operationId": "tui.executeCommand",
  8868. "parameters": [
  8869. {
  8870. "name": "directory",
  8871. "in": "query",
  8872. "schema": {
  8873. "type": "string"
  8874. },
  8875. "required": false
  8876. },
  8877. {
  8878. "name": "workspace",
  8879. "in": "query",
  8880. "schema": {
  8881. "type": "string"
  8882. },
  8883. "required": false
  8884. }
  8885. ],
  8886. "responses": {
  8887. "200": {
  8888. "description": "Command executed successfully",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "type": "boolean",
  8893. "description": "Command executed successfully"
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "400": {
  8899. "description": "BadRequest | InvalidRequestError",
  8900. "content": {
  8901. "application/json": {
  8902. "schema": {
  8903. "anyOf": [
  8904. {
  8905. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8906. },
  8907. {
  8908. "$ref": "#/components/schemas/InvalidRequestError"
  8909. }
  8910. ]
  8911. }
  8912. }
  8913. }
  8914. }
  8915. },
  8916. "description": "Execute a TUI command.",
  8917. "summary": "Execute TUI command",
  8918. "requestBody": {
  8919. "content": {
  8920. "application/json": {
  8921. "schema": {
  8922. "type": "object",
  8923. "properties": {
  8924. "command": {
  8925. "type": "string"
  8926. }
  8927. },
  8928. "required": ["command"],
  8929. "additionalProperties": false
  8930. }
  8931. }
  8932. }
  8933. },
  8934. "x-codeSamples": [
  8935. {
  8936. "lang": "js",
  8937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8938. }
  8939. ]
  8940. }
  8941. },
  8942. "/tui/show-toast": {
  8943. "post": {
  8944. "tags": ["tui"],
  8945. "operationId": "tui.showToast",
  8946. "parameters": [
  8947. {
  8948. "name": "directory",
  8949. "in": "query",
  8950. "schema": {
  8951. "type": "string"
  8952. },
  8953. "required": false
  8954. },
  8955. {
  8956. "name": "workspace",
  8957. "in": "query",
  8958. "schema": {
  8959. "type": "string"
  8960. },
  8961. "required": false
  8962. }
  8963. ],
  8964. "responses": {
  8965. "200": {
  8966. "description": "Toast notification shown successfully",
  8967. "content": {
  8968. "application/json": {
  8969. "schema": {
  8970. "type": "boolean",
  8971. "description": "Toast notification shown successfully"
  8972. }
  8973. }
  8974. }
  8975. },
  8976. "400": {
  8977. "description": "Bad request",
  8978. "content": {
  8979. "application/json": {
  8980. "schema": {
  8981. "$ref": "#/components/schemas/BadRequestError"
  8982. }
  8983. }
  8984. }
  8985. }
  8986. },
  8987. "description": "Show a toast notification in the TUI.",
  8988. "summary": "Show TUI toast",
  8989. "requestBody": {
  8990. "content": {
  8991. "application/json": {
  8992. "schema": {
  8993. "type": "object",
  8994. "properties": {
  8995. "title": {
  8996. "type": "string"
  8997. },
  8998. "message": {
  8999. "type": "string"
  9000. },
  9001. "variant": {
  9002. "type": "string",
  9003. "enum": ["info", "success", "warning", "error"]
  9004. },
  9005. "duration": {
  9006. "type": "integer",
  9007. "exclusiveMinimum": 0
  9008. }
  9009. },
  9010. "required": ["message", "variant"],
  9011. "additionalProperties": false
  9012. }
  9013. }
  9014. }
  9015. },
  9016. "x-codeSamples": [
  9017. {
  9018. "lang": "js",
  9019. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9020. }
  9021. ]
  9022. }
  9023. },
  9024. "/tui/publish": {
  9025. "post": {
  9026. "tags": ["tui"],
  9027. "operationId": "tui.publish",
  9028. "parameters": [
  9029. {
  9030. "name": "directory",
  9031. "in": "query",
  9032. "schema": {
  9033. "type": "string"
  9034. },
  9035. "required": false
  9036. },
  9037. {
  9038. "name": "workspace",
  9039. "in": "query",
  9040. "schema": {
  9041. "type": "string"
  9042. },
  9043. "required": false
  9044. }
  9045. ],
  9046. "responses": {
  9047. "200": {
  9048. "description": "Event published successfully",
  9049. "content": {
  9050. "application/json": {
  9051. "schema": {
  9052. "type": "boolean",
  9053. "description": "Event published successfully"
  9054. }
  9055. }
  9056. }
  9057. },
  9058. "400": {
  9059. "description": "BadRequest | InvalidRequestError",
  9060. "content": {
  9061. "application/json": {
  9062. "schema": {
  9063. "anyOf": [
  9064. {
  9065. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9066. },
  9067. {
  9068. "$ref": "#/components/schemas/InvalidRequestError"
  9069. }
  9070. ]
  9071. }
  9072. }
  9073. }
  9074. }
  9075. },
  9076. "description": "Publish a TUI event.",
  9077. "summary": "Publish TUI event",
  9078. "requestBody": {
  9079. "content": {
  9080. "application/json": {
  9081. "schema": {
  9082. "anyOf": [
  9083. {
  9084. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9085. },
  9086. {
  9087. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9088. },
  9089. {
  9090. "$ref": "#/components/schemas/EventTuiToastShow"
  9091. },
  9092. {
  9093. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9094. }
  9095. ]
  9096. }
  9097. }
  9098. }
  9099. },
  9100. "x-codeSamples": [
  9101. {
  9102. "lang": "js",
  9103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9104. }
  9105. ]
  9106. }
  9107. },
  9108. "/tui/select-session": {
  9109. "post": {
  9110. "tags": ["tui"],
  9111. "operationId": "tui.selectSession",
  9112. "parameters": [
  9113. {
  9114. "name": "directory",
  9115. "in": "query",
  9116. "schema": {
  9117. "type": "string"
  9118. },
  9119. "required": false
  9120. },
  9121. {
  9122. "name": "workspace",
  9123. "in": "query",
  9124. "schema": {
  9125. "type": "string"
  9126. },
  9127. "required": false
  9128. }
  9129. ],
  9130. "responses": {
  9131. "200": {
  9132. "description": "Session selected successfully",
  9133. "content": {
  9134. "application/json": {
  9135. "schema": {
  9136. "type": "boolean",
  9137. "description": "Session selected successfully"
  9138. }
  9139. }
  9140. }
  9141. },
  9142. "400": {
  9143. "description": "BadRequest | InvalidRequestError",
  9144. "content": {
  9145. "application/json": {
  9146. "schema": {
  9147. "anyOf": [
  9148. {
  9149. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/InvalidRequestError"
  9153. }
  9154. ]
  9155. }
  9156. }
  9157. }
  9158. },
  9159. "404": {
  9160. "description": "NotFoundError",
  9161. "content": {
  9162. "application/json": {
  9163. "schema": {
  9164. "$ref": "#/components/schemas/NotFoundError"
  9165. }
  9166. }
  9167. }
  9168. }
  9169. },
  9170. "description": "Navigate the TUI to display the specified session.",
  9171. "summary": "Select session",
  9172. "requestBody": {
  9173. "content": {
  9174. "application/json": {
  9175. "schema": {
  9176. "type": "object",
  9177. "properties": {
  9178. "sessionID": {
  9179. "type": "string",
  9180. "pattern": "^ses",
  9181. "description": "Session ID to navigate to"
  9182. }
  9183. },
  9184. "required": ["sessionID"],
  9185. "additionalProperties": false
  9186. }
  9187. }
  9188. }
  9189. },
  9190. "x-codeSamples": [
  9191. {
  9192. "lang": "js",
  9193. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9194. }
  9195. ]
  9196. }
  9197. },
  9198. "/tui/control/next": {
  9199. "get": {
  9200. "tags": ["tui"],
  9201. "operationId": "tui.control.next",
  9202. "parameters": [
  9203. {
  9204. "name": "directory",
  9205. "in": "query",
  9206. "schema": {
  9207. "type": "string"
  9208. },
  9209. "required": false
  9210. },
  9211. {
  9212. "name": "workspace",
  9213. "in": "query",
  9214. "schema": {
  9215. "type": "string"
  9216. },
  9217. "required": false
  9218. }
  9219. ],
  9220. "responses": {
  9221. "200": {
  9222. "description": "Next TUI request",
  9223. "content": {
  9224. "application/json": {
  9225. "schema": {
  9226. "type": "object",
  9227. "properties": {
  9228. "path": {
  9229. "type": "string"
  9230. },
  9231. "body": {}
  9232. },
  9233. "required": ["path", "body"],
  9234. "additionalProperties": false,
  9235. "description": "Next TUI request"
  9236. }
  9237. }
  9238. }
  9239. },
  9240. "400": {
  9241. "description": "Bad request",
  9242. "content": {
  9243. "application/json": {
  9244. "schema": {
  9245. "$ref": "#/components/schemas/BadRequestError"
  9246. }
  9247. }
  9248. }
  9249. }
  9250. },
  9251. "description": "Retrieve the next TUI request from the queue for processing.",
  9252. "summary": "Get next TUI request",
  9253. "x-codeSamples": [
  9254. {
  9255. "lang": "js",
  9256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9257. }
  9258. ]
  9259. }
  9260. },
  9261. "/tui/control/response": {
  9262. "post": {
  9263. "tags": ["tui"],
  9264. "operationId": "tui.control.response",
  9265. "parameters": [
  9266. {
  9267. "name": "directory",
  9268. "in": "query",
  9269. "schema": {
  9270. "type": "string"
  9271. },
  9272. "required": false
  9273. },
  9274. {
  9275. "name": "workspace",
  9276. "in": "query",
  9277. "schema": {
  9278. "type": "string"
  9279. },
  9280. "required": false
  9281. }
  9282. ],
  9283. "responses": {
  9284. "200": {
  9285. "description": "Response submitted successfully",
  9286. "content": {
  9287. "application/json": {
  9288. "schema": {
  9289. "type": "boolean",
  9290. "description": "Response submitted successfully"
  9291. }
  9292. }
  9293. }
  9294. },
  9295. "400": {
  9296. "description": "Bad request",
  9297. "content": {
  9298. "application/json": {
  9299. "schema": {
  9300. "$ref": "#/components/schemas/BadRequestError"
  9301. }
  9302. }
  9303. }
  9304. }
  9305. },
  9306. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9307. "summary": "Submit TUI response",
  9308. "requestBody": {
  9309. "content": {
  9310. "application/json": {
  9311. "schema": {}
  9312. }
  9313. }
  9314. },
  9315. "x-codeSamples": [
  9316. {
  9317. "lang": "js",
  9318. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9319. }
  9320. ]
  9321. }
  9322. },
  9323. "/experimental/workspace/adapter": {
  9324. "get": {
  9325. "tags": ["workspace"],
  9326. "operationId": "experimental.workspace.adapter.list",
  9327. "parameters": [
  9328. {
  9329. "name": "directory",
  9330. "in": "query",
  9331. "schema": {
  9332. "type": "string"
  9333. },
  9334. "required": false
  9335. },
  9336. {
  9337. "name": "workspace",
  9338. "in": "query",
  9339. "schema": {
  9340. "type": "string"
  9341. },
  9342. "required": false
  9343. }
  9344. ],
  9345. "responses": {
  9346. "200": {
  9347. "description": "Workspace adapters",
  9348. "content": {
  9349. "application/json": {
  9350. "schema": {
  9351. "type": "array",
  9352. "items": {
  9353. "type": "object",
  9354. "properties": {
  9355. "type": {
  9356. "type": "string"
  9357. },
  9358. "name": {
  9359. "type": "string"
  9360. },
  9361. "description": {
  9362. "type": "string"
  9363. }
  9364. },
  9365. "required": ["type", "name", "description"],
  9366. "additionalProperties": false
  9367. },
  9368. "description": "Workspace adapters"
  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 available workspace adapters for the current project.",
  9385. "summary": "List workspace adapters",
  9386. "x-codeSamples": [
  9387. {
  9388. "lang": "js",
  9389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9390. }
  9391. ]
  9392. }
  9393. },
  9394. "/experimental/workspace": {
  9395. "get": {
  9396. "tags": ["workspace"],
  9397. "operationId": "experimental.workspace.list",
  9398. "parameters": [
  9399. {
  9400. "name": "directory",
  9401. "in": "query",
  9402. "schema": {
  9403. "type": "string"
  9404. },
  9405. "required": false
  9406. },
  9407. {
  9408. "name": "workspace",
  9409. "in": "query",
  9410. "schema": {
  9411. "type": "string"
  9412. },
  9413. "required": false
  9414. }
  9415. ],
  9416. "responses": {
  9417. "200": {
  9418. "description": "Workspaces",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "type": "array",
  9423. "items": {
  9424. "$ref": "#/components/schemas/Workspace"
  9425. },
  9426. "description": "Workspaces"
  9427. }
  9428. }
  9429. }
  9430. },
  9431. "400": {
  9432. "description": "Bad request",
  9433. "content": {
  9434. "application/json": {
  9435. "schema": {
  9436. "$ref": "#/components/schemas/BadRequestError"
  9437. }
  9438. }
  9439. }
  9440. }
  9441. },
  9442. "description": "List all workspaces.",
  9443. "summary": "List workspaces",
  9444. "x-codeSamples": [
  9445. {
  9446. "lang": "js",
  9447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9448. }
  9449. ]
  9450. },
  9451. "post": {
  9452. "tags": ["workspace"],
  9453. "operationId": "experimental.workspace.create",
  9454. "parameters": [
  9455. {
  9456. "name": "directory",
  9457. "in": "query",
  9458. "schema": {
  9459. "type": "string"
  9460. },
  9461. "required": false
  9462. },
  9463. {
  9464. "name": "workspace",
  9465. "in": "query",
  9466. "schema": {
  9467. "type": "string"
  9468. },
  9469. "required": false
  9470. }
  9471. ],
  9472. "responses": {
  9473. "200": {
  9474. "description": "Workspace created",
  9475. "content": {
  9476. "application/json": {
  9477. "schema": {
  9478. "$ref": "#/components/schemas/Workspace"
  9479. }
  9480. }
  9481. }
  9482. },
  9483. "400": {
  9484. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9485. "content": {
  9486. "application/json": {
  9487. "schema": {
  9488. "anyOf": [
  9489. {
  9490. "$ref": "#/components/schemas/WorkspaceCreateError"
  9491. },
  9492. {
  9493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9494. },
  9495. {
  9496. "$ref": "#/components/schemas/InvalidRequestError"
  9497. }
  9498. ]
  9499. }
  9500. }
  9501. }
  9502. }
  9503. },
  9504. "description": "Create a workspace for the current project.",
  9505. "summary": "Create workspace",
  9506. "requestBody": {
  9507. "content": {
  9508. "application/json": {
  9509. "schema": {
  9510. "type": "object",
  9511. "properties": {
  9512. "id": {
  9513. "type": "string",
  9514. "pattern": "^wrk"
  9515. },
  9516. "type": {
  9517. "type": "string"
  9518. },
  9519. "branch": {
  9520. "anyOf": [
  9521. {
  9522. "type": "string"
  9523. },
  9524. {
  9525. "type": "null"
  9526. }
  9527. ]
  9528. },
  9529. "extra": {
  9530. "anyOf": [
  9531. {},
  9532. {
  9533. "type": "null"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "required": ["type"],
  9539. "additionalProperties": false
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "x-codeSamples": [
  9545. {
  9546. "lang": "js",
  9547. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9548. }
  9549. ]
  9550. }
  9551. },
  9552. "/experimental/workspace/sync-list": {
  9553. "post": {
  9554. "tags": ["workspace"],
  9555. "operationId": "experimental.workspace.syncList",
  9556. "parameters": [
  9557. {
  9558. "name": "directory",
  9559. "in": "query",
  9560. "schema": {
  9561. "type": "string"
  9562. },
  9563. "required": false
  9564. },
  9565. {
  9566. "name": "workspace",
  9567. "in": "query",
  9568. "schema": {
  9569. "type": "string"
  9570. },
  9571. "required": false
  9572. }
  9573. ],
  9574. "responses": {
  9575. "204": {
  9576. "description": "Workspace list synced"
  9577. },
  9578. "400": {
  9579. "description": "Bad request",
  9580. "content": {
  9581. "application/json": {
  9582. "schema": {
  9583. "$ref": "#/components/schemas/BadRequestError"
  9584. }
  9585. }
  9586. }
  9587. }
  9588. },
  9589. "description": "Register missing workspaces returned by workspace adapters.",
  9590. "summary": "Sync workspace list",
  9591. "x-codeSamples": [
  9592. {
  9593. "lang": "js",
  9594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9595. }
  9596. ]
  9597. }
  9598. },
  9599. "/experimental/workspace/status": {
  9600. "get": {
  9601. "tags": ["workspace"],
  9602. "operationId": "experimental.workspace.status",
  9603. "parameters": [
  9604. {
  9605. "name": "directory",
  9606. "in": "query",
  9607. "schema": {
  9608. "type": "string"
  9609. },
  9610. "required": false
  9611. },
  9612. {
  9613. "name": "workspace",
  9614. "in": "query",
  9615. "schema": {
  9616. "type": "string"
  9617. },
  9618. "required": false
  9619. }
  9620. ],
  9621. "responses": {
  9622. "200": {
  9623. "description": "Workspace status",
  9624. "content": {
  9625. "application/json": {
  9626. "schema": {
  9627. "type": "array",
  9628. "items": {
  9629. "type": "object",
  9630. "properties": {
  9631. "workspaceID": {
  9632. "type": "string",
  9633. "pattern": "^wrk"
  9634. },
  9635. "status": {
  9636. "type": "string",
  9637. "enum": ["connected", "connecting", "disconnected", "error"]
  9638. }
  9639. },
  9640. "required": ["workspaceID", "status"],
  9641. "additionalProperties": false
  9642. },
  9643. "description": "Workspace status"
  9644. }
  9645. }
  9646. }
  9647. },
  9648. "400": {
  9649. "description": "Bad request",
  9650. "content": {
  9651. "application/json": {
  9652. "schema": {
  9653. "$ref": "#/components/schemas/BadRequestError"
  9654. }
  9655. }
  9656. }
  9657. }
  9658. },
  9659. "description": "Get connection status for workspaces in the current project.",
  9660. "summary": "Workspace status",
  9661. "x-codeSamples": [
  9662. {
  9663. "lang": "js",
  9664. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9665. }
  9666. ]
  9667. }
  9668. },
  9669. "/experimental/workspace/{id}": {
  9670. "delete": {
  9671. "tags": ["workspace"],
  9672. "operationId": "experimental.workspace.remove",
  9673. "parameters": [
  9674. {
  9675. "name": "id",
  9676. "in": "path",
  9677. "schema": {
  9678. "type": "string",
  9679. "pattern": "^wrk"
  9680. },
  9681. "required": true
  9682. },
  9683. {
  9684. "name": "directory",
  9685. "in": "query",
  9686. "schema": {
  9687. "type": "string"
  9688. },
  9689. "required": false
  9690. },
  9691. {
  9692. "name": "workspace",
  9693. "in": "query",
  9694. "schema": {
  9695. "type": "string"
  9696. },
  9697. "required": false
  9698. }
  9699. ],
  9700. "responses": {
  9701. "200": {
  9702. "description": "Workspace removed",
  9703. "content": {
  9704. "application/json": {
  9705. "schema": {
  9706. "$ref": "#/components/schemas/Workspace"
  9707. }
  9708. }
  9709. }
  9710. },
  9711. "400": {
  9712. "description": "BadRequest | InvalidRequestError",
  9713. "content": {
  9714. "application/json": {
  9715. "schema": {
  9716. "anyOf": [
  9717. {
  9718. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. }
  9728. },
  9729. "description": "Remove an existing workspace.",
  9730. "summary": "Remove workspace",
  9731. "x-codeSamples": [
  9732. {
  9733. "lang": "js",
  9734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9735. }
  9736. ]
  9737. }
  9738. },
  9739. "/experimental/workspace/warp": {
  9740. "post": {
  9741. "tags": ["workspace"],
  9742. "operationId": "experimental.workspace.warp",
  9743. "parameters": [
  9744. {
  9745. "name": "directory",
  9746. "in": "query",
  9747. "schema": {
  9748. "type": "string"
  9749. },
  9750. "required": false
  9751. },
  9752. {
  9753. "name": "workspace",
  9754. "in": "query",
  9755. "schema": {
  9756. "type": "string"
  9757. },
  9758. "required": false
  9759. }
  9760. ],
  9761. "responses": {
  9762. "204": {
  9763. "description": "Session warped"
  9764. },
  9765. "400": {
  9766. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9767. "content": {
  9768. "application/json": {
  9769. "schema": {
  9770. "anyOf": [
  9771. {
  9772. "$ref": "#/components/schemas/WorkspaceWarpError"
  9773. },
  9774. {
  9775. "$ref": "#/components/schemas/VcsApplyError"
  9776. },
  9777. {
  9778. "$ref": "#/components/schemas/InvalidRequestError"
  9779. }
  9780. ]
  9781. }
  9782. }
  9783. }
  9784. },
  9785. "404": {
  9786. "description": "NotFoundError",
  9787. "content": {
  9788. "application/json": {
  9789. "schema": {
  9790. "$ref": "#/components/schemas/NotFoundError"
  9791. }
  9792. }
  9793. }
  9794. }
  9795. },
  9796. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9797. "summary": "Warp session into workspace",
  9798. "requestBody": {
  9799. "content": {
  9800. "application/json": {
  9801. "schema": {
  9802. "type": "object",
  9803. "properties": {
  9804. "id": {
  9805. "anyOf": [
  9806. {
  9807. "type": "string",
  9808. "pattern": "^wrk"
  9809. },
  9810. {
  9811. "type": "null"
  9812. }
  9813. ]
  9814. },
  9815. "sessionID": {
  9816. "type": "string",
  9817. "pattern": "^ses"
  9818. },
  9819. "copyChanges": {
  9820. "type": "boolean"
  9821. }
  9822. },
  9823. "required": ["id", "sessionID"],
  9824. "additionalProperties": false
  9825. }
  9826. }
  9827. }
  9828. },
  9829. "x-codeSamples": [
  9830. {
  9831. "lang": "js",
  9832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9833. }
  9834. ]
  9835. }
  9836. },
  9837. "/api/health": {
  9838. "get": {
  9839. "tags": ["opencode experimental HttpApi"],
  9840. "operationId": "v2.health.get",
  9841. "parameters": [],
  9842. "security": [],
  9843. "responses": {
  9844. "200": {
  9845. "description": "Success",
  9846. "content": {
  9847. "application/json": {
  9848. "schema": {
  9849. "type": "object",
  9850. "properties": {
  9851. "healthy": {
  9852. "type": "boolean",
  9853. "enum": [true]
  9854. }
  9855. },
  9856. "required": ["healthy"],
  9857. "additionalProperties": false
  9858. }
  9859. }
  9860. }
  9861. },
  9862. "400": {
  9863. "description": "InvalidRequestError",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "$ref": "#/components/schemas/InvalidRequestError"
  9868. }
  9869. }
  9870. }
  9871. },
  9872. "401": {
  9873. "description": "UnauthorizedError",
  9874. "content": {
  9875. "application/json": {
  9876. "schema": {
  9877. "$ref": "#/components/schemas/UnauthorizedError"
  9878. }
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "description": "Check whether the v2 API server is ready to accept requests.",
  9884. "summary": "Check v2 server health",
  9885. "x-codeSamples": [
  9886. {
  9887. "lang": "js",
  9888. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9889. }
  9890. ]
  9891. }
  9892. },
  9893. "/api/agent": {
  9894. "get": {
  9895. "tags": ["opencode experimental HttpApi"],
  9896. "operationId": "v2.agent.list",
  9897. "parameters": [
  9898. {
  9899. "name": "location",
  9900. "in": "query",
  9901. "schema": {
  9902. "type": "object",
  9903. "properties": {
  9904. "directory": {
  9905. "type": "string"
  9906. },
  9907. "workspace": {
  9908. "type": "string"
  9909. }
  9910. },
  9911. "additionalProperties": false
  9912. },
  9913. "required": false,
  9914. "style": "deepObject",
  9915. "explode": true
  9916. }
  9917. ],
  9918. "security": [],
  9919. "responses": {
  9920. "200": {
  9921. "description": "Success",
  9922. "content": {
  9923. "application/json": {
  9924. "schema": {
  9925. "type": "object",
  9926. "properties": {
  9927. "location": {
  9928. "$ref": "#/components/schemas/LocationInfo"
  9929. },
  9930. "data": {
  9931. "type": "array",
  9932. "items": {
  9933. "$ref": "#/components/schemas/AgentV2Info"
  9934. }
  9935. }
  9936. },
  9937. "required": ["location", "data"],
  9938. "additionalProperties": false
  9939. }
  9940. }
  9941. }
  9942. },
  9943. "400": {
  9944. "description": "InvalidRequestError",
  9945. "content": {
  9946. "application/json": {
  9947. "schema": {
  9948. "$ref": "#/components/schemas/InvalidRequestError"
  9949. }
  9950. }
  9951. }
  9952. },
  9953. "401": {
  9954. "description": "UnauthorizedError",
  9955. "content": {
  9956. "application/json": {
  9957. "schema": {
  9958. "$ref": "#/components/schemas/UnauthorizedError"
  9959. }
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "description": "Retrieve currently registered v2 agents.",
  9965. "summary": "List v2 agents",
  9966. "x-codeSamples": [
  9967. {
  9968. "lang": "js",
  9969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9970. }
  9971. ]
  9972. }
  9973. },
  9974. "/api/session": {
  9975. "get": {
  9976. "tags": ["v2"],
  9977. "operationId": "v2.session.list",
  9978. "parameters": [
  9979. {
  9980. "name": "workspace",
  9981. "in": "query",
  9982. "schema": {
  9983. "type": "string",
  9984. "pattern": "^wrk"
  9985. },
  9986. "required": false
  9987. },
  9988. {
  9989. "name": "limit",
  9990. "in": "query",
  9991. "schema": {
  9992. "type": "number"
  9993. },
  9994. "required": false
  9995. },
  9996. {
  9997. "name": "order",
  9998. "in": "query",
  9999. "schema": {
  10000. "type": "string",
  10001. "enum": ["asc", "desc"]
  10002. },
  10003. "required": false
  10004. },
  10005. {
  10006. "name": "search",
  10007. "in": "query",
  10008. "schema": {
  10009. "type": "string"
  10010. },
  10011. "required": false
  10012. },
  10013. {
  10014. "name": "directory",
  10015. "in": "query",
  10016. "schema": {
  10017. "type": "string"
  10018. },
  10019. "required": false
  10020. },
  10021. {
  10022. "name": "project",
  10023. "in": "query",
  10024. "schema": {
  10025. "type": "string"
  10026. },
  10027. "required": false
  10028. },
  10029. {
  10030. "name": "subpath",
  10031. "in": "query",
  10032. "schema": {
  10033. "type": "string"
  10034. },
  10035. "required": false
  10036. },
  10037. {
  10038. "name": "cursor",
  10039. "in": "query",
  10040. "schema": {
  10041. "type": "string",
  10042. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10043. },
  10044. "required": false
  10045. }
  10046. ],
  10047. "security": [],
  10048. "responses": {
  10049. "200": {
  10050. "description": "V2SessionsResponse",
  10051. "content": {
  10052. "application/json": {
  10053. "schema": {
  10054. "$ref": "#/components/schemas/V2SessionsResponse"
  10055. }
  10056. }
  10057. }
  10058. },
  10059. "400": {
  10060. "description": "InvalidCursorError | InvalidRequestError",
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "anyOf": [
  10065. {
  10066. "$ref": "#/components/schemas/InvalidCursorError"
  10067. },
  10068. {
  10069. "$ref": "#/components/schemas/InvalidRequestError"
  10070. },
  10071. {
  10072. "$ref": "#/components/schemas/InvalidRequestError"
  10073. }
  10074. ]
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "401": {
  10080. "description": "UnauthorizedError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/UnauthorizedError"
  10085. }
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10091. "summary": "List v2 sessions",
  10092. "x-codeSamples": [
  10093. {
  10094. "lang": "js",
  10095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10096. }
  10097. ]
  10098. }
  10099. },
  10100. "/api/session/{sessionID}/prompt": {
  10101. "post": {
  10102. "tags": ["v2"],
  10103. "operationId": "v2.session.prompt",
  10104. "parameters": [
  10105. {
  10106. "name": "sessionID",
  10107. "in": "path",
  10108. "schema": {
  10109. "type": "string",
  10110. "pattern": "^ses"
  10111. },
  10112. "required": true
  10113. }
  10114. ],
  10115. "security": [],
  10116. "responses": {
  10117. "200": {
  10118. "description": "Success",
  10119. "content": {
  10120. "application/json": {
  10121. "schema": {
  10122. "type": "object",
  10123. "properties": {
  10124. "data": {
  10125. "$ref": "#/components/schemas/SessionMessageUser"
  10126. }
  10127. },
  10128. "required": ["data"],
  10129. "additionalProperties": false
  10130. }
  10131. }
  10132. }
  10133. },
  10134. "400": {
  10135. "description": "InvalidRequestError",
  10136. "content": {
  10137. "application/json": {
  10138. "schema": {
  10139. "$ref": "#/components/schemas/InvalidRequestError"
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "401": {
  10145. "description": "UnauthorizedError",
  10146. "content": {
  10147. "application/json": {
  10148. "schema": {
  10149. "$ref": "#/components/schemas/UnauthorizedError"
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "404": {
  10155. "description": "SessionNotFoundError",
  10156. "content": {
  10157. "application/json": {
  10158. "schema": {
  10159. "$ref": "#/components/schemas/SessionNotFoundError"
  10160. }
  10161. }
  10162. }
  10163. },
  10164. "409": {
  10165. "description": "ConflictError",
  10166. "content": {
  10167. "application/json": {
  10168. "schema": {
  10169. "$ref": "#/components/schemas/ConflictError"
  10170. }
  10171. }
  10172. }
  10173. }
  10174. },
  10175. "description": "Durably admit one v2 session input and schedule agent-loop execution unless resume is false.",
  10176. "summary": "Send v2 message",
  10177. "requestBody": {
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "type": "object",
  10182. "properties": {
  10183. "id": {
  10184. "type": "string"
  10185. },
  10186. "prompt": {
  10187. "$ref": "#/components/schemas/Prompt"
  10188. },
  10189. "delivery": {
  10190. "type": "string",
  10191. "enum": ["steer", "queue"]
  10192. },
  10193. "resume": {
  10194. "type": "boolean"
  10195. }
  10196. },
  10197. "required": ["prompt"],
  10198. "additionalProperties": false
  10199. }
  10200. }
  10201. },
  10202. "required": true
  10203. },
  10204. "x-codeSamples": [
  10205. {
  10206. "lang": "js",
  10207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10208. }
  10209. ]
  10210. }
  10211. },
  10212. "/api/session/{sessionID}/compact": {
  10213. "post": {
  10214. "tags": ["v2"],
  10215. "operationId": "v2.session.compact",
  10216. "parameters": [
  10217. {
  10218. "name": "sessionID",
  10219. "in": "path",
  10220. "schema": {
  10221. "type": "string",
  10222. "pattern": "^ses"
  10223. },
  10224. "required": true
  10225. }
  10226. ],
  10227. "security": [],
  10228. "responses": {
  10229. "204": {
  10230. "description": "<No Content>"
  10231. },
  10232. "400": {
  10233. "description": "InvalidRequestError",
  10234. "content": {
  10235. "application/json": {
  10236. "schema": {
  10237. "$ref": "#/components/schemas/InvalidRequestError"
  10238. }
  10239. }
  10240. }
  10241. },
  10242. "401": {
  10243. "description": "UnauthorizedError",
  10244. "content": {
  10245. "application/json": {
  10246. "schema": {
  10247. "$ref": "#/components/schemas/UnauthorizedError"
  10248. }
  10249. }
  10250. }
  10251. },
  10252. "404": {
  10253. "description": "SessionNotFoundError",
  10254. "content": {
  10255. "application/json": {
  10256. "schema": {
  10257. "$ref": "#/components/schemas/SessionNotFoundError"
  10258. }
  10259. }
  10260. }
  10261. },
  10262. "503": {
  10263. "description": "ServiceUnavailableError",
  10264. "content": {
  10265. "application/json": {
  10266. "schema": {
  10267. "$ref": "#/components/schemas/ServiceUnavailableError"
  10268. }
  10269. }
  10270. }
  10271. }
  10272. },
  10273. "description": "Compact a v2 session conversation.",
  10274. "summary": "Compact v2 session",
  10275. "x-codeSamples": [
  10276. {
  10277. "lang": "js",
  10278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10279. }
  10280. ]
  10281. }
  10282. },
  10283. "/api/session/{sessionID}/wait": {
  10284. "post": {
  10285. "tags": ["v2"],
  10286. "operationId": "v2.session.wait",
  10287. "parameters": [
  10288. {
  10289. "name": "sessionID",
  10290. "in": "path",
  10291. "schema": {
  10292. "type": "string",
  10293. "pattern": "^ses"
  10294. },
  10295. "required": true
  10296. }
  10297. ],
  10298. "security": [],
  10299. "responses": {
  10300. "204": {
  10301. "description": "<No Content>"
  10302. },
  10303. "400": {
  10304. "description": "InvalidRequestError",
  10305. "content": {
  10306. "application/json": {
  10307. "schema": {
  10308. "$ref": "#/components/schemas/InvalidRequestError"
  10309. }
  10310. }
  10311. }
  10312. },
  10313. "401": {
  10314. "description": "UnauthorizedError",
  10315. "content": {
  10316. "application/json": {
  10317. "schema": {
  10318. "$ref": "#/components/schemas/UnauthorizedError"
  10319. }
  10320. }
  10321. }
  10322. },
  10323. "404": {
  10324. "description": "SessionNotFoundError",
  10325. "content": {
  10326. "application/json": {
  10327. "schema": {
  10328. "$ref": "#/components/schemas/SessionNotFoundError"
  10329. }
  10330. }
  10331. }
  10332. },
  10333. "503": {
  10334. "description": "ServiceUnavailableError",
  10335. "content": {
  10336. "application/json": {
  10337. "schema": {
  10338. "$ref": "#/components/schemas/ServiceUnavailableError"
  10339. }
  10340. }
  10341. }
  10342. }
  10343. },
  10344. "description": "Wait for a v2 session agent loop to become idle.",
  10345. "summary": "Wait for v2 session",
  10346. "x-codeSamples": [
  10347. {
  10348. "lang": "js",
  10349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10350. }
  10351. ]
  10352. }
  10353. },
  10354. "/api/session/{sessionID}/context": {
  10355. "get": {
  10356. "tags": ["v2"],
  10357. "operationId": "v2.session.context",
  10358. "parameters": [
  10359. {
  10360. "name": "sessionID",
  10361. "in": "path",
  10362. "schema": {
  10363. "type": "string",
  10364. "pattern": "^ses"
  10365. },
  10366. "required": true
  10367. }
  10368. ],
  10369. "security": [],
  10370. "responses": {
  10371. "200": {
  10372. "description": "Success",
  10373. "content": {
  10374. "application/json": {
  10375. "schema": {
  10376. "type": "object",
  10377. "properties": {
  10378. "data": {
  10379. "type": "array",
  10380. "items": {
  10381. "$ref": "#/components/schemas/SessionMessage"
  10382. }
  10383. }
  10384. },
  10385. "required": ["data"],
  10386. "additionalProperties": false
  10387. }
  10388. }
  10389. }
  10390. },
  10391. "400": {
  10392. "description": "InvalidRequestError",
  10393. "content": {
  10394. "application/json": {
  10395. "schema": {
  10396. "$ref": "#/components/schemas/InvalidRequestError"
  10397. }
  10398. }
  10399. }
  10400. },
  10401. "401": {
  10402. "description": "UnauthorizedError",
  10403. "content": {
  10404. "application/json": {
  10405. "schema": {
  10406. "$ref": "#/components/schemas/UnauthorizedError"
  10407. }
  10408. }
  10409. }
  10410. },
  10411. "404": {
  10412. "description": "SessionNotFoundError",
  10413. "content": {
  10414. "application/json": {
  10415. "schema": {
  10416. "$ref": "#/components/schemas/SessionNotFoundError"
  10417. }
  10418. }
  10419. }
  10420. },
  10421. "500": {
  10422. "description": "UnknownError",
  10423. "content": {
  10424. "application/json": {
  10425. "schema": {
  10426. "$ref": "#/components/schemas/UnknownError1"
  10427. }
  10428. }
  10429. }
  10430. }
  10431. },
  10432. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  10433. "summary": "Get v2 session context",
  10434. "x-codeSamples": [
  10435. {
  10436. "lang": "js",
  10437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10438. }
  10439. ]
  10440. }
  10441. },
  10442. "/api/session/{sessionID}/message": {
  10443. "get": {
  10444. "tags": ["v2 messages"],
  10445. "operationId": "v2.session.messages",
  10446. "parameters": [
  10447. {
  10448. "name": "sessionID",
  10449. "in": "path",
  10450. "schema": {
  10451. "type": "string",
  10452. "pattern": "^ses"
  10453. },
  10454. "required": true
  10455. },
  10456. {
  10457. "name": "limit",
  10458. "in": "query",
  10459. "schema": {
  10460. "type": "number"
  10461. },
  10462. "required": false
  10463. },
  10464. {
  10465. "name": "order",
  10466. "in": "query",
  10467. "schema": {
  10468. "type": "string",
  10469. "enum": ["asc", "desc"]
  10470. },
  10471. "required": false
  10472. },
  10473. {
  10474. "name": "cursor",
  10475. "in": "query",
  10476. "schema": {
  10477. "type": "string",
  10478. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10479. },
  10480. "required": false
  10481. }
  10482. ],
  10483. "security": [],
  10484. "responses": {
  10485. "200": {
  10486. "description": "V2SessionMessagesResponse",
  10487. "content": {
  10488. "application/json": {
  10489. "schema": {
  10490. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  10491. }
  10492. }
  10493. }
  10494. },
  10495. "400": {
  10496. "description": "InvalidCursorError | InvalidRequestError",
  10497. "content": {
  10498. "application/json": {
  10499. "schema": {
  10500. "anyOf": [
  10501. {
  10502. "$ref": "#/components/schemas/InvalidCursorError"
  10503. },
  10504. {
  10505. "$ref": "#/components/schemas/InvalidRequestError"
  10506. }
  10507. ]
  10508. }
  10509. }
  10510. }
  10511. },
  10512. "401": {
  10513. "description": "UnauthorizedError",
  10514. "content": {
  10515. "application/json": {
  10516. "schema": {
  10517. "$ref": "#/components/schemas/UnauthorizedError"
  10518. }
  10519. }
  10520. }
  10521. },
  10522. "404": {
  10523. "description": "SessionNotFoundError",
  10524. "content": {
  10525. "application/json": {
  10526. "schema": {
  10527. "$ref": "#/components/schemas/SessionNotFoundError"
  10528. }
  10529. }
  10530. }
  10531. },
  10532. "500": {
  10533. "description": "UnknownError",
  10534. "content": {
  10535. "application/json": {
  10536. "schema": {
  10537. "$ref": "#/components/schemas/UnknownError1"
  10538. }
  10539. }
  10540. }
  10541. }
  10542. },
  10543. "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.",
  10544. "summary": "Get v2 session messages",
  10545. "x-codeSamples": [
  10546. {
  10547. "lang": "js",
  10548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10549. }
  10550. ]
  10551. }
  10552. },
  10553. "/api/model": {
  10554. "get": {
  10555. "tags": ["v2 models"],
  10556. "operationId": "v2.model.list",
  10557. "parameters": [
  10558. {
  10559. "name": "location",
  10560. "in": "query",
  10561. "schema": {
  10562. "type": "object",
  10563. "properties": {
  10564. "directory": {
  10565. "type": "string"
  10566. },
  10567. "workspace": {
  10568. "type": "string"
  10569. }
  10570. },
  10571. "additionalProperties": false
  10572. },
  10573. "required": false,
  10574. "style": "deepObject",
  10575. "explode": true
  10576. }
  10577. ],
  10578. "security": [],
  10579. "responses": {
  10580. "200": {
  10581. "description": "Success",
  10582. "content": {
  10583. "application/json": {
  10584. "schema": {
  10585. "type": "object",
  10586. "properties": {
  10587. "location": {
  10588. "$ref": "#/components/schemas/LocationInfo"
  10589. },
  10590. "data": {
  10591. "type": "array",
  10592. "items": {
  10593. "$ref": "#/components/schemas/ModelV2Info"
  10594. }
  10595. }
  10596. },
  10597. "required": ["location", "data"],
  10598. "additionalProperties": false
  10599. }
  10600. }
  10601. }
  10602. },
  10603. "400": {
  10604. "description": "InvalidRequestError",
  10605. "content": {
  10606. "application/json": {
  10607. "schema": {
  10608. "$ref": "#/components/schemas/InvalidRequestError"
  10609. }
  10610. }
  10611. }
  10612. },
  10613. "401": {
  10614. "description": "UnauthorizedError",
  10615. "content": {
  10616. "application/json": {
  10617. "schema": {
  10618. "$ref": "#/components/schemas/UnauthorizedError"
  10619. }
  10620. }
  10621. }
  10622. },
  10623. "503": {
  10624. "description": "ServiceUnavailableError",
  10625. "content": {
  10626. "application/json": {
  10627. "schema": {
  10628. "$ref": "#/components/schemas/ServiceUnavailableError"
  10629. }
  10630. }
  10631. }
  10632. }
  10633. },
  10634. "description": "Retrieve available v2 models ordered by release date.",
  10635. "summary": "List v2 models",
  10636. "x-codeSamples": [
  10637. {
  10638. "lang": "js",
  10639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10640. }
  10641. ]
  10642. }
  10643. },
  10644. "/api/provider": {
  10645. "get": {
  10646. "tags": ["v2 providers"],
  10647. "operationId": "v2.provider.list",
  10648. "parameters": [
  10649. {
  10650. "name": "location",
  10651. "in": "query",
  10652. "schema": {
  10653. "type": "object",
  10654. "properties": {
  10655. "directory": {
  10656. "type": "string"
  10657. },
  10658. "workspace": {
  10659. "type": "string"
  10660. }
  10661. },
  10662. "additionalProperties": false
  10663. },
  10664. "required": false,
  10665. "style": "deepObject",
  10666. "explode": true
  10667. }
  10668. ],
  10669. "security": [],
  10670. "responses": {
  10671. "200": {
  10672. "description": "Success",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "type": "object",
  10677. "properties": {
  10678. "location": {
  10679. "$ref": "#/components/schemas/LocationInfo"
  10680. },
  10681. "data": {
  10682. "type": "array",
  10683. "items": {
  10684. "$ref": "#/components/schemas/ProviderV2Info"
  10685. }
  10686. }
  10687. },
  10688. "required": ["location", "data"],
  10689. "additionalProperties": false
  10690. }
  10691. }
  10692. }
  10693. },
  10694. "400": {
  10695. "description": "InvalidRequestError",
  10696. "content": {
  10697. "application/json": {
  10698. "schema": {
  10699. "$ref": "#/components/schemas/InvalidRequestError"
  10700. }
  10701. }
  10702. }
  10703. },
  10704. "401": {
  10705. "description": "UnauthorizedError",
  10706. "content": {
  10707. "application/json": {
  10708. "schema": {
  10709. "$ref": "#/components/schemas/UnauthorizedError"
  10710. }
  10711. }
  10712. }
  10713. },
  10714. "503": {
  10715. "description": "ServiceUnavailableError",
  10716. "content": {
  10717. "application/json": {
  10718. "schema": {
  10719. "$ref": "#/components/schemas/ServiceUnavailableError"
  10720. }
  10721. }
  10722. }
  10723. }
  10724. },
  10725. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  10726. "summary": "List v2 providers",
  10727. "x-codeSamples": [
  10728. {
  10729. "lang": "js",
  10730. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10731. }
  10732. ]
  10733. }
  10734. },
  10735. "/api/provider/{providerID}": {
  10736. "get": {
  10737. "tags": ["v2 providers"],
  10738. "operationId": "v2.provider.get",
  10739. "parameters": [
  10740. {
  10741. "name": "providerID",
  10742. "in": "path",
  10743. "schema": {
  10744. "type": "string"
  10745. },
  10746. "required": true
  10747. },
  10748. {
  10749. "name": "location",
  10750. "in": "query",
  10751. "schema": {
  10752. "type": "object",
  10753. "properties": {
  10754. "directory": {
  10755. "type": "string"
  10756. },
  10757. "workspace": {
  10758. "type": "string"
  10759. }
  10760. },
  10761. "additionalProperties": false
  10762. },
  10763. "required": false,
  10764. "style": "deepObject",
  10765. "explode": true
  10766. }
  10767. ],
  10768. "security": [],
  10769. "responses": {
  10770. "200": {
  10771. "description": "Success",
  10772. "content": {
  10773. "application/json": {
  10774. "schema": {
  10775. "type": "object",
  10776. "properties": {
  10777. "location": {
  10778. "$ref": "#/components/schemas/LocationInfo"
  10779. },
  10780. "data": {
  10781. "$ref": "#/components/schemas/ProviderV2Info"
  10782. }
  10783. },
  10784. "required": ["location", "data"],
  10785. "additionalProperties": false
  10786. }
  10787. }
  10788. }
  10789. },
  10790. "400": {
  10791. "description": "InvalidRequestError",
  10792. "content": {
  10793. "application/json": {
  10794. "schema": {
  10795. "$ref": "#/components/schemas/InvalidRequestError"
  10796. }
  10797. }
  10798. }
  10799. },
  10800. "401": {
  10801. "description": "UnauthorizedError",
  10802. "content": {
  10803. "application/json": {
  10804. "schema": {
  10805. "$ref": "#/components/schemas/UnauthorizedError"
  10806. }
  10807. }
  10808. }
  10809. },
  10810. "404": {
  10811. "description": "ProviderNotFoundError",
  10812. "content": {
  10813. "application/json": {
  10814. "schema": {
  10815. "$ref": "#/components/schemas/ProviderNotFoundError"
  10816. }
  10817. }
  10818. }
  10819. },
  10820. "503": {
  10821. "description": "ServiceUnavailableError",
  10822. "content": {
  10823. "application/json": {
  10824. "schema": {
  10825. "$ref": "#/components/schemas/ServiceUnavailableError"
  10826. }
  10827. }
  10828. }
  10829. }
  10830. },
  10831. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  10832. "summary": "Get v2 provider",
  10833. "x-codeSamples": [
  10834. {
  10835. "lang": "js",
  10836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10837. }
  10838. ]
  10839. }
  10840. },
  10841. "/api/permission/request": {
  10842. "get": {
  10843. "tags": ["v2 permissions"],
  10844. "operationId": "v2.permission.request.list",
  10845. "parameters": [
  10846. {
  10847. "name": "location",
  10848. "in": "query",
  10849. "schema": {
  10850. "type": "object",
  10851. "properties": {
  10852. "directory": {
  10853. "type": "string"
  10854. },
  10855. "workspace": {
  10856. "type": "string"
  10857. }
  10858. },
  10859. "additionalProperties": false
  10860. },
  10861. "required": false,
  10862. "style": "deepObject",
  10863. "explode": true
  10864. }
  10865. ],
  10866. "security": [],
  10867. "responses": {
  10868. "200": {
  10869. "description": "Success",
  10870. "content": {
  10871. "application/json": {
  10872. "schema": {
  10873. "type": "object",
  10874. "properties": {
  10875. "location": {
  10876. "$ref": "#/components/schemas/LocationInfo"
  10877. },
  10878. "data": {
  10879. "type": "array",
  10880. "items": {
  10881. "$ref": "#/components/schemas/PermissionV2Request"
  10882. }
  10883. }
  10884. },
  10885. "required": ["location", "data"],
  10886. "additionalProperties": false
  10887. }
  10888. }
  10889. }
  10890. },
  10891. "400": {
  10892. "description": "InvalidRequestError",
  10893. "content": {
  10894. "application/json": {
  10895. "schema": {
  10896. "$ref": "#/components/schemas/InvalidRequestError"
  10897. }
  10898. }
  10899. }
  10900. },
  10901. "401": {
  10902. "description": "UnauthorizedError",
  10903. "content": {
  10904. "application/json": {
  10905. "schema": {
  10906. "$ref": "#/components/schemas/UnauthorizedError"
  10907. }
  10908. }
  10909. }
  10910. }
  10911. },
  10912. "description": "Retrieve pending permission requests for a location.",
  10913. "summary": "List pending permission requests",
  10914. "x-codeSamples": [
  10915. {
  10916. "lang": "js",
  10917. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  10918. }
  10919. ]
  10920. }
  10921. },
  10922. "/api/session/{sessionID}/permission/request": {
  10923. "get": {
  10924. "tags": ["v2 session permissions"],
  10925. "operationId": "v2.session.permission.list",
  10926. "parameters": [
  10927. {
  10928. "name": "sessionID",
  10929. "in": "path",
  10930. "schema": {
  10931. "type": "string",
  10932. "pattern": "^ses"
  10933. },
  10934. "required": true
  10935. }
  10936. ],
  10937. "security": [],
  10938. "responses": {
  10939. "200": {
  10940. "description": "Success",
  10941. "content": {
  10942. "application/json": {
  10943. "schema": {
  10944. "type": "object",
  10945. "properties": {
  10946. "data": {
  10947. "type": "array",
  10948. "items": {
  10949. "$ref": "#/components/schemas/PermissionV2Request"
  10950. }
  10951. }
  10952. },
  10953. "required": ["data"],
  10954. "additionalProperties": false
  10955. }
  10956. }
  10957. }
  10958. },
  10959. "400": {
  10960. "description": "InvalidRequestError",
  10961. "content": {
  10962. "application/json": {
  10963. "schema": {
  10964. "$ref": "#/components/schemas/InvalidRequestError"
  10965. }
  10966. }
  10967. }
  10968. },
  10969. "401": {
  10970. "description": "UnauthorizedError",
  10971. "content": {
  10972. "application/json": {
  10973. "schema": {
  10974. "$ref": "#/components/schemas/UnauthorizedError"
  10975. }
  10976. }
  10977. }
  10978. },
  10979. "404": {
  10980. "description": "SessionNotFoundError",
  10981. "content": {
  10982. "application/json": {
  10983. "schema": {
  10984. "$ref": "#/components/schemas/SessionNotFoundError"
  10985. }
  10986. }
  10987. }
  10988. }
  10989. },
  10990. "description": "Retrieve pending permission requests owned by a session.",
  10991. "summary": "List session permission requests",
  10992. "x-codeSamples": [
  10993. {
  10994. "lang": "js",
  10995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  10996. }
  10997. ]
  10998. }
  10999. },
  11000. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  11001. "post": {
  11002. "tags": ["v2 session permissions"],
  11003. "operationId": "v2.session.permission.reply",
  11004. "parameters": [
  11005. {
  11006. "name": "sessionID",
  11007. "in": "path",
  11008. "schema": {
  11009. "type": "string",
  11010. "pattern": "^ses"
  11011. },
  11012. "required": true
  11013. },
  11014. {
  11015. "name": "requestID",
  11016. "in": "path",
  11017. "schema": {
  11018. "type": "string",
  11019. "pattern": "^per"
  11020. },
  11021. "required": true
  11022. }
  11023. ],
  11024. "security": [],
  11025. "responses": {
  11026. "204": {
  11027. "description": "<No Content>"
  11028. },
  11029. "400": {
  11030. "description": "InvalidRequestError",
  11031. "content": {
  11032. "application/json": {
  11033. "schema": {
  11034. "$ref": "#/components/schemas/InvalidRequestError"
  11035. }
  11036. }
  11037. }
  11038. },
  11039. "401": {
  11040. "description": "UnauthorizedError",
  11041. "content": {
  11042. "application/json": {
  11043. "schema": {
  11044. "$ref": "#/components/schemas/UnauthorizedError"
  11045. }
  11046. }
  11047. }
  11048. },
  11049. "404": {
  11050. "description": "SessionNotFoundError | PermissionNotFoundError",
  11051. "content": {
  11052. "application/json": {
  11053. "schema": {
  11054. "anyOf": [
  11055. {
  11056. "$ref": "#/components/schemas/SessionNotFoundError"
  11057. },
  11058. {
  11059. "$ref": "#/components/schemas/PermissionNotFoundError"
  11060. }
  11061. ]
  11062. }
  11063. }
  11064. }
  11065. }
  11066. },
  11067. "description": "Respond to a pending permission request owned by a session.",
  11068. "summary": "Reply to pending permission request",
  11069. "requestBody": {
  11070. "content": {
  11071. "application/json": {
  11072. "schema": {
  11073. "type": "object",
  11074. "properties": {
  11075. "reply": {
  11076. "$ref": "#/components/schemas/PermissionV2Reply"
  11077. },
  11078. "message": {
  11079. "type": "string"
  11080. }
  11081. },
  11082. "required": ["reply"],
  11083. "additionalProperties": false
  11084. }
  11085. }
  11086. },
  11087. "required": true
  11088. },
  11089. "x-codeSamples": [
  11090. {
  11091. "lang": "js",
  11092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11093. }
  11094. ]
  11095. }
  11096. },
  11097. "/api/permission/saved": {
  11098. "get": {
  11099. "tags": ["v2 saved permissions"],
  11100. "operationId": "v2.permission.saved.list",
  11101. "parameters": [
  11102. {
  11103. "name": "projectID",
  11104. "in": "query",
  11105. "schema": {
  11106. "type": "string"
  11107. },
  11108. "required": false
  11109. }
  11110. ],
  11111. "security": [],
  11112. "responses": {
  11113. "200": {
  11114. "description": "Success",
  11115. "content": {
  11116. "application/json": {
  11117. "schema": {
  11118. "type": "object",
  11119. "properties": {
  11120. "data": {
  11121. "type": "array",
  11122. "items": {
  11123. "$ref": "#/components/schemas/PermissionSavedInfo"
  11124. }
  11125. }
  11126. },
  11127. "required": ["data"],
  11128. "additionalProperties": false
  11129. }
  11130. }
  11131. }
  11132. },
  11133. "400": {
  11134. "description": "InvalidRequestError",
  11135. "content": {
  11136. "application/json": {
  11137. "schema": {
  11138. "$ref": "#/components/schemas/InvalidRequestError"
  11139. }
  11140. }
  11141. }
  11142. },
  11143. "401": {
  11144. "description": "UnauthorizedError",
  11145. "content": {
  11146. "application/json": {
  11147. "schema": {
  11148. "$ref": "#/components/schemas/UnauthorizedError"
  11149. }
  11150. }
  11151. }
  11152. }
  11153. },
  11154. "description": "Retrieve saved permissions, optionally filtered by project.",
  11155. "summary": "List saved permissions",
  11156. "x-codeSamples": [
  11157. {
  11158. "lang": "js",
  11159. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11160. }
  11161. ]
  11162. }
  11163. },
  11164. "/api/permission/saved/{id}": {
  11165. "delete": {
  11166. "tags": ["v2 saved permissions"],
  11167. "operationId": "v2.permission.saved.remove",
  11168. "parameters": [
  11169. {
  11170. "name": "id",
  11171. "in": "path",
  11172. "schema": {
  11173. "type": "string"
  11174. },
  11175. "required": true
  11176. }
  11177. ],
  11178. "security": [],
  11179. "responses": {
  11180. "204": {
  11181. "description": "<No Content>"
  11182. },
  11183. "400": {
  11184. "description": "InvalidRequestError",
  11185. "content": {
  11186. "application/json": {
  11187. "schema": {
  11188. "$ref": "#/components/schemas/InvalidRequestError"
  11189. }
  11190. }
  11191. }
  11192. },
  11193. "401": {
  11194. "description": "UnauthorizedError",
  11195. "content": {
  11196. "application/json": {
  11197. "schema": {
  11198. "$ref": "#/components/schemas/UnauthorizedError"
  11199. }
  11200. }
  11201. }
  11202. }
  11203. },
  11204. "description": "Remove a saved permission by ID.",
  11205. "summary": "Remove saved permission",
  11206. "x-codeSamples": [
  11207. {
  11208. "lang": "js",
  11209. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11210. }
  11211. ]
  11212. }
  11213. },
  11214. "/api/fs/read": {
  11215. "get": {
  11216. "tags": ["v2 filesystem"],
  11217. "operationId": "v2.fs.read",
  11218. "parameters": [
  11219. {
  11220. "name": "location",
  11221. "in": "query",
  11222. "schema": {
  11223. "type": "object",
  11224. "properties": {
  11225. "directory": {
  11226. "type": "string"
  11227. },
  11228. "workspace": {
  11229. "type": "string"
  11230. }
  11231. },
  11232. "additionalProperties": false
  11233. },
  11234. "required": false,
  11235. "style": "deepObject",
  11236. "explode": true
  11237. },
  11238. {
  11239. "name": "path",
  11240. "in": "query",
  11241. "schema": {
  11242. "type": "string"
  11243. },
  11244. "required": true
  11245. },
  11246. {
  11247. "name": "reference",
  11248. "in": "query",
  11249. "schema": {
  11250. "type": "string"
  11251. },
  11252. "required": false
  11253. }
  11254. ],
  11255. "security": [],
  11256. "responses": {
  11257. "200": {
  11258. "description": "Success",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "type": "object",
  11263. "properties": {
  11264. "location": {
  11265. "$ref": "#/components/schemas/LocationInfo"
  11266. },
  11267. "data": {
  11268. "anyOf": [
  11269. {
  11270. "$ref": "#/components/schemas/FileSystemTextContent"
  11271. },
  11272. {
  11273. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11274. }
  11275. ]
  11276. }
  11277. },
  11278. "required": ["location", "data"],
  11279. "additionalProperties": false
  11280. }
  11281. }
  11282. }
  11283. },
  11284. "400": {
  11285. "description": "InvalidRequestError",
  11286. "content": {
  11287. "application/json": {
  11288. "schema": {
  11289. "$ref": "#/components/schemas/InvalidRequestError"
  11290. }
  11291. }
  11292. }
  11293. },
  11294. "401": {
  11295. "description": "UnauthorizedError",
  11296. "content": {
  11297. "application/json": {
  11298. "schema": {
  11299. "$ref": "#/components/schemas/UnauthorizedError"
  11300. }
  11301. }
  11302. }
  11303. }
  11304. },
  11305. "description": "Read one file relative to the requested location.",
  11306. "summary": "Read file",
  11307. "x-codeSamples": [
  11308. {
  11309. "lang": "js",
  11310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11311. }
  11312. ]
  11313. }
  11314. },
  11315. "/api/fs/list": {
  11316. "get": {
  11317. "tags": ["v2 filesystem"],
  11318. "operationId": "v2.fs.list",
  11319. "parameters": [
  11320. {
  11321. "name": "location",
  11322. "in": "query",
  11323. "schema": {
  11324. "type": "object",
  11325. "properties": {
  11326. "directory": {
  11327. "type": "string"
  11328. },
  11329. "workspace": {
  11330. "type": "string"
  11331. }
  11332. },
  11333. "additionalProperties": false
  11334. },
  11335. "required": false,
  11336. "style": "deepObject",
  11337. "explode": true
  11338. },
  11339. {
  11340. "name": "path",
  11341. "in": "query",
  11342. "schema": {
  11343. "type": "string"
  11344. },
  11345. "required": false
  11346. },
  11347. {
  11348. "name": "reference",
  11349. "in": "query",
  11350. "schema": {
  11351. "type": "string"
  11352. },
  11353. "required": false
  11354. }
  11355. ],
  11356. "security": [],
  11357. "responses": {
  11358. "200": {
  11359. "description": "Success",
  11360. "content": {
  11361. "application/json": {
  11362. "schema": {
  11363. "type": "object",
  11364. "properties": {
  11365. "location": {
  11366. "$ref": "#/components/schemas/LocationInfo"
  11367. },
  11368. "data": {
  11369. "type": "array",
  11370. "items": {
  11371. "$ref": "#/components/schemas/FileSystemEntry"
  11372. }
  11373. }
  11374. },
  11375. "required": ["location", "data"],
  11376. "additionalProperties": false
  11377. }
  11378. }
  11379. }
  11380. },
  11381. "400": {
  11382. "description": "InvalidRequestError",
  11383. "content": {
  11384. "application/json": {
  11385. "schema": {
  11386. "$ref": "#/components/schemas/InvalidRequestError"
  11387. }
  11388. }
  11389. }
  11390. },
  11391. "401": {
  11392. "description": "UnauthorizedError",
  11393. "content": {
  11394. "application/json": {
  11395. "schema": {
  11396. "$ref": "#/components/schemas/UnauthorizedError"
  11397. }
  11398. }
  11399. }
  11400. }
  11401. },
  11402. "description": "List direct children of one directory relative to the requested location.",
  11403. "summary": "List directory",
  11404. "x-codeSamples": [
  11405. {
  11406. "lang": "js",
  11407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11408. }
  11409. ]
  11410. }
  11411. },
  11412. "/api/command": {
  11413. "get": {
  11414. "tags": ["v2 commands"],
  11415. "operationId": "v2.command.list",
  11416. "parameters": [
  11417. {
  11418. "name": "location",
  11419. "in": "query",
  11420. "schema": {
  11421. "type": "object",
  11422. "properties": {
  11423. "directory": {
  11424. "type": "string"
  11425. },
  11426. "workspace": {
  11427. "type": "string"
  11428. }
  11429. },
  11430. "additionalProperties": false
  11431. },
  11432. "required": false,
  11433. "style": "deepObject",
  11434. "explode": true
  11435. }
  11436. ],
  11437. "security": [],
  11438. "responses": {
  11439. "200": {
  11440. "description": "Success",
  11441. "content": {
  11442. "application/json": {
  11443. "schema": {
  11444. "type": "object",
  11445. "properties": {
  11446. "location": {
  11447. "$ref": "#/components/schemas/LocationInfo"
  11448. },
  11449. "data": {
  11450. "type": "array",
  11451. "items": {
  11452. "$ref": "#/components/schemas/CommandV2Info"
  11453. }
  11454. }
  11455. },
  11456. "required": ["location", "data"],
  11457. "additionalProperties": false
  11458. }
  11459. }
  11460. }
  11461. },
  11462. "400": {
  11463. "description": "InvalidRequestError",
  11464. "content": {
  11465. "application/json": {
  11466. "schema": {
  11467. "$ref": "#/components/schemas/InvalidRequestError"
  11468. }
  11469. }
  11470. }
  11471. },
  11472. "401": {
  11473. "description": "UnauthorizedError",
  11474. "content": {
  11475. "application/json": {
  11476. "schema": {
  11477. "$ref": "#/components/schemas/UnauthorizedError"
  11478. }
  11479. }
  11480. }
  11481. }
  11482. },
  11483. "description": "Retrieve currently registered v2 commands.",
  11484. "summary": "List v2 commands",
  11485. "x-codeSamples": [
  11486. {
  11487. "lang": "js",
  11488. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11489. }
  11490. ]
  11491. }
  11492. },
  11493. "/api/skill": {
  11494. "get": {
  11495. "tags": ["v2 skills"],
  11496. "operationId": "v2.skill.list",
  11497. "parameters": [
  11498. {
  11499. "name": "location",
  11500. "in": "query",
  11501. "schema": {
  11502. "type": "object",
  11503. "properties": {
  11504. "directory": {
  11505. "type": "string"
  11506. },
  11507. "workspace": {
  11508. "type": "string"
  11509. }
  11510. },
  11511. "additionalProperties": false
  11512. },
  11513. "required": false,
  11514. "style": "deepObject",
  11515. "explode": true
  11516. }
  11517. ],
  11518. "security": [],
  11519. "responses": {
  11520. "200": {
  11521. "description": "Success",
  11522. "content": {
  11523. "application/json": {
  11524. "schema": {
  11525. "type": "object",
  11526. "properties": {
  11527. "location": {
  11528. "$ref": "#/components/schemas/LocationInfo"
  11529. },
  11530. "data": {
  11531. "type": "array",
  11532. "items": {
  11533. "$ref": "#/components/schemas/SkillV2Info"
  11534. }
  11535. }
  11536. },
  11537. "required": ["location", "data"],
  11538. "additionalProperties": false
  11539. }
  11540. }
  11541. }
  11542. },
  11543. "400": {
  11544. "description": "InvalidRequestError",
  11545. "content": {
  11546. "application/json": {
  11547. "schema": {
  11548. "$ref": "#/components/schemas/InvalidRequestError"
  11549. }
  11550. }
  11551. }
  11552. },
  11553. "401": {
  11554. "description": "UnauthorizedError",
  11555. "content": {
  11556. "application/json": {
  11557. "schema": {
  11558. "$ref": "#/components/schemas/UnauthorizedError"
  11559. }
  11560. }
  11561. }
  11562. }
  11563. },
  11564. "description": "Retrieve currently registered v2 skills.",
  11565. "summary": "List v2 skills",
  11566. "x-codeSamples": [
  11567. {
  11568. "lang": "js",
  11569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11570. }
  11571. ]
  11572. }
  11573. },
  11574. "/api/event": {
  11575. "get": {
  11576. "tags": ["v2 events"],
  11577. "operationId": "v2.event.subscribe",
  11578. "parameters": [
  11579. {
  11580. "name": "location",
  11581. "in": "query",
  11582. "schema": {
  11583. "type": "object",
  11584. "properties": {
  11585. "directory": {
  11586. "type": "string"
  11587. },
  11588. "workspace": {
  11589. "type": "string"
  11590. }
  11591. },
  11592. "additionalProperties": false
  11593. },
  11594. "required": false,
  11595. "style": "deepObject",
  11596. "explode": true
  11597. }
  11598. ],
  11599. "security": [],
  11600. "responses": {
  11601. "200": {
  11602. "description": "Success",
  11603. "content": {
  11604. "text/event-stream": {
  11605. "schema": {
  11606. "type": "string"
  11607. }
  11608. }
  11609. }
  11610. },
  11611. "400": {
  11612. "description": "InvalidRequestError",
  11613. "content": {
  11614. "application/json": {
  11615. "schema": {
  11616. "$ref": "#/components/schemas/InvalidRequestError"
  11617. }
  11618. }
  11619. }
  11620. },
  11621. "401": {
  11622. "description": "UnauthorizedError",
  11623. "content": {
  11624. "application/json": {
  11625. "schema": {
  11626. "$ref": "#/components/schemas/UnauthorizedError"
  11627. }
  11628. }
  11629. }
  11630. }
  11631. },
  11632. "description": "Subscribe to native EventV2 payloads for a location.",
  11633. "summary": "Subscribe to v2 events",
  11634. "x-codeSamples": [
  11635. {
  11636. "lang": "js",
  11637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11638. }
  11639. ]
  11640. }
  11641. },
  11642. "/api/question/request": {
  11643. "get": {
  11644. "tags": ["v2 questions"],
  11645. "operationId": "v2.question.request.list",
  11646. "parameters": [
  11647. {
  11648. "name": "location",
  11649. "in": "query",
  11650. "schema": {
  11651. "type": "object",
  11652. "properties": {
  11653. "directory": {
  11654. "type": "string"
  11655. },
  11656. "workspace": {
  11657. "type": "string"
  11658. }
  11659. },
  11660. "additionalProperties": false
  11661. },
  11662. "required": false,
  11663. "style": "deepObject",
  11664. "explode": true
  11665. }
  11666. ],
  11667. "security": [],
  11668. "responses": {
  11669. "200": {
  11670. "description": "Success",
  11671. "content": {
  11672. "application/json": {
  11673. "schema": {
  11674. "type": "object",
  11675. "properties": {
  11676. "location": {
  11677. "$ref": "#/components/schemas/LocationInfo"
  11678. },
  11679. "data": {
  11680. "type": "array",
  11681. "items": {
  11682. "$ref": "#/components/schemas/QuestionV2Request"
  11683. }
  11684. }
  11685. },
  11686. "required": ["location", "data"],
  11687. "additionalProperties": false
  11688. }
  11689. }
  11690. }
  11691. },
  11692. "400": {
  11693. "description": "InvalidRequestError",
  11694. "content": {
  11695. "application/json": {
  11696. "schema": {
  11697. "$ref": "#/components/schemas/InvalidRequestError"
  11698. }
  11699. }
  11700. }
  11701. },
  11702. "401": {
  11703. "description": "UnauthorizedError",
  11704. "content": {
  11705. "application/json": {
  11706. "schema": {
  11707. "$ref": "#/components/schemas/UnauthorizedError"
  11708. }
  11709. }
  11710. }
  11711. }
  11712. },
  11713. "description": "Retrieve pending question requests for a location.",
  11714. "summary": "List pending question requests",
  11715. "x-codeSamples": [
  11716. {
  11717. "lang": "js",
  11718. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11719. }
  11720. ]
  11721. }
  11722. },
  11723. "/api/session/{sessionID}/question/request/{requestID}/reply": {
  11724. "post": {
  11725. "tags": ["v2 session questions"],
  11726. "operationId": "v2.session.question.reply",
  11727. "parameters": [
  11728. {
  11729. "name": "sessionID",
  11730. "in": "path",
  11731. "schema": {
  11732. "type": "string",
  11733. "pattern": "^ses"
  11734. },
  11735. "required": true
  11736. },
  11737. {
  11738. "name": "requestID",
  11739. "in": "path",
  11740. "schema": {
  11741. "type": "string",
  11742. "pattern": "^que"
  11743. },
  11744. "required": true
  11745. }
  11746. ],
  11747. "security": [],
  11748. "responses": {
  11749. "204": {
  11750. "description": "<No Content>"
  11751. },
  11752. "400": {
  11753. "description": "InvalidRequestError",
  11754. "content": {
  11755. "application/json": {
  11756. "schema": {
  11757. "$ref": "#/components/schemas/InvalidRequestError"
  11758. }
  11759. }
  11760. }
  11761. },
  11762. "401": {
  11763. "description": "UnauthorizedError",
  11764. "content": {
  11765. "application/json": {
  11766. "schema": {
  11767. "$ref": "#/components/schemas/UnauthorizedError"
  11768. }
  11769. }
  11770. }
  11771. },
  11772. "404": {
  11773. "description": "SessionNotFoundError | QuestionNotFoundError",
  11774. "content": {
  11775. "application/json": {
  11776. "schema": {
  11777. "anyOf": [
  11778. {
  11779. "$ref": "#/components/schemas/SessionNotFoundError"
  11780. },
  11781. {
  11782. "$ref": "#/components/schemas/QuestionNotFoundError"
  11783. }
  11784. ]
  11785. }
  11786. }
  11787. }
  11788. }
  11789. },
  11790. "description": "Answer a pending question request owned by a session.",
  11791. "summary": "Reply to pending question request",
  11792. "requestBody": {
  11793. "content": {
  11794. "application/json": {
  11795. "schema": {
  11796. "$ref": "#/components/schemas/QuestionV2Reply"
  11797. }
  11798. }
  11799. },
  11800. "required": true
  11801. },
  11802. "x-codeSamples": [
  11803. {
  11804. "lang": "js",
  11805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11806. }
  11807. ]
  11808. }
  11809. },
  11810. "/api/session/{sessionID}/question/request/{requestID}/reject": {
  11811. "post": {
  11812. "tags": ["v2 session questions"],
  11813. "operationId": "v2.session.question.reject",
  11814. "parameters": [
  11815. {
  11816. "name": "sessionID",
  11817. "in": "path",
  11818. "schema": {
  11819. "type": "string",
  11820. "pattern": "^ses"
  11821. },
  11822. "required": true
  11823. },
  11824. {
  11825. "name": "requestID",
  11826. "in": "path",
  11827. "schema": {
  11828. "type": "string",
  11829. "pattern": "^que"
  11830. },
  11831. "required": true
  11832. }
  11833. ],
  11834. "security": [],
  11835. "responses": {
  11836. "204": {
  11837. "description": "<No Content>"
  11838. },
  11839. "400": {
  11840. "description": "InvalidRequestError",
  11841. "content": {
  11842. "application/json": {
  11843. "schema": {
  11844. "$ref": "#/components/schemas/InvalidRequestError"
  11845. }
  11846. }
  11847. }
  11848. },
  11849. "401": {
  11850. "description": "UnauthorizedError",
  11851. "content": {
  11852. "application/json": {
  11853. "schema": {
  11854. "$ref": "#/components/schemas/UnauthorizedError"
  11855. }
  11856. }
  11857. }
  11858. },
  11859. "404": {
  11860. "description": "SessionNotFoundError | QuestionNotFoundError",
  11861. "content": {
  11862. "application/json": {
  11863. "schema": {
  11864. "anyOf": [
  11865. {
  11866. "$ref": "#/components/schemas/SessionNotFoundError"
  11867. },
  11868. {
  11869. "$ref": "#/components/schemas/QuestionNotFoundError"
  11870. }
  11871. ]
  11872. }
  11873. }
  11874. }
  11875. }
  11876. },
  11877. "description": "Reject a pending question request owned by a session.",
  11878. "summary": "Reject pending question request",
  11879. "x-codeSamples": [
  11880. {
  11881. "lang": "js",
  11882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11883. }
  11884. ]
  11885. }
  11886. },
  11887. "/pty/{ptyID}/connect": {
  11888. "get": {
  11889. "tags": ["pty"],
  11890. "operationId": "pty.connect",
  11891. "parameters": [
  11892. {
  11893. "name": "ptyID",
  11894. "in": "path",
  11895. "schema": {
  11896. "type": "string",
  11897. "pattern": "^pty"
  11898. },
  11899. "required": true
  11900. },
  11901. {
  11902. "in": "query",
  11903. "name": "directory",
  11904. "schema": {
  11905. "type": "string"
  11906. }
  11907. },
  11908. {
  11909. "in": "query",
  11910. "name": "workspace",
  11911. "schema": {
  11912. "type": "string"
  11913. }
  11914. },
  11915. {
  11916. "in": "query",
  11917. "name": "cursor",
  11918. "schema": {
  11919. "type": "string"
  11920. }
  11921. },
  11922. {
  11923. "in": "query",
  11924. "name": "ticket",
  11925. "schema": {
  11926. "type": "string"
  11927. }
  11928. }
  11929. ],
  11930. "responses": {
  11931. "200": {
  11932. "description": "Connected session",
  11933. "content": {
  11934. "application/json": {
  11935. "schema": {
  11936. "type": "boolean",
  11937. "description": "Connected session"
  11938. }
  11939. }
  11940. }
  11941. },
  11942. "403": {
  11943. "description": "Forbidden",
  11944. "content": {
  11945. "application/json": {
  11946. "schema": {
  11947. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  11948. }
  11949. }
  11950. }
  11951. },
  11952. "404": {
  11953. "description": "Not found",
  11954. "content": {
  11955. "application/json": {
  11956. "schema": {
  11957. "$ref": "#/components/schemas/NotFoundError"
  11958. }
  11959. }
  11960. }
  11961. }
  11962. },
  11963. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  11964. "summary": "Connect to PTY session",
  11965. "x-codeSamples": [
  11966. {
  11967. "lang": "js",
  11968. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  11969. }
  11970. ]
  11971. }
  11972. }
  11973. },
  11974. "components": {
  11975. "schemas": {
  11976. "Event": {
  11977. "anyOf": [
  11978. {
  11979. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11980. },
  11981. {
  11982. "$ref": "#/components/schemas/EventPluginAdded"
  11983. },
  11984. {
  11985. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11986. },
  11987. {
  11988. "$ref": "#/components/schemas/EventSessionCreated"
  11989. },
  11990. {
  11991. "$ref": "#/components/schemas/EventSessionUpdated"
  11992. },
  11993. {
  11994. "$ref": "#/components/schemas/EventSessionDeleted"
  11995. },
  11996. {
  11997. "$ref": "#/components/schemas/EventMessageUpdated"
  11998. },
  11999. {
  12000. "$ref": "#/components/schemas/EventMessageRemoved"
  12001. },
  12002. {
  12003. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12004. },
  12005. {
  12006. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12007. },
  12008. {
  12009. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12010. },
  12011. {
  12012. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12013. },
  12014. {
  12015. "$ref": "#/components/schemas/EventSessionNextMoved"
  12016. },
  12017. {
  12018. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12019. },
  12020. {
  12021. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12022. },
  12023. {
  12024. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12025. },
  12026. {
  12027. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12028. },
  12029. {
  12030. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12031. },
  12032. {
  12033. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12034. },
  12035. {
  12036. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12037. },
  12038. {
  12039. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12040. },
  12041. {
  12042. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12043. },
  12044. {
  12045. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12046. },
  12047. {
  12048. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12049. },
  12050. {
  12051. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12052. },
  12053. {
  12054. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12055. },
  12056. {
  12057. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12058. },
  12059. {
  12060. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12061. },
  12062. {
  12063. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12064. },
  12065. {
  12066. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12067. },
  12068. {
  12069. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12070. },
  12071. {
  12072. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12073. },
  12074. {
  12075. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12076. },
  12077. {
  12078. "$ref": "#/components/schemas/EventSessionNextRetried"
  12079. },
  12080. {
  12081. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12082. },
  12083. {
  12084. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12085. },
  12086. {
  12087. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12088. },
  12089. {
  12090. "$ref": "#/components/schemas/EventMessagePartDelta"
  12091. },
  12092. {
  12093. "$ref": "#/components/schemas/EventSessionDiff"
  12094. },
  12095. {
  12096. "$ref": "#/components/schemas/EventSessionError"
  12097. },
  12098. {
  12099. "$ref": "#/components/schemas/EventInstallationUpdated"
  12100. },
  12101. {
  12102. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12103. },
  12104. {
  12105. "$ref": "#/components/schemas/EventFileEdited"
  12106. },
  12107. {
  12108. "$ref": "#/components/schemas/EventAccountAdded"
  12109. },
  12110. {
  12111. "$ref": "#/components/schemas/EventAccountRemoved"
  12112. },
  12113. {
  12114. "$ref": "#/components/schemas/EventAccountSwitched"
  12115. },
  12116. {
  12117. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12118. },
  12119. {
  12120. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12121. },
  12122. {
  12123. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12124. },
  12125. {
  12126. "$ref": "#/components/schemas/EventPtyCreated"
  12127. },
  12128. {
  12129. "$ref": "#/components/schemas/EventPtyUpdated"
  12130. },
  12131. {
  12132. "$ref": "#/components/schemas/EventPtyExited"
  12133. },
  12134. {
  12135. "$ref": "#/components/schemas/EventPtyDeleted"
  12136. },
  12137. {
  12138. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12139. },
  12140. {
  12141. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12142. },
  12143. {
  12144. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12145. },
  12146. {
  12147. "$ref": "#/components/schemas/EventTodoUpdated"
  12148. },
  12149. {
  12150. "$ref": "#/components/schemas/EventLspUpdated"
  12151. },
  12152. {
  12153. "$ref": "#/components/schemas/EventPermissionAsked"
  12154. },
  12155. {
  12156. "$ref": "#/components/schemas/EventPermissionReplied"
  12157. },
  12158. {
  12159. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12160. },
  12161. {
  12162. "$ref": "#/components/schemas/Event.tui.command.execute"
  12163. },
  12164. {
  12165. "$ref": "#/components/schemas/Event.tui.toast.show"
  12166. },
  12167. {
  12168. "$ref": "#/components/schemas/Event.tui.session.select"
  12169. },
  12170. {
  12171. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12172. },
  12173. {
  12174. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12175. },
  12176. {
  12177. "$ref": "#/components/schemas/EventCommandExecuted"
  12178. },
  12179. {
  12180. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12181. },
  12182. {
  12183. "$ref": "#/components/schemas/EventProjectUpdated"
  12184. },
  12185. {
  12186. "$ref": "#/components/schemas/EventQuestionAsked"
  12187. },
  12188. {
  12189. "$ref": "#/components/schemas/EventQuestionReplied"
  12190. },
  12191. {
  12192. "$ref": "#/components/schemas/EventQuestionRejected"
  12193. },
  12194. {
  12195. "$ref": "#/components/schemas/EventSessionStatus"
  12196. },
  12197. {
  12198. "$ref": "#/components/schemas/EventSessionIdle"
  12199. },
  12200. {
  12201. "$ref": "#/components/schemas/EventSessionCompacted"
  12202. },
  12203. {
  12204. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12205. },
  12206. {
  12207. "$ref": "#/components/schemas/EventWorktreeReady"
  12208. },
  12209. {
  12210. "$ref": "#/components/schemas/EventWorktreeFailed"
  12211. },
  12212. {
  12213. "$ref": "#/components/schemas/EventWorkspaceReady"
  12214. },
  12215. {
  12216. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12217. },
  12218. {
  12219. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12220. },
  12221. {
  12222. "$ref": "#/components/schemas/EventServerConnected"
  12223. },
  12224. {
  12225. "$ref": "#/components/schemas/EventGlobalDisposed"
  12226. },
  12227. {
  12228. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12229. }
  12230. ]
  12231. },
  12232. "QuestionReplied": {
  12233. "type": "object",
  12234. "properties": {
  12235. "sessionID": {
  12236. "type": "string",
  12237. "pattern": "^ses"
  12238. },
  12239. "requestID": {
  12240. "type": "string",
  12241. "pattern": "^que"
  12242. },
  12243. "answers": {
  12244. "type": "array",
  12245. "items": {
  12246. "$ref": "#/components/schemas/QuestionAnswer"
  12247. }
  12248. }
  12249. },
  12250. "required": ["sessionID", "requestID", "answers"],
  12251. "additionalProperties": false
  12252. },
  12253. "QuestionRejected": {
  12254. "type": "object",
  12255. "properties": {
  12256. "sessionID": {
  12257. "type": "string",
  12258. "pattern": "^ses"
  12259. },
  12260. "requestID": {
  12261. "type": "string",
  12262. "pattern": "^que"
  12263. }
  12264. },
  12265. "required": ["sessionID", "requestID"],
  12266. "additionalProperties": false
  12267. },
  12268. "OAuth": {
  12269. "type": "object",
  12270. "properties": {
  12271. "type": {
  12272. "type": "string",
  12273. "enum": ["oauth"]
  12274. },
  12275. "refresh": {
  12276. "type": "string"
  12277. },
  12278. "access": {
  12279. "type": "string"
  12280. },
  12281. "expires": {
  12282. "type": "integer",
  12283. "minimum": 0
  12284. },
  12285. "accountId": {
  12286. "type": "string"
  12287. },
  12288. "enterpriseUrl": {
  12289. "type": "string"
  12290. }
  12291. },
  12292. "required": ["type", "refresh", "access", "expires"],
  12293. "additionalProperties": false
  12294. },
  12295. "ApiAuth": {
  12296. "type": "object",
  12297. "properties": {
  12298. "type": {
  12299. "type": "string",
  12300. "enum": ["api"]
  12301. },
  12302. "key": {
  12303. "type": "string"
  12304. },
  12305. "metadata": {
  12306. "type": "object",
  12307. "additionalProperties": {
  12308. "type": "string"
  12309. }
  12310. }
  12311. },
  12312. "required": ["type", "key"],
  12313. "additionalProperties": false
  12314. },
  12315. "WellKnownAuth": {
  12316. "type": "object",
  12317. "properties": {
  12318. "type": {
  12319. "type": "string",
  12320. "enum": ["wellknown"]
  12321. },
  12322. "key": {
  12323. "type": "string"
  12324. },
  12325. "token": {
  12326. "type": "string"
  12327. }
  12328. },
  12329. "required": ["type", "key", "token"],
  12330. "additionalProperties": false
  12331. },
  12332. "Auth": {
  12333. "anyOf": [
  12334. {
  12335. "$ref": "#/components/schemas/OAuth"
  12336. },
  12337. {
  12338. "$ref": "#/components/schemas/ApiAuth"
  12339. },
  12340. {
  12341. "$ref": "#/components/schemas/WellKnownAuth"
  12342. }
  12343. ]
  12344. },
  12345. "effect_HttpApiError_BadRequest": {
  12346. "type": "object",
  12347. "properties": {
  12348. "_tag": {
  12349. "type": "string",
  12350. "enum": ["BadRequest"]
  12351. }
  12352. },
  12353. "required": ["_tag"],
  12354. "additionalProperties": false
  12355. },
  12356. "InvalidRequestError": {
  12357. "type": "object",
  12358. "properties": {
  12359. "_tag": {
  12360. "type": "string",
  12361. "enum": ["InvalidRequestError"]
  12362. },
  12363. "message": {
  12364. "type": "string"
  12365. },
  12366. "kind": {
  12367. "type": "string"
  12368. },
  12369. "field": {
  12370. "type": "string"
  12371. }
  12372. },
  12373. "required": ["_tag", "message"],
  12374. "additionalProperties": false
  12375. },
  12376. "MoveSessionError": {
  12377. "type": "object",
  12378. "properties": {
  12379. "name": {
  12380. "type": "string",
  12381. "enum": ["MoveSessionError"]
  12382. },
  12383. "data": {
  12384. "type": "object",
  12385. "properties": {
  12386. "message": {
  12387. "type": "string"
  12388. }
  12389. },
  12390. "required": ["message"],
  12391. "additionalProperties": false
  12392. }
  12393. },
  12394. "required": ["name", "data"],
  12395. "additionalProperties": false
  12396. },
  12397. "SnapshotFileDiff": {
  12398. "type": "object",
  12399. "properties": {
  12400. "file": {
  12401. "type": "string"
  12402. },
  12403. "patch": {
  12404. "type": "string"
  12405. },
  12406. "additions": {
  12407. "type": "number"
  12408. },
  12409. "deletions": {
  12410. "type": "number"
  12411. },
  12412. "status": {
  12413. "type": "string",
  12414. "enum": ["added", "deleted", "modified"]
  12415. }
  12416. },
  12417. "required": ["additions", "deletions"],
  12418. "additionalProperties": false
  12419. },
  12420. "PermissionAction": {
  12421. "type": "string",
  12422. "enum": ["allow", "deny", "ask"]
  12423. },
  12424. "PermissionRule": {
  12425. "type": "object",
  12426. "properties": {
  12427. "permission": {
  12428. "type": "string"
  12429. },
  12430. "pattern": {
  12431. "type": "string"
  12432. },
  12433. "action": {
  12434. "$ref": "#/components/schemas/PermissionAction"
  12435. }
  12436. },
  12437. "required": ["permission", "pattern", "action"],
  12438. "additionalProperties": false
  12439. },
  12440. "PermissionRuleset": {
  12441. "type": "array",
  12442. "items": {
  12443. "$ref": "#/components/schemas/PermissionRule"
  12444. }
  12445. },
  12446. "Session": {
  12447. "type": "object",
  12448. "properties": {
  12449. "id": {
  12450. "type": "string",
  12451. "pattern": "^ses"
  12452. },
  12453. "slug": {
  12454. "type": "string"
  12455. },
  12456. "projectID": {
  12457. "type": "string"
  12458. },
  12459. "workspaceID": {
  12460. "type": "string",
  12461. "pattern": "^wrk"
  12462. },
  12463. "directory": {
  12464. "type": "string"
  12465. },
  12466. "path": {
  12467. "type": "string"
  12468. },
  12469. "parentID": {
  12470. "type": "string",
  12471. "pattern": "^ses"
  12472. },
  12473. "summary": {
  12474. "type": "object",
  12475. "properties": {
  12476. "additions": {
  12477. "type": "number"
  12478. },
  12479. "deletions": {
  12480. "type": "number"
  12481. },
  12482. "files": {
  12483. "type": "number"
  12484. },
  12485. "diffs": {
  12486. "type": "array",
  12487. "items": {
  12488. "$ref": "#/components/schemas/SnapshotFileDiff"
  12489. }
  12490. }
  12491. },
  12492. "required": ["additions", "deletions", "files"],
  12493. "additionalProperties": false
  12494. },
  12495. "cost": {
  12496. "type": "number"
  12497. },
  12498. "tokens": {
  12499. "type": "object",
  12500. "properties": {
  12501. "input": {
  12502. "type": "number"
  12503. },
  12504. "output": {
  12505. "type": "number"
  12506. },
  12507. "reasoning": {
  12508. "type": "number"
  12509. },
  12510. "cache": {
  12511. "type": "object",
  12512. "properties": {
  12513. "read": {
  12514. "type": "number"
  12515. },
  12516. "write": {
  12517. "type": "number"
  12518. }
  12519. },
  12520. "required": ["read", "write"],
  12521. "additionalProperties": false
  12522. }
  12523. },
  12524. "required": ["input", "output", "reasoning", "cache"],
  12525. "additionalProperties": false
  12526. },
  12527. "share": {
  12528. "type": "object",
  12529. "properties": {
  12530. "url": {
  12531. "type": "string"
  12532. }
  12533. },
  12534. "required": ["url"],
  12535. "additionalProperties": false
  12536. },
  12537. "title": {
  12538. "type": "string"
  12539. },
  12540. "agent": {
  12541. "type": "string"
  12542. },
  12543. "model": {
  12544. "type": "object",
  12545. "properties": {
  12546. "id": {
  12547. "type": "string"
  12548. },
  12549. "providerID": {
  12550. "type": "string"
  12551. },
  12552. "variant": {
  12553. "type": "string"
  12554. }
  12555. },
  12556. "required": ["id", "providerID"],
  12557. "additionalProperties": false
  12558. },
  12559. "version": {
  12560. "type": "string"
  12561. },
  12562. "metadata": {
  12563. "type": "object"
  12564. },
  12565. "time": {
  12566. "type": "object",
  12567. "properties": {
  12568. "created": {
  12569. "type": "integer",
  12570. "minimum": 0
  12571. },
  12572. "updated": {
  12573. "type": "integer",
  12574. "minimum": 0
  12575. },
  12576. "compacting": {
  12577. "type": "integer",
  12578. "minimum": 0
  12579. },
  12580. "archived": {
  12581. "type": "number"
  12582. }
  12583. },
  12584. "required": ["created", "updated"],
  12585. "additionalProperties": false
  12586. },
  12587. "permission": {
  12588. "$ref": "#/components/schemas/PermissionRuleset"
  12589. },
  12590. "revert": {
  12591. "type": "object",
  12592. "properties": {
  12593. "messageID": {
  12594. "type": "string",
  12595. "pattern": "^msg"
  12596. },
  12597. "partID": {
  12598. "type": "string",
  12599. "pattern": "^prt"
  12600. },
  12601. "snapshot": {
  12602. "type": "string"
  12603. },
  12604. "diff": {
  12605. "type": "string"
  12606. }
  12607. },
  12608. "required": ["messageID"],
  12609. "additionalProperties": false
  12610. }
  12611. },
  12612. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12613. "additionalProperties": false
  12614. },
  12615. "OutputFormatText": {
  12616. "type": "object",
  12617. "properties": {
  12618. "type": {
  12619. "type": "string",
  12620. "enum": ["text"]
  12621. }
  12622. },
  12623. "required": ["type"],
  12624. "additionalProperties": false
  12625. },
  12626. "JSONSchema": {
  12627. "type": "object"
  12628. },
  12629. "OutputFormatJsonSchema": {
  12630. "type": "object",
  12631. "properties": {
  12632. "type": {
  12633. "type": "string",
  12634. "enum": ["json_schema"]
  12635. },
  12636. "schema": {
  12637. "$ref": "#/components/schemas/JSONSchema"
  12638. },
  12639. "retryCount": {
  12640. "type": "integer",
  12641. "minimum": 0
  12642. }
  12643. },
  12644. "required": ["type", "schema"],
  12645. "additionalProperties": false
  12646. },
  12647. "OutputFormat": {
  12648. "anyOf": [
  12649. {
  12650. "$ref": "#/components/schemas/OutputFormatText"
  12651. },
  12652. {
  12653. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12654. }
  12655. ]
  12656. },
  12657. "UserMessage": {
  12658. "type": "object",
  12659. "properties": {
  12660. "id": {
  12661. "type": "string",
  12662. "pattern": "^msg"
  12663. },
  12664. "sessionID": {
  12665. "type": "string",
  12666. "pattern": "^ses"
  12667. },
  12668. "role": {
  12669. "type": "string",
  12670. "enum": ["user"]
  12671. },
  12672. "time": {
  12673. "type": "object",
  12674. "properties": {
  12675. "created": {
  12676. "type": "number",
  12677. "minimum": 0
  12678. }
  12679. },
  12680. "required": ["created"],
  12681. "additionalProperties": false
  12682. },
  12683. "format": {
  12684. "$ref": "#/components/schemas/OutputFormat"
  12685. },
  12686. "summary": {
  12687. "type": "object",
  12688. "properties": {
  12689. "title": {
  12690. "type": "string"
  12691. },
  12692. "body": {
  12693. "type": "string"
  12694. },
  12695. "diffs": {
  12696. "type": "array",
  12697. "items": {
  12698. "$ref": "#/components/schemas/SnapshotFileDiff"
  12699. }
  12700. }
  12701. },
  12702. "required": ["diffs"],
  12703. "additionalProperties": false
  12704. },
  12705. "agent": {
  12706. "type": "string"
  12707. },
  12708. "model": {
  12709. "type": "object",
  12710. "properties": {
  12711. "providerID": {
  12712. "type": "string"
  12713. },
  12714. "modelID": {
  12715. "type": "string"
  12716. },
  12717. "variant": {
  12718. "type": "string"
  12719. }
  12720. },
  12721. "required": ["providerID", "modelID"],
  12722. "additionalProperties": false
  12723. },
  12724. "system": {
  12725. "type": "string"
  12726. },
  12727. "tools": {
  12728. "type": "object",
  12729. "additionalProperties": {
  12730. "type": "boolean"
  12731. }
  12732. }
  12733. },
  12734. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12735. "additionalProperties": false
  12736. },
  12737. "ProviderAuthError": {
  12738. "type": "object",
  12739. "properties": {
  12740. "name": {
  12741. "type": "string",
  12742. "enum": ["ProviderAuthError"]
  12743. },
  12744. "data": {
  12745. "type": "object",
  12746. "properties": {
  12747. "providerID": {
  12748. "type": "string"
  12749. },
  12750. "message": {
  12751. "type": "string"
  12752. }
  12753. },
  12754. "required": ["providerID", "message"],
  12755. "additionalProperties": false
  12756. }
  12757. },
  12758. "required": ["name", "data"],
  12759. "additionalProperties": false
  12760. },
  12761. "UnknownError": {
  12762. "type": "object",
  12763. "properties": {
  12764. "name": {
  12765. "type": "string",
  12766. "enum": ["UnknownError"]
  12767. },
  12768. "data": {
  12769. "type": "object",
  12770. "properties": {
  12771. "message": {
  12772. "type": "string"
  12773. },
  12774. "ref": {
  12775. "type": "string"
  12776. }
  12777. },
  12778. "required": ["message"],
  12779. "additionalProperties": false
  12780. }
  12781. },
  12782. "required": ["name", "data"],
  12783. "additionalProperties": false
  12784. },
  12785. "MessageOutputLengthError": {
  12786. "type": "object",
  12787. "properties": {
  12788. "name": {
  12789. "type": "string",
  12790. "enum": ["MessageOutputLengthError"]
  12791. },
  12792. "data": {
  12793. "type": "object",
  12794. "properties": {}
  12795. }
  12796. },
  12797. "required": ["name", "data"],
  12798. "additionalProperties": false
  12799. },
  12800. "MessageAbortedError": {
  12801. "type": "object",
  12802. "properties": {
  12803. "name": {
  12804. "type": "string",
  12805. "enum": ["MessageAbortedError"]
  12806. },
  12807. "data": {
  12808. "type": "object",
  12809. "properties": {
  12810. "message": {
  12811. "type": "string"
  12812. }
  12813. },
  12814. "required": ["message"],
  12815. "additionalProperties": false
  12816. }
  12817. },
  12818. "required": ["name", "data"],
  12819. "additionalProperties": false
  12820. },
  12821. "StructuredOutputError": {
  12822. "type": "object",
  12823. "properties": {
  12824. "name": {
  12825. "type": "string",
  12826. "enum": ["StructuredOutputError"]
  12827. },
  12828. "data": {
  12829. "type": "object",
  12830. "properties": {
  12831. "message": {
  12832. "type": "string"
  12833. },
  12834. "retries": {
  12835. "type": "integer",
  12836. "minimum": 0
  12837. }
  12838. },
  12839. "required": ["message", "retries"],
  12840. "additionalProperties": false
  12841. }
  12842. },
  12843. "required": ["name", "data"],
  12844. "additionalProperties": false
  12845. },
  12846. "ContextOverflowError": {
  12847. "type": "object",
  12848. "properties": {
  12849. "name": {
  12850. "type": "string",
  12851. "enum": ["ContextOverflowError"]
  12852. },
  12853. "data": {
  12854. "type": "object",
  12855. "properties": {
  12856. "message": {
  12857. "type": "string"
  12858. },
  12859. "responseBody": {
  12860. "type": "string"
  12861. }
  12862. },
  12863. "required": ["message"],
  12864. "additionalProperties": false
  12865. }
  12866. },
  12867. "required": ["name", "data"],
  12868. "additionalProperties": false
  12869. },
  12870. "APIError": {
  12871. "type": "object",
  12872. "properties": {
  12873. "name": {
  12874. "type": "string",
  12875. "enum": ["APIError"]
  12876. },
  12877. "data": {
  12878. "type": "object",
  12879. "properties": {
  12880. "message": {
  12881. "type": "string"
  12882. },
  12883. "statusCode": {
  12884. "type": "integer",
  12885. "minimum": 0
  12886. },
  12887. "isRetryable": {
  12888. "type": "boolean"
  12889. },
  12890. "responseHeaders": {
  12891. "type": "object",
  12892. "additionalProperties": {
  12893. "type": "string"
  12894. }
  12895. },
  12896. "responseBody": {
  12897. "type": "string"
  12898. },
  12899. "metadata": {
  12900. "type": "object",
  12901. "additionalProperties": {
  12902. "type": "string"
  12903. }
  12904. }
  12905. },
  12906. "required": ["message", "isRetryable"],
  12907. "additionalProperties": false
  12908. }
  12909. },
  12910. "required": ["name", "data"],
  12911. "additionalProperties": false
  12912. },
  12913. "AssistantMessage": {
  12914. "type": "object",
  12915. "properties": {
  12916. "id": {
  12917. "type": "string",
  12918. "pattern": "^msg"
  12919. },
  12920. "sessionID": {
  12921. "type": "string",
  12922. "pattern": "^ses"
  12923. },
  12924. "role": {
  12925. "type": "string",
  12926. "enum": ["assistant"]
  12927. },
  12928. "time": {
  12929. "type": "object",
  12930. "properties": {
  12931. "created": {
  12932. "type": "integer",
  12933. "minimum": 0
  12934. },
  12935. "completed": {
  12936. "type": "integer",
  12937. "minimum": 0
  12938. }
  12939. },
  12940. "required": ["created"],
  12941. "additionalProperties": false
  12942. },
  12943. "error": {
  12944. "anyOf": [
  12945. {
  12946. "$ref": "#/components/schemas/ProviderAuthError"
  12947. },
  12948. {
  12949. "$ref": "#/components/schemas/UnknownError"
  12950. },
  12951. {
  12952. "$ref": "#/components/schemas/MessageOutputLengthError"
  12953. },
  12954. {
  12955. "$ref": "#/components/schemas/MessageAbortedError"
  12956. },
  12957. {
  12958. "$ref": "#/components/schemas/StructuredOutputError"
  12959. },
  12960. {
  12961. "$ref": "#/components/schemas/ContextOverflowError"
  12962. },
  12963. {
  12964. "$ref": "#/components/schemas/APIError"
  12965. }
  12966. ]
  12967. },
  12968. "parentID": {
  12969. "type": "string",
  12970. "pattern": "^msg"
  12971. },
  12972. "modelID": {
  12973. "type": "string"
  12974. },
  12975. "providerID": {
  12976. "type": "string"
  12977. },
  12978. "mode": {
  12979. "type": "string"
  12980. },
  12981. "agent": {
  12982. "type": "string"
  12983. },
  12984. "path": {
  12985. "type": "object",
  12986. "properties": {
  12987. "cwd": {
  12988. "type": "string"
  12989. },
  12990. "root": {
  12991. "type": "string"
  12992. }
  12993. },
  12994. "required": ["cwd", "root"],
  12995. "additionalProperties": false
  12996. },
  12997. "summary": {
  12998. "type": "boolean"
  12999. },
  13000. "cost": {
  13001. "type": "number"
  13002. },
  13003. "tokens": {
  13004. "type": "object",
  13005. "properties": {
  13006. "total": {
  13007. "type": "number"
  13008. },
  13009. "input": {
  13010. "type": "number"
  13011. },
  13012. "output": {
  13013. "type": "number"
  13014. },
  13015. "reasoning": {
  13016. "type": "number"
  13017. },
  13018. "cache": {
  13019. "type": "object",
  13020. "properties": {
  13021. "read": {
  13022. "type": "number"
  13023. },
  13024. "write": {
  13025. "type": "number"
  13026. }
  13027. },
  13028. "required": ["read", "write"],
  13029. "additionalProperties": false
  13030. }
  13031. },
  13032. "required": ["input", "output", "reasoning", "cache"],
  13033. "additionalProperties": false
  13034. },
  13035. "structured": {},
  13036. "variant": {
  13037. "type": "string"
  13038. },
  13039. "finish": {
  13040. "type": "string"
  13041. }
  13042. },
  13043. "required": [
  13044. "id",
  13045. "sessionID",
  13046. "role",
  13047. "time",
  13048. "parentID",
  13049. "modelID",
  13050. "providerID",
  13051. "mode",
  13052. "agent",
  13053. "path",
  13054. "cost",
  13055. "tokens"
  13056. ],
  13057. "additionalProperties": false
  13058. },
  13059. "Message": {
  13060. "anyOf": [
  13061. {
  13062. "$ref": "#/components/schemas/UserMessage"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/AssistantMessage"
  13066. }
  13067. ]
  13068. },
  13069. "TextPart": {
  13070. "type": "object",
  13071. "properties": {
  13072. "id": {
  13073. "type": "string",
  13074. "pattern": "^prt"
  13075. },
  13076. "sessionID": {
  13077. "type": "string",
  13078. "pattern": "^ses"
  13079. },
  13080. "messageID": {
  13081. "type": "string",
  13082. "pattern": "^msg"
  13083. },
  13084. "type": {
  13085. "type": "string",
  13086. "enum": ["text"]
  13087. },
  13088. "text": {
  13089. "type": "string"
  13090. },
  13091. "synthetic": {
  13092. "type": "boolean"
  13093. },
  13094. "ignored": {
  13095. "type": "boolean"
  13096. },
  13097. "time": {
  13098. "type": "object",
  13099. "properties": {
  13100. "start": {
  13101. "type": "integer",
  13102. "minimum": 0
  13103. },
  13104. "end": {
  13105. "type": "integer",
  13106. "minimum": 0
  13107. }
  13108. },
  13109. "required": ["start"],
  13110. "additionalProperties": false
  13111. },
  13112. "metadata": {
  13113. "type": "object"
  13114. }
  13115. },
  13116. "required": ["id", "sessionID", "messageID", "type", "text"],
  13117. "additionalProperties": false
  13118. },
  13119. "SubtaskPart": {
  13120. "type": "object",
  13121. "properties": {
  13122. "id": {
  13123. "type": "string",
  13124. "pattern": "^prt"
  13125. },
  13126. "sessionID": {
  13127. "type": "string",
  13128. "pattern": "^ses"
  13129. },
  13130. "messageID": {
  13131. "type": "string",
  13132. "pattern": "^msg"
  13133. },
  13134. "type": {
  13135. "type": "string",
  13136. "enum": ["subtask"]
  13137. },
  13138. "prompt": {
  13139. "type": "string"
  13140. },
  13141. "description": {
  13142. "type": "string"
  13143. },
  13144. "agent": {
  13145. "type": "string"
  13146. },
  13147. "model": {
  13148. "type": "object",
  13149. "properties": {
  13150. "providerID": {
  13151. "type": "string"
  13152. },
  13153. "modelID": {
  13154. "type": "string"
  13155. }
  13156. },
  13157. "required": ["providerID", "modelID"],
  13158. "additionalProperties": false
  13159. },
  13160. "command": {
  13161. "type": "string"
  13162. }
  13163. },
  13164. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13165. "additionalProperties": false
  13166. },
  13167. "ReasoningPart": {
  13168. "type": "object",
  13169. "properties": {
  13170. "id": {
  13171. "type": "string",
  13172. "pattern": "^prt"
  13173. },
  13174. "sessionID": {
  13175. "type": "string",
  13176. "pattern": "^ses"
  13177. },
  13178. "messageID": {
  13179. "type": "string",
  13180. "pattern": "^msg"
  13181. },
  13182. "type": {
  13183. "type": "string",
  13184. "enum": ["reasoning"]
  13185. },
  13186. "text": {
  13187. "type": "string"
  13188. },
  13189. "metadata": {
  13190. "type": "object"
  13191. },
  13192. "time": {
  13193. "type": "object",
  13194. "properties": {
  13195. "start": {
  13196. "type": "integer",
  13197. "minimum": 0
  13198. },
  13199. "end": {
  13200. "type": "integer",
  13201. "minimum": 0
  13202. }
  13203. },
  13204. "required": ["start"],
  13205. "additionalProperties": false
  13206. }
  13207. },
  13208. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13209. "additionalProperties": false
  13210. },
  13211. "FilePartSourceText": {
  13212. "type": "object",
  13213. "properties": {
  13214. "value": {
  13215. "type": "string"
  13216. },
  13217. "start": {
  13218. "type": "number"
  13219. },
  13220. "end": {
  13221. "type": "number"
  13222. }
  13223. },
  13224. "required": ["value", "start", "end"],
  13225. "additionalProperties": false
  13226. },
  13227. "FileSource": {
  13228. "type": "object",
  13229. "properties": {
  13230. "text": {
  13231. "$ref": "#/components/schemas/FilePartSourceText"
  13232. },
  13233. "type": {
  13234. "type": "string",
  13235. "enum": ["file"]
  13236. },
  13237. "path": {
  13238. "type": "string"
  13239. }
  13240. },
  13241. "required": ["text", "type", "path"],
  13242. "additionalProperties": false
  13243. },
  13244. "Range": {
  13245. "type": "object",
  13246. "properties": {
  13247. "start": {
  13248. "type": "object",
  13249. "properties": {
  13250. "line": {
  13251. "type": "integer",
  13252. "minimum": 0
  13253. },
  13254. "character": {
  13255. "type": "integer",
  13256. "minimum": 0
  13257. }
  13258. },
  13259. "required": ["line", "character"],
  13260. "additionalProperties": false
  13261. },
  13262. "end": {
  13263. "type": "object",
  13264. "properties": {
  13265. "line": {
  13266. "type": "integer",
  13267. "minimum": 0
  13268. },
  13269. "character": {
  13270. "type": "integer",
  13271. "minimum": 0
  13272. }
  13273. },
  13274. "required": ["line", "character"],
  13275. "additionalProperties": false
  13276. }
  13277. },
  13278. "required": ["start", "end"],
  13279. "additionalProperties": false
  13280. },
  13281. "SymbolSource": {
  13282. "type": "object",
  13283. "properties": {
  13284. "text": {
  13285. "$ref": "#/components/schemas/FilePartSourceText"
  13286. },
  13287. "type": {
  13288. "type": "string",
  13289. "enum": ["symbol"]
  13290. },
  13291. "path": {
  13292. "type": "string"
  13293. },
  13294. "range": {
  13295. "$ref": "#/components/schemas/Range"
  13296. },
  13297. "name": {
  13298. "type": "string"
  13299. },
  13300. "kind": {
  13301. "type": "integer",
  13302. "minimum": 0
  13303. }
  13304. },
  13305. "required": ["text", "type", "path", "range", "name", "kind"],
  13306. "additionalProperties": false
  13307. },
  13308. "ResourceSource": {
  13309. "type": "object",
  13310. "properties": {
  13311. "text": {
  13312. "$ref": "#/components/schemas/FilePartSourceText"
  13313. },
  13314. "type": {
  13315. "type": "string",
  13316. "enum": ["resource"]
  13317. },
  13318. "clientName": {
  13319. "type": "string"
  13320. },
  13321. "uri": {
  13322. "type": "string"
  13323. }
  13324. },
  13325. "required": ["text", "type", "clientName", "uri"],
  13326. "additionalProperties": false
  13327. },
  13328. "FilePartSource": {
  13329. "anyOf": [
  13330. {
  13331. "$ref": "#/components/schemas/FileSource"
  13332. },
  13333. {
  13334. "$ref": "#/components/schemas/SymbolSource"
  13335. },
  13336. {
  13337. "$ref": "#/components/schemas/ResourceSource"
  13338. }
  13339. ]
  13340. },
  13341. "FilePart": {
  13342. "type": "object",
  13343. "properties": {
  13344. "id": {
  13345. "type": "string",
  13346. "pattern": "^prt"
  13347. },
  13348. "sessionID": {
  13349. "type": "string",
  13350. "pattern": "^ses"
  13351. },
  13352. "messageID": {
  13353. "type": "string",
  13354. "pattern": "^msg"
  13355. },
  13356. "type": {
  13357. "type": "string",
  13358. "enum": ["file"]
  13359. },
  13360. "mime": {
  13361. "type": "string"
  13362. },
  13363. "filename": {
  13364. "type": "string"
  13365. },
  13366. "url": {
  13367. "type": "string"
  13368. },
  13369. "source": {
  13370. "$ref": "#/components/schemas/FilePartSource"
  13371. }
  13372. },
  13373. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13374. "additionalProperties": false
  13375. },
  13376. "ToolStatePending": {
  13377. "type": "object",
  13378. "properties": {
  13379. "status": {
  13380. "type": "string",
  13381. "enum": ["pending"]
  13382. },
  13383. "input": {
  13384. "type": "object"
  13385. },
  13386. "raw": {
  13387. "type": "string"
  13388. }
  13389. },
  13390. "required": ["status", "input", "raw"],
  13391. "additionalProperties": false
  13392. },
  13393. "ToolStateRunning": {
  13394. "type": "object",
  13395. "properties": {
  13396. "status": {
  13397. "type": "string",
  13398. "enum": ["running"]
  13399. },
  13400. "input": {
  13401. "type": "object"
  13402. },
  13403. "title": {
  13404. "type": "string"
  13405. },
  13406. "metadata": {
  13407. "type": "object"
  13408. },
  13409. "time": {
  13410. "type": "object",
  13411. "properties": {
  13412. "start": {
  13413. "type": "integer",
  13414. "minimum": 0
  13415. }
  13416. },
  13417. "required": ["start"],
  13418. "additionalProperties": false
  13419. }
  13420. },
  13421. "required": ["status", "input", "time"],
  13422. "additionalProperties": false
  13423. },
  13424. "ToolStateCompleted": {
  13425. "type": "object",
  13426. "properties": {
  13427. "status": {
  13428. "type": "string",
  13429. "enum": ["completed"]
  13430. },
  13431. "input": {
  13432. "type": "object"
  13433. },
  13434. "output": {
  13435. "type": "string"
  13436. },
  13437. "title": {
  13438. "type": "string"
  13439. },
  13440. "metadata": {
  13441. "type": "object"
  13442. },
  13443. "time": {
  13444. "type": "object",
  13445. "properties": {
  13446. "start": {
  13447. "type": "integer",
  13448. "minimum": 0
  13449. },
  13450. "end": {
  13451. "type": "integer",
  13452. "minimum": 0
  13453. },
  13454. "compacted": {
  13455. "type": "integer",
  13456. "minimum": 0
  13457. }
  13458. },
  13459. "required": ["start", "end"],
  13460. "additionalProperties": false
  13461. },
  13462. "attachments": {
  13463. "type": "array",
  13464. "items": {
  13465. "$ref": "#/components/schemas/FilePart"
  13466. }
  13467. }
  13468. },
  13469. "required": ["status", "input", "output", "title", "metadata", "time"],
  13470. "additionalProperties": false
  13471. },
  13472. "ToolStateError": {
  13473. "type": "object",
  13474. "properties": {
  13475. "status": {
  13476. "type": "string",
  13477. "enum": ["error"]
  13478. },
  13479. "input": {
  13480. "type": "object"
  13481. },
  13482. "error": {
  13483. "type": "string"
  13484. },
  13485. "metadata": {
  13486. "type": "object"
  13487. },
  13488. "time": {
  13489. "type": "object",
  13490. "properties": {
  13491. "start": {
  13492. "type": "integer",
  13493. "minimum": 0
  13494. },
  13495. "end": {
  13496. "type": "integer",
  13497. "minimum": 0
  13498. }
  13499. },
  13500. "required": ["start", "end"],
  13501. "additionalProperties": false
  13502. }
  13503. },
  13504. "required": ["status", "input", "error", "time"],
  13505. "additionalProperties": false
  13506. },
  13507. "ToolState": {
  13508. "anyOf": [
  13509. {
  13510. "$ref": "#/components/schemas/ToolStatePending"
  13511. },
  13512. {
  13513. "$ref": "#/components/schemas/ToolStateRunning"
  13514. },
  13515. {
  13516. "$ref": "#/components/schemas/ToolStateCompleted"
  13517. },
  13518. {
  13519. "$ref": "#/components/schemas/ToolStateError"
  13520. }
  13521. ]
  13522. },
  13523. "ToolPart": {
  13524. "type": "object",
  13525. "properties": {
  13526. "id": {
  13527. "type": "string",
  13528. "pattern": "^prt"
  13529. },
  13530. "sessionID": {
  13531. "type": "string",
  13532. "pattern": "^ses"
  13533. },
  13534. "messageID": {
  13535. "type": "string",
  13536. "pattern": "^msg"
  13537. },
  13538. "type": {
  13539. "type": "string",
  13540. "enum": ["tool"]
  13541. },
  13542. "callID": {
  13543. "type": "string"
  13544. },
  13545. "tool": {
  13546. "type": "string"
  13547. },
  13548. "state": {
  13549. "$ref": "#/components/schemas/ToolState"
  13550. },
  13551. "metadata": {
  13552. "type": "object"
  13553. }
  13554. },
  13555. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13556. "additionalProperties": false
  13557. },
  13558. "StepStartPart": {
  13559. "type": "object",
  13560. "properties": {
  13561. "id": {
  13562. "type": "string",
  13563. "pattern": "^prt"
  13564. },
  13565. "sessionID": {
  13566. "type": "string",
  13567. "pattern": "^ses"
  13568. },
  13569. "messageID": {
  13570. "type": "string",
  13571. "pattern": "^msg"
  13572. },
  13573. "type": {
  13574. "type": "string",
  13575. "enum": ["step-start"]
  13576. },
  13577. "snapshot": {
  13578. "type": "string"
  13579. }
  13580. },
  13581. "required": ["id", "sessionID", "messageID", "type"],
  13582. "additionalProperties": false
  13583. },
  13584. "StepFinishPart": {
  13585. "type": "object",
  13586. "properties": {
  13587. "id": {
  13588. "type": "string",
  13589. "pattern": "^prt"
  13590. },
  13591. "sessionID": {
  13592. "type": "string",
  13593. "pattern": "^ses"
  13594. },
  13595. "messageID": {
  13596. "type": "string",
  13597. "pattern": "^msg"
  13598. },
  13599. "type": {
  13600. "type": "string",
  13601. "enum": ["step-finish"]
  13602. },
  13603. "reason": {
  13604. "type": "string"
  13605. },
  13606. "snapshot": {
  13607. "type": "string"
  13608. },
  13609. "cost": {
  13610. "type": "number"
  13611. },
  13612. "tokens": {
  13613. "type": "object",
  13614. "properties": {
  13615. "total": {
  13616. "type": "number"
  13617. },
  13618. "input": {
  13619. "type": "number"
  13620. },
  13621. "output": {
  13622. "type": "number"
  13623. },
  13624. "reasoning": {
  13625. "type": "number"
  13626. },
  13627. "cache": {
  13628. "type": "object",
  13629. "properties": {
  13630. "read": {
  13631. "type": "number"
  13632. },
  13633. "write": {
  13634. "type": "number"
  13635. }
  13636. },
  13637. "required": ["read", "write"],
  13638. "additionalProperties": false
  13639. }
  13640. },
  13641. "required": ["input", "output", "reasoning", "cache"],
  13642. "additionalProperties": false
  13643. }
  13644. },
  13645. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13646. "additionalProperties": false
  13647. },
  13648. "SnapshotPart": {
  13649. "type": "object",
  13650. "properties": {
  13651. "id": {
  13652. "type": "string",
  13653. "pattern": "^prt"
  13654. },
  13655. "sessionID": {
  13656. "type": "string",
  13657. "pattern": "^ses"
  13658. },
  13659. "messageID": {
  13660. "type": "string",
  13661. "pattern": "^msg"
  13662. },
  13663. "type": {
  13664. "type": "string",
  13665. "enum": ["snapshot"]
  13666. },
  13667. "snapshot": {
  13668. "type": "string"
  13669. }
  13670. },
  13671. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13672. "additionalProperties": false
  13673. },
  13674. "PatchPart": {
  13675. "type": "object",
  13676. "properties": {
  13677. "id": {
  13678. "type": "string",
  13679. "pattern": "^prt"
  13680. },
  13681. "sessionID": {
  13682. "type": "string",
  13683. "pattern": "^ses"
  13684. },
  13685. "messageID": {
  13686. "type": "string",
  13687. "pattern": "^msg"
  13688. },
  13689. "type": {
  13690. "type": "string",
  13691. "enum": ["patch"]
  13692. },
  13693. "hash": {
  13694. "type": "string"
  13695. },
  13696. "files": {
  13697. "type": "array",
  13698. "items": {
  13699. "type": "string"
  13700. }
  13701. }
  13702. },
  13703. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13704. "additionalProperties": false
  13705. },
  13706. "AgentPart": {
  13707. "type": "object",
  13708. "properties": {
  13709. "id": {
  13710. "type": "string",
  13711. "pattern": "^prt"
  13712. },
  13713. "sessionID": {
  13714. "type": "string",
  13715. "pattern": "^ses"
  13716. },
  13717. "messageID": {
  13718. "type": "string",
  13719. "pattern": "^msg"
  13720. },
  13721. "type": {
  13722. "type": "string",
  13723. "enum": ["agent"]
  13724. },
  13725. "name": {
  13726. "type": "string"
  13727. },
  13728. "source": {
  13729. "type": "object",
  13730. "properties": {
  13731. "value": {
  13732. "type": "string"
  13733. },
  13734. "start": {
  13735. "type": "integer",
  13736. "minimum": 0
  13737. },
  13738. "end": {
  13739. "type": "integer",
  13740. "minimum": 0
  13741. }
  13742. },
  13743. "required": ["value", "start", "end"],
  13744. "additionalProperties": false
  13745. }
  13746. },
  13747. "required": ["id", "sessionID", "messageID", "type", "name"],
  13748. "additionalProperties": false
  13749. },
  13750. "RetryPart": {
  13751. "type": "object",
  13752. "properties": {
  13753. "id": {
  13754. "type": "string",
  13755. "pattern": "^prt"
  13756. },
  13757. "sessionID": {
  13758. "type": "string",
  13759. "pattern": "^ses"
  13760. },
  13761. "messageID": {
  13762. "type": "string",
  13763. "pattern": "^msg"
  13764. },
  13765. "type": {
  13766. "type": "string",
  13767. "enum": ["retry"]
  13768. },
  13769. "attempt": {
  13770. "type": "integer",
  13771. "minimum": 0
  13772. },
  13773. "error": {
  13774. "$ref": "#/components/schemas/APIError"
  13775. },
  13776. "time": {
  13777. "type": "object",
  13778. "properties": {
  13779. "created": {
  13780. "type": "integer",
  13781. "minimum": 0
  13782. }
  13783. },
  13784. "required": ["created"],
  13785. "additionalProperties": false
  13786. }
  13787. },
  13788. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13789. "additionalProperties": false
  13790. },
  13791. "CompactionPart": {
  13792. "type": "object",
  13793. "properties": {
  13794. "id": {
  13795. "type": "string",
  13796. "pattern": "^prt"
  13797. },
  13798. "sessionID": {
  13799. "type": "string",
  13800. "pattern": "^ses"
  13801. },
  13802. "messageID": {
  13803. "type": "string",
  13804. "pattern": "^msg"
  13805. },
  13806. "type": {
  13807. "type": "string",
  13808. "enum": ["compaction"]
  13809. },
  13810. "auto": {
  13811. "type": "boolean"
  13812. },
  13813. "overflow": {
  13814. "type": "boolean"
  13815. },
  13816. "tail_start_id": {
  13817. "type": "string",
  13818. "pattern": "^msg"
  13819. }
  13820. },
  13821. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13822. "additionalProperties": false
  13823. },
  13824. "Part": {
  13825. "anyOf": [
  13826. {
  13827. "$ref": "#/components/schemas/TextPart"
  13828. },
  13829. {
  13830. "$ref": "#/components/schemas/SubtaskPart"
  13831. },
  13832. {
  13833. "$ref": "#/components/schemas/ReasoningPart"
  13834. },
  13835. {
  13836. "$ref": "#/components/schemas/FilePart"
  13837. },
  13838. {
  13839. "$ref": "#/components/schemas/ToolPart"
  13840. },
  13841. {
  13842. "$ref": "#/components/schemas/StepStartPart"
  13843. },
  13844. {
  13845. "$ref": "#/components/schemas/StepFinishPart"
  13846. },
  13847. {
  13848. "$ref": "#/components/schemas/SnapshotPart"
  13849. },
  13850. {
  13851. "$ref": "#/components/schemas/PatchPart"
  13852. },
  13853. {
  13854. "$ref": "#/components/schemas/AgentPart"
  13855. },
  13856. {
  13857. "$ref": "#/components/schemas/RetryPart"
  13858. },
  13859. {
  13860. "$ref": "#/components/schemas/CompactionPart"
  13861. }
  13862. ]
  13863. },
  13864. "Prompt": {
  13865. "type": "object",
  13866. "properties": {
  13867. "text": {
  13868. "type": "string"
  13869. },
  13870. "files": {
  13871. "type": "array",
  13872. "items": {
  13873. "$ref": "#/components/schemas/PromptFileAttachment"
  13874. }
  13875. },
  13876. "agents": {
  13877. "type": "array",
  13878. "items": {
  13879. "$ref": "#/components/schemas/PromptAgentAttachment"
  13880. }
  13881. },
  13882. "references": {
  13883. "type": "array",
  13884. "items": {
  13885. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13886. }
  13887. }
  13888. },
  13889. "required": ["text"],
  13890. "additionalProperties": false
  13891. },
  13892. "Pty": {
  13893. "type": "object",
  13894. "properties": {
  13895. "id": {
  13896. "type": "string",
  13897. "pattern": "^pty"
  13898. },
  13899. "title": {
  13900. "type": "string"
  13901. },
  13902. "command": {
  13903. "type": "string"
  13904. },
  13905. "args": {
  13906. "type": "array",
  13907. "items": {
  13908. "type": "string"
  13909. }
  13910. },
  13911. "cwd": {
  13912. "type": "string"
  13913. },
  13914. "status": {
  13915. "type": "string",
  13916. "enum": ["running", "exited"]
  13917. },
  13918. "pid": {
  13919. "type": "integer",
  13920. "minimum": 0
  13921. }
  13922. },
  13923. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  13924. "additionalProperties": false
  13925. },
  13926. "Todo": {
  13927. "type": "object",
  13928. "properties": {
  13929. "content": {
  13930. "type": "string",
  13931. "description": "Brief description of the task"
  13932. },
  13933. "status": {
  13934. "type": "string",
  13935. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  13936. },
  13937. "priority": {
  13938. "type": "string",
  13939. "description": "Priority level of the task: high, medium, low"
  13940. }
  13941. },
  13942. "required": ["content", "status", "priority"],
  13943. "additionalProperties": false
  13944. },
  13945. "QuestionOption": {
  13946. "type": "object",
  13947. "properties": {
  13948. "label": {
  13949. "type": "string",
  13950. "description": "Display text (1-5 words, concise)"
  13951. },
  13952. "description": {
  13953. "type": "string",
  13954. "description": "Explanation of choice"
  13955. }
  13956. },
  13957. "required": ["label", "description"],
  13958. "additionalProperties": false
  13959. },
  13960. "QuestionInfo": {
  13961. "type": "object",
  13962. "properties": {
  13963. "question": {
  13964. "type": "string",
  13965. "description": "Complete question"
  13966. },
  13967. "header": {
  13968. "type": "string",
  13969. "description": "Very short label (max 30 chars)"
  13970. },
  13971. "options": {
  13972. "type": "array",
  13973. "items": {
  13974. "$ref": "#/components/schemas/QuestionOption"
  13975. },
  13976. "description": "Available choices"
  13977. },
  13978. "multiple": {
  13979. "type": "boolean"
  13980. },
  13981. "custom": {
  13982. "type": "boolean"
  13983. }
  13984. },
  13985. "required": ["question", "header", "options"],
  13986. "additionalProperties": false
  13987. },
  13988. "QuestionTool": {
  13989. "type": "object",
  13990. "properties": {
  13991. "messageID": {
  13992. "type": "string",
  13993. "pattern": "^msg"
  13994. },
  13995. "callID": {
  13996. "type": "string"
  13997. }
  13998. },
  13999. "required": ["messageID", "callID"],
  14000. "additionalProperties": false
  14001. },
  14002. "QuestionAnswer": {
  14003. "type": "array",
  14004. "items": {
  14005. "type": "string"
  14006. }
  14007. },
  14008. "SessionStatus": {
  14009. "anyOf": [
  14010. {
  14011. "type": "object",
  14012. "properties": {
  14013. "type": {
  14014. "type": "string",
  14015. "enum": ["idle"]
  14016. }
  14017. },
  14018. "required": ["type"],
  14019. "additionalProperties": false
  14020. },
  14021. {
  14022. "type": "object",
  14023. "properties": {
  14024. "type": {
  14025. "type": "string",
  14026. "enum": ["retry"]
  14027. },
  14028. "attempt": {
  14029. "type": "integer",
  14030. "minimum": 0
  14031. },
  14032. "message": {
  14033. "type": "string"
  14034. },
  14035. "action": {
  14036. "type": "object",
  14037. "properties": {
  14038. "reason": {
  14039. "type": "string"
  14040. },
  14041. "provider": {
  14042. "type": "string"
  14043. },
  14044. "title": {
  14045. "type": "string"
  14046. },
  14047. "message": {
  14048. "type": "string"
  14049. },
  14050. "label": {
  14051. "type": "string"
  14052. },
  14053. "link": {
  14054. "type": "string"
  14055. }
  14056. },
  14057. "required": ["reason", "provider", "title", "message", "label"],
  14058. "additionalProperties": false
  14059. },
  14060. "next": {
  14061. "type": "integer",
  14062. "minimum": 0
  14063. }
  14064. },
  14065. "required": ["type", "attempt", "message", "next"],
  14066. "additionalProperties": false
  14067. },
  14068. {
  14069. "type": "object",
  14070. "properties": {
  14071. "type": {
  14072. "type": "string",
  14073. "enum": ["busy"]
  14074. }
  14075. },
  14076. "required": ["type"],
  14077. "additionalProperties": false
  14078. }
  14079. ]
  14080. },
  14081. "GlobalEvent": {
  14082. "type": "object",
  14083. "properties": {
  14084. "directory": {
  14085. "type": "string"
  14086. },
  14087. "project": {
  14088. "type": "string"
  14089. },
  14090. "workspace": {
  14091. "type": "string"
  14092. },
  14093. "payload": {
  14094. "anyOf": [
  14095. {
  14096. "type": "object",
  14097. "properties": {
  14098. "id": {
  14099. "type": "string"
  14100. },
  14101. "type": {
  14102. "type": "string",
  14103. "enum": ["models-dev.refreshed"]
  14104. },
  14105. "properties": {
  14106. "type": "object",
  14107. "properties": {}
  14108. }
  14109. },
  14110. "required": ["id", "type", "properties"],
  14111. "additionalProperties": false
  14112. },
  14113. {
  14114. "type": "object",
  14115. "properties": {
  14116. "id": {
  14117. "type": "string"
  14118. },
  14119. "type": {
  14120. "type": "string",
  14121. "enum": ["plugin.added"]
  14122. },
  14123. "properties": {
  14124. "type": "object",
  14125. "properties": {
  14126. "id": {
  14127. "type": "string"
  14128. }
  14129. },
  14130. "required": ["id"],
  14131. "additionalProperties": false
  14132. }
  14133. },
  14134. "required": ["id", "type", "properties"],
  14135. "additionalProperties": false
  14136. },
  14137. {
  14138. "type": "object",
  14139. "properties": {
  14140. "id": {
  14141. "type": "string"
  14142. },
  14143. "type": {
  14144. "type": "string",
  14145. "enum": ["catalog.model.updated"]
  14146. },
  14147. "properties": {
  14148. "type": "object",
  14149. "properties": {
  14150. "model": {
  14151. "$ref": "#/components/schemas/ModelV2Info"
  14152. }
  14153. },
  14154. "required": ["model"],
  14155. "additionalProperties": false
  14156. }
  14157. },
  14158. "required": ["id", "type", "properties"],
  14159. "additionalProperties": false
  14160. },
  14161. {
  14162. "type": "object",
  14163. "properties": {
  14164. "id": {
  14165. "type": "string"
  14166. },
  14167. "type": {
  14168. "type": "string",
  14169. "enum": ["session.created"]
  14170. },
  14171. "properties": {
  14172. "type": "object",
  14173. "properties": {
  14174. "sessionID": {
  14175. "type": "string",
  14176. "pattern": "^ses"
  14177. },
  14178. "info": {
  14179. "$ref": "#/components/schemas/Session"
  14180. }
  14181. },
  14182. "required": ["sessionID", "info"],
  14183. "additionalProperties": false
  14184. }
  14185. },
  14186. "required": ["id", "type", "properties"],
  14187. "additionalProperties": false
  14188. },
  14189. {
  14190. "type": "object",
  14191. "properties": {
  14192. "id": {
  14193. "type": "string"
  14194. },
  14195. "type": {
  14196. "type": "string",
  14197. "enum": ["session.updated"]
  14198. },
  14199. "properties": {
  14200. "type": "object",
  14201. "properties": {
  14202. "sessionID": {
  14203. "type": "string",
  14204. "pattern": "^ses"
  14205. },
  14206. "info": {
  14207. "$ref": "#/components/schemas/Session"
  14208. }
  14209. },
  14210. "required": ["sessionID", "info"],
  14211. "additionalProperties": false
  14212. }
  14213. },
  14214. "required": ["id", "type", "properties"],
  14215. "additionalProperties": false
  14216. },
  14217. {
  14218. "type": "object",
  14219. "properties": {
  14220. "id": {
  14221. "type": "string"
  14222. },
  14223. "type": {
  14224. "type": "string",
  14225. "enum": ["session.deleted"]
  14226. },
  14227. "properties": {
  14228. "type": "object",
  14229. "properties": {
  14230. "sessionID": {
  14231. "type": "string",
  14232. "pattern": "^ses"
  14233. },
  14234. "info": {
  14235. "$ref": "#/components/schemas/Session"
  14236. }
  14237. },
  14238. "required": ["sessionID", "info"],
  14239. "additionalProperties": false
  14240. }
  14241. },
  14242. "required": ["id", "type", "properties"],
  14243. "additionalProperties": false
  14244. },
  14245. {
  14246. "type": "object",
  14247. "properties": {
  14248. "id": {
  14249. "type": "string"
  14250. },
  14251. "type": {
  14252. "type": "string",
  14253. "enum": ["message.updated"]
  14254. },
  14255. "properties": {
  14256. "type": "object",
  14257. "properties": {
  14258. "sessionID": {
  14259. "type": "string",
  14260. "pattern": "^ses"
  14261. },
  14262. "info": {
  14263. "$ref": "#/components/schemas/Message"
  14264. }
  14265. },
  14266. "required": ["sessionID", "info"],
  14267. "additionalProperties": false
  14268. }
  14269. },
  14270. "required": ["id", "type", "properties"],
  14271. "additionalProperties": false
  14272. },
  14273. {
  14274. "type": "object",
  14275. "properties": {
  14276. "id": {
  14277. "type": "string"
  14278. },
  14279. "type": {
  14280. "type": "string",
  14281. "enum": ["message.removed"]
  14282. },
  14283. "properties": {
  14284. "type": "object",
  14285. "properties": {
  14286. "sessionID": {
  14287. "type": "string",
  14288. "pattern": "^ses"
  14289. },
  14290. "messageID": {
  14291. "type": "string",
  14292. "pattern": "^msg"
  14293. }
  14294. },
  14295. "required": ["sessionID", "messageID"],
  14296. "additionalProperties": false
  14297. }
  14298. },
  14299. "required": ["id", "type", "properties"],
  14300. "additionalProperties": false
  14301. },
  14302. {
  14303. "type": "object",
  14304. "properties": {
  14305. "id": {
  14306. "type": "string"
  14307. },
  14308. "type": {
  14309. "type": "string",
  14310. "enum": ["message.part.updated"]
  14311. },
  14312. "properties": {
  14313. "type": "object",
  14314. "properties": {
  14315. "sessionID": {
  14316. "type": "string",
  14317. "pattern": "^ses"
  14318. },
  14319. "part": {
  14320. "$ref": "#/components/schemas/Part"
  14321. },
  14322. "time": {
  14323. "type": "number"
  14324. }
  14325. },
  14326. "required": ["sessionID", "part", "time"],
  14327. "additionalProperties": false
  14328. }
  14329. },
  14330. "required": ["id", "type", "properties"],
  14331. "additionalProperties": false
  14332. },
  14333. {
  14334. "type": "object",
  14335. "properties": {
  14336. "id": {
  14337. "type": "string"
  14338. },
  14339. "type": {
  14340. "type": "string",
  14341. "enum": ["message.part.removed"]
  14342. },
  14343. "properties": {
  14344. "type": "object",
  14345. "properties": {
  14346. "sessionID": {
  14347. "type": "string",
  14348. "pattern": "^ses"
  14349. },
  14350. "messageID": {
  14351. "type": "string",
  14352. "pattern": "^msg"
  14353. },
  14354. "partID": {
  14355. "type": "string",
  14356. "pattern": "^prt"
  14357. }
  14358. },
  14359. "required": ["sessionID", "messageID", "partID"],
  14360. "additionalProperties": false
  14361. }
  14362. },
  14363. "required": ["id", "type", "properties"],
  14364. "additionalProperties": false
  14365. },
  14366. {
  14367. "type": "object",
  14368. "properties": {
  14369. "id": {
  14370. "type": "string"
  14371. },
  14372. "type": {
  14373. "type": "string",
  14374. "enum": ["session.next.agent.switched"]
  14375. },
  14376. "properties": {
  14377. "type": "object",
  14378. "properties": {
  14379. "timestamp": {
  14380. "type": "number"
  14381. },
  14382. "sessionID": {
  14383. "type": "string",
  14384. "pattern": "^ses"
  14385. },
  14386. "agent": {
  14387. "type": "string"
  14388. }
  14389. },
  14390. "required": ["timestamp", "sessionID", "agent"],
  14391. "additionalProperties": false
  14392. }
  14393. },
  14394. "required": ["id", "type", "properties"],
  14395. "additionalProperties": false
  14396. },
  14397. {
  14398. "type": "object",
  14399. "properties": {
  14400. "id": {
  14401. "type": "string"
  14402. },
  14403. "type": {
  14404. "type": "string",
  14405. "enum": ["session.next.model.switched"]
  14406. },
  14407. "properties": {
  14408. "type": "object",
  14409. "properties": {
  14410. "timestamp": {
  14411. "type": "number"
  14412. },
  14413. "sessionID": {
  14414. "type": "string",
  14415. "pattern": "^ses"
  14416. },
  14417. "model": {
  14418. "type": "object",
  14419. "properties": {
  14420. "id": {
  14421. "type": "string"
  14422. },
  14423. "providerID": {
  14424. "type": "string"
  14425. },
  14426. "variant": {
  14427. "type": "string"
  14428. }
  14429. },
  14430. "required": ["id", "providerID"],
  14431. "additionalProperties": false
  14432. }
  14433. },
  14434. "required": ["timestamp", "sessionID", "model"],
  14435. "additionalProperties": false
  14436. }
  14437. },
  14438. "required": ["id", "type", "properties"],
  14439. "additionalProperties": false
  14440. },
  14441. {
  14442. "type": "object",
  14443. "properties": {
  14444. "id": {
  14445. "type": "string"
  14446. },
  14447. "type": {
  14448. "type": "string",
  14449. "enum": ["session.next.moved"]
  14450. },
  14451. "properties": {
  14452. "type": "object",
  14453. "properties": {
  14454. "timestamp": {
  14455. "type": "number"
  14456. },
  14457. "sessionID": {
  14458. "type": "string",
  14459. "pattern": "^ses"
  14460. },
  14461. "location": {
  14462. "$ref": "#/components/schemas/LocationRef"
  14463. },
  14464. "subdirectory": {
  14465. "type": "string"
  14466. }
  14467. },
  14468. "required": ["timestamp", "sessionID", "location"],
  14469. "additionalProperties": false
  14470. }
  14471. },
  14472. "required": ["id", "type", "properties"],
  14473. "additionalProperties": false
  14474. },
  14475. {
  14476. "type": "object",
  14477. "properties": {
  14478. "id": {
  14479. "type": "string"
  14480. },
  14481. "type": {
  14482. "type": "string",
  14483. "enum": ["session.next.prompted"]
  14484. },
  14485. "properties": {
  14486. "type": "object",
  14487. "properties": {
  14488. "timestamp": {
  14489. "type": "number"
  14490. },
  14491. "sessionID": {
  14492. "type": "string",
  14493. "pattern": "^ses"
  14494. },
  14495. "prompt": {
  14496. "$ref": "#/components/schemas/Prompt"
  14497. },
  14498. "delivery": {
  14499. "type": "string",
  14500. "enum": ["steer", "queue"]
  14501. }
  14502. },
  14503. "required": ["timestamp", "sessionID", "prompt", "delivery"],
  14504. "additionalProperties": false
  14505. }
  14506. },
  14507. "required": ["id", "type", "properties"],
  14508. "additionalProperties": false
  14509. },
  14510. {
  14511. "type": "object",
  14512. "properties": {
  14513. "id": {
  14514. "type": "string"
  14515. },
  14516. "type": {
  14517. "type": "string",
  14518. "enum": ["session.next.synthetic"]
  14519. },
  14520. "properties": {
  14521. "type": "object",
  14522. "properties": {
  14523. "timestamp": {
  14524. "type": "number"
  14525. },
  14526. "sessionID": {
  14527. "type": "string",
  14528. "pattern": "^ses"
  14529. },
  14530. "text": {
  14531. "type": "string"
  14532. }
  14533. },
  14534. "required": ["timestamp", "sessionID", "text"],
  14535. "additionalProperties": false
  14536. }
  14537. },
  14538. "required": ["id", "type", "properties"],
  14539. "additionalProperties": false
  14540. },
  14541. {
  14542. "type": "object",
  14543. "properties": {
  14544. "id": {
  14545. "type": "string"
  14546. },
  14547. "type": {
  14548. "type": "string",
  14549. "enum": ["session.next.shell.started"]
  14550. },
  14551. "properties": {
  14552. "type": "object",
  14553. "properties": {
  14554. "timestamp": {
  14555. "type": "number"
  14556. },
  14557. "sessionID": {
  14558. "type": "string",
  14559. "pattern": "^ses"
  14560. },
  14561. "callID": {
  14562. "type": "string"
  14563. },
  14564. "command": {
  14565. "type": "string"
  14566. }
  14567. },
  14568. "required": ["timestamp", "sessionID", "callID", "command"],
  14569. "additionalProperties": false
  14570. }
  14571. },
  14572. "required": ["id", "type", "properties"],
  14573. "additionalProperties": false
  14574. },
  14575. {
  14576. "type": "object",
  14577. "properties": {
  14578. "id": {
  14579. "type": "string"
  14580. },
  14581. "type": {
  14582. "type": "string",
  14583. "enum": ["session.next.shell.ended"]
  14584. },
  14585. "properties": {
  14586. "type": "object",
  14587. "properties": {
  14588. "timestamp": {
  14589. "type": "number"
  14590. },
  14591. "sessionID": {
  14592. "type": "string",
  14593. "pattern": "^ses"
  14594. },
  14595. "callID": {
  14596. "type": "string"
  14597. },
  14598. "output": {
  14599. "type": "string"
  14600. }
  14601. },
  14602. "required": ["timestamp", "sessionID", "callID", "output"],
  14603. "additionalProperties": false
  14604. }
  14605. },
  14606. "required": ["id", "type", "properties"],
  14607. "additionalProperties": false
  14608. },
  14609. {
  14610. "type": "object",
  14611. "properties": {
  14612. "id": {
  14613. "type": "string"
  14614. },
  14615. "type": {
  14616. "type": "string",
  14617. "enum": ["session.next.step.started"]
  14618. },
  14619. "properties": {
  14620. "type": "object",
  14621. "properties": {
  14622. "timestamp": {
  14623. "type": "number"
  14624. },
  14625. "sessionID": {
  14626. "type": "string",
  14627. "pattern": "^ses"
  14628. },
  14629. "agent": {
  14630. "type": "string"
  14631. },
  14632. "model": {
  14633. "type": "object",
  14634. "properties": {
  14635. "id": {
  14636. "type": "string"
  14637. },
  14638. "providerID": {
  14639. "type": "string"
  14640. },
  14641. "variant": {
  14642. "type": "string"
  14643. }
  14644. },
  14645. "required": ["id", "providerID"],
  14646. "additionalProperties": false
  14647. },
  14648. "snapshot": {
  14649. "type": "string"
  14650. }
  14651. },
  14652. "required": ["timestamp", "sessionID", "agent", "model"],
  14653. "additionalProperties": false
  14654. }
  14655. },
  14656. "required": ["id", "type", "properties"],
  14657. "additionalProperties": false
  14658. },
  14659. {
  14660. "type": "object",
  14661. "properties": {
  14662. "id": {
  14663. "type": "string"
  14664. },
  14665. "type": {
  14666. "type": "string",
  14667. "enum": ["session.next.step.ended"]
  14668. },
  14669. "properties": {
  14670. "type": "object",
  14671. "properties": {
  14672. "timestamp": {
  14673. "type": "number"
  14674. },
  14675. "sessionID": {
  14676. "type": "string",
  14677. "pattern": "^ses"
  14678. },
  14679. "assistantMessageID": {
  14680. "type": "string"
  14681. },
  14682. "finish": {
  14683. "type": "string"
  14684. },
  14685. "cost": {
  14686. "type": "number"
  14687. },
  14688. "tokens": {
  14689. "type": "object",
  14690. "properties": {
  14691. "input": {
  14692. "type": "number"
  14693. },
  14694. "output": {
  14695. "type": "number"
  14696. },
  14697. "reasoning": {
  14698. "type": "number"
  14699. },
  14700. "cache": {
  14701. "type": "object",
  14702. "properties": {
  14703. "read": {
  14704. "type": "number"
  14705. },
  14706. "write": {
  14707. "type": "number"
  14708. }
  14709. },
  14710. "required": ["read", "write"],
  14711. "additionalProperties": false
  14712. }
  14713. },
  14714. "required": ["input", "output", "reasoning", "cache"],
  14715. "additionalProperties": false
  14716. },
  14717. "snapshot": {
  14718. "type": "string"
  14719. }
  14720. },
  14721. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14722. "additionalProperties": false
  14723. }
  14724. },
  14725. "required": ["id", "type", "properties"],
  14726. "additionalProperties": false
  14727. },
  14728. {
  14729. "type": "object",
  14730. "properties": {
  14731. "id": {
  14732. "type": "string"
  14733. },
  14734. "type": {
  14735. "type": "string",
  14736. "enum": ["session.next.step.failed"]
  14737. },
  14738. "properties": {
  14739. "type": "object",
  14740. "properties": {
  14741. "timestamp": {
  14742. "type": "number"
  14743. },
  14744. "sessionID": {
  14745. "type": "string",
  14746. "pattern": "^ses"
  14747. },
  14748. "assistantMessageID": {
  14749. "type": "string"
  14750. },
  14751. "error": {
  14752. "$ref": "#/components/schemas/SessionErrorUnknown"
  14753. }
  14754. },
  14755. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  14756. "additionalProperties": false
  14757. }
  14758. },
  14759. "required": ["id", "type", "properties"],
  14760. "additionalProperties": false
  14761. },
  14762. {
  14763. "type": "object",
  14764. "properties": {
  14765. "id": {
  14766. "type": "string"
  14767. },
  14768. "type": {
  14769. "type": "string",
  14770. "enum": ["session.next.text.started"]
  14771. },
  14772. "properties": {
  14773. "type": "object",
  14774. "properties": {
  14775. "timestamp": {
  14776. "type": "number"
  14777. },
  14778. "sessionID": {
  14779. "type": "string",
  14780. "pattern": "^ses"
  14781. },
  14782. "textID": {
  14783. "type": "string"
  14784. }
  14785. },
  14786. "required": ["timestamp", "sessionID", "textID"],
  14787. "additionalProperties": false
  14788. }
  14789. },
  14790. "required": ["id", "type", "properties"],
  14791. "additionalProperties": false
  14792. },
  14793. {
  14794. "type": "object",
  14795. "properties": {
  14796. "id": {
  14797. "type": "string"
  14798. },
  14799. "type": {
  14800. "type": "string",
  14801. "enum": ["session.next.text.delta"]
  14802. },
  14803. "properties": {
  14804. "type": "object",
  14805. "properties": {
  14806. "timestamp": {
  14807. "type": "number"
  14808. },
  14809. "sessionID": {
  14810. "type": "string",
  14811. "pattern": "^ses"
  14812. },
  14813. "textID": {
  14814. "type": "string"
  14815. },
  14816. "delta": {
  14817. "type": "string"
  14818. }
  14819. },
  14820. "required": ["timestamp", "sessionID", "textID", "delta"],
  14821. "additionalProperties": false
  14822. }
  14823. },
  14824. "required": ["id", "type", "properties"],
  14825. "additionalProperties": false
  14826. },
  14827. {
  14828. "type": "object",
  14829. "properties": {
  14830. "id": {
  14831. "type": "string"
  14832. },
  14833. "type": {
  14834. "type": "string",
  14835. "enum": ["session.next.text.ended"]
  14836. },
  14837. "properties": {
  14838. "type": "object",
  14839. "properties": {
  14840. "timestamp": {
  14841. "type": "number"
  14842. },
  14843. "sessionID": {
  14844. "type": "string",
  14845. "pattern": "^ses"
  14846. },
  14847. "textID": {
  14848. "type": "string"
  14849. },
  14850. "text": {
  14851. "type": "string"
  14852. }
  14853. },
  14854. "required": ["timestamp", "sessionID", "textID", "text"],
  14855. "additionalProperties": false
  14856. }
  14857. },
  14858. "required": ["id", "type", "properties"],
  14859. "additionalProperties": false
  14860. },
  14861. {
  14862. "type": "object",
  14863. "properties": {
  14864. "id": {
  14865. "type": "string"
  14866. },
  14867. "type": {
  14868. "type": "string",
  14869. "enum": ["session.next.reasoning.started"]
  14870. },
  14871. "properties": {
  14872. "type": "object",
  14873. "properties": {
  14874. "timestamp": {
  14875. "type": "number"
  14876. },
  14877. "sessionID": {
  14878. "type": "string",
  14879. "pattern": "^ses"
  14880. },
  14881. "reasoningID": {
  14882. "type": "string"
  14883. },
  14884. "providerMetadata": {
  14885. "type": "object",
  14886. "additionalProperties": {
  14887. "type": "object"
  14888. }
  14889. }
  14890. },
  14891. "required": ["timestamp", "sessionID", "reasoningID"],
  14892. "additionalProperties": false
  14893. }
  14894. },
  14895. "required": ["id", "type", "properties"],
  14896. "additionalProperties": false
  14897. },
  14898. {
  14899. "type": "object",
  14900. "properties": {
  14901. "id": {
  14902. "type": "string"
  14903. },
  14904. "type": {
  14905. "type": "string",
  14906. "enum": ["session.next.reasoning.delta"]
  14907. },
  14908. "properties": {
  14909. "type": "object",
  14910. "properties": {
  14911. "timestamp": {
  14912. "type": "number"
  14913. },
  14914. "sessionID": {
  14915. "type": "string",
  14916. "pattern": "^ses"
  14917. },
  14918. "reasoningID": {
  14919. "type": "string"
  14920. },
  14921. "delta": {
  14922. "type": "string"
  14923. }
  14924. },
  14925. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  14926. "additionalProperties": false
  14927. }
  14928. },
  14929. "required": ["id", "type", "properties"],
  14930. "additionalProperties": false
  14931. },
  14932. {
  14933. "type": "object",
  14934. "properties": {
  14935. "id": {
  14936. "type": "string"
  14937. },
  14938. "type": {
  14939. "type": "string",
  14940. "enum": ["session.next.reasoning.ended"]
  14941. },
  14942. "properties": {
  14943. "type": "object",
  14944. "properties": {
  14945. "timestamp": {
  14946. "type": "number"
  14947. },
  14948. "sessionID": {
  14949. "type": "string",
  14950. "pattern": "^ses"
  14951. },
  14952. "reasoningID": {
  14953. "type": "string"
  14954. },
  14955. "text": {
  14956. "type": "string"
  14957. },
  14958. "providerMetadata": {
  14959. "type": "object",
  14960. "additionalProperties": {
  14961. "type": "object"
  14962. }
  14963. }
  14964. },
  14965. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  14966. "additionalProperties": false
  14967. }
  14968. },
  14969. "required": ["id", "type", "properties"],
  14970. "additionalProperties": false
  14971. },
  14972. {
  14973. "type": "object",
  14974. "properties": {
  14975. "id": {
  14976. "type": "string"
  14977. },
  14978. "type": {
  14979. "type": "string",
  14980. "enum": ["session.next.tool.input.started"]
  14981. },
  14982. "properties": {
  14983. "type": "object",
  14984. "properties": {
  14985. "timestamp": {
  14986. "type": "number"
  14987. },
  14988. "sessionID": {
  14989. "type": "string",
  14990. "pattern": "^ses"
  14991. },
  14992. "assistantMessageID": {
  14993. "type": "string"
  14994. },
  14995. "callID": {
  14996. "type": "string"
  14997. },
  14998. "name": {
  14999. "type": "string"
  15000. }
  15001. },
  15002. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15003. "additionalProperties": false
  15004. }
  15005. },
  15006. "required": ["id", "type", "properties"],
  15007. "additionalProperties": false
  15008. },
  15009. {
  15010. "type": "object",
  15011. "properties": {
  15012. "id": {
  15013. "type": "string"
  15014. },
  15015. "type": {
  15016. "type": "string",
  15017. "enum": ["session.next.tool.input.delta"]
  15018. },
  15019. "properties": {
  15020. "type": "object",
  15021. "properties": {
  15022. "timestamp": {
  15023. "type": "number"
  15024. },
  15025. "sessionID": {
  15026. "type": "string",
  15027. "pattern": "^ses"
  15028. },
  15029. "assistantMessageID": {
  15030. "type": "string"
  15031. },
  15032. "callID": {
  15033. "type": "string"
  15034. },
  15035. "delta": {
  15036. "type": "string"
  15037. }
  15038. },
  15039. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15040. "additionalProperties": false
  15041. }
  15042. },
  15043. "required": ["id", "type", "properties"],
  15044. "additionalProperties": false
  15045. },
  15046. {
  15047. "type": "object",
  15048. "properties": {
  15049. "id": {
  15050. "type": "string"
  15051. },
  15052. "type": {
  15053. "type": "string",
  15054. "enum": ["session.next.tool.input.ended"]
  15055. },
  15056. "properties": {
  15057. "type": "object",
  15058. "properties": {
  15059. "timestamp": {
  15060. "type": "number"
  15061. },
  15062. "sessionID": {
  15063. "type": "string",
  15064. "pattern": "^ses"
  15065. },
  15066. "assistantMessageID": {
  15067. "type": "string"
  15068. },
  15069. "callID": {
  15070. "type": "string"
  15071. },
  15072. "text": {
  15073. "type": "string"
  15074. }
  15075. },
  15076. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15077. "additionalProperties": false
  15078. }
  15079. },
  15080. "required": ["id", "type", "properties"],
  15081. "additionalProperties": false
  15082. },
  15083. {
  15084. "type": "object",
  15085. "properties": {
  15086. "id": {
  15087. "type": "string"
  15088. },
  15089. "type": {
  15090. "type": "string",
  15091. "enum": ["session.next.tool.called"]
  15092. },
  15093. "properties": {
  15094. "type": "object",
  15095. "properties": {
  15096. "timestamp": {
  15097. "type": "number"
  15098. },
  15099. "sessionID": {
  15100. "type": "string",
  15101. "pattern": "^ses"
  15102. },
  15103. "assistantMessageID": {
  15104. "type": "string"
  15105. },
  15106. "callID": {
  15107. "type": "string"
  15108. },
  15109. "tool": {
  15110. "type": "string"
  15111. },
  15112. "input": {
  15113. "type": "object"
  15114. },
  15115. "provider": {
  15116. "type": "object",
  15117. "properties": {
  15118. "executed": {
  15119. "type": "boolean"
  15120. },
  15121. "metadata": {
  15122. "type": "object",
  15123. "additionalProperties": {
  15124. "type": "object"
  15125. }
  15126. }
  15127. },
  15128. "required": ["executed"],
  15129. "additionalProperties": false
  15130. }
  15131. },
  15132. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15133. "additionalProperties": false
  15134. }
  15135. },
  15136. "required": ["id", "type", "properties"],
  15137. "additionalProperties": false
  15138. },
  15139. {
  15140. "type": "object",
  15141. "properties": {
  15142. "id": {
  15143. "type": "string"
  15144. },
  15145. "type": {
  15146. "type": "string",
  15147. "enum": ["session.next.tool.progress"]
  15148. },
  15149. "properties": {
  15150. "type": "object",
  15151. "properties": {
  15152. "timestamp": {
  15153. "type": "number"
  15154. },
  15155. "sessionID": {
  15156. "type": "string",
  15157. "pattern": "^ses"
  15158. },
  15159. "assistantMessageID": {
  15160. "type": "string"
  15161. },
  15162. "callID": {
  15163. "type": "string"
  15164. },
  15165. "structured": {
  15166. "type": "object"
  15167. },
  15168. "content": {
  15169. "type": "array",
  15170. "items": {
  15171. "anyOf": [
  15172. {
  15173. "$ref": "#/components/schemas/ToolTextContent"
  15174. },
  15175. {
  15176. "$ref": "#/components/schemas/ToolFileContent"
  15177. }
  15178. ]
  15179. }
  15180. }
  15181. },
  15182. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15183. "additionalProperties": false
  15184. }
  15185. },
  15186. "required": ["id", "type", "properties"],
  15187. "additionalProperties": false
  15188. },
  15189. {
  15190. "type": "object",
  15191. "properties": {
  15192. "id": {
  15193. "type": "string"
  15194. },
  15195. "type": {
  15196. "type": "string",
  15197. "enum": ["session.next.tool.success"]
  15198. },
  15199. "properties": {
  15200. "type": "object",
  15201. "properties": {
  15202. "timestamp": {
  15203. "type": "number"
  15204. },
  15205. "sessionID": {
  15206. "type": "string",
  15207. "pattern": "^ses"
  15208. },
  15209. "assistantMessageID": {
  15210. "type": "string"
  15211. },
  15212. "callID": {
  15213. "type": "string"
  15214. },
  15215. "structured": {
  15216. "type": "object"
  15217. },
  15218. "content": {
  15219. "type": "array",
  15220. "items": {
  15221. "anyOf": [
  15222. {
  15223. "$ref": "#/components/schemas/ToolTextContent"
  15224. },
  15225. {
  15226. "$ref": "#/components/schemas/ToolFileContent"
  15227. }
  15228. ]
  15229. }
  15230. },
  15231. "result": {},
  15232. "provider": {
  15233. "type": "object",
  15234. "properties": {
  15235. "executed": {
  15236. "type": "boolean"
  15237. },
  15238. "metadata": {
  15239. "type": "object",
  15240. "additionalProperties": {
  15241. "type": "object"
  15242. }
  15243. }
  15244. },
  15245. "required": ["executed"],
  15246. "additionalProperties": false
  15247. }
  15248. },
  15249. "required": [
  15250. "timestamp",
  15251. "sessionID",
  15252. "assistantMessageID",
  15253. "callID",
  15254. "structured",
  15255. "content",
  15256. "provider"
  15257. ],
  15258. "additionalProperties": false
  15259. }
  15260. },
  15261. "required": ["id", "type", "properties"],
  15262. "additionalProperties": false
  15263. },
  15264. {
  15265. "type": "object",
  15266. "properties": {
  15267. "id": {
  15268. "type": "string"
  15269. },
  15270. "type": {
  15271. "type": "string",
  15272. "enum": ["session.next.tool.failed"]
  15273. },
  15274. "properties": {
  15275. "type": "object",
  15276. "properties": {
  15277. "timestamp": {
  15278. "type": "number"
  15279. },
  15280. "sessionID": {
  15281. "type": "string",
  15282. "pattern": "^ses"
  15283. },
  15284. "assistantMessageID": {
  15285. "type": "string"
  15286. },
  15287. "callID": {
  15288. "type": "string"
  15289. },
  15290. "error": {
  15291. "$ref": "#/components/schemas/SessionErrorUnknown"
  15292. },
  15293. "result": {},
  15294. "provider": {
  15295. "type": "object",
  15296. "properties": {
  15297. "executed": {
  15298. "type": "boolean"
  15299. },
  15300. "metadata": {
  15301. "type": "object",
  15302. "additionalProperties": {
  15303. "type": "object"
  15304. }
  15305. }
  15306. },
  15307. "required": ["executed"],
  15308. "additionalProperties": false
  15309. }
  15310. },
  15311. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15312. "additionalProperties": false
  15313. }
  15314. },
  15315. "required": ["id", "type", "properties"],
  15316. "additionalProperties": false
  15317. },
  15318. {
  15319. "type": "object",
  15320. "properties": {
  15321. "id": {
  15322. "type": "string"
  15323. },
  15324. "type": {
  15325. "type": "string",
  15326. "enum": ["session.next.retried"]
  15327. },
  15328. "properties": {
  15329. "type": "object",
  15330. "properties": {
  15331. "timestamp": {
  15332. "type": "number"
  15333. },
  15334. "sessionID": {
  15335. "type": "string",
  15336. "pattern": "^ses"
  15337. },
  15338. "attempt": {
  15339. "type": "number"
  15340. },
  15341. "error": {
  15342. "$ref": "#/components/schemas/SessionNextRetry_error"
  15343. }
  15344. },
  15345. "required": ["timestamp", "sessionID", "attempt", "error"],
  15346. "additionalProperties": false
  15347. }
  15348. },
  15349. "required": ["id", "type", "properties"],
  15350. "additionalProperties": false
  15351. },
  15352. {
  15353. "type": "object",
  15354. "properties": {
  15355. "id": {
  15356. "type": "string"
  15357. },
  15358. "type": {
  15359. "type": "string",
  15360. "enum": ["session.next.compaction.started"]
  15361. },
  15362. "properties": {
  15363. "type": "object",
  15364. "properties": {
  15365. "timestamp": {
  15366. "type": "number"
  15367. },
  15368. "sessionID": {
  15369. "type": "string",
  15370. "pattern": "^ses"
  15371. },
  15372. "reason": {
  15373. "type": "string",
  15374. "enum": ["auto", "manual"]
  15375. }
  15376. },
  15377. "required": ["timestamp", "sessionID", "reason"],
  15378. "additionalProperties": false
  15379. }
  15380. },
  15381. "required": ["id", "type", "properties"],
  15382. "additionalProperties": false
  15383. },
  15384. {
  15385. "type": "object",
  15386. "properties": {
  15387. "id": {
  15388. "type": "string"
  15389. },
  15390. "type": {
  15391. "type": "string",
  15392. "enum": ["session.next.compaction.delta"]
  15393. },
  15394. "properties": {
  15395. "type": "object",
  15396. "properties": {
  15397. "timestamp": {
  15398. "type": "number"
  15399. },
  15400. "sessionID": {
  15401. "type": "string",
  15402. "pattern": "^ses"
  15403. },
  15404. "text": {
  15405. "type": "string"
  15406. }
  15407. },
  15408. "required": ["timestamp", "sessionID", "text"],
  15409. "additionalProperties": false
  15410. }
  15411. },
  15412. "required": ["id", "type", "properties"],
  15413. "additionalProperties": false
  15414. },
  15415. {
  15416. "type": "object",
  15417. "properties": {
  15418. "id": {
  15419. "type": "string"
  15420. },
  15421. "type": {
  15422. "type": "string",
  15423. "enum": ["session.next.compaction.ended"]
  15424. },
  15425. "properties": {
  15426. "type": "object",
  15427. "properties": {
  15428. "timestamp": {
  15429. "type": "number"
  15430. },
  15431. "sessionID": {
  15432. "type": "string",
  15433. "pattern": "^ses"
  15434. },
  15435. "text": {
  15436. "type": "string"
  15437. },
  15438. "include": {
  15439. "type": "string"
  15440. }
  15441. },
  15442. "required": ["timestamp", "sessionID", "text"],
  15443. "additionalProperties": false
  15444. }
  15445. },
  15446. "required": ["id", "type", "properties"],
  15447. "additionalProperties": false
  15448. },
  15449. {
  15450. "type": "object",
  15451. "properties": {
  15452. "id": {
  15453. "type": "string"
  15454. },
  15455. "type": {
  15456. "type": "string",
  15457. "enum": ["message.part.delta"]
  15458. },
  15459. "properties": {
  15460. "type": "object",
  15461. "properties": {
  15462. "sessionID": {
  15463. "type": "string",
  15464. "pattern": "^ses"
  15465. },
  15466. "messageID": {
  15467. "type": "string",
  15468. "pattern": "^msg"
  15469. },
  15470. "partID": {
  15471. "type": "string",
  15472. "pattern": "^prt"
  15473. },
  15474. "field": {
  15475. "type": "string"
  15476. },
  15477. "delta": {
  15478. "type": "string"
  15479. }
  15480. },
  15481. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15482. "additionalProperties": false
  15483. }
  15484. },
  15485. "required": ["id", "type", "properties"],
  15486. "additionalProperties": false
  15487. },
  15488. {
  15489. "type": "object",
  15490. "properties": {
  15491. "id": {
  15492. "type": "string"
  15493. },
  15494. "type": {
  15495. "type": "string",
  15496. "enum": ["session.diff"]
  15497. },
  15498. "properties": {
  15499. "type": "object",
  15500. "properties": {
  15501. "sessionID": {
  15502. "type": "string",
  15503. "pattern": "^ses"
  15504. },
  15505. "diff": {
  15506. "type": "array",
  15507. "items": {
  15508. "$ref": "#/components/schemas/SnapshotFileDiff"
  15509. }
  15510. }
  15511. },
  15512. "required": ["sessionID", "diff"],
  15513. "additionalProperties": false
  15514. }
  15515. },
  15516. "required": ["id", "type", "properties"],
  15517. "additionalProperties": false
  15518. },
  15519. {
  15520. "type": "object",
  15521. "properties": {
  15522. "id": {
  15523. "type": "string"
  15524. },
  15525. "type": {
  15526. "type": "string",
  15527. "enum": ["session.error"]
  15528. },
  15529. "properties": {
  15530. "type": "object",
  15531. "properties": {
  15532. "sessionID": {
  15533. "type": "string",
  15534. "pattern": "^ses"
  15535. },
  15536. "error": {
  15537. "anyOf": [
  15538. {
  15539. "$ref": "#/components/schemas/ProviderAuthError"
  15540. },
  15541. {
  15542. "$ref": "#/components/schemas/UnknownError"
  15543. },
  15544. {
  15545. "$ref": "#/components/schemas/MessageOutputLengthError"
  15546. },
  15547. {
  15548. "$ref": "#/components/schemas/MessageAbortedError"
  15549. },
  15550. {
  15551. "$ref": "#/components/schemas/StructuredOutputError"
  15552. },
  15553. {
  15554. "$ref": "#/components/schemas/ContextOverflowError"
  15555. },
  15556. {
  15557. "$ref": "#/components/schemas/APIError"
  15558. }
  15559. ]
  15560. }
  15561. },
  15562. "additionalProperties": false
  15563. }
  15564. },
  15565. "required": ["id", "type", "properties"],
  15566. "additionalProperties": false
  15567. },
  15568. {
  15569. "type": "object",
  15570. "properties": {
  15571. "id": {
  15572. "type": "string"
  15573. },
  15574. "type": {
  15575. "type": "string",
  15576. "enum": ["installation.updated"]
  15577. },
  15578. "properties": {
  15579. "type": "object",
  15580. "properties": {
  15581. "version": {
  15582. "type": "string"
  15583. }
  15584. },
  15585. "required": ["version"],
  15586. "additionalProperties": false
  15587. }
  15588. },
  15589. "required": ["id", "type", "properties"],
  15590. "additionalProperties": false
  15591. },
  15592. {
  15593. "type": "object",
  15594. "properties": {
  15595. "id": {
  15596. "type": "string"
  15597. },
  15598. "type": {
  15599. "type": "string",
  15600. "enum": ["installation.update-available"]
  15601. },
  15602. "properties": {
  15603. "type": "object",
  15604. "properties": {
  15605. "version": {
  15606. "type": "string"
  15607. }
  15608. },
  15609. "required": ["version"],
  15610. "additionalProperties": false
  15611. }
  15612. },
  15613. "required": ["id", "type", "properties"],
  15614. "additionalProperties": false
  15615. },
  15616. {
  15617. "type": "object",
  15618. "properties": {
  15619. "id": {
  15620. "type": "string"
  15621. },
  15622. "type": {
  15623. "type": "string",
  15624. "enum": ["file.edited"]
  15625. },
  15626. "properties": {
  15627. "type": "object",
  15628. "properties": {
  15629. "file": {
  15630. "type": "string"
  15631. }
  15632. },
  15633. "required": ["file"],
  15634. "additionalProperties": false
  15635. }
  15636. },
  15637. "required": ["id", "type", "properties"],
  15638. "additionalProperties": false
  15639. },
  15640. {
  15641. "type": "object",
  15642. "properties": {
  15643. "id": {
  15644. "type": "string"
  15645. },
  15646. "type": {
  15647. "type": "string",
  15648. "enum": ["account.added"]
  15649. },
  15650. "properties": {
  15651. "type": "object",
  15652. "properties": {
  15653. "account": {
  15654. "$ref": "#/components/schemas/AuthInfo"
  15655. }
  15656. },
  15657. "required": ["account"],
  15658. "additionalProperties": false
  15659. }
  15660. },
  15661. "required": ["id", "type", "properties"],
  15662. "additionalProperties": false
  15663. },
  15664. {
  15665. "type": "object",
  15666. "properties": {
  15667. "id": {
  15668. "type": "string"
  15669. },
  15670. "type": {
  15671. "type": "string",
  15672. "enum": ["account.removed"]
  15673. },
  15674. "properties": {
  15675. "type": "object",
  15676. "properties": {
  15677. "account": {
  15678. "$ref": "#/components/schemas/AuthInfo"
  15679. }
  15680. },
  15681. "required": ["account"],
  15682. "additionalProperties": false
  15683. }
  15684. },
  15685. "required": ["id", "type", "properties"],
  15686. "additionalProperties": false
  15687. },
  15688. {
  15689. "type": "object",
  15690. "properties": {
  15691. "id": {
  15692. "type": "string"
  15693. },
  15694. "type": {
  15695. "type": "string",
  15696. "enum": ["account.switched"]
  15697. },
  15698. "properties": {
  15699. "type": "object",
  15700. "properties": {
  15701. "serviceID": {
  15702. "type": "string"
  15703. },
  15704. "from": {
  15705. "type": "string"
  15706. },
  15707. "to": {
  15708. "type": "string"
  15709. }
  15710. },
  15711. "required": ["serviceID"],
  15712. "additionalProperties": false
  15713. }
  15714. },
  15715. "required": ["id", "type", "properties"],
  15716. "additionalProperties": false
  15717. },
  15718. {
  15719. "type": "object",
  15720. "properties": {
  15721. "id": {
  15722. "type": "string"
  15723. },
  15724. "type": {
  15725. "type": "string",
  15726. "enum": ["permission.v2.asked"]
  15727. },
  15728. "properties": {
  15729. "type": "object",
  15730. "properties": {
  15731. "id": {
  15732. "type": "string",
  15733. "pattern": "^per"
  15734. },
  15735. "sessionID": {
  15736. "type": "string",
  15737. "pattern": "^ses"
  15738. },
  15739. "action": {
  15740. "type": "string"
  15741. },
  15742. "resources": {
  15743. "type": "array",
  15744. "items": {
  15745. "type": "string"
  15746. }
  15747. },
  15748. "save": {
  15749. "type": "array",
  15750. "items": {
  15751. "type": "string"
  15752. }
  15753. },
  15754. "metadata": {
  15755. "type": "object"
  15756. },
  15757. "source": {
  15758. "$ref": "#/components/schemas/PermissionV2Source"
  15759. }
  15760. },
  15761. "required": ["id", "sessionID", "action", "resources"],
  15762. "additionalProperties": false
  15763. }
  15764. },
  15765. "required": ["id", "type", "properties"],
  15766. "additionalProperties": false
  15767. },
  15768. {
  15769. "type": "object",
  15770. "properties": {
  15771. "id": {
  15772. "type": "string"
  15773. },
  15774. "type": {
  15775. "type": "string",
  15776. "enum": ["permission.v2.replied"]
  15777. },
  15778. "properties": {
  15779. "type": "object",
  15780. "properties": {
  15781. "sessionID": {
  15782. "type": "string",
  15783. "pattern": "^ses"
  15784. },
  15785. "requestID": {
  15786. "type": "string",
  15787. "pattern": "^per"
  15788. },
  15789. "reply": {
  15790. "$ref": "#/components/schemas/PermissionV2Reply"
  15791. }
  15792. },
  15793. "required": ["sessionID", "requestID", "reply"],
  15794. "additionalProperties": false
  15795. }
  15796. },
  15797. "required": ["id", "type", "properties"],
  15798. "additionalProperties": false
  15799. },
  15800. {
  15801. "type": "object",
  15802. "properties": {
  15803. "id": {
  15804. "type": "string"
  15805. },
  15806. "type": {
  15807. "type": "string",
  15808. "enum": ["file.watcher.updated"]
  15809. },
  15810. "properties": {
  15811. "type": "object",
  15812. "properties": {
  15813. "file": {
  15814. "type": "string"
  15815. },
  15816. "event": {
  15817. "type": "string",
  15818. "enum": ["add", "change", "unlink"]
  15819. }
  15820. },
  15821. "required": ["file", "event"],
  15822. "additionalProperties": false
  15823. }
  15824. },
  15825. "required": ["id", "type", "properties"],
  15826. "additionalProperties": false
  15827. },
  15828. {
  15829. "type": "object",
  15830. "properties": {
  15831. "id": {
  15832. "type": "string"
  15833. },
  15834. "type": {
  15835. "type": "string",
  15836. "enum": ["pty.created"]
  15837. },
  15838. "properties": {
  15839. "type": "object",
  15840. "properties": {
  15841. "info": {
  15842. "$ref": "#/components/schemas/Pty"
  15843. }
  15844. },
  15845. "required": ["info"],
  15846. "additionalProperties": false
  15847. }
  15848. },
  15849. "required": ["id", "type", "properties"],
  15850. "additionalProperties": false
  15851. },
  15852. {
  15853. "type": "object",
  15854. "properties": {
  15855. "id": {
  15856. "type": "string"
  15857. },
  15858. "type": {
  15859. "type": "string",
  15860. "enum": ["pty.updated"]
  15861. },
  15862. "properties": {
  15863. "type": "object",
  15864. "properties": {
  15865. "info": {
  15866. "$ref": "#/components/schemas/Pty"
  15867. }
  15868. },
  15869. "required": ["info"],
  15870. "additionalProperties": false
  15871. }
  15872. },
  15873. "required": ["id", "type", "properties"],
  15874. "additionalProperties": false
  15875. },
  15876. {
  15877. "type": "object",
  15878. "properties": {
  15879. "id": {
  15880. "type": "string"
  15881. },
  15882. "type": {
  15883. "type": "string",
  15884. "enum": ["pty.exited"]
  15885. },
  15886. "properties": {
  15887. "type": "object",
  15888. "properties": {
  15889. "id": {
  15890. "type": "string",
  15891. "pattern": "^pty"
  15892. },
  15893. "exitCode": {
  15894. "type": "integer",
  15895. "minimum": 0
  15896. }
  15897. },
  15898. "required": ["id", "exitCode"],
  15899. "additionalProperties": false
  15900. }
  15901. },
  15902. "required": ["id", "type", "properties"],
  15903. "additionalProperties": false
  15904. },
  15905. {
  15906. "type": "object",
  15907. "properties": {
  15908. "id": {
  15909. "type": "string"
  15910. },
  15911. "type": {
  15912. "type": "string",
  15913. "enum": ["pty.deleted"]
  15914. },
  15915. "properties": {
  15916. "type": "object",
  15917. "properties": {
  15918. "id": {
  15919. "type": "string",
  15920. "pattern": "^pty"
  15921. }
  15922. },
  15923. "required": ["id"],
  15924. "additionalProperties": false
  15925. }
  15926. },
  15927. "required": ["id", "type", "properties"],
  15928. "additionalProperties": false
  15929. },
  15930. {
  15931. "type": "object",
  15932. "properties": {
  15933. "id": {
  15934. "type": "string"
  15935. },
  15936. "type": {
  15937. "type": "string",
  15938. "enum": ["question.v2.asked"]
  15939. },
  15940. "properties": {
  15941. "type": "object",
  15942. "properties": {
  15943. "id": {
  15944. "type": "string",
  15945. "pattern": "^que"
  15946. },
  15947. "sessionID": {
  15948. "type": "string",
  15949. "pattern": "^ses"
  15950. },
  15951. "questions": {
  15952. "type": "array",
  15953. "items": {
  15954. "$ref": "#/components/schemas/QuestionV2Info"
  15955. },
  15956. "description": "Questions to ask"
  15957. },
  15958. "tool": {
  15959. "$ref": "#/components/schemas/QuestionV2Tool"
  15960. }
  15961. },
  15962. "required": ["id", "sessionID", "questions"],
  15963. "additionalProperties": false
  15964. }
  15965. },
  15966. "required": ["id", "type", "properties"],
  15967. "additionalProperties": false
  15968. },
  15969. {
  15970. "type": "object",
  15971. "properties": {
  15972. "id": {
  15973. "type": "string"
  15974. },
  15975. "type": {
  15976. "type": "string",
  15977. "enum": ["question.v2.replied"]
  15978. },
  15979. "properties": {
  15980. "type": "object",
  15981. "properties": {
  15982. "sessionID": {
  15983. "type": "string",
  15984. "pattern": "^ses"
  15985. },
  15986. "requestID": {
  15987. "type": "string",
  15988. "pattern": "^que"
  15989. },
  15990. "answers": {
  15991. "type": "array",
  15992. "items": {
  15993. "$ref": "#/components/schemas/QuestionV2Answer"
  15994. }
  15995. }
  15996. },
  15997. "required": ["sessionID", "requestID", "answers"],
  15998. "additionalProperties": false
  15999. }
  16000. },
  16001. "required": ["id", "type", "properties"],
  16002. "additionalProperties": false
  16003. },
  16004. {
  16005. "type": "object",
  16006. "properties": {
  16007. "id": {
  16008. "type": "string"
  16009. },
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["question.v2.rejected"]
  16013. },
  16014. "properties": {
  16015. "type": "object",
  16016. "properties": {
  16017. "sessionID": {
  16018. "type": "string",
  16019. "pattern": "^ses"
  16020. },
  16021. "requestID": {
  16022. "type": "string",
  16023. "pattern": "^que"
  16024. }
  16025. },
  16026. "required": ["sessionID", "requestID"],
  16027. "additionalProperties": false
  16028. }
  16029. },
  16030. "required": ["id", "type", "properties"],
  16031. "additionalProperties": false
  16032. },
  16033. {
  16034. "type": "object",
  16035. "properties": {
  16036. "id": {
  16037. "type": "string"
  16038. },
  16039. "type": {
  16040. "type": "string",
  16041. "enum": ["todo.updated"]
  16042. },
  16043. "properties": {
  16044. "type": "object",
  16045. "properties": {
  16046. "sessionID": {
  16047. "type": "string",
  16048. "pattern": "^ses"
  16049. },
  16050. "todos": {
  16051. "type": "array",
  16052. "items": {
  16053. "$ref": "#/components/schemas/Todo"
  16054. }
  16055. }
  16056. },
  16057. "required": ["sessionID", "todos"],
  16058. "additionalProperties": false
  16059. }
  16060. },
  16061. "required": ["id", "type", "properties"],
  16062. "additionalProperties": false
  16063. },
  16064. {
  16065. "type": "object",
  16066. "properties": {
  16067. "id": {
  16068. "type": "string"
  16069. },
  16070. "type": {
  16071. "type": "string",
  16072. "enum": ["lsp.updated"]
  16073. },
  16074. "properties": {
  16075. "type": "object",
  16076. "properties": {}
  16077. }
  16078. },
  16079. "required": ["id", "type", "properties"],
  16080. "additionalProperties": false
  16081. },
  16082. {
  16083. "type": "object",
  16084. "properties": {
  16085. "id": {
  16086. "type": "string"
  16087. },
  16088. "type": {
  16089. "type": "string",
  16090. "enum": ["permission.asked"]
  16091. },
  16092. "properties": {
  16093. "type": "object",
  16094. "properties": {
  16095. "id": {
  16096. "type": "string",
  16097. "pattern": "^per"
  16098. },
  16099. "sessionID": {
  16100. "type": "string",
  16101. "pattern": "^ses"
  16102. },
  16103. "permission": {
  16104. "type": "string"
  16105. },
  16106. "patterns": {
  16107. "type": "array",
  16108. "items": {
  16109. "type": "string"
  16110. }
  16111. },
  16112. "metadata": {
  16113. "type": "object"
  16114. },
  16115. "always": {
  16116. "type": "array",
  16117. "items": {
  16118. "type": "string"
  16119. }
  16120. },
  16121. "tool": {
  16122. "type": "object",
  16123. "properties": {
  16124. "messageID": {
  16125. "type": "string"
  16126. },
  16127. "callID": {
  16128. "type": "string"
  16129. }
  16130. },
  16131. "required": ["messageID", "callID"],
  16132. "additionalProperties": false
  16133. }
  16134. },
  16135. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16136. "additionalProperties": false
  16137. }
  16138. },
  16139. "required": ["id", "type", "properties"],
  16140. "additionalProperties": false
  16141. },
  16142. {
  16143. "type": "object",
  16144. "properties": {
  16145. "id": {
  16146. "type": "string"
  16147. },
  16148. "type": {
  16149. "type": "string",
  16150. "enum": ["permission.replied"]
  16151. },
  16152. "properties": {
  16153. "type": "object",
  16154. "properties": {
  16155. "sessionID": {
  16156. "type": "string",
  16157. "pattern": "^ses"
  16158. },
  16159. "requestID": {
  16160. "type": "string",
  16161. "pattern": "^per"
  16162. },
  16163. "reply": {
  16164. "type": "string",
  16165. "enum": ["once", "always", "reject"]
  16166. }
  16167. },
  16168. "required": ["sessionID", "requestID", "reply"],
  16169. "additionalProperties": false
  16170. }
  16171. },
  16172. "required": ["id", "type", "properties"],
  16173. "additionalProperties": false
  16174. },
  16175. {
  16176. "type": "object",
  16177. "properties": {
  16178. "id": {
  16179. "type": "string"
  16180. },
  16181. "type": {
  16182. "type": "string",
  16183. "enum": ["tui.prompt.append"]
  16184. },
  16185. "properties": {
  16186. "type": "object",
  16187. "properties": {
  16188. "text": {
  16189. "type": "string"
  16190. }
  16191. },
  16192. "required": ["text"],
  16193. "additionalProperties": false
  16194. }
  16195. },
  16196. "required": ["id", "type", "properties"],
  16197. "additionalProperties": false
  16198. },
  16199. {
  16200. "type": "object",
  16201. "properties": {
  16202. "id": {
  16203. "type": "string"
  16204. },
  16205. "type": {
  16206. "type": "string",
  16207. "enum": ["tui.command.execute"]
  16208. },
  16209. "properties": {
  16210. "type": "object",
  16211. "properties": {
  16212. "command": {
  16213. "anyOf": [
  16214. {
  16215. "type": "string",
  16216. "enum": [
  16217. "session.list",
  16218. "session.new",
  16219. "session.share",
  16220. "session.interrupt",
  16221. "session.compact",
  16222. "session.page.up",
  16223. "session.page.down",
  16224. "session.line.up",
  16225. "session.line.down",
  16226. "session.half.page.up",
  16227. "session.half.page.down",
  16228. "session.first",
  16229. "session.last",
  16230. "prompt.clear",
  16231. "prompt.submit",
  16232. "agent.cycle"
  16233. ]
  16234. },
  16235. {
  16236. "type": "string"
  16237. }
  16238. ]
  16239. }
  16240. },
  16241. "required": ["command"],
  16242. "additionalProperties": false
  16243. }
  16244. },
  16245. "required": ["id", "type", "properties"],
  16246. "additionalProperties": false
  16247. },
  16248. {
  16249. "type": "object",
  16250. "properties": {
  16251. "id": {
  16252. "type": "string"
  16253. },
  16254. "type": {
  16255. "type": "string",
  16256. "enum": ["tui.toast.show"]
  16257. },
  16258. "properties": {
  16259. "type": "object",
  16260. "properties": {
  16261. "title": {
  16262. "type": "string"
  16263. },
  16264. "message": {
  16265. "type": "string"
  16266. },
  16267. "variant": {
  16268. "type": "string",
  16269. "enum": ["info", "success", "warning", "error"]
  16270. },
  16271. "duration": {
  16272. "type": "integer",
  16273. "exclusiveMinimum": 0
  16274. }
  16275. },
  16276. "required": ["message", "variant"],
  16277. "additionalProperties": false
  16278. }
  16279. },
  16280. "required": ["id", "type", "properties"],
  16281. "additionalProperties": false
  16282. },
  16283. {
  16284. "type": "object",
  16285. "properties": {
  16286. "id": {
  16287. "type": "string"
  16288. },
  16289. "type": {
  16290. "type": "string",
  16291. "enum": ["tui.session.select"]
  16292. },
  16293. "properties": {
  16294. "type": "object",
  16295. "properties": {
  16296. "sessionID": {
  16297. "type": "string",
  16298. "pattern": "^ses",
  16299. "description": "Session ID to navigate to"
  16300. }
  16301. },
  16302. "required": ["sessionID"],
  16303. "additionalProperties": false
  16304. }
  16305. },
  16306. "required": ["id", "type", "properties"],
  16307. "additionalProperties": false
  16308. },
  16309. {
  16310. "type": "object",
  16311. "properties": {
  16312. "id": {
  16313. "type": "string"
  16314. },
  16315. "type": {
  16316. "type": "string",
  16317. "enum": ["mcp.tools.changed"]
  16318. },
  16319. "properties": {
  16320. "type": "object",
  16321. "properties": {
  16322. "server": {
  16323. "type": "string"
  16324. }
  16325. },
  16326. "required": ["server"],
  16327. "additionalProperties": false
  16328. }
  16329. },
  16330. "required": ["id", "type", "properties"],
  16331. "additionalProperties": false
  16332. },
  16333. {
  16334. "type": "object",
  16335. "properties": {
  16336. "id": {
  16337. "type": "string"
  16338. },
  16339. "type": {
  16340. "type": "string",
  16341. "enum": ["mcp.browser.open.failed"]
  16342. },
  16343. "properties": {
  16344. "type": "object",
  16345. "properties": {
  16346. "mcpName": {
  16347. "type": "string"
  16348. },
  16349. "url": {
  16350. "type": "string"
  16351. }
  16352. },
  16353. "required": ["mcpName", "url"],
  16354. "additionalProperties": false
  16355. }
  16356. },
  16357. "required": ["id", "type", "properties"],
  16358. "additionalProperties": false
  16359. },
  16360. {
  16361. "type": "object",
  16362. "properties": {
  16363. "id": {
  16364. "type": "string"
  16365. },
  16366. "type": {
  16367. "type": "string",
  16368. "enum": ["command.executed"]
  16369. },
  16370. "properties": {
  16371. "type": "object",
  16372. "properties": {
  16373. "name": {
  16374. "type": "string"
  16375. },
  16376. "sessionID": {
  16377. "type": "string",
  16378. "pattern": "^ses"
  16379. },
  16380. "arguments": {
  16381. "type": "string"
  16382. },
  16383. "messageID": {
  16384. "type": "string",
  16385. "pattern": "^msg"
  16386. }
  16387. },
  16388. "required": ["name", "sessionID", "arguments", "messageID"],
  16389. "additionalProperties": false
  16390. }
  16391. },
  16392. "required": ["id", "type", "properties"],
  16393. "additionalProperties": false
  16394. },
  16395. {
  16396. "type": "object",
  16397. "properties": {
  16398. "id": {
  16399. "type": "string"
  16400. },
  16401. "type": {
  16402. "type": "string",
  16403. "enum": ["project.directories.updated"]
  16404. },
  16405. "properties": {
  16406. "type": "object",
  16407. "properties": {
  16408. "projectID": {
  16409. "type": "string"
  16410. }
  16411. },
  16412. "required": ["projectID"],
  16413. "additionalProperties": false
  16414. }
  16415. },
  16416. "required": ["id", "type", "properties"],
  16417. "additionalProperties": false
  16418. },
  16419. {
  16420. "type": "object",
  16421. "properties": {
  16422. "id": {
  16423. "type": "string"
  16424. },
  16425. "type": {
  16426. "type": "string",
  16427. "enum": ["project.updated"]
  16428. },
  16429. "properties": {
  16430. "type": "object",
  16431. "properties": {
  16432. "id": {
  16433. "type": "string"
  16434. },
  16435. "worktree": {
  16436. "type": "string"
  16437. },
  16438. "vcs": {
  16439. "type": "string",
  16440. "enum": ["git"]
  16441. },
  16442. "name": {
  16443. "type": "string"
  16444. },
  16445. "icon": {
  16446. "type": "object",
  16447. "properties": {
  16448. "url": {
  16449. "type": "string"
  16450. },
  16451. "override": {
  16452. "type": "string"
  16453. },
  16454. "color": {
  16455. "type": "string"
  16456. }
  16457. },
  16458. "additionalProperties": false
  16459. },
  16460. "commands": {
  16461. "type": "object",
  16462. "properties": {
  16463. "start": {
  16464. "type": "string",
  16465. "description": "Startup script to run when creating a new workspace (worktree)"
  16466. }
  16467. },
  16468. "additionalProperties": false
  16469. },
  16470. "time": {
  16471. "type": "object",
  16472. "properties": {
  16473. "created": {
  16474. "type": "integer",
  16475. "minimum": 0
  16476. },
  16477. "updated": {
  16478. "type": "integer",
  16479. "minimum": 0
  16480. },
  16481. "initialized": {
  16482. "type": "integer",
  16483. "minimum": 0
  16484. }
  16485. },
  16486. "required": ["created", "updated"],
  16487. "additionalProperties": false
  16488. },
  16489. "sandboxes": {
  16490. "type": "array",
  16491. "items": {
  16492. "type": "string"
  16493. }
  16494. }
  16495. },
  16496. "required": ["id", "worktree", "time", "sandboxes"],
  16497. "additionalProperties": false
  16498. }
  16499. },
  16500. "required": ["id", "type", "properties"],
  16501. "additionalProperties": false
  16502. },
  16503. {
  16504. "type": "object",
  16505. "properties": {
  16506. "id": {
  16507. "type": "string"
  16508. },
  16509. "type": {
  16510. "type": "string",
  16511. "enum": ["question.asked"]
  16512. },
  16513. "properties": {
  16514. "type": "object",
  16515. "properties": {
  16516. "id": {
  16517. "type": "string",
  16518. "pattern": "^que"
  16519. },
  16520. "sessionID": {
  16521. "type": "string",
  16522. "pattern": "^ses"
  16523. },
  16524. "questions": {
  16525. "type": "array",
  16526. "items": {
  16527. "$ref": "#/components/schemas/QuestionInfo"
  16528. },
  16529. "description": "Questions to ask"
  16530. },
  16531. "tool": {
  16532. "$ref": "#/components/schemas/QuestionTool"
  16533. }
  16534. },
  16535. "required": ["id", "sessionID", "questions"],
  16536. "additionalProperties": false
  16537. }
  16538. },
  16539. "required": ["id", "type", "properties"],
  16540. "additionalProperties": false
  16541. },
  16542. {
  16543. "type": "object",
  16544. "properties": {
  16545. "id": {
  16546. "type": "string"
  16547. },
  16548. "type": {
  16549. "type": "string",
  16550. "enum": ["question.replied"]
  16551. },
  16552. "properties": {
  16553. "type": "object",
  16554. "properties": {
  16555. "sessionID": {
  16556. "type": "string",
  16557. "pattern": "^ses"
  16558. },
  16559. "requestID": {
  16560. "type": "string",
  16561. "pattern": "^que"
  16562. },
  16563. "answers": {
  16564. "type": "array",
  16565. "items": {
  16566. "$ref": "#/components/schemas/QuestionAnswer"
  16567. }
  16568. }
  16569. },
  16570. "required": ["sessionID", "requestID", "answers"],
  16571. "additionalProperties": false
  16572. }
  16573. },
  16574. "required": ["id", "type", "properties"],
  16575. "additionalProperties": false
  16576. },
  16577. {
  16578. "type": "object",
  16579. "properties": {
  16580. "id": {
  16581. "type": "string"
  16582. },
  16583. "type": {
  16584. "type": "string",
  16585. "enum": ["question.rejected"]
  16586. },
  16587. "properties": {
  16588. "type": "object",
  16589. "properties": {
  16590. "sessionID": {
  16591. "type": "string",
  16592. "pattern": "^ses"
  16593. },
  16594. "requestID": {
  16595. "type": "string",
  16596. "pattern": "^que"
  16597. }
  16598. },
  16599. "required": ["sessionID", "requestID"],
  16600. "additionalProperties": false
  16601. }
  16602. },
  16603. "required": ["id", "type", "properties"],
  16604. "additionalProperties": false
  16605. },
  16606. {
  16607. "type": "object",
  16608. "properties": {
  16609. "id": {
  16610. "type": "string"
  16611. },
  16612. "type": {
  16613. "type": "string",
  16614. "enum": ["session.status"]
  16615. },
  16616. "properties": {
  16617. "type": "object",
  16618. "properties": {
  16619. "sessionID": {
  16620. "type": "string",
  16621. "pattern": "^ses"
  16622. },
  16623. "status": {
  16624. "$ref": "#/components/schemas/SessionStatus"
  16625. }
  16626. },
  16627. "required": ["sessionID", "status"],
  16628. "additionalProperties": false
  16629. }
  16630. },
  16631. "required": ["id", "type", "properties"],
  16632. "additionalProperties": false
  16633. },
  16634. {
  16635. "type": "object",
  16636. "properties": {
  16637. "id": {
  16638. "type": "string"
  16639. },
  16640. "type": {
  16641. "type": "string",
  16642. "enum": ["session.idle"]
  16643. },
  16644. "properties": {
  16645. "type": "object",
  16646. "properties": {
  16647. "sessionID": {
  16648. "type": "string",
  16649. "pattern": "^ses"
  16650. }
  16651. },
  16652. "required": ["sessionID"],
  16653. "additionalProperties": false
  16654. }
  16655. },
  16656. "required": ["id", "type", "properties"],
  16657. "additionalProperties": false
  16658. },
  16659. {
  16660. "type": "object",
  16661. "properties": {
  16662. "id": {
  16663. "type": "string"
  16664. },
  16665. "type": {
  16666. "type": "string",
  16667. "enum": ["session.compacted"]
  16668. },
  16669. "properties": {
  16670. "type": "object",
  16671. "properties": {
  16672. "sessionID": {
  16673. "type": "string",
  16674. "pattern": "^ses"
  16675. }
  16676. },
  16677. "required": ["sessionID"],
  16678. "additionalProperties": false
  16679. }
  16680. },
  16681. "required": ["id", "type", "properties"],
  16682. "additionalProperties": false
  16683. },
  16684. {
  16685. "type": "object",
  16686. "properties": {
  16687. "id": {
  16688. "type": "string"
  16689. },
  16690. "type": {
  16691. "type": "string",
  16692. "enum": ["vcs.branch.updated"]
  16693. },
  16694. "properties": {
  16695. "type": "object",
  16696. "properties": {
  16697. "branch": {
  16698. "type": "string"
  16699. }
  16700. },
  16701. "additionalProperties": false
  16702. }
  16703. },
  16704. "required": ["id", "type", "properties"],
  16705. "additionalProperties": false
  16706. },
  16707. {
  16708. "type": "object",
  16709. "properties": {
  16710. "id": {
  16711. "type": "string"
  16712. },
  16713. "type": {
  16714. "type": "string",
  16715. "enum": ["worktree.ready"]
  16716. },
  16717. "properties": {
  16718. "type": "object",
  16719. "properties": {
  16720. "name": {
  16721. "type": "string"
  16722. },
  16723. "branch": {
  16724. "type": "string"
  16725. }
  16726. },
  16727. "required": ["name"],
  16728. "additionalProperties": false
  16729. }
  16730. },
  16731. "required": ["id", "type", "properties"],
  16732. "additionalProperties": false
  16733. },
  16734. {
  16735. "type": "object",
  16736. "properties": {
  16737. "id": {
  16738. "type": "string"
  16739. },
  16740. "type": {
  16741. "type": "string",
  16742. "enum": ["worktree.failed"]
  16743. },
  16744. "properties": {
  16745. "type": "object",
  16746. "properties": {
  16747. "message": {
  16748. "type": "string"
  16749. }
  16750. },
  16751. "required": ["message"],
  16752. "additionalProperties": false
  16753. }
  16754. },
  16755. "required": ["id", "type", "properties"],
  16756. "additionalProperties": false
  16757. },
  16758. {
  16759. "type": "object",
  16760. "properties": {
  16761. "id": {
  16762. "type": "string"
  16763. },
  16764. "type": {
  16765. "type": "string",
  16766. "enum": ["workspace.ready"]
  16767. },
  16768. "properties": {
  16769. "type": "object",
  16770. "properties": {
  16771. "name": {
  16772. "type": "string"
  16773. }
  16774. },
  16775. "required": ["name"],
  16776. "additionalProperties": false
  16777. }
  16778. },
  16779. "required": ["id", "type", "properties"],
  16780. "additionalProperties": false
  16781. },
  16782. {
  16783. "type": "object",
  16784. "properties": {
  16785. "id": {
  16786. "type": "string"
  16787. },
  16788. "type": {
  16789. "type": "string",
  16790. "enum": ["workspace.failed"]
  16791. },
  16792. "properties": {
  16793. "type": "object",
  16794. "properties": {
  16795. "message": {
  16796. "type": "string"
  16797. }
  16798. },
  16799. "required": ["message"],
  16800. "additionalProperties": false
  16801. }
  16802. },
  16803. "required": ["id", "type", "properties"],
  16804. "additionalProperties": false
  16805. },
  16806. {
  16807. "type": "object",
  16808. "properties": {
  16809. "id": {
  16810. "type": "string"
  16811. },
  16812. "type": {
  16813. "type": "string",
  16814. "enum": ["workspace.status"]
  16815. },
  16816. "properties": {
  16817. "type": "object",
  16818. "properties": {
  16819. "workspaceID": {
  16820. "type": "string",
  16821. "pattern": "^wrk"
  16822. },
  16823. "status": {
  16824. "type": "string",
  16825. "enum": ["connected", "connecting", "disconnected", "error"]
  16826. }
  16827. },
  16828. "required": ["workspaceID", "status"],
  16829. "additionalProperties": false
  16830. }
  16831. },
  16832. "required": ["id", "type", "properties"],
  16833. "additionalProperties": false
  16834. },
  16835. {
  16836. "type": "object",
  16837. "properties": {
  16838. "id": {
  16839. "type": "string"
  16840. },
  16841. "type": {
  16842. "type": "string",
  16843. "enum": ["server.connected"]
  16844. },
  16845. "properties": {
  16846. "type": "object",
  16847. "properties": {}
  16848. }
  16849. },
  16850. "required": ["id", "type", "properties"],
  16851. "additionalProperties": false
  16852. },
  16853. {
  16854. "type": "object",
  16855. "properties": {
  16856. "id": {
  16857. "type": "string"
  16858. },
  16859. "type": {
  16860. "type": "string",
  16861. "enum": ["global.disposed"]
  16862. },
  16863. "properties": {
  16864. "type": "object",
  16865. "properties": {}
  16866. }
  16867. },
  16868. "required": ["id", "type", "properties"],
  16869. "additionalProperties": false
  16870. },
  16871. {
  16872. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  16873. },
  16874. {
  16875. "$ref": "#/components/schemas/SyncEventSessionCreated"
  16876. },
  16877. {
  16878. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  16879. },
  16880. {
  16881. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  16882. },
  16883. {
  16884. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  16885. },
  16886. {
  16887. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  16888. },
  16889. {
  16890. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  16891. },
  16892. {
  16893. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  16894. },
  16895. {
  16896. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  16897. },
  16898. {
  16899. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  16900. },
  16901. {
  16902. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  16903. },
  16904. {
  16905. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  16906. },
  16907. {
  16908. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  16909. },
  16910. {
  16911. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  16912. },
  16913. {
  16914. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  16915. },
  16916. {
  16917. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  16918. },
  16919. {
  16920. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  16921. },
  16922. {
  16923. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  16924. },
  16925. {
  16926. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  16927. },
  16928. {
  16929. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  16930. },
  16931. {
  16932. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  16933. },
  16934. {
  16935. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  16936. },
  16937. {
  16938. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  16939. },
  16940. {
  16941. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  16942. },
  16943. {
  16944. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  16945. },
  16946. {
  16947. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  16948. },
  16949. {
  16950. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  16951. },
  16952. {
  16953. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  16954. },
  16955. {
  16956. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  16957. },
  16958. {
  16959. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  16960. },
  16961. {
  16962. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  16963. },
  16964. {
  16965. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  16966. }
  16967. ]
  16968. }
  16969. },
  16970. "required": ["directory", "payload"],
  16971. "additionalProperties": false
  16972. },
  16973. "LogLevel": {
  16974. "type": "string",
  16975. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  16976. "description": "Log level"
  16977. },
  16978. "ServerConfig": {
  16979. "type": "object",
  16980. "properties": {
  16981. "port": {
  16982. "type": "integer",
  16983. "exclusiveMinimum": 0
  16984. },
  16985. "hostname": {
  16986. "type": "string"
  16987. },
  16988. "mdns": {
  16989. "type": "boolean"
  16990. },
  16991. "mdnsDomain": {
  16992. "type": "string"
  16993. },
  16994. "cors": {
  16995. "type": "array",
  16996. "items": {
  16997. "type": "string"
  16998. }
  16999. }
  17000. },
  17001. "additionalProperties": false,
  17002. "description": "Server configuration for opencode serve and web commands"
  17003. },
  17004. "ReferenceConfigEntry": {
  17005. "anyOf": [
  17006. {
  17007. "type": "string"
  17008. },
  17009. {
  17010. "type": "object",
  17011. "properties": {
  17012. "repository": {
  17013. "type": "string",
  17014. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17015. },
  17016. "branch": {
  17017. "type": "string"
  17018. }
  17019. },
  17020. "required": ["repository"],
  17021. "additionalProperties": false
  17022. },
  17023. {
  17024. "type": "object",
  17025. "properties": {
  17026. "path": {
  17027. "type": "string",
  17028. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17029. }
  17030. },
  17031. "required": ["path"],
  17032. "additionalProperties": false
  17033. }
  17034. ]
  17035. },
  17036. "ReferenceConfig": {
  17037. "type": "object",
  17038. "additionalProperties": {
  17039. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17040. }
  17041. },
  17042. "PermissionActionConfig": {
  17043. "type": "string",
  17044. "enum": ["ask", "allow", "deny"]
  17045. },
  17046. "PermissionObjectConfig": {
  17047. "type": "object",
  17048. "additionalProperties": {
  17049. "$ref": "#/components/schemas/PermissionActionConfig"
  17050. }
  17051. },
  17052. "PermissionRuleConfig": {
  17053. "anyOf": [
  17054. {
  17055. "$ref": "#/components/schemas/PermissionActionConfig"
  17056. },
  17057. {
  17058. "$ref": "#/components/schemas/PermissionObjectConfig"
  17059. }
  17060. ]
  17061. },
  17062. "PermissionConfig": {
  17063. "anyOf": [
  17064. {
  17065. "$ref": "#/components/schemas/PermissionActionConfig"
  17066. },
  17067. {
  17068. "type": "object",
  17069. "properties": {
  17070. "read": {
  17071. "$ref": "#/components/schemas/PermissionRuleConfig"
  17072. },
  17073. "edit": {
  17074. "$ref": "#/components/schemas/PermissionRuleConfig"
  17075. },
  17076. "glob": {
  17077. "$ref": "#/components/schemas/PermissionRuleConfig"
  17078. },
  17079. "grep": {
  17080. "$ref": "#/components/schemas/PermissionRuleConfig"
  17081. },
  17082. "list": {
  17083. "$ref": "#/components/schemas/PermissionRuleConfig"
  17084. },
  17085. "bash": {
  17086. "$ref": "#/components/schemas/PermissionRuleConfig"
  17087. },
  17088. "task": {
  17089. "$ref": "#/components/schemas/PermissionRuleConfig"
  17090. },
  17091. "external_directory": {
  17092. "$ref": "#/components/schemas/PermissionRuleConfig"
  17093. },
  17094. "todowrite": {
  17095. "$ref": "#/components/schemas/PermissionActionConfig"
  17096. },
  17097. "question": {
  17098. "$ref": "#/components/schemas/PermissionActionConfig"
  17099. },
  17100. "webfetch": {
  17101. "$ref": "#/components/schemas/PermissionActionConfig"
  17102. },
  17103. "websearch": {
  17104. "$ref": "#/components/schemas/PermissionActionConfig"
  17105. },
  17106. "lsp": {
  17107. "$ref": "#/components/schemas/PermissionRuleConfig"
  17108. },
  17109. "doom_loop": {
  17110. "$ref": "#/components/schemas/PermissionActionConfig"
  17111. },
  17112. "skill": {
  17113. "$ref": "#/components/schemas/PermissionRuleConfig"
  17114. }
  17115. },
  17116. "additionalProperties": {
  17117. "$ref": "#/components/schemas/PermissionRuleConfig"
  17118. }
  17119. }
  17120. ]
  17121. },
  17122. "AgentConfig": {
  17123. "type": "object",
  17124. "properties": {
  17125. "model": {
  17126. "type": "string"
  17127. },
  17128. "variant": {
  17129. "type": "string"
  17130. },
  17131. "temperature": {
  17132. "type": "number"
  17133. },
  17134. "top_p": {
  17135. "type": "number"
  17136. },
  17137. "prompt": {
  17138. "type": "string"
  17139. },
  17140. "tools": {
  17141. "type": "object",
  17142. "additionalProperties": {
  17143. "type": "boolean"
  17144. }
  17145. },
  17146. "disable": {
  17147. "type": "boolean"
  17148. },
  17149. "description": {
  17150. "type": "string"
  17151. },
  17152. "mode": {
  17153. "type": "string",
  17154. "enum": ["subagent", "primary", "all"]
  17155. },
  17156. "hidden": {
  17157. "type": "boolean"
  17158. },
  17159. "options": {
  17160. "type": "object"
  17161. },
  17162. "color": {
  17163. "anyOf": [
  17164. {
  17165. "type": "string",
  17166. "pattern": "^#[0-9a-fA-F]{6}$"
  17167. },
  17168. {
  17169. "type": "string",
  17170. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17171. }
  17172. ],
  17173. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17174. },
  17175. "steps": {
  17176. "type": "integer",
  17177. "exclusiveMinimum": 0
  17178. },
  17179. "maxSteps": {
  17180. "type": "integer",
  17181. "exclusiveMinimum": 0
  17182. },
  17183. "permission": {
  17184. "$ref": "#/components/schemas/PermissionConfig"
  17185. }
  17186. },
  17187. "additionalProperties": {}
  17188. },
  17189. "ProviderConfig": {
  17190. "type": "object",
  17191. "properties": {
  17192. "api": {
  17193. "type": "string"
  17194. },
  17195. "name": {
  17196. "type": "string"
  17197. },
  17198. "env": {
  17199. "type": "array",
  17200. "items": {
  17201. "type": "string"
  17202. }
  17203. },
  17204. "id": {
  17205. "type": "string"
  17206. },
  17207. "npm": {
  17208. "type": "string"
  17209. },
  17210. "whitelist": {
  17211. "type": "array",
  17212. "items": {
  17213. "type": "string"
  17214. }
  17215. },
  17216. "blacklist": {
  17217. "type": "array",
  17218. "items": {
  17219. "type": "string"
  17220. }
  17221. },
  17222. "options": {
  17223. "type": "object",
  17224. "properties": {
  17225. "apiKey": {
  17226. "type": "string"
  17227. },
  17228. "baseURL": {
  17229. "type": "string"
  17230. },
  17231. "enterpriseUrl": {
  17232. "type": "string"
  17233. },
  17234. "setCacheKey": {
  17235. "type": "boolean"
  17236. },
  17237. "timeout": {
  17238. "anyOf": [
  17239. {
  17240. "type": "integer",
  17241. "exclusiveMinimum": 0
  17242. },
  17243. {
  17244. "type": "boolean",
  17245. "enum": [false]
  17246. }
  17247. ],
  17248. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17249. },
  17250. "headerTimeout": {
  17251. "anyOf": [
  17252. {
  17253. "type": "integer",
  17254. "exclusiveMinimum": 0
  17255. },
  17256. {
  17257. "type": "boolean",
  17258. "enum": [false]
  17259. }
  17260. ],
  17261. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17262. },
  17263. "chunkTimeout": {
  17264. "type": "integer",
  17265. "exclusiveMinimum": 0
  17266. }
  17267. },
  17268. "additionalProperties": {}
  17269. },
  17270. "models": {
  17271. "type": "object",
  17272. "additionalProperties": {
  17273. "type": "object",
  17274. "properties": {
  17275. "id": {
  17276. "type": "string"
  17277. },
  17278. "name": {
  17279. "type": "string"
  17280. },
  17281. "family": {
  17282. "type": "string"
  17283. },
  17284. "release_date": {
  17285. "type": "string"
  17286. },
  17287. "attachment": {
  17288. "type": "boolean"
  17289. },
  17290. "reasoning": {
  17291. "type": "boolean"
  17292. },
  17293. "temperature": {
  17294. "type": "boolean"
  17295. },
  17296. "tool_call": {
  17297. "type": "boolean"
  17298. },
  17299. "interleaved": {
  17300. "anyOf": [
  17301. {
  17302. "type": "boolean",
  17303. "enum": [true]
  17304. },
  17305. {
  17306. "type": "object",
  17307. "properties": {
  17308. "field": {
  17309. "type": "string",
  17310. "enum": ["reasoning_content", "reasoning_details"]
  17311. }
  17312. },
  17313. "required": ["field"],
  17314. "additionalProperties": false
  17315. }
  17316. ]
  17317. },
  17318. "cost": {
  17319. "type": "object",
  17320. "properties": {
  17321. "input": {
  17322. "type": "number"
  17323. },
  17324. "output": {
  17325. "type": "number"
  17326. },
  17327. "cache_read": {
  17328. "type": "number"
  17329. },
  17330. "cache_write": {
  17331. "type": "number"
  17332. },
  17333. "context_over_200k": {
  17334. "type": "object",
  17335. "properties": {
  17336. "input": {
  17337. "type": "number"
  17338. },
  17339. "output": {
  17340. "type": "number"
  17341. },
  17342. "cache_read": {
  17343. "type": "number"
  17344. },
  17345. "cache_write": {
  17346. "type": "number"
  17347. }
  17348. },
  17349. "required": ["input", "output"],
  17350. "additionalProperties": false
  17351. }
  17352. },
  17353. "required": ["input", "output"],
  17354. "additionalProperties": false
  17355. },
  17356. "limit": {
  17357. "type": "object",
  17358. "properties": {
  17359. "context": {
  17360. "type": "number"
  17361. },
  17362. "input": {
  17363. "type": "number"
  17364. },
  17365. "output": {
  17366. "type": "number"
  17367. }
  17368. },
  17369. "required": ["context", "output"],
  17370. "additionalProperties": false
  17371. },
  17372. "modalities": {
  17373. "type": "object",
  17374. "properties": {
  17375. "input": {
  17376. "type": "array",
  17377. "items": {
  17378. "type": "string",
  17379. "enum": ["text", "audio", "image", "video", "pdf"]
  17380. }
  17381. },
  17382. "output": {
  17383. "type": "array",
  17384. "items": {
  17385. "type": "string",
  17386. "enum": ["text", "audio", "image", "video", "pdf"]
  17387. }
  17388. }
  17389. },
  17390. "additionalProperties": false
  17391. },
  17392. "experimental": {
  17393. "type": "boolean"
  17394. },
  17395. "status": {
  17396. "type": "string",
  17397. "enum": ["alpha", "beta", "deprecated", "active"]
  17398. },
  17399. "provider": {
  17400. "type": "object",
  17401. "properties": {
  17402. "npm": {
  17403. "type": "string"
  17404. },
  17405. "api": {
  17406. "type": "string"
  17407. }
  17408. },
  17409. "additionalProperties": false
  17410. },
  17411. "options": {
  17412. "type": "object"
  17413. },
  17414. "headers": {
  17415. "type": "object",
  17416. "additionalProperties": {
  17417. "type": "string"
  17418. }
  17419. },
  17420. "variants": {
  17421. "type": "object",
  17422. "additionalProperties": {
  17423. "type": "object",
  17424. "properties": {
  17425. "disabled": {
  17426. "type": "boolean"
  17427. }
  17428. },
  17429. "additionalProperties": {}
  17430. },
  17431. "description": "Variant-specific configuration"
  17432. }
  17433. },
  17434. "additionalProperties": false
  17435. }
  17436. }
  17437. },
  17438. "additionalProperties": false
  17439. },
  17440. "McpLocalConfig": {
  17441. "type": "object",
  17442. "properties": {
  17443. "type": {
  17444. "type": "string",
  17445. "enum": ["local"],
  17446. "description": "Type of MCP server connection"
  17447. },
  17448. "command": {
  17449. "type": "array",
  17450. "items": {
  17451. "type": "string"
  17452. },
  17453. "description": "Command and arguments to run the MCP server"
  17454. },
  17455. "environment": {
  17456. "type": "object",
  17457. "additionalProperties": {
  17458. "type": "string"
  17459. }
  17460. },
  17461. "enabled": {
  17462. "type": "boolean"
  17463. },
  17464. "timeout": {
  17465. "type": "integer",
  17466. "exclusiveMinimum": 0
  17467. }
  17468. },
  17469. "required": ["type", "command"],
  17470. "additionalProperties": false
  17471. },
  17472. "McpOAuthConfig": {
  17473. "type": "object",
  17474. "properties": {
  17475. "clientId": {
  17476. "type": "string"
  17477. },
  17478. "clientSecret": {
  17479. "type": "string"
  17480. },
  17481. "scope": {
  17482. "type": "string"
  17483. },
  17484. "callbackPort": {
  17485. "type": "integer",
  17486. "minimum": 1,
  17487. "maximum": 65535
  17488. },
  17489. "redirectUri": {
  17490. "type": "string"
  17491. }
  17492. },
  17493. "additionalProperties": false
  17494. },
  17495. "McpRemoteConfig": {
  17496. "type": "object",
  17497. "properties": {
  17498. "type": {
  17499. "type": "string",
  17500. "enum": ["remote"],
  17501. "description": "Type of MCP server connection"
  17502. },
  17503. "url": {
  17504. "type": "string",
  17505. "description": "URL of the remote MCP server"
  17506. },
  17507. "enabled": {
  17508. "type": "boolean"
  17509. },
  17510. "headers": {
  17511. "type": "object",
  17512. "additionalProperties": {
  17513. "type": "string"
  17514. }
  17515. },
  17516. "oauth": {
  17517. "anyOf": [
  17518. {
  17519. "$ref": "#/components/schemas/McpOAuthConfig"
  17520. },
  17521. {
  17522. "type": "boolean",
  17523. "enum": [false]
  17524. }
  17525. ],
  17526. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17527. },
  17528. "timeout": {
  17529. "type": "integer",
  17530. "exclusiveMinimum": 0
  17531. }
  17532. },
  17533. "required": ["type", "url"],
  17534. "additionalProperties": false
  17535. },
  17536. "LayoutConfig": {
  17537. "type": "string",
  17538. "enum": ["auto", "stretch"],
  17539. "description": "@deprecated Always uses stretch layout."
  17540. },
  17541. "ImageAttachmentConfig": {
  17542. "type": "object",
  17543. "properties": {
  17544. "auto_resize": {
  17545. "type": "boolean"
  17546. },
  17547. "max_width": {
  17548. "type": "integer",
  17549. "exclusiveMinimum": 0
  17550. },
  17551. "max_height": {
  17552. "type": "integer",
  17553. "exclusiveMinimum": 0
  17554. },
  17555. "max_base64_bytes": {
  17556. "type": "integer",
  17557. "exclusiveMinimum": 0
  17558. }
  17559. },
  17560. "additionalProperties": false
  17561. },
  17562. "AttachmentConfig": {
  17563. "type": "object",
  17564. "properties": {
  17565. "image": {
  17566. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17567. }
  17568. },
  17569. "additionalProperties": false
  17570. },
  17571. "Config": {
  17572. "type": "object",
  17573. "properties": {
  17574. "$schema": {
  17575. "type": "string"
  17576. },
  17577. "shell": {
  17578. "type": "string"
  17579. },
  17580. "logLevel": {
  17581. "$ref": "#/components/schemas/LogLevel"
  17582. },
  17583. "server": {
  17584. "$ref": "#/components/schemas/ServerConfig"
  17585. },
  17586. "command": {
  17587. "type": "object",
  17588. "additionalProperties": {
  17589. "type": "object",
  17590. "properties": {
  17591. "template": {
  17592. "type": "string"
  17593. },
  17594. "description": {
  17595. "type": "string"
  17596. },
  17597. "agent": {
  17598. "type": "string"
  17599. },
  17600. "model": {
  17601. "type": "string"
  17602. },
  17603. "variant": {
  17604. "type": "string"
  17605. },
  17606. "subtask": {
  17607. "type": "boolean"
  17608. }
  17609. },
  17610. "required": ["template"],
  17611. "additionalProperties": false
  17612. }
  17613. },
  17614. "skills": {
  17615. "type": "object",
  17616. "properties": {
  17617. "paths": {
  17618. "type": "array",
  17619. "items": {
  17620. "type": "string"
  17621. }
  17622. },
  17623. "urls": {
  17624. "type": "array",
  17625. "items": {
  17626. "type": "string"
  17627. }
  17628. }
  17629. },
  17630. "additionalProperties": false
  17631. },
  17632. "reference": {
  17633. "$ref": "#/components/schemas/ReferenceConfig"
  17634. },
  17635. "watcher": {
  17636. "type": "object",
  17637. "properties": {
  17638. "ignore": {
  17639. "type": "array",
  17640. "items": {
  17641. "type": "string"
  17642. }
  17643. }
  17644. },
  17645. "additionalProperties": false
  17646. },
  17647. "snapshot": {
  17648. "type": "boolean"
  17649. },
  17650. "plugin": {
  17651. "type": "array",
  17652. "items": {
  17653. "anyOf": [
  17654. {
  17655. "type": "string"
  17656. },
  17657. {
  17658. "type": "array",
  17659. "prefixItems": [
  17660. {
  17661. "type": "string"
  17662. },
  17663. {
  17664. "type": "object"
  17665. }
  17666. ],
  17667. "maxItems": 2,
  17668. "minItems": 2
  17669. }
  17670. ]
  17671. }
  17672. },
  17673. "share": {
  17674. "type": "string",
  17675. "enum": ["manual", "auto", "disabled"]
  17676. },
  17677. "autoshare": {
  17678. "type": "boolean"
  17679. },
  17680. "autoupdate": {
  17681. "anyOf": [
  17682. {
  17683. "type": "boolean"
  17684. },
  17685. {
  17686. "type": "string",
  17687. "enum": ["notify"]
  17688. }
  17689. ],
  17690. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  17691. },
  17692. "disabled_providers": {
  17693. "type": "array",
  17694. "items": {
  17695. "type": "string"
  17696. }
  17697. },
  17698. "enabled_providers": {
  17699. "type": "array",
  17700. "items": {
  17701. "type": "string"
  17702. }
  17703. },
  17704. "model": {
  17705. "type": "string"
  17706. },
  17707. "small_model": {
  17708. "type": "string"
  17709. },
  17710. "default_agent": {
  17711. "type": "string"
  17712. },
  17713. "username": {
  17714. "type": "string"
  17715. },
  17716. "mode": {
  17717. "type": "object",
  17718. "properties": {
  17719. "build": {
  17720. "$ref": "#/components/schemas/AgentConfig"
  17721. },
  17722. "plan": {
  17723. "$ref": "#/components/schemas/AgentConfig"
  17724. }
  17725. },
  17726. "additionalProperties": {
  17727. "$ref": "#/components/schemas/AgentConfig"
  17728. }
  17729. },
  17730. "agent": {
  17731. "type": "object",
  17732. "properties": {
  17733. "plan": {
  17734. "$ref": "#/components/schemas/AgentConfig"
  17735. },
  17736. "build": {
  17737. "$ref": "#/components/schemas/AgentConfig"
  17738. },
  17739. "general": {
  17740. "$ref": "#/components/schemas/AgentConfig"
  17741. },
  17742. "explore": {
  17743. "$ref": "#/components/schemas/AgentConfig"
  17744. },
  17745. "title": {
  17746. "$ref": "#/components/schemas/AgentConfig"
  17747. },
  17748. "summary": {
  17749. "$ref": "#/components/schemas/AgentConfig"
  17750. },
  17751. "compaction": {
  17752. "$ref": "#/components/schemas/AgentConfig"
  17753. }
  17754. },
  17755. "additionalProperties": {
  17756. "$ref": "#/components/schemas/AgentConfig"
  17757. }
  17758. },
  17759. "provider": {
  17760. "type": "object",
  17761. "additionalProperties": {
  17762. "$ref": "#/components/schemas/ProviderConfig"
  17763. }
  17764. },
  17765. "mcp": {
  17766. "type": "object",
  17767. "additionalProperties": {
  17768. "anyOf": [
  17769. {
  17770. "$ref": "#/components/schemas/McpLocalConfig"
  17771. },
  17772. {
  17773. "$ref": "#/components/schemas/McpRemoteConfig"
  17774. },
  17775. {
  17776. "type": "object",
  17777. "properties": {
  17778. "enabled": {
  17779. "type": "boolean"
  17780. }
  17781. },
  17782. "required": ["enabled"],
  17783. "additionalProperties": false
  17784. }
  17785. ]
  17786. }
  17787. },
  17788. "formatter": {
  17789. "anyOf": [
  17790. {
  17791. "type": "boolean"
  17792. },
  17793. {
  17794. "type": "object",
  17795. "additionalProperties": {
  17796. "type": "object",
  17797. "properties": {
  17798. "disabled": {
  17799. "type": "boolean"
  17800. },
  17801. "command": {
  17802. "type": "array",
  17803. "items": {
  17804. "type": "string"
  17805. }
  17806. },
  17807. "environment": {
  17808. "type": "object",
  17809. "additionalProperties": {
  17810. "type": "string"
  17811. }
  17812. },
  17813. "extensions": {
  17814. "type": "array",
  17815. "items": {
  17816. "type": "string"
  17817. }
  17818. }
  17819. },
  17820. "additionalProperties": false
  17821. }
  17822. }
  17823. ],
  17824. "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."
  17825. },
  17826. "lsp": {
  17827. "anyOf": [
  17828. {
  17829. "type": "boolean"
  17830. },
  17831. {
  17832. "type": "object",
  17833. "additionalProperties": {
  17834. "anyOf": [
  17835. {
  17836. "type": "object",
  17837. "properties": {
  17838. "disabled": {
  17839. "type": "boolean",
  17840. "enum": [true]
  17841. }
  17842. },
  17843. "required": ["disabled"],
  17844. "additionalProperties": false
  17845. },
  17846. {
  17847. "type": "object",
  17848. "properties": {
  17849. "command": {
  17850. "type": "array",
  17851. "items": {
  17852. "type": "string"
  17853. }
  17854. },
  17855. "extensions": {
  17856. "type": "array",
  17857. "items": {
  17858. "type": "string"
  17859. }
  17860. },
  17861. "disabled": {
  17862. "type": "boolean"
  17863. },
  17864. "env": {
  17865. "type": "object",
  17866. "additionalProperties": {
  17867. "type": "string"
  17868. }
  17869. },
  17870. "initialization": {
  17871. "type": "object"
  17872. }
  17873. },
  17874. "required": ["command"],
  17875. "additionalProperties": false
  17876. }
  17877. ]
  17878. }
  17879. }
  17880. ],
  17881. "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."
  17882. },
  17883. "instructions": {
  17884. "type": "array",
  17885. "items": {
  17886. "type": "string"
  17887. }
  17888. },
  17889. "layout": {
  17890. "$ref": "#/components/schemas/LayoutConfig"
  17891. },
  17892. "permission": {
  17893. "$ref": "#/components/schemas/PermissionConfig"
  17894. },
  17895. "tools": {
  17896. "type": "object",
  17897. "additionalProperties": {
  17898. "type": "boolean"
  17899. }
  17900. },
  17901. "attachment": {
  17902. "$ref": "#/components/schemas/AttachmentConfig"
  17903. },
  17904. "enterprise": {
  17905. "type": "object",
  17906. "properties": {
  17907. "url": {
  17908. "type": "string"
  17909. }
  17910. },
  17911. "additionalProperties": false
  17912. },
  17913. "tool_output": {
  17914. "type": "object",
  17915. "properties": {
  17916. "max_lines": {
  17917. "type": "integer",
  17918. "exclusiveMinimum": 0
  17919. },
  17920. "max_bytes": {
  17921. "type": "integer",
  17922. "exclusiveMinimum": 0
  17923. }
  17924. },
  17925. "additionalProperties": false
  17926. },
  17927. "compaction": {
  17928. "type": "object",
  17929. "properties": {
  17930. "auto": {
  17931. "type": "boolean"
  17932. },
  17933. "prune": {
  17934. "type": "boolean"
  17935. },
  17936. "tail_turns": {
  17937. "type": "integer",
  17938. "minimum": 0
  17939. },
  17940. "preserve_recent_tokens": {
  17941. "type": "integer",
  17942. "minimum": 0
  17943. },
  17944. "reserved": {
  17945. "type": "integer",
  17946. "minimum": 0
  17947. }
  17948. },
  17949. "additionalProperties": false
  17950. },
  17951. "experimental": {
  17952. "type": "object",
  17953. "properties": {
  17954. "disable_paste_summary": {
  17955. "type": "boolean"
  17956. },
  17957. "batch_tool": {
  17958. "type": "boolean"
  17959. },
  17960. "openTelemetry": {
  17961. "type": "boolean"
  17962. },
  17963. "primary_tools": {
  17964. "type": "array",
  17965. "items": {
  17966. "type": "string"
  17967. }
  17968. },
  17969. "continue_loop_on_deny": {
  17970. "type": "boolean"
  17971. },
  17972. "mcp_timeout": {
  17973. "type": "integer",
  17974. "exclusiveMinimum": 0
  17975. },
  17976. "policies": {
  17977. "type": "array",
  17978. "items": {
  17979. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  17980. }
  17981. }
  17982. },
  17983. "additionalProperties": false
  17984. }
  17985. },
  17986. "additionalProperties": false
  17987. },
  17988. "Model": {
  17989. "type": "object",
  17990. "properties": {
  17991. "id": {
  17992. "type": "string"
  17993. },
  17994. "providerID": {
  17995. "type": "string"
  17996. },
  17997. "api": {
  17998. "type": "object",
  17999. "properties": {
  18000. "id": {
  18001. "type": "string"
  18002. },
  18003. "url": {
  18004. "type": "string"
  18005. },
  18006. "npm": {
  18007. "type": "string"
  18008. }
  18009. },
  18010. "required": ["id", "url", "npm"],
  18011. "additionalProperties": false
  18012. },
  18013. "name": {
  18014. "type": "string"
  18015. },
  18016. "family": {
  18017. "type": "string"
  18018. },
  18019. "capabilities": {
  18020. "type": "object",
  18021. "properties": {
  18022. "temperature": {
  18023. "type": "boolean"
  18024. },
  18025. "reasoning": {
  18026. "type": "boolean"
  18027. },
  18028. "attachment": {
  18029. "type": "boolean"
  18030. },
  18031. "toolcall": {
  18032. "type": "boolean"
  18033. },
  18034. "input": {
  18035. "type": "object",
  18036. "properties": {
  18037. "text": {
  18038. "type": "boolean"
  18039. },
  18040. "audio": {
  18041. "type": "boolean"
  18042. },
  18043. "image": {
  18044. "type": "boolean"
  18045. },
  18046. "video": {
  18047. "type": "boolean"
  18048. },
  18049. "pdf": {
  18050. "type": "boolean"
  18051. }
  18052. },
  18053. "required": ["text", "audio", "image", "video", "pdf"],
  18054. "additionalProperties": false
  18055. },
  18056. "output": {
  18057. "type": "object",
  18058. "properties": {
  18059. "text": {
  18060. "type": "boolean"
  18061. },
  18062. "audio": {
  18063. "type": "boolean"
  18064. },
  18065. "image": {
  18066. "type": "boolean"
  18067. },
  18068. "video": {
  18069. "type": "boolean"
  18070. },
  18071. "pdf": {
  18072. "type": "boolean"
  18073. }
  18074. },
  18075. "required": ["text", "audio", "image", "video", "pdf"],
  18076. "additionalProperties": false
  18077. },
  18078. "interleaved": {
  18079. "anyOf": [
  18080. {
  18081. "type": "boolean"
  18082. },
  18083. {
  18084. "type": "object",
  18085. "properties": {
  18086. "field": {
  18087. "type": "string",
  18088. "enum": ["reasoning_content", "reasoning_details"]
  18089. }
  18090. },
  18091. "required": ["field"],
  18092. "additionalProperties": false
  18093. }
  18094. ]
  18095. }
  18096. },
  18097. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18098. "additionalProperties": false
  18099. },
  18100. "cost": {
  18101. "type": "object",
  18102. "properties": {
  18103. "input": {
  18104. "type": "number"
  18105. },
  18106. "output": {
  18107. "type": "number"
  18108. },
  18109. "cache": {
  18110. "type": "object",
  18111. "properties": {
  18112. "read": {
  18113. "type": "number"
  18114. },
  18115. "write": {
  18116. "type": "number"
  18117. }
  18118. },
  18119. "required": ["read", "write"],
  18120. "additionalProperties": false
  18121. },
  18122. "tiers": {
  18123. "type": "array",
  18124. "items": {
  18125. "type": "object",
  18126. "properties": {
  18127. "input": {
  18128. "type": "number"
  18129. },
  18130. "output": {
  18131. "type": "number"
  18132. },
  18133. "cache": {
  18134. "type": "object",
  18135. "properties": {
  18136. "read": {
  18137. "type": "number"
  18138. },
  18139. "write": {
  18140. "type": "number"
  18141. }
  18142. },
  18143. "required": ["read", "write"],
  18144. "additionalProperties": false
  18145. },
  18146. "tier": {
  18147. "type": "object",
  18148. "properties": {
  18149. "type": {
  18150. "type": "string",
  18151. "enum": ["context"]
  18152. },
  18153. "size": {
  18154. "type": "number"
  18155. }
  18156. },
  18157. "required": ["type", "size"],
  18158. "additionalProperties": false
  18159. }
  18160. },
  18161. "required": ["input", "output", "cache", "tier"],
  18162. "additionalProperties": false
  18163. }
  18164. },
  18165. "experimentalOver200K": {
  18166. "type": "object",
  18167. "properties": {
  18168. "input": {
  18169. "type": "number"
  18170. },
  18171. "output": {
  18172. "type": "number"
  18173. },
  18174. "cache": {
  18175. "type": "object",
  18176. "properties": {
  18177. "read": {
  18178. "type": "number"
  18179. },
  18180. "write": {
  18181. "type": "number"
  18182. }
  18183. },
  18184. "required": ["read", "write"],
  18185. "additionalProperties": false
  18186. }
  18187. },
  18188. "required": ["input", "output", "cache"],
  18189. "additionalProperties": false
  18190. }
  18191. },
  18192. "required": ["input", "output", "cache"],
  18193. "additionalProperties": false
  18194. },
  18195. "limit": {
  18196. "type": "object",
  18197. "properties": {
  18198. "context": {
  18199. "type": "number"
  18200. },
  18201. "input": {
  18202. "type": "number"
  18203. },
  18204. "output": {
  18205. "type": "number"
  18206. }
  18207. },
  18208. "required": ["context", "output"],
  18209. "additionalProperties": false
  18210. },
  18211. "status": {
  18212. "type": "string",
  18213. "enum": ["alpha", "beta", "deprecated", "active"]
  18214. },
  18215. "options": {
  18216. "type": "object"
  18217. },
  18218. "headers": {
  18219. "type": "object",
  18220. "additionalProperties": {
  18221. "type": "string"
  18222. }
  18223. },
  18224. "release_date": {
  18225. "type": "string"
  18226. },
  18227. "variants": {
  18228. "type": "object",
  18229. "additionalProperties": {
  18230. "type": "object"
  18231. }
  18232. }
  18233. },
  18234. "required": [
  18235. "id",
  18236. "providerID",
  18237. "api",
  18238. "name",
  18239. "capabilities",
  18240. "cost",
  18241. "limit",
  18242. "status",
  18243. "options",
  18244. "headers",
  18245. "release_date"
  18246. ],
  18247. "additionalProperties": false
  18248. },
  18249. "Provider": {
  18250. "type": "object",
  18251. "properties": {
  18252. "id": {
  18253. "type": "string"
  18254. },
  18255. "name": {
  18256. "type": "string"
  18257. },
  18258. "source": {
  18259. "type": "string",
  18260. "enum": ["env", "config", "custom", "api"]
  18261. },
  18262. "env": {
  18263. "type": "array",
  18264. "items": {
  18265. "type": "string"
  18266. }
  18267. },
  18268. "key": {
  18269. "type": "string"
  18270. },
  18271. "options": {
  18272. "type": "object"
  18273. },
  18274. "models": {
  18275. "type": "object",
  18276. "additionalProperties": {
  18277. "$ref": "#/components/schemas/Model"
  18278. }
  18279. }
  18280. },
  18281. "required": ["id", "name", "source", "env", "options", "models"],
  18282. "additionalProperties": false
  18283. },
  18284. "ConsoleState": {
  18285. "type": "object",
  18286. "properties": {
  18287. "consoleManagedProviders": {
  18288. "type": "array",
  18289. "items": {
  18290. "type": "string"
  18291. }
  18292. },
  18293. "activeOrgName": {
  18294. "type": "string"
  18295. },
  18296. "switchableOrgCount": {
  18297. "type": "integer",
  18298. "minimum": 0
  18299. }
  18300. },
  18301. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18302. "additionalProperties": false
  18303. },
  18304. "effect_HttpApiError_InternalServerError": {
  18305. "type": "object",
  18306. "properties": {
  18307. "_tag": {
  18308. "type": "string",
  18309. "enum": ["InternalServerError"]
  18310. }
  18311. },
  18312. "required": ["_tag"],
  18313. "additionalProperties": false
  18314. },
  18315. "ToolListItem": {
  18316. "type": "object",
  18317. "properties": {
  18318. "id": {
  18319. "type": "string"
  18320. },
  18321. "description": {
  18322. "type": "string"
  18323. },
  18324. "parameters": {}
  18325. },
  18326. "required": ["id", "description", "parameters"],
  18327. "additionalProperties": false
  18328. },
  18329. "ToolList": {
  18330. "type": "array",
  18331. "items": {
  18332. "$ref": "#/components/schemas/ToolListItem"
  18333. }
  18334. },
  18335. "ToolIDs": {
  18336. "type": "array",
  18337. "items": {
  18338. "type": "string"
  18339. }
  18340. },
  18341. "WorktreeError": {
  18342. "type": "object",
  18343. "properties": {
  18344. "name": {
  18345. "type": "string",
  18346. "enum": [
  18347. "WorktreeNotGitError",
  18348. "WorktreeNameGenerationFailedError",
  18349. "WorktreeCreateFailedError",
  18350. "WorktreeStartCommandFailedError",
  18351. "WorktreeRemoveFailedError",
  18352. "WorktreeResetFailedError",
  18353. "WorktreeListFailedError"
  18354. ]
  18355. },
  18356. "data": {
  18357. "type": "object",
  18358. "properties": {
  18359. "message": {
  18360. "type": "string"
  18361. }
  18362. },
  18363. "required": ["message"],
  18364. "additionalProperties": false
  18365. }
  18366. },
  18367. "required": ["name", "data"],
  18368. "additionalProperties": false
  18369. },
  18370. "WorktreeCreateInput": {
  18371. "type": "object",
  18372. "properties": {
  18373. "name": {
  18374. "type": "string"
  18375. },
  18376. "startCommand": {
  18377. "type": "string",
  18378. "description": "Additional startup script to run after the project's start command"
  18379. }
  18380. },
  18381. "additionalProperties": false
  18382. },
  18383. "Worktree": {
  18384. "type": "object",
  18385. "properties": {
  18386. "name": {
  18387. "type": "string"
  18388. },
  18389. "branch": {
  18390. "type": "string"
  18391. },
  18392. "directory": {
  18393. "type": "string"
  18394. }
  18395. },
  18396. "required": ["name", "directory"],
  18397. "additionalProperties": false
  18398. },
  18399. "WorktreeRemoveInput": {
  18400. "type": "object",
  18401. "properties": {
  18402. "directory": {
  18403. "type": "string"
  18404. }
  18405. },
  18406. "required": ["directory"],
  18407. "additionalProperties": false
  18408. },
  18409. "WorktreeResetInput": {
  18410. "type": "object",
  18411. "properties": {
  18412. "directory": {
  18413. "type": "string"
  18414. }
  18415. },
  18416. "required": ["directory"],
  18417. "additionalProperties": false
  18418. },
  18419. "ProjectSummary": {
  18420. "type": "object",
  18421. "properties": {
  18422. "id": {
  18423. "type": "string"
  18424. },
  18425. "name": {
  18426. "type": "string"
  18427. },
  18428. "worktree": {
  18429. "type": "string"
  18430. }
  18431. },
  18432. "required": ["id", "worktree"],
  18433. "additionalProperties": false
  18434. },
  18435. "GlobalSession": {
  18436. "type": "object",
  18437. "properties": {
  18438. "id": {
  18439. "type": "string",
  18440. "pattern": "^ses"
  18441. },
  18442. "slug": {
  18443. "type": "string"
  18444. },
  18445. "projectID": {
  18446. "type": "string"
  18447. },
  18448. "workspaceID": {
  18449. "type": "string",
  18450. "pattern": "^wrk"
  18451. },
  18452. "directory": {
  18453. "type": "string"
  18454. },
  18455. "path": {
  18456. "type": "string"
  18457. },
  18458. "parentID": {
  18459. "type": "string",
  18460. "pattern": "^ses"
  18461. },
  18462. "summary": {
  18463. "type": "object",
  18464. "properties": {
  18465. "additions": {
  18466. "type": "number"
  18467. },
  18468. "deletions": {
  18469. "type": "number"
  18470. },
  18471. "files": {
  18472. "type": "number"
  18473. },
  18474. "diffs": {
  18475. "type": "array",
  18476. "items": {
  18477. "$ref": "#/components/schemas/SnapshotFileDiff"
  18478. }
  18479. }
  18480. },
  18481. "required": ["additions", "deletions", "files"],
  18482. "additionalProperties": false
  18483. },
  18484. "cost": {
  18485. "type": "number"
  18486. },
  18487. "tokens": {
  18488. "type": "object",
  18489. "properties": {
  18490. "input": {
  18491. "type": "number"
  18492. },
  18493. "output": {
  18494. "type": "number"
  18495. },
  18496. "reasoning": {
  18497. "type": "number"
  18498. },
  18499. "cache": {
  18500. "type": "object",
  18501. "properties": {
  18502. "read": {
  18503. "type": "number"
  18504. },
  18505. "write": {
  18506. "type": "number"
  18507. }
  18508. },
  18509. "required": ["read", "write"],
  18510. "additionalProperties": false
  18511. }
  18512. },
  18513. "required": ["input", "output", "reasoning", "cache"],
  18514. "additionalProperties": false
  18515. },
  18516. "share": {
  18517. "type": "object",
  18518. "properties": {
  18519. "url": {
  18520. "type": "string"
  18521. }
  18522. },
  18523. "required": ["url"],
  18524. "additionalProperties": false
  18525. },
  18526. "title": {
  18527. "type": "string"
  18528. },
  18529. "agent": {
  18530. "type": "string"
  18531. },
  18532. "model": {
  18533. "type": "object",
  18534. "properties": {
  18535. "id": {
  18536. "type": "string"
  18537. },
  18538. "providerID": {
  18539. "type": "string"
  18540. },
  18541. "variant": {
  18542. "type": "string"
  18543. }
  18544. },
  18545. "required": ["id", "providerID"],
  18546. "additionalProperties": false
  18547. },
  18548. "version": {
  18549. "type": "string"
  18550. },
  18551. "metadata": {
  18552. "type": "object"
  18553. },
  18554. "time": {
  18555. "type": "object",
  18556. "properties": {
  18557. "created": {
  18558. "type": "integer",
  18559. "minimum": 0
  18560. },
  18561. "updated": {
  18562. "type": "integer",
  18563. "minimum": 0
  18564. },
  18565. "compacting": {
  18566. "type": "integer",
  18567. "minimum": 0
  18568. },
  18569. "archived": {
  18570. "type": "number"
  18571. }
  18572. },
  18573. "required": ["created", "updated"],
  18574. "additionalProperties": false
  18575. },
  18576. "permission": {
  18577. "$ref": "#/components/schemas/PermissionRuleset"
  18578. },
  18579. "revert": {
  18580. "type": "object",
  18581. "properties": {
  18582. "messageID": {
  18583. "type": "string",
  18584. "pattern": "^msg"
  18585. },
  18586. "partID": {
  18587. "type": "string",
  18588. "pattern": "^prt"
  18589. },
  18590. "snapshot": {
  18591. "type": "string"
  18592. },
  18593. "diff": {
  18594. "type": "string"
  18595. }
  18596. },
  18597. "required": ["messageID"],
  18598. "additionalProperties": false
  18599. },
  18600. "project": {
  18601. "anyOf": [
  18602. {
  18603. "$ref": "#/components/schemas/ProjectSummary"
  18604. },
  18605. {
  18606. "type": "null"
  18607. }
  18608. ]
  18609. }
  18610. },
  18611. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  18612. "additionalProperties": false
  18613. },
  18614. "McpResource": {
  18615. "type": "object",
  18616. "properties": {
  18617. "name": {
  18618. "type": "string"
  18619. },
  18620. "uri": {
  18621. "type": "string"
  18622. },
  18623. "description": {
  18624. "type": "string"
  18625. },
  18626. "mimeType": {
  18627. "type": "string"
  18628. },
  18629. "client": {
  18630. "type": "string"
  18631. }
  18632. },
  18633. "required": ["name", "uri", "client"],
  18634. "additionalProperties": false
  18635. },
  18636. "Symbol": {
  18637. "type": "object",
  18638. "properties": {
  18639. "name": {
  18640. "type": "string"
  18641. },
  18642. "kind": {
  18643. "type": "integer",
  18644. "minimum": 0
  18645. },
  18646. "location": {
  18647. "type": "object",
  18648. "properties": {
  18649. "uri": {
  18650. "type": "string"
  18651. },
  18652. "range": {
  18653. "$ref": "#/components/schemas/Range"
  18654. }
  18655. },
  18656. "required": ["uri", "range"],
  18657. "additionalProperties": false
  18658. }
  18659. },
  18660. "required": ["name", "kind", "location"],
  18661. "additionalProperties": false
  18662. },
  18663. "FileNode": {
  18664. "type": "object",
  18665. "properties": {
  18666. "name": {
  18667. "type": "string"
  18668. },
  18669. "path": {
  18670. "type": "string"
  18671. },
  18672. "absolute": {
  18673. "type": "string"
  18674. },
  18675. "type": {
  18676. "type": "string",
  18677. "enum": ["file", "directory"]
  18678. },
  18679. "ignored": {
  18680. "type": "boolean"
  18681. }
  18682. },
  18683. "required": ["name", "path", "absolute", "type", "ignored"],
  18684. "additionalProperties": false
  18685. },
  18686. "FileContent": {
  18687. "type": "object",
  18688. "properties": {
  18689. "type": {
  18690. "type": "string",
  18691. "enum": ["text", "binary"]
  18692. },
  18693. "content": {
  18694. "type": "string"
  18695. },
  18696. "diff": {
  18697. "type": "string"
  18698. },
  18699. "patch": {
  18700. "type": "object",
  18701. "properties": {
  18702. "oldFileName": {
  18703. "type": "string"
  18704. },
  18705. "newFileName": {
  18706. "type": "string"
  18707. },
  18708. "oldHeader": {
  18709. "type": "string"
  18710. },
  18711. "newHeader": {
  18712. "type": "string"
  18713. },
  18714. "hunks": {
  18715. "type": "array",
  18716. "items": {
  18717. "type": "object",
  18718. "properties": {
  18719. "oldStart": {
  18720. "type": "integer",
  18721. "minimum": 0
  18722. },
  18723. "oldLines": {
  18724. "type": "integer",
  18725. "minimum": 0
  18726. },
  18727. "newStart": {
  18728. "type": "integer",
  18729. "minimum": 0
  18730. },
  18731. "newLines": {
  18732. "type": "integer",
  18733. "minimum": 0
  18734. },
  18735. "lines": {
  18736. "type": "array",
  18737. "items": {
  18738. "type": "string"
  18739. }
  18740. }
  18741. },
  18742. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  18743. "additionalProperties": false
  18744. }
  18745. },
  18746. "index": {
  18747. "type": "string"
  18748. }
  18749. },
  18750. "required": ["oldFileName", "newFileName", "hunks"],
  18751. "additionalProperties": false
  18752. },
  18753. "encoding": {
  18754. "type": "string",
  18755. "enum": ["base64"]
  18756. },
  18757. "mimeType": {
  18758. "type": "string"
  18759. }
  18760. },
  18761. "required": ["type", "content"],
  18762. "additionalProperties": false
  18763. },
  18764. "File": {
  18765. "type": "object",
  18766. "properties": {
  18767. "path": {
  18768. "type": "string"
  18769. },
  18770. "added": {
  18771. "type": "integer",
  18772. "minimum": 0
  18773. },
  18774. "removed": {
  18775. "type": "integer",
  18776. "minimum": 0
  18777. },
  18778. "status": {
  18779. "type": "string",
  18780. "enum": ["added", "deleted", "modified"]
  18781. }
  18782. },
  18783. "required": ["path", "added", "removed", "status"],
  18784. "additionalProperties": false
  18785. },
  18786. "Path": {
  18787. "type": "object",
  18788. "properties": {
  18789. "home": {
  18790. "type": "string"
  18791. },
  18792. "state": {
  18793. "type": "string"
  18794. },
  18795. "config": {
  18796. "type": "string"
  18797. },
  18798. "worktree": {
  18799. "type": "string"
  18800. },
  18801. "directory": {
  18802. "type": "string"
  18803. }
  18804. },
  18805. "required": ["home", "state", "config", "worktree", "directory"],
  18806. "additionalProperties": false
  18807. },
  18808. "VcsInfo": {
  18809. "type": "object",
  18810. "properties": {
  18811. "branch": {
  18812. "type": "string"
  18813. },
  18814. "default_branch": {
  18815. "type": "string"
  18816. }
  18817. },
  18818. "additionalProperties": false
  18819. },
  18820. "VcsFileStatus": {
  18821. "type": "object",
  18822. "properties": {
  18823. "file": {
  18824. "type": "string"
  18825. },
  18826. "additions": {
  18827. "type": "number"
  18828. },
  18829. "deletions": {
  18830. "type": "number"
  18831. },
  18832. "status": {
  18833. "type": "string",
  18834. "enum": ["added", "deleted", "modified"]
  18835. }
  18836. },
  18837. "required": ["file", "additions", "deletions", "status"],
  18838. "additionalProperties": false
  18839. },
  18840. "VcsFileDiff": {
  18841. "type": "object",
  18842. "properties": {
  18843. "file": {
  18844. "type": "string"
  18845. },
  18846. "patch": {
  18847. "type": "string"
  18848. },
  18849. "additions": {
  18850. "type": "number"
  18851. },
  18852. "deletions": {
  18853. "type": "number"
  18854. },
  18855. "status": {
  18856. "type": "string",
  18857. "enum": ["added", "deleted", "modified"]
  18858. }
  18859. },
  18860. "required": ["file", "additions", "deletions"],
  18861. "additionalProperties": false
  18862. },
  18863. "VcsApplyError": {
  18864. "type": "object",
  18865. "properties": {
  18866. "name": {
  18867. "type": "string",
  18868. "enum": ["VcsApplyError"]
  18869. },
  18870. "data": {
  18871. "type": "object",
  18872. "properties": {
  18873. "message": {
  18874. "type": "string"
  18875. },
  18876. "reason": {
  18877. "type": "string",
  18878. "enum": ["non-git", "not-clean"]
  18879. }
  18880. },
  18881. "required": ["message", "reason"],
  18882. "additionalProperties": false
  18883. }
  18884. },
  18885. "required": ["name", "data"],
  18886. "additionalProperties": false
  18887. },
  18888. "Command": {
  18889. "type": "object",
  18890. "properties": {
  18891. "name": {
  18892. "type": "string"
  18893. },
  18894. "description": {
  18895. "type": "string"
  18896. },
  18897. "agent": {
  18898. "type": "string"
  18899. },
  18900. "model": {
  18901. "type": "string"
  18902. },
  18903. "source": {
  18904. "type": "string",
  18905. "enum": ["command", "mcp", "skill"]
  18906. },
  18907. "template": {
  18908. "type": "string"
  18909. },
  18910. "subtask": {
  18911. "type": "boolean"
  18912. },
  18913. "hints": {
  18914. "type": "array",
  18915. "items": {
  18916. "type": "string"
  18917. }
  18918. }
  18919. },
  18920. "required": ["name", "template", "hints"],
  18921. "additionalProperties": false
  18922. },
  18923. "Agent": {
  18924. "type": "object",
  18925. "properties": {
  18926. "name": {
  18927. "type": "string"
  18928. },
  18929. "description": {
  18930. "type": "string"
  18931. },
  18932. "mode": {
  18933. "type": "string",
  18934. "enum": ["subagent", "primary", "all"]
  18935. },
  18936. "native": {
  18937. "type": "boolean"
  18938. },
  18939. "hidden": {
  18940. "type": "boolean"
  18941. },
  18942. "topP": {
  18943. "type": "number"
  18944. },
  18945. "temperature": {
  18946. "type": "number"
  18947. },
  18948. "color": {
  18949. "type": "string"
  18950. },
  18951. "permission": {
  18952. "$ref": "#/components/schemas/PermissionRuleset"
  18953. },
  18954. "model": {
  18955. "type": "object",
  18956. "properties": {
  18957. "modelID": {
  18958. "type": "string"
  18959. },
  18960. "providerID": {
  18961. "type": "string"
  18962. }
  18963. },
  18964. "required": ["modelID", "providerID"],
  18965. "additionalProperties": false
  18966. },
  18967. "variant": {
  18968. "type": "string"
  18969. },
  18970. "prompt": {
  18971. "type": "string"
  18972. },
  18973. "options": {
  18974. "type": "object"
  18975. },
  18976. "steps": {
  18977. "type": "number"
  18978. }
  18979. },
  18980. "required": ["name", "mode", "permission", "options"],
  18981. "additionalProperties": false
  18982. },
  18983. "LSPStatus": {
  18984. "type": "object",
  18985. "properties": {
  18986. "id": {
  18987. "type": "string"
  18988. },
  18989. "name": {
  18990. "type": "string"
  18991. },
  18992. "root": {
  18993. "type": "string"
  18994. },
  18995. "status": {
  18996. "type": "string",
  18997. "enum": ["connected", "error"]
  18998. }
  18999. },
  19000. "required": ["id", "name", "root", "status"],
  19001. "additionalProperties": false
  19002. },
  19003. "FormatterStatus": {
  19004. "type": "object",
  19005. "properties": {
  19006. "name": {
  19007. "type": "string"
  19008. },
  19009. "extensions": {
  19010. "type": "array",
  19011. "items": {
  19012. "type": "string"
  19013. }
  19014. },
  19015. "enabled": {
  19016. "type": "boolean"
  19017. }
  19018. },
  19019. "required": ["name", "extensions", "enabled"],
  19020. "additionalProperties": false
  19021. },
  19022. "MCPStatusConnected": {
  19023. "type": "object",
  19024. "properties": {
  19025. "status": {
  19026. "type": "string",
  19027. "enum": ["connected"]
  19028. }
  19029. },
  19030. "required": ["status"],
  19031. "additionalProperties": false
  19032. },
  19033. "MCPStatusDisabled": {
  19034. "type": "object",
  19035. "properties": {
  19036. "status": {
  19037. "type": "string",
  19038. "enum": ["disabled"]
  19039. }
  19040. },
  19041. "required": ["status"],
  19042. "additionalProperties": false
  19043. },
  19044. "MCPStatusFailed": {
  19045. "type": "object",
  19046. "properties": {
  19047. "status": {
  19048. "type": "string",
  19049. "enum": ["failed"]
  19050. },
  19051. "error": {
  19052. "type": "string"
  19053. }
  19054. },
  19055. "required": ["status", "error"],
  19056. "additionalProperties": false
  19057. },
  19058. "MCPStatusNeedsAuth": {
  19059. "type": "object",
  19060. "properties": {
  19061. "status": {
  19062. "type": "string",
  19063. "enum": ["needs_auth"]
  19064. }
  19065. },
  19066. "required": ["status"],
  19067. "additionalProperties": false
  19068. },
  19069. "MCPStatusNeedsClientRegistration": {
  19070. "type": "object",
  19071. "properties": {
  19072. "status": {
  19073. "type": "string",
  19074. "enum": ["needs_client_registration"]
  19075. },
  19076. "error": {
  19077. "type": "string"
  19078. }
  19079. },
  19080. "required": ["status", "error"],
  19081. "additionalProperties": false
  19082. },
  19083. "MCPStatus": {
  19084. "anyOf": [
  19085. {
  19086. "$ref": "#/components/schemas/MCPStatusConnected"
  19087. },
  19088. {
  19089. "$ref": "#/components/schemas/MCPStatusDisabled"
  19090. },
  19091. {
  19092. "$ref": "#/components/schemas/MCPStatusFailed"
  19093. },
  19094. {
  19095. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19096. },
  19097. {
  19098. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19099. }
  19100. ]
  19101. },
  19102. "McpUnsupportedOAuthError": {
  19103. "type": "object",
  19104. "properties": {
  19105. "error": {
  19106. "type": "string"
  19107. }
  19108. },
  19109. "required": ["error"],
  19110. "additionalProperties": false
  19111. },
  19112. "McpServerNotFoundError": {
  19113. "type": "object",
  19114. "properties": {
  19115. "_tag": {
  19116. "type": "string",
  19117. "enum": ["McpServerNotFoundError"]
  19118. },
  19119. "name": {
  19120. "type": "string"
  19121. },
  19122. "message": {
  19123. "type": "string"
  19124. }
  19125. },
  19126. "required": ["_tag", "name", "message"],
  19127. "additionalProperties": false
  19128. },
  19129. "Project": {
  19130. "type": "object",
  19131. "properties": {
  19132. "id": {
  19133. "type": "string"
  19134. },
  19135. "worktree": {
  19136. "type": "string"
  19137. },
  19138. "vcs": {
  19139. "type": "string",
  19140. "enum": ["git"]
  19141. },
  19142. "name": {
  19143. "type": "string"
  19144. },
  19145. "icon": {
  19146. "type": "object",
  19147. "properties": {
  19148. "url": {
  19149. "type": "string"
  19150. },
  19151. "override": {
  19152. "type": "string"
  19153. },
  19154. "color": {
  19155. "type": "string"
  19156. }
  19157. },
  19158. "additionalProperties": false
  19159. },
  19160. "commands": {
  19161. "type": "object",
  19162. "properties": {
  19163. "start": {
  19164. "type": "string",
  19165. "description": "Startup script to run when creating a new workspace (worktree)"
  19166. }
  19167. },
  19168. "additionalProperties": false
  19169. },
  19170. "time": {
  19171. "type": "object",
  19172. "properties": {
  19173. "created": {
  19174. "type": "integer",
  19175. "minimum": 0
  19176. },
  19177. "updated": {
  19178. "type": "integer",
  19179. "minimum": 0
  19180. },
  19181. "initialized": {
  19182. "type": "integer",
  19183. "minimum": 0
  19184. }
  19185. },
  19186. "required": ["created", "updated"],
  19187. "additionalProperties": false
  19188. },
  19189. "sandboxes": {
  19190. "type": "array",
  19191. "items": {
  19192. "type": "string"
  19193. }
  19194. }
  19195. },
  19196. "required": ["id", "worktree", "time", "sandboxes"],
  19197. "additionalProperties": false
  19198. },
  19199. "ProjectNotFoundError": {
  19200. "type": "object",
  19201. "properties": {
  19202. "_tag": {
  19203. "type": "string",
  19204. "enum": ["ProjectNotFoundError"]
  19205. },
  19206. "projectID": {
  19207. "type": "string"
  19208. },
  19209. "message": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "required": ["_tag", "projectID", "message"],
  19214. "additionalProperties": false
  19215. },
  19216. "ProjectCopyError": {
  19217. "type": "object",
  19218. "properties": {
  19219. "name": {
  19220. "type": "string",
  19221. "enum": ["ProjectCopyError"]
  19222. },
  19223. "data": {
  19224. "type": "object",
  19225. "properties": {
  19226. "message": {
  19227. "type": "string"
  19228. }
  19229. },
  19230. "required": ["message"],
  19231. "additionalProperties": false
  19232. }
  19233. },
  19234. "required": ["name", "data"],
  19235. "additionalProperties": false
  19236. },
  19237. "PtyNotFoundError": {
  19238. "type": "object",
  19239. "properties": {
  19240. "_tag": {
  19241. "type": "string",
  19242. "enum": ["PtyNotFoundError"]
  19243. },
  19244. "ptyID": {
  19245. "type": "string"
  19246. },
  19247. "message": {
  19248. "type": "string"
  19249. }
  19250. },
  19251. "required": ["_tag", "ptyID", "message"],
  19252. "additionalProperties": false
  19253. },
  19254. "PtyForbiddenError": {
  19255. "type": "object",
  19256. "properties": {
  19257. "_tag": {
  19258. "type": "string",
  19259. "enum": ["PtyForbiddenError"]
  19260. },
  19261. "message": {
  19262. "type": "string"
  19263. }
  19264. },
  19265. "required": ["_tag", "message"],
  19266. "additionalProperties": false
  19267. },
  19268. "QuestionRequest": {
  19269. "type": "object",
  19270. "properties": {
  19271. "id": {
  19272. "type": "string",
  19273. "pattern": "^que"
  19274. },
  19275. "sessionID": {
  19276. "type": "string",
  19277. "pattern": "^ses"
  19278. },
  19279. "questions": {
  19280. "type": "array",
  19281. "items": {
  19282. "$ref": "#/components/schemas/QuestionInfo"
  19283. },
  19284. "description": "Questions to ask"
  19285. },
  19286. "tool": {
  19287. "$ref": "#/components/schemas/QuestionTool"
  19288. }
  19289. },
  19290. "required": ["id", "sessionID", "questions"],
  19291. "additionalProperties": false
  19292. },
  19293. "QuestionNotFoundError": {
  19294. "type": "object",
  19295. "properties": {
  19296. "_tag": {
  19297. "type": "string",
  19298. "enum": ["QuestionNotFoundError"]
  19299. },
  19300. "requestID": {
  19301. "type": "string"
  19302. },
  19303. "message": {
  19304. "type": "string"
  19305. }
  19306. },
  19307. "required": ["_tag", "requestID", "message"],
  19308. "additionalProperties": false
  19309. },
  19310. "PermissionRequest": {
  19311. "type": "object",
  19312. "properties": {
  19313. "id": {
  19314. "type": "string",
  19315. "pattern": "^per"
  19316. },
  19317. "sessionID": {
  19318. "type": "string",
  19319. "pattern": "^ses"
  19320. },
  19321. "permission": {
  19322. "type": "string"
  19323. },
  19324. "patterns": {
  19325. "type": "array",
  19326. "items": {
  19327. "type": "string"
  19328. }
  19329. },
  19330. "metadata": {
  19331. "type": "object"
  19332. },
  19333. "always": {
  19334. "type": "array",
  19335. "items": {
  19336. "type": "string"
  19337. }
  19338. },
  19339. "tool": {
  19340. "type": "object",
  19341. "properties": {
  19342. "messageID": {
  19343. "type": "string"
  19344. },
  19345. "callID": {
  19346. "type": "string"
  19347. }
  19348. },
  19349. "required": ["messageID", "callID"],
  19350. "additionalProperties": false
  19351. }
  19352. },
  19353. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19354. "additionalProperties": false
  19355. },
  19356. "PermissionNotFoundError": {
  19357. "type": "object",
  19358. "properties": {
  19359. "_tag": {
  19360. "type": "string",
  19361. "enum": ["PermissionNotFoundError"]
  19362. },
  19363. "requestID": {
  19364. "type": "string"
  19365. },
  19366. "message": {
  19367. "type": "string"
  19368. }
  19369. },
  19370. "required": ["_tag", "requestID", "message"],
  19371. "additionalProperties": false
  19372. },
  19373. "ProviderAuthMethod": {
  19374. "type": "object",
  19375. "properties": {
  19376. "type": {
  19377. "type": "string",
  19378. "enum": ["oauth", "api"]
  19379. },
  19380. "label": {
  19381. "type": "string"
  19382. },
  19383. "prompts": {
  19384. "type": "array",
  19385. "items": {
  19386. "anyOf": [
  19387. {
  19388. "type": "object",
  19389. "properties": {
  19390. "type": {
  19391. "type": "string",
  19392. "enum": ["text"]
  19393. },
  19394. "key": {
  19395. "type": "string"
  19396. },
  19397. "message": {
  19398. "type": "string"
  19399. },
  19400. "placeholder": {
  19401. "type": "string"
  19402. },
  19403. "when": {
  19404. "type": "object",
  19405. "properties": {
  19406. "key": {
  19407. "type": "string"
  19408. },
  19409. "op": {
  19410. "type": "string",
  19411. "enum": ["eq", "neq"]
  19412. },
  19413. "value": {
  19414. "type": "string"
  19415. }
  19416. },
  19417. "required": ["key", "op", "value"],
  19418. "additionalProperties": false
  19419. }
  19420. },
  19421. "required": ["type", "key", "message"],
  19422. "additionalProperties": false
  19423. },
  19424. {
  19425. "type": "object",
  19426. "properties": {
  19427. "type": {
  19428. "type": "string",
  19429. "enum": ["select"]
  19430. },
  19431. "key": {
  19432. "type": "string"
  19433. },
  19434. "message": {
  19435. "type": "string"
  19436. },
  19437. "options": {
  19438. "type": "array",
  19439. "items": {
  19440. "type": "object",
  19441. "properties": {
  19442. "label": {
  19443. "type": "string"
  19444. },
  19445. "value": {
  19446. "type": "string"
  19447. },
  19448. "hint": {
  19449. "type": "string"
  19450. }
  19451. },
  19452. "required": ["label", "value"],
  19453. "additionalProperties": false
  19454. }
  19455. },
  19456. "when": {
  19457. "type": "object",
  19458. "properties": {
  19459. "key": {
  19460. "type": "string"
  19461. },
  19462. "op": {
  19463. "type": "string",
  19464. "enum": ["eq", "neq"]
  19465. },
  19466. "value": {
  19467. "type": "string"
  19468. }
  19469. },
  19470. "required": ["key", "op", "value"],
  19471. "additionalProperties": false
  19472. }
  19473. },
  19474. "required": ["type", "key", "message", "options"],
  19475. "additionalProperties": false
  19476. }
  19477. ]
  19478. }
  19479. }
  19480. },
  19481. "required": ["type", "label"],
  19482. "additionalProperties": false
  19483. },
  19484. "ProviderAuthAuthorization": {
  19485. "type": "object",
  19486. "properties": {
  19487. "url": {
  19488. "type": "string"
  19489. },
  19490. "method": {
  19491. "type": "string",
  19492. "enum": ["auto", "code"]
  19493. },
  19494. "instructions": {
  19495. "type": "string"
  19496. }
  19497. },
  19498. "required": ["url", "method", "instructions"],
  19499. "additionalProperties": false
  19500. },
  19501. "ProviderAuthError1": {
  19502. "type": "object",
  19503. "properties": {
  19504. "name": {
  19505. "type": "string",
  19506. "enum": [
  19507. "BadRequest",
  19508. "ProviderAuthOauthMissing",
  19509. "ProviderAuthOauthCodeMissing",
  19510. "ProviderAuthOauthCallbackFailed",
  19511. "ProviderAuthValidationFailed"
  19512. ]
  19513. },
  19514. "data": {
  19515. "type": "object",
  19516. "properties": {
  19517. "providerID": {
  19518. "type": "string"
  19519. },
  19520. "field": {
  19521. "type": "string"
  19522. },
  19523. "message": {
  19524. "type": "string"
  19525. },
  19526. "kind": {
  19527. "type": "string"
  19528. }
  19529. },
  19530. "additionalProperties": false
  19531. }
  19532. },
  19533. "required": ["name", "data"],
  19534. "additionalProperties": false
  19535. },
  19536. "NotFoundError": {
  19537. "type": "object",
  19538. "required": ["name", "data"],
  19539. "properties": {
  19540. "name": {
  19541. "type": "string",
  19542. "enum": ["NotFoundError"]
  19543. },
  19544. "data": {
  19545. "type": "object",
  19546. "required": ["message"],
  19547. "properties": {
  19548. "message": {
  19549. "type": "string"
  19550. }
  19551. }
  19552. }
  19553. }
  19554. },
  19555. "TextPartInput": {
  19556. "type": "object",
  19557. "properties": {
  19558. "id": {
  19559. "type": "string",
  19560. "pattern": "^prt"
  19561. },
  19562. "type": {
  19563. "type": "string",
  19564. "enum": ["text"]
  19565. },
  19566. "text": {
  19567. "type": "string"
  19568. },
  19569. "synthetic": {
  19570. "type": "boolean"
  19571. },
  19572. "ignored": {
  19573. "type": "boolean"
  19574. },
  19575. "time": {
  19576. "type": "object",
  19577. "properties": {
  19578. "start": {
  19579. "type": "integer",
  19580. "minimum": 0
  19581. },
  19582. "end": {
  19583. "type": "integer",
  19584. "minimum": 0
  19585. }
  19586. },
  19587. "required": ["start"],
  19588. "additionalProperties": false
  19589. },
  19590. "metadata": {
  19591. "type": "object"
  19592. }
  19593. },
  19594. "required": ["type", "text"],
  19595. "additionalProperties": false
  19596. },
  19597. "FilePartInput": {
  19598. "type": "object",
  19599. "properties": {
  19600. "id": {
  19601. "type": "string",
  19602. "pattern": "^prt"
  19603. },
  19604. "type": {
  19605. "type": "string",
  19606. "enum": ["file"]
  19607. },
  19608. "mime": {
  19609. "type": "string"
  19610. },
  19611. "filename": {
  19612. "type": "string"
  19613. },
  19614. "url": {
  19615. "type": "string"
  19616. },
  19617. "source": {
  19618. "$ref": "#/components/schemas/FilePartSource"
  19619. }
  19620. },
  19621. "required": ["type", "mime", "url"],
  19622. "additionalProperties": false
  19623. },
  19624. "AgentPartInput": {
  19625. "type": "object",
  19626. "properties": {
  19627. "id": {
  19628. "type": "string",
  19629. "pattern": "^prt"
  19630. },
  19631. "type": {
  19632. "type": "string",
  19633. "enum": ["agent"]
  19634. },
  19635. "name": {
  19636. "type": "string"
  19637. },
  19638. "source": {
  19639. "type": "object",
  19640. "properties": {
  19641. "value": {
  19642. "type": "string"
  19643. },
  19644. "start": {
  19645. "type": "integer",
  19646. "minimum": 0
  19647. },
  19648. "end": {
  19649. "type": "integer",
  19650. "minimum": 0
  19651. }
  19652. },
  19653. "required": ["value", "start", "end"],
  19654. "additionalProperties": false
  19655. }
  19656. },
  19657. "required": ["type", "name"],
  19658. "additionalProperties": false
  19659. },
  19660. "SubtaskPartInput": {
  19661. "type": "object",
  19662. "properties": {
  19663. "id": {
  19664. "type": "string",
  19665. "pattern": "^prt"
  19666. },
  19667. "type": {
  19668. "type": "string",
  19669. "enum": ["subtask"]
  19670. },
  19671. "prompt": {
  19672. "type": "string"
  19673. },
  19674. "description": {
  19675. "type": "string"
  19676. },
  19677. "agent": {
  19678. "type": "string"
  19679. },
  19680. "model": {
  19681. "type": "object",
  19682. "properties": {
  19683. "providerID": {
  19684. "type": "string"
  19685. },
  19686. "modelID": {
  19687. "type": "string"
  19688. }
  19689. },
  19690. "required": ["providerID", "modelID"],
  19691. "additionalProperties": false
  19692. },
  19693. "command": {
  19694. "type": "string"
  19695. }
  19696. },
  19697. "required": ["type", "prompt", "description", "agent"],
  19698. "additionalProperties": false
  19699. },
  19700. "SessionBusyError": {
  19701. "type": "object",
  19702. "properties": {
  19703. "_tag": {
  19704. "type": "string",
  19705. "enum": ["SessionBusyError"]
  19706. },
  19707. "sessionID": {
  19708. "type": "string"
  19709. },
  19710. "message": {
  19711. "type": "string"
  19712. }
  19713. },
  19714. "required": ["_tag", "sessionID", "message"],
  19715. "additionalProperties": false
  19716. },
  19717. "EventTuiPromptAppend": {
  19718. "type": "object",
  19719. "properties": {
  19720. "type": {
  19721. "type": "string",
  19722. "enum": ["tui.prompt.append"]
  19723. },
  19724. "properties": {
  19725. "type": "object",
  19726. "properties": {
  19727. "text": {
  19728. "type": "string"
  19729. }
  19730. },
  19731. "required": ["text"],
  19732. "additionalProperties": false
  19733. }
  19734. },
  19735. "required": ["type", "properties"],
  19736. "additionalProperties": false
  19737. },
  19738. "EventTuiCommandExecute": {
  19739. "type": "object",
  19740. "properties": {
  19741. "type": {
  19742. "type": "string",
  19743. "enum": ["tui.command.execute"]
  19744. },
  19745. "properties": {
  19746. "type": "object",
  19747. "properties": {
  19748. "command": {
  19749. "anyOf": [
  19750. {
  19751. "type": "string",
  19752. "enum": [
  19753. "session.list",
  19754. "session.new",
  19755. "session.share",
  19756. "session.interrupt",
  19757. "session.compact",
  19758. "session.page.up",
  19759. "session.page.down",
  19760. "session.line.up",
  19761. "session.line.down",
  19762. "session.half.page.up",
  19763. "session.half.page.down",
  19764. "session.first",
  19765. "session.last",
  19766. "prompt.clear",
  19767. "prompt.submit",
  19768. "agent.cycle"
  19769. ]
  19770. },
  19771. {
  19772. "type": "string"
  19773. }
  19774. ]
  19775. }
  19776. },
  19777. "required": ["command"],
  19778. "additionalProperties": false
  19779. }
  19780. },
  19781. "required": ["type", "properties"],
  19782. "additionalProperties": false
  19783. },
  19784. "EventTuiToastShow": {
  19785. "type": "object",
  19786. "properties": {
  19787. "type": {
  19788. "type": "string",
  19789. "enum": ["tui.toast.show"]
  19790. },
  19791. "properties": {
  19792. "type": "object",
  19793. "properties": {
  19794. "title": {
  19795. "type": "string"
  19796. },
  19797. "message": {
  19798. "type": "string"
  19799. },
  19800. "variant": {
  19801. "type": "string",
  19802. "enum": ["info", "success", "warning", "error"]
  19803. },
  19804. "duration": {
  19805. "type": "integer",
  19806. "exclusiveMinimum": 0
  19807. }
  19808. },
  19809. "required": ["message", "variant"],
  19810. "additionalProperties": false
  19811. }
  19812. },
  19813. "required": ["type", "properties"],
  19814. "additionalProperties": false
  19815. },
  19816. "EventTuiSessionSelect": {
  19817. "type": "object",
  19818. "properties": {
  19819. "type": {
  19820. "type": "string",
  19821. "enum": ["tui.session.select"]
  19822. },
  19823. "properties": {
  19824. "type": "object",
  19825. "properties": {
  19826. "sessionID": {
  19827. "type": "string",
  19828. "pattern": "^ses",
  19829. "description": "Session ID to navigate to"
  19830. }
  19831. },
  19832. "required": ["sessionID"],
  19833. "additionalProperties": false
  19834. }
  19835. },
  19836. "required": ["type", "properties"],
  19837. "additionalProperties": false
  19838. },
  19839. "Workspace": {
  19840. "type": "object",
  19841. "properties": {
  19842. "id": {
  19843. "type": "string",
  19844. "pattern": "^wrk"
  19845. },
  19846. "type": {
  19847. "type": "string"
  19848. },
  19849. "name": {
  19850. "type": "string"
  19851. },
  19852. "branch": {
  19853. "anyOf": [
  19854. {
  19855. "type": "string"
  19856. },
  19857. {
  19858. "type": "null"
  19859. }
  19860. ]
  19861. },
  19862. "directory": {
  19863. "anyOf": [
  19864. {
  19865. "type": "string"
  19866. },
  19867. {
  19868. "type": "null"
  19869. }
  19870. ]
  19871. },
  19872. "extra": {
  19873. "anyOf": [
  19874. {},
  19875. {
  19876. "type": "null"
  19877. }
  19878. ]
  19879. },
  19880. "projectID": {
  19881. "type": "string"
  19882. },
  19883. "timeUsed": {
  19884. "anyOf": [
  19885. {
  19886. "type": "number"
  19887. },
  19888. {
  19889. "type": "string",
  19890. "enum": ["NaN"]
  19891. },
  19892. {
  19893. "type": "string",
  19894. "enum": ["Infinity"]
  19895. },
  19896. {
  19897. "type": "string",
  19898. "enum": ["-Infinity"]
  19899. },
  19900. {
  19901. "type": "string",
  19902. "enum": ["Infinity", "-Infinity", "NaN"]
  19903. }
  19904. ]
  19905. }
  19906. },
  19907. "required": ["id", "type", "name", "projectID", "timeUsed"],
  19908. "additionalProperties": false
  19909. },
  19910. "WorkspaceCreateError": {
  19911. "type": "object",
  19912. "properties": {
  19913. "name": {
  19914. "type": "string",
  19915. "enum": ["WorkspaceCreateError"]
  19916. },
  19917. "data": {
  19918. "type": "object",
  19919. "properties": {
  19920. "message": {
  19921. "type": "string"
  19922. }
  19923. },
  19924. "required": ["message"],
  19925. "additionalProperties": false
  19926. }
  19927. },
  19928. "required": ["name", "data"],
  19929. "additionalProperties": false
  19930. },
  19931. "WorkspaceWarpError": {
  19932. "type": "object",
  19933. "properties": {
  19934. "name": {
  19935. "type": "string",
  19936. "enum": ["WorkspaceWarpError"]
  19937. },
  19938. "data": {
  19939. "type": "object",
  19940. "properties": {
  19941. "message": {
  19942. "type": "string"
  19943. }
  19944. },
  19945. "required": ["message"],
  19946. "additionalProperties": false
  19947. }
  19948. },
  19949. "required": ["name", "data"],
  19950. "additionalProperties": false
  19951. },
  19952. "UnauthorizedError": {
  19953. "type": "object",
  19954. "properties": {
  19955. "_tag": {
  19956. "type": "string",
  19957. "enum": ["UnauthorizedError"]
  19958. },
  19959. "message": {
  19960. "type": "string"
  19961. }
  19962. },
  19963. "required": ["_tag", "message"],
  19964. "additionalProperties": false
  19965. },
  19966. "V2SessionsResponse": {
  19967. "type": "object",
  19968. "properties": {
  19969. "data": {
  19970. "type": "array",
  19971. "items": {
  19972. "$ref": "#/components/schemas/SessionV2Info"
  19973. }
  19974. },
  19975. "cursor": {
  19976. "type": "object",
  19977. "properties": {
  19978. "previous": {
  19979. "type": "string"
  19980. },
  19981. "next": {
  19982. "type": "string"
  19983. }
  19984. },
  19985. "additionalProperties": false
  19986. }
  19987. },
  19988. "required": ["data", "cursor"],
  19989. "additionalProperties": false
  19990. },
  19991. "InvalidCursorError": {
  19992. "type": "object",
  19993. "properties": {
  19994. "_tag": {
  19995. "type": "string",
  19996. "enum": ["InvalidCursorError"]
  19997. },
  19998. "message": {
  19999. "type": "string"
  20000. }
  20001. },
  20002. "required": ["_tag", "message"],
  20003. "additionalProperties": false
  20004. },
  20005. "ConflictError": {
  20006. "type": "object",
  20007. "properties": {
  20008. "_tag": {
  20009. "type": "string",
  20010. "enum": ["ConflictError"]
  20011. },
  20012. "message": {
  20013. "type": "string"
  20014. },
  20015. "resource": {
  20016. "type": "string"
  20017. }
  20018. },
  20019. "required": ["_tag", "message"],
  20020. "additionalProperties": false
  20021. },
  20022. "SessionNotFoundError": {
  20023. "type": "object",
  20024. "properties": {
  20025. "_tag": {
  20026. "type": "string",
  20027. "enum": ["SessionNotFoundError"]
  20028. },
  20029. "sessionID": {
  20030. "type": "string"
  20031. },
  20032. "message": {
  20033. "type": "string"
  20034. }
  20035. },
  20036. "required": ["_tag", "sessionID", "message"],
  20037. "additionalProperties": false
  20038. },
  20039. "ServiceUnavailableError": {
  20040. "type": "object",
  20041. "properties": {
  20042. "_tag": {
  20043. "type": "string",
  20044. "enum": ["ServiceUnavailableError"]
  20045. },
  20046. "message": {
  20047. "type": "string"
  20048. },
  20049. "service": {
  20050. "type": "string"
  20051. }
  20052. },
  20053. "required": ["_tag", "message"],
  20054. "additionalProperties": false
  20055. },
  20056. "UnknownError1": {
  20057. "type": "object",
  20058. "properties": {
  20059. "_tag": {
  20060. "type": "string",
  20061. "enum": ["UnknownError"]
  20062. },
  20063. "message": {
  20064. "type": "string"
  20065. },
  20066. "ref": {
  20067. "type": "string"
  20068. }
  20069. },
  20070. "required": ["_tag", "message"],
  20071. "additionalProperties": false
  20072. },
  20073. "V2SessionMessagesResponse": {
  20074. "type": "object",
  20075. "properties": {
  20076. "data": {
  20077. "type": "array",
  20078. "items": {
  20079. "$ref": "#/components/schemas/SessionMessage"
  20080. }
  20081. },
  20082. "cursor": {
  20083. "type": "object",
  20084. "properties": {
  20085. "previous": {
  20086. "type": "string"
  20087. },
  20088. "next": {
  20089. "type": "string"
  20090. }
  20091. },
  20092. "additionalProperties": false
  20093. }
  20094. },
  20095. "required": ["data", "cursor"],
  20096. "additionalProperties": false
  20097. },
  20098. "ProviderNotFoundError": {
  20099. "type": "object",
  20100. "properties": {
  20101. "_tag": {
  20102. "type": "string",
  20103. "enum": ["ProviderNotFoundError"]
  20104. },
  20105. "providerID": {
  20106. "type": "string"
  20107. },
  20108. "message": {
  20109. "type": "string"
  20110. }
  20111. },
  20112. "required": ["_tag", "providerID", "message"],
  20113. "additionalProperties": false
  20114. },
  20115. "effect_HttpApiError_Forbidden": {
  20116. "type": "object",
  20117. "properties": {
  20118. "_tag": {
  20119. "type": "string",
  20120. "enum": ["Forbidden"]
  20121. }
  20122. },
  20123. "required": ["_tag"],
  20124. "additionalProperties": false
  20125. },
  20126. "Event.tui.prompt.append": {
  20127. "type": "object",
  20128. "properties": {
  20129. "id": {
  20130. "type": "string"
  20131. },
  20132. "type": {
  20133. "type": "string",
  20134. "enum": ["tui.prompt.append"]
  20135. },
  20136. "properties": {
  20137. "type": "object",
  20138. "properties": {
  20139. "text": {
  20140. "type": "string"
  20141. }
  20142. },
  20143. "required": ["text"],
  20144. "additionalProperties": false
  20145. }
  20146. },
  20147. "required": ["id", "type", "properties"],
  20148. "additionalProperties": false
  20149. },
  20150. "Event.tui.command.execute": {
  20151. "type": "object",
  20152. "properties": {
  20153. "id": {
  20154. "type": "string"
  20155. },
  20156. "type": {
  20157. "type": "string",
  20158. "enum": ["tui.command.execute"]
  20159. },
  20160. "properties": {
  20161. "type": "object",
  20162. "properties": {
  20163. "command": {
  20164. "anyOf": [
  20165. {
  20166. "type": "string",
  20167. "enum": [
  20168. "session.list",
  20169. "session.new",
  20170. "session.share",
  20171. "session.interrupt",
  20172. "session.compact",
  20173. "session.page.up",
  20174. "session.page.down",
  20175. "session.line.up",
  20176. "session.line.down",
  20177. "session.half.page.up",
  20178. "session.half.page.down",
  20179. "session.first",
  20180. "session.last",
  20181. "prompt.clear",
  20182. "prompt.submit",
  20183. "agent.cycle"
  20184. ]
  20185. },
  20186. {
  20187. "type": "string"
  20188. }
  20189. ]
  20190. }
  20191. },
  20192. "required": ["command"],
  20193. "additionalProperties": false
  20194. }
  20195. },
  20196. "required": ["id", "type", "properties"],
  20197. "additionalProperties": false
  20198. },
  20199. "Event.tui.toast.show": {
  20200. "type": "object",
  20201. "properties": {
  20202. "id": {
  20203. "type": "string"
  20204. },
  20205. "type": {
  20206. "type": "string",
  20207. "enum": ["tui.toast.show"]
  20208. },
  20209. "properties": {
  20210. "type": "object",
  20211. "properties": {
  20212. "title": {
  20213. "type": "string"
  20214. },
  20215. "message": {
  20216. "type": "string"
  20217. },
  20218. "variant": {
  20219. "type": "string",
  20220. "enum": ["info", "success", "warning", "error"]
  20221. },
  20222. "duration": {
  20223. "type": "integer",
  20224. "exclusiveMinimum": 0
  20225. }
  20226. },
  20227. "required": ["message", "variant"],
  20228. "additionalProperties": false
  20229. }
  20230. },
  20231. "required": ["id", "type", "properties"],
  20232. "additionalProperties": false
  20233. },
  20234. "Event.tui.session.select": {
  20235. "type": "object",
  20236. "properties": {
  20237. "id": {
  20238. "type": "string"
  20239. },
  20240. "type": {
  20241. "type": "string",
  20242. "enum": ["tui.session.select"]
  20243. },
  20244. "properties": {
  20245. "type": "object",
  20246. "properties": {
  20247. "sessionID": {
  20248. "type": "string",
  20249. "pattern": "^ses",
  20250. "description": "Session ID to navigate to"
  20251. }
  20252. },
  20253. "required": ["sessionID"],
  20254. "additionalProperties": false
  20255. }
  20256. },
  20257. "required": ["id", "type", "properties"],
  20258. "additionalProperties": false
  20259. },
  20260. "MoveSessionDestination": {
  20261. "type": "object",
  20262. "properties": {
  20263. "directory": {
  20264. "type": "string"
  20265. }
  20266. },
  20267. "required": ["directory"],
  20268. "additionalProperties": false
  20269. },
  20270. "ModelV2Info": {
  20271. "type": "object",
  20272. "properties": {
  20273. "id": {
  20274. "type": "string"
  20275. },
  20276. "providerID": {
  20277. "type": "string"
  20278. },
  20279. "family": {
  20280. "type": "string"
  20281. },
  20282. "name": {
  20283. "type": "string"
  20284. },
  20285. "api": {
  20286. "anyOf": [
  20287. {
  20288. "type": "object",
  20289. "properties": {
  20290. "id": {
  20291. "type": "string"
  20292. },
  20293. "type": {
  20294. "type": "string",
  20295. "enum": ["aisdk"]
  20296. },
  20297. "package": {
  20298. "type": "string"
  20299. },
  20300. "url": {
  20301. "type": "string"
  20302. },
  20303. "settings": {
  20304. "type": "object"
  20305. }
  20306. },
  20307. "required": ["id", "type", "package"],
  20308. "additionalProperties": false
  20309. },
  20310. {
  20311. "type": "object",
  20312. "properties": {
  20313. "id": {
  20314. "type": "string"
  20315. },
  20316. "type": {
  20317. "type": "string",
  20318. "enum": ["native"]
  20319. },
  20320. "url": {
  20321. "type": "string"
  20322. },
  20323. "settings": {
  20324. "type": "object"
  20325. }
  20326. },
  20327. "required": ["id", "type", "settings"],
  20328. "additionalProperties": false
  20329. }
  20330. ]
  20331. },
  20332. "capabilities": {
  20333. "type": "object",
  20334. "properties": {
  20335. "tools": {
  20336. "type": "boolean"
  20337. },
  20338. "input": {
  20339. "type": "array",
  20340. "items": {
  20341. "type": "string"
  20342. }
  20343. },
  20344. "output": {
  20345. "type": "array",
  20346. "items": {
  20347. "type": "string"
  20348. }
  20349. }
  20350. },
  20351. "required": ["tools", "input", "output"],
  20352. "additionalProperties": false
  20353. },
  20354. "request": {
  20355. "type": "object",
  20356. "properties": {
  20357. "headers": {
  20358. "type": "object",
  20359. "additionalProperties": {
  20360. "type": "string"
  20361. }
  20362. },
  20363. "body": {
  20364. "type": "object"
  20365. },
  20366. "variant": {
  20367. "type": "string"
  20368. }
  20369. },
  20370. "required": ["headers", "body"],
  20371. "additionalProperties": false
  20372. },
  20373. "variants": {
  20374. "type": "array",
  20375. "items": {
  20376. "type": "object",
  20377. "properties": {
  20378. "id": {
  20379. "type": "string"
  20380. },
  20381. "headers": {
  20382. "type": "object",
  20383. "additionalProperties": {
  20384. "type": "string"
  20385. }
  20386. },
  20387. "body": {
  20388. "type": "object"
  20389. }
  20390. },
  20391. "required": ["id", "headers", "body"],
  20392. "additionalProperties": false
  20393. }
  20394. },
  20395. "time": {
  20396. "type": "object",
  20397. "properties": {
  20398. "released": {
  20399. "anyOf": [
  20400. {
  20401. "type": "number"
  20402. },
  20403. {
  20404. "type": "string",
  20405. "enum": ["NaN"]
  20406. },
  20407. {
  20408. "type": "string",
  20409. "enum": ["Infinity"]
  20410. },
  20411. {
  20412. "type": "string",
  20413. "enum": ["-Infinity"]
  20414. },
  20415. {
  20416. "type": "string",
  20417. "enum": ["Infinity", "-Infinity", "NaN"]
  20418. }
  20419. ]
  20420. }
  20421. },
  20422. "required": ["released"],
  20423. "additionalProperties": false
  20424. },
  20425. "cost": {
  20426. "type": "array",
  20427. "items": {
  20428. "type": "object",
  20429. "properties": {
  20430. "tier": {
  20431. "type": "object",
  20432. "properties": {
  20433. "type": {
  20434. "type": "string",
  20435. "enum": ["context"]
  20436. },
  20437. "size": {
  20438. "type": "integer"
  20439. }
  20440. },
  20441. "required": ["type", "size"],
  20442. "additionalProperties": false
  20443. },
  20444. "input": {
  20445. "type": "number"
  20446. },
  20447. "output": {
  20448. "type": "number"
  20449. },
  20450. "cache": {
  20451. "type": "object",
  20452. "properties": {
  20453. "read": {
  20454. "type": "number"
  20455. },
  20456. "write": {
  20457. "type": "number"
  20458. }
  20459. },
  20460. "required": ["read", "write"],
  20461. "additionalProperties": false
  20462. }
  20463. },
  20464. "required": ["input", "output", "cache"],
  20465. "additionalProperties": false
  20466. }
  20467. },
  20468. "status": {
  20469. "type": "string",
  20470. "enum": ["alpha", "beta", "deprecated", "active"]
  20471. },
  20472. "enabled": {
  20473. "type": "boolean"
  20474. },
  20475. "limit": {
  20476. "type": "object",
  20477. "properties": {
  20478. "context": {
  20479. "type": "integer"
  20480. },
  20481. "input": {
  20482. "type": "integer"
  20483. },
  20484. "output": {
  20485. "type": "integer"
  20486. }
  20487. },
  20488. "required": ["context", "output"],
  20489. "additionalProperties": false
  20490. }
  20491. },
  20492. "required": [
  20493. "id",
  20494. "providerID",
  20495. "name",
  20496. "api",
  20497. "capabilities",
  20498. "request",
  20499. "variants",
  20500. "time",
  20501. "cost",
  20502. "status",
  20503. "enabled",
  20504. "limit"
  20505. ],
  20506. "additionalProperties": false
  20507. },
  20508. "LocationRef": {
  20509. "type": "object",
  20510. "properties": {
  20511. "directory": {
  20512. "type": "string"
  20513. },
  20514. "workspaceID": {
  20515. "type": "string",
  20516. "pattern": "^wrk"
  20517. }
  20518. },
  20519. "required": ["directory"],
  20520. "additionalProperties": false
  20521. },
  20522. "PromptSource": {
  20523. "type": "object",
  20524. "properties": {
  20525. "start": {
  20526. "type": "number"
  20527. },
  20528. "end": {
  20529. "type": "number"
  20530. },
  20531. "text": {
  20532. "type": "string"
  20533. }
  20534. },
  20535. "required": ["start", "end", "text"],
  20536. "additionalProperties": false
  20537. },
  20538. "PromptFileAttachment": {
  20539. "type": "object",
  20540. "properties": {
  20541. "uri": {
  20542. "type": "string"
  20543. },
  20544. "mime": {
  20545. "type": "string"
  20546. },
  20547. "name": {
  20548. "type": "string"
  20549. },
  20550. "description": {
  20551. "type": "string"
  20552. },
  20553. "source": {
  20554. "$ref": "#/components/schemas/PromptSource"
  20555. }
  20556. },
  20557. "required": ["uri", "mime"],
  20558. "additionalProperties": false
  20559. },
  20560. "PromptAgentAttachment": {
  20561. "type": "object",
  20562. "properties": {
  20563. "name": {
  20564. "type": "string"
  20565. },
  20566. "source": {
  20567. "$ref": "#/components/schemas/PromptSource"
  20568. }
  20569. },
  20570. "required": ["name"],
  20571. "additionalProperties": false
  20572. },
  20573. "PromptReferenceAttachment": {
  20574. "type": "object",
  20575. "properties": {
  20576. "name": {
  20577. "type": "string"
  20578. },
  20579. "kind": {
  20580. "type": "string",
  20581. "enum": ["local", "git", "invalid"]
  20582. },
  20583. "uri": {
  20584. "type": "string"
  20585. },
  20586. "repository": {
  20587. "type": "string"
  20588. },
  20589. "branch": {
  20590. "type": "string"
  20591. },
  20592. "target": {
  20593. "type": "string"
  20594. },
  20595. "targetUri": {
  20596. "type": "string"
  20597. },
  20598. "problem": {
  20599. "type": "string"
  20600. },
  20601. "source": {
  20602. "$ref": "#/components/schemas/PromptSource"
  20603. }
  20604. },
  20605. "required": ["name", "kind"],
  20606. "additionalProperties": false
  20607. },
  20608. "SessionErrorUnknown": {
  20609. "type": "object",
  20610. "properties": {
  20611. "type": {
  20612. "type": "string",
  20613. "enum": ["unknown"]
  20614. },
  20615. "message": {
  20616. "type": "string"
  20617. }
  20618. },
  20619. "required": ["type", "message"],
  20620. "additionalProperties": false
  20621. },
  20622. "ToolTextContent": {
  20623. "type": "object",
  20624. "properties": {
  20625. "type": {
  20626. "type": "string",
  20627. "enum": ["text"]
  20628. },
  20629. "text": {
  20630. "type": "string"
  20631. }
  20632. },
  20633. "required": ["type", "text"],
  20634. "additionalProperties": false
  20635. },
  20636. "ToolFileContent": {
  20637. "type": "object",
  20638. "properties": {
  20639. "type": {
  20640. "type": "string",
  20641. "enum": ["file"]
  20642. },
  20643. "source": {
  20644. "anyOf": [
  20645. {
  20646. "type": "object",
  20647. "properties": {
  20648. "type": {
  20649. "type": "string",
  20650. "enum": ["data"]
  20651. },
  20652. "data": {
  20653. "type": "string"
  20654. }
  20655. },
  20656. "required": ["type", "data"],
  20657. "additionalProperties": false
  20658. },
  20659. {
  20660. "type": "object",
  20661. "properties": {
  20662. "type": {
  20663. "type": "string",
  20664. "enum": ["url"]
  20665. },
  20666. "url": {
  20667. "type": "string"
  20668. }
  20669. },
  20670. "required": ["type", "url"],
  20671. "additionalProperties": false
  20672. },
  20673. {
  20674. "type": "object",
  20675. "properties": {
  20676. "type": {
  20677. "type": "string",
  20678. "enum": ["file"]
  20679. },
  20680. "uri": {
  20681. "type": "string"
  20682. }
  20683. },
  20684. "required": ["type", "uri"],
  20685. "additionalProperties": false
  20686. }
  20687. ]
  20688. },
  20689. "mime": {
  20690. "type": "string"
  20691. },
  20692. "name": {
  20693. "type": "string"
  20694. }
  20695. },
  20696. "required": ["type", "source", "mime"],
  20697. "additionalProperties": false
  20698. },
  20699. "SessionNextRetry_error": {
  20700. "type": "object",
  20701. "properties": {
  20702. "message": {
  20703. "type": "string"
  20704. },
  20705. "statusCode": {
  20706. "type": "number"
  20707. },
  20708. "isRetryable": {
  20709. "type": "boolean"
  20710. },
  20711. "responseHeaders": {
  20712. "type": "object",
  20713. "additionalProperties": {
  20714. "type": "string"
  20715. }
  20716. },
  20717. "responseBody": {
  20718. "type": "string"
  20719. },
  20720. "metadata": {
  20721. "type": "object",
  20722. "additionalProperties": {
  20723. "type": "string"
  20724. }
  20725. }
  20726. },
  20727. "required": ["message", "isRetryable"],
  20728. "additionalProperties": false
  20729. },
  20730. "AuthOAuthCredential": {
  20731. "type": "object",
  20732. "properties": {
  20733. "type": {
  20734. "type": "string",
  20735. "enum": ["oauth"]
  20736. },
  20737. "refresh": {
  20738. "type": "string"
  20739. },
  20740. "access": {
  20741. "type": "string"
  20742. },
  20743. "expires": {
  20744. "type": "integer",
  20745. "minimum": 0
  20746. }
  20747. },
  20748. "required": ["type", "refresh", "access", "expires"],
  20749. "additionalProperties": false
  20750. },
  20751. "AuthApiKeyCredential": {
  20752. "type": "object",
  20753. "properties": {
  20754. "type": {
  20755. "type": "string",
  20756. "enum": ["api"]
  20757. },
  20758. "key": {
  20759. "type": "string"
  20760. },
  20761. "metadata": {
  20762. "type": "object",
  20763. "additionalProperties": {
  20764. "type": "string"
  20765. }
  20766. }
  20767. },
  20768. "required": ["type", "key"],
  20769. "additionalProperties": false
  20770. },
  20771. "AuthCredential": {
  20772. "anyOf": [
  20773. {
  20774. "$ref": "#/components/schemas/AuthOAuthCredential"
  20775. },
  20776. {
  20777. "$ref": "#/components/schemas/AuthApiKeyCredential"
  20778. }
  20779. ]
  20780. },
  20781. "AuthInfo": {
  20782. "type": "object",
  20783. "properties": {
  20784. "id": {
  20785. "type": "string"
  20786. },
  20787. "serviceID": {
  20788. "type": "string"
  20789. },
  20790. "description": {
  20791. "type": "string"
  20792. },
  20793. "credential": {
  20794. "$ref": "#/components/schemas/AuthCredential"
  20795. }
  20796. },
  20797. "required": ["id", "serviceID", "description", "credential"],
  20798. "additionalProperties": false
  20799. },
  20800. "PermissionV2Source": {
  20801. "type": "object",
  20802. "properties": {
  20803. "type": {
  20804. "type": "string",
  20805. "enum": ["tool"]
  20806. },
  20807. "messageID": {
  20808. "type": "string"
  20809. },
  20810. "callID": {
  20811. "type": "string"
  20812. }
  20813. },
  20814. "required": ["type", "messageID", "callID"],
  20815. "additionalProperties": false
  20816. },
  20817. "PermissionV2Reply": {
  20818. "type": "string",
  20819. "enum": ["once", "always", "reject"]
  20820. },
  20821. "QuestionV2Option": {
  20822. "type": "object",
  20823. "properties": {
  20824. "label": {
  20825. "type": "string",
  20826. "description": "Display text (1-5 words, concise)"
  20827. },
  20828. "description": {
  20829. "type": "string",
  20830. "description": "Explanation of choice"
  20831. }
  20832. },
  20833. "required": ["label", "description"],
  20834. "additionalProperties": false
  20835. },
  20836. "QuestionV2Info": {
  20837. "type": "object",
  20838. "properties": {
  20839. "question": {
  20840. "type": "string",
  20841. "description": "Complete question"
  20842. },
  20843. "header": {
  20844. "type": "string",
  20845. "description": "Very short label (max 30 chars)"
  20846. },
  20847. "options": {
  20848. "type": "array",
  20849. "items": {
  20850. "$ref": "#/components/schemas/QuestionV2Option"
  20851. },
  20852. "description": "Available choices"
  20853. },
  20854. "multiple": {
  20855. "type": "boolean"
  20856. },
  20857. "custom": {
  20858. "type": "boolean"
  20859. }
  20860. },
  20861. "required": ["question", "header", "options"],
  20862. "additionalProperties": false
  20863. },
  20864. "QuestionV2Tool": {
  20865. "type": "object",
  20866. "properties": {
  20867. "messageID": {
  20868. "type": "string"
  20869. },
  20870. "callID": {
  20871. "type": "string"
  20872. }
  20873. },
  20874. "required": ["messageID", "callID"],
  20875. "additionalProperties": false
  20876. },
  20877. "QuestionV2Answer": {
  20878. "type": "array",
  20879. "items": {
  20880. "type": "string"
  20881. }
  20882. },
  20883. "EventServerInstanceDisposed": {
  20884. "type": "object",
  20885. "properties": {
  20886. "id": {
  20887. "type": "string"
  20888. },
  20889. "type": {
  20890. "type": "string",
  20891. "enum": ["server.instance.disposed"]
  20892. },
  20893. "properties": {
  20894. "type": "object",
  20895. "properties": {
  20896. "directory": {
  20897. "type": "string"
  20898. }
  20899. },
  20900. "required": ["directory"],
  20901. "additionalProperties": false
  20902. }
  20903. },
  20904. "required": ["id", "type", "properties"],
  20905. "additionalProperties": false
  20906. },
  20907. "SyncEventSessionCreated": {
  20908. "type": "object",
  20909. "properties": {
  20910. "type": {
  20911. "type": "string",
  20912. "enum": ["sync"]
  20913. },
  20914. "id": {
  20915. "type": "string"
  20916. },
  20917. "syncEvent": {
  20918. "type": "object",
  20919. "properties": {
  20920. "type": {
  20921. "type": "string",
  20922. "enum": ["session.created.1"]
  20923. },
  20924. "id": {
  20925. "type": "string"
  20926. },
  20927. "seq": {
  20928. "type": "number"
  20929. },
  20930. "aggregateID": {
  20931. "type": "string"
  20932. },
  20933. "data": {
  20934. "type": "object",
  20935. "properties": {
  20936. "sessionID": {
  20937. "type": "string",
  20938. "pattern": "^ses"
  20939. },
  20940. "info": {
  20941. "$ref": "#/components/schemas/Session"
  20942. }
  20943. },
  20944. "required": ["sessionID", "info"],
  20945. "additionalProperties": false
  20946. }
  20947. },
  20948. "required": ["type", "id", "seq", "aggregateID", "data"],
  20949. "additionalProperties": false
  20950. }
  20951. },
  20952. "required": ["type", "id", "syncEvent"],
  20953. "additionalProperties": false
  20954. },
  20955. "SyncEventSessionUpdated": {
  20956. "type": "object",
  20957. "properties": {
  20958. "type": {
  20959. "type": "string",
  20960. "enum": ["sync"]
  20961. },
  20962. "id": {
  20963. "type": "string"
  20964. },
  20965. "syncEvent": {
  20966. "type": "object",
  20967. "properties": {
  20968. "type": {
  20969. "type": "string",
  20970. "enum": ["session.updated.1"]
  20971. },
  20972. "id": {
  20973. "type": "string"
  20974. },
  20975. "seq": {
  20976. "type": "number"
  20977. },
  20978. "aggregateID": {
  20979. "type": "string"
  20980. },
  20981. "data": {
  20982. "type": "object",
  20983. "properties": {
  20984. "sessionID": {
  20985. "type": "string",
  20986. "pattern": "^ses"
  20987. },
  20988. "info": {
  20989. "$ref": "#/components/schemas/Session"
  20990. }
  20991. },
  20992. "required": ["sessionID", "info"],
  20993. "additionalProperties": false
  20994. }
  20995. },
  20996. "required": ["type", "id", "seq", "aggregateID", "data"],
  20997. "additionalProperties": false
  20998. }
  20999. },
  21000. "required": ["type", "id", "syncEvent"],
  21001. "additionalProperties": false
  21002. },
  21003. "SyncEventSessionDeleted": {
  21004. "type": "object",
  21005. "properties": {
  21006. "type": {
  21007. "type": "string",
  21008. "enum": ["sync"]
  21009. },
  21010. "id": {
  21011. "type": "string"
  21012. },
  21013. "syncEvent": {
  21014. "type": "object",
  21015. "properties": {
  21016. "type": {
  21017. "type": "string",
  21018. "enum": ["session.deleted.1"]
  21019. },
  21020. "id": {
  21021. "type": "string"
  21022. },
  21023. "seq": {
  21024. "type": "number"
  21025. },
  21026. "aggregateID": {
  21027. "type": "string"
  21028. },
  21029. "data": {
  21030. "type": "object",
  21031. "properties": {
  21032. "sessionID": {
  21033. "type": "string",
  21034. "pattern": "^ses"
  21035. },
  21036. "info": {
  21037. "$ref": "#/components/schemas/Session"
  21038. }
  21039. },
  21040. "required": ["sessionID", "info"],
  21041. "additionalProperties": false
  21042. }
  21043. },
  21044. "required": ["type", "id", "seq", "aggregateID", "data"],
  21045. "additionalProperties": false
  21046. }
  21047. },
  21048. "required": ["type", "id", "syncEvent"],
  21049. "additionalProperties": false
  21050. },
  21051. "SyncEventMessageUpdated": {
  21052. "type": "object",
  21053. "properties": {
  21054. "type": {
  21055. "type": "string",
  21056. "enum": ["sync"]
  21057. },
  21058. "id": {
  21059. "type": "string"
  21060. },
  21061. "syncEvent": {
  21062. "type": "object",
  21063. "properties": {
  21064. "type": {
  21065. "type": "string",
  21066. "enum": ["message.updated.1"]
  21067. },
  21068. "id": {
  21069. "type": "string"
  21070. },
  21071. "seq": {
  21072. "type": "number"
  21073. },
  21074. "aggregateID": {
  21075. "type": "string"
  21076. },
  21077. "data": {
  21078. "type": "object",
  21079. "properties": {
  21080. "sessionID": {
  21081. "type": "string",
  21082. "pattern": "^ses"
  21083. },
  21084. "info": {
  21085. "$ref": "#/components/schemas/Message"
  21086. }
  21087. },
  21088. "required": ["sessionID", "info"],
  21089. "additionalProperties": false
  21090. }
  21091. },
  21092. "required": ["type", "id", "seq", "aggregateID", "data"],
  21093. "additionalProperties": false
  21094. }
  21095. },
  21096. "required": ["type", "id", "syncEvent"],
  21097. "additionalProperties": false
  21098. },
  21099. "SyncEventMessageRemoved": {
  21100. "type": "object",
  21101. "properties": {
  21102. "type": {
  21103. "type": "string",
  21104. "enum": ["sync"]
  21105. },
  21106. "id": {
  21107. "type": "string"
  21108. },
  21109. "syncEvent": {
  21110. "type": "object",
  21111. "properties": {
  21112. "type": {
  21113. "type": "string",
  21114. "enum": ["message.removed.1"]
  21115. },
  21116. "id": {
  21117. "type": "string"
  21118. },
  21119. "seq": {
  21120. "type": "number"
  21121. },
  21122. "aggregateID": {
  21123. "type": "string"
  21124. },
  21125. "data": {
  21126. "type": "object",
  21127. "properties": {
  21128. "sessionID": {
  21129. "type": "string",
  21130. "pattern": "^ses"
  21131. },
  21132. "messageID": {
  21133. "type": "string",
  21134. "pattern": "^msg"
  21135. }
  21136. },
  21137. "required": ["sessionID", "messageID"],
  21138. "additionalProperties": false
  21139. }
  21140. },
  21141. "required": ["type", "id", "seq", "aggregateID", "data"],
  21142. "additionalProperties": false
  21143. }
  21144. },
  21145. "required": ["type", "id", "syncEvent"],
  21146. "additionalProperties": false
  21147. },
  21148. "SyncEventMessagePartUpdated": {
  21149. "type": "object",
  21150. "properties": {
  21151. "type": {
  21152. "type": "string",
  21153. "enum": ["sync"]
  21154. },
  21155. "id": {
  21156. "type": "string"
  21157. },
  21158. "syncEvent": {
  21159. "type": "object",
  21160. "properties": {
  21161. "type": {
  21162. "type": "string",
  21163. "enum": ["message.part.updated.1"]
  21164. },
  21165. "id": {
  21166. "type": "string"
  21167. },
  21168. "seq": {
  21169. "type": "number"
  21170. },
  21171. "aggregateID": {
  21172. "type": "string"
  21173. },
  21174. "data": {
  21175. "type": "object",
  21176. "properties": {
  21177. "sessionID": {
  21178. "type": "string",
  21179. "pattern": "^ses"
  21180. },
  21181. "part": {
  21182. "$ref": "#/components/schemas/Part"
  21183. },
  21184. "time": {
  21185. "type": "number"
  21186. }
  21187. },
  21188. "required": ["sessionID", "part", "time"],
  21189. "additionalProperties": false
  21190. }
  21191. },
  21192. "required": ["type", "id", "seq", "aggregateID", "data"],
  21193. "additionalProperties": false
  21194. }
  21195. },
  21196. "required": ["type", "id", "syncEvent"],
  21197. "additionalProperties": false
  21198. },
  21199. "SyncEventMessagePartRemoved": {
  21200. "type": "object",
  21201. "properties": {
  21202. "type": {
  21203. "type": "string",
  21204. "enum": ["sync"]
  21205. },
  21206. "id": {
  21207. "type": "string"
  21208. },
  21209. "syncEvent": {
  21210. "type": "object",
  21211. "properties": {
  21212. "type": {
  21213. "type": "string",
  21214. "enum": ["message.part.removed.1"]
  21215. },
  21216. "id": {
  21217. "type": "string"
  21218. },
  21219. "seq": {
  21220. "type": "number"
  21221. },
  21222. "aggregateID": {
  21223. "type": "string"
  21224. },
  21225. "data": {
  21226. "type": "object",
  21227. "properties": {
  21228. "sessionID": {
  21229. "type": "string",
  21230. "pattern": "^ses"
  21231. },
  21232. "messageID": {
  21233. "type": "string",
  21234. "pattern": "^msg"
  21235. },
  21236. "partID": {
  21237. "type": "string",
  21238. "pattern": "^prt"
  21239. }
  21240. },
  21241. "required": ["sessionID", "messageID", "partID"],
  21242. "additionalProperties": false
  21243. }
  21244. },
  21245. "required": ["type", "id", "seq", "aggregateID", "data"],
  21246. "additionalProperties": false
  21247. }
  21248. },
  21249. "required": ["type", "id", "syncEvent"],
  21250. "additionalProperties": false
  21251. },
  21252. "SyncEventSessionNextAgentSwitched": {
  21253. "type": "object",
  21254. "properties": {
  21255. "type": {
  21256. "type": "string",
  21257. "enum": ["sync"]
  21258. },
  21259. "id": {
  21260. "type": "string"
  21261. },
  21262. "syncEvent": {
  21263. "type": "object",
  21264. "properties": {
  21265. "type": {
  21266. "type": "string",
  21267. "enum": ["session.next.agent.switched.1"]
  21268. },
  21269. "id": {
  21270. "type": "string"
  21271. },
  21272. "seq": {
  21273. "type": "number"
  21274. },
  21275. "aggregateID": {
  21276. "type": "string"
  21277. },
  21278. "data": {
  21279. "type": "object",
  21280. "properties": {
  21281. "timestamp": {
  21282. "type": "number"
  21283. },
  21284. "sessionID": {
  21285. "type": "string",
  21286. "pattern": "^ses"
  21287. },
  21288. "agent": {
  21289. "type": "string"
  21290. }
  21291. },
  21292. "required": ["timestamp", "sessionID", "agent"],
  21293. "additionalProperties": false
  21294. }
  21295. },
  21296. "required": ["type", "id", "seq", "aggregateID", "data"],
  21297. "additionalProperties": false
  21298. }
  21299. },
  21300. "required": ["type", "id", "syncEvent"],
  21301. "additionalProperties": false
  21302. },
  21303. "SyncEventSessionNextModelSwitched": {
  21304. "type": "object",
  21305. "properties": {
  21306. "type": {
  21307. "type": "string",
  21308. "enum": ["sync"]
  21309. },
  21310. "id": {
  21311. "type": "string"
  21312. },
  21313. "syncEvent": {
  21314. "type": "object",
  21315. "properties": {
  21316. "type": {
  21317. "type": "string",
  21318. "enum": ["session.next.model.switched.1"]
  21319. },
  21320. "id": {
  21321. "type": "string"
  21322. },
  21323. "seq": {
  21324. "type": "number"
  21325. },
  21326. "aggregateID": {
  21327. "type": "string"
  21328. },
  21329. "data": {
  21330. "type": "object",
  21331. "properties": {
  21332. "timestamp": {
  21333. "type": "number"
  21334. },
  21335. "sessionID": {
  21336. "type": "string",
  21337. "pattern": "^ses"
  21338. },
  21339. "model": {
  21340. "type": "object",
  21341. "properties": {
  21342. "id": {
  21343. "type": "string"
  21344. },
  21345. "providerID": {
  21346. "type": "string"
  21347. },
  21348. "variant": {
  21349. "type": "string"
  21350. }
  21351. },
  21352. "required": ["id", "providerID"],
  21353. "additionalProperties": false
  21354. }
  21355. },
  21356. "required": ["timestamp", "sessionID", "model"],
  21357. "additionalProperties": false
  21358. }
  21359. },
  21360. "required": ["type", "id", "seq", "aggregateID", "data"],
  21361. "additionalProperties": false
  21362. }
  21363. },
  21364. "required": ["type", "id", "syncEvent"],
  21365. "additionalProperties": false
  21366. },
  21367. "SyncEventSessionNextMoved": {
  21368. "type": "object",
  21369. "properties": {
  21370. "type": {
  21371. "type": "string",
  21372. "enum": ["sync"]
  21373. },
  21374. "id": {
  21375. "type": "string"
  21376. },
  21377. "syncEvent": {
  21378. "type": "object",
  21379. "properties": {
  21380. "type": {
  21381. "type": "string",
  21382. "enum": ["session.next.moved.1"]
  21383. },
  21384. "id": {
  21385. "type": "string"
  21386. },
  21387. "seq": {
  21388. "type": "number"
  21389. },
  21390. "aggregateID": {
  21391. "type": "string"
  21392. },
  21393. "data": {
  21394. "type": "object",
  21395. "properties": {
  21396. "timestamp": {
  21397. "type": "number"
  21398. },
  21399. "sessionID": {
  21400. "type": "string",
  21401. "pattern": "^ses"
  21402. },
  21403. "location": {
  21404. "$ref": "#/components/schemas/LocationRef"
  21405. },
  21406. "subdirectory": {
  21407. "type": "string"
  21408. }
  21409. },
  21410. "required": ["timestamp", "sessionID", "location"],
  21411. "additionalProperties": false
  21412. }
  21413. },
  21414. "required": ["type", "id", "seq", "aggregateID", "data"],
  21415. "additionalProperties": false
  21416. }
  21417. },
  21418. "required": ["type", "id", "syncEvent"],
  21419. "additionalProperties": false
  21420. },
  21421. "SyncEventSessionNextPrompted": {
  21422. "type": "object",
  21423. "properties": {
  21424. "type": {
  21425. "type": "string",
  21426. "enum": ["sync"]
  21427. },
  21428. "id": {
  21429. "type": "string"
  21430. },
  21431. "syncEvent": {
  21432. "type": "object",
  21433. "properties": {
  21434. "type": {
  21435. "type": "string",
  21436. "enum": ["session.next.prompted.1"]
  21437. },
  21438. "id": {
  21439. "type": "string"
  21440. },
  21441. "seq": {
  21442. "type": "number"
  21443. },
  21444. "aggregateID": {
  21445. "type": "string"
  21446. },
  21447. "data": {
  21448. "type": "object",
  21449. "properties": {
  21450. "timestamp": {
  21451. "type": "number"
  21452. },
  21453. "sessionID": {
  21454. "type": "string",
  21455. "pattern": "^ses"
  21456. },
  21457. "prompt": {
  21458. "$ref": "#/components/schemas/Prompt"
  21459. },
  21460. "delivery": {
  21461. "type": "string",
  21462. "enum": ["steer", "queue"]
  21463. }
  21464. },
  21465. "required": ["timestamp", "sessionID", "prompt", "delivery"],
  21466. "additionalProperties": false
  21467. }
  21468. },
  21469. "required": ["type", "id", "seq", "aggregateID", "data"],
  21470. "additionalProperties": false
  21471. }
  21472. },
  21473. "required": ["type", "id", "syncEvent"],
  21474. "additionalProperties": false
  21475. },
  21476. "SyncEventSessionNextSynthetic": {
  21477. "type": "object",
  21478. "properties": {
  21479. "type": {
  21480. "type": "string",
  21481. "enum": ["sync"]
  21482. },
  21483. "id": {
  21484. "type": "string"
  21485. },
  21486. "syncEvent": {
  21487. "type": "object",
  21488. "properties": {
  21489. "type": {
  21490. "type": "string",
  21491. "enum": ["session.next.synthetic.1"]
  21492. },
  21493. "id": {
  21494. "type": "string"
  21495. },
  21496. "seq": {
  21497. "type": "number"
  21498. },
  21499. "aggregateID": {
  21500. "type": "string"
  21501. },
  21502. "data": {
  21503. "type": "object",
  21504. "properties": {
  21505. "timestamp": {
  21506. "type": "number"
  21507. },
  21508. "sessionID": {
  21509. "type": "string",
  21510. "pattern": "^ses"
  21511. },
  21512. "text": {
  21513. "type": "string"
  21514. }
  21515. },
  21516. "required": ["timestamp", "sessionID", "text"],
  21517. "additionalProperties": false
  21518. }
  21519. },
  21520. "required": ["type", "id", "seq", "aggregateID", "data"],
  21521. "additionalProperties": false
  21522. }
  21523. },
  21524. "required": ["type", "id", "syncEvent"],
  21525. "additionalProperties": false
  21526. },
  21527. "SyncEventSessionNextShellStarted": {
  21528. "type": "object",
  21529. "properties": {
  21530. "type": {
  21531. "type": "string",
  21532. "enum": ["sync"]
  21533. },
  21534. "id": {
  21535. "type": "string"
  21536. },
  21537. "syncEvent": {
  21538. "type": "object",
  21539. "properties": {
  21540. "type": {
  21541. "type": "string",
  21542. "enum": ["session.next.shell.started.1"]
  21543. },
  21544. "id": {
  21545. "type": "string"
  21546. },
  21547. "seq": {
  21548. "type": "number"
  21549. },
  21550. "aggregateID": {
  21551. "type": "string"
  21552. },
  21553. "data": {
  21554. "type": "object",
  21555. "properties": {
  21556. "timestamp": {
  21557. "type": "number"
  21558. },
  21559. "sessionID": {
  21560. "type": "string",
  21561. "pattern": "^ses"
  21562. },
  21563. "callID": {
  21564. "type": "string"
  21565. },
  21566. "command": {
  21567. "type": "string"
  21568. }
  21569. },
  21570. "required": ["timestamp", "sessionID", "callID", "command"],
  21571. "additionalProperties": false
  21572. }
  21573. },
  21574. "required": ["type", "id", "seq", "aggregateID", "data"],
  21575. "additionalProperties": false
  21576. }
  21577. },
  21578. "required": ["type", "id", "syncEvent"],
  21579. "additionalProperties": false
  21580. },
  21581. "SyncEventSessionNextShellEnded": {
  21582. "type": "object",
  21583. "properties": {
  21584. "type": {
  21585. "type": "string",
  21586. "enum": ["sync"]
  21587. },
  21588. "id": {
  21589. "type": "string"
  21590. },
  21591. "syncEvent": {
  21592. "type": "object",
  21593. "properties": {
  21594. "type": {
  21595. "type": "string",
  21596. "enum": ["session.next.shell.ended.1"]
  21597. },
  21598. "id": {
  21599. "type": "string"
  21600. },
  21601. "seq": {
  21602. "type": "number"
  21603. },
  21604. "aggregateID": {
  21605. "type": "string"
  21606. },
  21607. "data": {
  21608. "type": "object",
  21609. "properties": {
  21610. "timestamp": {
  21611. "type": "number"
  21612. },
  21613. "sessionID": {
  21614. "type": "string",
  21615. "pattern": "^ses"
  21616. },
  21617. "callID": {
  21618. "type": "string"
  21619. },
  21620. "output": {
  21621. "type": "string"
  21622. }
  21623. },
  21624. "required": ["timestamp", "sessionID", "callID", "output"],
  21625. "additionalProperties": false
  21626. }
  21627. },
  21628. "required": ["type", "id", "seq", "aggregateID", "data"],
  21629. "additionalProperties": false
  21630. }
  21631. },
  21632. "required": ["type", "id", "syncEvent"],
  21633. "additionalProperties": false
  21634. },
  21635. "SyncEventSessionNextStepStarted": {
  21636. "type": "object",
  21637. "properties": {
  21638. "type": {
  21639. "type": "string",
  21640. "enum": ["sync"]
  21641. },
  21642. "id": {
  21643. "type": "string"
  21644. },
  21645. "syncEvent": {
  21646. "type": "object",
  21647. "properties": {
  21648. "type": {
  21649. "type": "string",
  21650. "enum": ["session.next.step.started.1"]
  21651. },
  21652. "id": {
  21653. "type": "string"
  21654. },
  21655. "seq": {
  21656. "type": "number"
  21657. },
  21658. "aggregateID": {
  21659. "type": "string"
  21660. },
  21661. "data": {
  21662. "type": "object",
  21663. "properties": {
  21664. "timestamp": {
  21665. "type": "number"
  21666. },
  21667. "sessionID": {
  21668. "type": "string",
  21669. "pattern": "^ses"
  21670. },
  21671. "agent": {
  21672. "type": "string"
  21673. },
  21674. "model": {
  21675. "type": "object",
  21676. "properties": {
  21677. "id": {
  21678. "type": "string"
  21679. },
  21680. "providerID": {
  21681. "type": "string"
  21682. },
  21683. "variant": {
  21684. "type": "string"
  21685. }
  21686. },
  21687. "required": ["id", "providerID"],
  21688. "additionalProperties": false
  21689. },
  21690. "snapshot": {
  21691. "type": "string"
  21692. }
  21693. },
  21694. "required": ["timestamp", "sessionID", "agent", "model"],
  21695. "additionalProperties": false
  21696. }
  21697. },
  21698. "required": ["type", "id", "seq", "aggregateID", "data"],
  21699. "additionalProperties": false
  21700. }
  21701. },
  21702. "required": ["type", "id", "syncEvent"],
  21703. "additionalProperties": false
  21704. },
  21705. "SyncEventSessionNextStepEnded": {
  21706. "type": "object",
  21707. "properties": {
  21708. "type": {
  21709. "type": "string",
  21710. "enum": ["sync"]
  21711. },
  21712. "id": {
  21713. "type": "string"
  21714. },
  21715. "syncEvent": {
  21716. "type": "object",
  21717. "properties": {
  21718. "type": {
  21719. "type": "string",
  21720. "enum": ["session.next.step.ended.2"]
  21721. },
  21722. "id": {
  21723. "type": "string"
  21724. },
  21725. "seq": {
  21726. "type": "number"
  21727. },
  21728. "aggregateID": {
  21729. "type": "string"
  21730. },
  21731. "data": {
  21732. "type": "object",
  21733. "properties": {
  21734. "timestamp": {
  21735. "type": "number"
  21736. },
  21737. "sessionID": {
  21738. "type": "string",
  21739. "pattern": "^ses"
  21740. },
  21741. "assistantMessageID": {
  21742. "type": "string"
  21743. },
  21744. "finish": {
  21745. "type": "string"
  21746. },
  21747. "cost": {
  21748. "type": "number"
  21749. },
  21750. "tokens": {
  21751. "type": "object",
  21752. "properties": {
  21753. "input": {
  21754. "type": "number"
  21755. },
  21756. "output": {
  21757. "type": "number"
  21758. },
  21759. "reasoning": {
  21760. "type": "number"
  21761. },
  21762. "cache": {
  21763. "type": "object",
  21764. "properties": {
  21765. "read": {
  21766. "type": "number"
  21767. },
  21768. "write": {
  21769. "type": "number"
  21770. }
  21771. },
  21772. "required": ["read", "write"],
  21773. "additionalProperties": false
  21774. }
  21775. },
  21776. "required": ["input", "output", "reasoning", "cache"],
  21777. "additionalProperties": false
  21778. },
  21779. "snapshot": {
  21780. "type": "string"
  21781. }
  21782. },
  21783. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  21784. "additionalProperties": false
  21785. }
  21786. },
  21787. "required": ["type", "id", "seq", "aggregateID", "data"],
  21788. "additionalProperties": false
  21789. }
  21790. },
  21791. "required": ["type", "id", "syncEvent"],
  21792. "additionalProperties": false
  21793. },
  21794. "SyncEventSessionNextStepFailed": {
  21795. "type": "object",
  21796. "properties": {
  21797. "type": {
  21798. "type": "string",
  21799. "enum": ["sync"]
  21800. },
  21801. "id": {
  21802. "type": "string"
  21803. },
  21804. "syncEvent": {
  21805. "type": "object",
  21806. "properties": {
  21807. "type": {
  21808. "type": "string",
  21809. "enum": ["session.next.step.failed.2"]
  21810. },
  21811. "id": {
  21812. "type": "string"
  21813. },
  21814. "seq": {
  21815. "type": "number"
  21816. },
  21817. "aggregateID": {
  21818. "type": "string"
  21819. },
  21820. "data": {
  21821. "type": "object",
  21822. "properties": {
  21823. "timestamp": {
  21824. "type": "number"
  21825. },
  21826. "sessionID": {
  21827. "type": "string",
  21828. "pattern": "^ses"
  21829. },
  21830. "assistantMessageID": {
  21831. "type": "string"
  21832. },
  21833. "error": {
  21834. "$ref": "#/components/schemas/SessionErrorUnknown"
  21835. }
  21836. },
  21837. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  21838. "additionalProperties": false
  21839. }
  21840. },
  21841. "required": ["type", "id", "seq", "aggregateID", "data"],
  21842. "additionalProperties": false
  21843. }
  21844. },
  21845. "required": ["type", "id", "syncEvent"],
  21846. "additionalProperties": false
  21847. },
  21848. "SyncEventSessionNextTextStarted": {
  21849. "type": "object",
  21850. "properties": {
  21851. "type": {
  21852. "type": "string",
  21853. "enum": ["sync"]
  21854. },
  21855. "id": {
  21856. "type": "string"
  21857. },
  21858. "syncEvent": {
  21859. "type": "object",
  21860. "properties": {
  21861. "type": {
  21862. "type": "string",
  21863. "enum": ["session.next.text.started.1"]
  21864. },
  21865. "id": {
  21866. "type": "string"
  21867. },
  21868. "seq": {
  21869. "type": "number"
  21870. },
  21871. "aggregateID": {
  21872. "type": "string"
  21873. },
  21874. "data": {
  21875. "type": "object",
  21876. "properties": {
  21877. "timestamp": {
  21878. "type": "number"
  21879. },
  21880. "sessionID": {
  21881. "type": "string",
  21882. "pattern": "^ses"
  21883. },
  21884. "textID": {
  21885. "type": "string"
  21886. }
  21887. },
  21888. "required": ["timestamp", "sessionID", "textID"],
  21889. "additionalProperties": false
  21890. }
  21891. },
  21892. "required": ["type", "id", "seq", "aggregateID", "data"],
  21893. "additionalProperties": false
  21894. }
  21895. },
  21896. "required": ["type", "id", "syncEvent"],
  21897. "additionalProperties": false
  21898. },
  21899. "SyncEventSessionNextTextEnded": {
  21900. "type": "object",
  21901. "properties": {
  21902. "type": {
  21903. "type": "string",
  21904. "enum": ["sync"]
  21905. },
  21906. "id": {
  21907. "type": "string"
  21908. },
  21909. "syncEvent": {
  21910. "type": "object",
  21911. "properties": {
  21912. "type": {
  21913. "type": "string",
  21914. "enum": ["session.next.text.ended.1"]
  21915. },
  21916. "id": {
  21917. "type": "string"
  21918. },
  21919. "seq": {
  21920. "type": "number"
  21921. },
  21922. "aggregateID": {
  21923. "type": "string"
  21924. },
  21925. "data": {
  21926. "type": "object",
  21927. "properties": {
  21928. "timestamp": {
  21929. "type": "number"
  21930. },
  21931. "sessionID": {
  21932. "type": "string",
  21933. "pattern": "^ses"
  21934. },
  21935. "textID": {
  21936. "type": "string"
  21937. },
  21938. "text": {
  21939. "type": "string"
  21940. }
  21941. },
  21942. "required": ["timestamp", "sessionID", "textID", "text"],
  21943. "additionalProperties": false
  21944. }
  21945. },
  21946. "required": ["type", "id", "seq", "aggregateID", "data"],
  21947. "additionalProperties": false
  21948. }
  21949. },
  21950. "required": ["type", "id", "syncEvent"],
  21951. "additionalProperties": false
  21952. },
  21953. "SyncEventSessionNextReasoningStarted": {
  21954. "type": "object",
  21955. "properties": {
  21956. "type": {
  21957. "type": "string",
  21958. "enum": ["sync"]
  21959. },
  21960. "id": {
  21961. "type": "string"
  21962. },
  21963. "syncEvent": {
  21964. "type": "object",
  21965. "properties": {
  21966. "type": {
  21967. "type": "string",
  21968. "enum": ["session.next.reasoning.started.1"]
  21969. },
  21970. "id": {
  21971. "type": "string"
  21972. },
  21973. "seq": {
  21974. "type": "number"
  21975. },
  21976. "aggregateID": {
  21977. "type": "string"
  21978. },
  21979. "data": {
  21980. "type": "object",
  21981. "properties": {
  21982. "timestamp": {
  21983. "type": "number"
  21984. },
  21985. "sessionID": {
  21986. "type": "string",
  21987. "pattern": "^ses"
  21988. },
  21989. "reasoningID": {
  21990. "type": "string"
  21991. },
  21992. "providerMetadata": {
  21993. "type": "object",
  21994. "additionalProperties": {
  21995. "type": "object"
  21996. }
  21997. }
  21998. },
  21999. "required": ["timestamp", "sessionID", "reasoningID"],
  22000. "additionalProperties": false
  22001. }
  22002. },
  22003. "required": ["type", "id", "seq", "aggregateID", "data"],
  22004. "additionalProperties": false
  22005. }
  22006. },
  22007. "required": ["type", "id", "syncEvent"],
  22008. "additionalProperties": false
  22009. },
  22010. "SyncEventSessionNextReasoningEnded": {
  22011. "type": "object",
  22012. "properties": {
  22013. "type": {
  22014. "type": "string",
  22015. "enum": ["sync"]
  22016. },
  22017. "id": {
  22018. "type": "string"
  22019. },
  22020. "syncEvent": {
  22021. "type": "object",
  22022. "properties": {
  22023. "type": {
  22024. "type": "string",
  22025. "enum": ["session.next.reasoning.ended.1"]
  22026. },
  22027. "id": {
  22028. "type": "string"
  22029. },
  22030. "seq": {
  22031. "type": "number"
  22032. },
  22033. "aggregateID": {
  22034. "type": "string"
  22035. },
  22036. "data": {
  22037. "type": "object",
  22038. "properties": {
  22039. "timestamp": {
  22040. "type": "number"
  22041. },
  22042. "sessionID": {
  22043. "type": "string",
  22044. "pattern": "^ses"
  22045. },
  22046. "reasoningID": {
  22047. "type": "string"
  22048. },
  22049. "text": {
  22050. "type": "string"
  22051. },
  22052. "providerMetadata": {
  22053. "type": "object",
  22054. "additionalProperties": {
  22055. "type": "object"
  22056. }
  22057. }
  22058. },
  22059. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  22060. "additionalProperties": false
  22061. }
  22062. },
  22063. "required": ["type", "id", "seq", "aggregateID", "data"],
  22064. "additionalProperties": false
  22065. }
  22066. },
  22067. "required": ["type", "id", "syncEvent"],
  22068. "additionalProperties": false
  22069. },
  22070. "SyncEventSessionNextToolInputStarted": {
  22071. "type": "object",
  22072. "properties": {
  22073. "type": {
  22074. "type": "string",
  22075. "enum": ["sync"]
  22076. },
  22077. "id": {
  22078. "type": "string"
  22079. },
  22080. "syncEvent": {
  22081. "type": "object",
  22082. "properties": {
  22083. "type": {
  22084. "type": "string",
  22085. "enum": ["session.next.tool.input.started.1"]
  22086. },
  22087. "id": {
  22088. "type": "string"
  22089. },
  22090. "seq": {
  22091. "type": "number"
  22092. },
  22093. "aggregateID": {
  22094. "type": "string"
  22095. },
  22096. "data": {
  22097. "type": "object",
  22098. "properties": {
  22099. "timestamp": {
  22100. "type": "number"
  22101. },
  22102. "sessionID": {
  22103. "type": "string",
  22104. "pattern": "^ses"
  22105. },
  22106. "assistantMessageID": {
  22107. "type": "string"
  22108. },
  22109. "callID": {
  22110. "type": "string"
  22111. },
  22112. "name": {
  22113. "type": "string"
  22114. }
  22115. },
  22116. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  22117. "additionalProperties": false
  22118. }
  22119. },
  22120. "required": ["type", "id", "seq", "aggregateID", "data"],
  22121. "additionalProperties": false
  22122. }
  22123. },
  22124. "required": ["type", "id", "syncEvent"],
  22125. "additionalProperties": false
  22126. },
  22127. "SyncEventSessionNextToolInputEnded": {
  22128. "type": "object",
  22129. "properties": {
  22130. "type": {
  22131. "type": "string",
  22132. "enum": ["sync"]
  22133. },
  22134. "id": {
  22135. "type": "string"
  22136. },
  22137. "syncEvent": {
  22138. "type": "object",
  22139. "properties": {
  22140. "type": {
  22141. "type": "string",
  22142. "enum": ["session.next.tool.input.ended.1"]
  22143. },
  22144. "id": {
  22145. "type": "string"
  22146. },
  22147. "seq": {
  22148. "type": "number"
  22149. },
  22150. "aggregateID": {
  22151. "type": "string"
  22152. },
  22153. "data": {
  22154. "type": "object",
  22155. "properties": {
  22156. "timestamp": {
  22157. "type": "number"
  22158. },
  22159. "sessionID": {
  22160. "type": "string",
  22161. "pattern": "^ses"
  22162. },
  22163. "assistantMessageID": {
  22164. "type": "string"
  22165. },
  22166. "callID": {
  22167. "type": "string"
  22168. },
  22169. "text": {
  22170. "type": "string"
  22171. }
  22172. },
  22173. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  22174. "additionalProperties": false
  22175. }
  22176. },
  22177. "required": ["type", "id", "seq", "aggregateID", "data"],
  22178. "additionalProperties": false
  22179. }
  22180. },
  22181. "required": ["type", "id", "syncEvent"],
  22182. "additionalProperties": false
  22183. },
  22184. "SyncEventSessionNextToolCalled": {
  22185. "type": "object",
  22186. "properties": {
  22187. "type": {
  22188. "type": "string",
  22189. "enum": ["sync"]
  22190. },
  22191. "id": {
  22192. "type": "string"
  22193. },
  22194. "syncEvent": {
  22195. "type": "object",
  22196. "properties": {
  22197. "type": {
  22198. "type": "string",
  22199. "enum": ["session.next.tool.called.1"]
  22200. },
  22201. "id": {
  22202. "type": "string"
  22203. },
  22204. "seq": {
  22205. "type": "number"
  22206. },
  22207. "aggregateID": {
  22208. "type": "string"
  22209. },
  22210. "data": {
  22211. "type": "object",
  22212. "properties": {
  22213. "timestamp": {
  22214. "type": "number"
  22215. },
  22216. "sessionID": {
  22217. "type": "string",
  22218. "pattern": "^ses"
  22219. },
  22220. "assistantMessageID": {
  22221. "type": "string"
  22222. },
  22223. "callID": {
  22224. "type": "string"
  22225. },
  22226. "tool": {
  22227. "type": "string"
  22228. },
  22229. "input": {
  22230. "type": "object"
  22231. },
  22232. "provider": {
  22233. "type": "object",
  22234. "properties": {
  22235. "executed": {
  22236. "type": "boolean"
  22237. },
  22238. "metadata": {
  22239. "type": "object",
  22240. "additionalProperties": {
  22241. "type": "object"
  22242. }
  22243. }
  22244. },
  22245. "required": ["executed"],
  22246. "additionalProperties": false
  22247. }
  22248. },
  22249. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  22250. "additionalProperties": false
  22251. }
  22252. },
  22253. "required": ["type", "id", "seq", "aggregateID", "data"],
  22254. "additionalProperties": false
  22255. }
  22256. },
  22257. "required": ["type", "id", "syncEvent"],
  22258. "additionalProperties": false
  22259. },
  22260. "SyncEventSessionNextToolProgress": {
  22261. "type": "object",
  22262. "properties": {
  22263. "type": {
  22264. "type": "string",
  22265. "enum": ["sync"]
  22266. },
  22267. "id": {
  22268. "type": "string"
  22269. },
  22270. "syncEvent": {
  22271. "type": "object",
  22272. "properties": {
  22273. "type": {
  22274. "type": "string",
  22275. "enum": ["session.next.tool.progress.1"]
  22276. },
  22277. "id": {
  22278. "type": "string"
  22279. },
  22280. "seq": {
  22281. "type": "number"
  22282. },
  22283. "aggregateID": {
  22284. "type": "string"
  22285. },
  22286. "data": {
  22287. "type": "object",
  22288. "properties": {
  22289. "timestamp": {
  22290. "type": "number"
  22291. },
  22292. "sessionID": {
  22293. "type": "string",
  22294. "pattern": "^ses"
  22295. },
  22296. "assistantMessageID": {
  22297. "type": "string"
  22298. },
  22299. "callID": {
  22300. "type": "string"
  22301. },
  22302. "structured": {
  22303. "type": "object"
  22304. },
  22305. "content": {
  22306. "type": "array",
  22307. "items": {
  22308. "anyOf": [
  22309. {
  22310. "$ref": "#/components/schemas/ToolTextContent"
  22311. },
  22312. {
  22313. "$ref": "#/components/schemas/ToolFileContent"
  22314. }
  22315. ]
  22316. }
  22317. }
  22318. },
  22319. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  22320. "additionalProperties": false
  22321. }
  22322. },
  22323. "required": ["type", "id", "seq", "aggregateID", "data"],
  22324. "additionalProperties": false
  22325. }
  22326. },
  22327. "required": ["type", "id", "syncEvent"],
  22328. "additionalProperties": false
  22329. },
  22330. "SyncEventSessionNextToolSuccess": {
  22331. "type": "object",
  22332. "properties": {
  22333. "type": {
  22334. "type": "string",
  22335. "enum": ["sync"]
  22336. },
  22337. "id": {
  22338. "type": "string"
  22339. },
  22340. "syncEvent": {
  22341. "type": "object",
  22342. "properties": {
  22343. "type": {
  22344. "type": "string",
  22345. "enum": ["session.next.tool.success.1"]
  22346. },
  22347. "id": {
  22348. "type": "string"
  22349. },
  22350. "seq": {
  22351. "type": "number"
  22352. },
  22353. "aggregateID": {
  22354. "type": "string"
  22355. },
  22356. "data": {
  22357. "type": "object",
  22358. "properties": {
  22359. "timestamp": {
  22360. "type": "number"
  22361. },
  22362. "sessionID": {
  22363. "type": "string",
  22364. "pattern": "^ses"
  22365. },
  22366. "assistantMessageID": {
  22367. "type": "string"
  22368. },
  22369. "callID": {
  22370. "type": "string"
  22371. },
  22372. "structured": {
  22373. "type": "object"
  22374. },
  22375. "content": {
  22376. "type": "array",
  22377. "items": {
  22378. "anyOf": [
  22379. {
  22380. "$ref": "#/components/schemas/ToolTextContent"
  22381. },
  22382. {
  22383. "$ref": "#/components/schemas/ToolFileContent"
  22384. }
  22385. ]
  22386. }
  22387. },
  22388. "result": {},
  22389. "provider": {
  22390. "type": "object",
  22391. "properties": {
  22392. "executed": {
  22393. "type": "boolean"
  22394. },
  22395. "metadata": {
  22396. "type": "object",
  22397. "additionalProperties": {
  22398. "type": "object"
  22399. }
  22400. }
  22401. },
  22402. "required": ["executed"],
  22403. "additionalProperties": false
  22404. }
  22405. },
  22406. "required": [
  22407. "timestamp",
  22408. "sessionID",
  22409. "assistantMessageID",
  22410. "callID",
  22411. "structured",
  22412. "content",
  22413. "provider"
  22414. ],
  22415. "additionalProperties": false
  22416. }
  22417. },
  22418. "required": ["type", "id", "seq", "aggregateID", "data"],
  22419. "additionalProperties": false
  22420. }
  22421. },
  22422. "required": ["type", "id", "syncEvent"],
  22423. "additionalProperties": false
  22424. },
  22425. "SyncEventSessionNextToolFailed": {
  22426. "type": "object",
  22427. "properties": {
  22428. "type": {
  22429. "type": "string",
  22430. "enum": ["sync"]
  22431. },
  22432. "id": {
  22433. "type": "string"
  22434. },
  22435. "syncEvent": {
  22436. "type": "object",
  22437. "properties": {
  22438. "type": {
  22439. "type": "string",
  22440. "enum": ["session.next.tool.failed.1"]
  22441. },
  22442. "id": {
  22443. "type": "string"
  22444. },
  22445. "seq": {
  22446. "type": "number"
  22447. },
  22448. "aggregateID": {
  22449. "type": "string"
  22450. },
  22451. "data": {
  22452. "type": "object",
  22453. "properties": {
  22454. "timestamp": {
  22455. "type": "number"
  22456. },
  22457. "sessionID": {
  22458. "type": "string",
  22459. "pattern": "^ses"
  22460. },
  22461. "assistantMessageID": {
  22462. "type": "string"
  22463. },
  22464. "callID": {
  22465. "type": "string"
  22466. },
  22467. "error": {
  22468. "$ref": "#/components/schemas/SessionErrorUnknown"
  22469. },
  22470. "result": {},
  22471. "provider": {
  22472. "type": "object",
  22473. "properties": {
  22474. "executed": {
  22475. "type": "boolean"
  22476. },
  22477. "metadata": {
  22478. "type": "object",
  22479. "additionalProperties": {
  22480. "type": "object"
  22481. }
  22482. }
  22483. },
  22484. "required": ["executed"],
  22485. "additionalProperties": false
  22486. }
  22487. },
  22488. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  22489. "additionalProperties": false
  22490. }
  22491. },
  22492. "required": ["type", "id", "seq", "aggregateID", "data"],
  22493. "additionalProperties": false
  22494. }
  22495. },
  22496. "required": ["type", "id", "syncEvent"],
  22497. "additionalProperties": false
  22498. },
  22499. "SyncEventSessionNextRetried": {
  22500. "type": "object",
  22501. "properties": {
  22502. "type": {
  22503. "type": "string",
  22504. "enum": ["sync"]
  22505. },
  22506. "id": {
  22507. "type": "string"
  22508. },
  22509. "syncEvent": {
  22510. "type": "object",
  22511. "properties": {
  22512. "type": {
  22513. "type": "string",
  22514. "enum": ["session.next.retried.1"]
  22515. },
  22516. "id": {
  22517. "type": "string"
  22518. },
  22519. "seq": {
  22520. "type": "number"
  22521. },
  22522. "aggregateID": {
  22523. "type": "string"
  22524. },
  22525. "data": {
  22526. "type": "object",
  22527. "properties": {
  22528. "timestamp": {
  22529. "type": "number"
  22530. },
  22531. "sessionID": {
  22532. "type": "string",
  22533. "pattern": "^ses"
  22534. },
  22535. "attempt": {
  22536. "type": "number"
  22537. },
  22538. "error": {
  22539. "$ref": "#/components/schemas/SessionNextRetry_error"
  22540. }
  22541. },
  22542. "required": ["timestamp", "sessionID", "attempt", "error"],
  22543. "additionalProperties": false
  22544. }
  22545. },
  22546. "required": ["type", "id", "seq", "aggregateID", "data"],
  22547. "additionalProperties": false
  22548. }
  22549. },
  22550. "required": ["type", "id", "syncEvent"],
  22551. "additionalProperties": false
  22552. },
  22553. "SyncEventSessionNextCompactionStarted": {
  22554. "type": "object",
  22555. "properties": {
  22556. "type": {
  22557. "type": "string",
  22558. "enum": ["sync"]
  22559. },
  22560. "id": {
  22561. "type": "string"
  22562. },
  22563. "syncEvent": {
  22564. "type": "object",
  22565. "properties": {
  22566. "type": {
  22567. "type": "string",
  22568. "enum": ["session.next.compaction.started.1"]
  22569. },
  22570. "id": {
  22571. "type": "string"
  22572. },
  22573. "seq": {
  22574. "type": "number"
  22575. },
  22576. "aggregateID": {
  22577. "type": "string"
  22578. },
  22579. "data": {
  22580. "type": "object",
  22581. "properties": {
  22582. "timestamp": {
  22583. "type": "number"
  22584. },
  22585. "sessionID": {
  22586. "type": "string",
  22587. "pattern": "^ses"
  22588. },
  22589. "reason": {
  22590. "type": "string",
  22591. "enum": ["auto", "manual"]
  22592. }
  22593. },
  22594. "required": ["timestamp", "sessionID", "reason"],
  22595. "additionalProperties": false
  22596. }
  22597. },
  22598. "required": ["type", "id", "seq", "aggregateID", "data"],
  22599. "additionalProperties": false
  22600. }
  22601. },
  22602. "required": ["type", "id", "syncEvent"],
  22603. "additionalProperties": false
  22604. },
  22605. "SyncEventSessionNextCompactionDelta": {
  22606. "type": "object",
  22607. "properties": {
  22608. "type": {
  22609. "type": "string",
  22610. "enum": ["sync"]
  22611. },
  22612. "id": {
  22613. "type": "string"
  22614. },
  22615. "syncEvent": {
  22616. "type": "object",
  22617. "properties": {
  22618. "type": {
  22619. "type": "string",
  22620. "enum": ["session.next.compaction.delta.1"]
  22621. },
  22622. "id": {
  22623. "type": "string"
  22624. },
  22625. "seq": {
  22626. "type": "number"
  22627. },
  22628. "aggregateID": {
  22629. "type": "string"
  22630. },
  22631. "data": {
  22632. "type": "object",
  22633. "properties": {
  22634. "timestamp": {
  22635. "type": "number"
  22636. },
  22637. "sessionID": {
  22638. "type": "string",
  22639. "pattern": "^ses"
  22640. },
  22641. "text": {
  22642. "type": "string"
  22643. }
  22644. },
  22645. "required": ["timestamp", "sessionID", "text"],
  22646. "additionalProperties": false
  22647. }
  22648. },
  22649. "required": ["type", "id", "seq", "aggregateID", "data"],
  22650. "additionalProperties": false
  22651. }
  22652. },
  22653. "required": ["type", "id", "syncEvent"],
  22654. "additionalProperties": false
  22655. },
  22656. "SyncEventSessionNextCompactionEnded": {
  22657. "type": "object",
  22658. "properties": {
  22659. "type": {
  22660. "type": "string",
  22661. "enum": ["sync"]
  22662. },
  22663. "id": {
  22664. "type": "string"
  22665. },
  22666. "syncEvent": {
  22667. "type": "object",
  22668. "properties": {
  22669. "type": {
  22670. "type": "string",
  22671. "enum": ["session.next.compaction.ended.1"]
  22672. },
  22673. "id": {
  22674. "type": "string"
  22675. },
  22676. "seq": {
  22677. "type": "number"
  22678. },
  22679. "aggregateID": {
  22680. "type": "string"
  22681. },
  22682. "data": {
  22683. "type": "object",
  22684. "properties": {
  22685. "timestamp": {
  22686. "type": "number"
  22687. },
  22688. "sessionID": {
  22689. "type": "string",
  22690. "pattern": "^ses"
  22691. },
  22692. "text": {
  22693. "type": "string"
  22694. },
  22695. "include": {
  22696. "type": "string"
  22697. }
  22698. },
  22699. "required": ["timestamp", "sessionID", "text"],
  22700. "additionalProperties": false
  22701. }
  22702. },
  22703. "required": ["type", "id", "seq", "aggregateID", "data"],
  22704. "additionalProperties": false
  22705. }
  22706. },
  22707. "required": ["type", "id", "syncEvent"],
  22708. "additionalProperties": false
  22709. },
  22710. "PolicyEffect": {
  22711. "type": "string",
  22712. "enum": ["allow", "deny"]
  22713. },
  22714. "ConfigV2ExperimentalPolicy": {
  22715. "type": "object",
  22716. "properties": {
  22717. "action": {
  22718. "type": "string",
  22719. "enum": ["provider.use"]
  22720. },
  22721. "effect": {
  22722. "$ref": "#/components/schemas/PolicyEffect"
  22723. },
  22724. "resource": {
  22725. "type": "string"
  22726. }
  22727. },
  22728. "required": ["action", "effect", "resource"],
  22729. "additionalProperties": false
  22730. },
  22731. "ProjectDirectories": {
  22732. "type": "array",
  22733. "items": {
  22734. "type": "string"
  22735. }
  22736. },
  22737. "ProjectCopyCopy": {
  22738. "type": "object",
  22739. "properties": {
  22740. "directory": {
  22741. "type": "string"
  22742. }
  22743. },
  22744. "required": ["directory"],
  22745. "additionalProperties": false
  22746. },
  22747. "LocationInfo": {
  22748. "type": "object",
  22749. "properties": {
  22750. "directory": {
  22751. "type": "string"
  22752. },
  22753. "workspaceID": {
  22754. "type": "string",
  22755. "pattern": "^wrk"
  22756. },
  22757. "project": {
  22758. "type": "object",
  22759. "properties": {
  22760. "id": {
  22761. "type": "string"
  22762. },
  22763. "directory": {
  22764. "type": "string"
  22765. }
  22766. },
  22767. "required": ["id", "directory"],
  22768. "additionalProperties": false
  22769. }
  22770. },
  22771. "required": ["directory", "project"],
  22772. "additionalProperties": false
  22773. },
  22774. "PermissionV2Effect": {
  22775. "type": "string",
  22776. "enum": ["allow", "deny", "ask"]
  22777. },
  22778. "PermissionV2Rule": {
  22779. "type": "object",
  22780. "properties": {
  22781. "action": {
  22782. "type": "string"
  22783. },
  22784. "resource": {
  22785. "type": "string"
  22786. },
  22787. "effect": {
  22788. "$ref": "#/components/schemas/PermissionV2Effect"
  22789. }
  22790. },
  22791. "required": ["action", "resource", "effect"],
  22792. "additionalProperties": false
  22793. },
  22794. "PermissionV2Ruleset": {
  22795. "type": "array",
  22796. "items": {
  22797. "$ref": "#/components/schemas/PermissionV2Rule"
  22798. }
  22799. },
  22800. "AgentV2Info": {
  22801. "type": "object",
  22802. "properties": {
  22803. "id": {
  22804. "type": "string"
  22805. },
  22806. "model": {
  22807. "type": "object",
  22808. "properties": {
  22809. "id": {
  22810. "type": "string"
  22811. },
  22812. "providerID": {
  22813. "type": "string"
  22814. },
  22815. "variant": {
  22816. "type": "string"
  22817. }
  22818. },
  22819. "required": ["id", "providerID"],
  22820. "additionalProperties": false
  22821. },
  22822. "request": {
  22823. "type": "object",
  22824. "properties": {
  22825. "headers": {
  22826. "type": "object",
  22827. "additionalProperties": {
  22828. "type": "string"
  22829. }
  22830. },
  22831. "body": {
  22832. "type": "object"
  22833. }
  22834. },
  22835. "required": ["headers", "body"],
  22836. "additionalProperties": false
  22837. },
  22838. "system": {
  22839. "type": "string"
  22840. },
  22841. "description": {
  22842. "type": "string"
  22843. },
  22844. "mode": {
  22845. "type": "string",
  22846. "enum": ["subagent", "primary", "all"]
  22847. },
  22848. "hidden": {
  22849. "type": "boolean"
  22850. },
  22851. "color": {
  22852. "anyOf": [
  22853. {
  22854. "type": "string",
  22855. "pattern": "^#[0-9a-fA-F]{6}$"
  22856. },
  22857. {
  22858. "type": "string",
  22859. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  22860. }
  22861. ]
  22862. },
  22863. "steps": {
  22864. "type": "integer",
  22865. "exclusiveMinimum": 0
  22866. },
  22867. "permissions": {
  22868. "$ref": "#/components/schemas/PermissionV2Ruleset"
  22869. }
  22870. },
  22871. "required": ["id", "request", "mode", "hidden", "permissions"],
  22872. "additionalProperties": false
  22873. },
  22874. "SessionV2Info": {
  22875. "type": "object",
  22876. "properties": {
  22877. "id": {
  22878. "type": "string",
  22879. "pattern": "^ses"
  22880. },
  22881. "parentID": {
  22882. "type": "string",
  22883. "pattern": "^ses"
  22884. },
  22885. "projectID": {
  22886. "type": "string"
  22887. },
  22888. "agent": {
  22889. "type": "string"
  22890. },
  22891. "model": {
  22892. "type": "object",
  22893. "properties": {
  22894. "id": {
  22895. "type": "string"
  22896. },
  22897. "providerID": {
  22898. "type": "string"
  22899. },
  22900. "variant": {
  22901. "type": "string"
  22902. }
  22903. },
  22904. "required": ["id", "providerID"],
  22905. "additionalProperties": false
  22906. },
  22907. "cost": {
  22908. "type": "number"
  22909. },
  22910. "tokens": {
  22911. "type": "object",
  22912. "properties": {
  22913. "input": {
  22914. "type": "number"
  22915. },
  22916. "output": {
  22917. "type": "number"
  22918. },
  22919. "reasoning": {
  22920. "type": "number"
  22921. },
  22922. "cache": {
  22923. "type": "object",
  22924. "properties": {
  22925. "read": {
  22926. "type": "number"
  22927. },
  22928. "write": {
  22929. "type": "number"
  22930. }
  22931. },
  22932. "required": ["read", "write"],
  22933. "additionalProperties": false
  22934. }
  22935. },
  22936. "required": ["input", "output", "reasoning", "cache"],
  22937. "additionalProperties": false
  22938. },
  22939. "time": {
  22940. "type": "object",
  22941. "properties": {
  22942. "created": {
  22943. "type": "number"
  22944. },
  22945. "updated": {
  22946. "type": "number"
  22947. },
  22948. "archived": {
  22949. "type": "number"
  22950. }
  22951. },
  22952. "required": ["created", "updated"],
  22953. "additionalProperties": false
  22954. },
  22955. "title": {
  22956. "type": "string"
  22957. },
  22958. "location": {
  22959. "$ref": "#/components/schemas/LocationRef"
  22960. },
  22961. "subpath": {
  22962. "type": "string"
  22963. }
  22964. },
  22965. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  22966. "additionalProperties": false
  22967. },
  22968. "SessionMessageUser": {
  22969. "type": "object",
  22970. "properties": {
  22971. "id": {
  22972. "type": "string"
  22973. },
  22974. "metadata": {
  22975. "type": "object"
  22976. },
  22977. "time": {
  22978. "type": "object",
  22979. "properties": {
  22980. "created": {
  22981. "type": "number"
  22982. }
  22983. },
  22984. "required": ["created"],
  22985. "additionalProperties": false
  22986. },
  22987. "text": {
  22988. "type": "string"
  22989. },
  22990. "files": {
  22991. "type": "array",
  22992. "items": {
  22993. "$ref": "#/components/schemas/PromptFileAttachment"
  22994. }
  22995. },
  22996. "agents": {
  22997. "type": "array",
  22998. "items": {
  22999. "$ref": "#/components/schemas/PromptAgentAttachment"
  23000. }
  23001. },
  23002. "references": {
  23003. "type": "array",
  23004. "items": {
  23005. "$ref": "#/components/schemas/PromptReferenceAttachment"
  23006. }
  23007. },
  23008. "type": {
  23009. "type": "string",
  23010. "enum": ["user"]
  23011. }
  23012. },
  23013. "required": ["id", "time", "text", "type"],
  23014. "additionalProperties": false
  23015. },
  23016. "SessionMessageAgentSwitched": {
  23017. "type": "object",
  23018. "properties": {
  23019. "id": {
  23020. "type": "string"
  23021. },
  23022. "metadata": {
  23023. "type": "object"
  23024. },
  23025. "time": {
  23026. "type": "object",
  23027. "properties": {
  23028. "created": {
  23029. "type": "number"
  23030. }
  23031. },
  23032. "required": ["created"],
  23033. "additionalProperties": false
  23034. },
  23035. "type": {
  23036. "type": "string",
  23037. "enum": ["agent-switched"]
  23038. },
  23039. "agent": {
  23040. "type": "string"
  23041. }
  23042. },
  23043. "required": ["id", "time", "type", "agent"],
  23044. "additionalProperties": false
  23045. },
  23046. "SessionMessageModelSwitched": {
  23047. "type": "object",
  23048. "properties": {
  23049. "id": {
  23050. "type": "string"
  23051. },
  23052. "metadata": {
  23053. "type": "object"
  23054. },
  23055. "time": {
  23056. "type": "object",
  23057. "properties": {
  23058. "created": {
  23059. "type": "number"
  23060. }
  23061. },
  23062. "required": ["created"],
  23063. "additionalProperties": false
  23064. },
  23065. "type": {
  23066. "type": "string",
  23067. "enum": ["model-switched"]
  23068. },
  23069. "model": {
  23070. "type": "object",
  23071. "properties": {
  23072. "id": {
  23073. "type": "string"
  23074. },
  23075. "providerID": {
  23076. "type": "string"
  23077. },
  23078. "variant": {
  23079. "type": "string"
  23080. }
  23081. },
  23082. "required": ["id", "providerID"],
  23083. "additionalProperties": false
  23084. }
  23085. },
  23086. "required": ["id", "time", "type", "model"],
  23087. "additionalProperties": false
  23088. },
  23089. "SessionMessageSynthetic": {
  23090. "type": "object",
  23091. "properties": {
  23092. "id": {
  23093. "type": "string"
  23094. },
  23095. "metadata": {
  23096. "type": "object"
  23097. },
  23098. "time": {
  23099. "type": "object",
  23100. "properties": {
  23101. "created": {
  23102. "type": "number"
  23103. }
  23104. },
  23105. "required": ["created"],
  23106. "additionalProperties": false
  23107. },
  23108. "sessionID": {
  23109. "type": "string",
  23110. "pattern": "^ses"
  23111. },
  23112. "text": {
  23113. "type": "string"
  23114. },
  23115. "type": {
  23116. "type": "string",
  23117. "enum": ["synthetic"]
  23118. }
  23119. },
  23120. "required": ["id", "time", "sessionID", "text", "type"],
  23121. "additionalProperties": false
  23122. },
  23123. "SessionMessageShell": {
  23124. "type": "object",
  23125. "properties": {
  23126. "id": {
  23127. "type": "string"
  23128. },
  23129. "metadata": {
  23130. "type": "object"
  23131. },
  23132. "time": {
  23133. "type": "object",
  23134. "properties": {
  23135. "created": {
  23136. "type": "number"
  23137. },
  23138. "completed": {
  23139. "type": "number"
  23140. }
  23141. },
  23142. "required": ["created"],
  23143. "additionalProperties": false
  23144. },
  23145. "type": {
  23146. "type": "string",
  23147. "enum": ["shell"]
  23148. },
  23149. "callID": {
  23150. "type": "string"
  23151. },
  23152. "command": {
  23153. "type": "string"
  23154. },
  23155. "output": {
  23156. "type": "string"
  23157. }
  23158. },
  23159. "required": ["id", "time", "type", "callID", "command", "output"],
  23160. "additionalProperties": false
  23161. },
  23162. "SessionMessageAssistantText": {
  23163. "type": "object",
  23164. "properties": {
  23165. "type": {
  23166. "type": "string",
  23167. "enum": ["text"]
  23168. },
  23169. "id": {
  23170. "type": "string"
  23171. },
  23172. "text": {
  23173. "type": "string"
  23174. }
  23175. },
  23176. "required": ["type", "id", "text"],
  23177. "additionalProperties": false
  23178. },
  23179. "SessionMessageAssistantReasoning": {
  23180. "type": "object",
  23181. "properties": {
  23182. "type": {
  23183. "type": "string",
  23184. "enum": ["reasoning"]
  23185. },
  23186. "id": {
  23187. "type": "string"
  23188. },
  23189. "text": {
  23190. "type": "string"
  23191. },
  23192. "providerMetadata": {
  23193. "type": "object",
  23194. "additionalProperties": {
  23195. "type": "object"
  23196. }
  23197. }
  23198. },
  23199. "required": ["type", "id", "text"],
  23200. "additionalProperties": false
  23201. },
  23202. "SessionMessageToolStatePending": {
  23203. "type": "object",
  23204. "properties": {
  23205. "status": {
  23206. "type": "string",
  23207. "enum": ["pending"]
  23208. },
  23209. "input": {
  23210. "type": "string"
  23211. }
  23212. },
  23213. "required": ["status", "input"],
  23214. "additionalProperties": false
  23215. },
  23216. "SessionMessageToolStateRunning": {
  23217. "type": "object",
  23218. "properties": {
  23219. "status": {
  23220. "type": "string",
  23221. "enum": ["running"]
  23222. },
  23223. "input": {
  23224. "type": "object"
  23225. },
  23226. "structured": {
  23227. "type": "object"
  23228. },
  23229. "content": {
  23230. "type": "array",
  23231. "items": {
  23232. "anyOf": [
  23233. {
  23234. "$ref": "#/components/schemas/ToolTextContent"
  23235. },
  23236. {
  23237. "$ref": "#/components/schemas/ToolFileContent"
  23238. }
  23239. ]
  23240. }
  23241. }
  23242. },
  23243. "required": ["status", "input", "structured", "content"],
  23244. "additionalProperties": false
  23245. },
  23246. "SessionMessageToolStateCompleted": {
  23247. "type": "object",
  23248. "properties": {
  23249. "status": {
  23250. "type": "string",
  23251. "enum": ["completed"]
  23252. },
  23253. "input": {
  23254. "type": "object"
  23255. },
  23256. "attachments": {
  23257. "type": "array",
  23258. "items": {
  23259. "$ref": "#/components/schemas/PromptFileAttachment"
  23260. }
  23261. },
  23262. "content": {
  23263. "type": "array",
  23264. "items": {
  23265. "anyOf": [
  23266. {
  23267. "$ref": "#/components/schemas/ToolTextContent"
  23268. },
  23269. {
  23270. "$ref": "#/components/schemas/ToolFileContent"
  23271. }
  23272. ]
  23273. }
  23274. },
  23275. "structured": {
  23276. "type": "object"
  23277. },
  23278. "result": {}
  23279. },
  23280. "required": ["status", "input", "content", "structured"],
  23281. "additionalProperties": false
  23282. },
  23283. "SessionMessageToolStateError": {
  23284. "type": "object",
  23285. "properties": {
  23286. "status": {
  23287. "type": "string",
  23288. "enum": ["error"]
  23289. },
  23290. "input": {
  23291. "type": "object"
  23292. },
  23293. "content": {
  23294. "type": "array",
  23295. "items": {
  23296. "anyOf": [
  23297. {
  23298. "$ref": "#/components/schemas/ToolTextContent"
  23299. },
  23300. {
  23301. "$ref": "#/components/schemas/ToolFileContent"
  23302. }
  23303. ]
  23304. }
  23305. },
  23306. "structured": {
  23307. "type": "object"
  23308. },
  23309. "error": {
  23310. "$ref": "#/components/schemas/SessionErrorUnknown"
  23311. },
  23312. "result": {}
  23313. },
  23314. "required": ["status", "input", "content", "structured", "error"],
  23315. "additionalProperties": false
  23316. },
  23317. "SessionMessageAssistantTool": {
  23318. "type": "object",
  23319. "properties": {
  23320. "type": {
  23321. "type": "string",
  23322. "enum": ["tool"]
  23323. },
  23324. "id": {
  23325. "type": "string"
  23326. },
  23327. "name": {
  23328. "type": "string"
  23329. },
  23330. "provider": {
  23331. "type": "object",
  23332. "properties": {
  23333. "executed": {
  23334. "type": "boolean"
  23335. },
  23336. "metadata": {
  23337. "type": "object",
  23338. "additionalProperties": {
  23339. "type": "object"
  23340. }
  23341. },
  23342. "resultMetadata": {
  23343. "type": "object",
  23344. "additionalProperties": {
  23345. "type": "object"
  23346. }
  23347. }
  23348. },
  23349. "required": ["executed"],
  23350. "additionalProperties": false
  23351. },
  23352. "state": {
  23353. "anyOf": [
  23354. {
  23355. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  23356. },
  23357. {
  23358. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  23359. },
  23360. {
  23361. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  23362. },
  23363. {
  23364. "$ref": "#/components/schemas/SessionMessageToolStateError"
  23365. }
  23366. ]
  23367. },
  23368. "time": {
  23369. "type": "object",
  23370. "properties": {
  23371. "created": {
  23372. "type": "number"
  23373. },
  23374. "ran": {
  23375. "type": "number"
  23376. },
  23377. "completed": {
  23378. "type": "number"
  23379. },
  23380. "pruned": {
  23381. "type": "number"
  23382. }
  23383. },
  23384. "required": ["created"],
  23385. "additionalProperties": false
  23386. }
  23387. },
  23388. "required": ["type", "id", "name", "state", "time"],
  23389. "additionalProperties": false
  23390. },
  23391. "SessionMessageAssistant": {
  23392. "type": "object",
  23393. "properties": {
  23394. "id": {
  23395. "type": "string"
  23396. },
  23397. "metadata": {
  23398. "type": "object"
  23399. },
  23400. "time": {
  23401. "type": "object",
  23402. "properties": {
  23403. "created": {
  23404. "type": "number"
  23405. },
  23406. "completed": {
  23407. "type": "number"
  23408. }
  23409. },
  23410. "required": ["created"],
  23411. "additionalProperties": false
  23412. },
  23413. "type": {
  23414. "type": "string",
  23415. "enum": ["assistant"]
  23416. },
  23417. "agent": {
  23418. "type": "string"
  23419. },
  23420. "model": {
  23421. "type": "object",
  23422. "properties": {
  23423. "id": {
  23424. "type": "string"
  23425. },
  23426. "providerID": {
  23427. "type": "string"
  23428. },
  23429. "variant": {
  23430. "type": "string"
  23431. }
  23432. },
  23433. "required": ["id", "providerID"],
  23434. "additionalProperties": false
  23435. },
  23436. "content": {
  23437. "type": "array",
  23438. "items": {
  23439. "anyOf": [
  23440. {
  23441. "$ref": "#/components/schemas/SessionMessageAssistantText"
  23442. },
  23443. {
  23444. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  23445. },
  23446. {
  23447. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  23448. }
  23449. ]
  23450. }
  23451. },
  23452. "snapshot": {
  23453. "type": "object",
  23454. "properties": {
  23455. "start": {
  23456. "type": "string"
  23457. },
  23458. "end": {
  23459. "type": "string"
  23460. }
  23461. },
  23462. "additionalProperties": false
  23463. },
  23464. "finish": {
  23465. "type": "string"
  23466. },
  23467. "cost": {
  23468. "type": "number"
  23469. },
  23470. "tokens": {
  23471. "type": "object",
  23472. "properties": {
  23473. "input": {
  23474. "type": "number"
  23475. },
  23476. "output": {
  23477. "type": "number"
  23478. },
  23479. "reasoning": {
  23480. "type": "number"
  23481. },
  23482. "cache": {
  23483. "type": "object",
  23484. "properties": {
  23485. "read": {
  23486. "type": "number"
  23487. },
  23488. "write": {
  23489. "type": "number"
  23490. }
  23491. },
  23492. "required": ["read", "write"],
  23493. "additionalProperties": false
  23494. }
  23495. },
  23496. "required": ["input", "output", "reasoning", "cache"],
  23497. "additionalProperties": false
  23498. },
  23499. "error": {
  23500. "$ref": "#/components/schemas/SessionErrorUnknown"
  23501. }
  23502. },
  23503. "required": ["id", "time", "type", "agent", "model", "content"],
  23504. "additionalProperties": false
  23505. },
  23506. "SessionMessageCompaction": {
  23507. "type": "object",
  23508. "properties": {
  23509. "type": {
  23510. "type": "string",
  23511. "enum": ["compaction"]
  23512. },
  23513. "reason": {
  23514. "type": "string",
  23515. "enum": ["auto", "manual"]
  23516. },
  23517. "summary": {
  23518. "type": "string"
  23519. },
  23520. "include": {
  23521. "type": "string"
  23522. },
  23523. "id": {
  23524. "type": "string"
  23525. },
  23526. "metadata": {
  23527. "type": "object"
  23528. },
  23529. "time": {
  23530. "type": "object",
  23531. "properties": {
  23532. "created": {
  23533. "type": "number"
  23534. }
  23535. },
  23536. "required": ["created"],
  23537. "additionalProperties": false
  23538. }
  23539. },
  23540. "required": ["type", "reason", "summary", "id", "time"],
  23541. "additionalProperties": false
  23542. },
  23543. "SessionMessage": {
  23544. "anyOf": [
  23545. {
  23546. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  23547. },
  23548. {
  23549. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  23550. },
  23551. {
  23552. "$ref": "#/components/schemas/SessionMessageUser"
  23553. },
  23554. {
  23555. "$ref": "#/components/schemas/SessionMessageSynthetic"
  23556. },
  23557. {
  23558. "$ref": "#/components/schemas/SessionMessageShell"
  23559. },
  23560. {
  23561. "$ref": "#/components/schemas/SessionMessageAssistant"
  23562. },
  23563. {
  23564. "$ref": "#/components/schemas/SessionMessageCompaction"
  23565. }
  23566. ]
  23567. },
  23568. "ProviderV2Info": {
  23569. "type": "object",
  23570. "properties": {
  23571. "id": {
  23572. "type": "string"
  23573. },
  23574. "name": {
  23575. "type": "string"
  23576. },
  23577. "enabled": {
  23578. "anyOf": [
  23579. {
  23580. "type": "boolean",
  23581. "enum": [false]
  23582. },
  23583. {
  23584. "type": "object",
  23585. "properties": {
  23586. "via": {
  23587. "type": "string",
  23588. "enum": ["env"]
  23589. },
  23590. "name": {
  23591. "type": "string"
  23592. }
  23593. },
  23594. "required": ["via", "name"],
  23595. "additionalProperties": false
  23596. },
  23597. {
  23598. "type": "object",
  23599. "properties": {
  23600. "via": {
  23601. "type": "string",
  23602. "enum": ["account"]
  23603. },
  23604. "service": {
  23605. "type": "string"
  23606. }
  23607. },
  23608. "required": ["via", "service"],
  23609. "additionalProperties": false
  23610. },
  23611. {
  23612. "type": "object",
  23613. "properties": {
  23614. "via": {
  23615. "type": "string",
  23616. "enum": ["custom"]
  23617. },
  23618. "data": {
  23619. "type": "object"
  23620. }
  23621. },
  23622. "required": ["via", "data"],
  23623. "additionalProperties": false
  23624. }
  23625. ]
  23626. },
  23627. "env": {
  23628. "type": "array",
  23629. "items": {
  23630. "type": "string"
  23631. }
  23632. },
  23633. "api": {
  23634. "anyOf": [
  23635. {
  23636. "type": "object",
  23637. "properties": {
  23638. "type": {
  23639. "type": "string",
  23640. "enum": ["aisdk"]
  23641. },
  23642. "package": {
  23643. "type": "string"
  23644. },
  23645. "url": {
  23646. "type": "string"
  23647. },
  23648. "settings": {
  23649. "type": "object"
  23650. }
  23651. },
  23652. "required": ["type", "package"],
  23653. "additionalProperties": false
  23654. },
  23655. {
  23656. "type": "object",
  23657. "properties": {
  23658. "type": {
  23659. "type": "string",
  23660. "enum": ["native"]
  23661. },
  23662. "url": {
  23663. "type": "string"
  23664. },
  23665. "settings": {
  23666. "type": "object"
  23667. }
  23668. },
  23669. "required": ["type", "settings"],
  23670. "additionalProperties": false
  23671. }
  23672. ]
  23673. },
  23674. "request": {
  23675. "type": "object",
  23676. "properties": {
  23677. "headers": {
  23678. "type": "object",
  23679. "additionalProperties": {
  23680. "type": "string"
  23681. }
  23682. },
  23683. "body": {
  23684. "type": "object"
  23685. }
  23686. },
  23687. "required": ["headers", "body"],
  23688. "additionalProperties": false
  23689. }
  23690. },
  23691. "required": ["id", "name", "enabled", "env", "api", "request"],
  23692. "additionalProperties": false
  23693. },
  23694. "PermissionV2Request": {
  23695. "type": "object",
  23696. "properties": {
  23697. "id": {
  23698. "type": "string",
  23699. "pattern": "^per"
  23700. },
  23701. "sessionID": {
  23702. "type": "string",
  23703. "pattern": "^ses"
  23704. },
  23705. "action": {
  23706. "type": "string"
  23707. },
  23708. "resources": {
  23709. "type": "array",
  23710. "items": {
  23711. "type": "string"
  23712. }
  23713. },
  23714. "save": {
  23715. "type": "array",
  23716. "items": {
  23717. "type": "string"
  23718. }
  23719. },
  23720. "metadata": {
  23721. "type": "object"
  23722. },
  23723. "source": {
  23724. "$ref": "#/components/schemas/PermissionV2Source"
  23725. }
  23726. },
  23727. "required": ["id", "sessionID", "action", "resources"],
  23728. "additionalProperties": false
  23729. },
  23730. "PermissionSavedInfo": {
  23731. "type": "object",
  23732. "properties": {
  23733. "id": {
  23734. "type": "string"
  23735. },
  23736. "projectID": {
  23737. "type": "string"
  23738. },
  23739. "action": {
  23740. "type": "string"
  23741. },
  23742. "resource": {
  23743. "type": "string"
  23744. }
  23745. },
  23746. "required": ["id", "projectID", "action", "resource"],
  23747. "additionalProperties": false
  23748. },
  23749. "FileSystemTextContent": {
  23750. "type": "object",
  23751. "properties": {
  23752. "type": {
  23753. "type": "string",
  23754. "enum": ["text"]
  23755. },
  23756. "content": {
  23757. "type": "string"
  23758. },
  23759. "mime": {
  23760. "type": "string"
  23761. }
  23762. },
  23763. "required": ["type", "content", "mime"],
  23764. "additionalProperties": false
  23765. },
  23766. "FileSystemBinaryContent": {
  23767. "type": "object",
  23768. "properties": {
  23769. "type": {
  23770. "type": "string",
  23771. "enum": ["binary"]
  23772. },
  23773. "content": {
  23774. "type": "string"
  23775. },
  23776. "encoding": {
  23777. "type": "string",
  23778. "enum": ["base64"]
  23779. },
  23780. "mime": {
  23781. "type": "string"
  23782. }
  23783. },
  23784. "required": ["type", "content", "encoding", "mime"],
  23785. "additionalProperties": false
  23786. },
  23787. "FileSystemEntry": {
  23788. "type": "object",
  23789. "properties": {
  23790. "path": {
  23791. "type": "string"
  23792. },
  23793. "uri": {
  23794. "type": "string"
  23795. },
  23796. "type": {
  23797. "type": "string",
  23798. "enum": ["file", "directory"]
  23799. },
  23800. "mime": {
  23801. "type": "string"
  23802. }
  23803. },
  23804. "required": ["path", "uri", "type", "mime"],
  23805. "additionalProperties": false
  23806. },
  23807. "CommandV2Info": {
  23808. "type": "object",
  23809. "properties": {
  23810. "name": {
  23811. "type": "string"
  23812. },
  23813. "template": {
  23814. "type": "string"
  23815. },
  23816. "description": {
  23817. "type": "string"
  23818. },
  23819. "agent": {
  23820. "type": "string"
  23821. },
  23822. "model": {
  23823. "type": "object",
  23824. "properties": {
  23825. "id": {
  23826. "type": "string"
  23827. },
  23828. "providerID": {
  23829. "type": "string"
  23830. },
  23831. "variant": {
  23832. "type": "string"
  23833. }
  23834. },
  23835. "required": ["id", "providerID"],
  23836. "additionalProperties": false
  23837. },
  23838. "subtask": {
  23839. "type": "boolean"
  23840. }
  23841. },
  23842. "required": ["name", "template"],
  23843. "additionalProperties": false
  23844. },
  23845. "SkillV2Info": {
  23846. "type": "object",
  23847. "properties": {
  23848. "name": {
  23849. "type": "string"
  23850. },
  23851. "description": {
  23852. "type": "string"
  23853. },
  23854. "slash": {
  23855. "type": "boolean"
  23856. },
  23857. "location": {
  23858. "type": "string"
  23859. },
  23860. "content": {
  23861. "type": "string"
  23862. }
  23863. },
  23864. "required": ["name", "location", "content"],
  23865. "additionalProperties": false
  23866. },
  23867. "QuestionV2Request": {
  23868. "type": "object",
  23869. "properties": {
  23870. "id": {
  23871. "type": "string",
  23872. "pattern": "^que"
  23873. },
  23874. "sessionID": {
  23875. "type": "string",
  23876. "pattern": "^ses"
  23877. },
  23878. "questions": {
  23879. "type": "array",
  23880. "items": {
  23881. "$ref": "#/components/schemas/QuestionV2Info"
  23882. },
  23883. "description": "Questions to ask"
  23884. },
  23885. "tool": {
  23886. "$ref": "#/components/schemas/QuestionV2Tool"
  23887. }
  23888. },
  23889. "required": ["id", "sessionID", "questions"],
  23890. "additionalProperties": false
  23891. },
  23892. "QuestionV2Reply": {
  23893. "type": "object",
  23894. "properties": {
  23895. "answers": {
  23896. "type": "array",
  23897. "items": {
  23898. "$ref": "#/components/schemas/QuestionV2Answer"
  23899. },
  23900. "description": "User answers in order of questions (each answer is an array of selected labels)"
  23901. }
  23902. },
  23903. "required": ["answers"],
  23904. "additionalProperties": false
  23905. },
  23906. "EventModels-devRefreshed": {
  23907. "type": "object",
  23908. "properties": {
  23909. "id": {
  23910. "type": "string"
  23911. },
  23912. "type": {
  23913. "type": "string",
  23914. "enum": ["models-dev.refreshed"]
  23915. },
  23916. "properties": {
  23917. "type": "object",
  23918. "properties": {}
  23919. }
  23920. },
  23921. "required": ["id", "type", "properties"],
  23922. "additionalProperties": false
  23923. },
  23924. "EventPluginAdded": {
  23925. "type": "object",
  23926. "properties": {
  23927. "id": {
  23928. "type": "string"
  23929. },
  23930. "type": {
  23931. "type": "string",
  23932. "enum": ["plugin.added"]
  23933. },
  23934. "properties": {
  23935. "type": "object",
  23936. "properties": {
  23937. "id": {
  23938. "type": "string"
  23939. }
  23940. },
  23941. "required": ["id"],
  23942. "additionalProperties": false
  23943. }
  23944. },
  23945. "required": ["id", "type", "properties"],
  23946. "additionalProperties": false
  23947. },
  23948. "ModelV2Info1": {
  23949. "type": "object",
  23950. "properties": {
  23951. "id": {
  23952. "type": "string"
  23953. },
  23954. "providerID": {
  23955. "type": "string"
  23956. },
  23957. "family": {
  23958. "type": "string"
  23959. },
  23960. "name": {
  23961. "type": "string"
  23962. },
  23963. "api": {
  23964. "anyOf": [
  23965. {
  23966. "type": "object",
  23967. "properties": {
  23968. "id": {
  23969. "type": "string"
  23970. },
  23971. "type": {
  23972. "type": "string",
  23973. "enum": ["aisdk"]
  23974. },
  23975. "package": {
  23976. "type": "string"
  23977. },
  23978. "url": {
  23979. "type": "string"
  23980. },
  23981. "settings": {
  23982. "type": "object"
  23983. }
  23984. },
  23985. "required": ["id", "type", "package"],
  23986. "additionalProperties": false
  23987. },
  23988. {
  23989. "type": "object",
  23990. "properties": {
  23991. "id": {
  23992. "type": "string"
  23993. },
  23994. "type": {
  23995. "type": "string",
  23996. "enum": ["native"]
  23997. },
  23998. "url": {
  23999. "type": "string"
  24000. },
  24001. "settings": {
  24002. "type": "object"
  24003. }
  24004. },
  24005. "required": ["id", "type", "settings"],
  24006. "additionalProperties": false
  24007. }
  24008. ]
  24009. },
  24010. "capabilities": {
  24011. "type": "object",
  24012. "properties": {
  24013. "tools": {
  24014. "type": "boolean"
  24015. },
  24016. "input": {
  24017. "type": "array",
  24018. "items": {
  24019. "type": "string"
  24020. }
  24021. },
  24022. "output": {
  24023. "type": "array",
  24024. "items": {
  24025. "type": "string"
  24026. }
  24027. }
  24028. },
  24029. "required": ["tools", "input", "output"],
  24030. "additionalProperties": false
  24031. },
  24032. "request": {
  24033. "type": "object",
  24034. "properties": {
  24035. "headers": {
  24036. "type": "object",
  24037. "additionalProperties": {
  24038. "type": "string"
  24039. }
  24040. },
  24041. "body": {
  24042. "type": "object"
  24043. },
  24044. "variant": {
  24045. "type": "string"
  24046. }
  24047. },
  24048. "required": ["headers", "body"],
  24049. "additionalProperties": false
  24050. },
  24051. "variants": {
  24052. "type": "array",
  24053. "items": {
  24054. "type": "object",
  24055. "properties": {
  24056. "id": {
  24057. "type": "string"
  24058. },
  24059. "headers": {
  24060. "type": "object",
  24061. "additionalProperties": {
  24062. "type": "string"
  24063. }
  24064. },
  24065. "body": {
  24066. "type": "object"
  24067. }
  24068. },
  24069. "required": ["id", "headers", "body"],
  24070. "additionalProperties": false
  24071. }
  24072. },
  24073. "time": {
  24074. "type": "object",
  24075. "properties": {
  24076. "released": {
  24077. "anyOf": [
  24078. {
  24079. "type": "number"
  24080. },
  24081. {
  24082. "type": "string",
  24083. "enum": ["NaN"]
  24084. },
  24085. {
  24086. "type": "string",
  24087. "enum": ["Infinity"]
  24088. },
  24089. {
  24090. "type": "string",
  24091. "enum": ["-Infinity"]
  24092. }
  24093. ]
  24094. }
  24095. },
  24096. "required": ["released"],
  24097. "additionalProperties": false
  24098. },
  24099. "cost": {
  24100. "type": "array",
  24101. "items": {
  24102. "type": "object",
  24103. "properties": {
  24104. "tier": {
  24105. "type": "object",
  24106. "properties": {
  24107. "type": {
  24108. "type": "string",
  24109. "enum": ["context"]
  24110. },
  24111. "size": {
  24112. "type": "integer"
  24113. }
  24114. },
  24115. "required": ["type", "size"],
  24116. "additionalProperties": false
  24117. },
  24118. "input": {
  24119. "type": "number"
  24120. },
  24121. "output": {
  24122. "type": "number"
  24123. },
  24124. "cache": {
  24125. "type": "object",
  24126. "properties": {
  24127. "read": {
  24128. "type": "number"
  24129. },
  24130. "write": {
  24131. "type": "number"
  24132. }
  24133. },
  24134. "required": ["read", "write"],
  24135. "additionalProperties": false
  24136. }
  24137. },
  24138. "required": ["input", "output", "cache"],
  24139. "additionalProperties": false
  24140. }
  24141. },
  24142. "status": {
  24143. "type": "string",
  24144. "enum": ["alpha", "beta", "deprecated", "active"]
  24145. },
  24146. "enabled": {
  24147. "type": "boolean"
  24148. },
  24149. "limit": {
  24150. "type": "object",
  24151. "properties": {
  24152. "context": {
  24153. "type": "integer"
  24154. },
  24155. "input": {
  24156. "type": "integer"
  24157. },
  24158. "output": {
  24159. "type": "integer"
  24160. }
  24161. },
  24162. "required": ["context", "output"],
  24163. "additionalProperties": false
  24164. }
  24165. },
  24166. "required": [
  24167. "id",
  24168. "providerID",
  24169. "name",
  24170. "api",
  24171. "capabilities",
  24172. "request",
  24173. "variants",
  24174. "time",
  24175. "cost",
  24176. "status",
  24177. "enabled",
  24178. "limit"
  24179. ],
  24180. "additionalProperties": false
  24181. },
  24182. "EventCatalogModelUpdated": {
  24183. "type": "object",
  24184. "properties": {
  24185. "id": {
  24186. "type": "string"
  24187. },
  24188. "type": {
  24189. "type": "string",
  24190. "enum": ["catalog.model.updated"]
  24191. },
  24192. "properties": {
  24193. "type": "object",
  24194. "properties": {
  24195. "model": {
  24196. "$ref": "#/components/schemas/ModelV2Info1"
  24197. }
  24198. },
  24199. "required": ["model"],
  24200. "additionalProperties": false
  24201. }
  24202. },
  24203. "required": ["id", "type", "properties"],
  24204. "additionalProperties": false
  24205. },
  24206. "EventSessionCreated": {
  24207. "type": "object",
  24208. "properties": {
  24209. "id": {
  24210. "type": "string"
  24211. },
  24212. "type": {
  24213. "type": "string",
  24214. "enum": ["session.created"]
  24215. },
  24216. "properties": {
  24217. "type": "object",
  24218. "properties": {
  24219. "sessionID": {
  24220. "type": "string",
  24221. "pattern": "^ses"
  24222. },
  24223. "info": {
  24224. "$ref": "#/components/schemas/Session"
  24225. }
  24226. },
  24227. "required": ["sessionID", "info"],
  24228. "additionalProperties": false
  24229. }
  24230. },
  24231. "required": ["id", "type", "properties"],
  24232. "additionalProperties": false
  24233. },
  24234. "EventSessionUpdated": {
  24235. "type": "object",
  24236. "properties": {
  24237. "id": {
  24238. "type": "string"
  24239. },
  24240. "type": {
  24241. "type": "string",
  24242. "enum": ["session.updated"]
  24243. },
  24244. "properties": {
  24245. "type": "object",
  24246. "properties": {
  24247. "sessionID": {
  24248. "type": "string",
  24249. "pattern": "^ses"
  24250. },
  24251. "info": {
  24252. "$ref": "#/components/schemas/Session"
  24253. }
  24254. },
  24255. "required": ["sessionID", "info"],
  24256. "additionalProperties": false
  24257. }
  24258. },
  24259. "required": ["id", "type", "properties"],
  24260. "additionalProperties": false
  24261. },
  24262. "EventSessionDeleted": {
  24263. "type": "object",
  24264. "properties": {
  24265. "id": {
  24266. "type": "string"
  24267. },
  24268. "type": {
  24269. "type": "string",
  24270. "enum": ["session.deleted"]
  24271. },
  24272. "properties": {
  24273. "type": "object",
  24274. "properties": {
  24275. "sessionID": {
  24276. "type": "string",
  24277. "pattern": "^ses"
  24278. },
  24279. "info": {
  24280. "$ref": "#/components/schemas/Session"
  24281. }
  24282. },
  24283. "required": ["sessionID", "info"],
  24284. "additionalProperties": false
  24285. }
  24286. },
  24287. "required": ["id", "type", "properties"],
  24288. "additionalProperties": false
  24289. },
  24290. "EventMessageUpdated": {
  24291. "type": "object",
  24292. "properties": {
  24293. "id": {
  24294. "type": "string"
  24295. },
  24296. "type": {
  24297. "type": "string",
  24298. "enum": ["message.updated"]
  24299. },
  24300. "properties": {
  24301. "type": "object",
  24302. "properties": {
  24303. "sessionID": {
  24304. "type": "string",
  24305. "pattern": "^ses"
  24306. },
  24307. "info": {
  24308. "$ref": "#/components/schemas/Message"
  24309. }
  24310. },
  24311. "required": ["sessionID", "info"],
  24312. "additionalProperties": false
  24313. }
  24314. },
  24315. "required": ["id", "type", "properties"],
  24316. "additionalProperties": false
  24317. },
  24318. "EventMessageRemoved": {
  24319. "type": "object",
  24320. "properties": {
  24321. "id": {
  24322. "type": "string"
  24323. },
  24324. "type": {
  24325. "type": "string",
  24326. "enum": ["message.removed"]
  24327. },
  24328. "properties": {
  24329. "type": "object",
  24330. "properties": {
  24331. "sessionID": {
  24332. "type": "string",
  24333. "pattern": "^ses"
  24334. },
  24335. "messageID": {
  24336. "type": "string",
  24337. "pattern": "^msg"
  24338. }
  24339. },
  24340. "required": ["sessionID", "messageID"],
  24341. "additionalProperties": false
  24342. }
  24343. },
  24344. "required": ["id", "type", "properties"],
  24345. "additionalProperties": false
  24346. },
  24347. "EventMessagePartUpdated": {
  24348. "type": "object",
  24349. "properties": {
  24350. "id": {
  24351. "type": "string"
  24352. },
  24353. "type": {
  24354. "type": "string",
  24355. "enum": ["message.part.updated"]
  24356. },
  24357. "properties": {
  24358. "type": "object",
  24359. "properties": {
  24360. "sessionID": {
  24361. "type": "string",
  24362. "pattern": "^ses"
  24363. },
  24364. "part": {
  24365. "$ref": "#/components/schemas/Part"
  24366. },
  24367. "time": {
  24368. "type": "number"
  24369. }
  24370. },
  24371. "required": ["sessionID", "part", "time"],
  24372. "additionalProperties": false
  24373. }
  24374. },
  24375. "required": ["id", "type", "properties"],
  24376. "additionalProperties": false
  24377. },
  24378. "EventMessagePartRemoved": {
  24379. "type": "object",
  24380. "properties": {
  24381. "id": {
  24382. "type": "string"
  24383. },
  24384. "type": {
  24385. "type": "string",
  24386. "enum": ["message.part.removed"]
  24387. },
  24388. "properties": {
  24389. "type": "object",
  24390. "properties": {
  24391. "sessionID": {
  24392. "type": "string",
  24393. "pattern": "^ses"
  24394. },
  24395. "messageID": {
  24396. "type": "string",
  24397. "pattern": "^msg"
  24398. },
  24399. "partID": {
  24400. "type": "string",
  24401. "pattern": "^prt"
  24402. }
  24403. },
  24404. "required": ["sessionID", "messageID", "partID"],
  24405. "additionalProperties": false
  24406. }
  24407. },
  24408. "required": ["id", "type", "properties"],
  24409. "additionalProperties": false
  24410. },
  24411. "EventSessionNextAgentSwitched": {
  24412. "type": "object",
  24413. "properties": {
  24414. "id": {
  24415. "type": "string"
  24416. },
  24417. "type": {
  24418. "type": "string",
  24419. "enum": ["session.next.agent.switched"]
  24420. },
  24421. "properties": {
  24422. "type": "object",
  24423. "properties": {
  24424. "timestamp": {
  24425. "type": "number"
  24426. },
  24427. "sessionID": {
  24428. "type": "string",
  24429. "pattern": "^ses"
  24430. },
  24431. "agent": {
  24432. "type": "string"
  24433. }
  24434. },
  24435. "required": ["timestamp", "sessionID", "agent"],
  24436. "additionalProperties": false
  24437. }
  24438. },
  24439. "required": ["id", "type", "properties"],
  24440. "additionalProperties": false
  24441. },
  24442. "EventSessionNextModelSwitched": {
  24443. "type": "object",
  24444. "properties": {
  24445. "id": {
  24446. "type": "string"
  24447. },
  24448. "type": {
  24449. "type": "string",
  24450. "enum": ["session.next.model.switched"]
  24451. },
  24452. "properties": {
  24453. "type": "object",
  24454. "properties": {
  24455. "timestamp": {
  24456. "type": "number"
  24457. },
  24458. "sessionID": {
  24459. "type": "string",
  24460. "pattern": "^ses"
  24461. },
  24462. "model": {
  24463. "type": "object",
  24464. "properties": {
  24465. "id": {
  24466. "type": "string"
  24467. },
  24468. "providerID": {
  24469. "type": "string"
  24470. },
  24471. "variant": {
  24472. "type": "string"
  24473. }
  24474. },
  24475. "required": ["id", "providerID"],
  24476. "additionalProperties": false
  24477. }
  24478. },
  24479. "required": ["timestamp", "sessionID", "model"],
  24480. "additionalProperties": false
  24481. }
  24482. },
  24483. "required": ["id", "type", "properties"],
  24484. "additionalProperties": false
  24485. },
  24486. "EventSessionNextMoved": {
  24487. "type": "object",
  24488. "properties": {
  24489. "id": {
  24490. "type": "string"
  24491. },
  24492. "type": {
  24493. "type": "string",
  24494. "enum": ["session.next.moved"]
  24495. },
  24496. "properties": {
  24497. "type": "object",
  24498. "properties": {
  24499. "timestamp": {
  24500. "type": "number"
  24501. },
  24502. "sessionID": {
  24503. "type": "string",
  24504. "pattern": "^ses"
  24505. },
  24506. "location": {
  24507. "$ref": "#/components/schemas/LocationRef"
  24508. },
  24509. "subdirectory": {
  24510. "type": "string"
  24511. }
  24512. },
  24513. "required": ["timestamp", "sessionID", "location"],
  24514. "additionalProperties": false
  24515. }
  24516. },
  24517. "required": ["id", "type", "properties"],
  24518. "additionalProperties": false
  24519. },
  24520. "EventSessionNextPrompted": {
  24521. "type": "object",
  24522. "properties": {
  24523. "id": {
  24524. "type": "string"
  24525. },
  24526. "type": {
  24527. "type": "string",
  24528. "enum": ["session.next.prompted"]
  24529. },
  24530. "properties": {
  24531. "type": "object",
  24532. "properties": {
  24533. "timestamp": {
  24534. "type": "number"
  24535. },
  24536. "sessionID": {
  24537. "type": "string",
  24538. "pattern": "^ses"
  24539. },
  24540. "prompt": {
  24541. "$ref": "#/components/schemas/Prompt"
  24542. },
  24543. "delivery": {
  24544. "type": "string",
  24545. "enum": ["steer", "queue"]
  24546. }
  24547. },
  24548. "required": ["timestamp", "sessionID", "prompt", "delivery"],
  24549. "additionalProperties": false
  24550. }
  24551. },
  24552. "required": ["id", "type", "properties"],
  24553. "additionalProperties": false
  24554. },
  24555. "EventSessionNextSynthetic": {
  24556. "type": "object",
  24557. "properties": {
  24558. "id": {
  24559. "type": "string"
  24560. },
  24561. "type": {
  24562. "type": "string",
  24563. "enum": ["session.next.synthetic"]
  24564. },
  24565. "properties": {
  24566. "type": "object",
  24567. "properties": {
  24568. "timestamp": {
  24569. "type": "number"
  24570. },
  24571. "sessionID": {
  24572. "type": "string",
  24573. "pattern": "^ses"
  24574. },
  24575. "text": {
  24576. "type": "string"
  24577. }
  24578. },
  24579. "required": ["timestamp", "sessionID", "text"],
  24580. "additionalProperties": false
  24581. }
  24582. },
  24583. "required": ["id", "type", "properties"],
  24584. "additionalProperties": false
  24585. },
  24586. "EventSessionNextShellStarted": {
  24587. "type": "object",
  24588. "properties": {
  24589. "id": {
  24590. "type": "string"
  24591. },
  24592. "type": {
  24593. "type": "string",
  24594. "enum": ["session.next.shell.started"]
  24595. },
  24596. "properties": {
  24597. "type": "object",
  24598. "properties": {
  24599. "timestamp": {
  24600. "type": "number"
  24601. },
  24602. "sessionID": {
  24603. "type": "string",
  24604. "pattern": "^ses"
  24605. },
  24606. "callID": {
  24607. "type": "string"
  24608. },
  24609. "command": {
  24610. "type": "string"
  24611. }
  24612. },
  24613. "required": ["timestamp", "sessionID", "callID", "command"],
  24614. "additionalProperties": false
  24615. }
  24616. },
  24617. "required": ["id", "type", "properties"],
  24618. "additionalProperties": false
  24619. },
  24620. "EventSessionNextShellEnded": {
  24621. "type": "object",
  24622. "properties": {
  24623. "id": {
  24624. "type": "string"
  24625. },
  24626. "type": {
  24627. "type": "string",
  24628. "enum": ["session.next.shell.ended"]
  24629. },
  24630. "properties": {
  24631. "type": "object",
  24632. "properties": {
  24633. "timestamp": {
  24634. "type": "number"
  24635. },
  24636. "sessionID": {
  24637. "type": "string",
  24638. "pattern": "^ses"
  24639. },
  24640. "callID": {
  24641. "type": "string"
  24642. },
  24643. "output": {
  24644. "type": "string"
  24645. }
  24646. },
  24647. "required": ["timestamp", "sessionID", "callID", "output"],
  24648. "additionalProperties": false
  24649. }
  24650. },
  24651. "required": ["id", "type", "properties"],
  24652. "additionalProperties": false
  24653. },
  24654. "EventSessionNextStepStarted": {
  24655. "type": "object",
  24656. "properties": {
  24657. "id": {
  24658. "type": "string"
  24659. },
  24660. "type": {
  24661. "type": "string",
  24662. "enum": ["session.next.step.started"]
  24663. },
  24664. "properties": {
  24665. "type": "object",
  24666. "properties": {
  24667. "timestamp": {
  24668. "type": "number"
  24669. },
  24670. "sessionID": {
  24671. "type": "string",
  24672. "pattern": "^ses"
  24673. },
  24674. "agent": {
  24675. "type": "string"
  24676. },
  24677. "model": {
  24678. "type": "object",
  24679. "properties": {
  24680. "id": {
  24681. "type": "string"
  24682. },
  24683. "providerID": {
  24684. "type": "string"
  24685. },
  24686. "variant": {
  24687. "type": "string"
  24688. }
  24689. },
  24690. "required": ["id", "providerID"],
  24691. "additionalProperties": false
  24692. },
  24693. "snapshot": {
  24694. "type": "string"
  24695. }
  24696. },
  24697. "required": ["timestamp", "sessionID", "agent", "model"],
  24698. "additionalProperties": false
  24699. }
  24700. },
  24701. "required": ["id", "type", "properties"],
  24702. "additionalProperties": false
  24703. },
  24704. "EventSessionNextStepEnded": {
  24705. "type": "object",
  24706. "properties": {
  24707. "id": {
  24708. "type": "string"
  24709. },
  24710. "type": {
  24711. "type": "string",
  24712. "enum": ["session.next.step.ended"]
  24713. },
  24714. "properties": {
  24715. "type": "object",
  24716. "properties": {
  24717. "timestamp": {
  24718. "type": "number"
  24719. },
  24720. "sessionID": {
  24721. "type": "string",
  24722. "pattern": "^ses"
  24723. },
  24724. "assistantMessageID": {
  24725. "type": "string"
  24726. },
  24727. "finish": {
  24728. "type": "string"
  24729. },
  24730. "cost": {
  24731. "type": "number"
  24732. },
  24733. "tokens": {
  24734. "type": "object",
  24735. "properties": {
  24736. "input": {
  24737. "type": "number"
  24738. },
  24739. "output": {
  24740. "type": "number"
  24741. },
  24742. "reasoning": {
  24743. "type": "number"
  24744. },
  24745. "cache": {
  24746. "type": "object",
  24747. "properties": {
  24748. "read": {
  24749. "type": "number"
  24750. },
  24751. "write": {
  24752. "type": "number"
  24753. }
  24754. },
  24755. "required": ["read", "write"],
  24756. "additionalProperties": false
  24757. }
  24758. },
  24759. "required": ["input", "output", "reasoning", "cache"],
  24760. "additionalProperties": false
  24761. },
  24762. "snapshot": {
  24763. "type": "string"
  24764. }
  24765. },
  24766. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24767. "additionalProperties": false
  24768. }
  24769. },
  24770. "required": ["id", "type", "properties"],
  24771. "additionalProperties": false
  24772. },
  24773. "EventSessionNextStepFailed": {
  24774. "type": "object",
  24775. "properties": {
  24776. "id": {
  24777. "type": "string"
  24778. },
  24779. "type": {
  24780. "type": "string",
  24781. "enum": ["session.next.step.failed"]
  24782. },
  24783. "properties": {
  24784. "type": "object",
  24785. "properties": {
  24786. "timestamp": {
  24787. "type": "number"
  24788. },
  24789. "sessionID": {
  24790. "type": "string",
  24791. "pattern": "^ses"
  24792. },
  24793. "assistantMessageID": {
  24794. "type": "string"
  24795. },
  24796. "error": {
  24797. "$ref": "#/components/schemas/SessionErrorUnknown"
  24798. }
  24799. },
  24800. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24801. "additionalProperties": false
  24802. }
  24803. },
  24804. "required": ["id", "type", "properties"],
  24805. "additionalProperties": false
  24806. },
  24807. "EventSessionNextTextStarted": {
  24808. "type": "object",
  24809. "properties": {
  24810. "id": {
  24811. "type": "string"
  24812. },
  24813. "type": {
  24814. "type": "string",
  24815. "enum": ["session.next.text.started"]
  24816. },
  24817. "properties": {
  24818. "type": "object",
  24819. "properties": {
  24820. "timestamp": {
  24821. "type": "number"
  24822. },
  24823. "sessionID": {
  24824. "type": "string",
  24825. "pattern": "^ses"
  24826. },
  24827. "textID": {
  24828. "type": "string"
  24829. }
  24830. },
  24831. "required": ["timestamp", "sessionID", "textID"],
  24832. "additionalProperties": false
  24833. }
  24834. },
  24835. "required": ["id", "type", "properties"],
  24836. "additionalProperties": false
  24837. },
  24838. "EventSessionNextTextDelta": {
  24839. "type": "object",
  24840. "properties": {
  24841. "id": {
  24842. "type": "string"
  24843. },
  24844. "type": {
  24845. "type": "string",
  24846. "enum": ["session.next.text.delta"]
  24847. },
  24848. "properties": {
  24849. "type": "object",
  24850. "properties": {
  24851. "timestamp": {
  24852. "type": "number"
  24853. },
  24854. "sessionID": {
  24855. "type": "string",
  24856. "pattern": "^ses"
  24857. },
  24858. "textID": {
  24859. "type": "string"
  24860. },
  24861. "delta": {
  24862. "type": "string"
  24863. }
  24864. },
  24865. "required": ["timestamp", "sessionID", "textID", "delta"],
  24866. "additionalProperties": false
  24867. }
  24868. },
  24869. "required": ["id", "type", "properties"],
  24870. "additionalProperties": false
  24871. },
  24872. "EventSessionNextTextEnded": {
  24873. "type": "object",
  24874. "properties": {
  24875. "id": {
  24876. "type": "string"
  24877. },
  24878. "type": {
  24879. "type": "string",
  24880. "enum": ["session.next.text.ended"]
  24881. },
  24882. "properties": {
  24883. "type": "object",
  24884. "properties": {
  24885. "timestamp": {
  24886. "type": "number"
  24887. },
  24888. "sessionID": {
  24889. "type": "string",
  24890. "pattern": "^ses"
  24891. },
  24892. "textID": {
  24893. "type": "string"
  24894. },
  24895. "text": {
  24896. "type": "string"
  24897. }
  24898. },
  24899. "required": ["timestamp", "sessionID", "textID", "text"],
  24900. "additionalProperties": false
  24901. }
  24902. },
  24903. "required": ["id", "type", "properties"],
  24904. "additionalProperties": false
  24905. },
  24906. "EventSessionNextReasoningStarted": {
  24907. "type": "object",
  24908. "properties": {
  24909. "id": {
  24910. "type": "string"
  24911. },
  24912. "type": {
  24913. "type": "string",
  24914. "enum": ["session.next.reasoning.started"]
  24915. },
  24916. "properties": {
  24917. "type": "object",
  24918. "properties": {
  24919. "timestamp": {
  24920. "type": "number"
  24921. },
  24922. "sessionID": {
  24923. "type": "string",
  24924. "pattern": "^ses"
  24925. },
  24926. "reasoningID": {
  24927. "type": "string"
  24928. },
  24929. "providerMetadata": {
  24930. "type": "object",
  24931. "additionalProperties": {
  24932. "type": "object"
  24933. }
  24934. }
  24935. },
  24936. "required": ["timestamp", "sessionID", "reasoningID"],
  24937. "additionalProperties": false
  24938. }
  24939. },
  24940. "required": ["id", "type", "properties"],
  24941. "additionalProperties": false
  24942. },
  24943. "EventSessionNextReasoningDelta": {
  24944. "type": "object",
  24945. "properties": {
  24946. "id": {
  24947. "type": "string"
  24948. },
  24949. "type": {
  24950. "type": "string",
  24951. "enum": ["session.next.reasoning.delta"]
  24952. },
  24953. "properties": {
  24954. "type": "object",
  24955. "properties": {
  24956. "timestamp": {
  24957. "type": "number"
  24958. },
  24959. "sessionID": {
  24960. "type": "string",
  24961. "pattern": "^ses"
  24962. },
  24963. "reasoningID": {
  24964. "type": "string"
  24965. },
  24966. "delta": {
  24967. "type": "string"
  24968. }
  24969. },
  24970. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  24971. "additionalProperties": false
  24972. }
  24973. },
  24974. "required": ["id", "type", "properties"],
  24975. "additionalProperties": false
  24976. },
  24977. "EventSessionNextReasoningEnded": {
  24978. "type": "object",
  24979. "properties": {
  24980. "id": {
  24981. "type": "string"
  24982. },
  24983. "type": {
  24984. "type": "string",
  24985. "enum": ["session.next.reasoning.ended"]
  24986. },
  24987. "properties": {
  24988. "type": "object",
  24989. "properties": {
  24990. "timestamp": {
  24991. "type": "number"
  24992. },
  24993. "sessionID": {
  24994. "type": "string",
  24995. "pattern": "^ses"
  24996. },
  24997. "reasoningID": {
  24998. "type": "string"
  24999. },
  25000. "text": {
  25001. "type": "string"
  25002. },
  25003. "providerMetadata": {
  25004. "type": "object",
  25005. "additionalProperties": {
  25006. "type": "object"
  25007. }
  25008. }
  25009. },
  25010. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  25011. "additionalProperties": false
  25012. }
  25013. },
  25014. "required": ["id", "type", "properties"],
  25015. "additionalProperties": false
  25016. },
  25017. "EventSessionNextToolInputStarted": {
  25018. "type": "object",
  25019. "properties": {
  25020. "id": {
  25021. "type": "string"
  25022. },
  25023. "type": {
  25024. "type": "string",
  25025. "enum": ["session.next.tool.input.started"]
  25026. },
  25027. "properties": {
  25028. "type": "object",
  25029. "properties": {
  25030. "timestamp": {
  25031. "type": "number"
  25032. },
  25033. "sessionID": {
  25034. "type": "string",
  25035. "pattern": "^ses"
  25036. },
  25037. "assistantMessageID": {
  25038. "type": "string"
  25039. },
  25040. "callID": {
  25041. "type": "string"
  25042. },
  25043. "name": {
  25044. "type": "string"
  25045. }
  25046. },
  25047. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25048. "additionalProperties": false
  25049. }
  25050. },
  25051. "required": ["id", "type", "properties"],
  25052. "additionalProperties": false
  25053. },
  25054. "EventSessionNextToolInputDelta": {
  25055. "type": "object",
  25056. "properties": {
  25057. "id": {
  25058. "type": "string"
  25059. },
  25060. "type": {
  25061. "type": "string",
  25062. "enum": ["session.next.tool.input.delta"]
  25063. },
  25064. "properties": {
  25065. "type": "object",
  25066. "properties": {
  25067. "timestamp": {
  25068. "type": "number"
  25069. },
  25070. "sessionID": {
  25071. "type": "string",
  25072. "pattern": "^ses"
  25073. },
  25074. "assistantMessageID": {
  25075. "type": "string"
  25076. },
  25077. "callID": {
  25078. "type": "string"
  25079. },
  25080. "delta": {
  25081. "type": "string"
  25082. }
  25083. },
  25084. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  25085. "additionalProperties": false
  25086. }
  25087. },
  25088. "required": ["id", "type", "properties"],
  25089. "additionalProperties": false
  25090. },
  25091. "EventSessionNextToolInputEnded": {
  25092. "type": "object",
  25093. "properties": {
  25094. "id": {
  25095. "type": "string"
  25096. },
  25097. "type": {
  25098. "type": "string",
  25099. "enum": ["session.next.tool.input.ended"]
  25100. },
  25101. "properties": {
  25102. "type": "object",
  25103. "properties": {
  25104. "timestamp": {
  25105. "type": "number"
  25106. },
  25107. "sessionID": {
  25108. "type": "string",
  25109. "pattern": "^ses"
  25110. },
  25111. "assistantMessageID": {
  25112. "type": "string"
  25113. },
  25114. "callID": {
  25115. "type": "string"
  25116. },
  25117. "text": {
  25118. "type": "string"
  25119. }
  25120. },
  25121. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25122. "additionalProperties": false
  25123. }
  25124. },
  25125. "required": ["id", "type", "properties"],
  25126. "additionalProperties": false
  25127. },
  25128. "EventSessionNextToolCalled": {
  25129. "type": "object",
  25130. "properties": {
  25131. "id": {
  25132. "type": "string"
  25133. },
  25134. "type": {
  25135. "type": "string",
  25136. "enum": ["session.next.tool.called"]
  25137. },
  25138. "properties": {
  25139. "type": "object",
  25140. "properties": {
  25141. "timestamp": {
  25142. "type": "number"
  25143. },
  25144. "sessionID": {
  25145. "type": "string",
  25146. "pattern": "^ses"
  25147. },
  25148. "assistantMessageID": {
  25149. "type": "string"
  25150. },
  25151. "callID": {
  25152. "type": "string"
  25153. },
  25154. "tool": {
  25155. "type": "string"
  25156. },
  25157. "input": {
  25158. "type": "object"
  25159. },
  25160. "provider": {
  25161. "type": "object",
  25162. "properties": {
  25163. "executed": {
  25164. "type": "boolean"
  25165. },
  25166. "metadata": {
  25167. "type": "object",
  25168. "additionalProperties": {
  25169. "type": "object"
  25170. }
  25171. }
  25172. },
  25173. "required": ["executed"],
  25174. "additionalProperties": false
  25175. }
  25176. },
  25177. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25178. "additionalProperties": false
  25179. }
  25180. },
  25181. "required": ["id", "type", "properties"],
  25182. "additionalProperties": false
  25183. },
  25184. "EventSessionNextToolProgress": {
  25185. "type": "object",
  25186. "properties": {
  25187. "id": {
  25188. "type": "string"
  25189. },
  25190. "type": {
  25191. "type": "string",
  25192. "enum": ["session.next.tool.progress"]
  25193. },
  25194. "properties": {
  25195. "type": "object",
  25196. "properties": {
  25197. "timestamp": {
  25198. "type": "number"
  25199. },
  25200. "sessionID": {
  25201. "type": "string",
  25202. "pattern": "^ses"
  25203. },
  25204. "assistantMessageID": {
  25205. "type": "string"
  25206. },
  25207. "callID": {
  25208. "type": "string"
  25209. },
  25210. "structured": {
  25211. "type": "object"
  25212. },
  25213. "content": {
  25214. "type": "array",
  25215. "items": {
  25216. "anyOf": [
  25217. {
  25218. "$ref": "#/components/schemas/ToolTextContent"
  25219. },
  25220. {
  25221. "$ref": "#/components/schemas/ToolFileContent"
  25222. }
  25223. ]
  25224. }
  25225. }
  25226. },
  25227. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25228. "additionalProperties": false
  25229. }
  25230. },
  25231. "required": ["id", "type", "properties"],
  25232. "additionalProperties": false
  25233. },
  25234. "EventSessionNextToolSuccess": {
  25235. "type": "object",
  25236. "properties": {
  25237. "id": {
  25238. "type": "string"
  25239. },
  25240. "type": {
  25241. "type": "string",
  25242. "enum": ["session.next.tool.success"]
  25243. },
  25244. "properties": {
  25245. "type": "object",
  25246. "properties": {
  25247. "timestamp": {
  25248. "type": "number"
  25249. },
  25250. "sessionID": {
  25251. "type": "string",
  25252. "pattern": "^ses"
  25253. },
  25254. "assistantMessageID": {
  25255. "type": "string"
  25256. },
  25257. "callID": {
  25258. "type": "string"
  25259. },
  25260. "structured": {
  25261. "type": "object"
  25262. },
  25263. "content": {
  25264. "type": "array",
  25265. "items": {
  25266. "anyOf": [
  25267. {
  25268. "$ref": "#/components/schemas/ToolTextContent"
  25269. },
  25270. {
  25271. "$ref": "#/components/schemas/ToolFileContent"
  25272. }
  25273. ]
  25274. }
  25275. },
  25276. "result": {},
  25277. "provider": {
  25278. "type": "object",
  25279. "properties": {
  25280. "executed": {
  25281. "type": "boolean"
  25282. },
  25283. "metadata": {
  25284. "type": "object",
  25285. "additionalProperties": {
  25286. "type": "object"
  25287. }
  25288. }
  25289. },
  25290. "required": ["executed"],
  25291. "additionalProperties": false
  25292. }
  25293. },
  25294. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  25295. "additionalProperties": false
  25296. }
  25297. },
  25298. "required": ["id", "type", "properties"],
  25299. "additionalProperties": false
  25300. },
  25301. "EventSessionNextToolFailed": {
  25302. "type": "object",
  25303. "properties": {
  25304. "id": {
  25305. "type": "string"
  25306. },
  25307. "type": {
  25308. "type": "string",
  25309. "enum": ["session.next.tool.failed"]
  25310. },
  25311. "properties": {
  25312. "type": "object",
  25313. "properties": {
  25314. "timestamp": {
  25315. "type": "number"
  25316. },
  25317. "sessionID": {
  25318. "type": "string",
  25319. "pattern": "^ses"
  25320. },
  25321. "assistantMessageID": {
  25322. "type": "string"
  25323. },
  25324. "callID": {
  25325. "type": "string"
  25326. },
  25327. "error": {
  25328. "$ref": "#/components/schemas/SessionErrorUnknown"
  25329. },
  25330. "result": {},
  25331. "provider": {
  25332. "type": "object",
  25333. "properties": {
  25334. "executed": {
  25335. "type": "boolean"
  25336. },
  25337. "metadata": {
  25338. "type": "object",
  25339. "additionalProperties": {
  25340. "type": "object"
  25341. }
  25342. }
  25343. },
  25344. "required": ["executed"],
  25345. "additionalProperties": false
  25346. }
  25347. },
  25348. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25349. "additionalProperties": false
  25350. }
  25351. },
  25352. "required": ["id", "type", "properties"],
  25353. "additionalProperties": false
  25354. },
  25355. "EventSessionNextRetried": {
  25356. "type": "object",
  25357. "properties": {
  25358. "id": {
  25359. "type": "string"
  25360. },
  25361. "type": {
  25362. "type": "string",
  25363. "enum": ["session.next.retried"]
  25364. },
  25365. "properties": {
  25366. "type": "object",
  25367. "properties": {
  25368. "timestamp": {
  25369. "type": "number"
  25370. },
  25371. "sessionID": {
  25372. "type": "string",
  25373. "pattern": "^ses"
  25374. },
  25375. "attempt": {
  25376. "type": "number"
  25377. },
  25378. "error": {
  25379. "$ref": "#/components/schemas/SessionNextRetry_error"
  25380. }
  25381. },
  25382. "required": ["timestamp", "sessionID", "attempt", "error"],
  25383. "additionalProperties": false
  25384. }
  25385. },
  25386. "required": ["id", "type", "properties"],
  25387. "additionalProperties": false
  25388. },
  25389. "EventSessionNextCompactionStarted": {
  25390. "type": "object",
  25391. "properties": {
  25392. "id": {
  25393. "type": "string"
  25394. },
  25395. "type": {
  25396. "type": "string",
  25397. "enum": ["session.next.compaction.started"]
  25398. },
  25399. "properties": {
  25400. "type": "object",
  25401. "properties": {
  25402. "timestamp": {
  25403. "type": "number"
  25404. },
  25405. "sessionID": {
  25406. "type": "string",
  25407. "pattern": "^ses"
  25408. },
  25409. "reason": {
  25410. "type": "string",
  25411. "enum": ["auto", "manual"]
  25412. }
  25413. },
  25414. "required": ["timestamp", "sessionID", "reason"],
  25415. "additionalProperties": false
  25416. }
  25417. },
  25418. "required": ["id", "type", "properties"],
  25419. "additionalProperties": false
  25420. },
  25421. "EventSessionNextCompactionDelta": {
  25422. "type": "object",
  25423. "properties": {
  25424. "id": {
  25425. "type": "string"
  25426. },
  25427. "type": {
  25428. "type": "string",
  25429. "enum": ["session.next.compaction.delta"]
  25430. },
  25431. "properties": {
  25432. "type": "object",
  25433. "properties": {
  25434. "timestamp": {
  25435. "type": "number"
  25436. },
  25437. "sessionID": {
  25438. "type": "string",
  25439. "pattern": "^ses"
  25440. },
  25441. "text": {
  25442. "type": "string"
  25443. }
  25444. },
  25445. "required": ["timestamp", "sessionID", "text"],
  25446. "additionalProperties": false
  25447. }
  25448. },
  25449. "required": ["id", "type", "properties"],
  25450. "additionalProperties": false
  25451. },
  25452. "EventSessionNextCompactionEnded": {
  25453. "type": "object",
  25454. "properties": {
  25455. "id": {
  25456. "type": "string"
  25457. },
  25458. "type": {
  25459. "type": "string",
  25460. "enum": ["session.next.compaction.ended"]
  25461. },
  25462. "properties": {
  25463. "type": "object",
  25464. "properties": {
  25465. "timestamp": {
  25466. "type": "number"
  25467. },
  25468. "sessionID": {
  25469. "type": "string",
  25470. "pattern": "^ses"
  25471. },
  25472. "text": {
  25473. "type": "string"
  25474. },
  25475. "include": {
  25476. "type": "string"
  25477. }
  25478. },
  25479. "required": ["timestamp", "sessionID", "text"],
  25480. "additionalProperties": false
  25481. }
  25482. },
  25483. "required": ["id", "type", "properties"],
  25484. "additionalProperties": false
  25485. },
  25486. "EventMessagePartDelta": {
  25487. "type": "object",
  25488. "properties": {
  25489. "id": {
  25490. "type": "string"
  25491. },
  25492. "type": {
  25493. "type": "string",
  25494. "enum": ["message.part.delta"]
  25495. },
  25496. "properties": {
  25497. "type": "object",
  25498. "properties": {
  25499. "sessionID": {
  25500. "type": "string",
  25501. "pattern": "^ses"
  25502. },
  25503. "messageID": {
  25504. "type": "string",
  25505. "pattern": "^msg"
  25506. },
  25507. "partID": {
  25508. "type": "string",
  25509. "pattern": "^prt"
  25510. },
  25511. "field": {
  25512. "type": "string"
  25513. },
  25514. "delta": {
  25515. "type": "string"
  25516. }
  25517. },
  25518. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  25519. "additionalProperties": false
  25520. }
  25521. },
  25522. "required": ["id", "type", "properties"],
  25523. "additionalProperties": false
  25524. },
  25525. "EventSessionDiff": {
  25526. "type": "object",
  25527. "properties": {
  25528. "id": {
  25529. "type": "string"
  25530. },
  25531. "type": {
  25532. "type": "string",
  25533. "enum": ["session.diff"]
  25534. },
  25535. "properties": {
  25536. "type": "object",
  25537. "properties": {
  25538. "sessionID": {
  25539. "type": "string",
  25540. "pattern": "^ses"
  25541. },
  25542. "diff": {
  25543. "type": "array",
  25544. "items": {
  25545. "$ref": "#/components/schemas/SnapshotFileDiff"
  25546. }
  25547. }
  25548. },
  25549. "required": ["sessionID", "diff"],
  25550. "additionalProperties": false
  25551. }
  25552. },
  25553. "required": ["id", "type", "properties"],
  25554. "additionalProperties": false
  25555. },
  25556. "EventSessionError": {
  25557. "type": "object",
  25558. "properties": {
  25559. "id": {
  25560. "type": "string"
  25561. },
  25562. "type": {
  25563. "type": "string",
  25564. "enum": ["session.error"]
  25565. },
  25566. "properties": {
  25567. "type": "object",
  25568. "properties": {
  25569. "sessionID": {
  25570. "type": "string",
  25571. "pattern": "^ses"
  25572. },
  25573. "error": {
  25574. "anyOf": [
  25575. {
  25576. "$ref": "#/components/schemas/ProviderAuthError"
  25577. },
  25578. {
  25579. "$ref": "#/components/schemas/UnknownError"
  25580. },
  25581. {
  25582. "$ref": "#/components/schemas/MessageOutputLengthError"
  25583. },
  25584. {
  25585. "$ref": "#/components/schemas/MessageAbortedError"
  25586. },
  25587. {
  25588. "$ref": "#/components/schemas/StructuredOutputError"
  25589. },
  25590. {
  25591. "$ref": "#/components/schemas/ContextOverflowError"
  25592. },
  25593. {
  25594. "$ref": "#/components/schemas/APIError"
  25595. }
  25596. ]
  25597. }
  25598. },
  25599. "additionalProperties": false
  25600. }
  25601. },
  25602. "required": ["id", "type", "properties"],
  25603. "additionalProperties": false
  25604. },
  25605. "EventInstallationUpdated": {
  25606. "type": "object",
  25607. "properties": {
  25608. "id": {
  25609. "type": "string"
  25610. },
  25611. "type": {
  25612. "type": "string",
  25613. "enum": ["installation.updated"]
  25614. },
  25615. "properties": {
  25616. "type": "object",
  25617. "properties": {
  25618. "version": {
  25619. "type": "string"
  25620. }
  25621. },
  25622. "required": ["version"],
  25623. "additionalProperties": false
  25624. }
  25625. },
  25626. "required": ["id", "type", "properties"],
  25627. "additionalProperties": false
  25628. },
  25629. "EventInstallationUpdate-available": {
  25630. "type": "object",
  25631. "properties": {
  25632. "id": {
  25633. "type": "string"
  25634. },
  25635. "type": {
  25636. "type": "string",
  25637. "enum": ["installation.update-available"]
  25638. },
  25639. "properties": {
  25640. "type": "object",
  25641. "properties": {
  25642. "version": {
  25643. "type": "string"
  25644. }
  25645. },
  25646. "required": ["version"],
  25647. "additionalProperties": false
  25648. }
  25649. },
  25650. "required": ["id", "type", "properties"],
  25651. "additionalProperties": false
  25652. },
  25653. "EventFileEdited": {
  25654. "type": "object",
  25655. "properties": {
  25656. "id": {
  25657. "type": "string"
  25658. },
  25659. "type": {
  25660. "type": "string",
  25661. "enum": ["file.edited"]
  25662. },
  25663. "properties": {
  25664. "type": "object",
  25665. "properties": {
  25666. "file": {
  25667. "type": "string"
  25668. }
  25669. },
  25670. "required": ["file"],
  25671. "additionalProperties": false
  25672. }
  25673. },
  25674. "required": ["id", "type", "properties"],
  25675. "additionalProperties": false
  25676. },
  25677. "EventAccountAdded": {
  25678. "type": "object",
  25679. "properties": {
  25680. "id": {
  25681. "type": "string"
  25682. },
  25683. "type": {
  25684. "type": "string",
  25685. "enum": ["account.added"]
  25686. },
  25687. "properties": {
  25688. "type": "object",
  25689. "properties": {
  25690. "account": {
  25691. "$ref": "#/components/schemas/AuthInfo"
  25692. }
  25693. },
  25694. "required": ["account"],
  25695. "additionalProperties": false
  25696. }
  25697. },
  25698. "required": ["id", "type", "properties"],
  25699. "additionalProperties": false
  25700. },
  25701. "EventAccountRemoved": {
  25702. "type": "object",
  25703. "properties": {
  25704. "id": {
  25705. "type": "string"
  25706. },
  25707. "type": {
  25708. "type": "string",
  25709. "enum": ["account.removed"]
  25710. },
  25711. "properties": {
  25712. "type": "object",
  25713. "properties": {
  25714. "account": {
  25715. "$ref": "#/components/schemas/AuthInfo"
  25716. }
  25717. },
  25718. "required": ["account"],
  25719. "additionalProperties": false
  25720. }
  25721. },
  25722. "required": ["id", "type", "properties"],
  25723. "additionalProperties": false
  25724. },
  25725. "EventAccountSwitched": {
  25726. "type": "object",
  25727. "properties": {
  25728. "id": {
  25729. "type": "string"
  25730. },
  25731. "type": {
  25732. "type": "string",
  25733. "enum": ["account.switched"]
  25734. },
  25735. "properties": {
  25736. "type": "object",
  25737. "properties": {
  25738. "serviceID": {
  25739. "type": "string"
  25740. },
  25741. "from": {
  25742. "type": "string"
  25743. },
  25744. "to": {
  25745. "type": "string"
  25746. }
  25747. },
  25748. "required": ["serviceID"],
  25749. "additionalProperties": false
  25750. }
  25751. },
  25752. "required": ["id", "type", "properties"],
  25753. "additionalProperties": false
  25754. },
  25755. "EventPermissionV2Asked": {
  25756. "type": "object",
  25757. "properties": {
  25758. "id": {
  25759. "type": "string"
  25760. },
  25761. "type": {
  25762. "type": "string",
  25763. "enum": ["permission.v2.asked"]
  25764. },
  25765. "properties": {
  25766. "type": "object",
  25767. "properties": {
  25768. "id": {
  25769. "type": "string",
  25770. "pattern": "^per"
  25771. },
  25772. "sessionID": {
  25773. "type": "string",
  25774. "pattern": "^ses"
  25775. },
  25776. "action": {
  25777. "type": "string"
  25778. },
  25779. "resources": {
  25780. "type": "array",
  25781. "items": {
  25782. "type": "string"
  25783. }
  25784. },
  25785. "save": {
  25786. "type": "array",
  25787. "items": {
  25788. "type": "string"
  25789. }
  25790. },
  25791. "metadata": {
  25792. "type": "object"
  25793. },
  25794. "source": {
  25795. "$ref": "#/components/schemas/PermissionV2Source"
  25796. }
  25797. },
  25798. "required": ["id", "sessionID", "action", "resources"],
  25799. "additionalProperties": false
  25800. }
  25801. },
  25802. "required": ["id", "type", "properties"],
  25803. "additionalProperties": false
  25804. },
  25805. "EventPermissionV2Replied": {
  25806. "type": "object",
  25807. "properties": {
  25808. "id": {
  25809. "type": "string"
  25810. },
  25811. "type": {
  25812. "type": "string",
  25813. "enum": ["permission.v2.replied"]
  25814. },
  25815. "properties": {
  25816. "type": "object",
  25817. "properties": {
  25818. "sessionID": {
  25819. "type": "string",
  25820. "pattern": "^ses"
  25821. },
  25822. "requestID": {
  25823. "type": "string",
  25824. "pattern": "^per"
  25825. },
  25826. "reply": {
  25827. "$ref": "#/components/schemas/PermissionV2Reply"
  25828. }
  25829. },
  25830. "required": ["sessionID", "requestID", "reply"],
  25831. "additionalProperties": false
  25832. }
  25833. },
  25834. "required": ["id", "type", "properties"],
  25835. "additionalProperties": false
  25836. },
  25837. "EventFileWatcherUpdated": {
  25838. "type": "object",
  25839. "properties": {
  25840. "id": {
  25841. "type": "string"
  25842. },
  25843. "type": {
  25844. "type": "string",
  25845. "enum": ["file.watcher.updated"]
  25846. },
  25847. "properties": {
  25848. "type": "object",
  25849. "properties": {
  25850. "file": {
  25851. "type": "string"
  25852. },
  25853. "event": {
  25854. "type": "string",
  25855. "enum": ["add", "change", "unlink"]
  25856. }
  25857. },
  25858. "required": ["file", "event"],
  25859. "additionalProperties": false
  25860. }
  25861. },
  25862. "required": ["id", "type", "properties"],
  25863. "additionalProperties": false
  25864. },
  25865. "EventPtyCreated": {
  25866. "type": "object",
  25867. "properties": {
  25868. "id": {
  25869. "type": "string"
  25870. },
  25871. "type": {
  25872. "type": "string",
  25873. "enum": ["pty.created"]
  25874. },
  25875. "properties": {
  25876. "type": "object",
  25877. "properties": {
  25878. "info": {
  25879. "$ref": "#/components/schemas/Pty"
  25880. }
  25881. },
  25882. "required": ["info"],
  25883. "additionalProperties": false
  25884. }
  25885. },
  25886. "required": ["id", "type", "properties"],
  25887. "additionalProperties": false
  25888. },
  25889. "EventPtyUpdated": {
  25890. "type": "object",
  25891. "properties": {
  25892. "id": {
  25893. "type": "string"
  25894. },
  25895. "type": {
  25896. "type": "string",
  25897. "enum": ["pty.updated"]
  25898. },
  25899. "properties": {
  25900. "type": "object",
  25901. "properties": {
  25902. "info": {
  25903. "$ref": "#/components/schemas/Pty"
  25904. }
  25905. },
  25906. "required": ["info"],
  25907. "additionalProperties": false
  25908. }
  25909. },
  25910. "required": ["id", "type", "properties"],
  25911. "additionalProperties": false
  25912. },
  25913. "EventPtyExited": {
  25914. "type": "object",
  25915. "properties": {
  25916. "id": {
  25917. "type": "string"
  25918. },
  25919. "type": {
  25920. "type": "string",
  25921. "enum": ["pty.exited"]
  25922. },
  25923. "properties": {
  25924. "type": "object",
  25925. "properties": {
  25926. "id": {
  25927. "type": "string",
  25928. "pattern": "^pty"
  25929. },
  25930. "exitCode": {
  25931. "type": "integer",
  25932. "minimum": 0
  25933. }
  25934. },
  25935. "required": ["id", "exitCode"],
  25936. "additionalProperties": false
  25937. }
  25938. },
  25939. "required": ["id", "type", "properties"],
  25940. "additionalProperties": false
  25941. },
  25942. "EventPtyDeleted": {
  25943. "type": "object",
  25944. "properties": {
  25945. "id": {
  25946. "type": "string"
  25947. },
  25948. "type": {
  25949. "type": "string",
  25950. "enum": ["pty.deleted"]
  25951. },
  25952. "properties": {
  25953. "type": "object",
  25954. "properties": {
  25955. "id": {
  25956. "type": "string",
  25957. "pattern": "^pty"
  25958. }
  25959. },
  25960. "required": ["id"],
  25961. "additionalProperties": false
  25962. }
  25963. },
  25964. "required": ["id", "type", "properties"],
  25965. "additionalProperties": false
  25966. },
  25967. "EventQuestionV2Asked": {
  25968. "type": "object",
  25969. "properties": {
  25970. "id": {
  25971. "type": "string"
  25972. },
  25973. "type": {
  25974. "type": "string",
  25975. "enum": ["question.v2.asked"]
  25976. },
  25977. "properties": {
  25978. "type": "object",
  25979. "properties": {
  25980. "id": {
  25981. "type": "string",
  25982. "pattern": "^que"
  25983. },
  25984. "sessionID": {
  25985. "type": "string",
  25986. "pattern": "^ses"
  25987. },
  25988. "questions": {
  25989. "type": "array",
  25990. "items": {
  25991. "$ref": "#/components/schemas/QuestionV2Info"
  25992. },
  25993. "description": "Questions to ask"
  25994. },
  25995. "tool": {
  25996. "$ref": "#/components/schemas/QuestionV2Tool"
  25997. }
  25998. },
  25999. "required": ["id", "sessionID", "questions"],
  26000. "additionalProperties": false
  26001. }
  26002. },
  26003. "required": ["id", "type", "properties"],
  26004. "additionalProperties": false
  26005. },
  26006. "EventQuestionV2Replied": {
  26007. "type": "object",
  26008. "properties": {
  26009. "id": {
  26010. "type": "string"
  26011. },
  26012. "type": {
  26013. "type": "string",
  26014. "enum": ["question.v2.replied"]
  26015. },
  26016. "properties": {
  26017. "type": "object",
  26018. "properties": {
  26019. "sessionID": {
  26020. "type": "string",
  26021. "pattern": "^ses"
  26022. },
  26023. "requestID": {
  26024. "type": "string",
  26025. "pattern": "^que"
  26026. },
  26027. "answers": {
  26028. "type": "array",
  26029. "items": {
  26030. "$ref": "#/components/schemas/QuestionV2Answer"
  26031. }
  26032. }
  26033. },
  26034. "required": ["sessionID", "requestID", "answers"],
  26035. "additionalProperties": false
  26036. }
  26037. },
  26038. "required": ["id", "type", "properties"],
  26039. "additionalProperties": false
  26040. },
  26041. "EventQuestionV2Rejected": {
  26042. "type": "object",
  26043. "properties": {
  26044. "id": {
  26045. "type": "string"
  26046. },
  26047. "type": {
  26048. "type": "string",
  26049. "enum": ["question.v2.rejected"]
  26050. },
  26051. "properties": {
  26052. "type": "object",
  26053. "properties": {
  26054. "sessionID": {
  26055. "type": "string",
  26056. "pattern": "^ses"
  26057. },
  26058. "requestID": {
  26059. "type": "string",
  26060. "pattern": "^que"
  26061. }
  26062. },
  26063. "required": ["sessionID", "requestID"],
  26064. "additionalProperties": false
  26065. }
  26066. },
  26067. "required": ["id", "type", "properties"],
  26068. "additionalProperties": false
  26069. },
  26070. "EventTodoUpdated": {
  26071. "type": "object",
  26072. "properties": {
  26073. "id": {
  26074. "type": "string"
  26075. },
  26076. "type": {
  26077. "type": "string",
  26078. "enum": ["todo.updated"]
  26079. },
  26080. "properties": {
  26081. "type": "object",
  26082. "properties": {
  26083. "sessionID": {
  26084. "type": "string",
  26085. "pattern": "^ses"
  26086. },
  26087. "todos": {
  26088. "type": "array",
  26089. "items": {
  26090. "$ref": "#/components/schemas/Todo"
  26091. }
  26092. }
  26093. },
  26094. "required": ["sessionID", "todos"],
  26095. "additionalProperties": false
  26096. }
  26097. },
  26098. "required": ["id", "type", "properties"],
  26099. "additionalProperties": false
  26100. },
  26101. "EventLspUpdated": {
  26102. "type": "object",
  26103. "properties": {
  26104. "id": {
  26105. "type": "string"
  26106. },
  26107. "type": {
  26108. "type": "string",
  26109. "enum": ["lsp.updated"]
  26110. },
  26111. "properties": {
  26112. "type": "object",
  26113. "properties": {}
  26114. }
  26115. },
  26116. "required": ["id", "type", "properties"],
  26117. "additionalProperties": false
  26118. },
  26119. "EventPermissionAsked": {
  26120. "type": "object",
  26121. "properties": {
  26122. "id": {
  26123. "type": "string"
  26124. },
  26125. "type": {
  26126. "type": "string",
  26127. "enum": ["permission.asked"]
  26128. },
  26129. "properties": {
  26130. "type": "object",
  26131. "properties": {
  26132. "id": {
  26133. "type": "string",
  26134. "pattern": "^per"
  26135. },
  26136. "sessionID": {
  26137. "type": "string",
  26138. "pattern": "^ses"
  26139. },
  26140. "permission": {
  26141. "type": "string"
  26142. },
  26143. "patterns": {
  26144. "type": "array",
  26145. "items": {
  26146. "type": "string"
  26147. }
  26148. },
  26149. "metadata": {
  26150. "type": "object"
  26151. },
  26152. "always": {
  26153. "type": "array",
  26154. "items": {
  26155. "type": "string"
  26156. }
  26157. },
  26158. "tool": {
  26159. "type": "object",
  26160. "properties": {
  26161. "messageID": {
  26162. "type": "string"
  26163. },
  26164. "callID": {
  26165. "type": "string"
  26166. }
  26167. },
  26168. "required": ["messageID", "callID"],
  26169. "additionalProperties": false
  26170. }
  26171. },
  26172. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  26173. "additionalProperties": false
  26174. }
  26175. },
  26176. "required": ["id", "type", "properties"],
  26177. "additionalProperties": false
  26178. },
  26179. "EventPermissionReplied": {
  26180. "type": "object",
  26181. "properties": {
  26182. "id": {
  26183. "type": "string"
  26184. },
  26185. "type": {
  26186. "type": "string",
  26187. "enum": ["permission.replied"]
  26188. },
  26189. "properties": {
  26190. "type": "object",
  26191. "properties": {
  26192. "sessionID": {
  26193. "type": "string",
  26194. "pattern": "^ses"
  26195. },
  26196. "requestID": {
  26197. "type": "string",
  26198. "pattern": "^per"
  26199. },
  26200. "reply": {
  26201. "type": "string",
  26202. "enum": ["once", "always", "reject"]
  26203. }
  26204. },
  26205. "required": ["sessionID", "requestID", "reply"],
  26206. "additionalProperties": false
  26207. }
  26208. },
  26209. "required": ["id", "type", "properties"],
  26210. "additionalProperties": false
  26211. },
  26212. "EventMcpToolsChanged": {
  26213. "type": "object",
  26214. "properties": {
  26215. "id": {
  26216. "type": "string"
  26217. },
  26218. "type": {
  26219. "type": "string",
  26220. "enum": ["mcp.tools.changed"]
  26221. },
  26222. "properties": {
  26223. "type": "object",
  26224. "properties": {
  26225. "server": {
  26226. "type": "string"
  26227. }
  26228. },
  26229. "required": ["server"],
  26230. "additionalProperties": false
  26231. }
  26232. },
  26233. "required": ["id", "type", "properties"],
  26234. "additionalProperties": false
  26235. },
  26236. "EventMcpBrowserOpenFailed": {
  26237. "type": "object",
  26238. "properties": {
  26239. "id": {
  26240. "type": "string"
  26241. },
  26242. "type": {
  26243. "type": "string",
  26244. "enum": ["mcp.browser.open.failed"]
  26245. },
  26246. "properties": {
  26247. "type": "object",
  26248. "properties": {
  26249. "mcpName": {
  26250. "type": "string"
  26251. },
  26252. "url": {
  26253. "type": "string"
  26254. }
  26255. },
  26256. "required": ["mcpName", "url"],
  26257. "additionalProperties": false
  26258. }
  26259. },
  26260. "required": ["id", "type", "properties"],
  26261. "additionalProperties": false
  26262. },
  26263. "EventCommandExecuted": {
  26264. "type": "object",
  26265. "properties": {
  26266. "id": {
  26267. "type": "string"
  26268. },
  26269. "type": {
  26270. "type": "string",
  26271. "enum": ["command.executed"]
  26272. },
  26273. "properties": {
  26274. "type": "object",
  26275. "properties": {
  26276. "name": {
  26277. "type": "string"
  26278. },
  26279. "sessionID": {
  26280. "type": "string",
  26281. "pattern": "^ses"
  26282. },
  26283. "arguments": {
  26284. "type": "string"
  26285. },
  26286. "messageID": {
  26287. "type": "string",
  26288. "pattern": "^msg"
  26289. }
  26290. },
  26291. "required": ["name", "sessionID", "arguments", "messageID"],
  26292. "additionalProperties": false
  26293. }
  26294. },
  26295. "required": ["id", "type", "properties"],
  26296. "additionalProperties": false
  26297. },
  26298. "EventProjectDirectoriesUpdated": {
  26299. "type": "object",
  26300. "properties": {
  26301. "id": {
  26302. "type": "string"
  26303. },
  26304. "type": {
  26305. "type": "string",
  26306. "enum": ["project.directories.updated"]
  26307. },
  26308. "properties": {
  26309. "type": "object",
  26310. "properties": {
  26311. "projectID": {
  26312. "type": "string"
  26313. }
  26314. },
  26315. "required": ["projectID"],
  26316. "additionalProperties": false
  26317. }
  26318. },
  26319. "required": ["id", "type", "properties"],
  26320. "additionalProperties": false
  26321. },
  26322. "EventProjectUpdated": {
  26323. "type": "object",
  26324. "properties": {
  26325. "id": {
  26326. "type": "string"
  26327. },
  26328. "type": {
  26329. "type": "string",
  26330. "enum": ["project.updated"]
  26331. },
  26332. "properties": {
  26333. "type": "object",
  26334. "properties": {
  26335. "id": {
  26336. "type": "string"
  26337. },
  26338. "worktree": {
  26339. "type": "string"
  26340. },
  26341. "vcs": {
  26342. "type": "string",
  26343. "enum": ["git"]
  26344. },
  26345. "name": {
  26346. "type": "string"
  26347. },
  26348. "icon": {
  26349. "type": "object",
  26350. "properties": {
  26351. "url": {
  26352. "type": "string"
  26353. },
  26354. "override": {
  26355. "type": "string"
  26356. },
  26357. "color": {
  26358. "type": "string"
  26359. }
  26360. },
  26361. "additionalProperties": false
  26362. },
  26363. "commands": {
  26364. "type": "object",
  26365. "properties": {
  26366. "start": {
  26367. "type": "string",
  26368. "description": "Startup script to run when creating a new workspace (worktree)"
  26369. }
  26370. },
  26371. "additionalProperties": false
  26372. },
  26373. "time": {
  26374. "type": "object",
  26375. "properties": {
  26376. "created": {
  26377. "type": "integer",
  26378. "minimum": 0
  26379. },
  26380. "updated": {
  26381. "type": "integer",
  26382. "minimum": 0
  26383. },
  26384. "initialized": {
  26385. "type": "integer",
  26386. "minimum": 0
  26387. }
  26388. },
  26389. "required": ["created", "updated"],
  26390. "additionalProperties": false
  26391. },
  26392. "sandboxes": {
  26393. "type": "array",
  26394. "items": {
  26395. "type": "string"
  26396. }
  26397. }
  26398. },
  26399. "required": ["id", "worktree", "time", "sandboxes"],
  26400. "additionalProperties": false
  26401. }
  26402. },
  26403. "required": ["id", "type", "properties"],
  26404. "additionalProperties": false
  26405. },
  26406. "EventQuestionAsked": {
  26407. "type": "object",
  26408. "properties": {
  26409. "id": {
  26410. "type": "string"
  26411. },
  26412. "type": {
  26413. "type": "string",
  26414. "enum": ["question.asked"]
  26415. },
  26416. "properties": {
  26417. "type": "object",
  26418. "properties": {
  26419. "id": {
  26420. "type": "string",
  26421. "pattern": "^que"
  26422. },
  26423. "sessionID": {
  26424. "type": "string",
  26425. "pattern": "^ses"
  26426. },
  26427. "questions": {
  26428. "type": "array",
  26429. "items": {
  26430. "$ref": "#/components/schemas/QuestionInfo"
  26431. },
  26432. "description": "Questions to ask"
  26433. },
  26434. "tool": {
  26435. "$ref": "#/components/schemas/QuestionTool"
  26436. }
  26437. },
  26438. "required": ["id", "sessionID", "questions"],
  26439. "additionalProperties": false
  26440. }
  26441. },
  26442. "required": ["id", "type", "properties"],
  26443. "additionalProperties": false
  26444. },
  26445. "EventQuestionReplied": {
  26446. "type": "object",
  26447. "properties": {
  26448. "id": {
  26449. "type": "string"
  26450. },
  26451. "type": {
  26452. "type": "string",
  26453. "enum": ["question.replied"]
  26454. },
  26455. "properties": {
  26456. "type": "object",
  26457. "properties": {
  26458. "sessionID": {
  26459. "type": "string",
  26460. "pattern": "^ses"
  26461. },
  26462. "requestID": {
  26463. "type": "string",
  26464. "pattern": "^que"
  26465. },
  26466. "answers": {
  26467. "type": "array",
  26468. "items": {
  26469. "$ref": "#/components/schemas/QuestionAnswer"
  26470. }
  26471. }
  26472. },
  26473. "required": ["sessionID", "requestID", "answers"],
  26474. "additionalProperties": false
  26475. }
  26476. },
  26477. "required": ["id", "type", "properties"],
  26478. "additionalProperties": false
  26479. },
  26480. "EventQuestionRejected": {
  26481. "type": "object",
  26482. "properties": {
  26483. "id": {
  26484. "type": "string"
  26485. },
  26486. "type": {
  26487. "type": "string",
  26488. "enum": ["question.rejected"]
  26489. },
  26490. "properties": {
  26491. "type": "object",
  26492. "properties": {
  26493. "sessionID": {
  26494. "type": "string",
  26495. "pattern": "^ses"
  26496. },
  26497. "requestID": {
  26498. "type": "string",
  26499. "pattern": "^que"
  26500. }
  26501. },
  26502. "required": ["sessionID", "requestID"],
  26503. "additionalProperties": false
  26504. }
  26505. },
  26506. "required": ["id", "type", "properties"],
  26507. "additionalProperties": false
  26508. },
  26509. "EventSessionStatus": {
  26510. "type": "object",
  26511. "properties": {
  26512. "id": {
  26513. "type": "string"
  26514. },
  26515. "type": {
  26516. "type": "string",
  26517. "enum": ["session.status"]
  26518. },
  26519. "properties": {
  26520. "type": "object",
  26521. "properties": {
  26522. "sessionID": {
  26523. "type": "string",
  26524. "pattern": "^ses"
  26525. },
  26526. "status": {
  26527. "$ref": "#/components/schemas/SessionStatus"
  26528. }
  26529. },
  26530. "required": ["sessionID", "status"],
  26531. "additionalProperties": false
  26532. }
  26533. },
  26534. "required": ["id", "type", "properties"],
  26535. "additionalProperties": false
  26536. },
  26537. "EventSessionIdle": {
  26538. "type": "object",
  26539. "properties": {
  26540. "id": {
  26541. "type": "string"
  26542. },
  26543. "type": {
  26544. "type": "string",
  26545. "enum": ["session.idle"]
  26546. },
  26547. "properties": {
  26548. "type": "object",
  26549. "properties": {
  26550. "sessionID": {
  26551. "type": "string",
  26552. "pattern": "^ses"
  26553. }
  26554. },
  26555. "required": ["sessionID"],
  26556. "additionalProperties": false
  26557. }
  26558. },
  26559. "required": ["id", "type", "properties"],
  26560. "additionalProperties": false
  26561. },
  26562. "EventSessionCompacted": {
  26563. "type": "object",
  26564. "properties": {
  26565. "id": {
  26566. "type": "string"
  26567. },
  26568. "type": {
  26569. "type": "string",
  26570. "enum": ["session.compacted"]
  26571. },
  26572. "properties": {
  26573. "type": "object",
  26574. "properties": {
  26575. "sessionID": {
  26576. "type": "string",
  26577. "pattern": "^ses"
  26578. }
  26579. },
  26580. "required": ["sessionID"],
  26581. "additionalProperties": false
  26582. }
  26583. },
  26584. "required": ["id", "type", "properties"],
  26585. "additionalProperties": false
  26586. },
  26587. "EventVcsBranchUpdated": {
  26588. "type": "object",
  26589. "properties": {
  26590. "id": {
  26591. "type": "string"
  26592. },
  26593. "type": {
  26594. "type": "string",
  26595. "enum": ["vcs.branch.updated"]
  26596. },
  26597. "properties": {
  26598. "type": "object",
  26599. "properties": {
  26600. "branch": {
  26601. "type": "string"
  26602. }
  26603. },
  26604. "additionalProperties": false
  26605. }
  26606. },
  26607. "required": ["id", "type", "properties"],
  26608. "additionalProperties": false
  26609. },
  26610. "EventWorktreeReady": {
  26611. "type": "object",
  26612. "properties": {
  26613. "id": {
  26614. "type": "string"
  26615. },
  26616. "type": {
  26617. "type": "string",
  26618. "enum": ["worktree.ready"]
  26619. },
  26620. "properties": {
  26621. "type": "object",
  26622. "properties": {
  26623. "name": {
  26624. "type": "string"
  26625. },
  26626. "branch": {
  26627. "type": "string"
  26628. }
  26629. },
  26630. "required": ["name"],
  26631. "additionalProperties": false
  26632. }
  26633. },
  26634. "required": ["id", "type", "properties"],
  26635. "additionalProperties": false
  26636. },
  26637. "EventWorktreeFailed": {
  26638. "type": "object",
  26639. "properties": {
  26640. "id": {
  26641. "type": "string"
  26642. },
  26643. "type": {
  26644. "type": "string",
  26645. "enum": ["worktree.failed"]
  26646. },
  26647. "properties": {
  26648. "type": "object",
  26649. "properties": {
  26650. "message": {
  26651. "type": "string"
  26652. }
  26653. },
  26654. "required": ["message"],
  26655. "additionalProperties": false
  26656. }
  26657. },
  26658. "required": ["id", "type", "properties"],
  26659. "additionalProperties": false
  26660. },
  26661. "EventWorkspaceReady": {
  26662. "type": "object",
  26663. "properties": {
  26664. "id": {
  26665. "type": "string"
  26666. },
  26667. "type": {
  26668. "type": "string",
  26669. "enum": ["workspace.ready"]
  26670. },
  26671. "properties": {
  26672. "type": "object",
  26673. "properties": {
  26674. "name": {
  26675. "type": "string"
  26676. }
  26677. },
  26678. "required": ["name"],
  26679. "additionalProperties": false
  26680. }
  26681. },
  26682. "required": ["id", "type", "properties"],
  26683. "additionalProperties": false
  26684. },
  26685. "EventWorkspaceFailed": {
  26686. "type": "object",
  26687. "properties": {
  26688. "id": {
  26689. "type": "string"
  26690. },
  26691. "type": {
  26692. "type": "string",
  26693. "enum": ["workspace.failed"]
  26694. },
  26695. "properties": {
  26696. "type": "object",
  26697. "properties": {
  26698. "message": {
  26699. "type": "string"
  26700. }
  26701. },
  26702. "required": ["message"],
  26703. "additionalProperties": false
  26704. }
  26705. },
  26706. "required": ["id", "type", "properties"],
  26707. "additionalProperties": false
  26708. },
  26709. "EventWorkspaceStatus": {
  26710. "type": "object",
  26711. "properties": {
  26712. "id": {
  26713. "type": "string"
  26714. },
  26715. "type": {
  26716. "type": "string",
  26717. "enum": ["workspace.status"]
  26718. },
  26719. "properties": {
  26720. "type": "object",
  26721. "properties": {
  26722. "workspaceID": {
  26723. "type": "string",
  26724. "pattern": "^wrk"
  26725. },
  26726. "status": {
  26727. "type": "string",
  26728. "enum": ["connected", "connecting", "disconnected", "error"]
  26729. }
  26730. },
  26731. "required": ["workspaceID", "status"],
  26732. "additionalProperties": false
  26733. }
  26734. },
  26735. "required": ["id", "type", "properties"],
  26736. "additionalProperties": false
  26737. },
  26738. "EventServerConnected": {
  26739. "type": "object",
  26740. "properties": {
  26741. "id": {
  26742. "type": "string"
  26743. },
  26744. "type": {
  26745. "type": "string",
  26746. "enum": ["server.connected"]
  26747. },
  26748. "properties": {
  26749. "type": "object",
  26750. "properties": {}
  26751. }
  26752. },
  26753. "required": ["id", "type", "properties"],
  26754. "additionalProperties": false
  26755. },
  26756. "EventGlobalDisposed": {
  26757. "type": "object",
  26758. "properties": {
  26759. "id": {
  26760. "type": "string"
  26761. },
  26762. "type": {
  26763. "type": "string",
  26764. "enum": ["global.disposed"]
  26765. },
  26766. "properties": {
  26767. "type": "object",
  26768. "properties": {}
  26769. }
  26770. },
  26771. "required": ["id", "type", "properties"],
  26772. "additionalProperties": false
  26773. },
  26774. "BadRequestError": {
  26775. "type": "object",
  26776. "required": ["name", "data"],
  26777. "properties": {
  26778. "name": {
  26779. "type": "string",
  26780. "enum": ["BadRequest"]
  26781. },
  26782. "data": {
  26783. "type": "object",
  26784. "required": ["message"],
  26785. "properties": {
  26786. "message": {
  26787. "type": "string"
  26788. },
  26789. "kind": {
  26790. "type": "string",
  26791. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  26792. }
  26793. }
  26794. }
  26795. }
  26796. }
  26797. }
  26798. },
  26799. "security": [],
  26800. "tags": [
  26801. {
  26802. "name": "control",
  26803. "description": "Control plane routes."
  26804. },
  26805. {
  26806. "name": "controlPlane",
  26807. "description": "Control-plane orchestration routes."
  26808. },
  26809. {
  26810. "name": "global",
  26811. "description": "Global server routes."
  26812. },
  26813. {
  26814. "name": "event",
  26815. "description": "Instance event stream route."
  26816. },
  26817. {
  26818. "name": "config",
  26819. "description": "Experimental HttpApi config routes."
  26820. },
  26821. {
  26822. "name": "experimental",
  26823. "description": "Experimental HttpApi read-only routes."
  26824. },
  26825. {
  26826. "name": "file",
  26827. "description": "Experimental HttpApi file routes."
  26828. },
  26829. {
  26830. "name": "instance",
  26831. "description": "Experimental HttpApi instance read routes."
  26832. },
  26833. {
  26834. "name": "mcp",
  26835. "description": "Experimental HttpApi MCP routes."
  26836. },
  26837. {
  26838. "name": "project",
  26839. "description": "Experimental HttpApi project routes."
  26840. },
  26841. {
  26842. "name": "projectCopy",
  26843. "description": "Project copy management routes."
  26844. },
  26845. {
  26846. "name": "pty",
  26847. "description": "Experimental HttpApi PTY routes."
  26848. },
  26849. {
  26850. "name": "question",
  26851. "description": "Question routes."
  26852. },
  26853. {
  26854. "name": "permission",
  26855. "description": "Experimental HttpApi permission routes."
  26856. },
  26857. {
  26858. "name": "provider",
  26859. "description": "Experimental HttpApi provider routes."
  26860. },
  26861. {
  26862. "name": "session",
  26863. "description": "Experimental HttpApi session routes."
  26864. },
  26865. {
  26866. "name": "sync",
  26867. "description": "Experimental HttpApi sync routes."
  26868. },
  26869. {
  26870. "name": "tui",
  26871. "description": "Experimental HttpApi TUI routes."
  26872. },
  26873. {
  26874. "name": "workspace",
  26875. "description": "Experimental HttpApi workspace routes."
  26876. },
  26877. {
  26878. "name": "opencode experimental HttpApi",
  26879. "description": "Experimental HttpApi surface for selected instance routes."
  26880. },
  26881. {
  26882. "name": "opencode experimental HttpApi",
  26883. "description": "Experimental HttpApi surface for selected instance routes."
  26884. },
  26885. {
  26886. "name": "v2",
  26887. "description": "Experimental v2 routes."
  26888. },
  26889. {
  26890. "name": "v2 messages",
  26891. "description": "Experimental v2 message routes."
  26892. },
  26893. {
  26894. "name": "v2 models",
  26895. "description": "Experimental v2 model routes."
  26896. },
  26897. {
  26898. "name": "v2 providers",
  26899. "description": "Experimental v2 provider routes."
  26900. },
  26901. {
  26902. "name": "v2 permissions",
  26903. "description": "Experimental v2 permission routes."
  26904. },
  26905. {
  26906. "name": "v2 session permissions",
  26907. "description": "Experimental v2 session permission routes."
  26908. },
  26909. {
  26910. "name": "v2 saved permissions",
  26911. "description": "Experimental v2 saved permission routes."
  26912. },
  26913. {
  26914. "name": "v2 filesystem",
  26915. "description": "Experimental v2 location-scoped filesystem routes."
  26916. },
  26917. {
  26918. "name": "v2 commands",
  26919. "description": "Experimental v2 command routes."
  26920. },
  26921. {
  26922. "name": "v2 skills",
  26923. "description": "Experimental v2 skill routes."
  26924. },
  26925. {
  26926. "name": "v2 events",
  26927. "description": "Experimental v2 event stream route."
  26928. },
  26929. {
  26930. "name": "v2 questions",
  26931. "description": "Experimental v2 question routes."
  26932. },
  26933. {
  26934. "name": "v2 session questions",
  26935. "description": "Experimental v2 session question routes."
  26936. },
  26937. {
  26938. "name": "pty",
  26939. "description": "PTY websocket route."
  26940. }
  26941. ]
  26942. }