openapi.json 868 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.create",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project copy created",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectCopyCopy"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "ProjectCopyError | InvalidRequestError",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "anyOf": [
  3934. {
  3935. "$ref": "#/components/schemas/ProjectCopyError"
  3936. },
  3937. {
  3938. "$ref": "#/components/schemas/InvalidRequestError"
  3939. }
  3940. ]
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Create a local physical copy of a project using the selected strategy.",
  3947. "summary": "Create project copy",
  3948. "requestBody": {
  3949. "content": {
  3950. "application/json": {
  3951. "schema": {
  3952. "type": "object",
  3953. "properties": {
  3954. "strategy": {
  3955. "type": "string",
  3956. "enum": ["git_worktree"]
  3957. },
  3958. "directory": {
  3959. "type": "string"
  3960. },
  3961. "name": {
  3962. "type": "string"
  3963. },
  3964. "context": {
  3965. "type": "string"
  3966. }
  3967. },
  3968. "required": ["strategy", "directory"],
  3969. "additionalProperties": false
  3970. }
  3971. }
  3972. }
  3973. },
  3974. "x-codeSamples": [
  3975. {
  3976. "lang": "js",
  3977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3978. }
  3979. ]
  3980. },
  3981. "delete": {
  3982. "tags": ["projectCopy"],
  3983. "operationId": "experimental.projectCopy.remove",
  3984. "parameters": [
  3985. {
  3986. "name": "projectID",
  3987. "in": "path",
  3988. "schema": {
  3989. "type": "string"
  3990. },
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "workspace",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. }
  4001. ],
  4002. "responses": {
  4003. "204": {
  4004. "description": "Project copy removed"
  4005. },
  4006. "400": {
  4007. "description": "ProjectCopyError | InvalidRequestError",
  4008. "content": {
  4009. "application/json": {
  4010. "schema": {
  4011. "anyOf": [
  4012. {
  4013. "$ref": "#/components/schemas/ProjectCopyError"
  4014. },
  4015. {
  4016. "$ref": "#/components/schemas/InvalidRequestError"
  4017. }
  4018. ]
  4019. }
  4020. }
  4021. }
  4022. }
  4023. },
  4024. "description": "Remove a local physical copy of a project using the selected strategy.",
  4025. "summary": "Remove project copy",
  4026. "requestBody": {
  4027. "content": {
  4028. "application/json": {
  4029. "schema": {
  4030. "type": "object",
  4031. "properties": {
  4032. "directory": {
  4033. "type": "string"
  4034. },
  4035. "force": {
  4036. "type": "boolean"
  4037. }
  4038. },
  4039. "required": ["directory", "force"],
  4040. "additionalProperties": false
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "x-codeSamples": [
  4046. {
  4047. "lang": "js",
  4048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4049. }
  4050. ]
  4051. }
  4052. },
  4053. "/experimental/project/{projectID}/copy/refresh": {
  4054. "post": {
  4055. "tags": ["projectCopy"],
  4056. "operationId": "experimental.projectCopy.refresh",
  4057. "parameters": [
  4058. {
  4059. "name": "projectID",
  4060. "in": "path",
  4061. "schema": {
  4062. "type": "string"
  4063. },
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "directory",
  4068. "in": "query",
  4069. "schema": {
  4070. "type": "string"
  4071. },
  4072. "required": false
  4073. },
  4074. {
  4075. "name": "workspace",
  4076. "in": "query",
  4077. "schema": {
  4078. "type": "string"
  4079. },
  4080. "required": false
  4081. }
  4082. ],
  4083. "responses": {
  4084. "204": {
  4085. "description": "Project copies refreshed"
  4086. },
  4087. "400": {
  4088. "description": "ProjectCopyError | InvalidRequestError",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "anyOf": [
  4093. {
  4094. "$ref": "#/components/schemas/ProjectCopyError"
  4095. },
  4096. {
  4097. "$ref": "#/components/schemas/InvalidRequestError"
  4098. }
  4099. ]
  4100. }
  4101. }
  4102. }
  4103. }
  4104. },
  4105. "description": "Discover local project copies using one or all configured strategies.",
  4106. "summary": "Refresh project copies",
  4107. "x-codeSamples": [
  4108. {
  4109. "lang": "js",
  4110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4111. }
  4112. ]
  4113. }
  4114. },
  4115. "/pty/shells": {
  4116. "get": {
  4117. "tags": ["pty"],
  4118. "operationId": "pty.shells",
  4119. "parameters": [
  4120. {
  4121. "name": "directory",
  4122. "in": "query",
  4123. "schema": {
  4124. "type": "string"
  4125. },
  4126. "required": false
  4127. },
  4128. {
  4129. "name": "workspace",
  4130. "in": "query",
  4131. "schema": {
  4132. "type": "string"
  4133. },
  4134. "required": false
  4135. }
  4136. ],
  4137. "responses": {
  4138. "200": {
  4139. "description": "List of shells",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "type": "array",
  4144. "items": {
  4145. "type": "object",
  4146. "properties": {
  4147. "path": {
  4148. "type": "string"
  4149. },
  4150. "name": {
  4151. "type": "string"
  4152. },
  4153. "acceptable": {
  4154. "type": "boolean"
  4155. }
  4156. },
  4157. "required": ["path", "name", "acceptable"],
  4158. "additionalProperties": false
  4159. },
  4160. "description": "List of shells"
  4161. }
  4162. }
  4163. }
  4164. },
  4165. "400": {
  4166. "description": "Bad request",
  4167. "content": {
  4168. "application/json": {
  4169. "schema": {
  4170. "$ref": "#/components/schemas/BadRequestError"
  4171. }
  4172. }
  4173. }
  4174. }
  4175. },
  4176. "description": "Get a list of available shells on the system.",
  4177. "summary": "List available shells",
  4178. "x-codeSamples": [
  4179. {
  4180. "lang": "js",
  4181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4182. }
  4183. ]
  4184. }
  4185. },
  4186. "/pty": {
  4187. "get": {
  4188. "tags": ["pty"],
  4189. "operationId": "pty.list",
  4190. "parameters": [
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "List of sessions",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "type": "array",
  4215. "items": {
  4216. "$ref": "#/components/schemas/Pty"
  4217. },
  4218. "description": "List of sessions"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4235. "summary": "List PTY sessions",
  4236. "x-codeSamples": [
  4237. {
  4238. "lang": "js",
  4239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4240. }
  4241. ]
  4242. },
  4243. "post": {
  4244. "tags": ["pty"],
  4245. "operationId": "pty.create",
  4246. "parameters": [
  4247. {
  4248. "name": "directory",
  4249. "in": "query",
  4250. "schema": {
  4251. "type": "string"
  4252. },
  4253. "required": false
  4254. },
  4255. {
  4256. "name": "workspace",
  4257. "in": "query",
  4258. "schema": {
  4259. "type": "string"
  4260. },
  4261. "required": false
  4262. }
  4263. ],
  4264. "responses": {
  4265. "200": {
  4266. "description": "Created session",
  4267. "content": {
  4268. "application/json": {
  4269. "schema": {
  4270. "$ref": "#/components/schemas/Pty"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "BadRequest | InvalidRequestError",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "anyOf": [
  4281. {
  4282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4283. },
  4284. {
  4285. "$ref": "#/components/schemas/InvalidRequestError"
  4286. }
  4287. ]
  4288. }
  4289. }
  4290. }
  4291. }
  4292. },
  4293. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4294. "summary": "Create PTY session",
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "command": {
  4302. "type": "string"
  4303. },
  4304. "args": {
  4305. "type": "array",
  4306. "items": {
  4307. "type": "string"
  4308. }
  4309. },
  4310. "cwd": {
  4311. "type": "string"
  4312. },
  4313. "title": {
  4314. "type": "string"
  4315. },
  4316. "env": {
  4317. "type": "object",
  4318. "additionalProperties": {
  4319. "type": "string"
  4320. }
  4321. }
  4322. },
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/pty/{ptyID}": {
  4337. "get": {
  4338. "tags": ["pty"],
  4339. "operationId": "pty.get",
  4340. "parameters": [
  4341. {
  4342. "name": "ptyID",
  4343. "in": "path",
  4344. "schema": {
  4345. "type": "string",
  4346. "pattern": "^pty"
  4347. },
  4348. "required": true
  4349. },
  4350. {
  4351. "name": "directory",
  4352. "in": "query",
  4353. "schema": {
  4354. "type": "string"
  4355. },
  4356. "required": false
  4357. },
  4358. {
  4359. "name": "workspace",
  4360. "in": "query",
  4361. "schema": {
  4362. "type": "string"
  4363. },
  4364. "required": false
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "Session info",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Pty"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "PtyNotFoundError",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/PtyNotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4400. "summary": "Get PTY session",
  4401. "x-codeSamples": [
  4402. {
  4403. "lang": "js",
  4404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4405. }
  4406. ]
  4407. },
  4408. "put": {
  4409. "tags": ["pty"],
  4410. "operationId": "pty.update",
  4411. "parameters": [
  4412. {
  4413. "name": "ptyID",
  4414. "in": "path",
  4415. "schema": {
  4416. "type": "string",
  4417. "pattern": "^pty"
  4418. },
  4419. "required": true
  4420. },
  4421. {
  4422. "name": "directory",
  4423. "in": "query",
  4424. "schema": {
  4425. "type": "string"
  4426. },
  4427. "required": false
  4428. },
  4429. {
  4430. "name": "workspace",
  4431. "in": "query",
  4432. "schema": {
  4433. "type": "string"
  4434. },
  4435. "required": false
  4436. }
  4437. ],
  4438. "responses": {
  4439. "200": {
  4440. "description": "Updated session",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "$ref": "#/components/schemas/Pty"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "BadRequest | InvalidRequestError",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "anyOf": [
  4455. {
  4456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4457. },
  4458. {
  4459. "$ref": "#/components/schemas/InvalidRequestError"
  4460. }
  4461. ]
  4462. }
  4463. }
  4464. }
  4465. },
  4466. "404": {
  4467. "description": "PtyNotFoundError",
  4468. "content": {
  4469. "application/json": {
  4470. "schema": {
  4471. "$ref": "#/components/schemas/PtyNotFoundError"
  4472. }
  4473. }
  4474. }
  4475. }
  4476. },
  4477. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4478. "summary": "Update PTY session",
  4479. "requestBody": {
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "type": "object",
  4484. "properties": {
  4485. "title": {
  4486. "type": "string"
  4487. },
  4488. "size": {
  4489. "type": "object",
  4490. "properties": {
  4491. "rows": {
  4492. "type": "integer",
  4493. "exclusiveMinimum": 0
  4494. },
  4495. "cols": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["rows", "cols"],
  4501. "additionalProperties": false
  4502. }
  4503. },
  4504. "additionalProperties": false
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "x-codeSamples": [
  4510. {
  4511. "lang": "js",
  4512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4513. }
  4514. ]
  4515. },
  4516. "delete": {
  4517. "tags": ["pty"],
  4518. "operationId": "pty.remove",
  4519. "parameters": [
  4520. {
  4521. "name": "ptyID",
  4522. "in": "path",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^pty"
  4526. },
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "directory",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. },
  4537. {
  4538. "name": "workspace",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. }
  4545. ],
  4546. "responses": {
  4547. "200": {
  4548. "description": "Session removed",
  4549. "content": {
  4550. "application/json": {
  4551. "schema": {
  4552. "type": "boolean",
  4553. "description": "Session removed"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "400": {
  4559. "description": "Bad request",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/BadRequestError"
  4564. }
  4565. }
  4566. }
  4567. },
  4568. "404": {
  4569. "description": "PtyNotFoundError",
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "$ref": "#/components/schemas/PtyNotFoundError"
  4574. }
  4575. }
  4576. }
  4577. }
  4578. },
  4579. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4580. "summary": "Remove PTY session",
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/pty/{ptyID}/connect-token": {
  4590. "post": {
  4591. "tags": ["pty"],
  4592. "operationId": "pty.connectToken",
  4593. "parameters": [
  4594. {
  4595. "name": "ptyID",
  4596. "in": "path",
  4597. "schema": {
  4598. "type": "string",
  4599. "pattern": "^pty"
  4600. },
  4601. "required": true
  4602. },
  4603. {
  4604. "name": "directory",
  4605. "in": "query",
  4606. "schema": {
  4607. "type": "string"
  4608. },
  4609. "required": false
  4610. },
  4611. {
  4612. "name": "workspace",
  4613. "in": "query",
  4614. "schema": {
  4615. "type": "string"
  4616. },
  4617. "required": false
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "description": "WebSocket connect token",
  4623. "content": {
  4624. "application/json": {
  4625. "schema": {
  4626. "type": "object",
  4627. "properties": {
  4628. "ticket": {
  4629. "type": "string"
  4630. },
  4631. "expires_in": {
  4632. "type": "integer",
  4633. "exclusiveMinimum": 0
  4634. }
  4635. },
  4636. "required": ["ticket", "expires_in"],
  4637. "additionalProperties": false,
  4638. "description": "WebSocket connect token"
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "400": {
  4644. "description": "Bad request",
  4645. "content": {
  4646. "application/json": {
  4647. "schema": {
  4648. "$ref": "#/components/schemas/BadRequestError"
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "403": {
  4654. "description": "PtyForbiddenError",
  4655. "content": {
  4656. "application/json": {
  4657. "schema": {
  4658. "$ref": "#/components/schemas/PtyForbiddenError"
  4659. }
  4660. }
  4661. }
  4662. },
  4663. "404": {
  4664. "description": "PtyNotFoundError",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "$ref": "#/components/schemas/PtyNotFoundError"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4675. "summary": "Create PTY WebSocket token",
  4676. "x-codeSamples": [
  4677. {
  4678. "lang": "js",
  4679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4680. }
  4681. ]
  4682. }
  4683. },
  4684. "/question": {
  4685. "get": {
  4686. "tags": ["question"],
  4687. "operationId": "question.list",
  4688. "parameters": [
  4689. {
  4690. "name": "directory",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. },
  4697. {
  4698. "name": "workspace",
  4699. "in": "query",
  4700. "schema": {
  4701. "type": "string"
  4702. },
  4703. "required": false
  4704. }
  4705. ],
  4706. "responses": {
  4707. "200": {
  4708. "description": "List of pending questions",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionRequest"
  4715. },
  4716. "description": "List of pending questions"
  4717. }
  4718. }
  4719. }
  4720. },
  4721. "400": {
  4722. "description": "Bad request",
  4723. "content": {
  4724. "application/json": {
  4725. "schema": {
  4726. "$ref": "#/components/schemas/BadRequestError"
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "description": "Get all pending question requests across all sessions.",
  4733. "summary": "List pending questions",
  4734. "x-codeSamples": [
  4735. {
  4736. "lang": "js",
  4737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4738. }
  4739. ]
  4740. }
  4741. },
  4742. "/question/{requestID}/reply": {
  4743. "post": {
  4744. "tags": ["question"],
  4745. "operationId": "question.reply",
  4746. "parameters": [
  4747. {
  4748. "name": "requestID",
  4749. "in": "path",
  4750. "schema": {
  4751. "type": "string",
  4752. "pattern": "^que"
  4753. },
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "directory",
  4758. "in": "query",
  4759. "schema": {
  4760. "type": "string"
  4761. },
  4762. "required": false
  4763. },
  4764. {
  4765. "name": "workspace",
  4766. "in": "query",
  4767. "schema": {
  4768. "type": "string"
  4769. },
  4770. "required": false
  4771. }
  4772. ],
  4773. "responses": {
  4774. "200": {
  4775. "description": "Question answered successfully",
  4776. "content": {
  4777. "application/json": {
  4778. "schema": {
  4779. "type": "boolean",
  4780. "description": "Question answered successfully"
  4781. }
  4782. }
  4783. }
  4784. },
  4785. "400": {
  4786. "description": "BadRequest | InvalidRequestError",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/InvalidRequestError"
  4796. }
  4797. ]
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "404": {
  4803. "description": "QuestionNotFoundError",
  4804. "content": {
  4805. "application/json": {
  4806. "schema": {
  4807. "$ref": "#/components/schemas/QuestionNotFoundError"
  4808. }
  4809. }
  4810. }
  4811. }
  4812. },
  4813. "description": "Provide answers to a question request from the AI assistant.",
  4814. "summary": "Reply to question request",
  4815. "requestBody": {
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "properties": {
  4821. "answers": {
  4822. "type": "array",
  4823. "items": {
  4824. "$ref": "#/components/schemas/QuestionAnswer"
  4825. },
  4826. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4827. }
  4828. },
  4829. "required": ["answers"],
  4830. "additionalProperties": false
  4831. }
  4832. }
  4833. }
  4834. },
  4835. "x-codeSamples": [
  4836. {
  4837. "lang": "js",
  4838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4839. }
  4840. ]
  4841. }
  4842. },
  4843. "/question/{requestID}/reject": {
  4844. "post": {
  4845. "tags": ["question"],
  4846. "operationId": "question.reject",
  4847. "parameters": [
  4848. {
  4849. "name": "requestID",
  4850. "in": "path",
  4851. "schema": {
  4852. "type": "string",
  4853. "pattern": "^que"
  4854. },
  4855. "required": true
  4856. },
  4857. {
  4858. "name": "directory",
  4859. "in": "query",
  4860. "schema": {
  4861. "type": "string"
  4862. },
  4863. "required": false
  4864. },
  4865. {
  4866. "name": "workspace",
  4867. "in": "query",
  4868. "schema": {
  4869. "type": "string"
  4870. },
  4871. "required": false
  4872. }
  4873. ],
  4874. "responses": {
  4875. "200": {
  4876. "description": "Question rejected successfully",
  4877. "content": {
  4878. "application/json": {
  4879. "schema": {
  4880. "type": "boolean",
  4881. "description": "Question rejected successfully"
  4882. }
  4883. }
  4884. }
  4885. },
  4886. "400": {
  4887. "description": "BadRequest | InvalidRequestError",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "anyOf": [
  4892. {
  4893. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/InvalidRequestError"
  4897. }
  4898. ]
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "404": {
  4904. "description": "QuestionNotFoundError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "$ref": "#/components/schemas/QuestionNotFoundError"
  4909. }
  4910. }
  4911. }
  4912. }
  4913. },
  4914. "description": "Reject a question request from the AI assistant.",
  4915. "summary": "Reject question request",
  4916. "x-codeSamples": [
  4917. {
  4918. "lang": "js",
  4919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4920. }
  4921. ]
  4922. }
  4923. },
  4924. "/permission": {
  4925. "get": {
  4926. "tags": ["permission"],
  4927. "operationId": "permission.list",
  4928. "parameters": [
  4929. {
  4930. "name": "directory",
  4931. "in": "query",
  4932. "schema": {
  4933. "type": "string"
  4934. },
  4935. "required": false
  4936. },
  4937. {
  4938. "name": "workspace",
  4939. "in": "query",
  4940. "schema": {
  4941. "type": "string"
  4942. },
  4943. "required": false
  4944. }
  4945. ],
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of pending permissions",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "array",
  4953. "items": {
  4954. "$ref": "#/components/schemas/PermissionRequest"
  4955. },
  4956. "description": "List of pending permissions"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "400": {
  4962. "description": "Bad request",
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "$ref": "#/components/schemas/BadRequestError"
  4967. }
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "description": "Get all pending permission requests across all sessions.",
  4973. "summary": "List pending permissions",
  4974. "x-codeSamples": [
  4975. {
  4976. "lang": "js",
  4977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4978. }
  4979. ]
  4980. }
  4981. },
  4982. "/permission/{requestID}/reply": {
  4983. "post": {
  4984. "tags": ["permission"],
  4985. "operationId": "permission.reply",
  4986. "parameters": [
  4987. {
  4988. "name": "requestID",
  4989. "in": "path",
  4990. "schema": {
  4991. "type": "string",
  4992. "pattern": "^per"
  4993. },
  4994. "required": true
  4995. },
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "schema": {
  5000. "type": "string"
  5001. },
  5002. "required": false
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "schema": {
  5008. "type": "string"
  5009. },
  5010. "required": false
  5011. }
  5012. ],
  5013. "responses": {
  5014. "200": {
  5015. "description": "Permission processed successfully",
  5016. "content": {
  5017. "application/json": {
  5018. "schema": {
  5019. "type": "boolean",
  5020. "description": "Permission processed successfully"
  5021. }
  5022. }
  5023. }
  5024. },
  5025. "400": {
  5026. "description": "BadRequest | InvalidRequestError",
  5027. "content": {
  5028. "application/json": {
  5029. "schema": {
  5030. "anyOf": [
  5031. {
  5032. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5033. },
  5034. {
  5035. "$ref": "#/components/schemas/InvalidRequestError"
  5036. }
  5037. ]
  5038. }
  5039. }
  5040. }
  5041. },
  5042. "404": {
  5043. "description": "PermissionNotFoundError",
  5044. "content": {
  5045. "application/json": {
  5046. "schema": {
  5047. "$ref": "#/components/schemas/PermissionNotFoundError"
  5048. }
  5049. }
  5050. }
  5051. }
  5052. },
  5053. "description": "Approve or deny a permission request from the AI assistant.",
  5054. "summary": "Respond to permission request",
  5055. "requestBody": {
  5056. "content": {
  5057. "application/json": {
  5058. "schema": {
  5059. "type": "object",
  5060. "properties": {
  5061. "reply": {
  5062. "type": "string",
  5063. "enum": ["once", "always", "reject"]
  5064. },
  5065. "message": {
  5066. "type": "string"
  5067. }
  5068. },
  5069. "required": ["reply"],
  5070. "additionalProperties": false
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "x-codeSamples": [
  5076. {
  5077. "lang": "js",
  5078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5079. }
  5080. ]
  5081. }
  5082. },
  5083. "/provider": {
  5084. "get": {
  5085. "tags": ["provider"],
  5086. "operationId": "provider.list",
  5087. "parameters": [
  5088. {
  5089. "name": "directory",
  5090. "in": "query",
  5091. "schema": {
  5092. "type": "string"
  5093. },
  5094. "required": false
  5095. },
  5096. {
  5097. "name": "workspace",
  5098. "in": "query",
  5099. "schema": {
  5100. "type": "string"
  5101. },
  5102. "required": false
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "description": "List of providers",
  5108. "content": {
  5109. "application/json": {
  5110. "schema": {
  5111. "type": "object",
  5112. "properties": {
  5113. "all": {
  5114. "type": "array",
  5115. "items": {
  5116. "$ref": "#/components/schemas/Provider"
  5117. }
  5118. },
  5119. "default": {
  5120. "type": "object",
  5121. "additionalProperties": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "connected": {
  5126. "type": "array",
  5127. "items": {
  5128. "type": "string"
  5129. }
  5130. }
  5131. },
  5132. "required": ["all", "default", "connected"],
  5133. "additionalProperties": false,
  5134. "description": "List of providers"
  5135. }
  5136. }
  5137. }
  5138. },
  5139. "400": {
  5140. "description": "Bad request",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/BadRequestError"
  5145. }
  5146. }
  5147. }
  5148. }
  5149. },
  5150. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5151. "summary": "List providers",
  5152. "x-codeSamples": [
  5153. {
  5154. "lang": "js",
  5155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5156. }
  5157. ]
  5158. }
  5159. },
  5160. "/provider/auth": {
  5161. "get": {
  5162. "tags": ["provider"],
  5163. "operationId": "provider.auth",
  5164. "parameters": [
  5165. {
  5166. "name": "directory",
  5167. "in": "query",
  5168. "schema": {
  5169. "type": "string"
  5170. },
  5171. "required": false
  5172. },
  5173. {
  5174. "name": "workspace",
  5175. "in": "query",
  5176. "schema": {
  5177. "type": "string"
  5178. },
  5179. "required": false
  5180. }
  5181. ],
  5182. "responses": {
  5183. "200": {
  5184. "description": "Provider auth methods",
  5185. "content": {
  5186. "application/json": {
  5187. "schema": {
  5188. "type": "object",
  5189. "additionalProperties": {
  5190. "type": "array",
  5191. "items": {
  5192. "$ref": "#/components/schemas/ProviderAuthMethod"
  5193. }
  5194. },
  5195. "description": "Provider auth methods"
  5196. }
  5197. }
  5198. }
  5199. },
  5200. "400": {
  5201. "description": "Bad request",
  5202. "content": {
  5203. "application/json": {
  5204. "schema": {
  5205. "$ref": "#/components/schemas/BadRequestError"
  5206. }
  5207. }
  5208. }
  5209. }
  5210. },
  5211. "description": "Retrieve available authentication methods for all AI providers.",
  5212. "summary": "Get provider auth methods",
  5213. "x-codeSamples": [
  5214. {
  5215. "lang": "js",
  5216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5217. }
  5218. ]
  5219. }
  5220. },
  5221. "/provider/{providerID}/oauth/authorize": {
  5222. "post": {
  5223. "tags": ["provider"],
  5224. "operationId": "provider.oauth.authorize",
  5225. "parameters": [
  5226. {
  5227. "name": "providerID",
  5228. "in": "path",
  5229. "schema": {
  5230. "type": "string"
  5231. },
  5232. "required": true
  5233. },
  5234. {
  5235. "name": "directory",
  5236. "in": "query",
  5237. "schema": {
  5238. "type": "string"
  5239. },
  5240. "required": false
  5241. },
  5242. {
  5243. "name": "workspace",
  5244. "in": "query",
  5245. "schema": {
  5246. "type": "string"
  5247. },
  5248. "required": false
  5249. }
  5250. ],
  5251. "responses": {
  5252. "200": {
  5253. "description": "Authorization URL and method",
  5254. "content": {
  5255. "application/json": {
  5256. "schema": {
  5257. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "400": {
  5263. "description": "ProviderAuthError | InvalidRequestError",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "anyOf": [
  5268. {
  5269. "$ref": "#/components/schemas/ProviderAuthError1"
  5270. },
  5271. {
  5272. "$ref": "#/components/schemas/InvalidRequestError"
  5273. }
  5274. ]
  5275. }
  5276. }
  5277. }
  5278. }
  5279. },
  5280. "description": "Start the OAuth authorization flow for a provider.",
  5281. "summary": "Start OAuth authorization",
  5282. "requestBody": {
  5283. "content": {
  5284. "application/json": {
  5285. "schema": {
  5286. "type": "object",
  5287. "properties": {
  5288. "method": {
  5289. "type": "number",
  5290. "description": "Auth method index"
  5291. },
  5292. "inputs": {
  5293. "type": "object",
  5294. "additionalProperties": {
  5295. "type": "string"
  5296. }
  5297. }
  5298. },
  5299. "required": ["method"],
  5300. "additionalProperties": false
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "x-codeSamples": [
  5306. {
  5307. "lang": "js",
  5308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5309. }
  5310. ]
  5311. }
  5312. },
  5313. "/provider/{providerID}/oauth/callback": {
  5314. "post": {
  5315. "tags": ["provider"],
  5316. "operationId": "provider.oauth.callback",
  5317. "parameters": [
  5318. {
  5319. "name": "providerID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string"
  5323. },
  5324. "required": true
  5325. },
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. }
  5342. ],
  5343. "responses": {
  5344. "200": {
  5345. "description": "OAuth callback processed successfully",
  5346. "content": {
  5347. "application/json": {
  5348. "schema": {
  5349. "type": "boolean",
  5350. "description": "OAuth callback processed successfully"
  5351. }
  5352. }
  5353. }
  5354. },
  5355. "400": {
  5356. "description": "ProviderAuthError | InvalidRequestError",
  5357. "content": {
  5358. "application/json": {
  5359. "schema": {
  5360. "anyOf": [
  5361. {
  5362. "$ref": "#/components/schemas/ProviderAuthError1"
  5363. },
  5364. {
  5365. "$ref": "#/components/schemas/InvalidRequestError"
  5366. }
  5367. ]
  5368. }
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "description": "Handle the OAuth callback from a provider after user authorization.",
  5374. "summary": "Handle OAuth callback",
  5375. "requestBody": {
  5376. "content": {
  5377. "application/json": {
  5378. "schema": {
  5379. "type": "object",
  5380. "properties": {
  5381. "method": {
  5382. "type": "number",
  5383. "description": "Auth method index"
  5384. },
  5385. "code": {
  5386. "type": "string"
  5387. }
  5388. },
  5389. "required": ["method"],
  5390. "additionalProperties": false
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "x-codeSamples": [
  5396. {
  5397. "lang": "js",
  5398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5399. }
  5400. ]
  5401. }
  5402. },
  5403. "/session": {
  5404. "get": {
  5405. "tags": ["session"],
  5406. "operationId": "session.list",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. },
  5424. {
  5425. "name": "scope",
  5426. "in": "query",
  5427. "schema": {
  5428. "type": "string",
  5429. "enum": ["project"]
  5430. },
  5431. "required": false
  5432. },
  5433. {
  5434. "name": "path",
  5435. "in": "query",
  5436. "schema": {
  5437. "type": "string"
  5438. },
  5439. "required": false
  5440. },
  5441. {
  5442. "name": "roots",
  5443. "in": "query",
  5444. "schema": {
  5445. "anyOf": [
  5446. {
  5447. "type": "boolean"
  5448. },
  5449. {
  5450. "type": "string",
  5451. "enum": ["true", "false"]
  5452. }
  5453. ]
  5454. },
  5455. "required": false
  5456. },
  5457. {
  5458. "name": "start",
  5459. "in": "query",
  5460. "schema": {
  5461. "type": "number"
  5462. },
  5463. "required": false
  5464. },
  5465. {
  5466. "name": "search",
  5467. "in": "query",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": false
  5472. },
  5473. {
  5474. "name": "limit",
  5475. "in": "query",
  5476. "schema": {
  5477. "type": "number"
  5478. },
  5479. "required": false
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "description": "List of sessions",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "array",
  5489. "items": {
  5490. "$ref": "#/components/schemas/Session"
  5491. },
  5492. "description": "List of sessions"
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "400": {
  5498. "description": "Bad request",
  5499. "content": {
  5500. "application/json": {
  5501. "schema": {
  5502. "$ref": "#/components/schemas/BadRequestError"
  5503. }
  5504. }
  5505. }
  5506. }
  5507. },
  5508. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5509. "summary": "List sessions",
  5510. "x-codeSamples": [
  5511. {
  5512. "lang": "js",
  5513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5514. }
  5515. ]
  5516. },
  5517. "post": {
  5518. "tags": ["session"],
  5519. "operationId": "session.create",
  5520. "parameters": [
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "Successfully created session",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5568. "summary": "Create session",
  5569. "requestBody": {
  5570. "content": {
  5571. "application/json": {
  5572. "schema": {
  5573. "type": "object",
  5574. "properties": {
  5575. "parentID": {
  5576. "type": "string",
  5577. "pattern": "^ses"
  5578. },
  5579. "title": {
  5580. "type": "string"
  5581. },
  5582. "agent": {
  5583. "type": "string"
  5584. },
  5585. "model": {
  5586. "type": "object",
  5587. "properties": {
  5588. "id": {
  5589. "type": "string"
  5590. },
  5591. "providerID": {
  5592. "type": "string"
  5593. },
  5594. "variant": {
  5595. "type": "string"
  5596. }
  5597. },
  5598. "required": ["id", "providerID"],
  5599. "additionalProperties": false
  5600. },
  5601. "metadata": {
  5602. "type": "object"
  5603. },
  5604. "permission": {
  5605. "$ref": "#/components/schemas/PermissionRuleset"
  5606. },
  5607. "workspaceID": {
  5608. "type": "string",
  5609. "pattern": "^wrk"
  5610. }
  5611. },
  5612. "additionalProperties": false
  5613. }
  5614. }
  5615. }
  5616. },
  5617. "x-codeSamples": [
  5618. {
  5619. "lang": "js",
  5620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5621. }
  5622. ]
  5623. }
  5624. },
  5625. "/session/status": {
  5626. "get": {
  5627. "tags": ["session"],
  5628. "operationId": "session.status",
  5629. "parameters": [
  5630. {
  5631. "name": "directory",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. },
  5638. {
  5639. "name": "workspace",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. }
  5646. ],
  5647. "responses": {
  5648. "200": {
  5649. "description": "Get session status",
  5650. "content": {
  5651. "application/json": {
  5652. "schema": {
  5653. "type": "object",
  5654. "additionalProperties": {
  5655. "$ref": "#/components/schemas/SessionStatus"
  5656. },
  5657. "description": "Get session status"
  5658. }
  5659. }
  5660. }
  5661. },
  5662. "400": {
  5663. "description": "BadRequest | InvalidRequestError",
  5664. "content": {
  5665. "application/json": {
  5666. "schema": {
  5667. "anyOf": [
  5668. {
  5669. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5670. },
  5671. {
  5672. "$ref": "#/components/schemas/InvalidRequestError"
  5673. }
  5674. ]
  5675. }
  5676. }
  5677. }
  5678. }
  5679. },
  5680. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5681. "summary": "Get session status",
  5682. "x-codeSamples": [
  5683. {
  5684. "lang": "js",
  5685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5686. }
  5687. ]
  5688. }
  5689. },
  5690. "/session/{sessionID}": {
  5691. "get": {
  5692. "tags": ["session"],
  5693. "operationId": "session.get",
  5694. "parameters": [
  5695. {
  5696. "name": "sessionID",
  5697. "in": "path",
  5698. "schema": {
  5699. "type": "string",
  5700. "pattern": "^ses"
  5701. },
  5702. "required": true
  5703. },
  5704. {
  5705. "name": "directory",
  5706. "in": "query",
  5707. "schema": {
  5708. "type": "string"
  5709. },
  5710. "required": false
  5711. },
  5712. {
  5713. "name": "workspace",
  5714. "in": "query",
  5715. "schema": {
  5716. "type": "string"
  5717. },
  5718. "required": false
  5719. }
  5720. ],
  5721. "responses": {
  5722. "200": {
  5723. "description": "Get session",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/Session"
  5728. }
  5729. }
  5730. }
  5731. },
  5732. "400": {
  5733. "description": "BadRequest | InvalidRequestError",
  5734. "content": {
  5735. "application/json": {
  5736. "schema": {
  5737. "anyOf": [
  5738. {
  5739. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5740. },
  5741. {
  5742. "$ref": "#/components/schemas/InvalidRequestError"
  5743. }
  5744. ]
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "404": {
  5750. "description": "NotFoundError",
  5751. "content": {
  5752. "application/json": {
  5753. "schema": {
  5754. "$ref": "#/components/schemas/NotFoundError"
  5755. }
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "description": "Retrieve detailed information about a specific OpenCode session.",
  5761. "summary": "Get session",
  5762. "x-codeSamples": [
  5763. {
  5764. "lang": "js",
  5765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5766. }
  5767. ]
  5768. },
  5769. "delete": {
  5770. "tags": ["session"],
  5771. "operationId": "session.delete",
  5772. "parameters": [
  5773. {
  5774. "name": "sessionID",
  5775. "in": "path",
  5776. "schema": {
  5777. "type": "string",
  5778. "pattern": "^ses"
  5779. },
  5780. "required": true
  5781. },
  5782. {
  5783. "name": "directory",
  5784. "in": "query",
  5785. "schema": {
  5786. "type": "string"
  5787. },
  5788. "required": false
  5789. },
  5790. {
  5791. "name": "workspace",
  5792. "in": "query",
  5793. "schema": {
  5794. "type": "string"
  5795. },
  5796. "required": false
  5797. }
  5798. ],
  5799. "responses": {
  5800. "200": {
  5801. "description": "Successfully deleted session",
  5802. "content": {
  5803. "application/json": {
  5804. "schema": {
  5805. "type": "boolean",
  5806. "description": "Successfully deleted session"
  5807. }
  5808. }
  5809. }
  5810. },
  5811. "400": {
  5812. "description": "BadRequest | InvalidRequestError",
  5813. "content": {
  5814. "application/json": {
  5815. "schema": {
  5816. "anyOf": [
  5817. {
  5818. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5819. },
  5820. {
  5821. "$ref": "#/components/schemas/InvalidRequestError"
  5822. }
  5823. ]
  5824. }
  5825. }
  5826. }
  5827. },
  5828. "404": {
  5829. "description": "NotFoundError",
  5830. "content": {
  5831. "application/json": {
  5832. "schema": {
  5833. "$ref": "#/components/schemas/NotFoundError"
  5834. }
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5840. "summary": "Delete session",
  5841. "x-codeSamples": [
  5842. {
  5843. "lang": "js",
  5844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5845. }
  5846. ]
  5847. },
  5848. "patch": {
  5849. "tags": ["session"],
  5850. "operationId": "session.update",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "Successfully updated session",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "$ref": "#/components/schemas/Session"
  5885. }
  5886. }
  5887. }
  5888. },
  5889. "400": {
  5890. "description": "BadRequest | InvalidRequestError",
  5891. "content": {
  5892. "application/json": {
  5893. "schema": {
  5894. "anyOf": [
  5895. {
  5896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5897. },
  5898. {
  5899. "$ref": "#/components/schemas/InvalidRequestError"
  5900. }
  5901. ]
  5902. }
  5903. }
  5904. }
  5905. },
  5906. "404": {
  5907. "description": "NotFoundError",
  5908. "content": {
  5909. "application/json": {
  5910. "schema": {
  5911. "$ref": "#/components/schemas/NotFoundError"
  5912. }
  5913. }
  5914. }
  5915. }
  5916. },
  5917. "description": "Update properties of an existing session, such as title or other metadata.",
  5918. "summary": "Update session",
  5919. "requestBody": {
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "properties": {
  5925. "title": {
  5926. "type": "string"
  5927. },
  5928. "metadata": {
  5929. "type": "object"
  5930. },
  5931. "permission": {
  5932. "$ref": "#/components/schemas/PermissionRuleset"
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "archived": {
  5938. "type": "number"
  5939. }
  5940. },
  5941. "additionalProperties": false
  5942. }
  5943. },
  5944. "additionalProperties": false
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "x-codeSamples": [
  5950. {
  5951. "lang": "js",
  5952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5953. }
  5954. ]
  5955. }
  5956. },
  5957. "/session/{sessionID}/children": {
  5958. "get": {
  5959. "tags": ["session"],
  5960. "operationId": "session.children",
  5961. "parameters": [
  5962. {
  5963. "name": "sessionID",
  5964. "in": "path",
  5965. "schema": {
  5966. "type": "string",
  5967. "pattern": "^ses"
  5968. },
  5969. "required": true
  5970. },
  5971. {
  5972. "name": "directory",
  5973. "in": "query",
  5974. "schema": {
  5975. "type": "string"
  5976. },
  5977. "required": false
  5978. },
  5979. {
  5980. "name": "workspace",
  5981. "in": "query",
  5982. "schema": {
  5983. "type": "string"
  5984. },
  5985. "required": false
  5986. }
  5987. ],
  5988. "responses": {
  5989. "200": {
  5990. "description": "List of children",
  5991. "content": {
  5992. "application/json": {
  5993. "schema": {
  5994. "type": "array",
  5995. "items": {
  5996. "$ref": "#/components/schemas/Session"
  5997. },
  5998. "description": "List of children"
  5999. }
  6000. }
  6001. }
  6002. },
  6003. "400": {
  6004. "description": "BadRequest | InvalidRequestError",
  6005. "content": {
  6006. "application/json": {
  6007. "schema": {
  6008. "anyOf": [
  6009. {
  6010. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6011. },
  6012. {
  6013. "$ref": "#/components/schemas/InvalidRequestError"
  6014. }
  6015. ]
  6016. }
  6017. }
  6018. }
  6019. },
  6020. "404": {
  6021. "description": "NotFoundError",
  6022. "content": {
  6023. "application/json": {
  6024. "schema": {
  6025. "$ref": "#/components/schemas/NotFoundError"
  6026. }
  6027. }
  6028. }
  6029. }
  6030. },
  6031. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6032. "summary": "Get session children",
  6033. "x-codeSamples": [
  6034. {
  6035. "lang": "js",
  6036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6037. }
  6038. ]
  6039. }
  6040. },
  6041. "/session/{sessionID}/todo": {
  6042. "get": {
  6043. "tags": ["session"],
  6044. "operationId": "session.todo",
  6045. "parameters": [
  6046. {
  6047. "name": "sessionID",
  6048. "in": "path",
  6049. "schema": {
  6050. "type": "string",
  6051. "pattern": "^ses"
  6052. },
  6053. "required": true
  6054. },
  6055. {
  6056. "name": "directory",
  6057. "in": "query",
  6058. "schema": {
  6059. "type": "string"
  6060. },
  6061. "required": false
  6062. },
  6063. {
  6064. "name": "workspace",
  6065. "in": "query",
  6066. "schema": {
  6067. "type": "string"
  6068. },
  6069. "required": false
  6070. }
  6071. ],
  6072. "responses": {
  6073. "200": {
  6074. "description": "Todo list",
  6075. "content": {
  6076. "application/json": {
  6077. "schema": {
  6078. "type": "array",
  6079. "items": {
  6080. "$ref": "#/components/schemas/Todo"
  6081. },
  6082. "description": "Todo list"
  6083. }
  6084. }
  6085. }
  6086. },
  6087. "400": {
  6088. "description": "BadRequest | InvalidRequestError",
  6089. "content": {
  6090. "application/json": {
  6091. "schema": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/InvalidRequestError"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. }
  6103. },
  6104. "404": {
  6105. "description": "NotFoundError",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "$ref": "#/components/schemas/NotFoundError"
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6116. "summary": "Get session todos",
  6117. "x-codeSamples": [
  6118. {
  6119. "lang": "js",
  6120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6121. }
  6122. ]
  6123. }
  6124. },
  6125. "/session/{sessionID}/diff": {
  6126. "get": {
  6127. "tags": ["session"],
  6128. "operationId": "session.diff",
  6129. "parameters": [
  6130. {
  6131. "name": "sessionID",
  6132. "in": "path",
  6133. "schema": {
  6134. "type": "string",
  6135. "pattern": "^ses"
  6136. },
  6137. "required": true
  6138. },
  6139. {
  6140. "name": "directory",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. },
  6147. {
  6148. "name": "workspace",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "messageID",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string",
  6160. "pattern": "^msg"
  6161. },
  6162. "required": false
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "description": "Successfully retrieved diff",
  6168. "content": {
  6169. "application/json": {
  6170. "schema": {
  6171. "type": "array",
  6172. "items": {
  6173. "$ref": "#/components/schemas/SnapshotFileDiff"
  6174. },
  6175. "description": "Successfully retrieved diff"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "400": {
  6181. "description": "Bad request",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "$ref": "#/components/schemas/BadRequestError"
  6186. }
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6192. "summary": "Get message diff",
  6193. "x-codeSamples": [
  6194. {
  6195. "lang": "js",
  6196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6197. }
  6198. ]
  6199. }
  6200. },
  6201. "/session/{sessionID}/message": {
  6202. "get": {
  6203. "tags": ["session"],
  6204. "operationId": "session.messages",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "limit",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "integer",
  6236. "minimum": 0,
  6237. "maximum": 9007199254740991
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "before",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "List of messages",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "type": "array",
  6257. "items": {
  6258. "type": "object",
  6259. "properties": {
  6260. "info": {
  6261. "$ref": "#/components/schemas/Message"
  6262. },
  6263. "parts": {
  6264. "type": "array",
  6265. "items": {
  6266. "$ref": "#/components/schemas/Part"
  6267. }
  6268. }
  6269. },
  6270. "required": ["info", "parts"],
  6271. "additionalProperties": false
  6272. },
  6273. "description": "List of messages"
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "400": {
  6279. "description": "BadRequest | InvalidRequestError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "anyOf": [
  6284. {
  6285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6286. },
  6287. {
  6288. "$ref": "#/components/schemas/InvalidRequestError"
  6289. }
  6290. ]
  6291. }
  6292. }
  6293. }
  6294. },
  6295. "404": {
  6296. "description": "NotFoundError",
  6297. "content": {
  6298. "application/json": {
  6299. "schema": {
  6300. "$ref": "#/components/schemas/NotFoundError"
  6301. }
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6307. "summary": "Get session messages",
  6308. "x-codeSamples": [
  6309. {
  6310. "lang": "js",
  6311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6312. }
  6313. ]
  6314. },
  6315. "post": {
  6316. "tags": ["session"],
  6317. "operationId": "session.prompt",
  6318. "parameters": [
  6319. {
  6320. "name": "sessionID",
  6321. "in": "path",
  6322. "schema": {
  6323. "type": "string",
  6324. "pattern": "^ses"
  6325. },
  6326. "required": true
  6327. },
  6328. {
  6329. "name": "directory",
  6330. "in": "query",
  6331. "schema": {
  6332. "type": "string"
  6333. },
  6334. "required": false
  6335. },
  6336. {
  6337. "name": "workspace",
  6338. "in": "query",
  6339. "schema": {
  6340. "type": "string"
  6341. },
  6342. "required": false
  6343. }
  6344. ],
  6345. "responses": {
  6346. "200": {
  6347. "description": "Created message",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "type": "object",
  6352. "required": ["info", "parts"],
  6353. "properties": {
  6354. "info": {
  6355. "$ref": "#/components/schemas/AssistantMessage"
  6356. },
  6357. "parts": {
  6358. "type": "array",
  6359. "items": {
  6360. "$ref": "#/components/schemas/Part"
  6361. }
  6362. }
  6363. }
  6364. }
  6365. }
  6366. }
  6367. },
  6368. "400": {
  6369. "description": "BadRequest | InvalidRequestError",
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "anyOf": [
  6374. {
  6375. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6376. },
  6377. {
  6378. "$ref": "#/components/schemas/InvalidRequestError"
  6379. }
  6380. ]
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "404": {
  6386. "description": "NotFoundError",
  6387. "content": {
  6388. "application/json": {
  6389. "schema": {
  6390. "$ref": "#/components/schemas/NotFoundError"
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Create and send a new message to a session, streaming the AI response.",
  6397. "summary": "Send message",
  6398. "requestBody": {
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "type": "object",
  6403. "properties": {
  6404. "messageID": {
  6405. "type": "string",
  6406. "pattern": "^msg"
  6407. },
  6408. "model": {
  6409. "type": "object",
  6410. "properties": {
  6411. "providerID": {
  6412. "type": "string"
  6413. },
  6414. "modelID": {
  6415. "type": "string"
  6416. }
  6417. },
  6418. "required": ["providerID", "modelID"],
  6419. "additionalProperties": false
  6420. },
  6421. "agent": {
  6422. "type": "string"
  6423. },
  6424. "noReply": {
  6425. "type": "boolean"
  6426. },
  6427. "tools": {
  6428. "type": "object",
  6429. "additionalProperties": {
  6430. "type": "boolean"
  6431. }
  6432. },
  6433. "format": {
  6434. "$ref": "#/components/schemas/OutputFormat"
  6435. },
  6436. "system": {
  6437. "type": "string"
  6438. },
  6439. "variant": {
  6440. "type": "string"
  6441. },
  6442. "parts": {
  6443. "type": "array",
  6444. "items": {
  6445. "anyOf": [
  6446. {
  6447. "$ref": "#/components/schemas/TextPartInput"
  6448. },
  6449. {
  6450. "$ref": "#/components/schemas/FilePartInput"
  6451. },
  6452. {
  6453. "$ref": "#/components/schemas/AgentPartInput"
  6454. },
  6455. {
  6456. "$ref": "#/components/schemas/SubtaskPartInput"
  6457. }
  6458. ]
  6459. }
  6460. }
  6461. },
  6462. "required": ["parts"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/message/{messageID}": {
  6477. "get": {
  6478. "tags": ["session"],
  6479. "operationId": "session.message",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "messageID",
  6492. "in": "path",
  6493. "schema": {
  6494. "type": "string",
  6495. "pattern": "^msg"
  6496. },
  6497. "required": true
  6498. },
  6499. {
  6500. "name": "directory",
  6501. "in": "query",
  6502. "schema": {
  6503. "type": "string"
  6504. },
  6505. "required": false
  6506. },
  6507. {
  6508. "name": "workspace",
  6509. "in": "query",
  6510. "schema": {
  6511. "type": "string"
  6512. },
  6513. "required": false
  6514. }
  6515. ],
  6516. "responses": {
  6517. "200": {
  6518. "description": "Message",
  6519. "content": {
  6520. "application/json": {
  6521. "schema": {
  6522. "type": "object",
  6523. "properties": {
  6524. "info": {
  6525. "$ref": "#/components/schemas/Message"
  6526. },
  6527. "parts": {
  6528. "type": "array",
  6529. "items": {
  6530. "$ref": "#/components/schemas/Part"
  6531. }
  6532. }
  6533. },
  6534. "required": ["info", "parts"],
  6535. "additionalProperties": false,
  6536. "description": "Message"
  6537. }
  6538. }
  6539. }
  6540. },
  6541. "400": {
  6542. "description": "BadRequest | InvalidRequestError",
  6543. "content": {
  6544. "application/json": {
  6545. "schema": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/InvalidRequestError"
  6552. }
  6553. ]
  6554. }
  6555. }
  6556. }
  6557. },
  6558. "404": {
  6559. "description": "NotFoundError",
  6560. "content": {
  6561. "application/json": {
  6562. "schema": {
  6563. "$ref": "#/components/schemas/NotFoundError"
  6564. }
  6565. }
  6566. }
  6567. }
  6568. },
  6569. "description": "Retrieve a specific message from a session by its message ID.",
  6570. "summary": "Get message",
  6571. "x-codeSamples": [
  6572. {
  6573. "lang": "js",
  6574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6575. }
  6576. ]
  6577. },
  6578. "delete": {
  6579. "tags": ["session"],
  6580. "operationId": "session.deleteMessage",
  6581. "parameters": [
  6582. {
  6583. "name": "sessionID",
  6584. "in": "path",
  6585. "schema": {
  6586. "type": "string",
  6587. "pattern": "^ses"
  6588. },
  6589. "required": true
  6590. },
  6591. {
  6592. "name": "messageID",
  6593. "in": "path",
  6594. "schema": {
  6595. "type": "string",
  6596. "pattern": "^msg"
  6597. },
  6598. "required": true
  6599. },
  6600. {
  6601. "name": "directory",
  6602. "in": "query",
  6603. "schema": {
  6604. "type": "string"
  6605. },
  6606. "required": false
  6607. },
  6608. {
  6609. "name": "workspace",
  6610. "in": "query",
  6611. "schema": {
  6612. "type": "string"
  6613. },
  6614. "required": false
  6615. }
  6616. ],
  6617. "responses": {
  6618. "200": {
  6619. "description": "Successfully deleted message",
  6620. "content": {
  6621. "application/json": {
  6622. "schema": {
  6623. "type": "boolean",
  6624. "description": "Successfully deleted message"
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "400": {
  6630. "description": "BadRequest | InvalidRequestError",
  6631. "content": {
  6632. "application/json": {
  6633. "schema": {
  6634. "anyOf": [
  6635. {
  6636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6637. },
  6638. {
  6639. "$ref": "#/components/schemas/InvalidRequestError"
  6640. }
  6641. ]
  6642. }
  6643. }
  6644. }
  6645. },
  6646. "404": {
  6647. "description": "NotFoundError",
  6648. "content": {
  6649. "application/json": {
  6650. "schema": {
  6651. "$ref": "#/components/schemas/NotFoundError"
  6652. }
  6653. }
  6654. }
  6655. },
  6656. "409": {
  6657. "description": "SessionBusyError",
  6658. "content": {
  6659. "application/json": {
  6660. "schema": {
  6661. "$ref": "#/components/schemas/SessionBusyError"
  6662. }
  6663. }
  6664. }
  6665. }
  6666. },
  6667. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6668. "summary": "Delete message",
  6669. "x-codeSamples": [
  6670. {
  6671. "lang": "js",
  6672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6673. }
  6674. ]
  6675. }
  6676. },
  6677. "/session/{sessionID}/fork": {
  6678. "post": {
  6679. "tags": ["session"],
  6680. "operationId": "session.fork",
  6681. "parameters": [
  6682. {
  6683. "name": "sessionID",
  6684. "in": "path",
  6685. "schema": {
  6686. "type": "string",
  6687. "pattern": "^ses"
  6688. },
  6689. "required": true
  6690. },
  6691. {
  6692. "name": "directory",
  6693. "in": "query",
  6694. "schema": {
  6695. "type": "string"
  6696. },
  6697. "required": false
  6698. },
  6699. {
  6700. "name": "workspace",
  6701. "in": "query",
  6702. "schema": {
  6703. "type": "string"
  6704. },
  6705. "required": false
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "description": "200",
  6711. "content": {
  6712. "application/json": {
  6713. "schema": {
  6714. "$ref": "#/components/schemas/Session"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "400": {
  6720. "description": "BadRequest | InvalidRequestError",
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "anyOf": [
  6725. {
  6726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6727. },
  6728. {
  6729. "$ref": "#/components/schemas/InvalidRequestError"
  6730. }
  6731. ]
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "404": {
  6737. "description": "NotFoundError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "$ref": "#/components/schemas/NotFoundError"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. },
  6747. "description": "Create a new session by forking an existing session at a specific message point.",
  6748. "summary": "Fork session",
  6749. "requestBody": {
  6750. "content": {
  6751. "application/json": {
  6752. "schema": {
  6753. "type": "object",
  6754. "properties": {
  6755. "messageID": {
  6756. "type": "string",
  6757. "pattern": "^msg"
  6758. }
  6759. },
  6760. "additionalProperties": false
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "x-codeSamples": [
  6766. {
  6767. "lang": "js",
  6768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "/session/{sessionID}/abort": {
  6774. "post": {
  6775. "tags": ["session"],
  6776. "operationId": "session.abort",
  6777. "parameters": [
  6778. {
  6779. "name": "sessionID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^ses"
  6784. },
  6785. "required": true
  6786. },
  6787. {
  6788. "name": "directory",
  6789. "in": "query",
  6790. "schema": {
  6791. "type": "string"
  6792. },
  6793. "required": false
  6794. },
  6795. {
  6796. "name": "workspace",
  6797. "in": "query",
  6798. "schema": {
  6799. "type": "string"
  6800. },
  6801. "required": false
  6802. }
  6803. ],
  6804. "responses": {
  6805. "200": {
  6806. "description": "Aborted session",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "type": "boolean",
  6811. "description": "Aborted session"
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "400": {
  6817. "description": "BadRequest | InvalidRequestError",
  6818. "content": {
  6819. "application/json": {
  6820. "schema": {
  6821. "anyOf": [
  6822. {
  6823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6824. },
  6825. {
  6826. "$ref": "#/components/schemas/InvalidRequestError"
  6827. }
  6828. ]
  6829. }
  6830. }
  6831. }
  6832. }
  6833. },
  6834. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6835. "summary": "Abort session",
  6836. "x-codeSamples": [
  6837. {
  6838. "lang": "js",
  6839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6840. }
  6841. ]
  6842. }
  6843. },
  6844. "/session/{sessionID}/init": {
  6845. "post": {
  6846. "tags": ["session"],
  6847. "operationId": "session.init",
  6848. "parameters": [
  6849. {
  6850. "name": "sessionID",
  6851. "in": "path",
  6852. "schema": {
  6853. "type": "string",
  6854. "pattern": "^ses"
  6855. },
  6856. "required": true
  6857. },
  6858. {
  6859. "name": "directory",
  6860. "in": "query",
  6861. "schema": {
  6862. "type": "string"
  6863. },
  6864. "required": false
  6865. },
  6866. {
  6867. "name": "workspace",
  6868. "in": "query",
  6869. "schema": {
  6870. "type": "string"
  6871. },
  6872. "required": false
  6873. }
  6874. ],
  6875. "responses": {
  6876. "200": {
  6877. "description": "200",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "type": "boolean",
  6882. "description": "200"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "400": {
  6888. "description": "BadRequest | InvalidRequestError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "anyOf": [
  6893. {
  6894. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/InvalidRequestError"
  6898. }
  6899. ]
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "404": {
  6905. "description": "NotFoundError",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/NotFoundError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6916. "summary": "Initialize session",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "modelID": {
  6924. "type": "string"
  6925. },
  6926. "providerID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string",
  6931. "pattern": "^msg"
  6932. }
  6933. },
  6934. "required": ["modelID", "providerID", "messageID"],
  6935. "additionalProperties": false
  6936. }
  6937. }
  6938. }
  6939. },
  6940. "x-codeSamples": [
  6941. {
  6942. "lang": "js",
  6943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6944. }
  6945. ]
  6946. }
  6947. },
  6948. "/session/{sessionID}/share": {
  6949. "post": {
  6950. "tags": ["session"],
  6951. "operationId": "session.share",
  6952. "parameters": [
  6953. {
  6954. "name": "sessionID",
  6955. "in": "path",
  6956. "schema": {
  6957. "type": "string",
  6958. "pattern": "^ses"
  6959. },
  6960. "required": true
  6961. },
  6962. {
  6963. "name": "directory",
  6964. "in": "query",
  6965. "schema": {
  6966. "type": "string"
  6967. },
  6968. "required": false
  6969. },
  6970. {
  6971. "name": "workspace",
  6972. "in": "query",
  6973. "schema": {
  6974. "type": "string"
  6975. },
  6976. "required": false
  6977. }
  6978. ],
  6979. "responses": {
  6980. "200": {
  6981. "description": "Successfully shared session",
  6982. "content": {
  6983. "application/json": {
  6984. "schema": {
  6985. "$ref": "#/components/schemas/Session"
  6986. }
  6987. }
  6988. }
  6989. },
  6990. "400": {
  6991. "description": "Bad request",
  6992. "content": {
  6993. "application/json": {
  6994. "schema": {
  6995. "$ref": "#/components/schemas/BadRequestError"
  6996. }
  6997. }
  6998. }
  6999. },
  7000. "404": {
  7001. "description": "NotFoundError",
  7002. "content": {
  7003. "application/json": {
  7004. "schema": {
  7005. "$ref": "#/components/schemas/NotFoundError"
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "500": {
  7011. "description": "InternalServerError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7022. "summary": "Share session",
  7023. "x-codeSamples": [
  7024. {
  7025. "lang": "js",
  7026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7027. }
  7028. ]
  7029. },
  7030. "delete": {
  7031. "tags": ["session"],
  7032. "operationId": "session.unshare",
  7033. "parameters": [
  7034. {
  7035. "name": "sessionID",
  7036. "in": "path",
  7037. "schema": {
  7038. "type": "string",
  7039. "pattern": "^ses"
  7040. },
  7041. "required": true
  7042. },
  7043. {
  7044. "name": "directory",
  7045. "in": "query",
  7046. "schema": {
  7047. "type": "string"
  7048. },
  7049. "required": false
  7050. },
  7051. {
  7052. "name": "workspace",
  7053. "in": "query",
  7054. "schema": {
  7055. "type": "string"
  7056. },
  7057. "required": false
  7058. }
  7059. ],
  7060. "responses": {
  7061. "200": {
  7062. "description": "Successfully unshared session",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/Session"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "400": {
  7072. "description": "Bad request",
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "$ref": "#/components/schemas/BadRequestError"
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "404": {
  7082. "description": "NotFoundError",
  7083. "content": {
  7084. "application/json": {
  7085. "schema": {
  7086. "$ref": "#/components/schemas/NotFoundError"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "500": {
  7092. "description": "InternalServerError",
  7093. "content": {
  7094. "application/json": {
  7095. "schema": {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "description": "Remove the shareable link for a session, making it private again.",
  7103. "summary": "Unshare session",
  7104. "x-codeSamples": [
  7105. {
  7106. "lang": "js",
  7107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7108. }
  7109. ]
  7110. }
  7111. },
  7112. "/session/{sessionID}/summarize": {
  7113. "post": {
  7114. "tags": ["session"],
  7115. "operationId": "session.summarize",
  7116. "parameters": [
  7117. {
  7118. "name": "sessionID",
  7119. "in": "path",
  7120. "schema": {
  7121. "type": "string",
  7122. "pattern": "^ses"
  7123. },
  7124. "required": true
  7125. },
  7126. {
  7127. "name": "directory",
  7128. "in": "query",
  7129. "schema": {
  7130. "type": "string"
  7131. },
  7132. "required": false
  7133. },
  7134. {
  7135. "name": "workspace",
  7136. "in": "query",
  7137. "schema": {
  7138. "type": "string"
  7139. },
  7140. "required": false
  7141. }
  7142. ],
  7143. "responses": {
  7144. "200": {
  7145. "description": "Summarized session",
  7146. "content": {
  7147. "application/json": {
  7148. "schema": {
  7149. "type": "boolean",
  7150. "description": "Summarized session"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. }
  7182. },
  7183. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7184. "summary": "Summarize session",
  7185. "requestBody": {
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "type": "object",
  7190. "properties": {
  7191. "providerID": {
  7192. "type": "string"
  7193. },
  7194. "modelID": {
  7195. "type": "string"
  7196. },
  7197. "auto": {
  7198. "type": "boolean"
  7199. }
  7200. },
  7201. "required": ["providerID", "modelID"],
  7202. "additionalProperties": false
  7203. }
  7204. }
  7205. }
  7206. },
  7207. "x-codeSamples": [
  7208. {
  7209. "lang": "js",
  7210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7211. }
  7212. ]
  7213. }
  7214. },
  7215. "/session/{sessionID}/prompt_async": {
  7216. "post": {
  7217. "tags": ["session"],
  7218. "operationId": "session.prompt_async",
  7219. "parameters": [
  7220. {
  7221. "name": "sessionID",
  7222. "in": "path",
  7223. "schema": {
  7224. "type": "string",
  7225. "pattern": "^ses"
  7226. },
  7227. "required": true
  7228. },
  7229. {
  7230. "name": "directory",
  7231. "in": "query",
  7232. "schema": {
  7233. "type": "string"
  7234. },
  7235. "required": false
  7236. },
  7237. {
  7238. "name": "workspace",
  7239. "in": "query",
  7240. "schema": {
  7241. "type": "string"
  7242. },
  7243. "required": false
  7244. }
  7245. ],
  7246. "responses": {
  7247. "204": {
  7248. "description": "Prompt accepted"
  7249. },
  7250. "400": {
  7251. "description": "BadRequest | InvalidRequestError",
  7252. "content": {
  7253. "application/json": {
  7254. "schema": {
  7255. "anyOf": [
  7256. {
  7257. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7258. },
  7259. {
  7260. "$ref": "#/components/schemas/InvalidRequestError"
  7261. }
  7262. ]
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "404": {
  7268. "description": "NotFoundError",
  7269. "content": {
  7270. "application/json": {
  7271. "schema": {
  7272. "$ref": "#/components/schemas/NotFoundError"
  7273. }
  7274. }
  7275. }
  7276. }
  7277. },
  7278. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7279. "summary": "Send async message",
  7280. "requestBody": {
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "type": "object",
  7285. "properties": {
  7286. "messageID": {
  7287. "type": "string",
  7288. "pattern": "^msg"
  7289. },
  7290. "model": {
  7291. "type": "object",
  7292. "properties": {
  7293. "providerID": {
  7294. "type": "string"
  7295. },
  7296. "modelID": {
  7297. "type": "string"
  7298. }
  7299. },
  7300. "required": ["providerID", "modelID"],
  7301. "additionalProperties": false
  7302. },
  7303. "agent": {
  7304. "type": "string"
  7305. },
  7306. "noReply": {
  7307. "type": "boolean"
  7308. },
  7309. "tools": {
  7310. "type": "object",
  7311. "additionalProperties": {
  7312. "type": "boolean"
  7313. }
  7314. },
  7315. "format": {
  7316. "$ref": "#/components/schemas/OutputFormat"
  7317. },
  7318. "system": {
  7319. "type": "string"
  7320. },
  7321. "variant": {
  7322. "type": "string"
  7323. },
  7324. "parts": {
  7325. "type": "array",
  7326. "items": {
  7327. "anyOf": [
  7328. {
  7329. "$ref": "#/components/schemas/TextPartInput"
  7330. },
  7331. {
  7332. "$ref": "#/components/schemas/FilePartInput"
  7333. },
  7334. {
  7335. "$ref": "#/components/schemas/AgentPartInput"
  7336. },
  7337. {
  7338. "$ref": "#/components/schemas/SubtaskPartInput"
  7339. }
  7340. ]
  7341. }
  7342. }
  7343. },
  7344. "required": ["parts"],
  7345. "additionalProperties": false
  7346. }
  7347. }
  7348. }
  7349. },
  7350. "x-codeSamples": [
  7351. {
  7352. "lang": "js",
  7353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7354. }
  7355. ]
  7356. }
  7357. },
  7358. "/session/{sessionID}/command": {
  7359. "post": {
  7360. "tags": ["session"],
  7361. "operationId": "session.command",
  7362. "parameters": [
  7363. {
  7364. "name": "sessionID",
  7365. "in": "path",
  7366. "schema": {
  7367. "type": "string",
  7368. "pattern": "^ses"
  7369. },
  7370. "required": true
  7371. },
  7372. {
  7373. "name": "directory",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. },
  7380. {
  7381. "name": "workspace",
  7382. "in": "query",
  7383. "schema": {
  7384. "type": "string"
  7385. },
  7386. "required": false
  7387. }
  7388. ],
  7389. "responses": {
  7390. "200": {
  7391. "description": "Created message",
  7392. "content": {
  7393. "application/json": {
  7394. "schema": {
  7395. "type": "object",
  7396. "required": ["info", "parts"],
  7397. "properties": {
  7398. "info": {
  7399. "$ref": "#/components/schemas/AssistantMessage"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "$ref": "#/components/schemas/Part"
  7405. }
  7406. }
  7407. }
  7408. }
  7409. }
  7410. }
  7411. },
  7412. "400": {
  7413. "description": "BadRequest | InvalidRequestError",
  7414. "content": {
  7415. "application/json": {
  7416. "schema": {
  7417. "anyOf": [
  7418. {
  7419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7420. },
  7421. {
  7422. "$ref": "#/components/schemas/InvalidRequestError"
  7423. }
  7424. ]
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "404": {
  7430. "description": "NotFoundError",
  7431. "content": {
  7432. "application/json": {
  7433. "schema": {
  7434. "$ref": "#/components/schemas/NotFoundError"
  7435. }
  7436. }
  7437. }
  7438. }
  7439. },
  7440. "description": "Send a new command to a session for execution by the AI assistant.",
  7441. "summary": "Send command",
  7442. "requestBody": {
  7443. "content": {
  7444. "application/json": {
  7445. "schema": {
  7446. "type": "object",
  7447. "properties": {
  7448. "messageID": {
  7449. "type": "string",
  7450. "pattern": "^msg"
  7451. },
  7452. "agent": {
  7453. "type": "string"
  7454. },
  7455. "model": {
  7456. "type": "string"
  7457. },
  7458. "arguments": {
  7459. "type": "string"
  7460. },
  7461. "command": {
  7462. "type": "string"
  7463. },
  7464. "variant": {
  7465. "type": "string"
  7466. },
  7467. "parts": {
  7468. "type": "array",
  7469. "items": {
  7470. "type": "object",
  7471. "properties": {
  7472. "id": {
  7473. "type": "string",
  7474. "pattern": "^prt"
  7475. },
  7476. "type": {
  7477. "type": "string",
  7478. "enum": ["file"]
  7479. },
  7480. "mime": {
  7481. "type": "string"
  7482. },
  7483. "filename": {
  7484. "type": "string"
  7485. },
  7486. "url": {
  7487. "type": "string"
  7488. },
  7489. "source": {
  7490. "$ref": "#/components/schemas/FilePartSource"
  7491. }
  7492. },
  7493. "required": ["type", "mime", "url"],
  7494. "additionalProperties": false
  7495. }
  7496. }
  7497. },
  7498. "required": ["arguments", "command"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. }
  7503. },
  7504. "x-codeSamples": [
  7505. {
  7506. "lang": "js",
  7507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7508. }
  7509. ]
  7510. }
  7511. },
  7512. "/session/{sessionID}/shell": {
  7513. "post": {
  7514. "tags": ["session"],
  7515. "operationId": "session.shell",
  7516. "parameters": [
  7517. {
  7518. "name": "sessionID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^ses"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "directory",
  7528. "in": "query",
  7529. "schema": {
  7530. "type": "string"
  7531. },
  7532. "required": false
  7533. },
  7534. {
  7535. "name": "workspace",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. }
  7542. ],
  7543. "responses": {
  7544. "200": {
  7545. "description": "Created message",
  7546. "content": {
  7547. "application/json": {
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "info": {
  7552. "$ref": "#/components/schemas/Message"
  7553. },
  7554. "parts": {
  7555. "type": "array",
  7556. "items": {
  7557. "$ref": "#/components/schemas/Part"
  7558. }
  7559. }
  7560. },
  7561. "required": ["info", "parts"],
  7562. "additionalProperties": false,
  7563. "description": "Created message"
  7564. }
  7565. }
  7566. }
  7567. },
  7568. "400": {
  7569. "description": "BadRequest | InvalidRequestError",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "anyOf": [
  7574. {
  7575. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7576. },
  7577. {
  7578. "$ref": "#/components/schemas/InvalidRequestError"
  7579. }
  7580. ]
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "404": {
  7586. "description": "NotFoundError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/NotFoundError"
  7591. }
  7592. }
  7593. }
  7594. },
  7595. "409": {
  7596. "description": "SessionBusyError",
  7597. "content": {
  7598. "application/json": {
  7599. "schema": {
  7600. "$ref": "#/components/schemas/SessionBusyError"
  7601. }
  7602. }
  7603. }
  7604. }
  7605. },
  7606. "description": "Execute a shell command within the session context and return the AI's response.",
  7607. "summary": "Run shell command",
  7608. "requestBody": {
  7609. "content": {
  7610. "application/json": {
  7611. "schema": {
  7612. "type": "object",
  7613. "properties": {
  7614. "messageID": {
  7615. "type": "string",
  7616. "pattern": "^msg"
  7617. },
  7618. "agent": {
  7619. "type": "string"
  7620. },
  7621. "model": {
  7622. "type": "object",
  7623. "properties": {
  7624. "providerID": {
  7625. "type": "string"
  7626. },
  7627. "modelID": {
  7628. "type": "string"
  7629. }
  7630. },
  7631. "required": ["providerID", "modelID"],
  7632. "additionalProperties": false
  7633. },
  7634. "command": {
  7635. "type": "string"
  7636. }
  7637. },
  7638. "required": ["agent", "command"],
  7639. "additionalProperties": false
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "x-codeSamples": [
  7645. {
  7646. "lang": "js",
  7647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7648. }
  7649. ]
  7650. }
  7651. },
  7652. "/session/{sessionID}/revert": {
  7653. "post": {
  7654. "tags": ["session"],
  7655. "operationId": "session.revert",
  7656. "parameters": [
  7657. {
  7658. "name": "sessionID",
  7659. "in": "path",
  7660. "schema": {
  7661. "type": "string",
  7662. "pattern": "^ses"
  7663. },
  7664. "required": true
  7665. },
  7666. {
  7667. "name": "directory",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. },
  7674. {
  7675. "name": "workspace",
  7676. "in": "query",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": false
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "Updated session",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/Session"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "400": {
  7695. "description": "BadRequest | InvalidRequestError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "anyOf": [
  7700. {
  7701. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7702. },
  7703. {
  7704. "$ref": "#/components/schemas/InvalidRequestError"
  7705. }
  7706. ]
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "404": {
  7712. "description": "NotFoundError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "$ref": "#/components/schemas/NotFoundError"
  7717. }
  7718. }
  7719. }
  7720. },
  7721. "409": {
  7722. "description": "SessionBusyError",
  7723. "content": {
  7724. "application/json": {
  7725. "schema": {
  7726. "$ref": "#/components/schemas/SessionBusyError"
  7727. }
  7728. }
  7729. }
  7730. }
  7731. },
  7732. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7733. "summary": "Revert message",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "type": "object",
  7739. "properties": {
  7740. "messageID": {
  7741. "type": "string",
  7742. "pattern": "^msg"
  7743. },
  7744. "partID": {
  7745. "type": "string",
  7746. "pattern": "^prt"
  7747. }
  7748. },
  7749. "required": ["messageID"],
  7750. "additionalProperties": false
  7751. }
  7752. }
  7753. }
  7754. },
  7755. "x-codeSamples": [
  7756. {
  7757. "lang": "js",
  7758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7759. }
  7760. ]
  7761. }
  7762. },
  7763. "/session/{sessionID}/unrevert": {
  7764. "post": {
  7765. "tags": ["session"],
  7766. "operationId": "session.unrevert",
  7767. "parameters": [
  7768. {
  7769. "name": "sessionID",
  7770. "in": "path",
  7771. "schema": {
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. },
  7775. "required": true
  7776. },
  7777. {
  7778. "name": "directory",
  7779. "in": "query",
  7780. "schema": {
  7781. "type": "string"
  7782. },
  7783. "required": false
  7784. },
  7785. {
  7786. "name": "workspace",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. }
  7793. ],
  7794. "responses": {
  7795. "200": {
  7796. "description": "Updated session",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "$ref": "#/components/schemas/Session"
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "400": {
  7806. "description": "BadRequest | InvalidRequestError",
  7807. "content": {
  7808. "application/json": {
  7809. "schema": {
  7810. "anyOf": [
  7811. {
  7812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7813. },
  7814. {
  7815. "$ref": "#/components/schemas/InvalidRequestError"
  7816. }
  7817. ]
  7818. }
  7819. }
  7820. }
  7821. },
  7822. "404": {
  7823. "description": "NotFoundError",
  7824. "content": {
  7825. "application/json": {
  7826. "schema": {
  7827. "$ref": "#/components/schemas/NotFoundError"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "409": {
  7833. "description": "SessionBusyError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "$ref": "#/components/schemas/SessionBusyError"
  7838. }
  7839. }
  7840. }
  7841. }
  7842. },
  7843. "description": "Restore all previously reverted messages in a session.",
  7844. "summary": "Restore reverted messages",
  7845. "x-codeSamples": [
  7846. {
  7847. "lang": "js",
  7848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7849. }
  7850. ]
  7851. }
  7852. },
  7853. "/session/{sessionID}/permissions/{permissionID}": {
  7854. "post": {
  7855. "tags": ["session"],
  7856. "operationId": "permission.respond",
  7857. "parameters": [
  7858. {
  7859. "name": "sessionID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^ses"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "permissionID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^per"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Permission processed successfully",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Permission processed successfully"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError | PermissionNotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "anyOf": [
  7928. {
  7929. "$ref": "#/components/schemas/NotFoundError"
  7930. },
  7931. {
  7932. "$ref": "#/components/schemas/PermissionNotFoundError"
  7933. }
  7934. ]
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Approve or deny a permission request from the AI assistant.",
  7941. "summary": "Respond to permission",
  7942. "deprecated": true,
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "response": {
  7950. "type": "string",
  7951. "enum": ["once", "always", "reject"]
  7952. }
  7953. },
  7954. "required": ["response"],
  7955. "additionalProperties": false
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "x-codeSamples": [
  7961. {
  7962. "lang": "js",
  7963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7964. }
  7965. ]
  7966. }
  7967. },
  7968. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7969. "delete": {
  7970. "tags": ["session"],
  7971. "operationId": "part.delete",
  7972. "parameters": [
  7973. {
  7974. "name": "sessionID",
  7975. "in": "path",
  7976. "schema": {
  7977. "type": "string",
  7978. "pattern": "^ses"
  7979. },
  7980. "required": true
  7981. },
  7982. {
  7983. "name": "messageID",
  7984. "in": "path",
  7985. "schema": {
  7986. "type": "string",
  7987. "pattern": "^msg"
  7988. },
  7989. "required": true
  7990. },
  7991. {
  7992. "name": "partID",
  7993. "in": "path",
  7994. "schema": {
  7995. "type": "string",
  7996. "pattern": "^prt"
  7997. },
  7998. "required": true
  7999. },
  8000. {
  8001. "name": "directory",
  8002. "in": "query",
  8003. "schema": {
  8004. "type": "string"
  8005. },
  8006. "required": false
  8007. },
  8008. {
  8009. "name": "workspace",
  8010. "in": "query",
  8011. "schema": {
  8012. "type": "string"
  8013. },
  8014. "required": false
  8015. }
  8016. ],
  8017. "responses": {
  8018. "200": {
  8019. "description": "Successfully deleted part",
  8020. "content": {
  8021. "application/json": {
  8022. "schema": {
  8023. "type": "boolean",
  8024. "description": "Successfully deleted part"
  8025. }
  8026. }
  8027. }
  8028. },
  8029. "400": {
  8030. "description": "BadRequest | InvalidRequestError",
  8031. "content": {
  8032. "application/json": {
  8033. "schema": {
  8034. "anyOf": [
  8035. {
  8036. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8037. },
  8038. {
  8039. "$ref": "#/components/schemas/InvalidRequestError"
  8040. }
  8041. ]
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "404": {
  8047. "description": "NotFoundError",
  8048. "content": {
  8049. "application/json": {
  8050. "schema": {
  8051. "$ref": "#/components/schemas/NotFoundError"
  8052. }
  8053. }
  8054. }
  8055. }
  8056. },
  8057. "description": "Delete a part from a message.",
  8058. "x-codeSamples": [
  8059. {
  8060. "lang": "js",
  8061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8062. }
  8063. ]
  8064. },
  8065. "patch": {
  8066. "tags": ["session"],
  8067. "operationId": "part.update",
  8068. "parameters": [
  8069. {
  8070. "name": "sessionID",
  8071. "in": "path",
  8072. "schema": {
  8073. "type": "string",
  8074. "pattern": "^ses"
  8075. },
  8076. "required": true
  8077. },
  8078. {
  8079. "name": "messageID",
  8080. "in": "path",
  8081. "schema": {
  8082. "type": "string",
  8083. "pattern": "^msg"
  8084. },
  8085. "required": true
  8086. },
  8087. {
  8088. "name": "partID",
  8089. "in": "path",
  8090. "schema": {
  8091. "type": "string",
  8092. "pattern": "^prt"
  8093. },
  8094. "required": true
  8095. },
  8096. {
  8097. "name": "directory",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. },
  8104. {
  8105. "name": "workspace",
  8106. "in": "query",
  8107. "schema": {
  8108. "type": "string"
  8109. },
  8110. "required": false
  8111. }
  8112. ],
  8113. "responses": {
  8114. "200": {
  8115. "description": "Successfully updated part",
  8116. "content": {
  8117. "application/json": {
  8118. "schema": {
  8119. "$ref": "#/components/schemas/Part"
  8120. }
  8121. }
  8122. }
  8123. },
  8124. "400": {
  8125. "description": "BadRequest | InvalidRequestError",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "anyOf": [
  8130. {
  8131. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8132. },
  8133. {
  8134. "$ref": "#/components/schemas/InvalidRequestError"
  8135. }
  8136. ]
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "404": {
  8142. "description": "NotFoundError",
  8143. "content": {
  8144. "application/json": {
  8145. "schema": {
  8146. "$ref": "#/components/schemas/NotFoundError"
  8147. }
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "description": "Update a part in a message.",
  8153. "requestBody": {
  8154. "content": {
  8155. "application/json": {
  8156. "schema": {
  8157. "$ref": "#/components/schemas/Part"
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/sync/start": {
  8171. "post": {
  8172. "tags": ["sync"],
  8173. "operationId": "sync.start",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Workspace sync started",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Workspace sync started"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8216. "summary": "Start workspace sync",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/replay": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.replay",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Replayed sync events",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["sessionID"],
  8260. "additionalProperties": false,
  8261. "description": "Replayed sync events"
  8262. }
  8263. }
  8264. }
  8265. },
  8266. "400": {
  8267. "description": "BadRequest | InvalidRequestError",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "anyOf": [
  8272. {
  8273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8274. },
  8275. {
  8276. "$ref": "#/components/schemas/InvalidRequestError"
  8277. }
  8278. ]
  8279. }
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "description": "Validate and replay a complete sync event history.",
  8285. "summary": "Replay sync events",
  8286. "requestBody": {
  8287. "content": {
  8288. "application/json": {
  8289. "schema": {
  8290. "type": "object",
  8291. "properties": {
  8292. "directory": {
  8293. "type": "string"
  8294. },
  8295. "events": {
  8296. "type": "array",
  8297. "minItems": 1,
  8298. "items": {
  8299. "type": "object",
  8300. "properties": {
  8301. "id": {
  8302. "type": "string",
  8303. "pattern": "^evt_"
  8304. },
  8305. "aggregateID": {
  8306. "type": "string"
  8307. },
  8308. "seq": {
  8309. "type": "integer",
  8310. "minimum": 0
  8311. },
  8312. "type": {
  8313. "type": "string"
  8314. },
  8315. "data": {
  8316. "type": "object"
  8317. }
  8318. },
  8319. "required": ["id", "aggregateID", "seq", "type", "data"],
  8320. "additionalProperties": false
  8321. }
  8322. }
  8323. },
  8324. "required": ["directory", "events"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. }
  8329. },
  8330. "x-codeSamples": [
  8331. {
  8332. "lang": "js",
  8333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/sync/steal": {
  8339. "post": {
  8340. "tags": ["sync"],
  8341. "operationId": "sync.steal",
  8342. "parameters": [
  8343. {
  8344. "name": "directory",
  8345. "in": "query",
  8346. "schema": {
  8347. "type": "string"
  8348. },
  8349. "required": false
  8350. },
  8351. {
  8352. "name": "workspace",
  8353. "in": "query",
  8354. "schema": {
  8355. "type": "string"
  8356. },
  8357. "required": false
  8358. }
  8359. ],
  8360. "responses": {
  8361. "200": {
  8362. "description": "Session stolen into workspace",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "type": "object",
  8367. "properties": {
  8368. "sessionID": {
  8369. "type": "string",
  8370. "pattern": "^ses"
  8371. }
  8372. },
  8373. "required": ["sessionID"],
  8374. "additionalProperties": false,
  8375. "description": "Session stolen into workspace"
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "400": {
  8381. "description": "BadRequest | InvalidRequestError",
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "anyOf": [
  8386. {
  8387. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/InvalidRequestError"
  8391. }
  8392. ]
  8393. }
  8394. }
  8395. }
  8396. }
  8397. },
  8398. "description": "Update a session to belong to the current workspace through the sync event system.",
  8399. "summary": "Steal session into workspace",
  8400. "requestBody": {
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "type": "object",
  8405. "properties": {
  8406. "sessionID": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. }
  8410. },
  8411. "required": ["sessionID"],
  8412. "additionalProperties": false
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/sync/history": {
  8426. "post": {
  8427. "tags": ["sync"],
  8428. "operationId": "sync.history.list",
  8429. "parameters": [
  8430. {
  8431. "name": "directory",
  8432. "in": "query",
  8433. "schema": {
  8434. "type": "string"
  8435. },
  8436. "required": false
  8437. },
  8438. {
  8439. "name": "workspace",
  8440. "in": "query",
  8441. "schema": {
  8442. "type": "string"
  8443. },
  8444. "required": false
  8445. }
  8446. ],
  8447. "responses": {
  8448. "200": {
  8449. "description": "Sync events",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "type": "array",
  8454. "items": {
  8455. "type": "object",
  8456. "properties": {
  8457. "id": {
  8458. "type": "string",
  8459. "pattern": "^evt_"
  8460. },
  8461. "aggregate_id": {
  8462. "type": "string"
  8463. },
  8464. "seq": {
  8465. "type": "integer",
  8466. "minimum": 0
  8467. },
  8468. "type": {
  8469. "type": "string"
  8470. },
  8471. "data": {
  8472. "type": "object"
  8473. }
  8474. },
  8475. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8476. "additionalProperties": false
  8477. },
  8478. "description": "Sync events"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "BadRequest | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. }
  8495. ]
  8496. }
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8502. "summary": "List sync events",
  8503. "requestBody": {
  8504. "content": {
  8505. "application/json": {
  8506. "schema": {
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "integer",
  8510. "minimum": 0
  8511. }
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/tui/append-prompt": {
  8525. "post": {
  8526. "tags": ["tui"],
  8527. "operationId": "tui.appendPrompt",
  8528. "parameters": [
  8529. {
  8530. "name": "directory",
  8531. "in": "query",
  8532. "schema": {
  8533. "type": "string"
  8534. },
  8535. "required": false
  8536. },
  8537. {
  8538. "name": "workspace",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. }
  8545. ],
  8546. "responses": {
  8547. "200": {
  8548. "description": "Prompt processed successfully",
  8549. "content": {
  8550. "application/json": {
  8551. "schema": {
  8552. "type": "boolean",
  8553. "description": "Prompt processed successfully"
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "BadRequest | InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "anyOf": [
  8564. {
  8565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8566. },
  8567. {
  8568. "$ref": "#/components/schemas/InvalidRequestError"
  8569. }
  8570. ]
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Append prompt to the TUI.",
  8577. "summary": "Append TUI prompt",
  8578. "requestBody": {
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "type": "object",
  8583. "properties": {
  8584. "text": {
  8585. "type": "string"
  8586. }
  8587. },
  8588. "required": ["text"],
  8589. "additionalProperties": false
  8590. }
  8591. }
  8592. }
  8593. },
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-help": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openHelp",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Help dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Help dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the help dialog in the TUI to display user assistance information.",
  8648. "summary": "Open help dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-sessions": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openSessions",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Session dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Session dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the session dialog.",
  8703. "summary": "Open sessions dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/open-themes": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.openThemes",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Theme dialog opened successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Theme dialog opened successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Open the theme dialog.",
  8758. "summary": "Open themes dialog",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/open-models": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.openModels",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Model dialog opened successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Model dialog opened successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Open the model dialog.",
  8813. "summary": "Open models dialog",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/submit-prompt": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.submitPrompt",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Prompt submitted successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Prompt submitted successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "Bad request",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/BadRequestError"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Submit the prompt.",
  8868. "summary": "Submit TUI prompt",
  8869. "x-codeSamples": [
  8870. {
  8871. "lang": "js",
  8872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8873. }
  8874. ]
  8875. }
  8876. },
  8877. "/tui/clear-prompt": {
  8878. "post": {
  8879. "tags": ["tui"],
  8880. "operationId": "tui.clearPrompt",
  8881. "parameters": [
  8882. {
  8883. "name": "directory",
  8884. "in": "query",
  8885. "schema": {
  8886. "type": "string"
  8887. },
  8888. "required": false
  8889. },
  8890. {
  8891. "name": "workspace",
  8892. "in": "query",
  8893. "schema": {
  8894. "type": "string"
  8895. },
  8896. "required": false
  8897. }
  8898. ],
  8899. "responses": {
  8900. "200": {
  8901. "description": "Prompt cleared successfully",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "type": "boolean",
  8906. "description": "Prompt cleared successfully"
  8907. }
  8908. }
  8909. }
  8910. },
  8911. "400": {
  8912. "description": "Bad request",
  8913. "content": {
  8914. "application/json": {
  8915. "schema": {
  8916. "$ref": "#/components/schemas/BadRequestError"
  8917. }
  8918. }
  8919. }
  8920. }
  8921. },
  8922. "description": "Clear the prompt.",
  8923. "summary": "Clear TUI prompt",
  8924. "x-codeSamples": [
  8925. {
  8926. "lang": "js",
  8927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8928. }
  8929. ]
  8930. }
  8931. },
  8932. "/tui/execute-command": {
  8933. "post": {
  8934. "tags": ["tui"],
  8935. "operationId": "tui.executeCommand",
  8936. "parameters": [
  8937. {
  8938. "name": "directory",
  8939. "in": "query",
  8940. "schema": {
  8941. "type": "string"
  8942. },
  8943. "required": false
  8944. },
  8945. {
  8946. "name": "workspace",
  8947. "in": "query",
  8948. "schema": {
  8949. "type": "string"
  8950. },
  8951. "required": false
  8952. }
  8953. ],
  8954. "responses": {
  8955. "200": {
  8956. "description": "Command executed successfully",
  8957. "content": {
  8958. "application/json": {
  8959. "schema": {
  8960. "type": "boolean",
  8961. "description": "Command executed successfully"
  8962. }
  8963. }
  8964. }
  8965. },
  8966. "400": {
  8967. "description": "BadRequest | InvalidRequestError",
  8968. "content": {
  8969. "application/json": {
  8970. "schema": {
  8971. "anyOf": [
  8972. {
  8973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/InvalidRequestError"
  8977. }
  8978. ]
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Execute a TUI command.",
  8985. "summary": "Execute TUI command",
  8986. "requestBody": {
  8987. "content": {
  8988. "application/json": {
  8989. "schema": {
  8990. "type": "object",
  8991. "properties": {
  8992. "command": {
  8993. "type": "string"
  8994. }
  8995. },
  8996. "required": ["command"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/show-toast": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.showToast",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Toast notification shown successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Toast notification shown successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "Bad request",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/BadRequestError"
  9050. }
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "description": "Show a toast notification in the TUI.",
  9056. "summary": "Show TUI toast",
  9057. "requestBody": {
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "type": "object",
  9062. "properties": {
  9063. "title": {
  9064. "type": "string"
  9065. },
  9066. "message": {
  9067. "type": "string"
  9068. },
  9069. "variant": {
  9070. "type": "string",
  9071. "enum": ["info", "success", "warning", "error"]
  9072. },
  9073. "duration": {
  9074. "type": "integer",
  9075. "exclusiveMinimum": 0
  9076. }
  9077. },
  9078. "required": ["message", "variant"],
  9079. "additionalProperties": false
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "x-codeSamples": [
  9085. {
  9086. "lang": "js",
  9087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9088. }
  9089. ]
  9090. }
  9091. },
  9092. "/tui/publish": {
  9093. "post": {
  9094. "tags": ["tui"],
  9095. "operationId": "tui.publish",
  9096. "parameters": [
  9097. {
  9098. "name": "directory",
  9099. "in": "query",
  9100. "schema": {
  9101. "type": "string"
  9102. },
  9103. "required": false
  9104. },
  9105. {
  9106. "name": "workspace",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. }
  9113. ],
  9114. "responses": {
  9115. "200": {
  9116. "description": "Event published successfully",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "type": "boolean",
  9121. "description": "Event published successfully"
  9122. }
  9123. }
  9124. }
  9125. },
  9126. "400": {
  9127. "description": "BadRequest | InvalidRequestError",
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "anyOf": [
  9132. {
  9133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9134. },
  9135. {
  9136. "$ref": "#/components/schemas/InvalidRequestError"
  9137. }
  9138. ]
  9139. }
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "description": "Publish a TUI event.",
  9145. "summary": "Publish TUI event",
  9146. "requestBody": {
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "anyOf": [
  9151. {
  9152. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventTuiToastShow"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9162. }
  9163. ]
  9164. }
  9165. }
  9166. }
  9167. },
  9168. "x-codeSamples": [
  9169. {
  9170. "lang": "js",
  9171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9172. }
  9173. ]
  9174. }
  9175. },
  9176. "/tui/select-session": {
  9177. "post": {
  9178. "tags": ["tui"],
  9179. "operationId": "tui.selectSession",
  9180. "parameters": [
  9181. {
  9182. "name": "directory",
  9183. "in": "query",
  9184. "schema": {
  9185. "type": "string"
  9186. },
  9187. "required": false
  9188. },
  9189. {
  9190. "name": "workspace",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. }
  9197. ],
  9198. "responses": {
  9199. "200": {
  9200. "description": "Session selected successfully",
  9201. "content": {
  9202. "application/json": {
  9203. "schema": {
  9204. "type": "boolean",
  9205. "description": "Session selected successfully"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "400": {
  9211. "description": "BadRequest | InvalidRequestError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/InvalidRequestError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "404": {
  9228. "description": "NotFoundError",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/NotFoundError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Navigate the TUI to display the specified session.",
  9239. "summary": "Select session",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "object",
  9245. "properties": {
  9246. "sessionID": {
  9247. "type": "string",
  9248. "pattern": "^ses",
  9249. "description": "Session ID to navigate to"
  9250. }
  9251. },
  9252. "required": ["sessionID"],
  9253. "additionalProperties": false
  9254. }
  9255. }
  9256. }
  9257. },
  9258. "x-codeSamples": [
  9259. {
  9260. "lang": "js",
  9261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9262. }
  9263. ]
  9264. }
  9265. },
  9266. "/tui/control/next": {
  9267. "get": {
  9268. "tags": ["tui"],
  9269. "operationId": "tui.control.next",
  9270. "parameters": [
  9271. {
  9272. "name": "directory",
  9273. "in": "query",
  9274. "schema": {
  9275. "type": "string"
  9276. },
  9277. "required": false
  9278. },
  9279. {
  9280. "name": "workspace",
  9281. "in": "query",
  9282. "schema": {
  9283. "type": "string"
  9284. },
  9285. "required": false
  9286. }
  9287. ],
  9288. "responses": {
  9289. "200": {
  9290. "description": "Next TUI request",
  9291. "content": {
  9292. "application/json": {
  9293. "schema": {
  9294. "type": "object",
  9295. "properties": {
  9296. "path": {
  9297. "type": "string"
  9298. },
  9299. "body": {}
  9300. },
  9301. "required": ["path", "body"],
  9302. "additionalProperties": false,
  9303. "description": "Next TUI request"
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "400": {
  9309. "description": "Bad request",
  9310. "content": {
  9311. "application/json": {
  9312. "schema": {
  9313. "$ref": "#/components/schemas/BadRequestError"
  9314. }
  9315. }
  9316. }
  9317. }
  9318. },
  9319. "description": "Retrieve the next TUI request from the queue for processing.",
  9320. "summary": "Get next TUI request",
  9321. "x-codeSamples": [
  9322. {
  9323. "lang": "js",
  9324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9325. }
  9326. ]
  9327. }
  9328. },
  9329. "/tui/control/response": {
  9330. "post": {
  9331. "tags": ["tui"],
  9332. "operationId": "tui.control.response",
  9333. "parameters": [
  9334. {
  9335. "name": "directory",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. },
  9342. {
  9343. "name": "workspace",
  9344. "in": "query",
  9345. "schema": {
  9346. "type": "string"
  9347. },
  9348. "required": false
  9349. }
  9350. ],
  9351. "responses": {
  9352. "200": {
  9353. "description": "Response submitted successfully",
  9354. "content": {
  9355. "application/json": {
  9356. "schema": {
  9357. "type": "boolean",
  9358. "description": "Response submitted successfully"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9375. "summary": "Submit TUI response",
  9376. "requestBody": {
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {}
  9380. }
  9381. }
  9382. },
  9383. "x-codeSamples": [
  9384. {
  9385. "lang": "js",
  9386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9387. }
  9388. ]
  9389. }
  9390. },
  9391. "/experimental/workspace/adapter": {
  9392. "get": {
  9393. "tags": ["workspace"],
  9394. "operationId": "experimental.workspace.adapter.list",
  9395. "parameters": [
  9396. {
  9397. "name": "directory",
  9398. "in": "query",
  9399. "schema": {
  9400. "type": "string"
  9401. },
  9402. "required": false
  9403. },
  9404. {
  9405. "name": "workspace",
  9406. "in": "query",
  9407. "schema": {
  9408. "type": "string"
  9409. },
  9410. "required": false
  9411. }
  9412. ],
  9413. "responses": {
  9414. "200": {
  9415. "description": "Workspace adapters",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "object",
  9422. "properties": {
  9423. "type": {
  9424. "type": "string"
  9425. },
  9426. "name": {
  9427. "type": "string"
  9428. },
  9429. "description": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "required": ["type", "name", "description"],
  9434. "additionalProperties": false
  9435. },
  9436. "description": "Workspace adapters"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "Bad request",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "$ref": "#/components/schemas/BadRequestError"
  9447. }
  9448. }
  9449. }
  9450. }
  9451. },
  9452. "description": "List all available workspace adapters for the current project.",
  9453. "summary": "List workspace adapters",
  9454. "x-codeSamples": [
  9455. {
  9456. "lang": "js",
  9457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9458. }
  9459. ]
  9460. }
  9461. },
  9462. "/experimental/workspace": {
  9463. "get": {
  9464. "tags": ["workspace"],
  9465. "operationId": "experimental.workspace.list",
  9466. "parameters": [
  9467. {
  9468. "name": "directory",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "workspace",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "responses": {
  9485. "200": {
  9486. "description": "Workspaces",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "type": "array",
  9491. "items": {
  9492. "$ref": "#/components/schemas/Workspace"
  9493. },
  9494. "description": "Workspaces"
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "Bad request",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/BadRequestError"
  9505. }
  9506. }
  9507. }
  9508. }
  9509. },
  9510. "description": "List all workspaces.",
  9511. "summary": "List workspaces",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9516. }
  9517. ]
  9518. },
  9519. "post": {
  9520. "tags": ["workspace"],
  9521. "operationId": "experimental.workspace.create",
  9522. "parameters": [
  9523. {
  9524. "name": "directory",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. },
  9531. {
  9532. "name": "workspace",
  9533. "in": "query",
  9534. "schema": {
  9535. "type": "string"
  9536. },
  9537. "required": false
  9538. }
  9539. ],
  9540. "responses": {
  9541. "200": {
  9542. "description": "Workspace created",
  9543. "content": {
  9544. "application/json": {
  9545. "schema": {
  9546. "$ref": "#/components/schemas/Workspace"
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "400": {
  9552. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "anyOf": [
  9557. {
  9558. "$ref": "#/components/schemas/WorkspaceCreateError"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/InvalidRequestError"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. }
  9571. },
  9572. "description": "Create a workspace for the current project.",
  9573. "summary": "Create workspace",
  9574. "requestBody": {
  9575. "content": {
  9576. "application/json": {
  9577. "schema": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string",
  9582. "pattern": "^wrk"
  9583. },
  9584. "type": {
  9585. "type": "string"
  9586. },
  9587. "branch": {
  9588. "anyOf": [
  9589. {
  9590. "type": "string"
  9591. },
  9592. {
  9593. "type": "null"
  9594. }
  9595. ]
  9596. },
  9597. "extra": {
  9598. "anyOf": [
  9599. {},
  9600. {
  9601. "type": "null"
  9602. }
  9603. ]
  9604. }
  9605. },
  9606. "required": ["type"],
  9607. "additionalProperties": false
  9608. }
  9609. }
  9610. }
  9611. },
  9612. "x-codeSamples": [
  9613. {
  9614. "lang": "js",
  9615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9616. }
  9617. ]
  9618. }
  9619. },
  9620. "/experimental/workspace/sync-list": {
  9621. "post": {
  9622. "tags": ["workspace"],
  9623. "operationId": "experimental.workspace.syncList",
  9624. "parameters": [
  9625. {
  9626. "name": "directory",
  9627. "in": "query",
  9628. "schema": {
  9629. "type": "string"
  9630. },
  9631. "required": false
  9632. },
  9633. {
  9634. "name": "workspace",
  9635. "in": "query",
  9636. "schema": {
  9637. "type": "string"
  9638. },
  9639. "required": false
  9640. }
  9641. ],
  9642. "responses": {
  9643. "204": {
  9644. "description": "Workspace list synced"
  9645. },
  9646. "400": {
  9647. "description": "Bad request",
  9648. "content": {
  9649. "application/json": {
  9650. "schema": {
  9651. "$ref": "#/components/schemas/BadRequestError"
  9652. }
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "description": "Register missing workspaces returned by workspace adapters.",
  9658. "summary": "Sync workspace list",
  9659. "x-codeSamples": [
  9660. {
  9661. "lang": "js",
  9662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "/experimental/workspace/status": {
  9668. "get": {
  9669. "tags": ["workspace"],
  9670. "operationId": "experimental.workspace.status",
  9671. "parameters": [
  9672. {
  9673. "name": "directory",
  9674. "in": "query",
  9675. "schema": {
  9676. "type": "string"
  9677. },
  9678. "required": false
  9679. },
  9680. {
  9681. "name": "workspace",
  9682. "in": "query",
  9683. "schema": {
  9684. "type": "string"
  9685. },
  9686. "required": false
  9687. }
  9688. ],
  9689. "responses": {
  9690. "200": {
  9691. "description": "Workspace status",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "type": "array",
  9696. "items": {
  9697. "type": "object",
  9698. "properties": {
  9699. "workspaceID": {
  9700. "type": "string",
  9701. "pattern": "^wrk"
  9702. },
  9703. "status": {
  9704. "type": "string",
  9705. "enum": ["connected", "connecting", "disconnected", "error"]
  9706. }
  9707. },
  9708. "required": ["workspaceID", "status"],
  9709. "additionalProperties": false
  9710. },
  9711. "description": "Workspace status"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "400": {
  9717. "description": "Bad request",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/BadRequestError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Get connection status for workspaces in the current project.",
  9728. "summary": "Workspace status",
  9729. "x-codeSamples": [
  9730. {
  9731. "lang": "js",
  9732. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9733. }
  9734. ]
  9735. }
  9736. },
  9737. "/experimental/workspace/{id}": {
  9738. "delete": {
  9739. "tags": ["workspace"],
  9740. "operationId": "experimental.workspace.remove",
  9741. "parameters": [
  9742. {
  9743. "name": "id",
  9744. "in": "path",
  9745. "schema": {
  9746. "type": "string",
  9747. "pattern": "^wrk"
  9748. },
  9749. "required": true
  9750. },
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Workspace removed",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "$ref": "#/components/schemas/Workspace"
  9775. }
  9776. }
  9777. }
  9778. },
  9779. "400": {
  9780. "description": "BadRequest | InvalidRequestError",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "anyOf": [
  9785. {
  9786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9787. },
  9788. {
  9789. "$ref": "#/components/schemas/InvalidRequestError"
  9790. }
  9791. ]
  9792. }
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "description": "Remove an existing workspace.",
  9798. "summary": "Remove workspace",
  9799. "x-codeSamples": [
  9800. {
  9801. "lang": "js",
  9802. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "/experimental/workspace/warp": {
  9808. "post": {
  9809. "tags": ["workspace"],
  9810. "operationId": "experimental.workspace.warp",
  9811. "parameters": [
  9812. {
  9813. "name": "directory",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. },
  9820. {
  9821. "name": "workspace",
  9822. "in": "query",
  9823. "schema": {
  9824. "type": "string"
  9825. },
  9826. "required": false
  9827. }
  9828. ],
  9829. "responses": {
  9830. "204": {
  9831. "description": "Session warped"
  9832. },
  9833. "400": {
  9834. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "anyOf": [
  9839. {
  9840. "$ref": "#/components/schemas/WorkspaceWarpError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/VcsApplyError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/InvalidRequestError"
  9847. }
  9848. ]
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "404": {
  9854. "description": "NotFoundError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "$ref": "#/components/schemas/NotFoundError"
  9859. }
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9865. "summary": "Warp session into workspace",
  9866. "requestBody": {
  9867. "content": {
  9868. "application/json": {
  9869. "schema": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "anyOf": [
  9874. {
  9875. "type": "string",
  9876. "pattern": "^wrk"
  9877. },
  9878. {
  9879. "type": "null"
  9880. }
  9881. ]
  9882. },
  9883. "sessionID": {
  9884. "type": "string",
  9885. "pattern": "^ses"
  9886. },
  9887. "copyChanges": {
  9888. "type": "boolean"
  9889. }
  9890. },
  9891. "required": ["id", "sessionID"],
  9892. "additionalProperties": false
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/api/health": {
  9906. "get": {
  9907. "tags": ["opencode HttpApi"],
  9908. "operationId": "v2.health.get",
  9909. "parameters": [],
  9910. "security": [],
  9911. "responses": {
  9912. "200": {
  9913. "description": "Success",
  9914. "content": {
  9915. "application/json": {
  9916. "schema": {
  9917. "type": "object",
  9918. "properties": {
  9919. "healthy": {
  9920. "type": "boolean",
  9921. "enum": [true]
  9922. }
  9923. },
  9924. "required": ["healthy"],
  9925. "additionalProperties": false
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "InvalidRequestError",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/InvalidRequestError"
  9936. }
  9937. }
  9938. }
  9939. },
  9940. "401": {
  9941. "description": "UnauthorizedError",
  9942. "content": {
  9943. "application/json": {
  9944. "schema": {
  9945. "$ref": "#/components/schemas/UnauthorizedError"
  9946. }
  9947. }
  9948. }
  9949. }
  9950. },
  9951. "description": "Check whether the API server is ready to accept requests.",
  9952. "summary": "Check server health",
  9953. "x-codeSamples": [
  9954. {
  9955. "lang": "js",
  9956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9957. }
  9958. ]
  9959. }
  9960. },
  9961. "/api/location": {
  9962. "get": {
  9963. "tags": ["opencode HttpApi"],
  9964. "operationId": "v2.location.get",
  9965. "parameters": [
  9966. {
  9967. "name": "location",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "object",
  9971. "properties": {
  9972. "directory": {
  9973. "type": "string"
  9974. },
  9975. "workspace": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "additionalProperties": false
  9980. },
  9981. "required": false,
  9982. "style": "deepObject",
  9983. "explode": true
  9984. }
  9985. ],
  9986. "security": [],
  9987. "responses": {
  9988. "200": {
  9989. "description": "Location.Info",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "$ref": "#/components/schemas/LocationInfo"
  9994. }
  9995. }
  9996. }
  9997. },
  9998. "400": {
  9999. "description": "InvalidRequestError",
  10000. "content": {
  10001. "application/json": {
  10002. "schema": {
  10003. "$ref": "#/components/schemas/InvalidRequestError"
  10004. }
  10005. }
  10006. }
  10007. },
  10008. "401": {
  10009. "description": "UnauthorizedError",
  10010. "content": {
  10011. "application/json": {
  10012. "schema": {
  10013. "$ref": "#/components/schemas/UnauthorizedError"
  10014. }
  10015. }
  10016. }
  10017. }
  10018. },
  10019. "description": "Resolve the requested location or the server default location.",
  10020. "summary": "Get location",
  10021. "x-codeSamples": [
  10022. {
  10023. "lang": "js",
  10024. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  10025. }
  10026. ]
  10027. }
  10028. },
  10029. "/api/agent": {
  10030. "get": {
  10031. "tags": ["opencode HttpApi"],
  10032. "operationId": "v2.agent.list",
  10033. "parameters": [
  10034. {
  10035. "name": "location",
  10036. "in": "query",
  10037. "schema": {
  10038. "type": "object",
  10039. "properties": {
  10040. "directory": {
  10041. "type": "string"
  10042. },
  10043. "workspace": {
  10044. "type": "string"
  10045. }
  10046. },
  10047. "additionalProperties": false
  10048. },
  10049. "required": false,
  10050. "style": "deepObject",
  10051. "explode": true
  10052. }
  10053. ],
  10054. "security": [],
  10055. "responses": {
  10056. "200": {
  10057. "description": "Success",
  10058. "content": {
  10059. "application/json": {
  10060. "schema": {
  10061. "type": "object",
  10062. "properties": {
  10063. "location": {
  10064. "$ref": "#/components/schemas/LocationInfo"
  10065. },
  10066. "data": {
  10067. "type": "array",
  10068. "items": {
  10069. "$ref": "#/components/schemas/AgentV2Info"
  10070. }
  10071. }
  10072. },
  10073. "required": ["location", "data"],
  10074. "additionalProperties": false
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "400": {
  10080. "description": "InvalidRequestError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/InvalidRequestError"
  10085. }
  10086. }
  10087. }
  10088. },
  10089. "401": {
  10090. "description": "UnauthorizedError",
  10091. "content": {
  10092. "application/json": {
  10093. "schema": {
  10094. "$ref": "#/components/schemas/UnauthorizedError"
  10095. }
  10096. }
  10097. }
  10098. }
  10099. },
  10100. "description": "Retrieve currently registered agents.",
  10101. "summary": "List agents",
  10102. "x-codeSamples": [
  10103. {
  10104. "lang": "js",
  10105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10106. }
  10107. ]
  10108. }
  10109. },
  10110. "/api/session": {
  10111. "get": {
  10112. "tags": ["sessions"],
  10113. "operationId": "v2.session.list",
  10114. "parameters": [
  10115. {
  10116. "name": "workspace",
  10117. "in": "query",
  10118. "schema": {
  10119. "type": "string",
  10120. "pattern": "^wrk"
  10121. },
  10122. "required": false
  10123. },
  10124. {
  10125. "name": "limit",
  10126. "in": "query",
  10127. "schema": {
  10128. "type": "number"
  10129. },
  10130. "required": false
  10131. },
  10132. {
  10133. "name": "order",
  10134. "in": "query",
  10135. "schema": {
  10136. "type": "string",
  10137. "enum": ["asc", "desc"]
  10138. },
  10139. "required": false
  10140. },
  10141. {
  10142. "name": "search",
  10143. "in": "query",
  10144. "schema": {
  10145. "type": "string"
  10146. },
  10147. "required": false
  10148. },
  10149. {
  10150. "name": "directory",
  10151. "in": "query",
  10152. "schema": {
  10153. "type": "string"
  10154. },
  10155. "required": false
  10156. },
  10157. {
  10158. "name": "project",
  10159. "in": "query",
  10160. "schema": {
  10161. "type": "string"
  10162. },
  10163. "required": false
  10164. },
  10165. {
  10166. "name": "subpath",
  10167. "in": "query",
  10168. "schema": {
  10169. "type": "string"
  10170. },
  10171. "required": false
  10172. },
  10173. {
  10174. "name": "cursor",
  10175. "in": "query",
  10176. "schema": {
  10177. "type": "string",
  10178. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10179. },
  10180. "required": false
  10181. }
  10182. ],
  10183. "security": [],
  10184. "responses": {
  10185. "200": {
  10186. "description": "SessionsResponse",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "$ref": "#/components/schemas/SessionsResponse"
  10191. }
  10192. }
  10193. }
  10194. },
  10195. "400": {
  10196. "description": "InvalidCursorError | InvalidRequestError",
  10197. "content": {
  10198. "application/json": {
  10199. "schema": {
  10200. "anyOf": [
  10201. {
  10202. "$ref": "#/components/schemas/InvalidCursorError"
  10203. },
  10204. {
  10205. "$ref": "#/components/schemas/InvalidRequestError"
  10206. },
  10207. {
  10208. "$ref": "#/components/schemas/InvalidRequestError"
  10209. }
  10210. ]
  10211. }
  10212. }
  10213. }
  10214. },
  10215. "401": {
  10216. "description": "UnauthorizedError",
  10217. "content": {
  10218. "application/json": {
  10219. "schema": {
  10220. "$ref": "#/components/schemas/UnauthorizedError"
  10221. }
  10222. }
  10223. }
  10224. }
  10225. },
  10226. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10227. "summary": "List sessions",
  10228. "x-codeSamples": [
  10229. {
  10230. "lang": "js",
  10231. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10232. }
  10233. ]
  10234. },
  10235. "post": {
  10236. "tags": ["sessions"],
  10237. "operationId": "v2.session.create",
  10238. "parameters": [],
  10239. "security": [],
  10240. "responses": {
  10241. "200": {
  10242. "description": "Success",
  10243. "content": {
  10244. "application/json": {
  10245. "schema": {
  10246. "type": "object",
  10247. "properties": {
  10248. "data": {
  10249. "$ref": "#/components/schemas/SessionV2Info"
  10250. }
  10251. },
  10252. "required": ["data"],
  10253. "additionalProperties": false
  10254. }
  10255. }
  10256. }
  10257. },
  10258. "400": {
  10259. "description": "InvalidRequestError",
  10260. "content": {
  10261. "application/json": {
  10262. "schema": {
  10263. "$ref": "#/components/schemas/InvalidRequestError"
  10264. }
  10265. }
  10266. }
  10267. },
  10268. "401": {
  10269. "description": "UnauthorizedError",
  10270. "content": {
  10271. "application/json": {
  10272. "schema": {
  10273. "$ref": "#/components/schemas/UnauthorizedError"
  10274. }
  10275. }
  10276. }
  10277. }
  10278. },
  10279. "description": "Create a session at the requested location.",
  10280. "summary": "Create session",
  10281. "requestBody": {
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "type": "object",
  10286. "properties": {
  10287. "id": {
  10288. "type": "string",
  10289. "pattern": "^ses"
  10290. },
  10291. "agent": {
  10292. "type": "string"
  10293. },
  10294. "model": {
  10295. "type": "object",
  10296. "properties": {
  10297. "id": {
  10298. "type": "string"
  10299. },
  10300. "providerID": {
  10301. "type": "string"
  10302. },
  10303. "variant": {
  10304. "type": "string"
  10305. }
  10306. },
  10307. "required": ["id", "providerID"],
  10308. "additionalProperties": false
  10309. },
  10310. "location": {
  10311. "$ref": "#/components/schemas/LocationRef"
  10312. }
  10313. },
  10314. "additionalProperties": false
  10315. }
  10316. }
  10317. },
  10318. "required": true
  10319. },
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}": {
  10329. "get": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.get",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "200": {
  10346. "description": "Success",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "type": "object",
  10351. "properties": {
  10352. "data": {
  10353. "$ref": "#/components/schemas/SessionV2Info"
  10354. }
  10355. },
  10356. "required": ["data"],
  10357. "additionalProperties": false
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "400": {
  10363. "description": "InvalidRequestError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/InvalidRequestError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "401": {
  10373. "description": "UnauthorizedError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "$ref": "#/components/schemas/UnauthorizedError"
  10378. }
  10379. }
  10380. }
  10381. },
  10382. "404": {
  10383. "description": "SessionNotFoundError",
  10384. "content": {
  10385. "application/json": {
  10386. "schema": {
  10387. "anyOf": [
  10388. {
  10389. "$ref": "#/components/schemas/SessionNotFoundError"
  10390. },
  10391. {
  10392. "$ref": "#/components/schemas/SessionNotFoundError"
  10393. }
  10394. ]
  10395. }
  10396. }
  10397. }
  10398. }
  10399. },
  10400. "description": "Retrieve a session by ID.",
  10401. "summary": "Get session",
  10402. "x-codeSamples": [
  10403. {
  10404. "lang": "js",
  10405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10406. }
  10407. ]
  10408. }
  10409. },
  10410. "/api/session/{sessionID}/prompt": {
  10411. "post": {
  10412. "tags": ["sessions"],
  10413. "operationId": "v2.session.prompt",
  10414. "parameters": [
  10415. {
  10416. "name": "sessionID",
  10417. "in": "path",
  10418. "schema": {
  10419. "type": "string",
  10420. "pattern": "^ses"
  10421. },
  10422. "required": true
  10423. }
  10424. ],
  10425. "security": [],
  10426. "responses": {
  10427. "200": {
  10428. "description": "Success",
  10429. "content": {
  10430. "application/json": {
  10431. "schema": {
  10432. "type": "object",
  10433. "properties": {
  10434. "data": {
  10435. "$ref": "#/components/schemas/SessionInputAdmitted"
  10436. }
  10437. },
  10438. "required": ["data"],
  10439. "additionalProperties": false
  10440. }
  10441. }
  10442. }
  10443. },
  10444. "400": {
  10445. "description": "InvalidRequestError",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "$ref": "#/components/schemas/InvalidRequestError"
  10450. }
  10451. }
  10452. }
  10453. },
  10454. "401": {
  10455. "description": "UnauthorizedError",
  10456. "content": {
  10457. "application/json": {
  10458. "schema": {
  10459. "$ref": "#/components/schemas/UnauthorizedError"
  10460. }
  10461. }
  10462. }
  10463. },
  10464. "404": {
  10465. "description": "SessionNotFoundError",
  10466. "content": {
  10467. "application/json": {
  10468. "schema": {
  10469. "anyOf": [
  10470. {
  10471. "$ref": "#/components/schemas/SessionNotFoundError"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/SessionNotFoundError"
  10475. }
  10476. ]
  10477. }
  10478. }
  10479. }
  10480. },
  10481. "409": {
  10482. "description": "ConflictError",
  10483. "content": {
  10484. "application/json": {
  10485. "schema": {
  10486. "$ref": "#/components/schemas/ConflictError"
  10487. }
  10488. }
  10489. }
  10490. }
  10491. },
  10492. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10493. "summary": "Send message",
  10494. "requestBody": {
  10495. "content": {
  10496. "application/json": {
  10497. "schema": {
  10498. "type": "object",
  10499. "properties": {
  10500. "id": {
  10501. "type": "string",
  10502. "pattern": "^msg_"
  10503. },
  10504. "prompt": {
  10505. "$ref": "#/components/schemas/Prompt"
  10506. },
  10507. "delivery": {
  10508. "type": "string",
  10509. "enum": ["steer", "queue"]
  10510. },
  10511. "resume": {
  10512. "type": "boolean"
  10513. }
  10514. },
  10515. "required": ["prompt"],
  10516. "additionalProperties": false
  10517. }
  10518. }
  10519. },
  10520. "required": true
  10521. },
  10522. "x-codeSamples": [
  10523. {
  10524. "lang": "js",
  10525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10526. }
  10527. ]
  10528. }
  10529. },
  10530. "/api/session/{sessionID}/compact": {
  10531. "post": {
  10532. "tags": ["sessions"],
  10533. "operationId": "v2.session.compact",
  10534. "parameters": [
  10535. {
  10536. "name": "sessionID",
  10537. "in": "path",
  10538. "schema": {
  10539. "type": "string",
  10540. "pattern": "^ses"
  10541. },
  10542. "required": true
  10543. }
  10544. ],
  10545. "security": [],
  10546. "responses": {
  10547. "204": {
  10548. "description": "<No Content>"
  10549. },
  10550. "400": {
  10551. "description": "InvalidRequestError",
  10552. "content": {
  10553. "application/json": {
  10554. "schema": {
  10555. "$ref": "#/components/schemas/InvalidRequestError"
  10556. }
  10557. }
  10558. }
  10559. },
  10560. "401": {
  10561. "description": "UnauthorizedError",
  10562. "content": {
  10563. "application/json": {
  10564. "schema": {
  10565. "$ref": "#/components/schemas/UnauthorizedError"
  10566. }
  10567. }
  10568. }
  10569. },
  10570. "404": {
  10571. "description": "SessionNotFoundError",
  10572. "content": {
  10573. "application/json": {
  10574. "schema": {
  10575. "anyOf": [
  10576. {
  10577. "$ref": "#/components/schemas/SessionNotFoundError"
  10578. },
  10579. {
  10580. "$ref": "#/components/schemas/SessionNotFoundError"
  10581. }
  10582. ]
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "503": {
  10588. "description": "ServiceUnavailableError",
  10589. "content": {
  10590. "application/json": {
  10591. "schema": {
  10592. "$ref": "#/components/schemas/ServiceUnavailableError"
  10593. }
  10594. }
  10595. }
  10596. }
  10597. },
  10598. "description": "Compact a session conversation.",
  10599. "summary": "Compact session",
  10600. "x-codeSamples": [
  10601. {
  10602. "lang": "js",
  10603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10604. }
  10605. ]
  10606. }
  10607. },
  10608. "/api/session/{sessionID}/wait": {
  10609. "post": {
  10610. "tags": ["sessions"],
  10611. "operationId": "v2.session.wait",
  10612. "parameters": [
  10613. {
  10614. "name": "sessionID",
  10615. "in": "path",
  10616. "schema": {
  10617. "type": "string",
  10618. "pattern": "^ses"
  10619. },
  10620. "required": true
  10621. }
  10622. ],
  10623. "security": [],
  10624. "responses": {
  10625. "204": {
  10626. "description": "<No Content>"
  10627. },
  10628. "400": {
  10629. "description": "InvalidRequestError",
  10630. "content": {
  10631. "application/json": {
  10632. "schema": {
  10633. "$ref": "#/components/schemas/InvalidRequestError"
  10634. }
  10635. }
  10636. }
  10637. },
  10638. "401": {
  10639. "description": "UnauthorizedError",
  10640. "content": {
  10641. "application/json": {
  10642. "schema": {
  10643. "$ref": "#/components/schemas/UnauthorizedError"
  10644. }
  10645. }
  10646. }
  10647. },
  10648. "404": {
  10649. "description": "SessionNotFoundError",
  10650. "content": {
  10651. "application/json": {
  10652. "schema": {
  10653. "anyOf": [
  10654. {
  10655. "$ref": "#/components/schemas/SessionNotFoundError"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/SessionNotFoundError"
  10659. }
  10660. ]
  10661. }
  10662. }
  10663. }
  10664. },
  10665. "503": {
  10666. "description": "ServiceUnavailableError",
  10667. "content": {
  10668. "application/json": {
  10669. "schema": {
  10670. "$ref": "#/components/schemas/ServiceUnavailableError"
  10671. }
  10672. }
  10673. }
  10674. }
  10675. },
  10676. "description": "Wait for a session agent loop to become idle.",
  10677. "summary": "Wait for session",
  10678. "x-codeSamples": [
  10679. {
  10680. "lang": "js",
  10681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10682. }
  10683. ]
  10684. }
  10685. },
  10686. "/api/session/{sessionID}/context": {
  10687. "get": {
  10688. "tags": ["sessions"],
  10689. "operationId": "v2.session.context",
  10690. "parameters": [
  10691. {
  10692. "name": "sessionID",
  10693. "in": "path",
  10694. "schema": {
  10695. "type": "string",
  10696. "pattern": "^ses"
  10697. },
  10698. "required": true
  10699. }
  10700. ],
  10701. "security": [],
  10702. "responses": {
  10703. "200": {
  10704. "description": "Success",
  10705. "content": {
  10706. "application/json": {
  10707. "schema": {
  10708. "type": "object",
  10709. "properties": {
  10710. "data": {
  10711. "type": "array",
  10712. "items": {
  10713. "$ref": "#/components/schemas/SessionMessage"
  10714. }
  10715. }
  10716. },
  10717. "required": ["data"],
  10718. "additionalProperties": false
  10719. }
  10720. }
  10721. }
  10722. },
  10723. "400": {
  10724. "description": "InvalidRequestError",
  10725. "content": {
  10726. "application/json": {
  10727. "schema": {
  10728. "$ref": "#/components/schemas/InvalidRequestError"
  10729. }
  10730. }
  10731. }
  10732. },
  10733. "401": {
  10734. "description": "UnauthorizedError",
  10735. "content": {
  10736. "application/json": {
  10737. "schema": {
  10738. "$ref": "#/components/schemas/UnauthorizedError"
  10739. }
  10740. }
  10741. }
  10742. },
  10743. "404": {
  10744. "description": "SessionNotFoundError",
  10745. "content": {
  10746. "application/json": {
  10747. "schema": {
  10748. "anyOf": [
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/SessionNotFoundError"
  10754. }
  10755. ]
  10756. }
  10757. }
  10758. }
  10759. },
  10760. "500": {
  10761. "description": "UnknownError",
  10762. "content": {
  10763. "application/json": {
  10764. "schema": {
  10765. "$ref": "#/components/schemas/UnknownError1"
  10766. }
  10767. }
  10768. }
  10769. }
  10770. },
  10771. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10772. "summary": "Get session context",
  10773. "x-codeSamples": [
  10774. {
  10775. "lang": "js",
  10776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10777. }
  10778. ]
  10779. }
  10780. },
  10781. "/api/session/{sessionID}/message": {
  10782. "get": {
  10783. "tags": ["messages"],
  10784. "operationId": "v2.session.messages",
  10785. "parameters": [
  10786. {
  10787. "name": "sessionID",
  10788. "in": "path",
  10789. "schema": {
  10790. "type": "string",
  10791. "pattern": "^ses"
  10792. },
  10793. "required": true
  10794. },
  10795. {
  10796. "name": "limit",
  10797. "in": "query",
  10798. "schema": {
  10799. "type": "number"
  10800. },
  10801. "required": false
  10802. },
  10803. {
  10804. "name": "order",
  10805. "in": "query",
  10806. "schema": {
  10807. "type": "string",
  10808. "enum": ["asc", "desc"]
  10809. },
  10810. "required": false
  10811. },
  10812. {
  10813. "name": "cursor",
  10814. "in": "query",
  10815. "schema": {
  10816. "type": "string",
  10817. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10818. },
  10819. "required": false
  10820. }
  10821. ],
  10822. "security": [],
  10823. "responses": {
  10824. "200": {
  10825. "description": "SessionMessagesResponse",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/SessionMessagesResponse"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "400": {
  10835. "description": "InvalidCursorError | InvalidRequestError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "anyOf": [
  10840. {
  10841. "$ref": "#/components/schemas/InvalidCursorError"
  10842. },
  10843. {
  10844. "$ref": "#/components/schemas/InvalidRequestError"
  10845. }
  10846. ]
  10847. }
  10848. }
  10849. }
  10850. },
  10851. "401": {
  10852. "description": "UnauthorizedError",
  10853. "content": {
  10854. "application/json": {
  10855. "schema": {
  10856. "$ref": "#/components/schemas/UnauthorizedError"
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "404": {
  10862. "description": "SessionNotFoundError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "anyOf": [
  10867. {
  10868. "$ref": "#/components/schemas/SessionNotFoundError"
  10869. },
  10870. {
  10871. "$ref": "#/components/schemas/SessionNotFoundError"
  10872. }
  10873. ]
  10874. }
  10875. }
  10876. }
  10877. },
  10878. "500": {
  10879. "description": "UnknownError",
  10880. "content": {
  10881. "application/json": {
  10882. "schema": {
  10883. "$ref": "#/components/schemas/UnknownError1"
  10884. }
  10885. }
  10886. }
  10887. }
  10888. },
  10889. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10890. "summary": "Get session messages",
  10891. "x-codeSamples": [
  10892. {
  10893. "lang": "js",
  10894. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10895. }
  10896. ]
  10897. }
  10898. },
  10899. "/api/model": {
  10900. "get": {
  10901. "tags": ["models"],
  10902. "operationId": "v2.model.list",
  10903. "parameters": [
  10904. {
  10905. "name": "location",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "object",
  10909. "properties": {
  10910. "directory": {
  10911. "type": "string"
  10912. },
  10913. "workspace": {
  10914. "type": "string"
  10915. }
  10916. },
  10917. "additionalProperties": false
  10918. },
  10919. "required": false,
  10920. "style": "deepObject",
  10921. "explode": true
  10922. }
  10923. ],
  10924. "security": [],
  10925. "responses": {
  10926. "200": {
  10927. "description": "Success",
  10928. "content": {
  10929. "application/json": {
  10930. "schema": {
  10931. "type": "object",
  10932. "properties": {
  10933. "location": {
  10934. "$ref": "#/components/schemas/LocationInfo"
  10935. },
  10936. "data": {
  10937. "type": "array",
  10938. "items": {
  10939. "$ref": "#/components/schemas/ModelV2Info"
  10940. }
  10941. }
  10942. },
  10943. "required": ["location", "data"],
  10944. "additionalProperties": false
  10945. }
  10946. }
  10947. }
  10948. },
  10949. "400": {
  10950. "description": "InvalidRequestError",
  10951. "content": {
  10952. "application/json": {
  10953. "schema": {
  10954. "$ref": "#/components/schemas/InvalidRequestError"
  10955. }
  10956. }
  10957. }
  10958. },
  10959. "401": {
  10960. "description": "UnauthorizedError",
  10961. "content": {
  10962. "application/json": {
  10963. "schema": {
  10964. "$ref": "#/components/schemas/UnauthorizedError"
  10965. }
  10966. }
  10967. }
  10968. },
  10969. "503": {
  10970. "description": "ServiceUnavailableError",
  10971. "content": {
  10972. "application/json": {
  10973. "schema": {
  10974. "$ref": "#/components/schemas/ServiceUnavailableError"
  10975. }
  10976. }
  10977. }
  10978. }
  10979. },
  10980. "description": "Retrieve available models ordered by release date.",
  10981. "summary": "List models",
  10982. "x-codeSamples": [
  10983. {
  10984. "lang": "js",
  10985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10986. }
  10987. ]
  10988. }
  10989. },
  10990. "/api/provider": {
  10991. "get": {
  10992. "tags": ["providers"],
  10993. "operationId": "v2.provider.list",
  10994. "parameters": [
  10995. {
  10996. "name": "location",
  10997. "in": "query",
  10998. "schema": {
  10999. "type": "object",
  11000. "properties": {
  11001. "directory": {
  11002. "type": "string"
  11003. },
  11004. "workspace": {
  11005. "type": "string"
  11006. }
  11007. },
  11008. "additionalProperties": false
  11009. },
  11010. "required": false,
  11011. "style": "deepObject",
  11012. "explode": true
  11013. }
  11014. ],
  11015. "security": [],
  11016. "responses": {
  11017. "200": {
  11018. "description": "Success",
  11019. "content": {
  11020. "application/json": {
  11021. "schema": {
  11022. "type": "object",
  11023. "properties": {
  11024. "location": {
  11025. "$ref": "#/components/schemas/LocationInfo"
  11026. },
  11027. "data": {
  11028. "type": "array",
  11029. "items": {
  11030. "$ref": "#/components/schemas/ProviderV2Info"
  11031. }
  11032. }
  11033. },
  11034. "required": ["location", "data"],
  11035. "additionalProperties": false
  11036. }
  11037. }
  11038. }
  11039. },
  11040. "400": {
  11041. "description": "InvalidRequestError",
  11042. "content": {
  11043. "application/json": {
  11044. "schema": {
  11045. "$ref": "#/components/schemas/InvalidRequestError"
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "401": {
  11051. "description": "UnauthorizedError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/UnauthorizedError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "503": {
  11061. "description": "ServiceUnavailableError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/ServiceUnavailableError"
  11066. }
  11067. }
  11068. }
  11069. }
  11070. },
  11071. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11072. "summary": "List providers",
  11073. "x-codeSamples": [
  11074. {
  11075. "lang": "js",
  11076. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11077. }
  11078. ]
  11079. }
  11080. },
  11081. "/api/provider/{providerID}": {
  11082. "get": {
  11083. "tags": ["providers"],
  11084. "operationId": "v2.provider.get",
  11085. "parameters": [
  11086. {
  11087. "name": "providerID",
  11088. "in": "path",
  11089. "schema": {
  11090. "type": "string"
  11091. },
  11092. "required": true
  11093. },
  11094. {
  11095. "name": "location",
  11096. "in": "query",
  11097. "schema": {
  11098. "type": "object",
  11099. "properties": {
  11100. "directory": {
  11101. "type": "string"
  11102. },
  11103. "workspace": {
  11104. "type": "string"
  11105. }
  11106. },
  11107. "additionalProperties": false
  11108. },
  11109. "required": false,
  11110. "style": "deepObject",
  11111. "explode": true
  11112. }
  11113. ],
  11114. "security": [],
  11115. "responses": {
  11116. "200": {
  11117. "description": "Success",
  11118. "content": {
  11119. "application/json": {
  11120. "schema": {
  11121. "type": "object",
  11122. "properties": {
  11123. "location": {
  11124. "$ref": "#/components/schemas/LocationInfo"
  11125. },
  11126. "data": {
  11127. "$ref": "#/components/schemas/ProviderV2Info"
  11128. }
  11129. },
  11130. "required": ["location", "data"],
  11131. "additionalProperties": false
  11132. }
  11133. }
  11134. }
  11135. },
  11136. "400": {
  11137. "description": "InvalidRequestError",
  11138. "content": {
  11139. "application/json": {
  11140. "schema": {
  11141. "$ref": "#/components/schemas/InvalidRequestError"
  11142. }
  11143. }
  11144. }
  11145. },
  11146. "401": {
  11147. "description": "UnauthorizedError",
  11148. "content": {
  11149. "application/json": {
  11150. "schema": {
  11151. "$ref": "#/components/schemas/UnauthorizedError"
  11152. }
  11153. }
  11154. }
  11155. },
  11156. "404": {
  11157. "description": "ProviderNotFoundError",
  11158. "content": {
  11159. "application/json": {
  11160. "schema": {
  11161. "$ref": "#/components/schemas/ProviderNotFoundError"
  11162. }
  11163. }
  11164. }
  11165. },
  11166. "503": {
  11167. "description": "ServiceUnavailableError",
  11168. "content": {
  11169. "application/json": {
  11170. "schema": {
  11171. "$ref": "#/components/schemas/ServiceUnavailableError"
  11172. }
  11173. }
  11174. }
  11175. }
  11176. },
  11177. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11178. "summary": "Get provider",
  11179. "x-codeSamples": [
  11180. {
  11181. "lang": "js",
  11182. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11183. }
  11184. ]
  11185. }
  11186. },
  11187. "/api/connector": {
  11188. "get": {
  11189. "tags": ["connectors"],
  11190. "operationId": "v2.connector.list",
  11191. "parameters": [
  11192. {
  11193. "name": "location",
  11194. "in": "query",
  11195. "schema": {
  11196. "type": "object",
  11197. "properties": {
  11198. "directory": {
  11199. "type": "string"
  11200. },
  11201. "workspace": {
  11202. "type": "string"
  11203. }
  11204. },
  11205. "additionalProperties": false
  11206. },
  11207. "required": false,
  11208. "style": "deepObject",
  11209. "explode": true
  11210. }
  11211. ],
  11212. "security": [],
  11213. "responses": {
  11214. "200": {
  11215. "description": "Success",
  11216. "content": {
  11217. "application/json": {
  11218. "schema": {
  11219. "type": "object",
  11220. "properties": {
  11221. "location": {
  11222. "$ref": "#/components/schemas/LocationInfo"
  11223. },
  11224. "data": {
  11225. "type": "array",
  11226. "items": {
  11227. "$ref": "#/components/schemas/ConnectorInfo"
  11228. }
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. }
  11257. },
  11258. "description": "Retrieve available connectors and their authentication methods.",
  11259. "summary": "List connectors",
  11260. "x-codeSamples": [
  11261. {
  11262. "lang": "js",
  11263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.list({\n ...\n})"
  11264. }
  11265. ]
  11266. }
  11267. },
  11268. "/api/connector/{connectorID}": {
  11269. "get": {
  11270. "tags": ["connectors"],
  11271. "operationId": "v2.connector.get",
  11272. "parameters": [
  11273. {
  11274. "name": "connectorID",
  11275. "in": "path",
  11276. "schema": {
  11277. "type": "string"
  11278. },
  11279. "required": true
  11280. },
  11281. {
  11282. "name": "location",
  11283. "in": "query",
  11284. "schema": {
  11285. "type": "object",
  11286. "properties": {
  11287. "directory": {
  11288. "type": "string"
  11289. },
  11290. "workspace": {
  11291. "type": "string"
  11292. }
  11293. },
  11294. "additionalProperties": false
  11295. },
  11296. "required": false,
  11297. "style": "deepObject",
  11298. "explode": true
  11299. }
  11300. ],
  11301. "security": [],
  11302. "responses": {
  11303. "200": {
  11304. "description": "Success",
  11305. "content": {
  11306. "application/json": {
  11307. "schema": {
  11308. "type": "object",
  11309. "properties": {
  11310. "location": {
  11311. "$ref": "#/components/schemas/LocationInfo"
  11312. },
  11313. "data": {
  11314. "$ref": "#/components/schemas/ConnectorInfo"
  11315. }
  11316. },
  11317. "required": ["location", "data"],
  11318. "additionalProperties": false
  11319. }
  11320. }
  11321. }
  11322. },
  11323. "400": {
  11324. "description": "InvalidRequestError",
  11325. "content": {
  11326. "application/json": {
  11327. "schema": {
  11328. "$ref": "#/components/schemas/InvalidRequestError"
  11329. }
  11330. }
  11331. }
  11332. },
  11333. "401": {
  11334. "description": "UnauthorizedError",
  11335. "content": {
  11336. "application/json": {
  11337. "schema": {
  11338. "$ref": "#/components/schemas/UnauthorizedError"
  11339. }
  11340. }
  11341. }
  11342. }
  11343. },
  11344. "description": "Retrieve one connector and its authentication methods.",
  11345. "summary": "Get connector",
  11346. "x-codeSamples": [
  11347. {
  11348. "lang": "js",
  11349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.get({\n ...\n})"
  11350. }
  11351. ]
  11352. }
  11353. },
  11354. "/api/connector/{connectorID}/connect/key": {
  11355. "post": {
  11356. "tags": ["connectors"],
  11357. "operationId": "v2.connector.connect.key",
  11358. "parameters": [
  11359. {
  11360. "name": "connectorID",
  11361. "in": "path",
  11362. "schema": {
  11363. "type": "string"
  11364. },
  11365. "required": true
  11366. },
  11367. {
  11368. "name": "location",
  11369. "in": "query",
  11370. "schema": {
  11371. "type": "object",
  11372. "properties": {
  11373. "directory": {
  11374. "type": "string"
  11375. },
  11376. "workspace": {
  11377. "type": "string"
  11378. }
  11379. },
  11380. "additionalProperties": false
  11381. },
  11382. "required": false,
  11383. "style": "deepObject",
  11384. "explode": true
  11385. }
  11386. ],
  11387. "security": [],
  11388. "responses": {
  11389. "204": {
  11390. "description": "<No Content>"
  11391. },
  11392. "400": {
  11393. "description": "InvalidRequestError",
  11394. "content": {
  11395. "application/json": {
  11396. "schema": {
  11397. "anyOf": [
  11398. {
  11399. "$ref": "#/components/schemas/InvalidRequestError"
  11400. },
  11401. {
  11402. "$ref": "#/components/schemas/InvalidRequestError"
  11403. }
  11404. ]
  11405. }
  11406. }
  11407. }
  11408. },
  11409. "401": {
  11410. "description": "UnauthorizedError",
  11411. "content": {
  11412. "application/json": {
  11413. "schema": {
  11414. "$ref": "#/components/schemas/UnauthorizedError"
  11415. }
  11416. }
  11417. }
  11418. }
  11419. },
  11420. "description": "Run a key authentication method and store the resulting credential.",
  11421. "summary": "Connect with key",
  11422. "requestBody": {
  11423. "content": {
  11424. "application/json": {
  11425. "schema": {
  11426. "type": "object",
  11427. "properties": {
  11428. "methodID": {
  11429. "type": "string"
  11430. },
  11431. "key": {
  11432. "type": "string"
  11433. },
  11434. "inputs": {
  11435. "type": "object",
  11436. "additionalProperties": {
  11437. "type": "string"
  11438. }
  11439. },
  11440. "label": {
  11441. "type": "string"
  11442. }
  11443. },
  11444. "required": ["methodID", "key", "inputs"],
  11445. "additionalProperties": false
  11446. }
  11447. }
  11448. },
  11449. "required": true
  11450. },
  11451. "x-codeSamples": [
  11452. {
  11453. "lang": "js",
  11454. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.key({\n ...\n})"
  11455. }
  11456. ]
  11457. }
  11458. },
  11459. "/api/connector/{connectorID}/connect/oauth": {
  11460. "post": {
  11461. "tags": ["connectors"],
  11462. "operationId": "v2.connector.connect.oauth.begin",
  11463. "parameters": [
  11464. {
  11465. "name": "connectorID",
  11466. "in": "path",
  11467. "schema": {
  11468. "type": "string"
  11469. },
  11470. "required": true
  11471. },
  11472. {
  11473. "name": "location",
  11474. "in": "query",
  11475. "schema": {
  11476. "type": "object",
  11477. "properties": {
  11478. "directory": {
  11479. "type": "string"
  11480. },
  11481. "workspace": {
  11482. "type": "string"
  11483. }
  11484. },
  11485. "additionalProperties": false
  11486. },
  11487. "required": false,
  11488. "style": "deepObject",
  11489. "explode": true
  11490. }
  11491. ],
  11492. "security": [],
  11493. "responses": {
  11494. "200": {
  11495. "description": "Success",
  11496. "content": {
  11497. "application/json": {
  11498. "schema": {
  11499. "type": "object",
  11500. "properties": {
  11501. "location": {
  11502. "$ref": "#/components/schemas/LocationInfo"
  11503. },
  11504. "data": {
  11505. "$ref": "#/components/schemas/ConnectorAttempt"
  11506. }
  11507. },
  11508. "required": ["location", "data"],
  11509. "additionalProperties": false
  11510. }
  11511. }
  11512. }
  11513. },
  11514. "400": {
  11515. "description": "InvalidRequestError",
  11516. "content": {
  11517. "application/json": {
  11518. "schema": {
  11519. "anyOf": [
  11520. {
  11521. "$ref": "#/components/schemas/InvalidRequestError"
  11522. },
  11523. {
  11524. "$ref": "#/components/schemas/InvalidRequestError"
  11525. }
  11526. ]
  11527. }
  11528. }
  11529. }
  11530. },
  11531. "401": {
  11532. "description": "UnauthorizedError",
  11533. "content": {
  11534. "application/json": {
  11535. "schema": {
  11536. "$ref": "#/components/schemas/UnauthorizedError"
  11537. }
  11538. }
  11539. }
  11540. }
  11541. },
  11542. "description": "Start an OAuth attempt and return the authorization details.",
  11543. "summary": "Begin OAuth connection",
  11544. "requestBody": {
  11545. "content": {
  11546. "application/json": {
  11547. "schema": {
  11548. "type": "object",
  11549. "properties": {
  11550. "methodID": {
  11551. "type": "string"
  11552. },
  11553. "inputs": {
  11554. "type": "object",
  11555. "additionalProperties": {
  11556. "type": "string"
  11557. }
  11558. },
  11559. "label": {
  11560. "type": "string"
  11561. }
  11562. },
  11563. "required": ["methodID", "inputs"],
  11564. "additionalProperties": false
  11565. }
  11566. }
  11567. },
  11568. "required": true
  11569. },
  11570. "x-codeSamples": [
  11571. {
  11572. "lang": "js",
  11573. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.begin({\n ...\n})"
  11574. }
  11575. ]
  11576. }
  11577. },
  11578. "/api/connector/oauth/{attemptID}": {
  11579. "get": {
  11580. "tags": ["connectors"],
  11581. "operationId": "v2.connector.connect.oauth.status",
  11582. "parameters": [
  11583. {
  11584. "name": "attemptID",
  11585. "in": "path",
  11586. "schema": {
  11587. "type": "string"
  11588. },
  11589. "required": true
  11590. },
  11591. {
  11592. "name": "location",
  11593. "in": "query",
  11594. "schema": {
  11595. "type": "object",
  11596. "properties": {
  11597. "directory": {
  11598. "type": "string"
  11599. },
  11600. "workspace": {
  11601. "type": "string"
  11602. }
  11603. },
  11604. "additionalProperties": false
  11605. },
  11606. "required": false,
  11607. "style": "deepObject",
  11608. "explode": true
  11609. }
  11610. ],
  11611. "security": [],
  11612. "responses": {
  11613. "200": {
  11614. "description": "Success",
  11615. "content": {
  11616. "application/json": {
  11617. "schema": {
  11618. "type": "object",
  11619. "properties": {
  11620. "location": {
  11621. "$ref": "#/components/schemas/LocationInfo"
  11622. },
  11623. "data": {
  11624. "anyOf": [
  11625. {
  11626. "type": "object",
  11627. "properties": {
  11628. "status": {
  11629. "type": "string",
  11630. "enum": ["pending"]
  11631. },
  11632. "time": {
  11633. "type": "object",
  11634. "properties": {
  11635. "created": {
  11636. "anyOf": [
  11637. {
  11638. "type": "number"
  11639. },
  11640. {
  11641. "type": "string",
  11642. "enum": ["NaN"]
  11643. },
  11644. {
  11645. "type": "string",
  11646. "enum": ["Infinity"]
  11647. },
  11648. {
  11649. "type": "string",
  11650. "enum": ["-Infinity"]
  11651. },
  11652. {
  11653. "type": "string",
  11654. "enum": ["Infinity", "-Infinity", "NaN"]
  11655. }
  11656. ]
  11657. },
  11658. "expires": {
  11659. "anyOf": [
  11660. {
  11661. "type": "number"
  11662. },
  11663. {
  11664. "type": "string",
  11665. "enum": ["NaN"]
  11666. },
  11667. {
  11668. "type": "string",
  11669. "enum": ["Infinity"]
  11670. },
  11671. {
  11672. "type": "string",
  11673. "enum": ["-Infinity"]
  11674. },
  11675. {
  11676. "type": "string",
  11677. "enum": ["Infinity", "-Infinity", "NaN"]
  11678. }
  11679. ]
  11680. }
  11681. },
  11682. "required": ["created", "expires"],
  11683. "additionalProperties": false
  11684. }
  11685. },
  11686. "required": ["status", "time"],
  11687. "additionalProperties": false
  11688. },
  11689. {
  11690. "type": "object",
  11691. "properties": {
  11692. "status": {
  11693. "type": "string",
  11694. "enum": ["complete"]
  11695. },
  11696. "time": {
  11697. "type": "object",
  11698. "properties": {
  11699. "created": {
  11700. "anyOf": [
  11701. {
  11702. "type": "number"
  11703. },
  11704. {
  11705. "type": "string",
  11706. "enum": ["NaN"]
  11707. },
  11708. {
  11709. "type": "string",
  11710. "enum": ["Infinity"]
  11711. },
  11712. {
  11713. "type": "string",
  11714. "enum": ["-Infinity"]
  11715. },
  11716. {
  11717. "type": "string",
  11718. "enum": ["Infinity", "-Infinity", "NaN"]
  11719. }
  11720. ]
  11721. },
  11722. "expires": {
  11723. "anyOf": [
  11724. {
  11725. "type": "number"
  11726. },
  11727. {
  11728. "type": "string",
  11729. "enum": ["NaN"]
  11730. },
  11731. {
  11732. "type": "string",
  11733. "enum": ["Infinity"]
  11734. },
  11735. {
  11736. "type": "string",
  11737. "enum": ["-Infinity"]
  11738. },
  11739. {
  11740. "type": "string",
  11741. "enum": ["Infinity", "-Infinity", "NaN"]
  11742. }
  11743. ]
  11744. }
  11745. },
  11746. "required": ["created", "expires"],
  11747. "additionalProperties": false
  11748. }
  11749. },
  11750. "required": ["status", "time"],
  11751. "additionalProperties": false
  11752. },
  11753. {
  11754. "type": "object",
  11755. "properties": {
  11756. "status": {
  11757. "type": "string",
  11758. "enum": ["failed"]
  11759. },
  11760. "message": {
  11761. "type": "string"
  11762. },
  11763. "time": {
  11764. "type": "object",
  11765. "properties": {
  11766. "created": {
  11767. "anyOf": [
  11768. {
  11769. "type": "number"
  11770. },
  11771. {
  11772. "type": "string",
  11773. "enum": ["NaN"]
  11774. },
  11775. {
  11776. "type": "string",
  11777. "enum": ["Infinity"]
  11778. },
  11779. {
  11780. "type": "string",
  11781. "enum": ["-Infinity"]
  11782. },
  11783. {
  11784. "type": "string",
  11785. "enum": ["Infinity", "-Infinity", "NaN"]
  11786. }
  11787. ]
  11788. },
  11789. "expires": {
  11790. "anyOf": [
  11791. {
  11792. "type": "number"
  11793. },
  11794. {
  11795. "type": "string",
  11796. "enum": ["NaN"]
  11797. },
  11798. {
  11799. "type": "string",
  11800. "enum": ["Infinity"]
  11801. },
  11802. {
  11803. "type": "string",
  11804. "enum": ["-Infinity"]
  11805. },
  11806. {
  11807. "type": "string",
  11808. "enum": ["Infinity", "-Infinity", "NaN"]
  11809. }
  11810. ]
  11811. }
  11812. },
  11813. "required": ["created", "expires"],
  11814. "additionalProperties": false
  11815. }
  11816. },
  11817. "required": ["status", "message", "time"],
  11818. "additionalProperties": false
  11819. },
  11820. {
  11821. "type": "object",
  11822. "properties": {
  11823. "status": {
  11824. "type": "string",
  11825. "enum": ["expired"]
  11826. },
  11827. "time": {
  11828. "type": "object",
  11829. "properties": {
  11830. "created": {
  11831. "anyOf": [
  11832. {
  11833. "type": "number"
  11834. },
  11835. {
  11836. "type": "string",
  11837. "enum": ["NaN"]
  11838. },
  11839. {
  11840. "type": "string",
  11841. "enum": ["Infinity"]
  11842. },
  11843. {
  11844. "type": "string",
  11845. "enum": ["-Infinity"]
  11846. },
  11847. {
  11848. "type": "string",
  11849. "enum": ["Infinity", "-Infinity", "NaN"]
  11850. }
  11851. ]
  11852. },
  11853. "expires": {
  11854. "anyOf": [
  11855. {
  11856. "type": "number"
  11857. },
  11858. {
  11859. "type": "string",
  11860. "enum": ["NaN"]
  11861. },
  11862. {
  11863. "type": "string",
  11864. "enum": ["Infinity"]
  11865. },
  11866. {
  11867. "type": "string",
  11868. "enum": ["-Infinity"]
  11869. },
  11870. {
  11871. "type": "string",
  11872. "enum": ["Infinity", "-Infinity", "NaN"]
  11873. }
  11874. ]
  11875. }
  11876. },
  11877. "required": ["created", "expires"],
  11878. "additionalProperties": false
  11879. }
  11880. },
  11881. "required": ["status", "time"],
  11882. "additionalProperties": false
  11883. }
  11884. ]
  11885. }
  11886. },
  11887. "required": ["location", "data"],
  11888. "additionalProperties": false
  11889. }
  11890. }
  11891. }
  11892. },
  11893. "400": {
  11894. "description": "InvalidRequestError",
  11895. "content": {
  11896. "application/json": {
  11897. "schema": {
  11898. "$ref": "#/components/schemas/InvalidRequestError"
  11899. }
  11900. }
  11901. }
  11902. },
  11903. "401": {
  11904. "description": "UnauthorizedError",
  11905. "content": {
  11906. "application/json": {
  11907. "schema": {
  11908. "$ref": "#/components/schemas/UnauthorizedError"
  11909. }
  11910. }
  11911. }
  11912. }
  11913. },
  11914. "description": "Poll the current status of an OAuth attempt.",
  11915. "summary": "Get OAuth attempt status",
  11916. "x-codeSamples": [
  11917. {
  11918. "lang": "js",
  11919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.status({\n ...\n})"
  11920. }
  11921. ]
  11922. },
  11923. "delete": {
  11924. "tags": ["connectors"],
  11925. "operationId": "v2.connector.connect.oauth.cancel",
  11926. "parameters": [
  11927. {
  11928. "name": "attemptID",
  11929. "in": "path",
  11930. "schema": {
  11931. "type": "string"
  11932. },
  11933. "required": true
  11934. },
  11935. {
  11936. "name": "location",
  11937. "in": "query",
  11938. "schema": {
  11939. "type": "object",
  11940. "properties": {
  11941. "directory": {
  11942. "type": "string"
  11943. },
  11944. "workspace": {
  11945. "type": "string"
  11946. }
  11947. },
  11948. "additionalProperties": false
  11949. },
  11950. "required": false,
  11951. "style": "deepObject",
  11952. "explode": true
  11953. }
  11954. ],
  11955. "security": [],
  11956. "responses": {
  11957. "204": {
  11958. "description": "<No Content>"
  11959. },
  11960. "400": {
  11961. "description": "InvalidRequestError",
  11962. "content": {
  11963. "application/json": {
  11964. "schema": {
  11965. "$ref": "#/components/schemas/InvalidRequestError"
  11966. }
  11967. }
  11968. }
  11969. },
  11970. "401": {
  11971. "description": "UnauthorizedError",
  11972. "content": {
  11973. "application/json": {
  11974. "schema": {
  11975. "$ref": "#/components/schemas/UnauthorizedError"
  11976. }
  11977. }
  11978. }
  11979. }
  11980. },
  11981. "description": "Cancel an OAuth attempt and release its resources.",
  11982. "summary": "Cancel OAuth connection",
  11983. "x-codeSamples": [
  11984. {
  11985. "lang": "js",
  11986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.cancel({\n ...\n})"
  11987. }
  11988. ]
  11989. }
  11990. },
  11991. "/api/connector/oauth/{attemptID}/complete": {
  11992. "post": {
  11993. "tags": ["connectors"],
  11994. "operationId": "v2.connector.connect.oauth.complete",
  11995. "parameters": [
  11996. {
  11997. "name": "attemptID",
  11998. "in": "path",
  11999. "schema": {
  12000. "type": "string"
  12001. },
  12002. "required": true
  12003. },
  12004. {
  12005. "name": "location",
  12006. "in": "query",
  12007. "schema": {
  12008. "type": "object",
  12009. "properties": {
  12010. "directory": {
  12011. "type": "string"
  12012. },
  12013. "workspace": {
  12014. "type": "string"
  12015. }
  12016. },
  12017. "additionalProperties": false
  12018. },
  12019. "required": false,
  12020. "style": "deepObject",
  12021. "explode": true
  12022. }
  12023. ],
  12024. "security": [],
  12025. "responses": {
  12026. "204": {
  12027. "description": "<No Content>"
  12028. },
  12029. "400": {
  12030. "description": "InvalidRequestError",
  12031. "content": {
  12032. "application/json": {
  12033. "schema": {
  12034. "anyOf": [
  12035. {
  12036. "$ref": "#/components/schemas/InvalidRequestError"
  12037. },
  12038. {
  12039. "$ref": "#/components/schemas/InvalidRequestError"
  12040. }
  12041. ]
  12042. }
  12043. }
  12044. }
  12045. },
  12046. "401": {
  12047. "description": "UnauthorizedError",
  12048. "content": {
  12049. "application/json": {
  12050. "schema": {
  12051. "$ref": "#/components/schemas/UnauthorizedError"
  12052. }
  12053. }
  12054. }
  12055. }
  12056. },
  12057. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12058. "summary": "Complete OAuth connection",
  12059. "requestBody": {
  12060. "content": {
  12061. "application/json": {
  12062. "schema": {
  12063. "type": "object",
  12064. "properties": {
  12065. "code": {
  12066. "type": "string"
  12067. }
  12068. },
  12069. "additionalProperties": false
  12070. }
  12071. }
  12072. },
  12073. "required": true
  12074. },
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.connector.connect.oauth.complete({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/permission/request": {
  12084. "get": {
  12085. "tags": ["permissions"],
  12086. "operationId": "v2.permission.request.list",
  12087. "parameters": [
  12088. {
  12089. "name": "location",
  12090. "in": "query",
  12091. "schema": {
  12092. "type": "object",
  12093. "properties": {
  12094. "directory": {
  12095. "type": "string"
  12096. },
  12097. "workspace": {
  12098. "type": "string"
  12099. }
  12100. },
  12101. "additionalProperties": false
  12102. },
  12103. "required": false,
  12104. "style": "deepObject",
  12105. "explode": true
  12106. }
  12107. ],
  12108. "security": [],
  12109. "responses": {
  12110. "200": {
  12111. "description": "Success",
  12112. "content": {
  12113. "application/json": {
  12114. "schema": {
  12115. "type": "object",
  12116. "properties": {
  12117. "location": {
  12118. "$ref": "#/components/schemas/LocationInfo"
  12119. },
  12120. "data": {
  12121. "type": "array",
  12122. "items": {
  12123. "$ref": "#/components/schemas/PermissionV2Request"
  12124. }
  12125. }
  12126. },
  12127. "required": ["location", "data"],
  12128. "additionalProperties": false
  12129. }
  12130. }
  12131. }
  12132. },
  12133. "400": {
  12134. "description": "InvalidRequestError",
  12135. "content": {
  12136. "application/json": {
  12137. "schema": {
  12138. "$ref": "#/components/schemas/InvalidRequestError"
  12139. }
  12140. }
  12141. }
  12142. },
  12143. "401": {
  12144. "description": "UnauthorizedError",
  12145. "content": {
  12146. "application/json": {
  12147. "schema": {
  12148. "$ref": "#/components/schemas/UnauthorizedError"
  12149. }
  12150. }
  12151. }
  12152. }
  12153. },
  12154. "description": "Retrieve pending permission requests for a location.",
  12155. "summary": "List pending permission requests",
  12156. "x-codeSamples": [
  12157. {
  12158. "lang": "js",
  12159. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12160. }
  12161. ]
  12162. }
  12163. },
  12164. "/api/permission/saved": {
  12165. "get": {
  12166. "tags": ["permissions"],
  12167. "operationId": "v2.permission.saved.list",
  12168. "parameters": [
  12169. {
  12170. "name": "projectID",
  12171. "in": "query",
  12172. "schema": {
  12173. "type": "string"
  12174. },
  12175. "required": false
  12176. }
  12177. ],
  12178. "security": [],
  12179. "responses": {
  12180. "200": {
  12181. "description": "Success",
  12182. "content": {
  12183. "application/json": {
  12184. "schema": {
  12185. "type": "object",
  12186. "properties": {
  12187. "data": {
  12188. "type": "array",
  12189. "items": {
  12190. "$ref": "#/components/schemas/PermissionSavedInfo"
  12191. }
  12192. }
  12193. },
  12194. "required": ["data"],
  12195. "additionalProperties": false
  12196. }
  12197. }
  12198. }
  12199. },
  12200. "400": {
  12201. "description": "InvalidRequestError",
  12202. "content": {
  12203. "application/json": {
  12204. "schema": {
  12205. "$ref": "#/components/schemas/InvalidRequestError"
  12206. }
  12207. }
  12208. }
  12209. },
  12210. "401": {
  12211. "description": "UnauthorizedError",
  12212. "content": {
  12213. "application/json": {
  12214. "schema": {
  12215. "$ref": "#/components/schemas/UnauthorizedError"
  12216. }
  12217. }
  12218. }
  12219. }
  12220. },
  12221. "description": "Retrieve saved permissions, optionally filtered by project.",
  12222. "summary": "List saved permissions",
  12223. "x-codeSamples": [
  12224. {
  12225. "lang": "js",
  12226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12227. }
  12228. ]
  12229. }
  12230. },
  12231. "/api/permission/saved/{id}": {
  12232. "delete": {
  12233. "tags": ["permissions"],
  12234. "operationId": "v2.permission.saved.remove",
  12235. "parameters": [
  12236. {
  12237. "name": "id",
  12238. "in": "path",
  12239. "schema": {
  12240. "type": "string"
  12241. },
  12242. "required": true
  12243. }
  12244. ],
  12245. "security": [],
  12246. "responses": {
  12247. "204": {
  12248. "description": "<No Content>"
  12249. },
  12250. "400": {
  12251. "description": "InvalidRequestError",
  12252. "content": {
  12253. "application/json": {
  12254. "schema": {
  12255. "$ref": "#/components/schemas/InvalidRequestError"
  12256. }
  12257. }
  12258. }
  12259. },
  12260. "401": {
  12261. "description": "UnauthorizedError",
  12262. "content": {
  12263. "application/json": {
  12264. "schema": {
  12265. "$ref": "#/components/schemas/UnauthorizedError"
  12266. }
  12267. }
  12268. }
  12269. }
  12270. },
  12271. "description": "Remove a saved permission by ID.",
  12272. "summary": "Remove saved permission",
  12273. "x-codeSamples": [
  12274. {
  12275. "lang": "js",
  12276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12277. }
  12278. ]
  12279. }
  12280. },
  12281. "/api/session/{sessionID}/permission": {
  12282. "get": {
  12283. "tags": ["permissions"],
  12284. "operationId": "v2.session.permission.list",
  12285. "parameters": [
  12286. {
  12287. "name": "sessionID",
  12288. "in": "path",
  12289. "schema": {
  12290. "type": "string",
  12291. "pattern": "^ses"
  12292. },
  12293. "required": true
  12294. }
  12295. ],
  12296. "security": [],
  12297. "responses": {
  12298. "200": {
  12299. "description": "Success",
  12300. "content": {
  12301. "application/json": {
  12302. "schema": {
  12303. "type": "object",
  12304. "properties": {
  12305. "data": {
  12306. "type": "array",
  12307. "items": {
  12308. "$ref": "#/components/schemas/PermissionV2Request"
  12309. }
  12310. }
  12311. },
  12312. "required": ["data"],
  12313. "additionalProperties": false
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "400": {
  12319. "description": "InvalidRequestError",
  12320. "content": {
  12321. "application/json": {
  12322. "schema": {
  12323. "$ref": "#/components/schemas/InvalidRequestError"
  12324. }
  12325. }
  12326. }
  12327. },
  12328. "401": {
  12329. "description": "UnauthorizedError",
  12330. "content": {
  12331. "application/json": {
  12332. "schema": {
  12333. "$ref": "#/components/schemas/UnauthorizedError"
  12334. }
  12335. }
  12336. }
  12337. },
  12338. "404": {
  12339. "description": "SessionNotFoundError",
  12340. "content": {
  12341. "application/json": {
  12342. "schema": {
  12343. "anyOf": [
  12344. {
  12345. "$ref": "#/components/schemas/SessionNotFoundError"
  12346. },
  12347. {
  12348. "$ref": "#/components/schemas/SessionNotFoundError"
  12349. }
  12350. ]
  12351. }
  12352. }
  12353. }
  12354. }
  12355. },
  12356. "description": "Retrieve pending permission requests owned by a session.",
  12357. "summary": "List session permission requests",
  12358. "x-codeSamples": [
  12359. {
  12360. "lang": "js",
  12361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12362. }
  12363. ]
  12364. }
  12365. },
  12366. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12367. "post": {
  12368. "tags": ["permissions"],
  12369. "operationId": "v2.session.permission.reply",
  12370. "parameters": [
  12371. {
  12372. "name": "sessionID",
  12373. "in": "path",
  12374. "schema": {
  12375. "type": "string",
  12376. "pattern": "^ses"
  12377. },
  12378. "required": true
  12379. },
  12380. {
  12381. "name": "requestID",
  12382. "in": "path",
  12383. "schema": {
  12384. "type": "string",
  12385. "pattern": "^per"
  12386. },
  12387. "required": true
  12388. }
  12389. ],
  12390. "security": [],
  12391. "responses": {
  12392. "204": {
  12393. "description": "<No Content>"
  12394. },
  12395. "400": {
  12396. "description": "InvalidRequestError",
  12397. "content": {
  12398. "application/json": {
  12399. "schema": {
  12400. "$ref": "#/components/schemas/InvalidRequestError"
  12401. }
  12402. }
  12403. }
  12404. },
  12405. "401": {
  12406. "description": "UnauthorizedError",
  12407. "content": {
  12408. "application/json": {
  12409. "schema": {
  12410. "$ref": "#/components/schemas/UnauthorizedError"
  12411. }
  12412. }
  12413. }
  12414. },
  12415. "404": {
  12416. "description": "SessionNotFoundError | PermissionNotFoundError",
  12417. "content": {
  12418. "application/json": {
  12419. "schema": {
  12420. "anyOf": [
  12421. {
  12422. "$ref": "#/components/schemas/PermissionNotFoundError"
  12423. },
  12424. {
  12425. "$ref": "#/components/schemas/SessionNotFoundError"
  12426. },
  12427. {
  12428. "$ref": "#/components/schemas/SessionNotFoundError"
  12429. }
  12430. ]
  12431. }
  12432. }
  12433. }
  12434. }
  12435. },
  12436. "description": "Respond to a pending permission request owned by a session.",
  12437. "summary": "Reply to pending permission request",
  12438. "requestBody": {
  12439. "content": {
  12440. "application/json": {
  12441. "schema": {
  12442. "type": "object",
  12443. "properties": {
  12444. "reply": {
  12445. "$ref": "#/components/schemas/PermissionV2Reply"
  12446. },
  12447. "message": {
  12448. "type": "string"
  12449. }
  12450. },
  12451. "required": ["reply"],
  12452. "additionalProperties": false
  12453. }
  12454. }
  12455. },
  12456. "required": true
  12457. },
  12458. "x-codeSamples": [
  12459. {
  12460. "lang": "js",
  12461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12462. }
  12463. ]
  12464. }
  12465. },
  12466. "/api/fs/read": {
  12467. "get": {
  12468. "tags": ["filesystem"],
  12469. "operationId": "v2.fs.read",
  12470. "parameters": [
  12471. {
  12472. "name": "location",
  12473. "in": "query",
  12474. "schema": {
  12475. "type": "object",
  12476. "properties": {
  12477. "directory": {
  12478. "type": "string"
  12479. },
  12480. "workspace": {
  12481. "type": "string"
  12482. }
  12483. },
  12484. "additionalProperties": false
  12485. },
  12486. "required": false,
  12487. "style": "deepObject",
  12488. "explode": true
  12489. },
  12490. {
  12491. "name": "path",
  12492. "in": "query",
  12493. "schema": {
  12494. "type": "string"
  12495. },
  12496. "required": true
  12497. }
  12498. ],
  12499. "security": [],
  12500. "responses": {
  12501. "200": {
  12502. "description": "Success",
  12503. "content": {
  12504. "application/json": {
  12505. "schema": {
  12506. "type": "object",
  12507. "properties": {
  12508. "location": {
  12509. "$ref": "#/components/schemas/LocationInfo"
  12510. },
  12511. "data": {
  12512. "$ref": "#/components/schemas/FileSystemContent"
  12513. }
  12514. },
  12515. "required": ["location", "data"],
  12516. "additionalProperties": false
  12517. }
  12518. }
  12519. }
  12520. },
  12521. "400": {
  12522. "description": "InvalidRequestError",
  12523. "content": {
  12524. "application/json": {
  12525. "schema": {
  12526. "$ref": "#/components/schemas/InvalidRequestError"
  12527. }
  12528. }
  12529. }
  12530. },
  12531. "401": {
  12532. "description": "UnauthorizedError",
  12533. "content": {
  12534. "application/json": {
  12535. "schema": {
  12536. "$ref": "#/components/schemas/UnauthorizedError"
  12537. }
  12538. }
  12539. }
  12540. }
  12541. },
  12542. "description": "Read one file relative to the requested location.",
  12543. "summary": "Read file",
  12544. "x-codeSamples": [
  12545. {
  12546. "lang": "js",
  12547. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12548. }
  12549. ]
  12550. }
  12551. },
  12552. "/api/fs/list": {
  12553. "get": {
  12554. "tags": ["filesystem"],
  12555. "operationId": "v2.fs.list",
  12556. "parameters": [
  12557. {
  12558. "name": "location",
  12559. "in": "query",
  12560. "schema": {
  12561. "type": "object",
  12562. "properties": {
  12563. "directory": {
  12564. "type": "string"
  12565. },
  12566. "workspace": {
  12567. "type": "string"
  12568. }
  12569. },
  12570. "additionalProperties": false
  12571. },
  12572. "required": false,
  12573. "style": "deepObject",
  12574. "explode": true
  12575. },
  12576. {
  12577. "name": "path",
  12578. "in": "query",
  12579. "schema": {
  12580. "type": "string"
  12581. },
  12582. "required": false
  12583. }
  12584. ],
  12585. "security": [],
  12586. "responses": {
  12587. "200": {
  12588. "description": "Success",
  12589. "content": {
  12590. "application/json": {
  12591. "schema": {
  12592. "type": "object",
  12593. "properties": {
  12594. "location": {
  12595. "$ref": "#/components/schemas/LocationInfo"
  12596. },
  12597. "data": {
  12598. "type": "array",
  12599. "items": {
  12600. "$ref": "#/components/schemas/FileSystemEntry"
  12601. }
  12602. }
  12603. },
  12604. "required": ["location", "data"],
  12605. "additionalProperties": false
  12606. }
  12607. }
  12608. }
  12609. },
  12610. "400": {
  12611. "description": "InvalidRequestError",
  12612. "content": {
  12613. "application/json": {
  12614. "schema": {
  12615. "$ref": "#/components/schemas/InvalidRequestError"
  12616. }
  12617. }
  12618. }
  12619. },
  12620. "401": {
  12621. "description": "UnauthorizedError",
  12622. "content": {
  12623. "application/json": {
  12624. "schema": {
  12625. "$ref": "#/components/schemas/UnauthorizedError"
  12626. }
  12627. }
  12628. }
  12629. }
  12630. },
  12631. "description": "List direct children of one directory relative to the requested location.",
  12632. "summary": "List directory",
  12633. "x-codeSamples": [
  12634. {
  12635. "lang": "js",
  12636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12637. }
  12638. ]
  12639. }
  12640. },
  12641. "/api/fs/find": {
  12642. "get": {
  12643. "tags": ["filesystem"],
  12644. "operationId": "v2.fs.find",
  12645. "parameters": [
  12646. {
  12647. "name": "location",
  12648. "in": "query",
  12649. "schema": {
  12650. "type": "object",
  12651. "properties": {
  12652. "directory": {
  12653. "type": "string"
  12654. },
  12655. "workspace": {
  12656. "type": "string"
  12657. }
  12658. },
  12659. "additionalProperties": false
  12660. },
  12661. "required": false,
  12662. "style": "deepObject",
  12663. "explode": true
  12664. },
  12665. {
  12666. "name": "query",
  12667. "in": "query",
  12668. "schema": {
  12669. "type": "string"
  12670. },
  12671. "required": true
  12672. },
  12673. {
  12674. "name": "type",
  12675. "in": "query",
  12676. "schema": {
  12677. "type": "string",
  12678. "enum": ["file", "directory"]
  12679. },
  12680. "required": false
  12681. },
  12682. {
  12683. "name": "limit",
  12684. "in": "query",
  12685. "schema": {
  12686. "type": "string"
  12687. },
  12688. "required": false
  12689. }
  12690. ],
  12691. "security": [],
  12692. "responses": {
  12693. "200": {
  12694. "description": "Success",
  12695. "content": {
  12696. "application/json": {
  12697. "schema": {
  12698. "type": "object",
  12699. "properties": {
  12700. "location": {
  12701. "$ref": "#/components/schemas/LocationInfo"
  12702. },
  12703. "data": {
  12704. "type": "array",
  12705. "items": {
  12706. "$ref": "#/components/schemas/FileSystemEntry"
  12707. }
  12708. }
  12709. },
  12710. "required": ["location", "data"],
  12711. "additionalProperties": false
  12712. }
  12713. }
  12714. }
  12715. },
  12716. "400": {
  12717. "description": "InvalidRequestError",
  12718. "content": {
  12719. "application/json": {
  12720. "schema": {
  12721. "$ref": "#/components/schemas/InvalidRequestError"
  12722. }
  12723. }
  12724. }
  12725. },
  12726. "401": {
  12727. "description": "UnauthorizedError",
  12728. "content": {
  12729. "application/json": {
  12730. "schema": {
  12731. "$ref": "#/components/schemas/UnauthorizedError"
  12732. }
  12733. }
  12734. }
  12735. }
  12736. },
  12737. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12738. "summary": "Find files",
  12739. "x-codeSamples": [
  12740. {
  12741. "lang": "js",
  12742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12743. }
  12744. ]
  12745. }
  12746. },
  12747. "/api/command": {
  12748. "get": {
  12749. "tags": ["commands"],
  12750. "operationId": "v2.command.list",
  12751. "parameters": [
  12752. {
  12753. "name": "location",
  12754. "in": "query",
  12755. "schema": {
  12756. "type": "object",
  12757. "properties": {
  12758. "directory": {
  12759. "type": "string"
  12760. },
  12761. "workspace": {
  12762. "type": "string"
  12763. }
  12764. },
  12765. "additionalProperties": false
  12766. },
  12767. "required": false,
  12768. "style": "deepObject",
  12769. "explode": true
  12770. }
  12771. ],
  12772. "security": [],
  12773. "responses": {
  12774. "200": {
  12775. "description": "Success",
  12776. "content": {
  12777. "application/json": {
  12778. "schema": {
  12779. "type": "object",
  12780. "properties": {
  12781. "location": {
  12782. "$ref": "#/components/schemas/LocationInfo"
  12783. },
  12784. "data": {
  12785. "type": "array",
  12786. "items": {
  12787. "$ref": "#/components/schemas/CommandV2Info"
  12788. }
  12789. }
  12790. },
  12791. "required": ["location", "data"],
  12792. "additionalProperties": false
  12793. }
  12794. }
  12795. }
  12796. },
  12797. "400": {
  12798. "description": "InvalidRequestError",
  12799. "content": {
  12800. "application/json": {
  12801. "schema": {
  12802. "$ref": "#/components/schemas/InvalidRequestError"
  12803. }
  12804. }
  12805. }
  12806. },
  12807. "401": {
  12808. "description": "UnauthorizedError",
  12809. "content": {
  12810. "application/json": {
  12811. "schema": {
  12812. "$ref": "#/components/schemas/UnauthorizedError"
  12813. }
  12814. }
  12815. }
  12816. }
  12817. },
  12818. "description": "Retrieve currently registered commands.",
  12819. "summary": "List commands",
  12820. "x-codeSamples": [
  12821. {
  12822. "lang": "js",
  12823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  12824. }
  12825. ]
  12826. }
  12827. },
  12828. "/api/skill": {
  12829. "get": {
  12830. "tags": ["skills"],
  12831. "operationId": "v2.skill.list",
  12832. "parameters": [
  12833. {
  12834. "name": "location",
  12835. "in": "query",
  12836. "schema": {
  12837. "type": "object",
  12838. "properties": {
  12839. "directory": {
  12840. "type": "string"
  12841. },
  12842. "workspace": {
  12843. "type": "string"
  12844. }
  12845. },
  12846. "additionalProperties": false
  12847. },
  12848. "required": false,
  12849. "style": "deepObject",
  12850. "explode": true
  12851. }
  12852. ],
  12853. "security": [],
  12854. "responses": {
  12855. "200": {
  12856. "description": "Success",
  12857. "content": {
  12858. "application/json": {
  12859. "schema": {
  12860. "type": "object",
  12861. "properties": {
  12862. "location": {
  12863. "$ref": "#/components/schemas/LocationInfo"
  12864. },
  12865. "data": {
  12866. "type": "array",
  12867. "items": {
  12868. "$ref": "#/components/schemas/SkillV2Info"
  12869. }
  12870. }
  12871. },
  12872. "required": ["location", "data"],
  12873. "additionalProperties": false
  12874. }
  12875. }
  12876. }
  12877. },
  12878. "400": {
  12879. "description": "InvalidRequestError",
  12880. "content": {
  12881. "application/json": {
  12882. "schema": {
  12883. "$ref": "#/components/schemas/InvalidRequestError"
  12884. }
  12885. }
  12886. }
  12887. },
  12888. "401": {
  12889. "description": "UnauthorizedError",
  12890. "content": {
  12891. "application/json": {
  12892. "schema": {
  12893. "$ref": "#/components/schemas/UnauthorizedError"
  12894. }
  12895. }
  12896. }
  12897. }
  12898. },
  12899. "description": "Retrieve currently registered skills.",
  12900. "summary": "List skills",
  12901. "x-codeSamples": [
  12902. {
  12903. "lang": "js",
  12904. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12905. }
  12906. ]
  12907. }
  12908. },
  12909. "/api/event": {
  12910. "get": {
  12911. "tags": ["events"],
  12912. "operationId": "v2.event.subscribe",
  12913. "parameters": [
  12914. {
  12915. "name": "location",
  12916. "in": "query",
  12917. "schema": {
  12918. "type": "object",
  12919. "properties": {
  12920. "directory": {
  12921. "type": "string"
  12922. },
  12923. "workspace": {
  12924. "type": "string"
  12925. }
  12926. },
  12927. "additionalProperties": false
  12928. },
  12929. "required": false,
  12930. "style": "deepObject",
  12931. "explode": true
  12932. }
  12933. ],
  12934. "security": [],
  12935. "responses": {
  12936. "200": {
  12937. "description": "Success",
  12938. "content": {
  12939. "text/event-stream": {
  12940. "schema": {
  12941. "type": "string"
  12942. }
  12943. }
  12944. }
  12945. },
  12946. "400": {
  12947. "description": "InvalidRequestError",
  12948. "content": {
  12949. "application/json": {
  12950. "schema": {
  12951. "$ref": "#/components/schemas/InvalidRequestError"
  12952. }
  12953. }
  12954. }
  12955. },
  12956. "401": {
  12957. "description": "UnauthorizedError",
  12958. "content": {
  12959. "application/json": {
  12960. "schema": {
  12961. "$ref": "#/components/schemas/UnauthorizedError"
  12962. }
  12963. }
  12964. }
  12965. }
  12966. },
  12967. "description": "Subscribe to native event payloads for a location.",
  12968. "summary": "Subscribe to events",
  12969. "x-codeSamples": [
  12970. {
  12971. "lang": "js",
  12972. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  12973. }
  12974. ]
  12975. }
  12976. },
  12977. "/api/question/request": {
  12978. "get": {
  12979. "tags": ["session questions"],
  12980. "operationId": "v2.question.request.list",
  12981. "parameters": [
  12982. {
  12983. "name": "location",
  12984. "in": "query",
  12985. "schema": {
  12986. "type": "object",
  12987. "properties": {
  12988. "directory": {
  12989. "type": "string"
  12990. },
  12991. "workspace": {
  12992. "type": "string"
  12993. }
  12994. },
  12995. "additionalProperties": false
  12996. },
  12997. "required": false,
  12998. "style": "deepObject",
  12999. "explode": true
  13000. }
  13001. ],
  13002. "security": [],
  13003. "responses": {
  13004. "200": {
  13005. "description": "Success",
  13006. "content": {
  13007. "application/json": {
  13008. "schema": {
  13009. "type": "object",
  13010. "properties": {
  13011. "location": {
  13012. "$ref": "#/components/schemas/LocationInfo"
  13013. },
  13014. "data": {
  13015. "type": "array",
  13016. "items": {
  13017. "$ref": "#/components/schemas/QuestionV2Request"
  13018. }
  13019. }
  13020. },
  13021. "required": ["location", "data"],
  13022. "additionalProperties": false
  13023. }
  13024. }
  13025. }
  13026. },
  13027. "400": {
  13028. "description": "InvalidRequestError",
  13029. "content": {
  13030. "application/json": {
  13031. "schema": {
  13032. "$ref": "#/components/schemas/InvalidRequestError"
  13033. }
  13034. }
  13035. }
  13036. },
  13037. "401": {
  13038. "description": "UnauthorizedError",
  13039. "content": {
  13040. "application/json": {
  13041. "schema": {
  13042. "$ref": "#/components/schemas/UnauthorizedError"
  13043. }
  13044. }
  13045. }
  13046. }
  13047. },
  13048. "description": "Retrieve pending question requests for a location.",
  13049. "summary": "List pending question requests",
  13050. "x-codeSamples": [
  13051. {
  13052. "lang": "js",
  13053. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13054. }
  13055. ]
  13056. }
  13057. },
  13058. "/api/session/{sessionID}/question": {
  13059. "get": {
  13060. "tags": ["session questions"],
  13061. "operationId": "v2.session.question.list",
  13062. "parameters": [
  13063. {
  13064. "name": "sessionID",
  13065. "in": "path",
  13066. "schema": {
  13067. "type": "string",
  13068. "pattern": "^ses"
  13069. },
  13070. "required": true
  13071. }
  13072. ],
  13073. "security": [],
  13074. "responses": {
  13075. "200": {
  13076. "description": "Success",
  13077. "content": {
  13078. "application/json": {
  13079. "schema": {
  13080. "type": "object",
  13081. "properties": {
  13082. "data": {
  13083. "type": "array",
  13084. "items": {
  13085. "$ref": "#/components/schemas/QuestionV2Request"
  13086. }
  13087. }
  13088. },
  13089. "required": ["data"],
  13090. "additionalProperties": false
  13091. }
  13092. }
  13093. }
  13094. },
  13095. "400": {
  13096. "description": "InvalidRequestError",
  13097. "content": {
  13098. "application/json": {
  13099. "schema": {
  13100. "$ref": "#/components/schemas/InvalidRequestError"
  13101. }
  13102. }
  13103. }
  13104. },
  13105. "401": {
  13106. "description": "UnauthorizedError",
  13107. "content": {
  13108. "application/json": {
  13109. "schema": {
  13110. "$ref": "#/components/schemas/UnauthorizedError"
  13111. }
  13112. }
  13113. }
  13114. },
  13115. "404": {
  13116. "description": "SessionNotFoundError",
  13117. "content": {
  13118. "application/json": {
  13119. "schema": {
  13120. "anyOf": [
  13121. {
  13122. "$ref": "#/components/schemas/SessionNotFoundError"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/SessionNotFoundError"
  13126. }
  13127. ]
  13128. }
  13129. }
  13130. }
  13131. }
  13132. },
  13133. "description": "Retrieve pending question requests owned by a session.",
  13134. "summary": "List session question requests",
  13135. "x-codeSamples": [
  13136. {
  13137. "lang": "js",
  13138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  13139. }
  13140. ]
  13141. }
  13142. },
  13143. "/api/session/{sessionID}/question/{requestID}/reply": {
  13144. "post": {
  13145. "tags": ["session questions"],
  13146. "operationId": "v2.session.question.reply",
  13147. "parameters": [
  13148. {
  13149. "name": "sessionID",
  13150. "in": "path",
  13151. "schema": {
  13152. "type": "string",
  13153. "pattern": "^ses"
  13154. },
  13155. "required": true
  13156. },
  13157. {
  13158. "name": "requestID",
  13159. "in": "path",
  13160. "schema": {
  13161. "type": "string",
  13162. "pattern": "^que"
  13163. },
  13164. "required": true
  13165. }
  13166. ],
  13167. "security": [],
  13168. "responses": {
  13169. "204": {
  13170. "description": "<No Content>"
  13171. },
  13172. "400": {
  13173. "description": "InvalidRequestError",
  13174. "content": {
  13175. "application/json": {
  13176. "schema": {
  13177. "$ref": "#/components/schemas/InvalidRequestError"
  13178. }
  13179. }
  13180. }
  13181. },
  13182. "401": {
  13183. "description": "UnauthorizedError",
  13184. "content": {
  13185. "application/json": {
  13186. "schema": {
  13187. "$ref": "#/components/schemas/UnauthorizedError"
  13188. }
  13189. }
  13190. }
  13191. },
  13192. "404": {
  13193. "description": "SessionNotFoundError | QuestionNotFoundError",
  13194. "content": {
  13195. "application/json": {
  13196. "schema": {
  13197. "anyOf": [
  13198. {
  13199. "$ref": "#/components/schemas/QuestionNotFoundError"
  13200. },
  13201. {
  13202. "$ref": "#/components/schemas/SessionNotFoundError"
  13203. },
  13204. {
  13205. "$ref": "#/components/schemas/SessionNotFoundError"
  13206. }
  13207. ]
  13208. }
  13209. }
  13210. }
  13211. }
  13212. },
  13213. "description": "Answer a pending question request owned by a session.",
  13214. "summary": "Reply to pending question request",
  13215. "requestBody": {
  13216. "content": {
  13217. "application/json": {
  13218. "schema": {
  13219. "$ref": "#/components/schemas/QuestionV2Reply"
  13220. }
  13221. }
  13222. },
  13223. "required": true
  13224. },
  13225. "x-codeSamples": [
  13226. {
  13227. "lang": "js",
  13228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  13229. }
  13230. ]
  13231. }
  13232. },
  13233. "/api/session/{sessionID}/question/{requestID}/reject": {
  13234. "post": {
  13235. "tags": ["session questions"],
  13236. "operationId": "v2.session.question.reject",
  13237. "parameters": [
  13238. {
  13239. "name": "sessionID",
  13240. "in": "path",
  13241. "schema": {
  13242. "type": "string",
  13243. "pattern": "^ses"
  13244. },
  13245. "required": true
  13246. },
  13247. {
  13248. "name": "requestID",
  13249. "in": "path",
  13250. "schema": {
  13251. "type": "string",
  13252. "pattern": "^que"
  13253. },
  13254. "required": true
  13255. }
  13256. ],
  13257. "security": [],
  13258. "responses": {
  13259. "204": {
  13260. "description": "<No Content>"
  13261. },
  13262. "400": {
  13263. "description": "InvalidRequestError",
  13264. "content": {
  13265. "application/json": {
  13266. "schema": {
  13267. "$ref": "#/components/schemas/InvalidRequestError"
  13268. }
  13269. }
  13270. }
  13271. },
  13272. "401": {
  13273. "description": "UnauthorizedError",
  13274. "content": {
  13275. "application/json": {
  13276. "schema": {
  13277. "$ref": "#/components/schemas/UnauthorizedError"
  13278. }
  13279. }
  13280. }
  13281. },
  13282. "404": {
  13283. "description": "SessionNotFoundError | QuestionNotFoundError",
  13284. "content": {
  13285. "application/json": {
  13286. "schema": {
  13287. "anyOf": [
  13288. {
  13289. "$ref": "#/components/schemas/QuestionNotFoundError"
  13290. },
  13291. {
  13292. "$ref": "#/components/schemas/SessionNotFoundError"
  13293. },
  13294. {
  13295. "$ref": "#/components/schemas/SessionNotFoundError"
  13296. }
  13297. ]
  13298. }
  13299. }
  13300. }
  13301. }
  13302. },
  13303. "description": "Reject a pending question request owned by a session.",
  13304. "summary": "Reject pending question request",
  13305. "x-codeSamples": [
  13306. {
  13307. "lang": "js",
  13308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  13309. }
  13310. ]
  13311. }
  13312. },
  13313. "/api/reference": {
  13314. "get": {
  13315. "tags": ["reference"],
  13316. "operationId": "v2.reference.list",
  13317. "parameters": [
  13318. {
  13319. "name": "location",
  13320. "in": "query",
  13321. "schema": {
  13322. "type": "object",
  13323. "properties": {
  13324. "directory": {
  13325. "type": "string"
  13326. },
  13327. "workspace": {
  13328. "type": "string"
  13329. }
  13330. },
  13331. "additionalProperties": false
  13332. },
  13333. "required": false,
  13334. "style": "deepObject",
  13335. "explode": true
  13336. }
  13337. ],
  13338. "security": [],
  13339. "responses": {
  13340. "200": {
  13341. "description": "Success",
  13342. "content": {
  13343. "application/json": {
  13344. "schema": {
  13345. "type": "object",
  13346. "properties": {
  13347. "location": {
  13348. "$ref": "#/components/schemas/LocationInfo"
  13349. },
  13350. "data": {
  13351. "type": "array",
  13352. "items": {
  13353. "$ref": "#/components/schemas/ReferenceInfo"
  13354. }
  13355. }
  13356. },
  13357. "required": ["location", "data"],
  13358. "additionalProperties": false
  13359. }
  13360. }
  13361. }
  13362. },
  13363. "400": {
  13364. "description": "InvalidRequestError",
  13365. "content": {
  13366. "application/json": {
  13367. "schema": {
  13368. "$ref": "#/components/schemas/InvalidRequestError"
  13369. }
  13370. }
  13371. }
  13372. },
  13373. "401": {
  13374. "description": "UnauthorizedError",
  13375. "content": {
  13376. "application/json": {
  13377. "schema": {
  13378. "$ref": "#/components/schemas/UnauthorizedError"
  13379. }
  13380. }
  13381. }
  13382. }
  13383. },
  13384. "description": "List references available in the requested location.",
  13385. "summary": "List references",
  13386. "x-codeSamples": [
  13387. {
  13388. "lang": "js",
  13389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  13390. }
  13391. ]
  13392. }
  13393. },
  13394. "/pty/{ptyID}/connect": {
  13395. "get": {
  13396. "tags": ["pty"],
  13397. "operationId": "pty.connect",
  13398. "parameters": [
  13399. {
  13400. "name": "ptyID",
  13401. "in": "path",
  13402. "schema": {
  13403. "type": "string",
  13404. "pattern": "^pty"
  13405. },
  13406. "required": true
  13407. },
  13408. {
  13409. "in": "query",
  13410. "name": "directory",
  13411. "schema": {
  13412. "type": "string"
  13413. }
  13414. },
  13415. {
  13416. "in": "query",
  13417. "name": "workspace",
  13418. "schema": {
  13419. "type": "string"
  13420. }
  13421. },
  13422. {
  13423. "in": "query",
  13424. "name": "cursor",
  13425. "schema": {
  13426. "type": "string"
  13427. }
  13428. },
  13429. {
  13430. "in": "query",
  13431. "name": "ticket",
  13432. "schema": {
  13433. "type": "string"
  13434. }
  13435. }
  13436. ],
  13437. "responses": {
  13438. "200": {
  13439. "description": "Connected session",
  13440. "content": {
  13441. "application/json": {
  13442. "schema": {
  13443. "type": "boolean",
  13444. "description": "Connected session"
  13445. }
  13446. }
  13447. }
  13448. },
  13449. "403": {
  13450. "description": "Forbidden",
  13451. "content": {
  13452. "application/json": {
  13453. "schema": {
  13454. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  13455. }
  13456. }
  13457. }
  13458. },
  13459. "404": {
  13460. "description": "Not found",
  13461. "content": {
  13462. "application/json": {
  13463. "schema": {
  13464. "$ref": "#/components/schemas/NotFoundError"
  13465. }
  13466. }
  13467. }
  13468. }
  13469. },
  13470. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  13471. "summary": "Connect to PTY session",
  13472. "x-codeSamples": [
  13473. {
  13474. "lang": "js",
  13475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  13476. }
  13477. ]
  13478. }
  13479. }
  13480. },
  13481. "components": {
  13482. "schemas": {
  13483. "Event": {
  13484. "anyOf": [
  13485. {
  13486. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13487. },
  13488. {
  13489. "$ref": "#/components/schemas/EventCredentialAdded"
  13490. },
  13491. {
  13492. "$ref": "#/components/schemas/EventCredentialRemoved"
  13493. },
  13494. {
  13495. "$ref": "#/components/schemas/EventCredentialSwitched"
  13496. },
  13497. {
  13498. "$ref": "#/components/schemas/EventPluginAdded"
  13499. },
  13500. {
  13501. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13502. },
  13503. {
  13504. "$ref": "#/components/schemas/EventSessionCreated"
  13505. },
  13506. {
  13507. "$ref": "#/components/schemas/EventSessionUpdated"
  13508. },
  13509. {
  13510. "$ref": "#/components/schemas/EventSessionDeleted"
  13511. },
  13512. {
  13513. "$ref": "#/components/schemas/EventMessageUpdated"
  13514. },
  13515. {
  13516. "$ref": "#/components/schemas/EventMessageRemoved"
  13517. },
  13518. {
  13519. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13520. },
  13521. {
  13522. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13523. },
  13524. {
  13525. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13526. },
  13527. {
  13528. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13529. },
  13530. {
  13531. "$ref": "#/components/schemas/EventSessionNextMoved"
  13532. },
  13533. {
  13534. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13535. },
  13536. {
  13537. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  13538. },
  13539. {
  13540. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  13541. },
  13542. {
  13543. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  13544. },
  13545. {
  13546. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  13547. },
  13548. {
  13549. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13550. },
  13551. {
  13552. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13553. },
  13554. {
  13555. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13556. },
  13557. {
  13558. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13559. },
  13560. {
  13561. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13562. },
  13563. {
  13564. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13565. },
  13566. {
  13567. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13568. },
  13569. {
  13570. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13571. },
  13572. {
  13573. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13574. },
  13575. {
  13576. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13577. },
  13578. {
  13579. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13580. },
  13581. {
  13582. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13583. },
  13584. {
  13585. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13586. },
  13587. {
  13588. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13589. },
  13590. {
  13591. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13592. },
  13593. {
  13594. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13595. },
  13596. {
  13597. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13598. },
  13599. {
  13600. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13601. },
  13602. {
  13603. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13604. },
  13605. {
  13606. "$ref": "#/components/schemas/EventSessionNextRetried"
  13607. },
  13608. {
  13609. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13610. },
  13611. {
  13612. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13613. },
  13614. {
  13615. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13616. },
  13617. {
  13618. "$ref": "#/components/schemas/EventMessagePartDelta"
  13619. },
  13620. {
  13621. "$ref": "#/components/schemas/EventSessionDiff"
  13622. },
  13623. {
  13624. "$ref": "#/components/schemas/EventSessionError"
  13625. },
  13626. {
  13627. "$ref": "#/components/schemas/EventInstallationUpdated"
  13628. },
  13629. {
  13630. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13631. },
  13632. {
  13633. "$ref": "#/components/schemas/EventFileEdited"
  13634. },
  13635. {
  13636. "$ref": "#/components/schemas/EventConnectorUpdated"
  13637. },
  13638. {
  13639. "$ref": "#/components/schemas/EventPermissionV2Asked"
  13640. },
  13641. {
  13642. "$ref": "#/components/schemas/EventPermissionV2Replied"
  13643. },
  13644. {
  13645. "$ref": "#/components/schemas/EventReferenceUpdated"
  13646. },
  13647. {
  13648. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  13649. },
  13650. {
  13651. "$ref": "#/components/schemas/EventPtyCreated"
  13652. },
  13653. {
  13654. "$ref": "#/components/schemas/EventPtyUpdated"
  13655. },
  13656. {
  13657. "$ref": "#/components/schemas/EventPtyExited"
  13658. },
  13659. {
  13660. "$ref": "#/components/schemas/EventPtyDeleted"
  13661. },
  13662. {
  13663. "$ref": "#/components/schemas/EventQuestionV2Asked"
  13664. },
  13665. {
  13666. "$ref": "#/components/schemas/EventQuestionV2Replied"
  13667. },
  13668. {
  13669. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  13670. },
  13671. {
  13672. "$ref": "#/components/schemas/EventTodoUpdated"
  13673. },
  13674. {
  13675. "$ref": "#/components/schemas/EventLspUpdated"
  13676. },
  13677. {
  13678. "$ref": "#/components/schemas/EventPermissionAsked"
  13679. },
  13680. {
  13681. "$ref": "#/components/schemas/EventPermissionReplied"
  13682. },
  13683. {
  13684. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13685. },
  13686. {
  13687. "$ref": "#/components/schemas/Event.tui.command.execute"
  13688. },
  13689. {
  13690. "$ref": "#/components/schemas/Event.tui.toast.show"
  13691. },
  13692. {
  13693. "$ref": "#/components/schemas/Event.tui.session.select"
  13694. },
  13695. {
  13696. "$ref": "#/components/schemas/EventMcpToolsChanged"
  13697. },
  13698. {
  13699. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  13700. },
  13701. {
  13702. "$ref": "#/components/schemas/EventCommandExecuted"
  13703. },
  13704. {
  13705. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  13706. },
  13707. {
  13708. "$ref": "#/components/schemas/EventProjectUpdated"
  13709. },
  13710. {
  13711. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  13712. },
  13713. {
  13714. "$ref": "#/components/schemas/EventQuestionAsked"
  13715. },
  13716. {
  13717. "$ref": "#/components/schemas/EventQuestionReplied"
  13718. },
  13719. {
  13720. "$ref": "#/components/schemas/EventQuestionRejected"
  13721. },
  13722. {
  13723. "$ref": "#/components/schemas/EventSessionStatus"
  13724. },
  13725. {
  13726. "$ref": "#/components/schemas/EventSessionIdle"
  13727. },
  13728. {
  13729. "$ref": "#/components/schemas/EventSessionCompacted"
  13730. },
  13731. {
  13732. "$ref": "#/components/schemas/EventWorktreeReady"
  13733. },
  13734. {
  13735. "$ref": "#/components/schemas/EventWorktreeFailed"
  13736. },
  13737. {
  13738. "$ref": "#/components/schemas/EventWorkspaceReady"
  13739. },
  13740. {
  13741. "$ref": "#/components/schemas/EventWorkspaceFailed"
  13742. },
  13743. {
  13744. "$ref": "#/components/schemas/EventWorkspaceStatus"
  13745. },
  13746. {
  13747. "$ref": "#/components/schemas/EventServerConnected"
  13748. },
  13749. {
  13750. "$ref": "#/components/schemas/EventGlobalDisposed"
  13751. },
  13752. {
  13753. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  13754. }
  13755. ]
  13756. },
  13757. "QuestionReplied": {
  13758. "type": "object",
  13759. "properties": {
  13760. "sessionID": {
  13761. "type": "string",
  13762. "pattern": "^ses"
  13763. },
  13764. "requestID": {
  13765. "type": "string",
  13766. "pattern": "^que"
  13767. },
  13768. "answers": {
  13769. "type": "array",
  13770. "items": {
  13771. "$ref": "#/components/schemas/QuestionAnswer"
  13772. }
  13773. }
  13774. },
  13775. "required": ["sessionID", "requestID", "answers"],
  13776. "additionalProperties": false
  13777. },
  13778. "QuestionRejected": {
  13779. "type": "object",
  13780. "properties": {
  13781. "sessionID": {
  13782. "type": "string",
  13783. "pattern": "^ses"
  13784. },
  13785. "requestID": {
  13786. "type": "string",
  13787. "pattern": "^que"
  13788. }
  13789. },
  13790. "required": ["sessionID", "requestID"],
  13791. "additionalProperties": false
  13792. },
  13793. "OAuth": {
  13794. "type": "object",
  13795. "properties": {
  13796. "type": {
  13797. "type": "string",
  13798. "enum": ["oauth"]
  13799. },
  13800. "refresh": {
  13801. "type": "string"
  13802. },
  13803. "access": {
  13804. "type": "string"
  13805. },
  13806. "expires": {
  13807. "type": "integer",
  13808. "minimum": 0
  13809. },
  13810. "accountId": {
  13811. "type": "string"
  13812. },
  13813. "enterpriseUrl": {
  13814. "type": "string"
  13815. }
  13816. },
  13817. "required": ["type", "refresh", "access", "expires"],
  13818. "additionalProperties": false
  13819. },
  13820. "ApiAuth": {
  13821. "type": "object",
  13822. "properties": {
  13823. "type": {
  13824. "type": "string",
  13825. "enum": ["api"]
  13826. },
  13827. "key": {
  13828. "type": "string"
  13829. },
  13830. "metadata": {
  13831. "type": "object",
  13832. "additionalProperties": {
  13833. "type": "string"
  13834. }
  13835. }
  13836. },
  13837. "required": ["type", "key"],
  13838. "additionalProperties": false
  13839. },
  13840. "WellKnownAuth": {
  13841. "type": "object",
  13842. "properties": {
  13843. "type": {
  13844. "type": "string",
  13845. "enum": ["wellknown"]
  13846. },
  13847. "key": {
  13848. "type": "string"
  13849. },
  13850. "token": {
  13851. "type": "string"
  13852. }
  13853. },
  13854. "required": ["type", "key", "token"],
  13855. "additionalProperties": false
  13856. },
  13857. "Auth": {
  13858. "anyOf": [
  13859. {
  13860. "$ref": "#/components/schemas/OAuth"
  13861. },
  13862. {
  13863. "$ref": "#/components/schemas/ApiAuth"
  13864. },
  13865. {
  13866. "$ref": "#/components/schemas/WellKnownAuth"
  13867. }
  13868. ]
  13869. },
  13870. "effect_HttpApiError_BadRequest": {
  13871. "type": "object",
  13872. "properties": {
  13873. "_tag": {
  13874. "type": "string",
  13875. "enum": ["BadRequest"]
  13876. }
  13877. },
  13878. "required": ["_tag"],
  13879. "additionalProperties": false
  13880. },
  13881. "InvalidRequestError": {
  13882. "type": "object",
  13883. "properties": {
  13884. "_tag": {
  13885. "type": "string",
  13886. "enum": ["InvalidRequestError"]
  13887. },
  13888. "message": {
  13889. "type": "string"
  13890. },
  13891. "kind": {
  13892. "type": "string"
  13893. },
  13894. "field": {
  13895. "type": "string"
  13896. }
  13897. },
  13898. "required": ["_tag", "message"],
  13899. "additionalProperties": false
  13900. },
  13901. "MoveSessionError": {
  13902. "type": "object",
  13903. "properties": {
  13904. "name": {
  13905. "type": "string",
  13906. "enum": ["MoveSessionError"]
  13907. },
  13908. "data": {
  13909. "type": "object",
  13910. "properties": {
  13911. "message": {
  13912. "type": "string"
  13913. }
  13914. },
  13915. "required": ["message"],
  13916. "additionalProperties": false
  13917. }
  13918. },
  13919. "required": ["name", "data"],
  13920. "additionalProperties": false
  13921. },
  13922. "SnapshotFileDiff": {
  13923. "type": "object",
  13924. "properties": {
  13925. "file": {
  13926. "type": "string"
  13927. },
  13928. "patch": {
  13929. "type": "string"
  13930. },
  13931. "additions": {
  13932. "type": "number"
  13933. },
  13934. "deletions": {
  13935. "type": "number"
  13936. },
  13937. "status": {
  13938. "type": "string",
  13939. "enum": ["added", "deleted", "modified"]
  13940. }
  13941. },
  13942. "required": ["additions", "deletions"],
  13943. "additionalProperties": false
  13944. },
  13945. "PermissionAction": {
  13946. "type": "string",
  13947. "enum": ["allow", "deny", "ask"]
  13948. },
  13949. "PermissionRule": {
  13950. "type": "object",
  13951. "properties": {
  13952. "permission": {
  13953. "type": "string"
  13954. },
  13955. "pattern": {
  13956. "type": "string"
  13957. },
  13958. "action": {
  13959. "$ref": "#/components/schemas/PermissionAction"
  13960. }
  13961. },
  13962. "required": ["permission", "pattern", "action"],
  13963. "additionalProperties": false
  13964. },
  13965. "PermissionRuleset": {
  13966. "type": "array",
  13967. "items": {
  13968. "$ref": "#/components/schemas/PermissionRule"
  13969. }
  13970. },
  13971. "Session": {
  13972. "type": "object",
  13973. "properties": {
  13974. "id": {
  13975. "type": "string",
  13976. "pattern": "^ses"
  13977. },
  13978. "slug": {
  13979. "type": "string"
  13980. },
  13981. "projectID": {
  13982. "type": "string"
  13983. },
  13984. "workspaceID": {
  13985. "type": "string",
  13986. "pattern": "^wrk"
  13987. },
  13988. "directory": {
  13989. "type": "string"
  13990. },
  13991. "path": {
  13992. "type": "string"
  13993. },
  13994. "parentID": {
  13995. "type": "string",
  13996. "pattern": "^ses"
  13997. },
  13998. "summary": {
  13999. "type": "object",
  14000. "properties": {
  14001. "additions": {
  14002. "type": "number"
  14003. },
  14004. "deletions": {
  14005. "type": "number"
  14006. },
  14007. "files": {
  14008. "type": "number"
  14009. },
  14010. "diffs": {
  14011. "type": "array",
  14012. "items": {
  14013. "$ref": "#/components/schemas/SnapshotFileDiff"
  14014. }
  14015. }
  14016. },
  14017. "required": ["additions", "deletions", "files"],
  14018. "additionalProperties": false
  14019. },
  14020. "cost": {
  14021. "type": "number"
  14022. },
  14023. "tokens": {
  14024. "type": "object",
  14025. "properties": {
  14026. "input": {
  14027. "type": "number"
  14028. },
  14029. "output": {
  14030. "type": "number"
  14031. },
  14032. "reasoning": {
  14033. "type": "number"
  14034. },
  14035. "cache": {
  14036. "type": "object",
  14037. "properties": {
  14038. "read": {
  14039. "type": "number"
  14040. },
  14041. "write": {
  14042. "type": "number"
  14043. }
  14044. },
  14045. "required": ["read", "write"],
  14046. "additionalProperties": false
  14047. }
  14048. },
  14049. "required": ["input", "output", "reasoning", "cache"],
  14050. "additionalProperties": false
  14051. },
  14052. "share": {
  14053. "type": "object",
  14054. "properties": {
  14055. "url": {
  14056. "type": "string"
  14057. }
  14058. },
  14059. "required": ["url"],
  14060. "additionalProperties": false
  14061. },
  14062. "title": {
  14063. "type": "string"
  14064. },
  14065. "agent": {
  14066. "type": "string"
  14067. },
  14068. "model": {
  14069. "type": "object",
  14070. "properties": {
  14071. "id": {
  14072. "type": "string"
  14073. },
  14074. "providerID": {
  14075. "type": "string"
  14076. },
  14077. "variant": {
  14078. "type": "string"
  14079. }
  14080. },
  14081. "required": ["id", "providerID"],
  14082. "additionalProperties": false
  14083. },
  14084. "version": {
  14085. "type": "string"
  14086. },
  14087. "metadata": {
  14088. "type": "object"
  14089. },
  14090. "time": {
  14091. "type": "object",
  14092. "properties": {
  14093. "created": {
  14094. "type": "integer",
  14095. "minimum": 0
  14096. },
  14097. "updated": {
  14098. "type": "integer",
  14099. "minimum": 0
  14100. },
  14101. "compacting": {
  14102. "type": "integer",
  14103. "minimum": 0
  14104. },
  14105. "archived": {
  14106. "type": "number"
  14107. }
  14108. },
  14109. "required": ["created", "updated"],
  14110. "additionalProperties": false
  14111. },
  14112. "permission": {
  14113. "$ref": "#/components/schemas/PermissionRuleset"
  14114. },
  14115. "revert": {
  14116. "type": "object",
  14117. "properties": {
  14118. "messageID": {
  14119. "type": "string",
  14120. "pattern": "^msg"
  14121. },
  14122. "partID": {
  14123. "type": "string",
  14124. "pattern": "^prt"
  14125. },
  14126. "snapshot": {
  14127. "type": "string"
  14128. },
  14129. "diff": {
  14130. "type": "string"
  14131. }
  14132. },
  14133. "required": ["messageID"],
  14134. "additionalProperties": false
  14135. }
  14136. },
  14137. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  14138. "additionalProperties": false
  14139. },
  14140. "OutputFormatText": {
  14141. "type": "object",
  14142. "properties": {
  14143. "type": {
  14144. "type": "string",
  14145. "enum": ["text"]
  14146. }
  14147. },
  14148. "required": ["type"],
  14149. "additionalProperties": false
  14150. },
  14151. "JSONSchema": {
  14152. "type": "object"
  14153. },
  14154. "OutputFormatJsonSchema": {
  14155. "type": "object",
  14156. "properties": {
  14157. "type": {
  14158. "type": "string",
  14159. "enum": ["json_schema"]
  14160. },
  14161. "schema": {
  14162. "$ref": "#/components/schemas/JSONSchema"
  14163. },
  14164. "retryCount": {
  14165. "type": "integer",
  14166. "minimum": 0
  14167. }
  14168. },
  14169. "required": ["type", "schema"],
  14170. "additionalProperties": false
  14171. },
  14172. "OutputFormat": {
  14173. "anyOf": [
  14174. {
  14175. "$ref": "#/components/schemas/OutputFormatText"
  14176. },
  14177. {
  14178. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  14179. }
  14180. ]
  14181. },
  14182. "UserMessage": {
  14183. "type": "object",
  14184. "properties": {
  14185. "id": {
  14186. "type": "string",
  14187. "pattern": "^msg"
  14188. },
  14189. "sessionID": {
  14190. "type": "string",
  14191. "pattern": "^ses"
  14192. },
  14193. "role": {
  14194. "type": "string",
  14195. "enum": ["user"]
  14196. },
  14197. "time": {
  14198. "type": "object",
  14199. "properties": {
  14200. "created": {
  14201. "type": "number",
  14202. "minimum": 0
  14203. }
  14204. },
  14205. "required": ["created"],
  14206. "additionalProperties": false
  14207. },
  14208. "format": {
  14209. "$ref": "#/components/schemas/OutputFormat"
  14210. },
  14211. "summary": {
  14212. "type": "object",
  14213. "properties": {
  14214. "title": {
  14215. "type": "string"
  14216. },
  14217. "body": {
  14218. "type": "string"
  14219. },
  14220. "diffs": {
  14221. "type": "array",
  14222. "items": {
  14223. "$ref": "#/components/schemas/SnapshotFileDiff"
  14224. }
  14225. }
  14226. },
  14227. "required": ["diffs"],
  14228. "additionalProperties": false
  14229. },
  14230. "agent": {
  14231. "type": "string"
  14232. },
  14233. "model": {
  14234. "type": "object",
  14235. "properties": {
  14236. "providerID": {
  14237. "type": "string"
  14238. },
  14239. "modelID": {
  14240. "type": "string"
  14241. },
  14242. "variant": {
  14243. "type": "string"
  14244. }
  14245. },
  14246. "required": ["providerID", "modelID"],
  14247. "additionalProperties": false
  14248. },
  14249. "system": {
  14250. "type": "string"
  14251. },
  14252. "tools": {
  14253. "type": "object",
  14254. "additionalProperties": {
  14255. "type": "boolean"
  14256. }
  14257. }
  14258. },
  14259. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  14260. "additionalProperties": false
  14261. },
  14262. "ProviderAuthError": {
  14263. "type": "object",
  14264. "properties": {
  14265. "name": {
  14266. "type": "string",
  14267. "enum": ["ProviderAuthError"]
  14268. },
  14269. "data": {
  14270. "type": "object",
  14271. "properties": {
  14272. "providerID": {
  14273. "type": "string"
  14274. },
  14275. "message": {
  14276. "type": "string"
  14277. }
  14278. },
  14279. "required": ["providerID", "message"],
  14280. "additionalProperties": false
  14281. }
  14282. },
  14283. "required": ["name", "data"],
  14284. "additionalProperties": false
  14285. },
  14286. "UnknownError": {
  14287. "type": "object",
  14288. "properties": {
  14289. "name": {
  14290. "type": "string",
  14291. "enum": ["UnknownError"]
  14292. },
  14293. "data": {
  14294. "type": "object",
  14295. "properties": {
  14296. "message": {
  14297. "type": "string"
  14298. },
  14299. "ref": {
  14300. "type": "string"
  14301. }
  14302. },
  14303. "required": ["message"],
  14304. "additionalProperties": false
  14305. }
  14306. },
  14307. "required": ["name", "data"],
  14308. "additionalProperties": false
  14309. },
  14310. "MessageOutputLengthError": {
  14311. "type": "object",
  14312. "properties": {
  14313. "name": {
  14314. "type": "string",
  14315. "enum": ["MessageOutputLengthError"]
  14316. },
  14317. "data": {
  14318. "type": "object",
  14319. "properties": {}
  14320. }
  14321. },
  14322. "required": ["name", "data"],
  14323. "additionalProperties": false
  14324. },
  14325. "MessageAbortedError": {
  14326. "type": "object",
  14327. "properties": {
  14328. "name": {
  14329. "type": "string",
  14330. "enum": ["MessageAbortedError"]
  14331. },
  14332. "data": {
  14333. "type": "object",
  14334. "properties": {
  14335. "message": {
  14336. "type": "string"
  14337. }
  14338. },
  14339. "required": ["message"],
  14340. "additionalProperties": false
  14341. }
  14342. },
  14343. "required": ["name", "data"],
  14344. "additionalProperties": false
  14345. },
  14346. "StructuredOutputError": {
  14347. "type": "object",
  14348. "properties": {
  14349. "name": {
  14350. "type": "string",
  14351. "enum": ["StructuredOutputError"]
  14352. },
  14353. "data": {
  14354. "type": "object",
  14355. "properties": {
  14356. "message": {
  14357. "type": "string"
  14358. },
  14359. "retries": {
  14360. "type": "integer",
  14361. "minimum": 0
  14362. }
  14363. },
  14364. "required": ["message", "retries"],
  14365. "additionalProperties": false
  14366. }
  14367. },
  14368. "required": ["name", "data"],
  14369. "additionalProperties": false
  14370. },
  14371. "ContextOverflowError": {
  14372. "type": "object",
  14373. "properties": {
  14374. "name": {
  14375. "type": "string",
  14376. "enum": ["ContextOverflowError"]
  14377. },
  14378. "data": {
  14379. "type": "object",
  14380. "properties": {
  14381. "message": {
  14382. "type": "string"
  14383. },
  14384. "responseBody": {
  14385. "type": "string"
  14386. }
  14387. },
  14388. "required": ["message"],
  14389. "additionalProperties": false
  14390. }
  14391. },
  14392. "required": ["name", "data"],
  14393. "additionalProperties": false
  14394. },
  14395. "APIError": {
  14396. "type": "object",
  14397. "properties": {
  14398. "name": {
  14399. "type": "string",
  14400. "enum": ["APIError"]
  14401. },
  14402. "data": {
  14403. "type": "object",
  14404. "properties": {
  14405. "message": {
  14406. "type": "string"
  14407. },
  14408. "statusCode": {
  14409. "type": "integer",
  14410. "minimum": 0
  14411. },
  14412. "isRetryable": {
  14413. "type": "boolean"
  14414. },
  14415. "responseHeaders": {
  14416. "type": "object",
  14417. "additionalProperties": {
  14418. "type": "string"
  14419. }
  14420. },
  14421. "responseBody": {
  14422. "type": "string"
  14423. },
  14424. "metadata": {
  14425. "type": "object",
  14426. "additionalProperties": {
  14427. "type": "string"
  14428. }
  14429. }
  14430. },
  14431. "required": ["message", "isRetryable"],
  14432. "additionalProperties": false
  14433. }
  14434. },
  14435. "required": ["name", "data"],
  14436. "additionalProperties": false
  14437. },
  14438. "AssistantMessage": {
  14439. "type": "object",
  14440. "properties": {
  14441. "id": {
  14442. "type": "string",
  14443. "pattern": "^msg"
  14444. },
  14445. "sessionID": {
  14446. "type": "string",
  14447. "pattern": "^ses"
  14448. },
  14449. "role": {
  14450. "type": "string",
  14451. "enum": ["assistant"]
  14452. },
  14453. "time": {
  14454. "type": "object",
  14455. "properties": {
  14456. "created": {
  14457. "type": "integer",
  14458. "minimum": 0
  14459. },
  14460. "completed": {
  14461. "type": "integer",
  14462. "minimum": 0
  14463. }
  14464. },
  14465. "required": ["created"],
  14466. "additionalProperties": false
  14467. },
  14468. "error": {
  14469. "anyOf": [
  14470. {
  14471. "$ref": "#/components/schemas/ProviderAuthError"
  14472. },
  14473. {
  14474. "$ref": "#/components/schemas/UnknownError"
  14475. },
  14476. {
  14477. "$ref": "#/components/schemas/MessageOutputLengthError"
  14478. },
  14479. {
  14480. "$ref": "#/components/schemas/MessageAbortedError"
  14481. },
  14482. {
  14483. "$ref": "#/components/schemas/StructuredOutputError"
  14484. },
  14485. {
  14486. "$ref": "#/components/schemas/ContextOverflowError"
  14487. },
  14488. {
  14489. "$ref": "#/components/schemas/APIError"
  14490. }
  14491. ]
  14492. },
  14493. "parentID": {
  14494. "type": "string",
  14495. "pattern": "^msg"
  14496. },
  14497. "modelID": {
  14498. "type": "string"
  14499. },
  14500. "providerID": {
  14501. "type": "string"
  14502. },
  14503. "mode": {
  14504. "type": "string"
  14505. },
  14506. "agent": {
  14507. "type": "string"
  14508. },
  14509. "path": {
  14510. "type": "object",
  14511. "properties": {
  14512. "cwd": {
  14513. "type": "string"
  14514. },
  14515. "root": {
  14516. "type": "string"
  14517. }
  14518. },
  14519. "required": ["cwd", "root"],
  14520. "additionalProperties": false
  14521. },
  14522. "summary": {
  14523. "type": "boolean"
  14524. },
  14525. "cost": {
  14526. "type": "number"
  14527. },
  14528. "tokens": {
  14529. "type": "object",
  14530. "properties": {
  14531. "total": {
  14532. "type": "number"
  14533. },
  14534. "input": {
  14535. "type": "number"
  14536. },
  14537. "output": {
  14538. "type": "number"
  14539. },
  14540. "reasoning": {
  14541. "type": "number"
  14542. },
  14543. "cache": {
  14544. "type": "object",
  14545. "properties": {
  14546. "read": {
  14547. "type": "number"
  14548. },
  14549. "write": {
  14550. "type": "number"
  14551. }
  14552. },
  14553. "required": ["read", "write"],
  14554. "additionalProperties": false
  14555. }
  14556. },
  14557. "required": ["input", "output", "reasoning", "cache"],
  14558. "additionalProperties": false
  14559. },
  14560. "structured": {},
  14561. "variant": {
  14562. "type": "string"
  14563. },
  14564. "finish": {
  14565. "type": "string"
  14566. }
  14567. },
  14568. "required": [
  14569. "id",
  14570. "sessionID",
  14571. "role",
  14572. "time",
  14573. "parentID",
  14574. "modelID",
  14575. "providerID",
  14576. "mode",
  14577. "agent",
  14578. "path",
  14579. "cost",
  14580. "tokens"
  14581. ],
  14582. "additionalProperties": false
  14583. },
  14584. "Message": {
  14585. "anyOf": [
  14586. {
  14587. "$ref": "#/components/schemas/UserMessage"
  14588. },
  14589. {
  14590. "$ref": "#/components/schemas/AssistantMessage"
  14591. }
  14592. ]
  14593. },
  14594. "TextPart": {
  14595. "type": "object",
  14596. "properties": {
  14597. "id": {
  14598. "type": "string",
  14599. "pattern": "^prt"
  14600. },
  14601. "sessionID": {
  14602. "type": "string",
  14603. "pattern": "^ses"
  14604. },
  14605. "messageID": {
  14606. "type": "string",
  14607. "pattern": "^msg"
  14608. },
  14609. "type": {
  14610. "type": "string",
  14611. "enum": ["text"]
  14612. },
  14613. "text": {
  14614. "type": "string"
  14615. },
  14616. "synthetic": {
  14617. "type": "boolean"
  14618. },
  14619. "ignored": {
  14620. "type": "boolean"
  14621. },
  14622. "time": {
  14623. "type": "object",
  14624. "properties": {
  14625. "start": {
  14626. "type": "integer",
  14627. "minimum": 0
  14628. },
  14629. "end": {
  14630. "type": "integer",
  14631. "minimum": 0
  14632. }
  14633. },
  14634. "required": ["start"],
  14635. "additionalProperties": false
  14636. },
  14637. "metadata": {
  14638. "type": "object"
  14639. }
  14640. },
  14641. "required": ["id", "sessionID", "messageID", "type", "text"],
  14642. "additionalProperties": false
  14643. },
  14644. "SubtaskPart": {
  14645. "type": "object",
  14646. "properties": {
  14647. "id": {
  14648. "type": "string",
  14649. "pattern": "^prt"
  14650. },
  14651. "sessionID": {
  14652. "type": "string",
  14653. "pattern": "^ses"
  14654. },
  14655. "messageID": {
  14656. "type": "string",
  14657. "pattern": "^msg"
  14658. },
  14659. "type": {
  14660. "type": "string",
  14661. "enum": ["subtask"]
  14662. },
  14663. "prompt": {
  14664. "type": "string"
  14665. },
  14666. "description": {
  14667. "type": "string"
  14668. },
  14669. "agent": {
  14670. "type": "string"
  14671. },
  14672. "model": {
  14673. "type": "object",
  14674. "properties": {
  14675. "providerID": {
  14676. "type": "string"
  14677. },
  14678. "modelID": {
  14679. "type": "string"
  14680. }
  14681. },
  14682. "required": ["providerID", "modelID"],
  14683. "additionalProperties": false
  14684. },
  14685. "command": {
  14686. "type": "string"
  14687. }
  14688. },
  14689. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  14690. "additionalProperties": false
  14691. },
  14692. "ReasoningPart": {
  14693. "type": "object",
  14694. "properties": {
  14695. "id": {
  14696. "type": "string",
  14697. "pattern": "^prt"
  14698. },
  14699. "sessionID": {
  14700. "type": "string",
  14701. "pattern": "^ses"
  14702. },
  14703. "messageID": {
  14704. "type": "string",
  14705. "pattern": "^msg"
  14706. },
  14707. "type": {
  14708. "type": "string",
  14709. "enum": ["reasoning"]
  14710. },
  14711. "text": {
  14712. "type": "string"
  14713. },
  14714. "metadata": {
  14715. "type": "object"
  14716. },
  14717. "time": {
  14718. "type": "object",
  14719. "properties": {
  14720. "start": {
  14721. "type": "integer",
  14722. "minimum": 0
  14723. },
  14724. "end": {
  14725. "type": "integer",
  14726. "minimum": 0
  14727. }
  14728. },
  14729. "required": ["start"],
  14730. "additionalProperties": false
  14731. }
  14732. },
  14733. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  14734. "additionalProperties": false
  14735. },
  14736. "FilePartSourceText": {
  14737. "type": "object",
  14738. "properties": {
  14739. "value": {
  14740. "type": "string"
  14741. },
  14742. "start": {
  14743. "type": "number"
  14744. },
  14745. "end": {
  14746. "type": "number"
  14747. }
  14748. },
  14749. "required": ["value", "start", "end"],
  14750. "additionalProperties": false
  14751. },
  14752. "FileSource": {
  14753. "type": "object",
  14754. "properties": {
  14755. "text": {
  14756. "$ref": "#/components/schemas/FilePartSourceText"
  14757. },
  14758. "type": {
  14759. "type": "string",
  14760. "enum": ["file"]
  14761. },
  14762. "path": {
  14763. "type": "string"
  14764. }
  14765. },
  14766. "required": ["text", "type", "path"],
  14767. "additionalProperties": false
  14768. },
  14769. "Range": {
  14770. "type": "object",
  14771. "properties": {
  14772. "start": {
  14773. "type": "object",
  14774. "properties": {
  14775. "line": {
  14776. "type": "integer",
  14777. "minimum": 0
  14778. },
  14779. "character": {
  14780. "type": "integer",
  14781. "minimum": 0
  14782. }
  14783. },
  14784. "required": ["line", "character"],
  14785. "additionalProperties": false
  14786. },
  14787. "end": {
  14788. "type": "object",
  14789. "properties": {
  14790. "line": {
  14791. "type": "integer",
  14792. "minimum": 0
  14793. },
  14794. "character": {
  14795. "type": "integer",
  14796. "minimum": 0
  14797. }
  14798. },
  14799. "required": ["line", "character"],
  14800. "additionalProperties": false
  14801. }
  14802. },
  14803. "required": ["start", "end"],
  14804. "additionalProperties": false
  14805. },
  14806. "SymbolSource": {
  14807. "type": "object",
  14808. "properties": {
  14809. "text": {
  14810. "$ref": "#/components/schemas/FilePartSourceText"
  14811. },
  14812. "type": {
  14813. "type": "string",
  14814. "enum": ["symbol"]
  14815. },
  14816. "path": {
  14817. "type": "string"
  14818. },
  14819. "range": {
  14820. "$ref": "#/components/schemas/Range"
  14821. },
  14822. "name": {
  14823. "type": "string"
  14824. },
  14825. "kind": {
  14826. "type": "integer",
  14827. "minimum": 0
  14828. }
  14829. },
  14830. "required": ["text", "type", "path", "range", "name", "kind"],
  14831. "additionalProperties": false
  14832. },
  14833. "ResourceSource": {
  14834. "type": "object",
  14835. "properties": {
  14836. "text": {
  14837. "$ref": "#/components/schemas/FilePartSourceText"
  14838. },
  14839. "type": {
  14840. "type": "string",
  14841. "enum": ["resource"]
  14842. },
  14843. "clientName": {
  14844. "type": "string"
  14845. },
  14846. "uri": {
  14847. "type": "string"
  14848. }
  14849. },
  14850. "required": ["text", "type", "clientName", "uri"],
  14851. "additionalProperties": false
  14852. },
  14853. "FilePartSource": {
  14854. "anyOf": [
  14855. {
  14856. "$ref": "#/components/schemas/FileSource"
  14857. },
  14858. {
  14859. "$ref": "#/components/schemas/SymbolSource"
  14860. },
  14861. {
  14862. "$ref": "#/components/schemas/ResourceSource"
  14863. }
  14864. ]
  14865. },
  14866. "FilePart": {
  14867. "type": "object",
  14868. "properties": {
  14869. "id": {
  14870. "type": "string",
  14871. "pattern": "^prt"
  14872. },
  14873. "sessionID": {
  14874. "type": "string",
  14875. "pattern": "^ses"
  14876. },
  14877. "messageID": {
  14878. "type": "string",
  14879. "pattern": "^msg"
  14880. },
  14881. "type": {
  14882. "type": "string",
  14883. "enum": ["file"]
  14884. },
  14885. "mime": {
  14886. "type": "string"
  14887. },
  14888. "filename": {
  14889. "type": "string"
  14890. },
  14891. "url": {
  14892. "type": "string"
  14893. },
  14894. "source": {
  14895. "$ref": "#/components/schemas/FilePartSource"
  14896. }
  14897. },
  14898. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  14899. "additionalProperties": false
  14900. },
  14901. "ToolStatePending": {
  14902. "type": "object",
  14903. "properties": {
  14904. "status": {
  14905. "type": "string",
  14906. "enum": ["pending"]
  14907. },
  14908. "input": {
  14909. "type": "object"
  14910. },
  14911. "raw": {
  14912. "type": "string"
  14913. }
  14914. },
  14915. "required": ["status", "input", "raw"],
  14916. "additionalProperties": false
  14917. },
  14918. "ToolStateRunning": {
  14919. "type": "object",
  14920. "properties": {
  14921. "status": {
  14922. "type": "string",
  14923. "enum": ["running"]
  14924. },
  14925. "input": {
  14926. "type": "object"
  14927. },
  14928. "title": {
  14929. "type": "string"
  14930. },
  14931. "metadata": {
  14932. "type": "object"
  14933. },
  14934. "time": {
  14935. "type": "object",
  14936. "properties": {
  14937. "start": {
  14938. "type": "integer",
  14939. "minimum": 0
  14940. }
  14941. },
  14942. "required": ["start"],
  14943. "additionalProperties": false
  14944. }
  14945. },
  14946. "required": ["status", "input", "time"],
  14947. "additionalProperties": false
  14948. },
  14949. "ToolStateCompleted": {
  14950. "type": "object",
  14951. "properties": {
  14952. "status": {
  14953. "type": "string",
  14954. "enum": ["completed"]
  14955. },
  14956. "input": {
  14957. "type": "object"
  14958. },
  14959. "output": {
  14960. "type": "string"
  14961. },
  14962. "title": {
  14963. "type": "string"
  14964. },
  14965. "metadata": {
  14966. "type": "object"
  14967. },
  14968. "time": {
  14969. "type": "object",
  14970. "properties": {
  14971. "start": {
  14972. "type": "integer",
  14973. "minimum": 0
  14974. },
  14975. "end": {
  14976. "type": "integer",
  14977. "minimum": 0
  14978. },
  14979. "compacted": {
  14980. "type": "integer",
  14981. "minimum": 0
  14982. }
  14983. },
  14984. "required": ["start", "end"],
  14985. "additionalProperties": false
  14986. },
  14987. "attachments": {
  14988. "type": "array",
  14989. "items": {
  14990. "$ref": "#/components/schemas/FilePart"
  14991. }
  14992. }
  14993. },
  14994. "required": ["status", "input", "output", "title", "metadata", "time"],
  14995. "additionalProperties": false
  14996. },
  14997. "ToolStateError": {
  14998. "type": "object",
  14999. "properties": {
  15000. "status": {
  15001. "type": "string",
  15002. "enum": ["error"]
  15003. },
  15004. "input": {
  15005. "type": "object"
  15006. },
  15007. "error": {
  15008. "type": "string"
  15009. },
  15010. "metadata": {
  15011. "type": "object"
  15012. },
  15013. "time": {
  15014. "type": "object",
  15015. "properties": {
  15016. "start": {
  15017. "type": "integer",
  15018. "minimum": 0
  15019. },
  15020. "end": {
  15021. "type": "integer",
  15022. "minimum": 0
  15023. }
  15024. },
  15025. "required": ["start", "end"],
  15026. "additionalProperties": false
  15027. }
  15028. },
  15029. "required": ["status", "input", "error", "time"],
  15030. "additionalProperties": false
  15031. },
  15032. "ToolState": {
  15033. "anyOf": [
  15034. {
  15035. "$ref": "#/components/schemas/ToolStatePending"
  15036. },
  15037. {
  15038. "$ref": "#/components/schemas/ToolStateRunning"
  15039. },
  15040. {
  15041. "$ref": "#/components/schemas/ToolStateCompleted"
  15042. },
  15043. {
  15044. "$ref": "#/components/schemas/ToolStateError"
  15045. }
  15046. ]
  15047. },
  15048. "ToolPart": {
  15049. "type": "object",
  15050. "properties": {
  15051. "id": {
  15052. "type": "string",
  15053. "pattern": "^prt"
  15054. },
  15055. "sessionID": {
  15056. "type": "string",
  15057. "pattern": "^ses"
  15058. },
  15059. "messageID": {
  15060. "type": "string",
  15061. "pattern": "^msg"
  15062. },
  15063. "type": {
  15064. "type": "string",
  15065. "enum": ["tool"]
  15066. },
  15067. "callID": {
  15068. "type": "string"
  15069. },
  15070. "tool": {
  15071. "type": "string"
  15072. },
  15073. "state": {
  15074. "$ref": "#/components/schemas/ToolState"
  15075. },
  15076. "metadata": {
  15077. "type": "object"
  15078. }
  15079. },
  15080. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  15081. "additionalProperties": false
  15082. },
  15083. "StepStartPart": {
  15084. "type": "object",
  15085. "properties": {
  15086. "id": {
  15087. "type": "string",
  15088. "pattern": "^prt"
  15089. },
  15090. "sessionID": {
  15091. "type": "string",
  15092. "pattern": "^ses"
  15093. },
  15094. "messageID": {
  15095. "type": "string",
  15096. "pattern": "^msg"
  15097. },
  15098. "type": {
  15099. "type": "string",
  15100. "enum": ["step-start"]
  15101. },
  15102. "snapshot": {
  15103. "type": "string"
  15104. }
  15105. },
  15106. "required": ["id", "sessionID", "messageID", "type"],
  15107. "additionalProperties": false
  15108. },
  15109. "StepFinishPart": {
  15110. "type": "object",
  15111. "properties": {
  15112. "id": {
  15113. "type": "string",
  15114. "pattern": "^prt"
  15115. },
  15116. "sessionID": {
  15117. "type": "string",
  15118. "pattern": "^ses"
  15119. },
  15120. "messageID": {
  15121. "type": "string",
  15122. "pattern": "^msg"
  15123. },
  15124. "type": {
  15125. "type": "string",
  15126. "enum": ["step-finish"]
  15127. },
  15128. "reason": {
  15129. "type": "string"
  15130. },
  15131. "snapshot": {
  15132. "type": "string"
  15133. },
  15134. "cost": {
  15135. "type": "number"
  15136. },
  15137. "tokens": {
  15138. "type": "object",
  15139. "properties": {
  15140. "total": {
  15141. "type": "number"
  15142. },
  15143. "input": {
  15144. "type": "number"
  15145. },
  15146. "output": {
  15147. "type": "number"
  15148. },
  15149. "reasoning": {
  15150. "type": "number"
  15151. },
  15152. "cache": {
  15153. "type": "object",
  15154. "properties": {
  15155. "read": {
  15156. "type": "number"
  15157. },
  15158. "write": {
  15159. "type": "number"
  15160. }
  15161. },
  15162. "required": ["read", "write"],
  15163. "additionalProperties": false
  15164. }
  15165. },
  15166. "required": ["input", "output", "reasoning", "cache"],
  15167. "additionalProperties": false
  15168. }
  15169. },
  15170. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  15171. "additionalProperties": false
  15172. },
  15173. "SnapshotPart": {
  15174. "type": "object",
  15175. "properties": {
  15176. "id": {
  15177. "type": "string",
  15178. "pattern": "^prt"
  15179. },
  15180. "sessionID": {
  15181. "type": "string",
  15182. "pattern": "^ses"
  15183. },
  15184. "messageID": {
  15185. "type": "string",
  15186. "pattern": "^msg"
  15187. },
  15188. "type": {
  15189. "type": "string",
  15190. "enum": ["snapshot"]
  15191. },
  15192. "snapshot": {
  15193. "type": "string"
  15194. }
  15195. },
  15196. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  15197. "additionalProperties": false
  15198. },
  15199. "PatchPart": {
  15200. "type": "object",
  15201. "properties": {
  15202. "id": {
  15203. "type": "string",
  15204. "pattern": "^prt"
  15205. },
  15206. "sessionID": {
  15207. "type": "string",
  15208. "pattern": "^ses"
  15209. },
  15210. "messageID": {
  15211. "type": "string",
  15212. "pattern": "^msg"
  15213. },
  15214. "type": {
  15215. "type": "string",
  15216. "enum": ["patch"]
  15217. },
  15218. "hash": {
  15219. "type": "string"
  15220. },
  15221. "files": {
  15222. "type": "array",
  15223. "items": {
  15224. "type": "string"
  15225. }
  15226. }
  15227. },
  15228. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  15229. "additionalProperties": false
  15230. },
  15231. "AgentPart": {
  15232. "type": "object",
  15233. "properties": {
  15234. "id": {
  15235. "type": "string",
  15236. "pattern": "^prt"
  15237. },
  15238. "sessionID": {
  15239. "type": "string",
  15240. "pattern": "^ses"
  15241. },
  15242. "messageID": {
  15243. "type": "string",
  15244. "pattern": "^msg"
  15245. },
  15246. "type": {
  15247. "type": "string",
  15248. "enum": ["agent"]
  15249. },
  15250. "name": {
  15251. "type": "string"
  15252. },
  15253. "source": {
  15254. "type": "object",
  15255. "properties": {
  15256. "value": {
  15257. "type": "string"
  15258. },
  15259. "start": {
  15260. "type": "integer",
  15261. "minimum": 0
  15262. },
  15263. "end": {
  15264. "type": "integer",
  15265. "minimum": 0
  15266. }
  15267. },
  15268. "required": ["value", "start", "end"],
  15269. "additionalProperties": false
  15270. }
  15271. },
  15272. "required": ["id", "sessionID", "messageID", "type", "name"],
  15273. "additionalProperties": false
  15274. },
  15275. "RetryPart": {
  15276. "type": "object",
  15277. "properties": {
  15278. "id": {
  15279. "type": "string",
  15280. "pattern": "^prt"
  15281. },
  15282. "sessionID": {
  15283. "type": "string",
  15284. "pattern": "^ses"
  15285. },
  15286. "messageID": {
  15287. "type": "string",
  15288. "pattern": "^msg"
  15289. },
  15290. "type": {
  15291. "type": "string",
  15292. "enum": ["retry"]
  15293. },
  15294. "attempt": {
  15295. "type": "integer",
  15296. "minimum": 0
  15297. },
  15298. "error": {
  15299. "$ref": "#/components/schemas/APIError"
  15300. },
  15301. "time": {
  15302. "type": "object",
  15303. "properties": {
  15304. "created": {
  15305. "type": "integer",
  15306. "minimum": 0
  15307. }
  15308. },
  15309. "required": ["created"],
  15310. "additionalProperties": false
  15311. }
  15312. },
  15313. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  15314. "additionalProperties": false
  15315. },
  15316. "CompactionPart": {
  15317. "type": "object",
  15318. "properties": {
  15319. "id": {
  15320. "type": "string",
  15321. "pattern": "^prt"
  15322. },
  15323. "sessionID": {
  15324. "type": "string",
  15325. "pattern": "^ses"
  15326. },
  15327. "messageID": {
  15328. "type": "string",
  15329. "pattern": "^msg"
  15330. },
  15331. "type": {
  15332. "type": "string",
  15333. "enum": ["compaction"]
  15334. },
  15335. "auto": {
  15336. "type": "boolean"
  15337. },
  15338. "overflow": {
  15339. "type": "boolean"
  15340. },
  15341. "tail_start_id": {
  15342. "type": "string",
  15343. "pattern": "^msg"
  15344. }
  15345. },
  15346. "required": ["id", "sessionID", "messageID", "type", "auto"],
  15347. "additionalProperties": false
  15348. },
  15349. "Part": {
  15350. "anyOf": [
  15351. {
  15352. "$ref": "#/components/schemas/TextPart"
  15353. },
  15354. {
  15355. "$ref": "#/components/schemas/SubtaskPart"
  15356. },
  15357. {
  15358. "$ref": "#/components/schemas/ReasoningPart"
  15359. },
  15360. {
  15361. "$ref": "#/components/schemas/FilePart"
  15362. },
  15363. {
  15364. "$ref": "#/components/schemas/ToolPart"
  15365. },
  15366. {
  15367. "$ref": "#/components/schemas/StepStartPart"
  15368. },
  15369. {
  15370. "$ref": "#/components/schemas/StepFinishPart"
  15371. },
  15372. {
  15373. "$ref": "#/components/schemas/SnapshotPart"
  15374. },
  15375. {
  15376. "$ref": "#/components/schemas/PatchPart"
  15377. },
  15378. {
  15379. "$ref": "#/components/schemas/AgentPart"
  15380. },
  15381. {
  15382. "$ref": "#/components/schemas/RetryPart"
  15383. },
  15384. {
  15385. "$ref": "#/components/schemas/CompactionPart"
  15386. }
  15387. ]
  15388. },
  15389. "Prompt": {
  15390. "type": "object",
  15391. "properties": {
  15392. "text": {
  15393. "type": "string"
  15394. },
  15395. "files": {
  15396. "type": "array",
  15397. "items": {
  15398. "$ref": "#/components/schemas/PromptFileAttachment"
  15399. }
  15400. },
  15401. "agents": {
  15402. "type": "array",
  15403. "items": {
  15404. "$ref": "#/components/schemas/PromptAgentAttachment"
  15405. }
  15406. }
  15407. },
  15408. "required": ["text"],
  15409. "additionalProperties": false
  15410. },
  15411. "Pty": {
  15412. "type": "object",
  15413. "properties": {
  15414. "id": {
  15415. "type": "string",
  15416. "pattern": "^pty"
  15417. },
  15418. "title": {
  15419. "type": "string"
  15420. },
  15421. "command": {
  15422. "type": "string"
  15423. },
  15424. "args": {
  15425. "type": "array",
  15426. "items": {
  15427. "type": "string"
  15428. }
  15429. },
  15430. "cwd": {
  15431. "type": "string"
  15432. },
  15433. "status": {
  15434. "type": "string",
  15435. "enum": ["running", "exited"]
  15436. },
  15437. "pid": {
  15438. "type": "integer",
  15439. "minimum": 0
  15440. }
  15441. },
  15442. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  15443. "additionalProperties": false
  15444. },
  15445. "Todo": {
  15446. "type": "object",
  15447. "properties": {
  15448. "content": {
  15449. "type": "string",
  15450. "description": "Brief description of the task"
  15451. },
  15452. "status": {
  15453. "type": "string",
  15454. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  15455. },
  15456. "priority": {
  15457. "type": "string",
  15458. "description": "Priority level of the task: high, medium, low"
  15459. }
  15460. },
  15461. "required": ["content", "status", "priority"],
  15462. "additionalProperties": false
  15463. },
  15464. "QuestionOption": {
  15465. "type": "object",
  15466. "properties": {
  15467. "label": {
  15468. "type": "string",
  15469. "description": "Display text (1-5 words, concise)"
  15470. },
  15471. "description": {
  15472. "type": "string",
  15473. "description": "Explanation of choice"
  15474. }
  15475. },
  15476. "required": ["label", "description"],
  15477. "additionalProperties": false
  15478. },
  15479. "QuestionInfo": {
  15480. "type": "object",
  15481. "properties": {
  15482. "question": {
  15483. "type": "string",
  15484. "description": "Complete question"
  15485. },
  15486. "header": {
  15487. "type": "string",
  15488. "description": "Very short label (max 30 chars)"
  15489. },
  15490. "options": {
  15491. "type": "array",
  15492. "items": {
  15493. "$ref": "#/components/schemas/QuestionOption"
  15494. },
  15495. "description": "Available choices"
  15496. },
  15497. "multiple": {
  15498. "type": "boolean"
  15499. },
  15500. "custom": {
  15501. "type": "boolean"
  15502. }
  15503. },
  15504. "required": ["question", "header", "options"],
  15505. "additionalProperties": false
  15506. },
  15507. "QuestionTool": {
  15508. "type": "object",
  15509. "properties": {
  15510. "messageID": {
  15511. "type": "string",
  15512. "pattern": "^msg"
  15513. },
  15514. "callID": {
  15515. "type": "string"
  15516. }
  15517. },
  15518. "required": ["messageID", "callID"],
  15519. "additionalProperties": false
  15520. },
  15521. "QuestionAnswer": {
  15522. "type": "array",
  15523. "items": {
  15524. "type": "string"
  15525. }
  15526. },
  15527. "SessionStatus": {
  15528. "anyOf": [
  15529. {
  15530. "type": "object",
  15531. "properties": {
  15532. "type": {
  15533. "type": "string",
  15534. "enum": ["idle"]
  15535. }
  15536. },
  15537. "required": ["type"],
  15538. "additionalProperties": false
  15539. },
  15540. {
  15541. "type": "object",
  15542. "properties": {
  15543. "type": {
  15544. "type": "string",
  15545. "enum": ["retry"]
  15546. },
  15547. "attempt": {
  15548. "type": "integer",
  15549. "minimum": 0
  15550. },
  15551. "message": {
  15552. "type": "string"
  15553. },
  15554. "action": {
  15555. "type": "object",
  15556. "properties": {
  15557. "reason": {
  15558. "type": "string"
  15559. },
  15560. "provider": {
  15561. "type": "string"
  15562. },
  15563. "title": {
  15564. "type": "string"
  15565. },
  15566. "message": {
  15567. "type": "string"
  15568. },
  15569. "label": {
  15570. "type": "string"
  15571. },
  15572. "link": {
  15573. "type": "string"
  15574. }
  15575. },
  15576. "required": ["reason", "provider", "title", "message", "label"],
  15577. "additionalProperties": false
  15578. },
  15579. "next": {
  15580. "type": "integer",
  15581. "minimum": 0
  15582. }
  15583. },
  15584. "required": ["type", "attempt", "message", "next"],
  15585. "additionalProperties": false
  15586. },
  15587. {
  15588. "type": "object",
  15589. "properties": {
  15590. "type": {
  15591. "type": "string",
  15592. "enum": ["busy"]
  15593. }
  15594. },
  15595. "required": ["type"],
  15596. "additionalProperties": false
  15597. }
  15598. ]
  15599. },
  15600. "GlobalEvent": {
  15601. "type": "object",
  15602. "properties": {
  15603. "directory": {
  15604. "type": "string"
  15605. },
  15606. "project": {
  15607. "type": "string"
  15608. },
  15609. "workspace": {
  15610. "type": "string"
  15611. },
  15612. "payload": {
  15613. "anyOf": [
  15614. {
  15615. "type": "object",
  15616. "properties": {
  15617. "id": {
  15618. "type": "string",
  15619. "pattern": "^evt_"
  15620. },
  15621. "type": {
  15622. "type": "string",
  15623. "enum": ["models-dev.refreshed"]
  15624. },
  15625. "properties": {
  15626. "type": "object",
  15627. "properties": {}
  15628. }
  15629. },
  15630. "required": ["id", "type", "properties"],
  15631. "additionalProperties": false
  15632. },
  15633. {
  15634. "type": "object",
  15635. "properties": {
  15636. "id": {
  15637. "type": "string",
  15638. "pattern": "^evt_"
  15639. },
  15640. "type": {
  15641. "type": "string",
  15642. "enum": ["credential.added"]
  15643. },
  15644. "properties": {
  15645. "type": "object",
  15646. "properties": {
  15647. "credential": {
  15648. "$ref": "#/components/schemas/CredentialInfo"
  15649. }
  15650. },
  15651. "required": ["credential"],
  15652. "additionalProperties": false
  15653. }
  15654. },
  15655. "required": ["id", "type", "properties"],
  15656. "additionalProperties": false
  15657. },
  15658. {
  15659. "type": "object",
  15660. "properties": {
  15661. "id": {
  15662. "type": "string",
  15663. "pattern": "^evt_"
  15664. },
  15665. "type": {
  15666. "type": "string",
  15667. "enum": ["credential.removed"]
  15668. },
  15669. "properties": {
  15670. "type": "object",
  15671. "properties": {
  15672. "credential": {
  15673. "$ref": "#/components/schemas/CredentialInfo"
  15674. }
  15675. },
  15676. "required": ["credential"],
  15677. "additionalProperties": false
  15678. }
  15679. },
  15680. "required": ["id", "type", "properties"],
  15681. "additionalProperties": false
  15682. },
  15683. {
  15684. "type": "object",
  15685. "properties": {
  15686. "id": {
  15687. "type": "string",
  15688. "pattern": "^evt_"
  15689. },
  15690. "type": {
  15691. "type": "string",
  15692. "enum": ["credential.switched"]
  15693. },
  15694. "properties": {
  15695. "type": "object",
  15696. "properties": {
  15697. "connectorID": {
  15698. "type": "string"
  15699. },
  15700. "from": {
  15701. "type": "string"
  15702. },
  15703. "to": {
  15704. "type": "string"
  15705. }
  15706. },
  15707. "required": ["connectorID"],
  15708. "additionalProperties": false
  15709. }
  15710. },
  15711. "required": ["id", "type", "properties"],
  15712. "additionalProperties": false
  15713. },
  15714. {
  15715. "type": "object",
  15716. "properties": {
  15717. "id": {
  15718. "type": "string",
  15719. "pattern": "^evt_"
  15720. },
  15721. "type": {
  15722. "type": "string",
  15723. "enum": ["plugin.added"]
  15724. },
  15725. "properties": {
  15726. "type": "object",
  15727. "properties": {
  15728. "id": {
  15729. "type": "string"
  15730. }
  15731. },
  15732. "required": ["id"],
  15733. "additionalProperties": false
  15734. }
  15735. },
  15736. "required": ["id", "type", "properties"],
  15737. "additionalProperties": false
  15738. },
  15739. {
  15740. "type": "object",
  15741. "properties": {
  15742. "id": {
  15743. "type": "string",
  15744. "pattern": "^evt_"
  15745. },
  15746. "type": {
  15747. "type": "string",
  15748. "enum": ["catalog.model.updated"]
  15749. },
  15750. "properties": {
  15751. "type": "object",
  15752. "properties": {
  15753. "model": {
  15754. "$ref": "#/components/schemas/ModelV2Info"
  15755. }
  15756. },
  15757. "required": ["model"],
  15758. "additionalProperties": false
  15759. }
  15760. },
  15761. "required": ["id", "type", "properties"],
  15762. "additionalProperties": false
  15763. },
  15764. {
  15765. "type": "object",
  15766. "properties": {
  15767. "id": {
  15768. "type": "string",
  15769. "pattern": "^evt_"
  15770. },
  15771. "type": {
  15772. "type": "string",
  15773. "enum": ["session.created"]
  15774. },
  15775. "properties": {
  15776. "type": "object",
  15777. "properties": {
  15778. "sessionID": {
  15779. "type": "string",
  15780. "pattern": "^ses"
  15781. },
  15782. "info": {
  15783. "$ref": "#/components/schemas/Session"
  15784. }
  15785. },
  15786. "required": ["sessionID", "info"],
  15787. "additionalProperties": false
  15788. }
  15789. },
  15790. "required": ["id", "type", "properties"],
  15791. "additionalProperties": false
  15792. },
  15793. {
  15794. "type": "object",
  15795. "properties": {
  15796. "id": {
  15797. "type": "string",
  15798. "pattern": "^evt_"
  15799. },
  15800. "type": {
  15801. "type": "string",
  15802. "enum": ["session.updated"]
  15803. },
  15804. "properties": {
  15805. "type": "object",
  15806. "properties": {
  15807. "sessionID": {
  15808. "type": "string",
  15809. "pattern": "^ses"
  15810. },
  15811. "info": {
  15812. "$ref": "#/components/schemas/Session"
  15813. }
  15814. },
  15815. "required": ["sessionID", "info"],
  15816. "additionalProperties": false
  15817. }
  15818. },
  15819. "required": ["id", "type", "properties"],
  15820. "additionalProperties": false
  15821. },
  15822. {
  15823. "type": "object",
  15824. "properties": {
  15825. "id": {
  15826. "type": "string",
  15827. "pattern": "^evt_"
  15828. },
  15829. "type": {
  15830. "type": "string",
  15831. "enum": ["session.deleted"]
  15832. },
  15833. "properties": {
  15834. "type": "object",
  15835. "properties": {
  15836. "sessionID": {
  15837. "type": "string",
  15838. "pattern": "^ses"
  15839. },
  15840. "info": {
  15841. "$ref": "#/components/schemas/Session"
  15842. }
  15843. },
  15844. "required": ["sessionID", "info"],
  15845. "additionalProperties": false
  15846. }
  15847. },
  15848. "required": ["id", "type", "properties"],
  15849. "additionalProperties": false
  15850. },
  15851. {
  15852. "type": "object",
  15853. "properties": {
  15854. "id": {
  15855. "type": "string",
  15856. "pattern": "^evt_"
  15857. },
  15858. "type": {
  15859. "type": "string",
  15860. "enum": ["message.updated"]
  15861. },
  15862. "properties": {
  15863. "type": "object",
  15864. "properties": {
  15865. "sessionID": {
  15866. "type": "string",
  15867. "pattern": "^ses"
  15868. },
  15869. "info": {
  15870. "$ref": "#/components/schemas/Message"
  15871. }
  15872. },
  15873. "required": ["sessionID", "info"],
  15874. "additionalProperties": false
  15875. }
  15876. },
  15877. "required": ["id", "type", "properties"],
  15878. "additionalProperties": false
  15879. },
  15880. {
  15881. "type": "object",
  15882. "properties": {
  15883. "id": {
  15884. "type": "string",
  15885. "pattern": "^evt_"
  15886. },
  15887. "type": {
  15888. "type": "string",
  15889. "enum": ["message.removed"]
  15890. },
  15891. "properties": {
  15892. "type": "object",
  15893. "properties": {
  15894. "sessionID": {
  15895. "type": "string",
  15896. "pattern": "^ses"
  15897. },
  15898. "messageID": {
  15899. "type": "string",
  15900. "pattern": "^msg"
  15901. }
  15902. },
  15903. "required": ["sessionID", "messageID"],
  15904. "additionalProperties": false
  15905. }
  15906. },
  15907. "required": ["id", "type", "properties"],
  15908. "additionalProperties": false
  15909. },
  15910. {
  15911. "type": "object",
  15912. "properties": {
  15913. "id": {
  15914. "type": "string",
  15915. "pattern": "^evt_"
  15916. },
  15917. "type": {
  15918. "type": "string",
  15919. "enum": ["message.part.updated"]
  15920. },
  15921. "properties": {
  15922. "type": "object",
  15923. "properties": {
  15924. "sessionID": {
  15925. "type": "string",
  15926. "pattern": "^ses"
  15927. },
  15928. "part": {
  15929. "$ref": "#/components/schemas/Part"
  15930. },
  15931. "time": {
  15932. "type": "number"
  15933. }
  15934. },
  15935. "required": ["sessionID", "part", "time"],
  15936. "additionalProperties": false
  15937. }
  15938. },
  15939. "required": ["id", "type", "properties"],
  15940. "additionalProperties": false
  15941. },
  15942. {
  15943. "type": "object",
  15944. "properties": {
  15945. "id": {
  15946. "type": "string",
  15947. "pattern": "^evt_"
  15948. },
  15949. "type": {
  15950. "type": "string",
  15951. "enum": ["message.part.removed"]
  15952. },
  15953. "properties": {
  15954. "type": "object",
  15955. "properties": {
  15956. "sessionID": {
  15957. "type": "string",
  15958. "pattern": "^ses"
  15959. },
  15960. "messageID": {
  15961. "type": "string",
  15962. "pattern": "^msg"
  15963. },
  15964. "partID": {
  15965. "type": "string",
  15966. "pattern": "^prt"
  15967. }
  15968. },
  15969. "required": ["sessionID", "messageID", "partID"],
  15970. "additionalProperties": false
  15971. }
  15972. },
  15973. "required": ["id", "type", "properties"],
  15974. "additionalProperties": false
  15975. },
  15976. {
  15977. "type": "object",
  15978. "properties": {
  15979. "id": {
  15980. "type": "string",
  15981. "pattern": "^evt_"
  15982. },
  15983. "type": {
  15984. "type": "string",
  15985. "enum": ["session.next.agent.switched"]
  15986. },
  15987. "properties": {
  15988. "type": "object",
  15989. "properties": {
  15990. "timestamp": {
  15991. "type": "number"
  15992. },
  15993. "sessionID": {
  15994. "type": "string",
  15995. "pattern": "^ses"
  15996. },
  15997. "messageID": {
  15998. "type": "string",
  15999. "pattern": "^msg_"
  16000. },
  16001. "agent": {
  16002. "type": "string"
  16003. }
  16004. },
  16005. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16006. "additionalProperties": false
  16007. }
  16008. },
  16009. "required": ["id", "type", "properties"],
  16010. "additionalProperties": false
  16011. },
  16012. {
  16013. "type": "object",
  16014. "properties": {
  16015. "id": {
  16016. "type": "string",
  16017. "pattern": "^evt_"
  16018. },
  16019. "type": {
  16020. "type": "string",
  16021. "enum": ["session.next.model.switched"]
  16022. },
  16023. "properties": {
  16024. "type": "object",
  16025. "properties": {
  16026. "timestamp": {
  16027. "type": "number"
  16028. },
  16029. "sessionID": {
  16030. "type": "string",
  16031. "pattern": "^ses"
  16032. },
  16033. "messageID": {
  16034. "type": "string",
  16035. "pattern": "^msg_"
  16036. },
  16037. "model": {
  16038. "type": "object",
  16039. "properties": {
  16040. "id": {
  16041. "type": "string"
  16042. },
  16043. "providerID": {
  16044. "type": "string"
  16045. },
  16046. "variant": {
  16047. "type": "string"
  16048. }
  16049. },
  16050. "required": ["id", "providerID"],
  16051. "additionalProperties": false
  16052. }
  16053. },
  16054. "required": ["timestamp", "sessionID", "messageID", "model"],
  16055. "additionalProperties": false
  16056. }
  16057. },
  16058. "required": ["id", "type", "properties"],
  16059. "additionalProperties": false
  16060. },
  16061. {
  16062. "type": "object",
  16063. "properties": {
  16064. "id": {
  16065. "type": "string",
  16066. "pattern": "^evt_"
  16067. },
  16068. "type": {
  16069. "type": "string",
  16070. "enum": ["session.next.moved"]
  16071. },
  16072. "properties": {
  16073. "type": "object",
  16074. "properties": {
  16075. "timestamp": {
  16076. "type": "number"
  16077. },
  16078. "sessionID": {
  16079. "type": "string",
  16080. "pattern": "^ses"
  16081. },
  16082. "location": {
  16083. "$ref": "#/components/schemas/LocationRef"
  16084. },
  16085. "subdirectory": {
  16086. "type": "string"
  16087. }
  16088. },
  16089. "required": ["timestamp", "sessionID", "location"],
  16090. "additionalProperties": false
  16091. }
  16092. },
  16093. "required": ["id", "type", "properties"],
  16094. "additionalProperties": false
  16095. },
  16096. {
  16097. "type": "object",
  16098. "properties": {
  16099. "id": {
  16100. "type": "string",
  16101. "pattern": "^evt_"
  16102. },
  16103. "type": {
  16104. "type": "string",
  16105. "enum": ["session.next.prompted"]
  16106. },
  16107. "properties": {
  16108. "type": "object",
  16109. "properties": {
  16110. "timestamp": {
  16111. "type": "number"
  16112. },
  16113. "sessionID": {
  16114. "type": "string",
  16115. "pattern": "^ses"
  16116. },
  16117. "messageID": {
  16118. "type": "string",
  16119. "pattern": "^msg_"
  16120. },
  16121. "prompt": {
  16122. "$ref": "#/components/schemas/Prompt"
  16123. },
  16124. "delivery": {
  16125. "type": "string",
  16126. "enum": ["steer", "queue"]
  16127. }
  16128. },
  16129. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16130. "additionalProperties": false
  16131. }
  16132. },
  16133. "required": ["id", "type", "properties"],
  16134. "additionalProperties": false
  16135. },
  16136. {
  16137. "type": "object",
  16138. "properties": {
  16139. "id": {
  16140. "type": "string",
  16141. "pattern": "^evt_"
  16142. },
  16143. "type": {
  16144. "type": "string",
  16145. "enum": ["session.next.prompt.admitted"]
  16146. },
  16147. "properties": {
  16148. "type": "object",
  16149. "properties": {
  16150. "timestamp": {
  16151. "type": "number"
  16152. },
  16153. "sessionID": {
  16154. "type": "string",
  16155. "pattern": "^ses"
  16156. },
  16157. "messageID": {
  16158. "type": "string",
  16159. "pattern": "^msg_"
  16160. },
  16161. "prompt": {
  16162. "$ref": "#/components/schemas/Prompt"
  16163. },
  16164. "delivery": {
  16165. "type": "string",
  16166. "enum": ["steer", "queue"]
  16167. }
  16168. },
  16169. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16170. "additionalProperties": false
  16171. }
  16172. },
  16173. "required": ["id", "type", "properties"],
  16174. "additionalProperties": false
  16175. },
  16176. {
  16177. "type": "object",
  16178. "properties": {
  16179. "id": {
  16180. "type": "string",
  16181. "pattern": "^evt_"
  16182. },
  16183. "type": {
  16184. "type": "string",
  16185. "enum": ["session.next.prompt.promoted"]
  16186. },
  16187. "properties": {
  16188. "type": "object",
  16189. "properties": {
  16190. "timestamp": {
  16191. "type": "number"
  16192. },
  16193. "sessionID": {
  16194. "type": "string",
  16195. "pattern": "^ses"
  16196. },
  16197. "messageID": {
  16198. "type": "string",
  16199. "pattern": "^msg_"
  16200. },
  16201. "prompt": {
  16202. "$ref": "#/components/schemas/Prompt"
  16203. },
  16204. "timeCreated": {
  16205. "type": "number"
  16206. }
  16207. },
  16208. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  16209. "additionalProperties": false
  16210. }
  16211. },
  16212. "required": ["id", "type", "properties"],
  16213. "additionalProperties": false
  16214. },
  16215. {
  16216. "type": "object",
  16217. "properties": {
  16218. "id": {
  16219. "type": "string",
  16220. "pattern": "^evt_"
  16221. },
  16222. "type": {
  16223. "type": "string",
  16224. "enum": ["session.next.interrupt.requested"]
  16225. },
  16226. "properties": {
  16227. "type": "object",
  16228. "properties": {
  16229. "timestamp": {
  16230. "type": "number"
  16231. },
  16232. "sessionID": {
  16233. "type": "string",
  16234. "pattern": "^ses"
  16235. }
  16236. },
  16237. "required": ["timestamp", "sessionID"],
  16238. "additionalProperties": false
  16239. }
  16240. },
  16241. "required": ["id", "type", "properties"],
  16242. "additionalProperties": false
  16243. },
  16244. {
  16245. "type": "object",
  16246. "properties": {
  16247. "id": {
  16248. "type": "string",
  16249. "pattern": "^evt_"
  16250. },
  16251. "type": {
  16252. "type": "string",
  16253. "enum": ["session.next.context.updated"]
  16254. },
  16255. "properties": {
  16256. "type": "object",
  16257. "properties": {
  16258. "timestamp": {
  16259. "type": "number"
  16260. },
  16261. "sessionID": {
  16262. "type": "string",
  16263. "pattern": "^ses"
  16264. },
  16265. "messageID": {
  16266. "type": "string",
  16267. "pattern": "^msg_"
  16268. },
  16269. "text": {
  16270. "type": "string"
  16271. }
  16272. },
  16273. "required": ["timestamp", "sessionID", "messageID", "text"],
  16274. "additionalProperties": false
  16275. }
  16276. },
  16277. "required": ["id", "type", "properties"],
  16278. "additionalProperties": false
  16279. },
  16280. {
  16281. "type": "object",
  16282. "properties": {
  16283. "id": {
  16284. "type": "string",
  16285. "pattern": "^evt_"
  16286. },
  16287. "type": {
  16288. "type": "string",
  16289. "enum": ["session.next.synthetic"]
  16290. },
  16291. "properties": {
  16292. "type": "object",
  16293. "properties": {
  16294. "timestamp": {
  16295. "type": "number"
  16296. },
  16297. "sessionID": {
  16298. "type": "string",
  16299. "pattern": "^ses"
  16300. },
  16301. "messageID": {
  16302. "type": "string",
  16303. "pattern": "^msg_"
  16304. },
  16305. "text": {
  16306. "type": "string"
  16307. }
  16308. },
  16309. "required": ["timestamp", "sessionID", "messageID", "text"],
  16310. "additionalProperties": false
  16311. }
  16312. },
  16313. "required": ["id", "type", "properties"],
  16314. "additionalProperties": false
  16315. },
  16316. {
  16317. "type": "object",
  16318. "properties": {
  16319. "id": {
  16320. "type": "string",
  16321. "pattern": "^evt_"
  16322. },
  16323. "type": {
  16324. "type": "string",
  16325. "enum": ["session.next.shell.started"]
  16326. },
  16327. "properties": {
  16328. "type": "object",
  16329. "properties": {
  16330. "timestamp": {
  16331. "type": "number"
  16332. },
  16333. "sessionID": {
  16334. "type": "string",
  16335. "pattern": "^ses"
  16336. },
  16337. "messageID": {
  16338. "type": "string",
  16339. "pattern": "^msg_"
  16340. },
  16341. "callID": {
  16342. "type": "string"
  16343. },
  16344. "command": {
  16345. "type": "string"
  16346. }
  16347. },
  16348. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  16349. "additionalProperties": false
  16350. }
  16351. },
  16352. "required": ["id", "type", "properties"],
  16353. "additionalProperties": false
  16354. },
  16355. {
  16356. "type": "object",
  16357. "properties": {
  16358. "id": {
  16359. "type": "string",
  16360. "pattern": "^evt_"
  16361. },
  16362. "type": {
  16363. "type": "string",
  16364. "enum": ["session.next.shell.ended"]
  16365. },
  16366. "properties": {
  16367. "type": "object",
  16368. "properties": {
  16369. "timestamp": {
  16370. "type": "number"
  16371. },
  16372. "sessionID": {
  16373. "type": "string",
  16374. "pattern": "^ses"
  16375. },
  16376. "callID": {
  16377. "type": "string"
  16378. },
  16379. "output": {
  16380. "type": "string"
  16381. }
  16382. },
  16383. "required": ["timestamp", "sessionID", "callID", "output"],
  16384. "additionalProperties": false
  16385. }
  16386. },
  16387. "required": ["id", "type", "properties"],
  16388. "additionalProperties": false
  16389. },
  16390. {
  16391. "type": "object",
  16392. "properties": {
  16393. "id": {
  16394. "type": "string",
  16395. "pattern": "^evt_"
  16396. },
  16397. "type": {
  16398. "type": "string",
  16399. "enum": ["session.next.step.started"]
  16400. },
  16401. "properties": {
  16402. "type": "object",
  16403. "properties": {
  16404. "timestamp": {
  16405. "type": "number"
  16406. },
  16407. "sessionID": {
  16408. "type": "string",
  16409. "pattern": "^ses"
  16410. },
  16411. "assistantMessageID": {
  16412. "type": "string",
  16413. "pattern": "^msg_"
  16414. },
  16415. "agent": {
  16416. "type": "string"
  16417. },
  16418. "model": {
  16419. "type": "object",
  16420. "properties": {
  16421. "id": {
  16422. "type": "string"
  16423. },
  16424. "providerID": {
  16425. "type": "string"
  16426. },
  16427. "variant": {
  16428. "type": "string"
  16429. }
  16430. },
  16431. "required": ["id", "providerID"],
  16432. "additionalProperties": false
  16433. },
  16434. "snapshot": {
  16435. "type": "string"
  16436. }
  16437. },
  16438. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  16439. "additionalProperties": false
  16440. }
  16441. },
  16442. "required": ["id", "type", "properties"],
  16443. "additionalProperties": false
  16444. },
  16445. {
  16446. "type": "object",
  16447. "properties": {
  16448. "id": {
  16449. "type": "string",
  16450. "pattern": "^evt_"
  16451. },
  16452. "type": {
  16453. "type": "string",
  16454. "enum": ["session.next.step.ended"]
  16455. },
  16456. "properties": {
  16457. "type": "object",
  16458. "properties": {
  16459. "timestamp": {
  16460. "type": "number"
  16461. },
  16462. "sessionID": {
  16463. "type": "string",
  16464. "pattern": "^ses"
  16465. },
  16466. "assistantMessageID": {
  16467. "type": "string",
  16468. "pattern": "^msg_"
  16469. },
  16470. "finish": {
  16471. "type": "string"
  16472. },
  16473. "cost": {
  16474. "type": "number"
  16475. },
  16476. "tokens": {
  16477. "type": "object",
  16478. "properties": {
  16479. "input": {
  16480. "type": "number"
  16481. },
  16482. "output": {
  16483. "type": "number"
  16484. },
  16485. "reasoning": {
  16486. "type": "number"
  16487. },
  16488. "cache": {
  16489. "type": "object",
  16490. "properties": {
  16491. "read": {
  16492. "type": "number"
  16493. },
  16494. "write": {
  16495. "type": "number"
  16496. }
  16497. },
  16498. "required": ["read", "write"],
  16499. "additionalProperties": false
  16500. }
  16501. },
  16502. "required": ["input", "output", "reasoning", "cache"],
  16503. "additionalProperties": false
  16504. },
  16505. "snapshot": {
  16506. "type": "string"
  16507. }
  16508. },
  16509. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  16510. "additionalProperties": false
  16511. }
  16512. },
  16513. "required": ["id", "type", "properties"],
  16514. "additionalProperties": false
  16515. },
  16516. {
  16517. "type": "object",
  16518. "properties": {
  16519. "id": {
  16520. "type": "string",
  16521. "pattern": "^evt_"
  16522. },
  16523. "type": {
  16524. "type": "string",
  16525. "enum": ["session.next.step.failed"]
  16526. },
  16527. "properties": {
  16528. "type": "object",
  16529. "properties": {
  16530. "timestamp": {
  16531. "type": "number"
  16532. },
  16533. "sessionID": {
  16534. "type": "string",
  16535. "pattern": "^ses"
  16536. },
  16537. "assistantMessageID": {
  16538. "type": "string",
  16539. "pattern": "^msg_"
  16540. },
  16541. "error": {
  16542. "$ref": "#/components/schemas/SessionErrorUnknown"
  16543. }
  16544. },
  16545. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  16546. "additionalProperties": false
  16547. }
  16548. },
  16549. "required": ["id", "type", "properties"],
  16550. "additionalProperties": false
  16551. },
  16552. {
  16553. "type": "object",
  16554. "properties": {
  16555. "id": {
  16556. "type": "string",
  16557. "pattern": "^evt_"
  16558. },
  16559. "type": {
  16560. "type": "string",
  16561. "enum": ["session.next.text.started"]
  16562. },
  16563. "properties": {
  16564. "type": "object",
  16565. "properties": {
  16566. "timestamp": {
  16567. "type": "number"
  16568. },
  16569. "sessionID": {
  16570. "type": "string",
  16571. "pattern": "^ses"
  16572. },
  16573. "assistantMessageID": {
  16574. "type": "string",
  16575. "pattern": "^msg_"
  16576. },
  16577. "textID": {
  16578. "type": "string"
  16579. }
  16580. },
  16581. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  16582. "additionalProperties": false
  16583. }
  16584. },
  16585. "required": ["id", "type", "properties"],
  16586. "additionalProperties": false
  16587. },
  16588. {
  16589. "type": "object",
  16590. "properties": {
  16591. "id": {
  16592. "type": "string",
  16593. "pattern": "^evt_"
  16594. },
  16595. "type": {
  16596. "type": "string",
  16597. "enum": ["session.next.text.delta"]
  16598. },
  16599. "properties": {
  16600. "type": "object",
  16601. "properties": {
  16602. "timestamp": {
  16603. "type": "number"
  16604. },
  16605. "sessionID": {
  16606. "type": "string",
  16607. "pattern": "^ses"
  16608. },
  16609. "assistantMessageID": {
  16610. "type": "string",
  16611. "pattern": "^msg_"
  16612. },
  16613. "textID": {
  16614. "type": "string"
  16615. },
  16616. "delta": {
  16617. "type": "string"
  16618. }
  16619. },
  16620. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  16621. "additionalProperties": false
  16622. }
  16623. },
  16624. "required": ["id", "type", "properties"],
  16625. "additionalProperties": false
  16626. },
  16627. {
  16628. "type": "object",
  16629. "properties": {
  16630. "id": {
  16631. "type": "string",
  16632. "pattern": "^evt_"
  16633. },
  16634. "type": {
  16635. "type": "string",
  16636. "enum": ["session.next.text.ended"]
  16637. },
  16638. "properties": {
  16639. "type": "object",
  16640. "properties": {
  16641. "timestamp": {
  16642. "type": "number"
  16643. },
  16644. "sessionID": {
  16645. "type": "string",
  16646. "pattern": "^ses"
  16647. },
  16648. "assistantMessageID": {
  16649. "type": "string",
  16650. "pattern": "^msg_"
  16651. },
  16652. "textID": {
  16653. "type": "string"
  16654. },
  16655. "text": {
  16656. "type": "string"
  16657. }
  16658. },
  16659. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  16660. "additionalProperties": false
  16661. }
  16662. },
  16663. "required": ["id", "type", "properties"],
  16664. "additionalProperties": false
  16665. },
  16666. {
  16667. "type": "object",
  16668. "properties": {
  16669. "id": {
  16670. "type": "string",
  16671. "pattern": "^evt_"
  16672. },
  16673. "type": {
  16674. "type": "string",
  16675. "enum": ["session.next.reasoning.started"]
  16676. },
  16677. "properties": {
  16678. "type": "object",
  16679. "properties": {
  16680. "timestamp": {
  16681. "type": "number"
  16682. },
  16683. "sessionID": {
  16684. "type": "string",
  16685. "pattern": "^ses"
  16686. },
  16687. "assistantMessageID": {
  16688. "type": "string",
  16689. "pattern": "^msg_"
  16690. },
  16691. "reasoningID": {
  16692. "type": "string"
  16693. },
  16694. "providerMetadata": {
  16695. "type": "object",
  16696. "additionalProperties": {
  16697. "type": "object"
  16698. }
  16699. }
  16700. },
  16701. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  16702. "additionalProperties": false
  16703. }
  16704. },
  16705. "required": ["id", "type", "properties"],
  16706. "additionalProperties": false
  16707. },
  16708. {
  16709. "type": "object",
  16710. "properties": {
  16711. "id": {
  16712. "type": "string",
  16713. "pattern": "^evt_"
  16714. },
  16715. "type": {
  16716. "type": "string",
  16717. "enum": ["session.next.reasoning.delta"]
  16718. },
  16719. "properties": {
  16720. "type": "object",
  16721. "properties": {
  16722. "timestamp": {
  16723. "type": "number"
  16724. },
  16725. "sessionID": {
  16726. "type": "string",
  16727. "pattern": "^ses"
  16728. },
  16729. "assistantMessageID": {
  16730. "type": "string",
  16731. "pattern": "^msg_"
  16732. },
  16733. "reasoningID": {
  16734. "type": "string"
  16735. },
  16736. "delta": {
  16737. "type": "string"
  16738. }
  16739. },
  16740. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  16741. "additionalProperties": false
  16742. }
  16743. },
  16744. "required": ["id", "type", "properties"],
  16745. "additionalProperties": false
  16746. },
  16747. {
  16748. "type": "object",
  16749. "properties": {
  16750. "id": {
  16751. "type": "string",
  16752. "pattern": "^evt_"
  16753. },
  16754. "type": {
  16755. "type": "string",
  16756. "enum": ["session.next.reasoning.ended"]
  16757. },
  16758. "properties": {
  16759. "type": "object",
  16760. "properties": {
  16761. "timestamp": {
  16762. "type": "number"
  16763. },
  16764. "sessionID": {
  16765. "type": "string",
  16766. "pattern": "^ses"
  16767. },
  16768. "assistantMessageID": {
  16769. "type": "string",
  16770. "pattern": "^msg_"
  16771. },
  16772. "reasoningID": {
  16773. "type": "string"
  16774. },
  16775. "text": {
  16776. "type": "string"
  16777. },
  16778. "providerMetadata": {
  16779. "type": "object",
  16780. "additionalProperties": {
  16781. "type": "object"
  16782. }
  16783. }
  16784. },
  16785. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  16786. "additionalProperties": false
  16787. }
  16788. },
  16789. "required": ["id", "type", "properties"],
  16790. "additionalProperties": false
  16791. },
  16792. {
  16793. "type": "object",
  16794. "properties": {
  16795. "id": {
  16796. "type": "string",
  16797. "pattern": "^evt_"
  16798. },
  16799. "type": {
  16800. "type": "string",
  16801. "enum": ["session.next.tool.input.started"]
  16802. },
  16803. "properties": {
  16804. "type": "object",
  16805. "properties": {
  16806. "timestamp": {
  16807. "type": "number"
  16808. },
  16809. "sessionID": {
  16810. "type": "string",
  16811. "pattern": "^ses"
  16812. },
  16813. "assistantMessageID": {
  16814. "type": "string",
  16815. "pattern": "^msg_"
  16816. },
  16817. "callID": {
  16818. "type": "string"
  16819. },
  16820. "name": {
  16821. "type": "string"
  16822. }
  16823. },
  16824. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  16825. "additionalProperties": false
  16826. }
  16827. },
  16828. "required": ["id", "type", "properties"],
  16829. "additionalProperties": false
  16830. },
  16831. {
  16832. "type": "object",
  16833. "properties": {
  16834. "id": {
  16835. "type": "string",
  16836. "pattern": "^evt_"
  16837. },
  16838. "type": {
  16839. "type": "string",
  16840. "enum": ["session.next.tool.input.delta"]
  16841. },
  16842. "properties": {
  16843. "type": "object",
  16844. "properties": {
  16845. "timestamp": {
  16846. "type": "number"
  16847. },
  16848. "sessionID": {
  16849. "type": "string",
  16850. "pattern": "^ses"
  16851. },
  16852. "assistantMessageID": {
  16853. "type": "string",
  16854. "pattern": "^msg_"
  16855. },
  16856. "callID": {
  16857. "type": "string"
  16858. },
  16859. "delta": {
  16860. "type": "string"
  16861. }
  16862. },
  16863. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  16864. "additionalProperties": false
  16865. }
  16866. },
  16867. "required": ["id", "type", "properties"],
  16868. "additionalProperties": false
  16869. },
  16870. {
  16871. "type": "object",
  16872. "properties": {
  16873. "id": {
  16874. "type": "string",
  16875. "pattern": "^evt_"
  16876. },
  16877. "type": {
  16878. "type": "string",
  16879. "enum": ["session.next.tool.input.ended"]
  16880. },
  16881. "properties": {
  16882. "type": "object",
  16883. "properties": {
  16884. "timestamp": {
  16885. "type": "number"
  16886. },
  16887. "sessionID": {
  16888. "type": "string",
  16889. "pattern": "^ses"
  16890. },
  16891. "assistantMessageID": {
  16892. "type": "string",
  16893. "pattern": "^msg_"
  16894. },
  16895. "callID": {
  16896. "type": "string"
  16897. },
  16898. "text": {
  16899. "type": "string"
  16900. }
  16901. },
  16902. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  16903. "additionalProperties": false
  16904. }
  16905. },
  16906. "required": ["id", "type", "properties"],
  16907. "additionalProperties": false
  16908. },
  16909. {
  16910. "type": "object",
  16911. "properties": {
  16912. "id": {
  16913. "type": "string",
  16914. "pattern": "^evt_"
  16915. },
  16916. "type": {
  16917. "type": "string",
  16918. "enum": ["session.next.tool.called"]
  16919. },
  16920. "properties": {
  16921. "type": "object",
  16922. "properties": {
  16923. "timestamp": {
  16924. "type": "number"
  16925. },
  16926. "sessionID": {
  16927. "type": "string",
  16928. "pattern": "^ses"
  16929. },
  16930. "assistantMessageID": {
  16931. "type": "string",
  16932. "pattern": "^msg_"
  16933. },
  16934. "callID": {
  16935. "type": "string"
  16936. },
  16937. "tool": {
  16938. "type": "string"
  16939. },
  16940. "input": {
  16941. "type": "object"
  16942. },
  16943. "provider": {
  16944. "type": "object",
  16945. "properties": {
  16946. "executed": {
  16947. "type": "boolean"
  16948. },
  16949. "metadata": {
  16950. "type": "object",
  16951. "additionalProperties": {
  16952. "type": "object"
  16953. }
  16954. }
  16955. },
  16956. "required": ["executed"],
  16957. "additionalProperties": false
  16958. }
  16959. },
  16960. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  16961. "additionalProperties": false
  16962. }
  16963. },
  16964. "required": ["id", "type", "properties"],
  16965. "additionalProperties": false
  16966. },
  16967. {
  16968. "type": "object",
  16969. "properties": {
  16970. "id": {
  16971. "type": "string",
  16972. "pattern": "^evt_"
  16973. },
  16974. "type": {
  16975. "type": "string",
  16976. "enum": ["session.next.tool.progress"]
  16977. },
  16978. "properties": {
  16979. "type": "object",
  16980. "properties": {
  16981. "timestamp": {
  16982. "type": "number"
  16983. },
  16984. "sessionID": {
  16985. "type": "string",
  16986. "pattern": "^ses"
  16987. },
  16988. "assistantMessageID": {
  16989. "type": "string",
  16990. "pattern": "^msg_"
  16991. },
  16992. "callID": {
  16993. "type": "string"
  16994. },
  16995. "structured": {
  16996. "type": "object"
  16997. },
  16998. "content": {
  16999. "type": "array",
  17000. "items": {
  17001. "anyOf": [
  17002. {
  17003. "$ref": "#/components/schemas/ToolTextContent"
  17004. },
  17005. {
  17006. "$ref": "#/components/schemas/ToolFileContent"
  17007. }
  17008. ]
  17009. }
  17010. }
  17011. },
  17012. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17013. "additionalProperties": false
  17014. }
  17015. },
  17016. "required": ["id", "type", "properties"],
  17017. "additionalProperties": false
  17018. },
  17019. {
  17020. "type": "object",
  17021. "properties": {
  17022. "id": {
  17023. "type": "string",
  17024. "pattern": "^evt_"
  17025. },
  17026. "type": {
  17027. "type": "string",
  17028. "enum": ["session.next.tool.success"]
  17029. },
  17030. "properties": {
  17031. "type": "object",
  17032. "properties": {
  17033. "timestamp": {
  17034. "type": "number"
  17035. },
  17036. "sessionID": {
  17037. "type": "string",
  17038. "pattern": "^ses"
  17039. },
  17040. "assistantMessageID": {
  17041. "type": "string",
  17042. "pattern": "^msg_"
  17043. },
  17044. "callID": {
  17045. "type": "string"
  17046. },
  17047. "structured": {
  17048. "type": "object"
  17049. },
  17050. "content": {
  17051. "type": "array",
  17052. "items": {
  17053. "anyOf": [
  17054. {
  17055. "$ref": "#/components/schemas/ToolTextContent"
  17056. },
  17057. {
  17058. "$ref": "#/components/schemas/ToolFileContent"
  17059. }
  17060. ]
  17061. }
  17062. },
  17063. "outputPaths": {
  17064. "type": "array",
  17065. "items": {
  17066. "type": "string"
  17067. }
  17068. },
  17069. "result": {},
  17070. "provider": {
  17071. "type": "object",
  17072. "properties": {
  17073. "executed": {
  17074. "type": "boolean"
  17075. },
  17076. "metadata": {
  17077. "type": "object",
  17078. "additionalProperties": {
  17079. "type": "object"
  17080. }
  17081. }
  17082. },
  17083. "required": ["executed"],
  17084. "additionalProperties": false
  17085. }
  17086. },
  17087. "required": [
  17088. "timestamp",
  17089. "sessionID",
  17090. "assistantMessageID",
  17091. "callID",
  17092. "structured",
  17093. "content",
  17094. "provider"
  17095. ],
  17096. "additionalProperties": false
  17097. }
  17098. },
  17099. "required": ["id", "type", "properties"],
  17100. "additionalProperties": false
  17101. },
  17102. {
  17103. "type": "object",
  17104. "properties": {
  17105. "id": {
  17106. "type": "string",
  17107. "pattern": "^evt_"
  17108. },
  17109. "type": {
  17110. "type": "string",
  17111. "enum": ["session.next.tool.failed"]
  17112. },
  17113. "properties": {
  17114. "type": "object",
  17115. "properties": {
  17116. "timestamp": {
  17117. "type": "number"
  17118. },
  17119. "sessionID": {
  17120. "type": "string",
  17121. "pattern": "^ses"
  17122. },
  17123. "assistantMessageID": {
  17124. "type": "string",
  17125. "pattern": "^msg_"
  17126. },
  17127. "callID": {
  17128. "type": "string"
  17129. },
  17130. "error": {
  17131. "$ref": "#/components/schemas/SessionErrorUnknown"
  17132. },
  17133. "result": {},
  17134. "provider": {
  17135. "type": "object",
  17136. "properties": {
  17137. "executed": {
  17138. "type": "boolean"
  17139. },
  17140. "metadata": {
  17141. "type": "object",
  17142. "additionalProperties": {
  17143. "type": "object"
  17144. }
  17145. }
  17146. },
  17147. "required": ["executed"],
  17148. "additionalProperties": false
  17149. }
  17150. },
  17151. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  17152. "additionalProperties": false
  17153. }
  17154. },
  17155. "required": ["id", "type", "properties"],
  17156. "additionalProperties": false
  17157. },
  17158. {
  17159. "type": "object",
  17160. "properties": {
  17161. "id": {
  17162. "type": "string",
  17163. "pattern": "^evt_"
  17164. },
  17165. "type": {
  17166. "type": "string",
  17167. "enum": ["session.next.retried"]
  17168. },
  17169. "properties": {
  17170. "type": "object",
  17171. "properties": {
  17172. "timestamp": {
  17173. "type": "number"
  17174. },
  17175. "sessionID": {
  17176. "type": "string",
  17177. "pattern": "^ses"
  17178. },
  17179. "attempt": {
  17180. "type": "number"
  17181. },
  17182. "error": {
  17183. "$ref": "#/components/schemas/SessionNextRetry_error"
  17184. }
  17185. },
  17186. "required": ["timestamp", "sessionID", "attempt", "error"],
  17187. "additionalProperties": false
  17188. }
  17189. },
  17190. "required": ["id", "type", "properties"],
  17191. "additionalProperties": false
  17192. },
  17193. {
  17194. "type": "object",
  17195. "properties": {
  17196. "id": {
  17197. "type": "string",
  17198. "pattern": "^evt_"
  17199. },
  17200. "type": {
  17201. "type": "string",
  17202. "enum": ["session.next.compaction.started"]
  17203. },
  17204. "properties": {
  17205. "type": "object",
  17206. "properties": {
  17207. "timestamp": {
  17208. "type": "number"
  17209. },
  17210. "sessionID": {
  17211. "type": "string",
  17212. "pattern": "^ses"
  17213. },
  17214. "messageID": {
  17215. "type": "string",
  17216. "pattern": "^msg_"
  17217. },
  17218. "reason": {
  17219. "type": "string",
  17220. "enum": ["auto", "manual"]
  17221. }
  17222. },
  17223. "required": ["timestamp", "sessionID", "messageID", "reason"],
  17224. "additionalProperties": false
  17225. }
  17226. },
  17227. "required": ["id", "type", "properties"],
  17228. "additionalProperties": false
  17229. },
  17230. {
  17231. "type": "object",
  17232. "properties": {
  17233. "id": {
  17234. "type": "string",
  17235. "pattern": "^evt_"
  17236. },
  17237. "type": {
  17238. "type": "string",
  17239. "enum": ["session.next.compaction.delta"]
  17240. },
  17241. "properties": {
  17242. "type": "object",
  17243. "properties": {
  17244. "timestamp": {
  17245. "type": "number"
  17246. },
  17247. "sessionID": {
  17248. "type": "string",
  17249. "pattern": "^ses"
  17250. },
  17251. "messageID": {
  17252. "type": "string",
  17253. "pattern": "^msg_"
  17254. },
  17255. "text": {
  17256. "type": "string"
  17257. }
  17258. },
  17259. "required": ["timestamp", "sessionID", "messageID", "text"],
  17260. "additionalProperties": false
  17261. }
  17262. },
  17263. "required": ["id", "type", "properties"],
  17264. "additionalProperties": false
  17265. },
  17266. {
  17267. "type": "object",
  17268. "properties": {
  17269. "id": {
  17270. "type": "string",
  17271. "pattern": "^evt_"
  17272. },
  17273. "type": {
  17274. "type": "string",
  17275. "enum": ["session.next.compaction.ended"]
  17276. },
  17277. "properties": {
  17278. "type": "object",
  17279. "properties": {
  17280. "timestamp": {
  17281. "type": "number"
  17282. },
  17283. "sessionID": {
  17284. "type": "string",
  17285. "pattern": "^ses"
  17286. },
  17287. "messageID": {
  17288. "type": "string",
  17289. "pattern": "^msg_"
  17290. },
  17291. "reason": {
  17292. "type": "string",
  17293. "enum": ["auto", "manual"]
  17294. },
  17295. "text": {
  17296. "type": "string"
  17297. },
  17298. "recent": {
  17299. "type": "string"
  17300. }
  17301. },
  17302. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  17303. "additionalProperties": false
  17304. }
  17305. },
  17306. "required": ["id", "type", "properties"],
  17307. "additionalProperties": false
  17308. },
  17309. {
  17310. "type": "object",
  17311. "properties": {
  17312. "id": {
  17313. "type": "string",
  17314. "pattern": "^evt_"
  17315. },
  17316. "type": {
  17317. "type": "string",
  17318. "enum": ["message.part.delta"]
  17319. },
  17320. "properties": {
  17321. "type": "object",
  17322. "properties": {
  17323. "sessionID": {
  17324. "type": "string",
  17325. "pattern": "^ses"
  17326. },
  17327. "messageID": {
  17328. "type": "string",
  17329. "pattern": "^msg"
  17330. },
  17331. "partID": {
  17332. "type": "string",
  17333. "pattern": "^prt"
  17334. },
  17335. "field": {
  17336. "type": "string"
  17337. },
  17338. "delta": {
  17339. "type": "string"
  17340. }
  17341. },
  17342. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17343. "additionalProperties": false
  17344. }
  17345. },
  17346. "required": ["id", "type", "properties"],
  17347. "additionalProperties": false
  17348. },
  17349. {
  17350. "type": "object",
  17351. "properties": {
  17352. "id": {
  17353. "type": "string",
  17354. "pattern": "^evt_"
  17355. },
  17356. "type": {
  17357. "type": "string",
  17358. "enum": ["session.diff"]
  17359. },
  17360. "properties": {
  17361. "type": "object",
  17362. "properties": {
  17363. "sessionID": {
  17364. "type": "string",
  17365. "pattern": "^ses"
  17366. },
  17367. "diff": {
  17368. "type": "array",
  17369. "items": {
  17370. "$ref": "#/components/schemas/SnapshotFileDiff"
  17371. }
  17372. }
  17373. },
  17374. "required": ["sessionID", "diff"],
  17375. "additionalProperties": false
  17376. }
  17377. },
  17378. "required": ["id", "type", "properties"],
  17379. "additionalProperties": false
  17380. },
  17381. {
  17382. "type": "object",
  17383. "properties": {
  17384. "id": {
  17385. "type": "string",
  17386. "pattern": "^evt_"
  17387. },
  17388. "type": {
  17389. "type": "string",
  17390. "enum": ["session.error"]
  17391. },
  17392. "properties": {
  17393. "type": "object",
  17394. "properties": {
  17395. "sessionID": {
  17396. "type": "string",
  17397. "pattern": "^ses"
  17398. },
  17399. "error": {
  17400. "anyOf": [
  17401. {
  17402. "$ref": "#/components/schemas/ProviderAuthError"
  17403. },
  17404. {
  17405. "$ref": "#/components/schemas/UnknownError"
  17406. },
  17407. {
  17408. "$ref": "#/components/schemas/MessageOutputLengthError"
  17409. },
  17410. {
  17411. "$ref": "#/components/schemas/MessageAbortedError"
  17412. },
  17413. {
  17414. "$ref": "#/components/schemas/StructuredOutputError"
  17415. },
  17416. {
  17417. "$ref": "#/components/schemas/ContextOverflowError"
  17418. },
  17419. {
  17420. "$ref": "#/components/schemas/APIError"
  17421. }
  17422. ]
  17423. }
  17424. },
  17425. "additionalProperties": false
  17426. }
  17427. },
  17428. "required": ["id", "type", "properties"],
  17429. "additionalProperties": false
  17430. },
  17431. {
  17432. "type": "object",
  17433. "properties": {
  17434. "id": {
  17435. "type": "string",
  17436. "pattern": "^evt_"
  17437. },
  17438. "type": {
  17439. "type": "string",
  17440. "enum": ["installation.updated"]
  17441. },
  17442. "properties": {
  17443. "type": "object",
  17444. "properties": {
  17445. "version": {
  17446. "type": "string"
  17447. }
  17448. },
  17449. "required": ["version"],
  17450. "additionalProperties": false
  17451. }
  17452. },
  17453. "required": ["id", "type", "properties"],
  17454. "additionalProperties": false
  17455. },
  17456. {
  17457. "type": "object",
  17458. "properties": {
  17459. "id": {
  17460. "type": "string",
  17461. "pattern": "^evt_"
  17462. },
  17463. "type": {
  17464. "type": "string",
  17465. "enum": ["installation.update-available"]
  17466. },
  17467. "properties": {
  17468. "type": "object",
  17469. "properties": {
  17470. "version": {
  17471. "type": "string"
  17472. }
  17473. },
  17474. "required": ["version"],
  17475. "additionalProperties": false
  17476. }
  17477. },
  17478. "required": ["id", "type", "properties"],
  17479. "additionalProperties": false
  17480. },
  17481. {
  17482. "type": "object",
  17483. "properties": {
  17484. "id": {
  17485. "type": "string",
  17486. "pattern": "^evt_"
  17487. },
  17488. "type": {
  17489. "type": "string",
  17490. "enum": ["file.edited"]
  17491. },
  17492. "properties": {
  17493. "type": "object",
  17494. "properties": {
  17495. "file": {
  17496. "type": "string"
  17497. }
  17498. },
  17499. "required": ["file"],
  17500. "additionalProperties": false
  17501. }
  17502. },
  17503. "required": ["id", "type", "properties"],
  17504. "additionalProperties": false
  17505. },
  17506. {
  17507. "type": "object",
  17508. "properties": {
  17509. "id": {
  17510. "type": "string",
  17511. "pattern": "^evt_"
  17512. },
  17513. "type": {
  17514. "type": "string",
  17515. "enum": ["connector.updated"]
  17516. },
  17517. "properties": {
  17518. "type": "object",
  17519. "properties": {}
  17520. }
  17521. },
  17522. "required": ["id", "type", "properties"],
  17523. "additionalProperties": false
  17524. },
  17525. {
  17526. "type": "object",
  17527. "properties": {
  17528. "id": {
  17529. "type": "string",
  17530. "pattern": "^evt_"
  17531. },
  17532. "type": {
  17533. "type": "string",
  17534. "enum": ["permission.v2.asked"]
  17535. },
  17536. "properties": {
  17537. "type": "object",
  17538. "properties": {
  17539. "id": {
  17540. "type": "string",
  17541. "pattern": "^per"
  17542. },
  17543. "sessionID": {
  17544. "type": "string",
  17545. "pattern": "^ses"
  17546. },
  17547. "action": {
  17548. "type": "string"
  17549. },
  17550. "resources": {
  17551. "type": "array",
  17552. "items": {
  17553. "type": "string"
  17554. }
  17555. },
  17556. "save": {
  17557. "type": "array",
  17558. "items": {
  17559. "type": "string"
  17560. }
  17561. },
  17562. "metadata": {
  17563. "type": "object"
  17564. },
  17565. "source": {
  17566. "$ref": "#/components/schemas/PermissionV2Source"
  17567. }
  17568. },
  17569. "required": ["id", "sessionID", "action", "resources"],
  17570. "additionalProperties": false
  17571. }
  17572. },
  17573. "required": ["id", "type", "properties"],
  17574. "additionalProperties": false
  17575. },
  17576. {
  17577. "type": "object",
  17578. "properties": {
  17579. "id": {
  17580. "type": "string",
  17581. "pattern": "^evt_"
  17582. },
  17583. "type": {
  17584. "type": "string",
  17585. "enum": ["permission.v2.replied"]
  17586. },
  17587. "properties": {
  17588. "type": "object",
  17589. "properties": {
  17590. "sessionID": {
  17591. "type": "string",
  17592. "pattern": "^ses"
  17593. },
  17594. "requestID": {
  17595. "type": "string",
  17596. "pattern": "^per"
  17597. },
  17598. "reply": {
  17599. "$ref": "#/components/schemas/PermissionV2Reply"
  17600. }
  17601. },
  17602. "required": ["sessionID", "requestID", "reply"],
  17603. "additionalProperties": false
  17604. }
  17605. },
  17606. "required": ["id", "type", "properties"],
  17607. "additionalProperties": false
  17608. },
  17609. {
  17610. "type": "object",
  17611. "properties": {
  17612. "id": {
  17613. "type": "string",
  17614. "pattern": "^evt_"
  17615. },
  17616. "type": {
  17617. "type": "string",
  17618. "enum": ["reference.updated"]
  17619. },
  17620. "properties": {
  17621. "type": "object",
  17622. "properties": {}
  17623. }
  17624. },
  17625. "required": ["id", "type", "properties"],
  17626. "additionalProperties": false
  17627. },
  17628. {
  17629. "type": "object",
  17630. "properties": {
  17631. "id": {
  17632. "type": "string",
  17633. "pattern": "^evt_"
  17634. },
  17635. "type": {
  17636. "type": "string",
  17637. "enum": ["file.watcher.updated"]
  17638. },
  17639. "properties": {
  17640. "type": "object",
  17641. "properties": {
  17642. "file": {
  17643. "type": "string"
  17644. },
  17645. "event": {
  17646. "type": "string",
  17647. "enum": ["add", "change", "unlink"]
  17648. }
  17649. },
  17650. "required": ["file", "event"],
  17651. "additionalProperties": false
  17652. }
  17653. },
  17654. "required": ["id", "type", "properties"],
  17655. "additionalProperties": false
  17656. },
  17657. {
  17658. "type": "object",
  17659. "properties": {
  17660. "id": {
  17661. "type": "string",
  17662. "pattern": "^evt_"
  17663. },
  17664. "type": {
  17665. "type": "string",
  17666. "enum": ["pty.created"]
  17667. },
  17668. "properties": {
  17669. "type": "object",
  17670. "properties": {
  17671. "info": {
  17672. "$ref": "#/components/schemas/Pty"
  17673. }
  17674. },
  17675. "required": ["info"],
  17676. "additionalProperties": false
  17677. }
  17678. },
  17679. "required": ["id", "type", "properties"],
  17680. "additionalProperties": false
  17681. },
  17682. {
  17683. "type": "object",
  17684. "properties": {
  17685. "id": {
  17686. "type": "string",
  17687. "pattern": "^evt_"
  17688. },
  17689. "type": {
  17690. "type": "string",
  17691. "enum": ["pty.updated"]
  17692. },
  17693. "properties": {
  17694. "type": "object",
  17695. "properties": {
  17696. "info": {
  17697. "$ref": "#/components/schemas/Pty"
  17698. }
  17699. },
  17700. "required": ["info"],
  17701. "additionalProperties": false
  17702. }
  17703. },
  17704. "required": ["id", "type", "properties"],
  17705. "additionalProperties": false
  17706. },
  17707. {
  17708. "type": "object",
  17709. "properties": {
  17710. "id": {
  17711. "type": "string",
  17712. "pattern": "^evt_"
  17713. },
  17714. "type": {
  17715. "type": "string",
  17716. "enum": ["pty.exited"]
  17717. },
  17718. "properties": {
  17719. "type": "object",
  17720. "properties": {
  17721. "id": {
  17722. "type": "string",
  17723. "pattern": "^pty"
  17724. },
  17725. "exitCode": {
  17726. "type": "integer",
  17727. "minimum": 0
  17728. }
  17729. },
  17730. "required": ["id", "exitCode"],
  17731. "additionalProperties": false
  17732. }
  17733. },
  17734. "required": ["id", "type", "properties"],
  17735. "additionalProperties": false
  17736. },
  17737. {
  17738. "type": "object",
  17739. "properties": {
  17740. "id": {
  17741. "type": "string",
  17742. "pattern": "^evt_"
  17743. },
  17744. "type": {
  17745. "type": "string",
  17746. "enum": ["pty.deleted"]
  17747. },
  17748. "properties": {
  17749. "type": "object",
  17750. "properties": {
  17751. "id": {
  17752. "type": "string",
  17753. "pattern": "^pty"
  17754. }
  17755. },
  17756. "required": ["id"],
  17757. "additionalProperties": false
  17758. }
  17759. },
  17760. "required": ["id", "type", "properties"],
  17761. "additionalProperties": false
  17762. },
  17763. {
  17764. "type": "object",
  17765. "properties": {
  17766. "id": {
  17767. "type": "string",
  17768. "pattern": "^evt_"
  17769. },
  17770. "type": {
  17771. "type": "string",
  17772. "enum": ["question.v2.asked"]
  17773. },
  17774. "properties": {
  17775. "type": "object",
  17776. "properties": {
  17777. "id": {
  17778. "type": "string",
  17779. "pattern": "^que"
  17780. },
  17781. "sessionID": {
  17782. "type": "string",
  17783. "pattern": "^ses"
  17784. },
  17785. "questions": {
  17786. "type": "array",
  17787. "items": {
  17788. "$ref": "#/components/schemas/QuestionV2Info"
  17789. },
  17790. "description": "Questions to ask"
  17791. },
  17792. "tool": {
  17793. "$ref": "#/components/schemas/QuestionV2Tool"
  17794. }
  17795. },
  17796. "required": ["id", "sessionID", "questions"],
  17797. "additionalProperties": false
  17798. }
  17799. },
  17800. "required": ["id", "type", "properties"],
  17801. "additionalProperties": false
  17802. },
  17803. {
  17804. "type": "object",
  17805. "properties": {
  17806. "id": {
  17807. "type": "string",
  17808. "pattern": "^evt_"
  17809. },
  17810. "type": {
  17811. "type": "string",
  17812. "enum": ["question.v2.replied"]
  17813. },
  17814. "properties": {
  17815. "type": "object",
  17816. "properties": {
  17817. "sessionID": {
  17818. "type": "string",
  17819. "pattern": "^ses"
  17820. },
  17821. "requestID": {
  17822. "type": "string",
  17823. "pattern": "^que"
  17824. },
  17825. "answers": {
  17826. "type": "array",
  17827. "items": {
  17828. "$ref": "#/components/schemas/QuestionV2Answer"
  17829. }
  17830. }
  17831. },
  17832. "required": ["sessionID", "requestID", "answers"],
  17833. "additionalProperties": false
  17834. }
  17835. },
  17836. "required": ["id", "type", "properties"],
  17837. "additionalProperties": false
  17838. },
  17839. {
  17840. "type": "object",
  17841. "properties": {
  17842. "id": {
  17843. "type": "string",
  17844. "pattern": "^evt_"
  17845. },
  17846. "type": {
  17847. "type": "string",
  17848. "enum": ["question.v2.rejected"]
  17849. },
  17850. "properties": {
  17851. "type": "object",
  17852. "properties": {
  17853. "sessionID": {
  17854. "type": "string",
  17855. "pattern": "^ses"
  17856. },
  17857. "requestID": {
  17858. "type": "string",
  17859. "pattern": "^que"
  17860. }
  17861. },
  17862. "required": ["sessionID", "requestID"],
  17863. "additionalProperties": false
  17864. }
  17865. },
  17866. "required": ["id", "type", "properties"],
  17867. "additionalProperties": false
  17868. },
  17869. {
  17870. "type": "object",
  17871. "properties": {
  17872. "id": {
  17873. "type": "string",
  17874. "pattern": "^evt_"
  17875. },
  17876. "type": {
  17877. "type": "string",
  17878. "enum": ["todo.updated"]
  17879. },
  17880. "properties": {
  17881. "type": "object",
  17882. "properties": {
  17883. "sessionID": {
  17884. "type": "string",
  17885. "pattern": "^ses"
  17886. },
  17887. "todos": {
  17888. "type": "array",
  17889. "items": {
  17890. "$ref": "#/components/schemas/Todo"
  17891. }
  17892. }
  17893. },
  17894. "required": ["sessionID", "todos"],
  17895. "additionalProperties": false
  17896. }
  17897. },
  17898. "required": ["id", "type", "properties"],
  17899. "additionalProperties": false
  17900. },
  17901. {
  17902. "type": "object",
  17903. "properties": {
  17904. "id": {
  17905. "type": "string",
  17906. "pattern": "^evt_"
  17907. },
  17908. "type": {
  17909. "type": "string",
  17910. "enum": ["lsp.updated"]
  17911. },
  17912. "properties": {
  17913. "type": "object",
  17914. "properties": {}
  17915. }
  17916. },
  17917. "required": ["id", "type", "properties"],
  17918. "additionalProperties": false
  17919. },
  17920. {
  17921. "type": "object",
  17922. "properties": {
  17923. "id": {
  17924. "type": "string",
  17925. "pattern": "^evt_"
  17926. },
  17927. "type": {
  17928. "type": "string",
  17929. "enum": ["permission.asked"]
  17930. },
  17931. "properties": {
  17932. "type": "object",
  17933. "properties": {
  17934. "id": {
  17935. "type": "string",
  17936. "pattern": "^per"
  17937. },
  17938. "sessionID": {
  17939. "type": "string",
  17940. "pattern": "^ses"
  17941. },
  17942. "permission": {
  17943. "type": "string"
  17944. },
  17945. "patterns": {
  17946. "type": "array",
  17947. "items": {
  17948. "type": "string"
  17949. }
  17950. },
  17951. "metadata": {
  17952. "type": "object"
  17953. },
  17954. "always": {
  17955. "type": "array",
  17956. "items": {
  17957. "type": "string"
  17958. }
  17959. },
  17960. "tool": {
  17961. "type": "object",
  17962. "properties": {
  17963. "messageID": {
  17964. "type": "string"
  17965. },
  17966. "callID": {
  17967. "type": "string"
  17968. }
  17969. },
  17970. "required": ["messageID", "callID"],
  17971. "additionalProperties": false
  17972. }
  17973. },
  17974. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  17975. "additionalProperties": false
  17976. }
  17977. },
  17978. "required": ["id", "type", "properties"],
  17979. "additionalProperties": false
  17980. },
  17981. {
  17982. "type": "object",
  17983. "properties": {
  17984. "id": {
  17985. "type": "string",
  17986. "pattern": "^evt_"
  17987. },
  17988. "type": {
  17989. "type": "string",
  17990. "enum": ["permission.replied"]
  17991. },
  17992. "properties": {
  17993. "type": "object",
  17994. "properties": {
  17995. "sessionID": {
  17996. "type": "string",
  17997. "pattern": "^ses"
  17998. },
  17999. "requestID": {
  18000. "type": "string",
  18001. "pattern": "^per"
  18002. },
  18003. "reply": {
  18004. "type": "string",
  18005. "enum": ["once", "always", "reject"]
  18006. }
  18007. },
  18008. "required": ["sessionID", "requestID", "reply"],
  18009. "additionalProperties": false
  18010. }
  18011. },
  18012. "required": ["id", "type", "properties"],
  18013. "additionalProperties": false
  18014. },
  18015. {
  18016. "type": "object",
  18017. "properties": {
  18018. "id": {
  18019. "type": "string",
  18020. "pattern": "^evt_"
  18021. },
  18022. "type": {
  18023. "type": "string",
  18024. "enum": ["tui.prompt.append"]
  18025. },
  18026. "properties": {
  18027. "type": "object",
  18028. "properties": {
  18029. "text": {
  18030. "type": "string"
  18031. }
  18032. },
  18033. "required": ["text"],
  18034. "additionalProperties": false
  18035. }
  18036. },
  18037. "required": ["id", "type", "properties"],
  18038. "additionalProperties": false
  18039. },
  18040. {
  18041. "type": "object",
  18042. "properties": {
  18043. "id": {
  18044. "type": "string",
  18045. "pattern": "^evt_"
  18046. },
  18047. "type": {
  18048. "type": "string",
  18049. "enum": ["tui.command.execute"]
  18050. },
  18051. "properties": {
  18052. "type": "object",
  18053. "properties": {
  18054. "command": {
  18055. "anyOf": [
  18056. {
  18057. "type": "string",
  18058. "enum": [
  18059. "session.list",
  18060. "session.new",
  18061. "session.share",
  18062. "session.interrupt",
  18063. "session.compact",
  18064. "session.page.up",
  18065. "session.page.down",
  18066. "session.line.up",
  18067. "session.line.down",
  18068. "session.half.page.up",
  18069. "session.half.page.down",
  18070. "session.first",
  18071. "session.last",
  18072. "prompt.clear",
  18073. "prompt.submit",
  18074. "agent.cycle"
  18075. ]
  18076. },
  18077. {
  18078. "type": "string"
  18079. }
  18080. ]
  18081. }
  18082. },
  18083. "required": ["command"],
  18084. "additionalProperties": false
  18085. }
  18086. },
  18087. "required": ["id", "type", "properties"],
  18088. "additionalProperties": false
  18089. },
  18090. {
  18091. "type": "object",
  18092. "properties": {
  18093. "id": {
  18094. "type": "string",
  18095. "pattern": "^evt_"
  18096. },
  18097. "type": {
  18098. "type": "string",
  18099. "enum": ["tui.toast.show"]
  18100. },
  18101. "properties": {
  18102. "type": "object",
  18103. "properties": {
  18104. "title": {
  18105. "type": "string"
  18106. },
  18107. "message": {
  18108. "type": "string"
  18109. },
  18110. "variant": {
  18111. "type": "string",
  18112. "enum": ["info", "success", "warning", "error"]
  18113. },
  18114. "duration": {
  18115. "type": "integer",
  18116. "exclusiveMinimum": 0
  18117. }
  18118. },
  18119. "required": ["message", "variant"],
  18120. "additionalProperties": false
  18121. }
  18122. },
  18123. "required": ["id", "type", "properties"],
  18124. "additionalProperties": false
  18125. },
  18126. {
  18127. "type": "object",
  18128. "properties": {
  18129. "id": {
  18130. "type": "string",
  18131. "pattern": "^evt_"
  18132. },
  18133. "type": {
  18134. "type": "string",
  18135. "enum": ["tui.session.select"]
  18136. },
  18137. "properties": {
  18138. "type": "object",
  18139. "properties": {
  18140. "sessionID": {
  18141. "type": "string",
  18142. "pattern": "^ses",
  18143. "description": "Session ID to navigate to"
  18144. }
  18145. },
  18146. "required": ["sessionID"],
  18147. "additionalProperties": false
  18148. }
  18149. },
  18150. "required": ["id", "type", "properties"],
  18151. "additionalProperties": false
  18152. },
  18153. {
  18154. "type": "object",
  18155. "properties": {
  18156. "id": {
  18157. "type": "string",
  18158. "pattern": "^evt_"
  18159. },
  18160. "type": {
  18161. "type": "string",
  18162. "enum": ["mcp.tools.changed"]
  18163. },
  18164. "properties": {
  18165. "type": "object",
  18166. "properties": {
  18167. "server": {
  18168. "type": "string"
  18169. }
  18170. },
  18171. "required": ["server"],
  18172. "additionalProperties": false
  18173. }
  18174. },
  18175. "required": ["id", "type", "properties"],
  18176. "additionalProperties": false
  18177. },
  18178. {
  18179. "type": "object",
  18180. "properties": {
  18181. "id": {
  18182. "type": "string",
  18183. "pattern": "^evt_"
  18184. },
  18185. "type": {
  18186. "type": "string",
  18187. "enum": ["mcp.browser.open.failed"]
  18188. },
  18189. "properties": {
  18190. "type": "object",
  18191. "properties": {
  18192. "mcpName": {
  18193. "type": "string"
  18194. },
  18195. "url": {
  18196. "type": "string"
  18197. }
  18198. },
  18199. "required": ["mcpName", "url"],
  18200. "additionalProperties": false
  18201. }
  18202. },
  18203. "required": ["id", "type", "properties"],
  18204. "additionalProperties": false
  18205. },
  18206. {
  18207. "type": "object",
  18208. "properties": {
  18209. "id": {
  18210. "type": "string",
  18211. "pattern": "^evt_"
  18212. },
  18213. "type": {
  18214. "type": "string",
  18215. "enum": ["command.executed"]
  18216. },
  18217. "properties": {
  18218. "type": "object",
  18219. "properties": {
  18220. "name": {
  18221. "type": "string"
  18222. },
  18223. "sessionID": {
  18224. "type": "string",
  18225. "pattern": "^ses"
  18226. },
  18227. "arguments": {
  18228. "type": "string"
  18229. },
  18230. "messageID": {
  18231. "type": "string",
  18232. "pattern": "^msg"
  18233. }
  18234. },
  18235. "required": ["name", "sessionID", "arguments", "messageID"],
  18236. "additionalProperties": false
  18237. }
  18238. },
  18239. "required": ["id", "type", "properties"],
  18240. "additionalProperties": false
  18241. },
  18242. {
  18243. "type": "object",
  18244. "properties": {
  18245. "id": {
  18246. "type": "string",
  18247. "pattern": "^evt_"
  18248. },
  18249. "type": {
  18250. "type": "string",
  18251. "enum": ["project.directories.updated"]
  18252. },
  18253. "properties": {
  18254. "type": "object",
  18255. "properties": {
  18256. "projectID": {
  18257. "type": "string"
  18258. }
  18259. },
  18260. "required": ["projectID"],
  18261. "additionalProperties": false
  18262. }
  18263. },
  18264. "required": ["id", "type", "properties"],
  18265. "additionalProperties": false
  18266. },
  18267. {
  18268. "type": "object",
  18269. "properties": {
  18270. "id": {
  18271. "type": "string",
  18272. "pattern": "^evt_"
  18273. },
  18274. "type": {
  18275. "type": "string",
  18276. "enum": ["project.updated"]
  18277. },
  18278. "properties": {
  18279. "type": "object",
  18280. "properties": {
  18281. "id": {
  18282. "type": "string"
  18283. },
  18284. "worktree": {
  18285. "type": "string"
  18286. },
  18287. "vcs": {
  18288. "type": "string",
  18289. "enum": ["git"]
  18290. },
  18291. "name": {
  18292. "type": "string"
  18293. },
  18294. "icon": {
  18295. "type": "object",
  18296. "properties": {
  18297. "url": {
  18298. "type": "string"
  18299. },
  18300. "override": {
  18301. "type": "string"
  18302. },
  18303. "color": {
  18304. "type": "string"
  18305. }
  18306. },
  18307. "additionalProperties": false
  18308. },
  18309. "commands": {
  18310. "type": "object",
  18311. "properties": {
  18312. "start": {
  18313. "type": "string",
  18314. "description": "Startup script to run when creating a new workspace (worktree)"
  18315. }
  18316. },
  18317. "additionalProperties": false
  18318. },
  18319. "time": {
  18320. "type": "object",
  18321. "properties": {
  18322. "created": {
  18323. "type": "integer",
  18324. "minimum": 0
  18325. },
  18326. "updated": {
  18327. "type": "integer",
  18328. "minimum": 0
  18329. },
  18330. "initialized": {
  18331. "type": "integer",
  18332. "minimum": 0
  18333. }
  18334. },
  18335. "required": ["created", "updated"],
  18336. "additionalProperties": false
  18337. },
  18338. "sandboxes": {
  18339. "type": "array",
  18340. "items": {
  18341. "type": "string"
  18342. }
  18343. }
  18344. },
  18345. "required": ["id", "worktree", "time", "sandboxes"],
  18346. "additionalProperties": false
  18347. }
  18348. },
  18349. "required": ["id", "type", "properties"],
  18350. "additionalProperties": false
  18351. },
  18352. {
  18353. "type": "object",
  18354. "properties": {
  18355. "id": {
  18356. "type": "string",
  18357. "pattern": "^evt_"
  18358. },
  18359. "type": {
  18360. "type": "string",
  18361. "enum": ["vcs.branch.updated"]
  18362. },
  18363. "properties": {
  18364. "type": "object",
  18365. "properties": {
  18366. "branch": {
  18367. "type": "string"
  18368. }
  18369. },
  18370. "additionalProperties": false
  18371. }
  18372. },
  18373. "required": ["id", "type", "properties"],
  18374. "additionalProperties": false
  18375. },
  18376. {
  18377. "type": "object",
  18378. "properties": {
  18379. "id": {
  18380. "type": "string",
  18381. "pattern": "^evt_"
  18382. },
  18383. "type": {
  18384. "type": "string",
  18385. "enum": ["question.asked"]
  18386. },
  18387. "properties": {
  18388. "type": "object",
  18389. "properties": {
  18390. "id": {
  18391. "type": "string",
  18392. "pattern": "^que"
  18393. },
  18394. "sessionID": {
  18395. "type": "string",
  18396. "pattern": "^ses"
  18397. },
  18398. "questions": {
  18399. "type": "array",
  18400. "items": {
  18401. "$ref": "#/components/schemas/QuestionInfo"
  18402. },
  18403. "description": "Questions to ask"
  18404. },
  18405. "tool": {
  18406. "$ref": "#/components/schemas/QuestionTool"
  18407. }
  18408. },
  18409. "required": ["id", "sessionID", "questions"],
  18410. "additionalProperties": false
  18411. }
  18412. },
  18413. "required": ["id", "type", "properties"],
  18414. "additionalProperties": false
  18415. },
  18416. {
  18417. "type": "object",
  18418. "properties": {
  18419. "id": {
  18420. "type": "string",
  18421. "pattern": "^evt_"
  18422. },
  18423. "type": {
  18424. "type": "string",
  18425. "enum": ["question.replied"]
  18426. },
  18427. "properties": {
  18428. "type": "object",
  18429. "properties": {
  18430. "sessionID": {
  18431. "type": "string",
  18432. "pattern": "^ses"
  18433. },
  18434. "requestID": {
  18435. "type": "string",
  18436. "pattern": "^que"
  18437. },
  18438. "answers": {
  18439. "type": "array",
  18440. "items": {
  18441. "$ref": "#/components/schemas/QuestionAnswer"
  18442. }
  18443. }
  18444. },
  18445. "required": ["sessionID", "requestID", "answers"],
  18446. "additionalProperties": false
  18447. }
  18448. },
  18449. "required": ["id", "type", "properties"],
  18450. "additionalProperties": false
  18451. },
  18452. {
  18453. "type": "object",
  18454. "properties": {
  18455. "id": {
  18456. "type": "string",
  18457. "pattern": "^evt_"
  18458. },
  18459. "type": {
  18460. "type": "string",
  18461. "enum": ["question.rejected"]
  18462. },
  18463. "properties": {
  18464. "type": "object",
  18465. "properties": {
  18466. "sessionID": {
  18467. "type": "string",
  18468. "pattern": "^ses"
  18469. },
  18470. "requestID": {
  18471. "type": "string",
  18472. "pattern": "^que"
  18473. }
  18474. },
  18475. "required": ["sessionID", "requestID"],
  18476. "additionalProperties": false
  18477. }
  18478. },
  18479. "required": ["id", "type", "properties"],
  18480. "additionalProperties": false
  18481. },
  18482. {
  18483. "type": "object",
  18484. "properties": {
  18485. "id": {
  18486. "type": "string",
  18487. "pattern": "^evt_"
  18488. },
  18489. "type": {
  18490. "type": "string",
  18491. "enum": ["session.status"]
  18492. },
  18493. "properties": {
  18494. "type": "object",
  18495. "properties": {
  18496. "sessionID": {
  18497. "type": "string",
  18498. "pattern": "^ses"
  18499. },
  18500. "status": {
  18501. "$ref": "#/components/schemas/SessionStatus"
  18502. }
  18503. },
  18504. "required": ["sessionID", "status"],
  18505. "additionalProperties": false
  18506. }
  18507. },
  18508. "required": ["id", "type", "properties"],
  18509. "additionalProperties": false
  18510. },
  18511. {
  18512. "type": "object",
  18513. "properties": {
  18514. "id": {
  18515. "type": "string",
  18516. "pattern": "^evt_"
  18517. },
  18518. "type": {
  18519. "type": "string",
  18520. "enum": ["session.idle"]
  18521. },
  18522. "properties": {
  18523. "type": "object",
  18524. "properties": {
  18525. "sessionID": {
  18526. "type": "string",
  18527. "pattern": "^ses"
  18528. }
  18529. },
  18530. "required": ["sessionID"],
  18531. "additionalProperties": false
  18532. }
  18533. },
  18534. "required": ["id", "type", "properties"],
  18535. "additionalProperties": false
  18536. },
  18537. {
  18538. "type": "object",
  18539. "properties": {
  18540. "id": {
  18541. "type": "string",
  18542. "pattern": "^evt_"
  18543. },
  18544. "type": {
  18545. "type": "string",
  18546. "enum": ["session.compacted"]
  18547. },
  18548. "properties": {
  18549. "type": "object",
  18550. "properties": {
  18551. "sessionID": {
  18552. "type": "string",
  18553. "pattern": "^ses"
  18554. }
  18555. },
  18556. "required": ["sessionID"],
  18557. "additionalProperties": false
  18558. }
  18559. },
  18560. "required": ["id", "type", "properties"],
  18561. "additionalProperties": false
  18562. },
  18563. {
  18564. "type": "object",
  18565. "properties": {
  18566. "id": {
  18567. "type": "string",
  18568. "pattern": "^evt_"
  18569. },
  18570. "type": {
  18571. "type": "string",
  18572. "enum": ["worktree.ready"]
  18573. },
  18574. "properties": {
  18575. "type": "object",
  18576. "properties": {
  18577. "name": {
  18578. "type": "string"
  18579. },
  18580. "branch": {
  18581. "type": "string"
  18582. }
  18583. },
  18584. "required": ["name"],
  18585. "additionalProperties": false
  18586. }
  18587. },
  18588. "required": ["id", "type", "properties"],
  18589. "additionalProperties": false
  18590. },
  18591. {
  18592. "type": "object",
  18593. "properties": {
  18594. "id": {
  18595. "type": "string",
  18596. "pattern": "^evt_"
  18597. },
  18598. "type": {
  18599. "type": "string",
  18600. "enum": ["worktree.failed"]
  18601. },
  18602. "properties": {
  18603. "type": "object",
  18604. "properties": {
  18605. "message": {
  18606. "type": "string"
  18607. }
  18608. },
  18609. "required": ["message"],
  18610. "additionalProperties": false
  18611. }
  18612. },
  18613. "required": ["id", "type", "properties"],
  18614. "additionalProperties": false
  18615. },
  18616. {
  18617. "type": "object",
  18618. "properties": {
  18619. "id": {
  18620. "type": "string",
  18621. "pattern": "^evt_"
  18622. },
  18623. "type": {
  18624. "type": "string",
  18625. "enum": ["workspace.ready"]
  18626. },
  18627. "properties": {
  18628. "type": "object",
  18629. "properties": {
  18630. "name": {
  18631. "type": "string"
  18632. }
  18633. },
  18634. "required": ["name"],
  18635. "additionalProperties": false
  18636. }
  18637. },
  18638. "required": ["id", "type", "properties"],
  18639. "additionalProperties": false
  18640. },
  18641. {
  18642. "type": "object",
  18643. "properties": {
  18644. "id": {
  18645. "type": "string",
  18646. "pattern": "^evt_"
  18647. },
  18648. "type": {
  18649. "type": "string",
  18650. "enum": ["workspace.failed"]
  18651. },
  18652. "properties": {
  18653. "type": "object",
  18654. "properties": {
  18655. "message": {
  18656. "type": "string"
  18657. }
  18658. },
  18659. "required": ["message"],
  18660. "additionalProperties": false
  18661. }
  18662. },
  18663. "required": ["id", "type", "properties"],
  18664. "additionalProperties": false
  18665. },
  18666. {
  18667. "type": "object",
  18668. "properties": {
  18669. "id": {
  18670. "type": "string",
  18671. "pattern": "^evt_"
  18672. },
  18673. "type": {
  18674. "type": "string",
  18675. "enum": ["workspace.status"]
  18676. },
  18677. "properties": {
  18678. "type": "object",
  18679. "properties": {
  18680. "workspaceID": {
  18681. "type": "string",
  18682. "pattern": "^wrk"
  18683. },
  18684. "status": {
  18685. "type": "string",
  18686. "enum": ["connected", "connecting", "disconnected", "error"]
  18687. }
  18688. },
  18689. "required": ["workspaceID", "status"],
  18690. "additionalProperties": false
  18691. }
  18692. },
  18693. "required": ["id", "type", "properties"],
  18694. "additionalProperties": false
  18695. },
  18696. {
  18697. "type": "object",
  18698. "properties": {
  18699. "id": {
  18700. "type": "string",
  18701. "pattern": "^evt_"
  18702. },
  18703. "type": {
  18704. "type": "string",
  18705. "enum": ["server.connected"]
  18706. },
  18707. "properties": {
  18708. "type": "object",
  18709. "properties": {}
  18710. }
  18711. },
  18712. "required": ["id", "type", "properties"],
  18713. "additionalProperties": false
  18714. },
  18715. {
  18716. "type": "object",
  18717. "properties": {
  18718. "id": {
  18719. "type": "string",
  18720. "pattern": "^evt_"
  18721. },
  18722. "type": {
  18723. "type": "string",
  18724. "enum": ["global.disposed"]
  18725. },
  18726. "properties": {
  18727. "type": "object",
  18728. "properties": {}
  18729. }
  18730. },
  18731. "required": ["id", "type", "properties"],
  18732. "additionalProperties": false
  18733. },
  18734. {
  18735. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  18736. },
  18737. {
  18738. "$ref": "#/components/schemas/SyncEventSessionCreated"
  18739. },
  18740. {
  18741. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  18742. },
  18743. {
  18744. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  18745. },
  18746. {
  18747. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  18748. },
  18749. {
  18750. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  18751. },
  18752. {
  18753. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  18754. },
  18755. {
  18756. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  18757. },
  18758. {
  18759. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  18760. },
  18761. {
  18762. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  18763. },
  18764. {
  18765. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  18766. },
  18767. {
  18768. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  18769. },
  18770. {
  18771. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  18772. },
  18773. {
  18774. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  18775. },
  18776. {
  18777. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  18778. },
  18779. {
  18780. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  18781. },
  18782. {
  18783. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  18784. },
  18785. {
  18786. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  18787. },
  18788. {
  18789. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  18790. },
  18791. {
  18792. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  18793. },
  18794. {
  18795. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  18796. },
  18797. {
  18798. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  18799. },
  18800. {
  18801. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  18802. },
  18803. {
  18804. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  18805. },
  18806. {
  18807. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  18808. },
  18809. {
  18810. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  18811. },
  18812. {
  18813. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  18814. },
  18815. {
  18816. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  18817. },
  18818. {
  18819. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  18820. },
  18821. {
  18822. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  18823. },
  18824. {
  18825. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  18826. },
  18827. {
  18828. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  18829. },
  18830. {
  18831. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  18832. },
  18833. {
  18834. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  18835. },
  18836. {
  18837. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  18838. }
  18839. ]
  18840. }
  18841. },
  18842. "required": ["directory", "payload"],
  18843. "additionalProperties": false
  18844. },
  18845. "LogLevel": {
  18846. "type": "string",
  18847. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  18848. "description": "Log level"
  18849. },
  18850. "ServerConfig": {
  18851. "type": "object",
  18852. "properties": {
  18853. "port": {
  18854. "type": "integer",
  18855. "exclusiveMinimum": 0
  18856. },
  18857. "hostname": {
  18858. "type": "string"
  18859. },
  18860. "mdns": {
  18861. "type": "boolean"
  18862. },
  18863. "mdnsDomain": {
  18864. "type": "string"
  18865. },
  18866. "cors": {
  18867. "type": "array",
  18868. "items": {
  18869. "type": "string"
  18870. }
  18871. }
  18872. },
  18873. "additionalProperties": false,
  18874. "description": "Server configuration for opencode serve and web commands"
  18875. },
  18876. "PermissionActionConfig": {
  18877. "type": "string",
  18878. "enum": ["ask", "allow", "deny"]
  18879. },
  18880. "PermissionObjectConfig": {
  18881. "type": "object",
  18882. "additionalProperties": {
  18883. "$ref": "#/components/schemas/PermissionActionConfig"
  18884. }
  18885. },
  18886. "PermissionRuleConfig": {
  18887. "anyOf": [
  18888. {
  18889. "$ref": "#/components/schemas/PermissionActionConfig"
  18890. },
  18891. {
  18892. "$ref": "#/components/schemas/PermissionObjectConfig"
  18893. }
  18894. ]
  18895. },
  18896. "PermissionConfig": {
  18897. "anyOf": [
  18898. {
  18899. "$ref": "#/components/schemas/PermissionActionConfig"
  18900. },
  18901. {
  18902. "type": "object",
  18903. "properties": {
  18904. "read": {
  18905. "$ref": "#/components/schemas/PermissionRuleConfig"
  18906. },
  18907. "edit": {
  18908. "$ref": "#/components/schemas/PermissionRuleConfig"
  18909. },
  18910. "glob": {
  18911. "$ref": "#/components/schemas/PermissionRuleConfig"
  18912. },
  18913. "grep": {
  18914. "$ref": "#/components/schemas/PermissionRuleConfig"
  18915. },
  18916. "list": {
  18917. "$ref": "#/components/schemas/PermissionRuleConfig"
  18918. },
  18919. "bash": {
  18920. "$ref": "#/components/schemas/PermissionRuleConfig"
  18921. },
  18922. "task": {
  18923. "$ref": "#/components/schemas/PermissionRuleConfig"
  18924. },
  18925. "external_directory": {
  18926. "$ref": "#/components/schemas/PermissionRuleConfig"
  18927. },
  18928. "todowrite": {
  18929. "$ref": "#/components/schemas/PermissionActionConfig"
  18930. },
  18931. "question": {
  18932. "$ref": "#/components/schemas/PermissionActionConfig"
  18933. },
  18934. "webfetch": {
  18935. "$ref": "#/components/schemas/PermissionActionConfig"
  18936. },
  18937. "websearch": {
  18938. "$ref": "#/components/schemas/PermissionActionConfig"
  18939. },
  18940. "lsp": {
  18941. "$ref": "#/components/schemas/PermissionRuleConfig"
  18942. },
  18943. "doom_loop": {
  18944. "$ref": "#/components/schemas/PermissionActionConfig"
  18945. },
  18946. "skill": {
  18947. "$ref": "#/components/schemas/PermissionRuleConfig"
  18948. }
  18949. },
  18950. "additionalProperties": {
  18951. "$ref": "#/components/schemas/PermissionRuleConfig"
  18952. }
  18953. }
  18954. ]
  18955. },
  18956. "AgentConfig": {
  18957. "type": "object",
  18958. "properties": {
  18959. "model": {
  18960. "type": "string"
  18961. },
  18962. "variant": {
  18963. "type": "string"
  18964. },
  18965. "temperature": {
  18966. "type": "number"
  18967. },
  18968. "top_p": {
  18969. "type": "number"
  18970. },
  18971. "prompt": {
  18972. "type": "string"
  18973. },
  18974. "tools": {
  18975. "type": "object",
  18976. "additionalProperties": {
  18977. "type": "boolean"
  18978. }
  18979. },
  18980. "disable": {
  18981. "type": "boolean"
  18982. },
  18983. "description": {
  18984. "type": "string"
  18985. },
  18986. "mode": {
  18987. "type": "string",
  18988. "enum": ["subagent", "primary", "all"]
  18989. },
  18990. "hidden": {
  18991. "type": "boolean"
  18992. },
  18993. "options": {
  18994. "type": "object"
  18995. },
  18996. "color": {
  18997. "anyOf": [
  18998. {
  18999. "type": "string",
  19000. "pattern": "^#[0-9a-fA-F]{6}$"
  19001. },
  19002. {
  19003. "type": "string",
  19004. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  19005. }
  19006. ],
  19007. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  19008. },
  19009. "steps": {
  19010. "type": "integer",
  19011. "exclusiveMinimum": 0
  19012. },
  19013. "maxSteps": {
  19014. "type": "integer",
  19015. "exclusiveMinimum": 0
  19016. },
  19017. "permission": {
  19018. "$ref": "#/components/schemas/PermissionConfig"
  19019. }
  19020. },
  19021. "additionalProperties": {}
  19022. },
  19023. "ProviderConfig": {
  19024. "type": "object",
  19025. "properties": {
  19026. "api": {
  19027. "type": "string"
  19028. },
  19029. "name": {
  19030. "type": "string"
  19031. },
  19032. "env": {
  19033. "type": "array",
  19034. "items": {
  19035. "type": "string"
  19036. }
  19037. },
  19038. "id": {
  19039. "type": "string"
  19040. },
  19041. "npm": {
  19042. "type": "string"
  19043. },
  19044. "whitelist": {
  19045. "type": "array",
  19046. "items": {
  19047. "type": "string"
  19048. }
  19049. },
  19050. "blacklist": {
  19051. "type": "array",
  19052. "items": {
  19053. "type": "string"
  19054. }
  19055. },
  19056. "options": {
  19057. "type": "object",
  19058. "properties": {
  19059. "apiKey": {
  19060. "type": "string"
  19061. },
  19062. "baseURL": {
  19063. "type": "string"
  19064. },
  19065. "enterpriseUrl": {
  19066. "type": "string"
  19067. },
  19068. "setCacheKey": {
  19069. "type": "boolean"
  19070. },
  19071. "timeout": {
  19072. "anyOf": [
  19073. {
  19074. "type": "integer",
  19075. "exclusiveMinimum": 0
  19076. },
  19077. {
  19078. "type": "boolean",
  19079. "enum": [false]
  19080. }
  19081. ],
  19082. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  19083. },
  19084. "headerTimeout": {
  19085. "anyOf": [
  19086. {
  19087. "type": "integer",
  19088. "exclusiveMinimum": 0
  19089. },
  19090. {
  19091. "type": "boolean",
  19092. "enum": [false]
  19093. }
  19094. ],
  19095. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  19096. },
  19097. "chunkTimeout": {
  19098. "type": "integer",
  19099. "exclusiveMinimum": 0
  19100. }
  19101. },
  19102. "additionalProperties": {}
  19103. },
  19104. "models": {
  19105. "type": "object",
  19106. "additionalProperties": {
  19107. "type": "object",
  19108. "properties": {
  19109. "id": {
  19110. "type": "string"
  19111. },
  19112. "name": {
  19113. "type": "string"
  19114. },
  19115. "family": {
  19116. "type": "string"
  19117. },
  19118. "release_date": {
  19119. "type": "string"
  19120. },
  19121. "attachment": {
  19122. "type": "boolean"
  19123. },
  19124. "reasoning": {
  19125. "type": "boolean"
  19126. },
  19127. "temperature": {
  19128. "type": "boolean"
  19129. },
  19130. "tool_call": {
  19131. "type": "boolean"
  19132. },
  19133. "interleaved": {
  19134. "anyOf": [
  19135. {
  19136. "type": "boolean",
  19137. "enum": [true]
  19138. },
  19139. {
  19140. "type": "object",
  19141. "properties": {
  19142. "field": {
  19143. "type": "string",
  19144. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19145. }
  19146. },
  19147. "required": ["field"],
  19148. "additionalProperties": false
  19149. }
  19150. ]
  19151. },
  19152. "cost": {
  19153. "type": "object",
  19154. "properties": {
  19155. "input": {
  19156. "type": "number"
  19157. },
  19158. "output": {
  19159. "type": "number"
  19160. },
  19161. "cache_read": {
  19162. "type": "number"
  19163. },
  19164. "cache_write": {
  19165. "type": "number"
  19166. },
  19167. "context_over_200k": {
  19168. "type": "object",
  19169. "properties": {
  19170. "input": {
  19171. "type": "number"
  19172. },
  19173. "output": {
  19174. "type": "number"
  19175. },
  19176. "cache_read": {
  19177. "type": "number"
  19178. },
  19179. "cache_write": {
  19180. "type": "number"
  19181. }
  19182. },
  19183. "required": ["input", "output"],
  19184. "additionalProperties": false
  19185. }
  19186. },
  19187. "required": ["input", "output"],
  19188. "additionalProperties": false
  19189. },
  19190. "limit": {
  19191. "type": "object",
  19192. "properties": {
  19193. "context": {
  19194. "type": "number"
  19195. },
  19196. "input": {
  19197. "type": "number"
  19198. },
  19199. "output": {
  19200. "type": "number"
  19201. }
  19202. },
  19203. "required": ["context", "output"],
  19204. "additionalProperties": false
  19205. },
  19206. "modalities": {
  19207. "type": "object",
  19208. "properties": {
  19209. "input": {
  19210. "type": "array",
  19211. "items": {
  19212. "type": "string",
  19213. "enum": ["text", "audio", "image", "video", "pdf"]
  19214. }
  19215. },
  19216. "output": {
  19217. "type": "array",
  19218. "items": {
  19219. "type": "string",
  19220. "enum": ["text", "audio", "image", "video", "pdf"]
  19221. }
  19222. }
  19223. },
  19224. "additionalProperties": false
  19225. },
  19226. "experimental": {
  19227. "type": "boolean"
  19228. },
  19229. "status": {
  19230. "type": "string",
  19231. "enum": ["alpha", "beta", "deprecated", "active"]
  19232. },
  19233. "provider": {
  19234. "type": "object",
  19235. "properties": {
  19236. "npm": {
  19237. "type": "string"
  19238. },
  19239. "api": {
  19240. "type": "string"
  19241. }
  19242. },
  19243. "additionalProperties": false
  19244. },
  19245. "options": {
  19246. "type": "object"
  19247. },
  19248. "headers": {
  19249. "type": "object",
  19250. "additionalProperties": {
  19251. "type": "string"
  19252. }
  19253. },
  19254. "variants": {
  19255. "type": "object",
  19256. "additionalProperties": {
  19257. "type": "object",
  19258. "properties": {
  19259. "disabled": {
  19260. "type": "boolean"
  19261. }
  19262. },
  19263. "additionalProperties": {}
  19264. },
  19265. "description": "Variant-specific configuration"
  19266. }
  19267. },
  19268. "additionalProperties": false
  19269. }
  19270. }
  19271. },
  19272. "additionalProperties": false
  19273. },
  19274. "McpLocalConfig": {
  19275. "type": "object",
  19276. "properties": {
  19277. "type": {
  19278. "type": "string",
  19279. "enum": ["local"],
  19280. "description": "Type of MCP server connection"
  19281. },
  19282. "command": {
  19283. "type": "array",
  19284. "items": {
  19285. "type": "string"
  19286. },
  19287. "description": "Command and arguments to run the MCP server"
  19288. },
  19289. "environment": {
  19290. "type": "object",
  19291. "additionalProperties": {
  19292. "type": "string"
  19293. }
  19294. },
  19295. "enabled": {
  19296. "type": "boolean"
  19297. },
  19298. "timeout": {
  19299. "type": "integer",
  19300. "exclusiveMinimum": 0
  19301. }
  19302. },
  19303. "required": ["type", "command"],
  19304. "additionalProperties": false
  19305. },
  19306. "McpOAuthConfig": {
  19307. "type": "object",
  19308. "properties": {
  19309. "clientId": {
  19310. "type": "string"
  19311. },
  19312. "clientSecret": {
  19313. "type": "string"
  19314. },
  19315. "scope": {
  19316. "type": "string"
  19317. },
  19318. "callbackPort": {
  19319. "type": "integer",
  19320. "minimum": 1,
  19321. "maximum": 65535
  19322. },
  19323. "redirectUri": {
  19324. "type": "string"
  19325. }
  19326. },
  19327. "additionalProperties": false
  19328. },
  19329. "McpRemoteConfig": {
  19330. "type": "object",
  19331. "properties": {
  19332. "type": {
  19333. "type": "string",
  19334. "enum": ["remote"],
  19335. "description": "Type of MCP server connection"
  19336. },
  19337. "url": {
  19338. "type": "string",
  19339. "description": "URL of the remote MCP server"
  19340. },
  19341. "enabled": {
  19342. "type": "boolean"
  19343. },
  19344. "headers": {
  19345. "type": "object",
  19346. "additionalProperties": {
  19347. "type": "string"
  19348. }
  19349. },
  19350. "oauth": {
  19351. "anyOf": [
  19352. {
  19353. "$ref": "#/components/schemas/McpOAuthConfig"
  19354. },
  19355. {
  19356. "type": "boolean",
  19357. "enum": [false]
  19358. }
  19359. ],
  19360. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  19361. },
  19362. "timeout": {
  19363. "type": "integer",
  19364. "exclusiveMinimum": 0
  19365. }
  19366. },
  19367. "required": ["type", "url"],
  19368. "additionalProperties": false
  19369. },
  19370. "LayoutConfig": {
  19371. "type": "string",
  19372. "enum": ["auto", "stretch"],
  19373. "description": "@deprecated Always uses stretch layout."
  19374. },
  19375. "ImageAttachmentConfig": {
  19376. "type": "object",
  19377. "properties": {
  19378. "auto_resize": {
  19379. "type": "boolean"
  19380. },
  19381. "max_width": {
  19382. "type": "integer",
  19383. "exclusiveMinimum": 0
  19384. },
  19385. "max_height": {
  19386. "type": "integer",
  19387. "exclusiveMinimum": 0
  19388. },
  19389. "max_base64_bytes": {
  19390. "type": "integer",
  19391. "exclusiveMinimum": 0
  19392. }
  19393. },
  19394. "additionalProperties": false
  19395. },
  19396. "AttachmentConfig": {
  19397. "type": "object",
  19398. "properties": {
  19399. "image": {
  19400. "$ref": "#/components/schemas/ImageAttachmentConfig"
  19401. }
  19402. },
  19403. "additionalProperties": false
  19404. },
  19405. "Config": {
  19406. "type": "object",
  19407. "properties": {
  19408. "$schema": {
  19409. "type": "string"
  19410. },
  19411. "shell": {
  19412. "type": "string"
  19413. },
  19414. "logLevel": {
  19415. "$ref": "#/components/schemas/LogLevel"
  19416. },
  19417. "server": {
  19418. "$ref": "#/components/schemas/ServerConfig"
  19419. },
  19420. "command": {
  19421. "type": "object",
  19422. "additionalProperties": {
  19423. "type": "object",
  19424. "properties": {
  19425. "template": {
  19426. "type": "string"
  19427. },
  19428. "description": {
  19429. "type": "string"
  19430. },
  19431. "agent": {
  19432. "type": "string"
  19433. },
  19434. "model": {
  19435. "type": "string"
  19436. },
  19437. "variant": {
  19438. "type": "string"
  19439. },
  19440. "subtask": {
  19441. "type": "boolean"
  19442. }
  19443. },
  19444. "required": ["template"],
  19445. "additionalProperties": false
  19446. }
  19447. },
  19448. "skills": {
  19449. "type": "object",
  19450. "properties": {
  19451. "paths": {
  19452. "type": "array",
  19453. "items": {
  19454. "type": "string"
  19455. }
  19456. },
  19457. "urls": {
  19458. "type": "array",
  19459. "items": {
  19460. "type": "string"
  19461. }
  19462. }
  19463. },
  19464. "additionalProperties": false
  19465. },
  19466. "references": {
  19467. "type": "object",
  19468. "additionalProperties": {
  19469. "anyOf": [
  19470. {
  19471. "type": "string"
  19472. },
  19473. {
  19474. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19475. },
  19476. {
  19477. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19478. }
  19479. ]
  19480. }
  19481. },
  19482. "reference": {
  19483. "type": "object",
  19484. "additionalProperties": {
  19485. "anyOf": [
  19486. {
  19487. "type": "string"
  19488. },
  19489. {
  19490. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19491. },
  19492. {
  19493. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19494. }
  19495. ]
  19496. }
  19497. },
  19498. "watcher": {
  19499. "type": "object",
  19500. "properties": {
  19501. "ignore": {
  19502. "type": "array",
  19503. "items": {
  19504. "type": "string"
  19505. }
  19506. }
  19507. },
  19508. "additionalProperties": false
  19509. },
  19510. "snapshot": {
  19511. "type": "boolean"
  19512. },
  19513. "plugin": {
  19514. "type": "array",
  19515. "items": {
  19516. "anyOf": [
  19517. {
  19518. "type": "string"
  19519. },
  19520. {
  19521. "type": "array",
  19522. "prefixItems": [
  19523. {
  19524. "type": "string"
  19525. },
  19526. {
  19527. "type": "object"
  19528. }
  19529. ],
  19530. "maxItems": 2,
  19531. "minItems": 2
  19532. }
  19533. ]
  19534. }
  19535. },
  19536. "share": {
  19537. "type": "string",
  19538. "enum": ["manual", "auto", "disabled"]
  19539. },
  19540. "autoshare": {
  19541. "type": "boolean"
  19542. },
  19543. "autoupdate": {
  19544. "anyOf": [
  19545. {
  19546. "type": "boolean"
  19547. },
  19548. {
  19549. "type": "string",
  19550. "enum": ["notify"]
  19551. }
  19552. ],
  19553. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  19554. },
  19555. "disabled_providers": {
  19556. "type": "array",
  19557. "items": {
  19558. "type": "string"
  19559. }
  19560. },
  19561. "enabled_providers": {
  19562. "type": "array",
  19563. "items": {
  19564. "type": "string"
  19565. }
  19566. },
  19567. "model": {
  19568. "type": "string"
  19569. },
  19570. "small_model": {
  19571. "type": "string"
  19572. },
  19573. "default_agent": {
  19574. "type": "string"
  19575. },
  19576. "username": {
  19577. "type": "string"
  19578. },
  19579. "mode": {
  19580. "type": "object",
  19581. "properties": {
  19582. "build": {
  19583. "$ref": "#/components/schemas/AgentConfig"
  19584. },
  19585. "plan": {
  19586. "$ref": "#/components/schemas/AgentConfig"
  19587. }
  19588. },
  19589. "additionalProperties": {
  19590. "$ref": "#/components/schemas/AgentConfig"
  19591. }
  19592. },
  19593. "agent": {
  19594. "type": "object",
  19595. "properties": {
  19596. "plan": {
  19597. "$ref": "#/components/schemas/AgentConfig"
  19598. },
  19599. "build": {
  19600. "$ref": "#/components/schemas/AgentConfig"
  19601. },
  19602. "general": {
  19603. "$ref": "#/components/schemas/AgentConfig"
  19604. },
  19605. "explore": {
  19606. "$ref": "#/components/schemas/AgentConfig"
  19607. },
  19608. "title": {
  19609. "$ref": "#/components/schemas/AgentConfig"
  19610. },
  19611. "summary": {
  19612. "$ref": "#/components/schemas/AgentConfig"
  19613. },
  19614. "compaction": {
  19615. "$ref": "#/components/schemas/AgentConfig"
  19616. }
  19617. },
  19618. "additionalProperties": {
  19619. "$ref": "#/components/schemas/AgentConfig"
  19620. }
  19621. },
  19622. "provider": {
  19623. "type": "object",
  19624. "additionalProperties": {
  19625. "$ref": "#/components/schemas/ProviderConfig"
  19626. }
  19627. },
  19628. "mcp": {
  19629. "type": "object",
  19630. "additionalProperties": {
  19631. "anyOf": [
  19632. {
  19633. "$ref": "#/components/schemas/McpLocalConfig"
  19634. },
  19635. {
  19636. "$ref": "#/components/schemas/McpRemoteConfig"
  19637. },
  19638. {
  19639. "type": "object",
  19640. "properties": {
  19641. "enabled": {
  19642. "type": "boolean"
  19643. }
  19644. },
  19645. "required": ["enabled"],
  19646. "additionalProperties": false
  19647. }
  19648. ]
  19649. }
  19650. },
  19651. "formatter": {
  19652. "anyOf": [
  19653. {
  19654. "type": "boolean"
  19655. },
  19656. {
  19657. "type": "object",
  19658. "additionalProperties": {
  19659. "type": "object",
  19660. "properties": {
  19661. "disabled": {
  19662. "type": "boolean"
  19663. },
  19664. "command": {
  19665. "type": "array",
  19666. "items": {
  19667. "type": "string"
  19668. }
  19669. },
  19670. "environment": {
  19671. "type": "object",
  19672. "additionalProperties": {
  19673. "type": "string"
  19674. }
  19675. },
  19676. "extensions": {
  19677. "type": "array",
  19678. "items": {
  19679. "type": "string"
  19680. }
  19681. }
  19682. },
  19683. "additionalProperties": false
  19684. }
  19685. }
  19686. ],
  19687. "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."
  19688. },
  19689. "lsp": {
  19690. "anyOf": [
  19691. {
  19692. "type": "boolean"
  19693. },
  19694. {
  19695. "type": "object",
  19696. "additionalProperties": {
  19697. "anyOf": [
  19698. {
  19699. "type": "object",
  19700. "properties": {
  19701. "disabled": {
  19702. "type": "boolean",
  19703. "enum": [true]
  19704. }
  19705. },
  19706. "required": ["disabled"],
  19707. "additionalProperties": false
  19708. },
  19709. {
  19710. "type": "object",
  19711. "properties": {
  19712. "command": {
  19713. "type": "array",
  19714. "items": {
  19715. "type": "string"
  19716. }
  19717. },
  19718. "extensions": {
  19719. "type": "array",
  19720. "items": {
  19721. "type": "string"
  19722. }
  19723. },
  19724. "disabled": {
  19725. "type": "boolean"
  19726. },
  19727. "env": {
  19728. "type": "object",
  19729. "additionalProperties": {
  19730. "type": "string"
  19731. }
  19732. },
  19733. "initialization": {
  19734. "type": "object"
  19735. }
  19736. },
  19737. "required": ["command"],
  19738. "additionalProperties": false
  19739. }
  19740. ]
  19741. }
  19742. }
  19743. ],
  19744. "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."
  19745. },
  19746. "instructions": {
  19747. "type": "array",
  19748. "items": {
  19749. "type": "string"
  19750. }
  19751. },
  19752. "layout": {
  19753. "$ref": "#/components/schemas/LayoutConfig"
  19754. },
  19755. "permission": {
  19756. "$ref": "#/components/schemas/PermissionConfig"
  19757. },
  19758. "tools": {
  19759. "type": "object",
  19760. "additionalProperties": {
  19761. "type": "boolean"
  19762. }
  19763. },
  19764. "attachment": {
  19765. "$ref": "#/components/schemas/AttachmentConfig"
  19766. },
  19767. "enterprise": {
  19768. "type": "object",
  19769. "properties": {
  19770. "url": {
  19771. "type": "string"
  19772. }
  19773. },
  19774. "additionalProperties": false
  19775. },
  19776. "tool_output": {
  19777. "type": "object",
  19778. "properties": {
  19779. "max_lines": {
  19780. "type": "integer",
  19781. "exclusiveMinimum": 0
  19782. },
  19783. "max_bytes": {
  19784. "type": "integer",
  19785. "exclusiveMinimum": 0
  19786. }
  19787. },
  19788. "additionalProperties": false
  19789. },
  19790. "compaction": {
  19791. "type": "object",
  19792. "properties": {
  19793. "auto": {
  19794. "type": "boolean"
  19795. },
  19796. "prune": {
  19797. "type": "boolean"
  19798. },
  19799. "tail_turns": {
  19800. "type": "integer",
  19801. "minimum": 0
  19802. },
  19803. "preserve_recent_tokens": {
  19804. "type": "integer",
  19805. "minimum": 0
  19806. },
  19807. "reserved": {
  19808. "type": "integer",
  19809. "minimum": 0
  19810. }
  19811. },
  19812. "additionalProperties": false
  19813. },
  19814. "experimental": {
  19815. "type": "object",
  19816. "properties": {
  19817. "disable_paste_summary": {
  19818. "type": "boolean"
  19819. },
  19820. "batch_tool": {
  19821. "type": "boolean"
  19822. },
  19823. "openTelemetry": {
  19824. "type": "boolean"
  19825. },
  19826. "primary_tools": {
  19827. "type": "array",
  19828. "items": {
  19829. "type": "string"
  19830. }
  19831. },
  19832. "continue_loop_on_deny": {
  19833. "type": "boolean"
  19834. },
  19835. "mcp_timeout": {
  19836. "type": "integer",
  19837. "exclusiveMinimum": 0
  19838. },
  19839. "policies": {
  19840. "type": "array",
  19841. "items": {
  19842. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  19843. }
  19844. }
  19845. },
  19846. "additionalProperties": false
  19847. }
  19848. },
  19849. "additionalProperties": false
  19850. },
  19851. "Model": {
  19852. "type": "object",
  19853. "properties": {
  19854. "id": {
  19855. "type": "string"
  19856. },
  19857. "providerID": {
  19858. "type": "string"
  19859. },
  19860. "api": {
  19861. "type": "object",
  19862. "properties": {
  19863. "id": {
  19864. "type": "string"
  19865. },
  19866. "url": {
  19867. "type": "string"
  19868. },
  19869. "npm": {
  19870. "type": "string"
  19871. }
  19872. },
  19873. "required": ["id", "url", "npm"],
  19874. "additionalProperties": false
  19875. },
  19876. "name": {
  19877. "type": "string"
  19878. },
  19879. "family": {
  19880. "type": "string"
  19881. },
  19882. "capabilities": {
  19883. "type": "object",
  19884. "properties": {
  19885. "temperature": {
  19886. "type": "boolean"
  19887. },
  19888. "reasoning": {
  19889. "type": "boolean"
  19890. },
  19891. "attachment": {
  19892. "type": "boolean"
  19893. },
  19894. "toolcall": {
  19895. "type": "boolean"
  19896. },
  19897. "input": {
  19898. "type": "object",
  19899. "properties": {
  19900. "text": {
  19901. "type": "boolean"
  19902. },
  19903. "audio": {
  19904. "type": "boolean"
  19905. },
  19906. "image": {
  19907. "type": "boolean"
  19908. },
  19909. "video": {
  19910. "type": "boolean"
  19911. },
  19912. "pdf": {
  19913. "type": "boolean"
  19914. }
  19915. },
  19916. "required": ["text", "audio", "image", "video", "pdf"],
  19917. "additionalProperties": false
  19918. },
  19919. "output": {
  19920. "type": "object",
  19921. "properties": {
  19922. "text": {
  19923. "type": "boolean"
  19924. },
  19925. "audio": {
  19926. "type": "boolean"
  19927. },
  19928. "image": {
  19929. "type": "boolean"
  19930. },
  19931. "video": {
  19932. "type": "boolean"
  19933. },
  19934. "pdf": {
  19935. "type": "boolean"
  19936. }
  19937. },
  19938. "required": ["text", "audio", "image", "video", "pdf"],
  19939. "additionalProperties": false
  19940. },
  19941. "interleaved": {
  19942. "anyOf": [
  19943. {
  19944. "type": "boolean"
  19945. },
  19946. {
  19947. "type": "object",
  19948. "properties": {
  19949. "field": {
  19950. "type": "string",
  19951. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19952. }
  19953. },
  19954. "required": ["field"],
  19955. "additionalProperties": false
  19956. }
  19957. ]
  19958. }
  19959. },
  19960. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  19961. "additionalProperties": false
  19962. },
  19963. "cost": {
  19964. "type": "object",
  19965. "properties": {
  19966. "input": {
  19967. "type": "number"
  19968. },
  19969. "output": {
  19970. "type": "number"
  19971. },
  19972. "cache": {
  19973. "type": "object",
  19974. "properties": {
  19975. "read": {
  19976. "type": "number"
  19977. },
  19978. "write": {
  19979. "type": "number"
  19980. }
  19981. },
  19982. "required": ["read", "write"],
  19983. "additionalProperties": false
  19984. },
  19985. "tiers": {
  19986. "type": "array",
  19987. "items": {
  19988. "type": "object",
  19989. "properties": {
  19990. "input": {
  19991. "type": "number"
  19992. },
  19993. "output": {
  19994. "type": "number"
  19995. },
  19996. "cache": {
  19997. "type": "object",
  19998. "properties": {
  19999. "read": {
  20000. "type": "number"
  20001. },
  20002. "write": {
  20003. "type": "number"
  20004. }
  20005. },
  20006. "required": ["read", "write"],
  20007. "additionalProperties": false
  20008. },
  20009. "tier": {
  20010. "type": "object",
  20011. "properties": {
  20012. "type": {
  20013. "type": "string",
  20014. "enum": ["context"]
  20015. },
  20016. "size": {
  20017. "type": "number"
  20018. }
  20019. },
  20020. "required": ["type", "size"],
  20021. "additionalProperties": false
  20022. }
  20023. },
  20024. "required": ["input", "output", "cache", "tier"],
  20025. "additionalProperties": false
  20026. }
  20027. },
  20028. "experimentalOver200K": {
  20029. "type": "object",
  20030. "properties": {
  20031. "input": {
  20032. "type": "number"
  20033. },
  20034. "output": {
  20035. "type": "number"
  20036. },
  20037. "cache": {
  20038. "type": "object",
  20039. "properties": {
  20040. "read": {
  20041. "type": "number"
  20042. },
  20043. "write": {
  20044. "type": "number"
  20045. }
  20046. },
  20047. "required": ["read", "write"],
  20048. "additionalProperties": false
  20049. }
  20050. },
  20051. "required": ["input", "output", "cache"],
  20052. "additionalProperties": false
  20053. }
  20054. },
  20055. "required": ["input", "output", "cache"],
  20056. "additionalProperties": false
  20057. },
  20058. "limit": {
  20059. "type": "object",
  20060. "properties": {
  20061. "context": {
  20062. "type": "number"
  20063. },
  20064. "input": {
  20065. "type": "number"
  20066. },
  20067. "output": {
  20068. "type": "number"
  20069. }
  20070. },
  20071. "required": ["context", "output"],
  20072. "additionalProperties": false
  20073. },
  20074. "status": {
  20075. "type": "string",
  20076. "enum": ["alpha", "beta", "deprecated", "active"]
  20077. },
  20078. "options": {
  20079. "type": "object"
  20080. },
  20081. "headers": {
  20082. "type": "object",
  20083. "additionalProperties": {
  20084. "type": "string"
  20085. }
  20086. },
  20087. "release_date": {
  20088. "type": "string"
  20089. },
  20090. "variants": {
  20091. "type": "object",
  20092. "additionalProperties": {
  20093. "type": "object"
  20094. }
  20095. }
  20096. },
  20097. "required": [
  20098. "id",
  20099. "providerID",
  20100. "api",
  20101. "name",
  20102. "capabilities",
  20103. "cost",
  20104. "limit",
  20105. "status",
  20106. "options",
  20107. "headers",
  20108. "release_date"
  20109. ],
  20110. "additionalProperties": false
  20111. },
  20112. "Provider": {
  20113. "type": "object",
  20114. "properties": {
  20115. "id": {
  20116. "type": "string"
  20117. },
  20118. "name": {
  20119. "type": "string"
  20120. },
  20121. "source": {
  20122. "type": "string",
  20123. "enum": ["env", "config", "custom", "api"]
  20124. },
  20125. "env": {
  20126. "type": "array",
  20127. "items": {
  20128. "type": "string"
  20129. }
  20130. },
  20131. "key": {
  20132. "type": "string"
  20133. },
  20134. "options": {
  20135. "type": "object"
  20136. },
  20137. "models": {
  20138. "type": "object",
  20139. "additionalProperties": {
  20140. "$ref": "#/components/schemas/Model"
  20141. }
  20142. }
  20143. },
  20144. "required": ["id", "name", "source", "env", "options", "models"],
  20145. "additionalProperties": false
  20146. },
  20147. "ConsoleState": {
  20148. "type": "object",
  20149. "properties": {
  20150. "consoleManagedProviders": {
  20151. "type": "array",
  20152. "items": {
  20153. "type": "string"
  20154. }
  20155. },
  20156. "activeOrgName": {
  20157. "type": "string"
  20158. },
  20159. "switchableOrgCount": {
  20160. "type": "integer",
  20161. "minimum": 0
  20162. }
  20163. },
  20164. "required": ["consoleManagedProviders", "switchableOrgCount"],
  20165. "additionalProperties": false
  20166. },
  20167. "effect_HttpApiError_InternalServerError": {
  20168. "type": "object",
  20169. "properties": {
  20170. "_tag": {
  20171. "type": "string",
  20172. "enum": ["InternalServerError"]
  20173. }
  20174. },
  20175. "required": ["_tag"],
  20176. "additionalProperties": false
  20177. },
  20178. "ToolListItem": {
  20179. "type": "object",
  20180. "properties": {
  20181. "id": {
  20182. "type": "string"
  20183. },
  20184. "description": {
  20185. "type": "string"
  20186. },
  20187. "parameters": {}
  20188. },
  20189. "required": ["id", "description", "parameters"],
  20190. "additionalProperties": false
  20191. },
  20192. "ToolList": {
  20193. "type": "array",
  20194. "items": {
  20195. "$ref": "#/components/schemas/ToolListItem"
  20196. }
  20197. },
  20198. "ToolIDs": {
  20199. "type": "array",
  20200. "items": {
  20201. "type": "string"
  20202. }
  20203. },
  20204. "WorktreeError": {
  20205. "type": "object",
  20206. "properties": {
  20207. "name": {
  20208. "type": "string",
  20209. "enum": [
  20210. "WorktreeNotGitError",
  20211. "WorktreeNameGenerationFailedError",
  20212. "WorktreeCreateFailedError",
  20213. "WorktreeStartCommandFailedError",
  20214. "WorktreeRemoveFailedError",
  20215. "WorktreeResetFailedError",
  20216. "WorktreeListFailedError"
  20217. ]
  20218. },
  20219. "data": {
  20220. "type": "object",
  20221. "properties": {
  20222. "message": {
  20223. "type": "string"
  20224. }
  20225. },
  20226. "required": ["message"],
  20227. "additionalProperties": false
  20228. }
  20229. },
  20230. "required": ["name", "data"],
  20231. "additionalProperties": false
  20232. },
  20233. "WorktreeCreateInput": {
  20234. "type": "object",
  20235. "properties": {
  20236. "name": {
  20237. "type": "string"
  20238. },
  20239. "startCommand": {
  20240. "type": "string",
  20241. "description": "Additional startup script to run after the project's start command"
  20242. }
  20243. },
  20244. "additionalProperties": false
  20245. },
  20246. "Worktree": {
  20247. "type": "object",
  20248. "properties": {
  20249. "name": {
  20250. "type": "string"
  20251. },
  20252. "branch": {
  20253. "type": "string"
  20254. },
  20255. "directory": {
  20256. "type": "string"
  20257. }
  20258. },
  20259. "required": ["name", "directory"],
  20260. "additionalProperties": false
  20261. },
  20262. "WorktreeRemoveInput": {
  20263. "type": "object",
  20264. "properties": {
  20265. "directory": {
  20266. "type": "string"
  20267. }
  20268. },
  20269. "required": ["directory"],
  20270. "additionalProperties": false
  20271. },
  20272. "WorktreeResetInput": {
  20273. "type": "object",
  20274. "properties": {
  20275. "directory": {
  20276. "type": "string"
  20277. }
  20278. },
  20279. "required": ["directory"],
  20280. "additionalProperties": false
  20281. },
  20282. "ProjectSummary": {
  20283. "type": "object",
  20284. "properties": {
  20285. "id": {
  20286. "type": "string"
  20287. },
  20288. "name": {
  20289. "type": "string"
  20290. },
  20291. "worktree": {
  20292. "type": "string"
  20293. }
  20294. },
  20295. "required": ["id", "worktree"],
  20296. "additionalProperties": false
  20297. },
  20298. "GlobalSession": {
  20299. "type": "object",
  20300. "properties": {
  20301. "id": {
  20302. "type": "string",
  20303. "pattern": "^ses"
  20304. },
  20305. "slug": {
  20306. "type": "string"
  20307. },
  20308. "projectID": {
  20309. "type": "string"
  20310. },
  20311. "workspaceID": {
  20312. "type": "string",
  20313. "pattern": "^wrk"
  20314. },
  20315. "directory": {
  20316. "type": "string"
  20317. },
  20318. "path": {
  20319. "type": "string"
  20320. },
  20321. "parentID": {
  20322. "type": "string",
  20323. "pattern": "^ses"
  20324. },
  20325. "summary": {
  20326. "type": "object",
  20327. "properties": {
  20328. "additions": {
  20329. "type": "number"
  20330. },
  20331. "deletions": {
  20332. "type": "number"
  20333. },
  20334. "files": {
  20335. "type": "number"
  20336. },
  20337. "diffs": {
  20338. "type": "array",
  20339. "items": {
  20340. "$ref": "#/components/schemas/SnapshotFileDiff"
  20341. }
  20342. }
  20343. },
  20344. "required": ["additions", "deletions", "files"],
  20345. "additionalProperties": false
  20346. },
  20347. "cost": {
  20348. "type": "number"
  20349. },
  20350. "tokens": {
  20351. "type": "object",
  20352. "properties": {
  20353. "input": {
  20354. "type": "number"
  20355. },
  20356. "output": {
  20357. "type": "number"
  20358. },
  20359. "reasoning": {
  20360. "type": "number"
  20361. },
  20362. "cache": {
  20363. "type": "object",
  20364. "properties": {
  20365. "read": {
  20366. "type": "number"
  20367. },
  20368. "write": {
  20369. "type": "number"
  20370. }
  20371. },
  20372. "required": ["read", "write"],
  20373. "additionalProperties": false
  20374. }
  20375. },
  20376. "required": ["input", "output", "reasoning", "cache"],
  20377. "additionalProperties": false
  20378. },
  20379. "share": {
  20380. "type": "object",
  20381. "properties": {
  20382. "url": {
  20383. "type": "string"
  20384. }
  20385. },
  20386. "required": ["url"],
  20387. "additionalProperties": false
  20388. },
  20389. "title": {
  20390. "type": "string"
  20391. },
  20392. "agent": {
  20393. "type": "string"
  20394. },
  20395. "model": {
  20396. "type": "object",
  20397. "properties": {
  20398. "id": {
  20399. "type": "string"
  20400. },
  20401. "providerID": {
  20402. "type": "string"
  20403. },
  20404. "variant": {
  20405. "type": "string"
  20406. }
  20407. },
  20408. "required": ["id", "providerID"],
  20409. "additionalProperties": false
  20410. },
  20411. "version": {
  20412. "type": "string"
  20413. },
  20414. "metadata": {
  20415. "type": "object"
  20416. },
  20417. "time": {
  20418. "type": "object",
  20419. "properties": {
  20420. "created": {
  20421. "type": "integer",
  20422. "minimum": 0
  20423. },
  20424. "updated": {
  20425. "type": "integer",
  20426. "minimum": 0
  20427. },
  20428. "compacting": {
  20429. "type": "integer",
  20430. "minimum": 0
  20431. },
  20432. "archived": {
  20433. "type": "number"
  20434. }
  20435. },
  20436. "required": ["created", "updated"],
  20437. "additionalProperties": false
  20438. },
  20439. "permission": {
  20440. "$ref": "#/components/schemas/PermissionRuleset"
  20441. },
  20442. "revert": {
  20443. "type": "object",
  20444. "properties": {
  20445. "messageID": {
  20446. "type": "string",
  20447. "pattern": "^msg"
  20448. },
  20449. "partID": {
  20450. "type": "string",
  20451. "pattern": "^prt"
  20452. },
  20453. "snapshot": {
  20454. "type": "string"
  20455. },
  20456. "diff": {
  20457. "type": "string"
  20458. }
  20459. },
  20460. "required": ["messageID"],
  20461. "additionalProperties": false
  20462. },
  20463. "project": {
  20464. "anyOf": [
  20465. {
  20466. "$ref": "#/components/schemas/ProjectSummary"
  20467. },
  20468. {
  20469. "type": "null"
  20470. }
  20471. ]
  20472. }
  20473. },
  20474. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  20475. "additionalProperties": false
  20476. },
  20477. "McpResource": {
  20478. "type": "object",
  20479. "properties": {
  20480. "name": {
  20481. "type": "string"
  20482. },
  20483. "uri": {
  20484. "type": "string"
  20485. },
  20486. "description": {
  20487. "type": "string"
  20488. },
  20489. "mimeType": {
  20490. "type": "string"
  20491. },
  20492. "client": {
  20493. "type": "string"
  20494. }
  20495. },
  20496. "required": ["name", "uri", "client"],
  20497. "additionalProperties": false
  20498. },
  20499. "Symbol": {
  20500. "type": "object",
  20501. "properties": {
  20502. "name": {
  20503. "type": "string"
  20504. },
  20505. "kind": {
  20506. "type": "integer",
  20507. "minimum": 0
  20508. },
  20509. "location": {
  20510. "type": "object",
  20511. "properties": {
  20512. "uri": {
  20513. "type": "string"
  20514. },
  20515. "range": {
  20516. "$ref": "#/components/schemas/Range"
  20517. }
  20518. },
  20519. "required": ["uri", "range"],
  20520. "additionalProperties": false
  20521. }
  20522. },
  20523. "required": ["name", "kind", "location"],
  20524. "additionalProperties": false
  20525. },
  20526. "FileNode": {
  20527. "type": "object",
  20528. "properties": {
  20529. "name": {
  20530. "type": "string"
  20531. },
  20532. "path": {
  20533. "type": "string"
  20534. },
  20535. "absolute": {
  20536. "type": "string"
  20537. },
  20538. "type": {
  20539. "type": "string",
  20540. "enum": ["file", "directory"]
  20541. },
  20542. "ignored": {
  20543. "type": "boolean"
  20544. }
  20545. },
  20546. "required": ["name", "path", "absolute", "type", "ignored"],
  20547. "additionalProperties": false
  20548. },
  20549. "FileContent": {
  20550. "type": "object",
  20551. "properties": {
  20552. "type": {
  20553. "type": "string",
  20554. "enum": ["text", "binary"]
  20555. },
  20556. "content": {
  20557. "type": "string"
  20558. },
  20559. "diff": {
  20560. "type": "string"
  20561. },
  20562. "patch": {
  20563. "type": "object",
  20564. "properties": {
  20565. "oldFileName": {
  20566. "type": "string"
  20567. },
  20568. "newFileName": {
  20569. "type": "string"
  20570. },
  20571. "oldHeader": {
  20572. "type": "string"
  20573. },
  20574. "newHeader": {
  20575. "type": "string"
  20576. },
  20577. "hunks": {
  20578. "type": "array",
  20579. "items": {
  20580. "type": "object",
  20581. "properties": {
  20582. "oldStart": {
  20583. "type": "integer",
  20584. "minimum": 0
  20585. },
  20586. "oldLines": {
  20587. "type": "integer",
  20588. "minimum": 0
  20589. },
  20590. "newStart": {
  20591. "type": "integer",
  20592. "minimum": 0
  20593. },
  20594. "newLines": {
  20595. "type": "integer",
  20596. "minimum": 0
  20597. },
  20598. "lines": {
  20599. "type": "array",
  20600. "items": {
  20601. "type": "string"
  20602. }
  20603. }
  20604. },
  20605. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  20606. "additionalProperties": false
  20607. }
  20608. },
  20609. "index": {
  20610. "type": "string"
  20611. }
  20612. },
  20613. "required": ["oldFileName", "newFileName", "hunks"],
  20614. "additionalProperties": false
  20615. },
  20616. "encoding": {
  20617. "type": "string",
  20618. "enum": ["base64"]
  20619. },
  20620. "mimeType": {
  20621. "type": "string"
  20622. }
  20623. },
  20624. "required": ["type", "content"],
  20625. "additionalProperties": false
  20626. },
  20627. "File": {
  20628. "type": "object",
  20629. "properties": {
  20630. "path": {
  20631. "type": "string"
  20632. },
  20633. "added": {
  20634. "type": "integer",
  20635. "minimum": 0
  20636. },
  20637. "removed": {
  20638. "type": "integer",
  20639. "minimum": 0
  20640. },
  20641. "status": {
  20642. "type": "string",
  20643. "enum": ["added", "deleted", "modified"]
  20644. }
  20645. },
  20646. "required": ["path", "added", "removed", "status"],
  20647. "additionalProperties": false
  20648. },
  20649. "Path": {
  20650. "type": "object",
  20651. "properties": {
  20652. "home": {
  20653. "type": "string"
  20654. },
  20655. "state": {
  20656. "type": "string"
  20657. },
  20658. "config": {
  20659. "type": "string"
  20660. },
  20661. "worktree": {
  20662. "type": "string"
  20663. },
  20664. "directory": {
  20665. "type": "string"
  20666. }
  20667. },
  20668. "required": ["home", "state", "config", "worktree", "directory"],
  20669. "additionalProperties": false
  20670. },
  20671. "VcsInfo": {
  20672. "type": "object",
  20673. "properties": {
  20674. "branch": {
  20675. "type": "string"
  20676. },
  20677. "default_branch": {
  20678. "type": "string"
  20679. }
  20680. },
  20681. "additionalProperties": false
  20682. },
  20683. "VcsFileStatus": {
  20684. "type": "object",
  20685. "properties": {
  20686. "file": {
  20687. "type": "string"
  20688. },
  20689. "additions": {
  20690. "type": "number"
  20691. },
  20692. "deletions": {
  20693. "type": "number"
  20694. },
  20695. "status": {
  20696. "type": "string",
  20697. "enum": ["added", "deleted", "modified"]
  20698. }
  20699. },
  20700. "required": ["file", "additions", "deletions", "status"],
  20701. "additionalProperties": false
  20702. },
  20703. "VcsFileDiff": {
  20704. "type": "object",
  20705. "properties": {
  20706. "file": {
  20707. "type": "string"
  20708. },
  20709. "patch": {
  20710. "type": "string"
  20711. },
  20712. "additions": {
  20713. "type": "number"
  20714. },
  20715. "deletions": {
  20716. "type": "number"
  20717. },
  20718. "status": {
  20719. "type": "string",
  20720. "enum": ["added", "deleted", "modified"]
  20721. }
  20722. },
  20723. "required": ["file", "additions", "deletions"],
  20724. "additionalProperties": false
  20725. },
  20726. "VcsApplyError": {
  20727. "type": "object",
  20728. "properties": {
  20729. "name": {
  20730. "type": "string",
  20731. "enum": ["VcsApplyError"]
  20732. },
  20733. "data": {
  20734. "type": "object",
  20735. "properties": {
  20736. "message": {
  20737. "type": "string"
  20738. },
  20739. "reason": {
  20740. "type": "string",
  20741. "enum": ["non-git", "not-clean"]
  20742. }
  20743. },
  20744. "required": ["message", "reason"],
  20745. "additionalProperties": false
  20746. }
  20747. },
  20748. "required": ["name", "data"],
  20749. "additionalProperties": false
  20750. },
  20751. "Command": {
  20752. "type": "object",
  20753. "properties": {
  20754. "name": {
  20755. "type": "string"
  20756. },
  20757. "description": {
  20758. "type": "string"
  20759. },
  20760. "agent": {
  20761. "type": "string"
  20762. },
  20763. "model": {
  20764. "type": "string"
  20765. },
  20766. "source": {
  20767. "type": "string",
  20768. "enum": ["command", "mcp", "skill"]
  20769. },
  20770. "template": {
  20771. "type": "string"
  20772. },
  20773. "subtask": {
  20774. "type": "boolean"
  20775. },
  20776. "hints": {
  20777. "type": "array",
  20778. "items": {
  20779. "type": "string"
  20780. }
  20781. }
  20782. },
  20783. "required": ["name", "template", "hints"],
  20784. "additionalProperties": false
  20785. },
  20786. "Agent": {
  20787. "type": "object",
  20788. "properties": {
  20789. "name": {
  20790. "type": "string"
  20791. },
  20792. "description": {
  20793. "type": "string"
  20794. },
  20795. "mode": {
  20796. "type": "string",
  20797. "enum": ["subagent", "primary", "all"]
  20798. },
  20799. "native": {
  20800. "type": "boolean"
  20801. },
  20802. "hidden": {
  20803. "type": "boolean"
  20804. },
  20805. "topP": {
  20806. "type": "number"
  20807. },
  20808. "temperature": {
  20809. "type": "number"
  20810. },
  20811. "color": {
  20812. "type": "string"
  20813. },
  20814. "permission": {
  20815. "$ref": "#/components/schemas/PermissionRuleset"
  20816. },
  20817. "model": {
  20818. "type": "object",
  20819. "properties": {
  20820. "modelID": {
  20821. "type": "string"
  20822. },
  20823. "providerID": {
  20824. "type": "string"
  20825. }
  20826. },
  20827. "required": ["modelID", "providerID"],
  20828. "additionalProperties": false
  20829. },
  20830. "variant": {
  20831. "type": "string"
  20832. },
  20833. "prompt": {
  20834. "type": "string"
  20835. },
  20836. "options": {
  20837. "type": "object"
  20838. },
  20839. "steps": {
  20840. "type": "number"
  20841. }
  20842. },
  20843. "required": ["name", "mode", "permission", "options"],
  20844. "additionalProperties": false
  20845. },
  20846. "LSPStatus": {
  20847. "type": "object",
  20848. "properties": {
  20849. "id": {
  20850. "type": "string"
  20851. },
  20852. "name": {
  20853. "type": "string"
  20854. },
  20855. "root": {
  20856. "type": "string"
  20857. },
  20858. "status": {
  20859. "type": "string",
  20860. "enum": ["connected", "error"]
  20861. }
  20862. },
  20863. "required": ["id", "name", "root", "status"],
  20864. "additionalProperties": false
  20865. },
  20866. "FormatterStatus": {
  20867. "type": "object",
  20868. "properties": {
  20869. "name": {
  20870. "type": "string"
  20871. },
  20872. "extensions": {
  20873. "type": "array",
  20874. "items": {
  20875. "type": "string"
  20876. }
  20877. },
  20878. "enabled": {
  20879. "type": "boolean"
  20880. }
  20881. },
  20882. "required": ["name", "extensions", "enabled"],
  20883. "additionalProperties": false
  20884. },
  20885. "MCPStatusConnected": {
  20886. "type": "object",
  20887. "properties": {
  20888. "status": {
  20889. "type": "string",
  20890. "enum": ["connected"]
  20891. }
  20892. },
  20893. "required": ["status"],
  20894. "additionalProperties": false
  20895. },
  20896. "MCPStatusDisabled": {
  20897. "type": "object",
  20898. "properties": {
  20899. "status": {
  20900. "type": "string",
  20901. "enum": ["disabled"]
  20902. }
  20903. },
  20904. "required": ["status"],
  20905. "additionalProperties": false
  20906. },
  20907. "MCPStatusFailed": {
  20908. "type": "object",
  20909. "properties": {
  20910. "status": {
  20911. "type": "string",
  20912. "enum": ["failed"]
  20913. },
  20914. "error": {
  20915. "type": "string"
  20916. }
  20917. },
  20918. "required": ["status", "error"],
  20919. "additionalProperties": false
  20920. },
  20921. "MCPStatusNeedsAuth": {
  20922. "type": "object",
  20923. "properties": {
  20924. "status": {
  20925. "type": "string",
  20926. "enum": ["needs_auth"]
  20927. }
  20928. },
  20929. "required": ["status"],
  20930. "additionalProperties": false
  20931. },
  20932. "MCPStatusNeedsClientRegistration": {
  20933. "type": "object",
  20934. "properties": {
  20935. "status": {
  20936. "type": "string",
  20937. "enum": ["needs_client_registration"]
  20938. },
  20939. "error": {
  20940. "type": "string"
  20941. }
  20942. },
  20943. "required": ["status", "error"],
  20944. "additionalProperties": false
  20945. },
  20946. "MCPStatus": {
  20947. "anyOf": [
  20948. {
  20949. "$ref": "#/components/schemas/MCPStatusConnected"
  20950. },
  20951. {
  20952. "$ref": "#/components/schemas/MCPStatusDisabled"
  20953. },
  20954. {
  20955. "$ref": "#/components/schemas/MCPStatusFailed"
  20956. },
  20957. {
  20958. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  20959. },
  20960. {
  20961. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  20962. }
  20963. ]
  20964. },
  20965. "McpUnsupportedOAuthError": {
  20966. "type": "object",
  20967. "properties": {
  20968. "error": {
  20969. "type": "string"
  20970. }
  20971. },
  20972. "required": ["error"],
  20973. "additionalProperties": false
  20974. },
  20975. "McpServerNotFoundError": {
  20976. "type": "object",
  20977. "properties": {
  20978. "_tag": {
  20979. "type": "string",
  20980. "enum": ["McpServerNotFoundError"]
  20981. },
  20982. "name": {
  20983. "type": "string"
  20984. },
  20985. "message": {
  20986. "type": "string"
  20987. }
  20988. },
  20989. "required": ["_tag", "name", "message"],
  20990. "additionalProperties": false
  20991. },
  20992. "Project": {
  20993. "type": "object",
  20994. "properties": {
  20995. "id": {
  20996. "type": "string"
  20997. },
  20998. "worktree": {
  20999. "type": "string"
  21000. },
  21001. "vcs": {
  21002. "type": "string",
  21003. "enum": ["git"]
  21004. },
  21005. "name": {
  21006. "type": "string"
  21007. },
  21008. "icon": {
  21009. "type": "object",
  21010. "properties": {
  21011. "url": {
  21012. "type": "string"
  21013. },
  21014. "override": {
  21015. "type": "string"
  21016. },
  21017. "color": {
  21018. "type": "string"
  21019. }
  21020. },
  21021. "additionalProperties": false
  21022. },
  21023. "commands": {
  21024. "type": "object",
  21025. "properties": {
  21026. "start": {
  21027. "type": "string",
  21028. "description": "Startup script to run when creating a new workspace (worktree)"
  21029. }
  21030. },
  21031. "additionalProperties": false
  21032. },
  21033. "time": {
  21034. "type": "object",
  21035. "properties": {
  21036. "created": {
  21037. "type": "integer",
  21038. "minimum": 0
  21039. },
  21040. "updated": {
  21041. "type": "integer",
  21042. "minimum": 0
  21043. },
  21044. "initialized": {
  21045. "type": "integer",
  21046. "minimum": 0
  21047. }
  21048. },
  21049. "required": ["created", "updated"],
  21050. "additionalProperties": false
  21051. },
  21052. "sandboxes": {
  21053. "type": "array",
  21054. "items": {
  21055. "type": "string"
  21056. }
  21057. }
  21058. },
  21059. "required": ["id", "worktree", "time", "sandboxes"],
  21060. "additionalProperties": false
  21061. },
  21062. "ProjectNotFoundError": {
  21063. "type": "object",
  21064. "properties": {
  21065. "_tag": {
  21066. "type": "string",
  21067. "enum": ["ProjectNotFoundError"]
  21068. },
  21069. "projectID": {
  21070. "type": "string"
  21071. },
  21072. "message": {
  21073. "type": "string"
  21074. }
  21075. },
  21076. "required": ["_tag", "projectID", "message"],
  21077. "additionalProperties": false
  21078. },
  21079. "ProjectCopyError": {
  21080. "type": "object",
  21081. "properties": {
  21082. "name": {
  21083. "type": "string",
  21084. "enum": ["ProjectCopyError"]
  21085. },
  21086. "data": {
  21087. "type": "object",
  21088. "properties": {
  21089. "message": {
  21090. "type": "string"
  21091. },
  21092. "forceRequired": {
  21093. "type": "boolean"
  21094. }
  21095. },
  21096. "required": ["message"],
  21097. "additionalProperties": false
  21098. }
  21099. },
  21100. "required": ["name", "data"],
  21101. "additionalProperties": false
  21102. },
  21103. "PtyNotFoundError": {
  21104. "type": "object",
  21105. "properties": {
  21106. "_tag": {
  21107. "type": "string",
  21108. "enum": ["PtyNotFoundError"]
  21109. },
  21110. "ptyID": {
  21111. "type": "string"
  21112. },
  21113. "message": {
  21114. "type": "string"
  21115. }
  21116. },
  21117. "required": ["_tag", "ptyID", "message"],
  21118. "additionalProperties": false
  21119. },
  21120. "PtyForbiddenError": {
  21121. "type": "object",
  21122. "properties": {
  21123. "_tag": {
  21124. "type": "string",
  21125. "enum": ["PtyForbiddenError"]
  21126. },
  21127. "message": {
  21128. "type": "string"
  21129. }
  21130. },
  21131. "required": ["_tag", "message"],
  21132. "additionalProperties": false
  21133. },
  21134. "QuestionRequest": {
  21135. "type": "object",
  21136. "properties": {
  21137. "id": {
  21138. "type": "string",
  21139. "pattern": "^que"
  21140. },
  21141. "sessionID": {
  21142. "type": "string",
  21143. "pattern": "^ses"
  21144. },
  21145. "questions": {
  21146. "type": "array",
  21147. "items": {
  21148. "$ref": "#/components/schemas/QuestionInfo"
  21149. },
  21150. "description": "Questions to ask"
  21151. },
  21152. "tool": {
  21153. "$ref": "#/components/schemas/QuestionTool"
  21154. }
  21155. },
  21156. "required": ["id", "sessionID", "questions"],
  21157. "additionalProperties": false
  21158. },
  21159. "QuestionNotFoundError": {
  21160. "type": "object",
  21161. "properties": {
  21162. "_tag": {
  21163. "type": "string",
  21164. "enum": ["QuestionNotFoundError"]
  21165. },
  21166. "requestID": {
  21167. "type": "string"
  21168. },
  21169. "message": {
  21170. "type": "string"
  21171. }
  21172. },
  21173. "required": ["_tag", "requestID", "message"],
  21174. "additionalProperties": false
  21175. },
  21176. "PermissionRequest": {
  21177. "type": "object",
  21178. "properties": {
  21179. "id": {
  21180. "type": "string",
  21181. "pattern": "^per"
  21182. },
  21183. "sessionID": {
  21184. "type": "string",
  21185. "pattern": "^ses"
  21186. },
  21187. "permission": {
  21188. "type": "string"
  21189. },
  21190. "patterns": {
  21191. "type": "array",
  21192. "items": {
  21193. "type": "string"
  21194. }
  21195. },
  21196. "metadata": {
  21197. "type": "object"
  21198. },
  21199. "always": {
  21200. "type": "array",
  21201. "items": {
  21202. "type": "string"
  21203. }
  21204. },
  21205. "tool": {
  21206. "type": "object",
  21207. "properties": {
  21208. "messageID": {
  21209. "type": "string"
  21210. },
  21211. "callID": {
  21212. "type": "string"
  21213. }
  21214. },
  21215. "required": ["messageID", "callID"],
  21216. "additionalProperties": false
  21217. }
  21218. },
  21219. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  21220. "additionalProperties": false
  21221. },
  21222. "PermissionNotFoundError": {
  21223. "type": "object",
  21224. "properties": {
  21225. "_tag": {
  21226. "type": "string",
  21227. "enum": ["PermissionNotFoundError"]
  21228. },
  21229. "requestID": {
  21230. "type": "string"
  21231. },
  21232. "message": {
  21233. "type": "string"
  21234. }
  21235. },
  21236. "required": ["_tag", "requestID", "message"],
  21237. "additionalProperties": false
  21238. },
  21239. "ProviderAuthMethod": {
  21240. "type": "object",
  21241. "properties": {
  21242. "type": {
  21243. "type": "string",
  21244. "enum": ["oauth", "api"]
  21245. },
  21246. "label": {
  21247. "type": "string"
  21248. },
  21249. "prompts": {
  21250. "type": "array",
  21251. "items": {
  21252. "anyOf": [
  21253. {
  21254. "type": "object",
  21255. "properties": {
  21256. "type": {
  21257. "type": "string",
  21258. "enum": ["text"]
  21259. },
  21260. "key": {
  21261. "type": "string"
  21262. },
  21263. "message": {
  21264. "type": "string"
  21265. },
  21266. "placeholder": {
  21267. "type": "string"
  21268. },
  21269. "when": {
  21270. "type": "object",
  21271. "properties": {
  21272. "key": {
  21273. "type": "string"
  21274. },
  21275. "op": {
  21276. "type": "string",
  21277. "enum": ["eq", "neq"]
  21278. },
  21279. "value": {
  21280. "type": "string"
  21281. }
  21282. },
  21283. "required": ["key", "op", "value"],
  21284. "additionalProperties": false
  21285. }
  21286. },
  21287. "required": ["type", "key", "message"],
  21288. "additionalProperties": false
  21289. },
  21290. {
  21291. "type": "object",
  21292. "properties": {
  21293. "type": {
  21294. "type": "string",
  21295. "enum": ["select"]
  21296. },
  21297. "key": {
  21298. "type": "string"
  21299. },
  21300. "message": {
  21301. "type": "string"
  21302. },
  21303. "options": {
  21304. "type": "array",
  21305. "items": {
  21306. "type": "object",
  21307. "properties": {
  21308. "label": {
  21309. "type": "string"
  21310. },
  21311. "value": {
  21312. "type": "string"
  21313. },
  21314. "hint": {
  21315. "type": "string"
  21316. }
  21317. },
  21318. "required": ["label", "value"],
  21319. "additionalProperties": false
  21320. }
  21321. },
  21322. "when": {
  21323. "type": "object",
  21324. "properties": {
  21325. "key": {
  21326. "type": "string"
  21327. },
  21328. "op": {
  21329. "type": "string",
  21330. "enum": ["eq", "neq"]
  21331. },
  21332. "value": {
  21333. "type": "string"
  21334. }
  21335. },
  21336. "required": ["key", "op", "value"],
  21337. "additionalProperties": false
  21338. }
  21339. },
  21340. "required": ["type", "key", "message", "options"],
  21341. "additionalProperties": false
  21342. }
  21343. ]
  21344. }
  21345. }
  21346. },
  21347. "required": ["type", "label"],
  21348. "additionalProperties": false
  21349. },
  21350. "ProviderAuthAuthorization": {
  21351. "type": "object",
  21352. "properties": {
  21353. "url": {
  21354. "type": "string"
  21355. },
  21356. "method": {
  21357. "type": "string",
  21358. "enum": ["auto", "code"]
  21359. },
  21360. "instructions": {
  21361. "type": "string"
  21362. }
  21363. },
  21364. "required": ["url", "method", "instructions"],
  21365. "additionalProperties": false
  21366. },
  21367. "ProviderAuthError1": {
  21368. "type": "object",
  21369. "properties": {
  21370. "name": {
  21371. "type": "string",
  21372. "enum": [
  21373. "BadRequest",
  21374. "ProviderAuthOauthMissing",
  21375. "ProviderAuthOauthCodeMissing",
  21376. "ProviderAuthOauthCallbackFailed",
  21377. "ProviderAuthValidationFailed"
  21378. ]
  21379. },
  21380. "data": {
  21381. "type": "object",
  21382. "properties": {
  21383. "providerID": {
  21384. "type": "string"
  21385. },
  21386. "field": {
  21387. "type": "string"
  21388. },
  21389. "message": {
  21390. "type": "string"
  21391. },
  21392. "kind": {
  21393. "type": "string"
  21394. }
  21395. },
  21396. "additionalProperties": false
  21397. }
  21398. },
  21399. "required": ["name", "data"],
  21400. "additionalProperties": false
  21401. },
  21402. "NotFoundError": {
  21403. "type": "object",
  21404. "required": ["name", "data"],
  21405. "properties": {
  21406. "name": {
  21407. "type": "string",
  21408. "enum": ["NotFoundError"]
  21409. },
  21410. "data": {
  21411. "type": "object",
  21412. "required": ["message"],
  21413. "properties": {
  21414. "message": {
  21415. "type": "string"
  21416. }
  21417. }
  21418. }
  21419. }
  21420. },
  21421. "TextPartInput": {
  21422. "type": "object",
  21423. "properties": {
  21424. "id": {
  21425. "type": "string",
  21426. "pattern": "^prt"
  21427. },
  21428. "type": {
  21429. "type": "string",
  21430. "enum": ["text"]
  21431. },
  21432. "text": {
  21433. "type": "string"
  21434. },
  21435. "synthetic": {
  21436. "type": "boolean"
  21437. },
  21438. "ignored": {
  21439. "type": "boolean"
  21440. },
  21441. "time": {
  21442. "type": "object",
  21443. "properties": {
  21444. "start": {
  21445. "type": "integer",
  21446. "minimum": 0
  21447. },
  21448. "end": {
  21449. "type": "integer",
  21450. "minimum": 0
  21451. }
  21452. },
  21453. "required": ["start"],
  21454. "additionalProperties": false
  21455. },
  21456. "metadata": {
  21457. "type": "object"
  21458. }
  21459. },
  21460. "required": ["type", "text"],
  21461. "additionalProperties": false
  21462. },
  21463. "FilePartInput": {
  21464. "type": "object",
  21465. "properties": {
  21466. "id": {
  21467. "type": "string",
  21468. "pattern": "^prt"
  21469. },
  21470. "type": {
  21471. "type": "string",
  21472. "enum": ["file"]
  21473. },
  21474. "mime": {
  21475. "type": "string"
  21476. },
  21477. "filename": {
  21478. "type": "string"
  21479. },
  21480. "url": {
  21481. "type": "string"
  21482. },
  21483. "source": {
  21484. "$ref": "#/components/schemas/FilePartSource"
  21485. }
  21486. },
  21487. "required": ["type", "mime", "url"],
  21488. "additionalProperties": false
  21489. },
  21490. "AgentPartInput": {
  21491. "type": "object",
  21492. "properties": {
  21493. "id": {
  21494. "type": "string",
  21495. "pattern": "^prt"
  21496. },
  21497. "type": {
  21498. "type": "string",
  21499. "enum": ["agent"]
  21500. },
  21501. "name": {
  21502. "type": "string"
  21503. },
  21504. "source": {
  21505. "type": "object",
  21506. "properties": {
  21507. "value": {
  21508. "type": "string"
  21509. },
  21510. "start": {
  21511. "type": "integer",
  21512. "minimum": 0
  21513. },
  21514. "end": {
  21515. "type": "integer",
  21516. "minimum": 0
  21517. }
  21518. },
  21519. "required": ["value", "start", "end"],
  21520. "additionalProperties": false
  21521. }
  21522. },
  21523. "required": ["type", "name"],
  21524. "additionalProperties": false
  21525. },
  21526. "SubtaskPartInput": {
  21527. "type": "object",
  21528. "properties": {
  21529. "id": {
  21530. "type": "string",
  21531. "pattern": "^prt"
  21532. },
  21533. "type": {
  21534. "type": "string",
  21535. "enum": ["subtask"]
  21536. },
  21537. "prompt": {
  21538. "type": "string"
  21539. },
  21540. "description": {
  21541. "type": "string"
  21542. },
  21543. "agent": {
  21544. "type": "string"
  21545. },
  21546. "model": {
  21547. "type": "object",
  21548. "properties": {
  21549. "providerID": {
  21550. "type": "string"
  21551. },
  21552. "modelID": {
  21553. "type": "string"
  21554. }
  21555. },
  21556. "required": ["providerID", "modelID"],
  21557. "additionalProperties": false
  21558. },
  21559. "command": {
  21560. "type": "string"
  21561. }
  21562. },
  21563. "required": ["type", "prompt", "description", "agent"],
  21564. "additionalProperties": false
  21565. },
  21566. "SessionBusyError": {
  21567. "type": "object",
  21568. "properties": {
  21569. "_tag": {
  21570. "type": "string",
  21571. "enum": ["SessionBusyError"]
  21572. },
  21573. "sessionID": {
  21574. "type": "string"
  21575. },
  21576. "message": {
  21577. "type": "string"
  21578. }
  21579. },
  21580. "required": ["_tag", "sessionID", "message"],
  21581. "additionalProperties": false
  21582. },
  21583. "EventTuiPromptAppend": {
  21584. "type": "object",
  21585. "properties": {
  21586. "type": {
  21587. "type": "string",
  21588. "enum": ["tui.prompt.append"]
  21589. },
  21590. "properties": {
  21591. "type": "object",
  21592. "properties": {
  21593. "text": {
  21594. "type": "string"
  21595. }
  21596. },
  21597. "required": ["text"],
  21598. "additionalProperties": false
  21599. }
  21600. },
  21601. "required": ["type", "properties"],
  21602. "additionalProperties": false
  21603. },
  21604. "EventTuiCommandExecute": {
  21605. "type": "object",
  21606. "properties": {
  21607. "type": {
  21608. "type": "string",
  21609. "enum": ["tui.command.execute"]
  21610. },
  21611. "properties": {
  21612. "type": "object",
  21613. "properties": {
  21614. "command": {
  21615. "anyOf": [
  21616. {
  21617. "type": "string",
  21618. "enum": [
  21619. "session.list",
  21620. "session.new",
  21621. "session.share",
  21622. "session.interrupt",
  21623. "session.compact",
  21624. "session.page.up",
  21625. "session.page.down",
  21626. "session.line.up",
  21627. "session.line.down",
  21628. "session.half.page.up",
  21629. "session.half.page.down",
  21630. "session.first",
  21631. "session.last",
  21632. "prompt.clear",
  21633. "prompt.submit",
  21634. "agent.cycle"
  21635. ]
  21636. },
  21637. {
  21638. "type": "string"
  21639. }
  21640. ]
  21641. }
  21642. },
  21643. "required": ["command"],
  21644. "additionalProperties": false
  21645. }
  21646. },
  21647. "required": ["type", "properties"],
  21648. "additionalProperties": false
  21649. },
  21650. "EventTuiToastShow": {
  21651. "type": "object",
  21652. "properties": {
  21653. "type": {
  21654. "type": "string",
  21655. "enum": ["tui.toast.show"]
  21656. },
  21657. "properties": {
  21658. "type": "object",
  21659. "properties": {
  21660. "title": {
  21661. "type": "string"
  21662. },
  21663. "message": {
  21664. "type": "string"
  21665. },
  21666. "variant": {
  21667. "type": "string",
  21668. "enum": ["info", "success", "warning", "error"]
  21669. },
  21670. "duration": {
  21671. "type": "integer",
  21672. "exclusiveMinimum": 0
  21673. }
  21674. },
  21675. "required": ["message", "variant"],
  21676. "additionalProperties": false
  21677. }
  21678. },
  21679. "required": ["type", "properties"],
  21680. "additionalProperties": false
  21681. },
  21682. "EventTuiSessionSelect": {
  21683. "type": "object",
  21684. "properties": {
  21685. "type": {
  21686. "type": "string",
  21687. "enum": ["tui.session.select"]
  21688. },
  21689. "properties": {
  21690. "type": "object",
  21691. "properties": {
  21692. "sessionID": {
  21693. "type": "string",
  21694. "pattern": "^ses",
  21695. "description": "Session ID to navigate to"
  21696. }
  21697. },
  21698. "required": ["sessionID"],
  21699. "additionalProperties": false
  21700. }
  21701. },
  21702. "required": ["type", "properties"],
  21703. "additionalProperties": false
  21704. },
  21705. "Workspace": {
  21706. "type": "object",
  21707. "properties": {
  21708. "id": {
  21709. "type": "string",
  21710. "pattern": "^wrk"
  21711. },
  21712. "type": {
  21713. "type": "string"
  21714. },
  21715. "name": {
  21716. "type": "string"
  21717. },
  21718. "branch": {
  21719. "anyOf": [
  21720. {
  21721. "type": "string"
  21722. },
  21723. {
  21724. "type": "null"
  21725. }
  21726. ]
  21727. },
  21728. "directory": {
  21729. "anyOf": [
  21730. {
  21731. "type": "string"
  21732. },
  21733. {
  21734. "type": "null"
  21735. }
  21736. ]
  21737. },
  21738. "extra": {
  21739. "anyOf": [
  21740. {},
  21741. {
  21742. "type": "null"
  21743. }
  21744. ]
  21745. },
  21746. "projectID": {
  21747. "type": "string"
  21748. },
  21749. "timeUsed": {
  21750. "anyOf": [
  21751. {
  21752. "type": "number"
  21753. },
  21754. {
  21755. "type": "string",
  21756. "enum": ["NaN"]
  21757. },
  21758. {
  21759. "type": "string",
  21760. "enum": ["Infinity"]
  21761. },
  21762. {
  21763. "type": "string",
  21764. "enum": ["-Infinity"]
  21765. },
  21766. {
  21767. "type": "string",
  21768. "enum": ["Infinity", "-Infinity", "NaN"]
  21769. }
  21770. ]
  21771. }
  21772. },
  21773. "required": ["id", "type", "name", "projectID", "timeUsed"],
  21774. "additionalProperties": false
  21775. },
  21776. "WorkspaceCreateError": {
  21777. "type": "object",
  21778. "properties": {
  21779. "name": {
  21780. "type": "string",
  21781. "enum": ["WorkspaceCreateError"]
  21782. },
  21783. "data": {
  21784. "type": "object",
  21785. "properties": {
  21786. "message": {
  21787. "type": "string"
  21788. }
  21789. },
  21790. "required": ["message"],
  21791. "additionalProperties": false
  21792. }
  21793. },
  21794. "required": ["name", "data"],
  21795. "additionalProperties": false
  21796. },
  21797. "WorkspaceWarpError": {
  21798. "type": "object",
  21799. "properties": {
  21800. "name": {
  21801. "type": "string",
  21802. "enum": ["WorkspaceWarpError"]
  21803. },
  21804. "data": {
  21805. "type": "object",
  21806. "properties": {
  21807. "message": {
  21808. "type": "string"
  21809. }
  21810. },
  21811. "required": ["message"],
  21812. "additionalProperties": false
  21813. }
  21814. },
  21815. "required": ["name", "data"],
  21816. "additionalProperties": false
  21817. },
  21818. "UnauthorizedError": {
  21819. "type": "object",
  21820. "properties": {
  21821. "_tag": {
  21822. "type": "string",
  21823. "enum": ["UnauthorizedError"]
  21824. },
  21825. "message": {
  21826. "type": "string"
  21827. }
  21828. },
  21829. "required": ["_tag", "message"],
  21830. "additionalProperties": false
  21831. },
  21832. "SessionsResponse": {
  21833. "type": "object",
  21834. "properties": {
  21835. "data": {
  21836. "type": "array",
  21837. "items": {
  21838. "$ref": "#/components/schemas/SessionV2Info"
  21839. }
  21840. },
  21841. "cursor": {
  21842. "type": "object",
  21843. "properties": {
  21844. "previous": {
  21845. "type": "string"
  21846. },
  21847. "next": {
  21848. "type": "string"
  21849. }
  21850. },
  21851. "additionalProperties": false
  21852. }
  21853. },
  21854. "required": ["data", "cursor"],
  21855. "additionalProperties": false
  21856. },
  21857. "InvalidCursorError": {
  21858. "type": "object",
  21859. "properties": {
  21860. "_tag": {
  21861. "type": "string",
  21862. "enum": ["InvalidCursorError"]
  21863. },
  21864. "message": {
  21865. "type": "string"
  21866. }
  21867. },
  21868. "required": ["_tag", "message"],
  21869. "additionalProperties": false
  21870. },
  21871. "SessionNotFoundError": {
  21872. "type": "object",
  21873. "properties": {
  21874. "_tag": {
  21875. "type": "string",
  21876. "enum": ["SessionNotFoundError"]
  21877. },
  21878. "sessionID": {
  21879. "type": "string"
  21880. },
  21881. "message": {
  21882. "type": "string"
  21883. }
  21884. },
  21885. "required": ["_tag", "sessionID", "message"],
  21886. "additionalProperties": false
  21887. },
  21888. "ConflictError": {
  21889. "type": "object",
  21890. "properties": {
  21891. "_tag": {
  21892. "type": "string",
  21893. "enum": ["ConflictError"]
  21894. },
  21895. "message": {
  21896. "type": "string"
  21897. },
  21898. "resource": {
  21899. "type": "string"
  21900. }
  21901. },
  21902. "required": ["_tag", "message"],
  21903. "additionalProperties": false
  21904. },
  21905. "ServiceUnavailableError": {
  21906. "type": "object",
  21907. "properties": {
  21908. "_tag": {
  21909. "type": "string",
  21910. "enum": ["ServiceUnavailableError"]
  21911. },
  21912. "message": {
  21913. "type": "string"
  21914. },
  21915. "service": {
  21916. "type": "string"
  21917. }
  21918. },
  21919. "required": ["_tag", "message"],
  21920. "additionalProperties": false
  21921. },
  21922. "UnknownError1": {
  21923. "type": "object",
  21924. "properties": {
  21925. "_tag": {
  21926. "type": "string",
  21927. "enum": ["UnknownError"]
  21928. },
  21929. "message": {
  21930. "type": "string"
  21931. },
  21932. "ref": {
  21933. "type": "string"
  21934. }
  21935. },
  21936. "required": ["_tag", "message"],
  21937. "additionalProperties": false
  21938. },
  21939. "SessionMessagesResponse": {
  21940. "type": "object",
  21941. "properties": {
  21942. "data": {
  21943. "type": "array",
  21944. "items": {
  21945. "$ref": "#/components/schemas/SessionMessage"
  21946. }
  21947. },
  21948. "cursor": {
  21949. "type": "object",
  21950. "properties": {
  21951. "previous": {
  21952. "type": "string"
  21953. },
  21954. "next": {
  21955. "type": "string"
  21956. }
  21957. },
  21958. "additionalProperties": false
  21959. }
  21960. },
  21961. "required": ["data", "cursor"],
  21962. "additionalProperties": false
  21963. },
  21964. "ProviderNotFoundError": {
  21965. "type": "object",
  21966. "properties": {
  21967. "_tag": {
  21968. "type": "string",
  21969. "enum": ["ProviderNotFoundError"]
  21970. },
  21971. "providerID": {
  21972. "type": "string"
  21973. },
  21974. "message": {
  21975. "type": "string"
  21976. }
  21977. },
  21978. "required": ["_tag", "providerID", "message"],
  21979. "additionalProperties": false
  21980. },
  21981. "effect_HttpApiError_Forbidden": {
  21982. "type": "object",
  21983. "properties": {
  21984. "_tag": {
  21985. "type": "string",
  21986. "enum": ["Forbidden"]
  21987. }
  21988. },
  21989. "required": ["_tag"],
  21990. "additionalProperties": false
  21991. },
  21992. "Event.tui.prompt.append": {
  21993. "type": "object",
  21994. "properties": {
  21995. "id": {
  21996. "type": "string",
  21997. "pattern": "^evt_"
  21998. },
  21999. "type": {
  22000. "type": "string",
  22001. "enum": ["tui.prompt.append"]
  22002. },
  22003. "properties": {
  22004. "type": "object",
  22005. "properties": {
  22006. "text": {
  22007. "type": "string"
  22008. }
  22009. },
  22010. "required": ["text"],
  22011. "additionalProperties": false
  22012. }
  22013. },
  22014. "required": ["id", "type", "properties"],
  22015. "additionalProperties": false
  22016. },
  22017. "Event.tui.command.execute": {
  22018. "type": "object",
  22019. "properties": {
  22020. "id": {
  22021. "type": "string",
  22022. "pattern": "^evt_"
  22023. },
  22024. "type": {
  22025. "type": "string",
  22026. "enum": ["tui.command.execute"]
  22027. },
  22028. "properties": {
  22029. "type": "object",
  22030. "properties": {
  22031. "command": {
  22032. "anyOf": [
  22033. {
  22034. "type": "string",
  22035. "enum": [
  22036. "session.list",
  22037. "session.new",
  22038. "session.share",
  22039. "session.interrupt",
  22040. "session.compact",
  22041. "session.page.up",
  22042. "session.page.down",
  22043. "session.line.up",
  22044. "session.line.down",
  22045. "session.half.page.up",
  22046. "session.half.page.down",
  22047. "session.first",
  22048. "session.last",
  22049. "prompt.clear",
  22050. "prompt.submit",
  22051. "agent.cycle"
  22052. ]
  22053. },
  22054. {
  22055. "type": "string"
  22056. }
  22057. ]
  22058. }
  22059. },
  22060. "required": ["command"],
  22061. "additionalProperties": false
  22062. }
  22063. },
  22064. "required": ["id", "type", "properties"],
  22065. "additionalProperties": false
  22066. },
  22067. "Event.tui.toast.show": {
  22068. "type": "object",
  22069. "properties": {
  22070. "id": {
  22071. "type": "string",
  22072. "pattern": "^evt_"
  22073. },
  22074. "type": {
  22075. "type": "string",
  22076. "enum": ["tui.toast.show"]
  22077. },
  22078. "properties": {
  22079. "type": "object",
  22080. "properties": {
  22081. "title": {
  22082. "type": "string"
  22083. },
  22084. "message": {
  22085. "type": "string"
  22086. },
  22087. "variant": {
  22088. "type": "string",
  22089. "enum": ["info", "success", "warning", "error"]
  22090. },
  22091. "duration": {
  22092. "type": "integer",
  22093. "exclusiveMinimum": 0
  22094. }
  22095. },
  22096. "required": ["message", "variant"],
  22097. "additionalProperties": false
  22098. }
  22099. },
  22100. "required": ["id", "type", "properties"],
  22101. "additionalProperties": false
  22102. },
  22103. "Event.tui.session.select": {
  22104. "type": "object",
  22105. "properties": {
  22106. "id": {
  22107. "type": "string",
  22108. "pattern": "^evt_"
  22109. },
  22110. "type": {
  22111. "type": "string",
  22112. "enum": ["tui.session.select"]
  22113. },
  22114. "properties": {
  22115. "type": "object",
  22116. "properties": {
  22117. "sessionID": {
  22118. "type": "string",
  22119. "pattern": "^ses",
  22120. "description": "Session ID to navigate to"
  22121. }
  22122. },
  22123. "required": ["sessionID"],
  22124. "additionalProperties": false
  22125. }
  22126. },
  22127. "required": ["id", "type", "properties"],
  22128. "additionalProperties": false
  22129. },
  22130. "MoveSessionDestination": {
  22131. "type": "object",
  22132. "properties": {
  22133. "directory": {
  22134. "type": "string"
  22135. }
  22136. },
  22137. "required": ["directory"],
  22138. "additionalProperties": false
  22139. },
  22140. "CredentialOAuth": {
  22141. "type": "object",
  22142. "properties": {
  22143. "type": {
  22144. "type": "string",
  22145. "enum": ["oauth"]
  22146. },
  22147. "refresh": {
  22148. "type": "string"
  22149. },
  22150. "access": {
  22151. "type": "string"
  22152. },
  22153. "expires": {
  22154. "type": "integer",
  22155. "minimum": 0
  22156. },
  22157. "metadata": {
  22158. "type": "object",
  22159. "additionalProperties": {
  22160. "type": "string"
  22161. }
  22162. }
  22163. },
  22164. "required": ["type", "refresh", "access", "expires"],
  22165. "additionalProperties": false
  22166. },
  22167. "CredentialKey": {
  22168. "type": "object",
  22169. "properties": {
  22170. "type": {
  22171. "type": "string",
  22172. "enum": ["key"]
  22173. },
  22174. "key": {
  22175. "type": "string"
  22176. },
  22177. "metadata": {
  22178. "type": "object",
  22179. "additionalProperties": {
  22180. "type": "string"
  22181. }
  22182. }
  22183. },
  22184. "required": ["type", "key"],
  22185. "additionalProperties": false
  22186. },
  22187. "CredentialValue": {
  22188. "anyOf": [
  22189. {
  22190. "$ref": "#/components/schemas/CredentialOAuth"
  22191. },
  22192. {
  22193. "$ref": "#/components/schemas/CredentialKey"
  22194. }
  22195. ]
  22196. },
  22197. "CredentialInfo": {
  22198. "type": "object",
  22199. "properties": {
  22200. "id": {
  22201. "type": "string"
  22202. },
  22203. "connectorID": {
  22204. "type": "string"
  22205. },
  22206. "methodID": {
  22207. "type": "string"
  22208. },
  22209. "label": {
  22210. "type": "string"
  22211. },
  22212. "value": {
  22213. "$ref": "#/components/schemas/CredentialValue"
  22214. }
  22215. },
  22216. "required": ["id", "connectorID", "methodID", "label", "value"],
  22217. "additionalProperties": false
  22218. },
  22219. "ModelV2Info": {
  22220. "type": "object",
  22221. "properties": {
  22222. "id": {
  22223. "type": "string"
  22224. },
  22225. "providerID": {
  22226. "type": "string"
  22227. },
  22228. "family": {
  22229. "type": "string"
  22230. },
  22231. "name": {
  22232. "type": "string"
  22233. },
  22234. "api": {
  22235. "anyOf": [
  22236. {
  22237. "type": "object",
  22238. "properties": {
  22239. "id": {
  22240. "type": "string"
  22241. },
  22242. "type": {
  22243. "type": "string",
  22244. "enum": ["aisdk"]
  22245. },
  22246. "package": {
  22247. "type": "string"
  22248. },
  22249. "url": {
  22250. "type": "string"
  22251. },
  22252. "settings": {
  22253. "type": "object"
  22254. }
  22255. },
  22256. "required": ["id", "type", "package"],
  22257. "additionalProperties": false
  22258. },
  22259. {
  22260. "type": "object",
  22261. "properties": {
  22262. "id": {
  22263. "type": "string"
  22264. },
  22265. "type": {
  22266. "type": "string",
  22267. "enum": ["native"]
  22268. },
  22269. "url": {
  22270. "type": "string"
  22271. },
  22272. "settings": {
  22273. "type": "object"
  22274. }
  22275. },
  22276. "required": ["id", "type", "settings"],
  22277. "additionalProperties": false
  22278. }
  22279. ]
  22280. },
  22281. "capabilities": {
  22282. "type": "object",
  22283. "properties": {
  22284. "tools": {
  22285. "type": "boolean"
  22286. },
  22287. "input": {
  22288. "type": "array",
  22289. "items": {
  22290. "type": "string"
  22291. }
  22292. },
  22293. "output": {
  22294. "type": "array",
  22295. "items": {
  22296. "type": "string"
  22297. }
  22298. }
  22299. },
  22300. "required": ["tools", "input", "output"],
  22301. "additionalProperties": false
  22302. },
  22303. "request": {
  22304. "type": "object",
  22305. "properties": {
  22306. "headers": {
  22307. "type": "object",
  22308. "additionalProperties": {
  22309. "type": "string"
  22310. }
  22311. },
  22312. "body": {
  22313. "type": "object"
  22314. },
  22315. "generation": {
  22316. "type": "object",
  22317. "properties": {
  22318. "maxTokens": {
  22319. "anyOf": [
  22320. {
  22321. "type": "number"
  22322. },
  22323. {
  22324. "type": "string",
  22325. "enum": ["NaN"]
  22326. },
  22327. {
  22328. "type": "string",
  22329. "enum": ["Infinity"]
  22330. },
  22331. {
  22332. "type": "string",
  22333. "enum": ["-Infinity"]
  22334. },
  22335. {
  22336. "type": "string",
  22337. "enum": ["Infinity", "-Infinity", "NaN"]
  22338. }
  22339. ]
  22340. },
  22341. "temperature": {
  22342. "anyOf": [
  22343. {
  22344. "type": "number"
  22345. },
  22346. {
  22347. "type": "string",
  22348. "enum": ["NaN"]
  22349. },
  22350. {
  22351. "type": "string",
  22352. "enum": ["Infinity"]
  22353. },
  22354. {
  22355. "type": "string",
  22356. "enum": ["-Infinity"]
  22357. },
  22358. {
  22359. "type": "string",
  22360. "enum": ["Infinity", "-Infinity", "NaN"]
  22361. }
  22362. ]
  22363. },
  22364. "topP": {
  22365. "anyOf": [
  22366. {
  22367. "type": "number"
  22368. },
  22369. {
  22370. "type": "string",
  22371. "enum": ["NaN"]
  22372. },
  22373. {
  22374. "type": "string",
  22375. "enum": ["Infinity"]
  22376. },
  22377. {
  22378. "type": "string",
  22379. "enum": ["-Infinity"]
  22380. },
  22381. {
  22382. "type": "string",
  22383. "enum": ["Infinity", "-Infinity", "NaN"]
  22384. }
  22385. ]
  22386. },
  22387. "topK": {
  22388. "anyOf": [
  22389. {
  22390. "type": "number"
  22391. },
  22392. {
  22393. "type": "string",
  22394. "enum": ["NaN"]
  22395. },
  22396. {
  22397. "type": "string",
  22398. "enum": ["Infinity"]
  22399. },
  22400. {
  22401. "type": "string",
  22402. "enum": ["-Infinity"]
  22403. },
  22404. {
  22405. "type": "string",
  22406. "enum": ["Infinity", "-Infinity", "NaN"]
  22407. }
  22408. ]
  22409. },
  22410. "frequencyPenalty": {
  22411. "anyOf": [
  22412. {
  22413. "type": "number"
  22414. },
  22415. {
  22416. "type": "string",
  22417. "enum": ["NaN"]
  22418. },
  22419. {
  22420. "type": "string",
  22421. "enum": ["Infinity"]
  22422. },
  22423. {
  22424. "type": "string",
  22425. "enum": ["-Infinity"]
  22426. },
  22427. {
  22428. "type": "string",
  22429. "enum": ["Infinity", "-Infinity", "NaN"]
  22430. }
  22431. ]
  22432. },
  22433. "presencePenalty": {
  22434. "anyOf": [
  22435. {
  22436. "type": "number"
  22437. },
  22438. {
  22439. "type": "string",
  22440. "enum": ["NaN"]
  22441. },
  22442. {
  22443. "type": "string",
  22444. "enum": ["Infinity"]
  22445. },
  22446. {
  22447. "type": "string",
  22448. "enum": ["-Infinity"]
  22449. },
  22450. {
  22451. "type": "string",
  22452. "enum": ["Infinity", "-Infinity", "NaN"]
  22453. }
  22454. ]
  22455. },
  22456. "seed": {
  22457. "anyOf": [
  22458. {
  22459. "type": "number"
  22460. },
  22461. {
  22462. "type": "string",
  22463. "enum": ["NaN"]
  22464. },
  22465. {
  22466. "type": "string",
  22467. "enum": ["Infinity"]
  22468. },
  22469. {
  22470. "type": "string",
  22471. "enum": ["-Infinity"]
  22472. },
  22473. {
  22474. "type": "string",
  22475. "enum": ["Infinity", "-Infinity", "NaN"]
  22476. }
  22477. ]
  22478. },
  22479. "stop": {
  22480. "type": "array",
  22481. "items": {
  22482. "type": "string"
  22483. }
  22484. }
  22485. },
  22486. "additionalProperties": false
  22487. },
  22488. "options": {
  22489. "type": "object"
  22490. },
  22491. "variant": {
  22492. "type": "string"
  22493. }
  22494. },
  22495. "required": ["headers", "body"],
  22496. "additionalProperties": false
  22497. },
  22498. "variants": {
  22499. "type": "array",
  22500. "items": {
  22501. "type": "object",
  22502. "properties": {
  22503. "id": {
  22504. "type": "string"
  22505. },
  22506. "headers": {
  22507. "type": "object",
  22508. "additionalProperties": {
  22509. "type": "string"
  22510. }
  22511. },
  22512. "body": {
  22513. "type": "object"
  22514. },
  22515. "generation": {
  22516. "type": "object",
  22517. "properties": {
  22518. "maxTokens": {
  22519. "anyOf": [
  22520. {
  22521. "type": "number"
  22522. },
  22523. {
  22524. "type": "string",
  22525. "enum": ["NaN"]
  22526. },
  22527. {
  22528. "type": "string",
  22529. "enum": ["Infinity"]
  22530. },
  22531. {
  22532. "type": "string",
  22533. "enum": ["-Infinity"]
  22534. },
  22535. {
  22536. "type": "string",
  22537. "enum": ["Infinity", "-Infinity", "NaN"]
  22538. }
  22539. ]
  22540. },
  22541. "temperature": {
  22542. "anyOf": [
  22543. {
  22544. "type": "number"
  22545. },
  22546. {
  22547. "type": "string",
  22548. "enum": ["NaN"]
  22549. },
  22550. {
  22551. "type": "string",
  22552. "enum": ["Infinity"]
  22553. },
  22554. {
  22555. "type": "string",
  22556. "enum": ["-Infinity"]
  22557. },
  22558. {
  22559. "type": "string",
  22560. "enum": ["Infinity", "-Infinity", "NaN"]
  22561. }
  22562. ]
  22563. },
  22564. "topP": {
  22565. "anyOf": [
  22566. {
  22567. "type": "number"
  22568. },
  22569. {
  22570. "type": "string",
  22571. "enum": ["NaN"]
  22572. },
  22573. {
  22574. "type": "string",
  22575. "enum": ["Infinity"]
  22576. },
  22577. {
  22578. "type": "string",
  22579. "enum": ["-Infinity"]
  22580. },
  22581. {
  22582. "type": "string",
  22583. "enum": ["Infinity", "-Infinity", "NaN"]
  22584. }
  22585. ]
  22586. },
  22587. "topK": {
  22588. "anyOf": [
  22589. {
  22590. "type": "number"
  22591. },
  22592. {
  22593. "type": "string",
  22594. "enum": ["NaN"]
  22595. },
  22596. {
  22597. "type": "string",
  22598. "enum": ["Infinity"]
  22599. },
  22600. {
  22601. "type": "string",
  22602. "enum": ["-Infinity"]
  22603. },
  22604. {
  22605. "type": "string",
  22606. "enum": ["Infinity", "-Infinity", "NaN"]
  22607. }
  22608. ]
  22609. },
  22610. "frequencyPenalty": {
  22611. "anyOf": [
  22612. {
  22613. "type": "number"
  22614. },
  22615. {
  22616. "type": "string",
  22617. "enum": ["NaN"]
  22618. },
  22619. {
  22620. "type": "string",
  22621. "enum": ["Infinity"]
  22622. },
  22623. {
  22624. "type": "string",
  22625. "enum": ["-Infinity"]
  22626. },
  22627. {
  22628. "type": "string",
  22629. "enum": ["Infinity", "-Infinity", "NaN"]
  22630. }
  22631. ]
  22632. },
  22633. "presencePenalty": {
  22634. "anyOf": [
  22635. {
  22636. "type": "number"
  22637. },
  22638. {
  22639. "type": "string",
  22640. "enum": ["NaN"]
  22641. },
  22642. {
  22643. "type": "string",
  22644. "enum": ["Infinity"]
  22645. },
  22646. {
  22647. "type": "string",
  22648. "enum": ["-Infinity"]
  22649. },
  22650. {
  22651. "type": "string",
  22652. "enum": ["Infinity", "-Infinity", "NaN"]
  22653. }
  22654. ]
  22655. },
  22656. "seed": {
  22657. "anyOf": [
  22658. {
  22659. "type": "number"
  22660. },
  22661. {
  22662. "type": "string",
  22663. "enum": ["NaN"]
  22664. },
  22665. {
  22666. "type": "string",
  22667. "enum": ["Infinity"]
  22668. },
  22669. {
  22670. "type": "string",
  22671. "enum": ["-Infinity"]
  22672. },
  22673. {
  22674. "type": "string",
  22675. "enum": ["Infinity", "-Infinity", "NaN"]
  22676. }
  22677. ]
  22678. },
  22679. "stop": {
  22680. "type": "array",
  22681. "items": {
  22682. "type": "string"
  22683. }
  22684. }
  22685. },
  22686. "additionalProperties": false
  22687. },
  22688. "options": {
  22689. "type": "object"
  22690. }
  22691. },
  22692. "required": ["id", "headers", "body"],
  22693. "additionalProperties": false
  22694. }
  22695. },
  22696. "time": {
  22697. "type": "object",
  22698. "properties": {
  22699. "released": {
  22700. "anyOf": [
  22701. {
  22702. "type": "number"
  22703. },
  22704. {
  22705. "type": "string",
  22706. "enum": ["NaN"]
  22707. },
  22708. {
  22709. "type": "string",
  22710. "enum": ["Infinity"]
  22711. },
  22712. {
  22713. "type": "string",
  22714. "enum": ["-Infinity"]
  22715. },
  22716. {
  22717. "type": "string",
  22718. "enum": ["Infinity", "-Infinity", "NaN"]
  22719. }
  22720. ]
  22721. }
  22722. },
  22723. "required": ["released"],
  22724. "additionalProperties": false
  22725. },
  22726. "cost": {
  22727. "type": "array",
  22728. "items": {
  22729. "type": "object",
  22730. "properties": {
  22731. "tier": {
  22732. "type": "object",
  22733. "properties": {
  22734. "type": {
  22735. "type": "string",
  22736. "enum": ["context"]
  22737. },
  22738. "size": {
  22739. "type": "integer"
  22740. }
  22741. },
  22742. "required": ["type", "size"],
  22743. "additionalProperties": false
  22744. },
  22745. "input": {
  22746. "type": "number"
  22747. },
  22748. "output": {
  22749. "type": "number"
  22750. },
  22751. "cache": {
  22752. "type": "object",
  22753. "properties": {
  22754. "read": {
  22755. "type": "number"
  22756. },
  22757. "write": {
  22758. "type": "number"
  22759. }
  22760. },
  22761. "required": ["read", "write"],
  22762. "additionalProperties": false
  22763. }
  22764. },
  22765. "required": ["input", "output", "cache"],
  22766. "additionalProperties": false
  22767. }
  22768. },
  22769. "status": {
  22770. "type": "string",
  22771. "enum": ["alpha", "beta", "deprecated", "active"]
  22772. },
  22773. "enabled": {
  22774. "type": "boolean"
  22775. },
  22776. "limit": {
  22777. "type": "object",
  22778. "properties": {
  22779. "context": {
  22780. "type": "integer"
  22781. },
  22782. "input": {
  22783. "type": "integer"
  22784. },
  22785. "output": {
  22786. "type": "integer"
  22787. }
  22788. },
  22789. "required": ["context", "output"],
  22790. "additionalProperties": false
  22791. }
  22792. },
  22793. "required": [
  22794. "id",
  22795. "providerID",
  22796. "name",
  22797. "api",
  22798. "capabilities",
  22799. "request",
  22800. "variants",
  22801. "time",
  22802. "cost",
  22803. "status",
  22804. "enabled",
  22805. "limit"
  22806. ],
  22807. "additionalProperties": false
  22808. },
  22809. "LocationRef": {
  22810. "type": "object",
  22811. "properties": {
  22812. "directory": {
  22813. "type": "string"
  22814. },
  22815. "workspaceID": {
  22816. "type": "string",
  22817. "pattern": "^wrk"
  22818. }
  22819. },
  22820. "required": ["directory"],
  22821. "additionalProperties": false
  22822. },
  22823. "PromptSource": {
  22824. "type": "object",
  22825. "properties": {
  22826. "start": {
  22827. "type": "number"
  22828. },
  22829. "end": {
  22830. "type": "number"
  22831. },
  22832. "text": {
  22833. "type": "string"
  22834. }
  22835. },
  22836. "required": ["start", "end", "text"],
  22837. "additionalProperties": false
  22838. },
  22839. "PromptFileAttachment": {
  22840. "type": "object",
  22841. "properties": {
  22842. "uri": {
  22843. "type": "string"
  22844. },
  22845. "mime": {
  22846. "type": "string"
  22847. },
  22848. "name": {
  22849. "type": "string"
  22850. },
  22851. "description": {
  22852. "type": "string"
  22853. },
  22854. "source": {
  22855. "$ref": "#/components/schemas/PromptSource"
  22856. }
  22857. },
  22858. "required": ["uri", "mime"],
  22859. "additionalProperties": false
  22860. },
  22861. "PromptAgentAttachment": {
  22862. "type": "object",
  22863. "properties": {
  22864. "name": {
  22865. "type": "string"
  22866. },
  22867. "source": {
  22868. "$ref": "#/components/schemas/PromptSource"
  22869. }
  22870. },
  22871. "required": ["name"],
  22872. "additionalProperties": false
  22873. },
  22874. "SessionErrorUnknown": {
  22875. "type": "object",
  22876. "properties": {
  22877. "type": {
  22878. "type": "string",
  22879. "enum": ["unknown"]
  22880. },
  22881. "message": {
  22882. "type": "string"
  22883. }
  22884. },
  22885. "required": ["type", "message"],
  22886. "additionalProperties": false
  22887. },
  22888. "ToolTextContent": {
  22889. "type": "object",
  22890. "properties": {
  22891. "type": {
  22892. "type": "string",
  22893. "enum": ["text"]
  22894. },
  22895. "text": {
  22896. "type": "string"
  22897. }
  22898. },
  22899. "required": ["type", "text"],
  22900. "additionalProperties": false
  22901. },
  22902. "ToolFileContent": {
  22903. "type": "object",
  22904. "properties": {
  22905. "type": {
  22906. "type": "string",
  22907. "enum": ["file"]
  22908. },
  22909. "uri": {
  22910. "type": "string"
  22911. },
  22912. "mime": {
  22913. "type": "string"
  22914. },
  22915. "name": {
  22916. "type": "string"
  22917. }
  22918. },
  22919. "required": ["type", "uri", "mime"],
  22920. "additionalProperties": false
  22921. },
  22922. "SessionNextRetry_error": {
  22923. "type": "object",
  22924. "properties": {
  22925. "message": {
  22926. "type": "string"
  22927. },
  22928. "statusCode": {
  22929. "type": "number"
  22930. },
  22931. "isRetryable": {
  22932. "type": "boolean"
  22933. },
  22934. "responseHeaders": {
  22935. "type": "object",
  22936. "additionalProperties": {
  22937. "type": "string"
  22938. }
  22939. },
  22940. "responseBody": {
  22941. "type": "string"
  22942. },
  22943. "metadata": {
  22944. "type": "object",
  22945. "additionalProperties": {
  22946. "type": "string"
  22947. }
  22948. }
  22949. },
  22950. "required": ["message", "isRetryable"],
  22951. "additionalProperties": false
  22952. },
  22953. "PermissionV2Source": {
  22954. "type": "object",
  22955. "properties": {
  22956. "type": {
  22957. "type": "string",
  22958. "enum": ["tool"]
  22959. },
  22960. "messageID": {
  22961. "type": "string"
  22962. },
  22963. "callID": {
  22964. "type": "string"
  22965. }
  22966. },
  22967. "required": ["type", "messageID", "callID"],
  22968. "additionalProperties": false
  22969. },
  22970. "PermissionV2Reply": {
  22971. "type": "string",
  22972. "enum": ["once", "always", "reject"]
  22973. },
  22974. "QuestionV2Option": {
  22975. "type": "object",
  22976. "properties": {
  22977. "label": {
  22978. "type": "string",
  22979. "description": "Display text (1-5 words, concise)"
  22980. },
  22981. "description": {
  22982. "type": "string",
  22983. "description": "Explanation of choice"
  22984. }
  22985. },
  22986. "required": ["label", "description"],
  22987. "additionalProperties": false
  22988. },
  22989. "QuestionV2Info": {
  22990. "type": "object",
  22991. "properties": {
  22992. "question": {
  22993. "type": "string",
  22994. "description": "Complete question"
  22995. },
  22996. "header": {
  22997. "type": "string",
  22998. "description": "Very short label (max 30 chars)"
  22999. },
  23000. "options": {
  23001. "type": "array",
  23002. "items": {
  23003. "$ref": "#/components/schemas/QuestionV2Option"
  23004. },
  23005. "description": "Available choices"
  23006. },
  23007. "multiple": {
  23008. "type": "boolean"
  23009. },
  23010. "custom": {
  23011. "type": "boolean"
  23012. }
  23013. },
  23014. "required": ["question", "header", "options"],
  23015. "additionalProperties": false
  23016. },
  23017. "QuestionV2Tool": {
  23018. "type": "object",
  23019. "properties": {
  23020. "messageID": {
  23021. "type": "string"
  23022. },
  23023. "callID": {
  23024. "type": "string"
  23025. }
  23026. },
  23027. "required": ["messageID", "callID"],
  23028. "additionalProperties": false
  23029. },
  23030. "QuestionV2Answer": {
  23031. "type": "array",
  23032. "items": {
  23033. "type": "string"
  23034. }
  23035. },
  23036. "EventServerInstanceDisposed": {
  23037. "type": "object",
  23038. "properties": {
  23039. "id": {
  23040. "type": "string"
  23041. },
  23042. "type": {
  23043. "type": "string",
  23044. "enum": ["server.instance.disposed"]
  23045. },
  23046. "properties": {
  23047. "type": "object",
  23048. "properties": {
  23049. "directory": {
  23050. "type": "string"
  23051. }
  23052. },
  23053. "required": ["directory"],
  23054. "additionalProperties": false
  23055. }
  23056. },
  23057. "required": ["id", "type", "properties"],
  23058. "additionalProperties": false
  23059. },
  23060. "SyncEventSessionCreated": {
  23061. "type": "object",
  23062. "properties": {
  23063. "type": {
  23064. "type": "string",
  23065. "enum": ["sync"]
  23066. },
  23067. "id": {
  23068. "type": "string",
  23069. "pattern": "^evt_"
  23070. },
  23071. "syncEvent": {
  23072. "type": "object",
  23073. "properties": {
  23074. "type": {
  23075. "type": "string",
  23076. "enum": ["session.created.1"]
  23077. },
  23078. "id": {
  23079. "type": "string",
  23080. "pattern": "^evt_"
  23081. },
  23082. "seq": {
  23083. "type": "number"
  23084. },
  23085. "aggregateID": {
  23086. "type": "string"
  23087. },
  23088. "data": {
  23089. "type": "object",
  23090. "properties": {
  23091. "sessionID": {
  23092. "type": "string",
  23093. "pattern": "^ses"
  23094. },
  23095. "info": {
  23096. "$ref": "#/components/schemas/Session"
  23097. }
  23098. },
  23099. "required": ["sessionID", "info"],
  23100. "additionalProperties": false
  23101. }
  23102. },
  23103. "required": ["type", "id", "seq", "aggregateID", "data"],
  23104. "additionalProperties": false
  23105. }
  23106. },
  23107. "required": ["type", "id", "syncEvent"],
  23108. "additionalProperties": false
  23109. },
  23110. "SyncEventSessionUpdated": {
  23111. "type": "object",
  23112. "properties": {
  23113. "type": {
  23114. "type": "string",
  23115. "enum": ["sync"]
  23116. },
  23117. "id": {
  23118. "type": "string",
  23119. "pattern": "^evt_"
  23120. },
  23121. "syncEvent": {
  23122. "type": "object",
  23123. "properties": {
  23124. "type": {
  23125. "type": "string",
  23126. "enum": ["session.updated.1"]
  23127. },
  23128. "id": {
  23129. "type": "string",
  23130. "pattern": "^evt_"
  23131. },
  23132. "seq": {
  23133. "type": "number"
  23134. },
  23135. "aggregateID": {
  23136. "type": "string"
  23137. },
  23138. "data": {
  23139. "type": "object",
  23140. "properties": {
  23141. "sessionID": {
  23142. "type": "string",
  23143. "pattern": "^ses"
  23144. },
  23145. "info": {
  23146. "$ref": "#/components/schemas/Session"
  23147. }
  23148. },
  23149. "required": ["sessionID", "info"],
  23150. "additionalProperties": false
  23151. }
  23152. },
  23153. "required": ["type", "id", "seq", "aggregateID", "data"],
  23154. "additionalProperties": false
  23155. }
  23156. },
  23157. "required": ["type", "id", "syncEvent"],
  23158. "additionalProperties": false
  23159. },
  23160. "SyncEventSessionDeleted": {
  23161. "type": "object",
  23162. "properties": {
  23163. "type": {
  23164. "type": "string",
  23165. "enum": ["sync"]
  23166. },
  23167. "id": {
  23168. "type": "string",
  23169. "pattern": "^evt_"
  23170. },
  23171. "syncEvent": {
  23172. "type": "object",
  23173. "properties": {
  23174. "type": {
  23175. "type": "string",
  23176. "enum": ["session.deleted.1"]
  23177. },
  23178. "id": {
  23179. "type": "string",
  23180. "pattern": "^evt_"
  23181. },
  23182. "seq": {
  23183. "type": "number"
  23184. },
  23185. "aggregateID": {
  23186. "type": "string"
  23187. },
  23188. "data": {
  23189. "type": "object",
  23190. "properties": {
  23191. "sessionID": {
  23192. "type": "string",
  23193. "pattern": "^ses"
  23194. },
  23195. "info": {
  23196. "$ref": "#/components/schemas/Session"
  23197. }
  23198. },
  23199. "required": ["sessionID", "info"],
  23200. "additionalProperties": false
  23201. }
  23202. },
  23203. "required": ["type", "id", "seq", "aggregateID", "data"],
  23204. "additionalProperties": false
  23205. }
  23206. },
  23207. "required": ["type", "id", "syncEvent"],
  23208. "additionalProperties": false
  23209. },
  23210. "SyncEventMessageUpdated": {
  23211. "type": "object",
  23212. "properties": {
  23213. "type": {
  23214. "type": "string",
  23215. "enum": ["sync"]
  23216. },
  23217. "id": {
  23218. "type": "string",
  23219. "pattern": "^evt_"
  23220. },
  23221. "syncEvent": {
  23222. "type": "object",
  23223. "properties": {
  23224. "type": {
  23225. "type": "string",
  23226. "enum": ["message.updated.1"]
  23227. },
  23228. "id": {
  23229. "type": "string",
  23230. "pattern": "^evt_"
  23231. },
  23232. "seq": {
  23233. "type": "number"
  23234. },
  23235. "aggregateID": {
  23236. "type": "string"
  23237. },
  23238. "data": {
  23239. "type": "object",
  23240. "properties": {
  23241. "sessionID": {
  23242. "type": "string",
  23243. "pattern": "^ses"
  23244. },
  23245. "info": {
  23246. "$ref": "#/components/schemas/Message"
  23247. }
  23248. },
  23249. "required": ["sessionID", "info"],
  23250. "additionalProperties": false
  23251. }
  23252. },
  23253. "required": ["type", "id", "seq", "aggregateID", "data"],
  23254. "additionalProperties": false
  23255. }
  23256. },
  23257. "required": ["type", "id", "syncEvent"],
  23258. "additionalProperties": false
  23259. },
  23260. "SyncEventMessageRemoved": {
  23261. "type": "object",
  23262. "properties": {
  23263. "type": {
  23264. "type": "string",
  23265. "enum": ["sync"]
  23266. },
  23267. "id": {
  23268. "type": "string",
  23269. "pattern": "^evt_"
  23270. },
  23271. "syncEvent": {
  23272. "type": "object",
  23273. "properties": {
  23274. "type": {
  23275. "type": "string",
  23276. "enum": ["message.removed.1"]
  23277. },
  23278. "id": {
  23279. "type": "string",
  23280. "pattern": "^evt_"
  23281. },
  23282. "seq": {
  23283. "type": "number"
  23284. },
  23285. "aggregateID": {
  23286. "type": "string"
  23287. },
  23288. "data": {
  23289. "type": "object",
  23290. "properties": {
  23291. "sessionID": {
  23292. "type": "string",
  23293. "pattern": "^ses"
  23294. },
  23295. "messageID": {
  23296. "type": "string",
  23297. "pattern": "^msg"
  23298. }
  23299. },
  23300. "required": ["sessionID", "messageID"],
  23301. "additionalProperties": false
  23302. }
  23303. },
  23304. "required": ["type", "id", "seq", "aggregateID", "data"],
  23305. "additionalProperties": false
  23306. }
  23307. },
  23308. "required": ["type", "id", "syncEvent"],
  23309. "additionalProperties": false
  23310. },
  23311. "SyncEventMessagePartUpdated": {
  23312. "type": "object",
  23313. "properties": {
  23314. "type": {
  23315. "type": "string",
  23316. "enum": ["sync"]
  23317. },
  23318. "id": {
  23319. "type": "string",
  23320. "pattern": "^evt_"
  23321. },
  23322. "syncEvent": {
  23323. "type": "object",
  23324. "properties": {
  23325. "type": {
  23326. "type": "string",
  23327. "enum": ["message.part.updated.1"]
  23328. },
  23329. "id": {
  23330. "type": "string",
  23331. "pattern": "^evt_"
  23332. },
  23333. "seq": {
  23334. "type": "number"
  23335. },
  23336. "aggregateID": {
  23337. "type": "string"
  23338. },
  23339. "data": {
  23340. "type": "object",
  23341. "properties": {
  23342. "sessionID": {
  23343. "type": "string",
  23344. "pattern": "^ses"
  23345. },
  23346. "part": {
  23347. "$ref": "#/components/schemas/Part"
  23348. },
  23349. "time": {
  23350. "type": "number"
  23351. }
  23352. },
  23353. "required": ["sessionID", "part", "time"],
  23354. "additionalProperties": false
  23355. }
  23356. },
  23357. "required": ["type", "id", "seq", "aggregateID", "data"],
  23358. "additionalProperties": false
  23359. }
  23360. },
  23361. "required": ["type", "id", "syncEvent"],
  23362. "additionalProperties": false
  23363. },
  23364. "SyncEventMessagePartRemoved": {
  23365. "type": "object",
  23366. "properties": {
  23367. "type": {
  23368. "type": "string",
  23369. "enum": ["sync"]
  23370. },
  23371. "id": {
  23372. "type": "string",
  23373. "pattern": "^evt_"
  23374. },
  23375. "syncEvent": {
  23376. "type": "object",
  23377. "properties": {
  23378. "type": {
  23379. "type": "string",
  23380. "enum": ["message.part.removed.1"]
  23381. },
  23382. "id": {
  23383. "type": "string",
  23384. "pattern": "^evt_"
  23385. },
  23386. "seq": {
  23387. "type": "number"
  23388. },
  23389. "aggregateID": {
  23390. "type": "string"
  23391. },
  23392. "data": {
  23393. "type": "object",
  23394. "properties": {
  23395. "sessionID": {
  23396. "type": "string",
  23397. "pattern": "^ses"
  23398. },
  23399. "messageID": {
  23400. "type": "string",
  23401. "pattern": "^msg"
  23402. },
  23403. "partID": {
  23404. "type": "string",
  23405. "pattern": "^prt"
  23406. }
  23407. },
  23408. "required": ["sessionID", "messageID", "partID"],
  23409. "additionalProperties": false
  23410. }
  23411. },
  23412. "required": ["type", "id", "seq", "aggregateID", "data"],
  23413. "additionalProperties": false
  23414. }
  23415. },
  23416. "required": ["type", "id", "syncEvent"],
  23417. "additionalProperties": false
  23418. },
  23419. "SyncEventSessionNextAgentSwitched": {
  23420. "type": "object",
  23421. "properties": {
  23422. "type": {
  23423. "type": "string",
  23424. "enum": ["sync"]
  23425. },
  23426. "id": {
  23427. "type": "string",
  23428. "pattern": "^evt_"
  23429. },
  23430. "syncEvent": {
  23431. "type": "object",
  23432. "properties": {
  23433. "type": {
  23434. "type": "string",
  23435. "enum": ["session.next.agent.switched.1"]
  23436. },
  23437. "id": {
  23438. "type": "string",
  23439. "pattern": "^evt_"
  23440. },
  23441. "seq": {
  23442. "type": "number"
  23443. },
  23444. "aggregateID": {
  23445. "type": "string"
  23446. },
  23447. "data": {
  23448. "type": "object",
  23449. "properties": {
  23450. "timestamp": {
  23451. "type": "number"
  23452. },
  23453. "sessionID": {
  23454. "type": "string",
  23455. "pattern": "^ses"
  23456. },
  23457. "messageID": {
  23458. "type": "string",
  23459. "pattern": "^msg_"
  23460. },
  23461. "agent": {
  23462. "type": "string"
  23463. }
  23464. },
  23465. "required": ["timestamp", "sessionID", "messageID", "agent"],
  23466. "additionalProperties": false
  23467. }
  23468. },
  23469. "required": ["type", "id", "seq", "aggregateID", "data"],
  23470. "additionalProperties": false
  23471. }
  23472. },
  23473. "required": ["type", "id", "syncEvent"],
  23474. "additionalProperties": false
  23475. },
  23476. "SyncEventSessionNextModelSwitched": {
  23477. "type": "object",
  23478. "properties": {
  23479. "type": {
  23480. "type": "string",
  23481. "enum": ["sync"]
  23482. },
  23483. "id": {
  23484. "type": "string",
  23485. "pattern": "^evt_"
  23486. },
  23487. "syncEvent": {
  23488. "type": "object",
  23489. "properties": {
  23490. "type": {
  23491. "type": "string",
  23492. "enum": ["session.next.model.switched.1"]
  23493. },
  23494. "id": {
  23495. "type": "string",
  23496. "pattern": "^evt_"
  23497. },
  23498. "seq": {
  23499. "type": "number"
  23500. },
  23501. "aggregateID": {
  23502. "type": "string"
  23503. },
  23504. "data": {
  23505. "type": "object",
  23506. "properties": {
  23507. "timestamp": {
  23508. "type": "number"
  23509. },
  23510. "sessionID": {
  23511. "type": "string",
  23512. "pattern": "^ses"
  23513. },
  23514. "messageID": {
  23515. "type": "string",
  23516. "pattern": "^msg_"
  23517. },
  23518. "model": {
  23519. "type": "object",
  23520. "properties": {
  23521. "id": {
  23522. "type": "string"
  23523. },
  23524. "providerID": {
  23525. "type": "string"
  23526. },
  23527. "variant": {
  23528. "type": "string"
  23529. }
  23530. },
  23531. "required": ["id", "providerID"],
  23532. "additionalProperties": false
  23533. }
  23534. },
  23535. "required": ["timestamp", "sessionID", "messageID", "model"],
  23536. "additionalProperties": false
  23537. }
  23538. },
  23539. "required": ["type", "id", "seq", "aggregateID", "data"],
  23540. "additionalProperties": false
  23541. }
  23542. },
  23543. "required": ["type", "id", "syncEvent"],
  23544. "additionalProperties": false
  23545. },
  23546. "SyncEventSessionNextMoved": {
  23547. "type": "object",
  23548. "properties": {
  23549. "type": {
  23550. "type": "string",
  23551. "enum": ["sync"]
  23552. },
  23553. "id": {
  23554. "type": "string",
  23555. "pattern": "^evt_"
  23556. },
  23557. "syncEvent": {
  23558. "type": "object",
  23559. "properties": {
  23560. "type": {
  23561. "type": "string",
  23562. "enum": ["session.next.moved.1"]
  23563. },
  23564. "id": {
  23565. "type": "string",
  23566. "pattern": "^evt_"
  23567. },
  23568. "seq": {
  23569. "type": "number"
  23570. },
  23571. "aggregateID": {
  23572. "type": "string"
  23573. },
  23574. "data": {
  23575. "type": "object",
  23576. "properties": {
  23577. "timestamp": {
  23578. "type": "number"
  23579. },
  23580. "sessionID": {
  23581. "type": "string",
  23582. "pattern": "^ses"
  23583. },
  23584. "location": {
  23585. "$ref": "#/components/schemas/LocationRef"
  23586. },
  23587. "subdirectory": {
  23588. "type": "string"
  23589. }
  23590. },
  23591. "required": ["timestamp", "sessionID", "location"],
  23592. "additionalProperties": false
  23593. }
  23594. },
  23595. "required": ["type", "id", "seq", "aggregateID", "data"],
  23596. "additionalProperties": false
  23597. }
  23598. },
  23599. "required": ["type", "id", "syncEvent"],
  23600. "additionalProperties": false
  23601. },
  23602. "SyncEventSessionNextPrompted": {
  23603. "type": "object",
  23604. "properties": {
  23605. "type": {
  23606. "type": "string",
  23607. "enum": ["sync"]
  23608. },
  23609. "id": {
  23610. "type": "string",
  23611. "pattern": "^evt_"
  23612. },
  23613. "syncEvent": {
  23614. "type": "object",
  23615. "properties": {
  23616. "type": {
  23617. "type": "string",
  23618. "enum": ["session.next.prompted.1"]
  23619. },
  23620. "id": {
  23621. "type": "string",
  23622. "pattern": "^evt_"
  23623. },
  23624. "seq": {
  23625. "type": "number"
  23626. },
  23627. "aggregateID": {
  23628. "type": "string"
  23629. },
  23630. "data": {
  23631. "type": "object",
  23632. "properties": {
  23633. "timestamp": {
  23634. "type": "number"
  23635. },
  23636. "sessionID": {
  23637. "type": "string",
  23638. "pattern": "^ses"
  23639. },
  23640. "messageID": {
  23641. "type": "string",
  23642. "pattern": "^msg_"
  23643. },
  23644. "prompt": {
  23645. "$ref": "#/components/schemas/Prompt"
  23646. },
  23647. "delivery": {
  23648. "type": "string",
  23649. "enum": ["steer", "queue"]
  23650. }
  23651. },
  23652. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23653. "additionalProperties": false
  23654. }
  23655. },
  23656. "required": ["type", "id", "seq", "aggregateID", "data"],
  23657. "additionalProperties": false
  23658. }
  23659. },
  23660. "required": ["type", "id", "syncEvent"],
  23661. "additionalProperties": false
  23662. },
  23663. "SyncEventSessionNextPromptAdmitted": {
  23664. "type": "object",
  23665. "properties": {
  23666. "type": {
  23667. "type": "string",
  23668. "enum": ["sync"]
  23669. },
  23670. "id": {
  23671. "type": "string",
  23672. "pattern": "^evt_"
  23673. },
  23674. "syncEvent": {
  23675. "type": "object",
  23676. "properties": {
  23677. "type": {
  23678. "type": "string",
  23679. "enum": ["session.next.prompt.admitted.1"]
  23680. },
  23681. "id": {
  23682. "type": "string",
  23683. "pattern": "^evt_"
  23684. },
  23685. "seq": {
  23686. "type": "number"
  23687. },
  23688. "aggregateID": {
  23689. "type": "string"
  23690. },
  23691. "data": {
  23692. "type": "object",
  23693. "properties": {
  23694. "timestamp": {
  23695. "type": "number"
  23696. },
  23697. "sessionID": {
  23698. "type": "string",
  23699. "pattern": "^ses"
  23700. },
  23701. "messageID": {
  23702. "type": "string",
  23703. "pattern": "^msg_"
  23704. },
  23705. "prompt": {
  23706. "$ref": "#/components/schemas/Prompt"
  23707. },
  23708. "delivery": {
  23709. "type": "string",
  23710. "enum": ["steer", "queue"]
  23711. }
  23712. },
  23713. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23714. "additionalProperties": false
  23715. }
  23716. },
  23717. "required": ["type", "id", "seq", "aggregateID", "data"],
  23718. "additionalProperties": false
  23719. }
  23720. },
  23721. "required": ["type", "id", "syncEvent"],
  23722. "additionalProperties": false
  23723. },
  23724. "SyncEventSessionNextPromptPromoted": {
  23725. "type": "object",
  23726. "properties": {
  23727. "type": {
  23728. "type": "string",
  23729. "enum": ["sync"]
  23730. },
  23731. "id": {
  23732. "type": "string",
  23733. "pattern": "^evt_"
  23734. },
  23735. "syncEvent": {
  23736. "type": "object",
  23737. "properties": {
  23738. "type": {
  23739. "type": "string",
  23740. "enum": ["session.next.prompt.promoted.1"]
  23741. },
  23742. "id": {
  23743. "type": "string",
  23744. "pattern": "^evt_"
  23745. },
  23746. "seq": {
  23747. "type": "number"
  23748. },
  23749. "aggregateID": {
  23750. "type": "string"
  23751. },
  23752. "data": {
  23753. "type": "object",
  23754. "properties": {
  23755. "timestamp": {
  23756. "type": "number"
  23757. },
  23758. "sessionID": {
  23759. "type": "string",
  23760. "pattern": "^ses"
  23761. },
  23762. "messageID": {
  23763. "type": "string",
  23764. "pattern": "^msg_"
  23765. },
  23766. "prompt": {
  23767. "$ref": "#/components/schemas/Prompt"
  23768. },
  23769. "timeCreated": {
  23770. "type": "number"
  23771. }
  23772. },
  23773. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  23774. "additionalProperties": false
  23775. }
  23776. },
  23777. "required": ["type", "id", "seq", "aggregateID", "data"],
  23778. "additionalProperties": false
  23779. }
  23780. },
  23781. "required": ["type", "id", "syncEvent"],
  23782. "additionalProperties": false
  23783. },
  23784. "SyncEventSessionNextInterruptRequested": {
  23785. "type": "object",
  23786. "properties": {
  23787. "type": {
  23788. "type": "string",
  23789. "enum": ["sync"]
  23790. },
  23791. "id": {
  23792. "type": "string",
  23793. "pattern": "^evt_"
  23794. },
  23795. "syncEvent": {
  23796. "type": "object",
  23797. "properties": {
  23798. "type": {
  23799. "type": "string",
  23800. "enum": ["session.next.interrupt.requested.1"]
  23801. },
  23802. "id": {
  23803. "type": "string",
  23804. "pattern": "^evt_"
  23805. },
  23806. "seq": {
  23807. "type": "number"
  23808. },
  23809. "aggregateID": {
  23810. "type": "string"
  23811. },
  23812. "data": {
  23813. "type": "object",
  23814. "properties": {
  23815. "timestamp": {
  23816. "type": "number"
  23817. },
  23818. "sessionID": {
  23819. "type": "string",
  23820. "pattern": "^ses"
  23821. }
  23822. },
  23823. "required": ["timestamp", "sessionID"],
  23824. "additionalProperties": false
  23825. }
  23826. },
  23827. "required": ["type", "id", "seq", "aggregateID", "data"],
  23828. "additionalProperties": false
  23829. }
  23830. },
  23831. "required": ["type", "id", "syncEvent"],
  23832. "additionalProperties": false
  23833. },
  23834. "SyncEventSessionNextContextUpdated": {
  23835. "type": "object",
  23836. "properties": {
  23837. "type": {
  23838. "type": "string",
  23839. "enum": ["sync"]
  23840. },
  23841. "id": {
  23842. "type": "string",
  23843. "pattern": "^evt_"
  23844. },
  23845. "syncEvent": {
  23846. "type": "object",
  23847. "properties": {
  23848. "type": {
  23849. "type": "string",
  23850. "enum": ["session.next.context.updated.1"]
  23851. },
  23852. "id": {
  23853. "type": "string",
  23854. "pattern": "^evt_"
  23855. },
  23856. "seq": {
  23857. "type": "number"
  23858. },
  23859. "aggregateID": {
  23860. "type": "string"
  23861. },
  23862. "data": {
  23863. "type": "object",
  23864. "properties": {
  23865. "timestamp": {
  23866. "type": "number"
  23867. },
  23868. "sessionID": {
  23869. "type": "string",
  23870. "pattern": "^ses"
  23871. },
  23872. "messageID": {
  23873. "type": "string",
  23874. "pattern": "^msg_"
  23875. },
  23876. "text": {
  23877. "type": "string"
  23878. }
  23879. },
  23880. "required": ["timestamp", "sessionID", "messageID", "text"],
  23881. "additionalProperties": false
  23882. }
  23883. },
  23884. "required": ["type", "id", "seq", "aggregateID", "data"],
  23885. "additionalProperties": false
  23886. }
  23887. },
  23888. "required": ["type", "id", "syncEvent"],
  23889. "additionalProperties": false
  23890. },
  23891. "SyncEventSessionNextSynthetic": {
  23892. "type": "object",
  23893. "properties": {
  23894. "type": {
  23895. "type": "string",
  23896. "enum": ["sync"]
  23897. },
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^evt_"
  23901. },
  23902. "syncEvent": {
  23903. "type": "object",
  23904. "properties": {
  23905. "type": {
  23906. "type": "string",
  23907. "enum": ["session.next.synthetic.1"]
  23908. },
  23909. "id": {
  23910. "type": "string",
  23911. "pattern": "^evt_"
  23912. },
  23913. "seq": {
  23914. "type": "number"
  23915. },
  23916. "aggregateID": {
  23917. "type": "string"
  23918. },
  23919. "data": {
  23920. "type": "object",
  23921. "properties": {
  23922. "timestamp": {
  23923. "type": "number"
  23924. },
  23925. "sessionID": {
  23926. "type": "string",
  23927. "pattern": "^ses"
  23928. },
  23929. "messageID": {
  23930. "type": "string",
  23931. "pattern": "^msg_"
  23932. },
  23933. "text": {
  23934. "type": "string"
  23935. }
  23936. },
  23937. "required": ["timestamp", "sessionID", "messageID", "text"],
  23938. "additionalProperties": false
  23939. }
  23940. },
  23941. "required": ["type", "id", "seq", "aggregateID", "data"],
  23942. "additionalProperties": false
  23943. }
  23944. },
  23945. "required": ["type", "id", "syncEvent"],
  23946. "additionalProperties": false
  23947. },
  23948. "SyncEventSessionNextShellStarted": {
  23949. "type": "object",
  23950. "properties": {
  23951. "type": {
  23952. "type": "string",
  23953. "enum": ["sync"]
  23954. },
  23955. "id": {
  23956. "type": "string",
  23957. "pattern": "^evt_"
  23958. },
  23959. "syncEvent": {
  23960. "type": "object",
  23961. "properties": {
  23962. "type": {
  23963. "type": "string",
  23964. "enum": ["session.next.shell.started.1"]
  23965. },
  23966. "id": {
  23967. "type": "string",
  23968. "pattern": "^evt_"
  23969. },
  23970. "seq": {
  23971. "type": "number"
  23972. },
  23973. "aggregateID": {
  23974. "type": "string"
  23975. },
  23976. "data": {
  23977. "type": "object",
  23978. "properties": {
  23979. "timestamp": {
  23980. "type": "number"
  23981. },
  23982. "sessionID": {
  23983. "type": "string",
  23984. "pattern": "^ses"
  23985. },
  23986. "messageID": {
  23987. "type": "string",
  23988. "pattern": "^msg_"
  23989. },
  23990. "callID": {
  23991. "type": "string"
  23992. },
  23993. "command": {
  23994. "type": "string"
  23995. }
  23996. },
  23997. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  23998. "additionalProperties": false
  23999. }
  24000. },
  24001. "required": ["type", "id", "seq", "aggregateID", "data"],
  24002. "additionalProperties": false
  24003. }
  24004. },
  24005. "required": ["type", "id", "syncEvent"],
  24006. "additionalProperties": false
  24007. },
  24008. "SyncEventSessionNextShellEnded": {
  24009. "type": "object",
  24010. "properties": {
  24011. "type": {
  24012. "type": "string",
  24013. "enum": ["sync"]
  24014. },
  24015. "id": {
  24016. "type": "string",
  24017. "pattern": "^evt_"
  24018. },
  24019. "syncEvent": {
  24020. "type": "object",
  24021. "properties": {
  24022. "type": {
  24023. "type": "string",
  24024. "enum": ["session.next.shell.ended.1"]
  24025. },
  24026. "id": {
  24027. "type": "string",
  24028. "pattern": "^evt_"
  24029. },
  24030. "seq": {
  24031. "type": "number"
  24032. },
  24033. "aggregateID": {
  24034. "type": "string"
  24035. },
  24036. "data": {
  24037. "type": "object",
  24038. "properties": {
  24039. "timestamp": {
  24040. "type": "number"
  24041. },
  24042. "sessionID": {
  24043. "type": "string",
  24044. "pattern": "^ses"
  24045. },
  24046. "callID": {
  24047. "type": "string"
  24048. },
  24049. "output": {
  24050. "type": "string"
  24051. }
  24052. },
  24053. "required": ["timestamp", "sessionID", "callID", "output"],
  24054. "additionalProperties": false
  24055. }
  24056. },
  24057. "required": ["type", "id", "seq", "aggregateID", "data"],
  24058. "additionalProperties": false
  24059. }
  24060. },
  24061. "required": ["type", "id", "syncEvent"],
  24062. "additionalProperties": false
  24063. },
  24064. "SyncEventSessionNextStepStarted": {
  24065. "type": "object",
  24066. "properties": {
  24067. "type": {
  24068. "type": "string",
  24069. "enum": ["sync"]
  24070. },
  24071. "id": {
  24072. "type": "string",
  24073. "pattern": "^evt_"
  24074. },
  24075. "syncEvent": {
  24076. "type": "object",
  24077. "properties": {
  24078. "type": {
  24079. "type": "string",
  24080. "enum": ["session.next.step.started.1"]
  24081. },
  24082. "id": {
  24083. "type": "string",
  24084. "pattern": "^evt_"
  24085. },
  24086. "seq": {
  24087. "type": "number"
  24088. },
  24089. "aggregateID": {
  24090. "type": "string"
  24091. },
  24092. "data": {
  24093. "type": "object",
  24094. "properties": {
  24095. "timestamp": {
  24096. "type": "number"
  24097. },
  24098. "sessionID": {
  24099. "type": "string",
  24100. "pattern": "^ses"
  24101. },
  24102. "assistantMessageID": {
  24103. "type": "string",
  24104. "pattern": "^msg_"
  24105. },
  24106. "agent": {
  24107. "type": "string"
  24108. },
  24109. "model": {
  24110. "type": "object",
  24111. "properties": {
  24112. "id": {
  24113. "type": "string"
  24114. },
  24115. "providerID": {
  24116. "type": "string"
  24117. },
  24118. "variant": {
  24119. "type": "string"
  24120. }
  24121. },
  24122. "required": ["id", "providerID"],
  24123. "additionalProperties": false
  24124. },
  24125. "snapshot": {
  24126. "type": "string"
  24127. }
  24128. },
  24129. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24130. "additionalProperties": false
  24131. }
  24132. },
  24133. "required": ["type", "id", "seq", "aggregateID", "data"],
  24134. "additionalProperties": false
  24135. }
  24136. },
  24137. "required": ["type", "id", "syncEvent"],
  24138. "additionalProperties": false
  24139. },
  24140. "SyncEventSessionNextStepEnded": {
  24141. "type": "object",
  24142. "properties": {
  24143. "type": {
  24144. "type": "string",
  24145. "enum": ["sync"]
  24146. },
  24147. "id": {
  24148. "type": "string",
  24149. "pattern": "^evt_"
  24150. },
  24151. "syncEvent": {
  24152. "type": "object",
  24153. "properties": {
  24154. "type": {
  24155. "type": "string",
  24156. "enum": ["session.next.step.ended.2"]
  24157. },
  24158. "id": {
  24159. "type": "string",
  24160. "pattern": "^evt_"
  24161. },
  24162. "seq": {
  24163. "type": "number"
  24164. },
  24165. "aggregateID": {
  24166. "type": "string"
  24167. },
  24168. "data": {
  24169. "type": "object",
  24170. "properties": {
  24171. "timestamp": {
  24172. "type": "number"
  24173. },
  24174. "sessionID": {
  24175. "type": "string",
  24176. "pattern": "^ses"
  24177. },
  24178. "assistantMessageID": {
  24179. "type": "string",
  24180. "pattern": "^msg_"
  24181. },
  24182. "finish": {
  24183. "type": "string"
  24184. },
  24185. "cost": {
  24186. "type": "number"
  24187. },
  24188. "tokens": {
  24189. "type": "object",
  24190. "properties": {
  24191. "input": {
  24192. "type": "number"
  24193. },
  24194. "output": {
  24195. "type": "number"
  24196. },
  24197. "reasoning": {
  24198. "type": "number"
  24199. },
  24200. "cache": {
  24201. "type": "object",
  24202. "properties": {
  24203. "read": {
  24204. "type": "number"
  24205. },
  24206. "write": {
  24207. "type": "number"
  24208. }
  24209. },
  24210. "required": ["read", "write"],
  24211. "additionalProperties": false
  24212. }
  24213. },
  24214. "required": ["input", "output", "reasoning", "cache"],
  24215. "additionalProperties": false
  24216. },
  24217. "snapshot": {
  24218. "type": "string"
  24219. }
  24220. },
  24221. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24222. "additionalProperties": false
  24223. }
  24224. },
  24225. "required": ["type", "id", "seq", "aggregateID", "data"],
  24226. "additionalProperties": false
  24227. }
  24228. },
  24229. "required": ["type", "id", "syncEvent"],
  24230. "additionalProperties": false
  24231. },
  24232. "SyncEventSessionNextStepFailed": {
  24233. "type": "object",
  24234. "properties": {
  24235. "type": {
  24236. "type": "string",
  24237. "enum": ["sync"]
  24238. },
  24239. "id": {
  24240. "type": "string",
  24241. "pattern": "^evt_"
  24242. },
  24243. "syncEvent": {
  24244. "type": "object",
  24245. "properties": {
  24246. "type": {
  24247. "type": "string",
  24248. "enum": ["session.next.step.failed.2"]
  24249. },
  24250. "id": {
  24251. "type": "string",
  24252. "pattern": "^evt_"
  24253. },
  24254. "seq": {
  24255. "type": "number"
  24256. },
  24257. "aggregateID": {
  24258. "type": "string"
  24259. },
  24260. "data": {
  24261. "type": "object",
  24262. "properties": {
  24263. "timestamp": {
  24264. "type": "number"
  24265. },
  24266. "sessionID": {
  24267. "type": "string",
  24268. "pattern": "^ses"
  24269. },
  24270. "assistantMessageID": {
  24271. "type": "string",
  24272. "pattern": "^msg_"
  24273. },
  24274. "error": {
  24275. "$ref": "#/components/schemas/SessionErrorUnknown"
  24276. }
  24277. },
  24278. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24279. "additionalProperties": false
  24280. }
  24281. },
  24282. "required": ["type", "id", "seq", "aggregateID", "data"],
  24283. "additionalProperties": false
  24284. }
  24285. },
  24286. "required": ["type", "id", "syncEvent"],
  24287. "additionalProperties": false
  24288. },
  24289. "SyncEventSessionNextTextStarted": {
  24290. "type": "object",
  24291. "properties": {
  24292. "type": {
  24293. "type": "string",
  24294. "enum": ["sync"]
  24295. },
  24296. "id": {
  24297. "type": "string",
  24298. "pattern": "^evt_"
  24299. },
  24300. "syncEvent": {
  24301. "type": "object",
  24302. "properties": {
  24303. "type": {
  24304. "type": "string",
  24305. "enum": ["session.next.text.started.1"]
  24306. },
  24307. "id": {
  24308. "type": "string",
  24309. "pattern": "^evt_"
  24310. },
  24311. "seq": {
  24312. "type": "number"
  24313. },
  24314. "aggregateID": {
  24315. "type": "string"
  24316. },
  24317. "data": {
  24318. "type": "object",
  24319. "properties": {
  24320. "timestamp": {
  24321. "type": "number"
  24322. },
  24323. "sessionID": {
  24324. "type": "string",
  24325. "pattern": "^ses"
  24326. },
  24327. "assistantMessageID": {
  24328. "type": "string",
  24329. "pattern": "^msg_"
  24330. },
  24331. "textID": {
  24332. "type": "string"
  24333. }
  24334. },
  24335. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24336. "additionalProperties": false
  24337. }
  24338. },
  24339. "required": ["type", "id", "seq", "aggregateID", "data"],
  24340. "additionalProperties": false
  24341. }
  24342. },
  24343. "required": ["type", "id", "syncEvent"],
  24344. "additionalProperties": false
  24345. },
  24346. "SyncEventSessionNextTextEnded": {
  24347. "type": "object",
  24348. "properties": {
  24349. "type": {
  24350. "type": "string",
  24351. "enum": ["sync"]
  24352. },
  24353. "id": {
  24354. "type": "string",
  24355. "pattern": "^evt_"
  24356. },
  24357. "syncEvent": {
  24358. "type": "object",
  24359. "properties": {
  24360. "type": {
  24361. "type": "string",
  24362. "enum": ["session.next.text.ended.1"]
  24363. },
  24364. "id": {
  24365. "type": "string",
  24366. "pattern": "^evt_"
  24367. },
  24368. "seq": {
  24369. "type": "number"
  24370. },
  24371. "aggregateID": {
  24372. "type": "string"
  24373. },
  24374. "data": {
  24375. "type": "object",
  24376. "properties": {
  24377. "timestamp": {
  24378. "type": "number"
  24379. },
  24380. "sessionID": {
  24381. "type": "string",
  24382. "pattern": "^ses"
  24383. },
  24384. "assistantMessageID": {
  24385. "type": "string",
  24386. "pattern": "^msg_"
  24387. },
  24388. "textID": {
  24389. "type": "string"
  24390. },
  24391. "text": {
  24392. "type": "string"
  24393. }
  24394. },
  24395. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24396. "additionalProperties": false
  24397. }
  24398. },
  24399. "required": ["type", "id", "seq", "aggregateID", "data"],
  24400. "additionalProperties": false
  24401. }
  24402. },
  24403. "required": ["type", "id", "syncEvent"],
  24404. "additionalProperties": false
  24405. },
  24406. "SyncEventSessionNextReasoningStarted": {
  24407. "type": "object",
  24408. "properties": {
  24409. "type": {
  24410. "type": "string",
  24411. "enum": ["sync"]
  24412. },
  24413. "id": {
  24414. "type": "string",
  24415. "pattern": "^evt_"
  24416. },
  24417. "syncEvent": {
  24418. "type": "object",
  24419. "properties": {
  24420. "type": {
  24421. "type": "string",
  24422. "enum": ["session.next.reasoning.started.1"]
  24423. },
  24424. "id": {
  24425. "type": "string",
  24426. "pattern": "^evt_"
  24427. },
  24428. "seq": {
  24429. "type": "number"
  24430. },
  24431. "aggregateID": {
  24432. "type": "string"
  24433. },
  24434. "data": {
  24435. "type": "object",
  24436. "properties": {
  24437. "timestamp": {
  24438. "type": "number"
  24439. },
  24440. "sessionID": {
  24441. "type": "string",
  24442. "pattern": "^ses"
  24443. },
  24444. "assistantMessageID": {
  24445. "type": "string",
  24446. "pattern": "^msg_"
  24447. },
  24448. "reasoningID": {
  24449. "type": "string"
  24450. },
  24451. "providerMetadata": {
  24452. "type": "object",
  24453. "additionalProperties": {
  24454. "type": "object"
  24455. }
  24456. }
  24457. },
  24458. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24459. "additionalProperties": false
  24460. }
  24461. },
  24462. "required": ["type", "id", "seq", "aggregateID", "data"],
  24463. "additionalProperties": false
  24464. }
  24465. },
  24466. "required": ["type", "id", "syncEvent"],
  24467. "additionalProperties": false
  24468. },
  24469. "SyncEventSessionNextReasoningEnded": {
  24470. "type": "object",
  24471. "properties": {
  24472. "type": {
  24473. "type": "string",
  24474. "enum": ["sync"]
  24475. },
  24476. "id": {
  24477. "type": "string",
  24478. "pattern": "^evt_"
  24479. },
  24480. "syncEvent": {
  24481. "type": "object",
  24482. "properties": {
  24483. "type": {
  24484. "type": "string",
  24485. "enum": ["session.next.reasoning.ended.1"]
  24486. },
  24487. "id": {
  24488. "type": "string",
  24489. "pattern": "^evt_"
  24490. },
  24491. "seq": {
  24492. "type": "number"
  24493. },
  24494. "aggregateID": {
  24495. "type": "string"
  24496. },
  24497. "data": {
  24498. "type": "object",
  24499. "properties": {
  24500. "timestamp": {
  24501. "type": "number"
  24502. },
  24503. "sessionID": {
  24504. "type": "string",
  24505. "pattern": "^ses"
  24506. },
  24507. "assistantMessageID": {
  24508. "type": "string",
  24509. "pattern": "^msg_"
  24510. },
  24511. "reasoningID": {
  24512. "type": "string"
  24513. },
  24514. "text": {
  24515. "type": "string"
  24516. },
  24517. "providerMetadata": {
  24518. "type": "object",
  24519. "additionalProperties": {
  24520. "type": "object"
  24521. }
  24522. }
  24523. },
  24524. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  24525. "additionalProperties": false
  24526. }
  24527. },
  24528. "required": ["type", "id", "seq", "aggregateID", "data"],
  24529. "additionalProperties": false
  24530. }
  24531. },
  24532. "required": ["type", "id", "syncEvent"],
  24533. "additionalProperties": false
  24534. },
  24535. "SyncEventSessionNextToolInputStarted": {
  24536. "type": "object",
  24537. "properties": {
  24538. "type": {
  24539. "type": "string",
  24540. "enum": ["sync"]
  24541. },
  24542. "id": {
  24543. "type": "string",
  24544. "pattern": "^evt_"
  24545. },
  24546. "syncEvent": {
  24547. "type": "object",
  24548. "properties": {
  24549. "type": {
  24550. "type": "string",
  24551. "enum": ["session.next.tool.input.started.1"]
  24552. },
  24553. "id": {
  24554. "type": "string",
  24555. "pattern": "^evt_"
  24556. },
  24557. "seq": {
  24558. "type": "number"
  24559. },
  24560. "aggregateID": {
  24561. "type": "string"
  24562. },
  24563. "data": {
  24564. "type": "object",
  24565. "properties": {
  24566. "timestamp": {
  24567. "type": "number"
  24568. },
  24569. "sessionID": {
  24570. "type": "string",
  24571. "pattern": "^ses"
  24572. },
  24573. "assistantMessageID": {
  24574. "type": "string",
  24575. "pattern": "^msg_"
  24576. },
  24577. "callID": {
  24578. "type": "string"
  24579. },
  24580. "name": {
  24581. "type": "string"
  24582. }
  24583. },
  24584. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  24585. "additionalProperties": false
  24586. }
  24587. },
  24588. "required": ["type", "id", "seq", "aggregateID", "data"],
  24589. "additionalProperties": false
  24590. }
  24591. },
  24592. "required": ["type", "id", "syncEvent"],
  24593. "additionalProperties": false
  24594. },
  24595. "SyncEventSessionNextToolInputEnded": {
  24596. "type": "object",
  24597. "properties": {
  24598. "type": {
  24599. "type": "string",
  24600. "enum": ["sync"]
  24601. },
  24602. "id": {
  24603. "type": "string",
  24604. "pattern": "^evt_"
  24605. },
  24606. "syncEvent": {
  24607. "type": "object",
  24608. "properties": {
  24609. "type": {
  24610. "type": "string",
  24611. "enum": ["session.next.tool.input.ended.1"]
  24612. },
  24613. "id": {
  24614. "type": "string",
  24615. "pattern": "^evt_"
  24616. },
  24617. "seq": {
  24618. "type": "number"
  24619. },
  24620. "aggregateID": {
  24621. "type": "string"
  24622. },
  24623. "data": {
  24624. "type": "object",
  24625. "properties": {
  24626. "timestamp": {
  24627. "type": "number"
  24628. },
  24629. "sessionID": {
  24630. "type": "string",
  24631. "pattern": "^ses"
  24632. },
  24633. "assistantMessageID": {
  24634. "type": "string",
  24635. "pattern": "^msg_"
  24636. },
  24637. "callID": {
  24638. "type": "string"
  24639. },
  24640. "text": {
  24641. "type": "string"
  24642. }
  24643. },
  24644. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  24645. "additionalProperties": false
  24646. }
  24647. },
  24648. "required": ["type", "id", "seq", "aggregateID", "data"],
  24649. "additionalProperties": false
  24650. }
  24651. },
  24652. "required": ["type", "id", "syncEvent"],
  24653. "additionalProperties": false
  24654. },
  24655. "SyncEventSessionNextToolCalled": {
  24656. "type": "object",
  24657. "properties": {
  24658. "type": {
  24659. "type": "string",
  24660. "enum": ["sync"]
  24661. },
  24662. "id": {
  24663. "type": "string",
  24664. "pattern": "^evt_"
  24665. },
  24666. "syncEvent": {
  24667. "type": "object",
  24668. "properties": {
  24669. "type": {
  24670. "type": "string",
  24671. "enum": ["session.next.tool.called.1"]
  24672. },
  24673. "id": {
  24674. "type": "string",
  24675. "pattern": "^evt_"
  24676. },
  24677. "seq": {
  24678. "type": "number"
  24679. },
  24680. "aggregateID": {
  24681. "type": "string"
  24682. },
  24683. "data": {
  24684. "type": "object",
  24685. "properties": {
  24686. "timestamp": {
  24687. "type": "number"
  24688. },
  24689. "sessionID": {
  24690. "type": "string",
  24691. "pattern": "^ses"
  24692. },
  24693. "assistantMessageID": {
  24694. "type": "string",
  24695. "pattern": "^msg_"
  24696. },
  24697. "callID": {
  24698. "type": "string"
  24699. },
  24700. "tool": {
  24701. "type": "string"
  24702. },
  24703. "input": {
  24704. "type": "object"
  24705. },
  24706. "provider": {
  24707. "type": "object",
  24708. "properties": {
  24709. "executed": {
  24710. "type": "boolean"
  24711. },
  24712. "metadata": {
  24713. "type": "object",
  24714. "additionalProperties": {
  24715. "type": "object"
  24716. }
  24717. }
  24718. },
  24719. "required": ["executed"],
  24720. "additionalProperties": false
  24721. }
  24722. },
  24723. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  24724. "additionalProperties": false
  24725. }
  24726. },
  24727. "required": ["type", "id", "seq", "aggregateID", "data"],
  24728. "additionalProperties": false
  24729. }
  24730. },
  24731. "required": ["type", "id", "syncEvent"],
  24732. "additionalProperties": false
  24733. },
  24734. "SyncEventSessionNextToolProgress": {
  24735. "type": "object",
  24736. "properties": {
  24737. "type": {
  24738. "type": "string",
  24739. "enum": ["sync"]
  24740. },
  24741. "id": {
  24742. "type": "string",
  24743. "pattern": "^evt_"
  24744. },
  24745. "syncEvent": {
  24746. "type": "object",
  24747. "properties": {
  24748. "type": {
  24749. "type": "string",
  24750. "enum": ["session.next.tool.progress.1"]
  24751. },
  24752. "id": {
  24753. "type": "string",
  24754. "pattern": "^evt_"
  24755. },
  24756. "seq": {
  24757. "type": "number"
  24758. },
  24759. "aggregateID": {
  24760. "type": "string"
  24761. },
  24762. "data": {
  24763. "type": "object",
  24764. "properties": {
  24765. "timestamp": {
  24766. "type": "number"
  24767. },
  24768. "sessionID": {
  24769. "type": "string",
  24770. "pattern": "^ses"
  24771. },
  24772. "assistantMessageID": {
  24773. "type": "string",
  24774. "pattern": "^msg_"
  24775. },
  24776. "callID": {
  24777. "type": "string"
  24778. },
  24779. "structured": {
  24780. "type": "object"
  24781. },
  24782. "content": {
  24783. "type": "array",
  24784. "items": {
  24785. "anyOf": [
  24786. {
  24787. "$ref": "#/components/schemas/ToolTextContent"
  24788. },
  24789. {
  24790. "$ref": "#/components/schemas/ToolFileContent"
  24791. }
  24792. ]
  24793. }
  24794. }
  24795. },
  24796. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  24797. "additionalProperties": false
  24798. }
  24799. },
  24800. "required": ["type", "id", "seq", "aggregateID", "data"],
  24801. "additionalProperties": false
  24802. }
  24803. },
  24804. "required": ["type", "id", "syncEvent"],
  24805. "additionalProperties": false
  24806. },
  24807. "SyncEventSessionNextToolSuccess": {
  24808. "type": "object",
  24809. "properties": {
  24810. "type": {
  24811. "type": "string",
  24812. "enum": ["sync"]
  24813. },
  24814. "id": {
  24815. "type": "string",
  24816. "pattern": "^evt_"
  24817. },
  24818. "syncEvent": {
  24819. "type": "object",
  24820. "properties": {
  24821. "type": {
  24822. "type": "string",
  24823. "enum": ["session.next.tool.success.1"]
  24824. },
  24825. "id": {
  24826. "type": "string",
  24827. "pattern": "^evt_"
  24828. },
  24829. "seq": {
  24830. "type": "number"
  24831. },
  24832. "aggregateID": {
  24833. "type": "string"
  24834. },
  24835. "data": {
  24836. "type": "object",
  24837. "properties": {
  24838. "timestamp": {
  24839. "type": "number"
  24840. },
  24841. "sessionID": {
  24842. "type": "string",
  24843. "pattern": "^ses"
  24844. },
  24845. "assistantMessageID": {
  24846. "type": "string",
  24847. "pattern": "^msg_"
  24848. },
  24849. "callID": {
  24850. "type": "string"
  24851. },
  24852. "structured": {
  24853. "type": "object"
  24854. },
  24855. "content": {
  24856. "type": "array",
  24857. "items": {
  24858. "anyOf": [
  24859. {
  24860. "$ref": "#/components/schemas/ToolTextContent"
  24861. },
  24862. {
  24863. "$ref": "#/components/schemas/ToolFileContent"
  24864. }
  24865. ]
  24866. }
  24867. },
  24868. "outputPaths": {
  24869. "type": "array",
  24870. "items": {
  24871. "type": "string"
  24872. }
  24873. },
  24874. "result": {},
  24875. "provider": {
  24876. "type": "object",
  24877. "properties": {
  24878. "executed": {
  24879. "type": "boolean"
  24880. },
  24881. "metadata": {
  24882. "type": "object",
  24883. "additionalProperties": {
  24884. "type": "object"
  24885. }
  24886. }
  24887. },
  24888. "required": ["executed"],
  24889. "additionalProperties": false
  24890. }
  24891. },
  24892. "required": [
  24893. "timestamp",
  24894. "sessionID",
  24895. "assistantMessageID",
  24896. "callID",
  24897. "structured",
  24898. "content",
  24899. "provider"
  24900. ],
  24901. "additionalProperties": false
  24902. }
  24903. },
  24904. "required": ["type", "id", "seq", "aggregateID", "data"],
  24905. "additionalProperties": false
  24906. }
  24907. },
  24908. "required": ["type", "id", "syncEvent"],
  24909. "additionalProperties": false
  24910. },
  24911. "SyncEventSessionNextToolFailed": {
  24912. "type": "object",
  24913. "properties": {
  24914. "type": {
  24915. "type": "string",
  24916. "enum": ["sync"]
  24917. },
  24918. "id": {
  24919. "type": "string",
  24920. "pattern": "^evt_"
  24921. },
  24922. "syncEvent": {
  24923. "type": "object",
  24924. "properties": {
  24925. "type": {
  24926. "type": "string",
  24927. "enum": ["session.next.tool.failed.1"]
  24928. },
  24929. "id": {
  24930. "type": "string",
  24931. "pattern": "^evt_"
  24932. },
  24933. "seq": {
  24934. "type": "number"
  24935. },
  24936. "aggregateID": {
  24937. "type": "string"
  24938. },
  24939. "data": {
  24940. "type": "object",
  24941. "properties": {
  24942. "timestamp": {
  24943. "type": "number"
  24944. },
  24945. "sessionID": {
  24946. "type": "string",
  24947. "pattern": "^ses"
  24948. },
  24949. "assistantMessageID": {
  24950. "type": "string",
  24951. "pattern": "^msg_"
  24952. },
  24953. "callID": {
  24954. "type": "string"
  24955. },
  24956. "error": {
  24957. "$ref": "#/components/schemas/SessionErrorUnknown"
  24958. },
  24959. "result": {},
  24960. "provider": {
  24961. "type": "object",
  24962. "properties": {
  24963. "executed": {
  24964. "type": "boolean"
  24965. },
  24966. "metadata": {
  24967. "type": "object",
  24968. "additionalProperties": {
  24969. "type": "object"
  24970. }
  24971. }
  24972. },
  24973. "required": ["executed"],
  24974. "additionalProperties": false
  24975. }
  24976. },
  24977. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  24978. "additionalProperties": false
  24979. }
  24980. },
  24981. "required": ["type", "id", "seq", "aggregateID", "data"],
  24982. "additionalProperties": false
  24983. }
  24984. },
  24985. "required": ["type", "id", "syncEvent"],
  24986. "additionalProperties": false
  24987. },
  24988. "SyncEventSessionNextRetried": {
  24989. "type": "object",
  24990. "properties": {
  24991. "type": {
  24992. "type": "string",
  24993. "enum": ["sync"]
  24994. },
  24995. "id": {
  24996. "type": "string",
  24997. "pattern": "^evt_"
  24998. },
  24999. "syncEvent": {
  25000. "type": "object",
  25001. "properties": {
  25002. "type": {
  25003. "type": "string",
  25004. "enum": ["session.next.retried.1"]
  25005. },
  25006. "id": {
  25007. "type": "string",
  25008. "pattern": "^evt_"
  25009. },
  25010. "seq": {
  25011. "type": "number"
  25012. },
  25013. "aggregateID": {
  25014. "type": "string"
  25015. },
  25016. "data": {
  25017. "type": "object",
  25018. "properties": {
  25019. "timestamp": {
  25020. "type": "number"
  25021. },
  25022. "sessionID": {
  25023. "type": "string",
  25024. "pattern": "^ses"
  25025. },
  25026. "attempt": {
  25027. "type": "number"
  25028. },
  25029. "error": {
  25030. "$ref": "#/components/schemas/SessionNextRetry_error"
  25031. }
  25032. },
  25033. "required": ["timestamp", "sessionID", "attempt", "error"],
  25034. "additionalProperties": false
  25035. }
  25036. },
  25037. "required": ["type", "id", "seq", "aggregateID", "data"],
  25038. "additionalProperties": false
  25039. }
  25040. },
  25041. "required": ["type", "id", "syncEvent"],
  25042. "additionalProperties": false
  25043. },
  25044. "SyncEventSessionNextCompactionStarted": {
  25045. "type": "object",
  25046. "properties": {
  25047. "type": {
  25048. "type": "string",
  25049. "enum": ["sync"]
  25050. },
  25051. "id": {
  25052. "type": "string",
  25053. "pattern": "^evt_"
  25054. },
  25055. "syncEvent": {
  25056. "type": "object",
  25057. "properties": {
  25058. "type": {
  25059. "type": "string",
  25060. "enum": ["session.next.compaction.started.1"]
  25061. },
  25062. "id": {
  25063. "type": "string",
  25064. "pattern": "^evt_"
  25065. },
  25066. "seq": {
  25067. "type": "number"
  25068. },
  25069. "aggregateID": {
  25070. "type": "string"
  25071. },
  25072. "data": {
  25073. "type": "object",
  25074. "properties": {
  25075. "timestamp": {
  25076. "type": "number"
  25077. },
  25078. "sessionID": {
  25079. "type": "string",
  25080. "pattern": "^ses"
  25081. },
  25082. "messageID": {
  25083. "type": "string",
  25084. "pattern": "^msg_"
  25085. },
  25086. "reason": {
  25087. "type": "string",
  25088. "enum": ["auto", "manual"]
  25089. }
  25090. },
  25091. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25092. "additionalProperties": false
  25093. }
  25094. },
  25095. "required": ["type", "id", "seq", "aggregateID", "data"],
  25096. "additionalProperties": false
  25097. }
  25098. },
  25099. "required": ["type", "id", "syncEvent"],
  25100. "additionalProperties": false
  25101. },
  25102. "SyncEventSessionNextCompactionEnded": {
  25103. "type": "object",
  25104. "properties": {
  25105. "type": {
  25106. "type": "string",
  25107. "enum": ["sync"]
  25108. },
  25109. "id": {
  25110. "type": "string",
  25111. "pattern": "^evt_"
  25112. },
  25113. "syncEvent": {
  25114. "type": "object",
  25115. "properties": {
  25116. "type": {
  25117. "type": "string",
  25118. "enum": ["session.next.compaction.ended.2"]
  25119. },
  25120. "id": {
  25121. "type": "string",
  25122. "pattern": "^evt_"
  25123. },
  25124. "seq": {
  25125. "type": "number"
  25126. },
  25127. "aggregateID": {
  25128. "type": "string"
  25129. },
  25130. "data": {
  25131. "type": "object",
  25132. "properties": {
  25133. "timestamp": {
  25134. "type": "number"
  25135. },
  25136. "sessionID": {
  25137. "type": "string",
  25138. "pattern": "^ses"
  25139. },
  25140. "messageID": {
  25141. "type": "string",
  25142. "pattern": "^msg_"
  25143. },
  25144. "reason": {
  25145. "type": "string",
  25146. "enum": ["auto", "manual"]
  25147. },
  25148. "text": {
  25149. "type": "string"
  25150. },
  25151. "recent": {
  25152. "type": "string"
  25153. }
  25154. },
  25155. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25156. "additionalProperties": false
  25157. }
  25158. },
  25159. "required": ["type", "id", "seq", "aggregateID", "data"],
  25160. "additionalProperties": false
  25161. }
  25162. },
  25163. "required": ["type", "id", "syncEvent"],
  25164. "additionalProperties": false
  25165. },
  25166. "ConfigV2ReferenceGit": {
  25167. "type": "object",
  25168. "properties": {
  25169. "repository": {
  25170. "type": "string"
  25171. },
  25172. "branch": {
  25173. "type": "string"
  25174. },
  25175. "description": {
  25176. "type": "string"
  25177. },
  25178. "hidden": {
  25179. "type": "boolean"
  25180. }
  25181. },
  25182. "required": ["repository"],
  25183. "additionalProperties": false
  25184. },
  25185. "ConfigV2ReferenceLocal": {
  25186. "type": "object",
  25187. "properties": {
  25188. "path": {
  25189. "type": "string"
  25190. },
  25191. "description": {
  25192. "type": "string"
  25193. },
  25194. "hidden": {
  25195. "type": "boolean"
  25196. }
  25197. },
  25198. "required": ["path"],
  25199. "additionalProperties": false
  25200. },
  25201. "PolicyEffect": {
  25202. "type": "string",
  25203. "enum": ["allow", "deny"]
  25204. },
  25205. "ConfigV2ExperimentalPolicy": {
  25206. "type": "object",
  25207. "properties": {
  25208. "action": {
  25209. "type": "string",
  25210. "enum": ["provider.use"]
  25211. },
  25212. "effect": {
  25213. "$ref": "#/components/schemas/PolicyEffect"
  25214. },
  25215. "resource": {
  25216. "type": "string"
  25217. }
  25218. },
  25219. "required": ["action", "effect", "resource"],
  25220. "additionalProperties": false
  25221. },
  25222. "ProjectDirectories": {
  25223. "type": "array",
  25224. "items": {
  25225. "type": "object",
  25226. "properties": {
  25227. "directory": {
  25228. "type": "string"
  25229. },
  25230. "type": {
  25231. "type": "string",
  25232. "enum": ["main", "root", "git_worktree"]
  25233. }
  25234. },
  25235. "required": ["directory", "type"],
  25236. "additionalProperties": false
  25237. }
  25238. },
  25239. "ProjectCopyCopy": {
  25240. "type": "object",
  25241. "properties": {
  25242. "directory": {
  25243. "type": "string"
  25244. }
  25245. },
  25246. "required": ["directory"],
  25247. "additionalProperties": false
  25248. },
  25249. "LocationInfo": {
  25250. "type": "object",
  25251. "properties": {
  25252. "directory": {
  25253. "type": "string"
  25254. },
  25255. "workspaceID": {
  25256. "type": "string",
  25257. "pattern": "^wrk"
  25258. },
  25259. "project": {
  25260. "type": "object",
  25261. "properties": {
  25262. "id": {
  25263. "type": "string"
  25264. },
  25265. "directory": {
  25266. "type": "string"
  25267. }
  25268. },
  25269. "required": ["id", "directory"],
  25270. "additionalProperties": false
  25271. }
  25272. },
  25273. "required": ["directory", "project"],
  25274. "additionalProperties": false
  25275. },
  25276. "PermissionV2Effect": {
  25277. "type": "string",
  25278. "enum": ["allow", "deny", "ask"]
  25279. },
  25280. "PermissionV2Rule": {
  25281. "type": "object",
  25282. "properties": {
  25283. "action": {
  25284. "type": "string"
  25285. },
  25286. "resource": {
  25287. "type": "string"
  25288. },
  25289. "effect": {
  25290. "$ref": "#/components/schemas/PermissionV2Effect"
  25291. }
  25292. },
  25293. "required": ["action", "resource", "effect"],
  25294. "additionalProperties": false
  25295. },
  25296. "PermissionV2Ruleset": {
  25297. "type": "array",
  25298. "items": {
  25299. "$ref": "#/components/schemas/PermissionV2Rule"
  25300. }
  25301. },
  25302. "AgentV2Info": {
  25303. "type": "object",
  25304. "properties": {
  25305. "id": {
  25306. "type": "string"
  25307. },
  25308. "model": {
  25309. "type": "object",
  25310. "properties": {
  25311. "id": {
  25312. "type": "string"
  25313. },
  25314. "providerID": {
  25315. "type": "string"
  25316. },
  25317. "variant": {
  25318. "type": "string"
  25319. }
  25320. },
  25321. "required": ["id", "providerID"],
  25322. "additionalProperties": false
  25323. },
  25324. "request": {
  25325. "type": "object",
  25326. "properties": {
  25327. "headers": {
  25328. "type": "object",
  25329. "additionalProperties": {
  25330. "type": "string"
  25331. }
  25332. },
  25333. "body": {
  25334. "type": "object"
  25335. }
  25336. },
  25337. "required": ["headers", "body"],
  25338. "additionalProperties": false
  25339. },
  25340. "system": {
  25341. "type": "string"
  25342. },
  25343. "description": {
  25344. "type": "string"
  25345. },
  25346. "mode": {
  25347. "type": "string",
  25348. "enum": ["subagent", "primary", "all"]
  25349. },
  25350. "hidden": {
  25351. "type": "boolean"
  25352. },
  25353. "color": {
  25354. "anyOf": [
  25355. {
  25356. "type": "string",
  25357. "pattern": "^#[0-9a-fA-F]{6}$"
  25358. },
  25359. {
  25360. "type": "string",
  25361. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25362. }
  25363. ]
  25364. },
  25365. "steps": {
  25366. "type": "integer",
  25367. "exclusiveMinimum": 0
  25368. },
  25369. "permissions": {
  25370. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25371. }
  25372. },
  25373. "required": ["id", "request", "mode", "hidden", "permissions"],
  25374. "additionalProperties": false
  25375. },
  25376. "SessionV2Info": {
  25377. "type": "object",
  25378. "properties": {
  25379. "id": {
  25380. "type": "string",
  25381. "pattern": "^ses"
  25382. },
  25383. "parentID": {
  25384. "type": "string",
  25385. "pattern": "^ses"
  25386. },
  25387. "projectID": {
  25388. "type": "string"
  25389. },
  25390. "agent": {
  25391. "type": "string"
  25392. },
  25393. "model": {
  25394. "type": "object",
  25395. "properties": {
  25396. "id": {
  25397. "type": "string"
  25398. },
  25399. "providerID": {
  25400. "type": "string"
  25401. },
  25402. "variant": {
  25403. "type": "string"
  25404. }
  25405. },
  25406. "required": ["id", "providerID"],
  25407. "additionalProperties": false
  25408. },
  25409. "cost": {
  25410. "type": "number"
  25411. },
  25412. "tokens": {
  25413. "type": "object",
  25414. "properties": {
  25415. "input": {
  25416. "type": "number"
  25417. },
  25418. "output": {
  25419. "type": "number"
  25420. },
  25421. "reasoning": {
  25422. "type": "number"
  25423. },
  25424. "cache": {
  25425. "type": "object",
  25426. "properties": {
  25427. "read": {
  25428. "type": "number"
  25429. },
  25430. "write": {
  25431. "type": "number"
  25432. }
  25433. },
  25434. "required": ["read", "write"],
  25435. "additionalProperties": false
  25436. }
  25437. },
  25438. "required": ["input", "output", "reasoning", "cache"],
  25439. "additionalProperties": false
  25440. },
  25441. "time": {
  25442. "type": "object",
  25443. "properties": {
  25444. "created": {
  25445. "type": "number"
  25446. },
  25447. "updated": {
  25448. "type": "number"
  25449. },
  25450. "archived": {
  25451. "type": "number"
  25452. }
  25453. },
  25454. "required": ["created", "updated"],
  25455. "additionalProperties": false
  25456. },
  25457. "title": {
  25458. "type": "string"
  25459. },
  25460. "location": {
  25461. "$ref": "#/components/schemas/LocationRef"
  25462. },
  25463. "subpath": {
  25464. "type": "string"
  25465. }
  25466. },
  25467. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25468. "additionalProperties": false
  25469. },
  25470. "SessionInputAdmitted": {
  25471. "type": "object",
  25472. "properties": {
  25473. "admittedSeq": {
  25474. "type": "integer",
  25475. "minimum": 0
  25476. },
  25477. "id": {
  25478. "type": "string",
  25479. "pattern": "^msg_"
  25480. },
  25481. "sessionID": {
  25482. "type": "string",
  25483. "pattern": "^ses"
  25484. },
  25485. "prompt": {
  25486. "$ref": "#/components/schemas/Prompt"
  25487. },
  25488. "delivery": {
  25489. "type": "string",
  25490. "enum": ["steer", "queue"]
  25491. },
  25492. "timeCreated": {
  25493. "type": "number"
  25494. },
  25495. "promotedSeq": {
  25496. "type": "integer",
  25497. "minimum": 0
  25498. }
  25499. },
  25500. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  25501. "additionalProperties": false
  25502. },
  25503. "SessionMessageAgentSwitched": {
  25504. "type": "object",
  25505. "properties": {
  25506. "id": {
  25507. "type": "string",
  25508. "pattern": "^msg_"
  25509. },
  25510. "metadata": {
  25511. "type": "object"
  25512. },
  25513. "time": {
  25514. "type": "object",
  25515. "properties": {
  25516. "created": {
  25517. "type": "number"
  25518. }
  25519. },
  25520. "required": ["created"],
  25521. "additionalProperties": false
  25522. },
  25523. "type": {
  25524. "type": "string",
  25525. "enum": ["agent-switched"]
  25526. },
  25527. "agent": {
  25528. "type": "string"
  25529. }
  25530. },
  25531. "required": ["id", "time", "type", "agent"],
  25532. "additionalProperties": false
  25533. },
  25534. "SessionMessageModelSwitched": {
  25535. "type": "object",
  25536. "properties": {
  25537. "id": {
  25538. "type": "string",
  25539. "pattern": "^msg_"
  25540. },
  25541. "metadata": {
  25542. "type": "object"
  25543. },
  25544. "time": {
  25545. "type": "object",
  25546. "properties": {
  25547. "created": {
  25548. "type": "number"
  25549. }
  25550. },
  25551. "required": ["created"],
  25552. "additionalProperties": false
  25553. },
  25554. "type": {
  25555. "type": "string",
  25556. "enum": ["model-switched"]
  25557. },
  25558. "model": {
  25559. "type": "object",
  25560. "properties": {
  25561. "id": {
  25562. "type": "string"
  25563. },
  25564. "providerID": {
  25565. "type": "string"
  25566. },
  25567. "variant": {
  25568. "type": "string"
  25569. }
  25570. },
  25571. "required": ["id", "providerID"],
  25572. "additionalProperties": false
  25573. }
  25574. },
  25575. "required": ["id", "time", "type", "model"],
  25576. "additionalProperties": false
  25577. },
  25578. "SessionMessageUser": {
  25579. "type": "object",
  25580. "properties": {
  25581. "id": {
  25582. "type": "string",
  25583. "pattern": "^msg_"
  25584. },
  25585. "metadata": {
  25586. "type": "object"
  25587. },
  25588. "time": {
  25589. "type": "object",
  25590. "properties": {
  25591. "created": {
  25592. "type": "number"
  25593. }
  25594. },
  25595. "required": ["created"],
  25596. "additionalProperties": false
  25597. },
  25598. "text": {
  25599. "type": "string"
  25600. },
  25601. "files": {
  25602. "type": "array",
  25603. "items": {
  25604. "$ref": "#/components/schemas/PromptFileAttachment"
  25605. }
  25606. },
  25607. "agents": {
  25608. "type": "array",
  25609. "items": {
  25610. "$ref": "#/components/schemas/PromptAgentAttachment"
  25611. }
  25612. },
  25613. "type": {
  25614. "type": "string",
  25615. "enum": ["user"]
  25616. }
  25617. },
  25618. "required": ["id", "time", "text", "type"],
  25619. "additionalProperties": false
  25620. },
  25621. "SessionMessageSynthetic": {
  25622. "type": "object",
  25623. "properties": {
  25624. "id": {
  25625. "type": "string",
  25626. "pattern": "^msg_"
  25627. },
  25628. "metadata": {
  25629. "type": "object"
  25630. },
  25631. "time": {
  25632. "type": "object",
  25633. "properties": {
  25634. "created": {
  25635. "type": "number"
  25636. }
  25637. },
  25638. "required": ["created"],
  25639. "additionalProperties": false
  25640. },
  25641. "sessionID": {
  25642. "type": "string",
  25643. "pattern": "^ses"
  25644. },
  25645. "text": {
  25646. "type": "string"
  25647. },
  25648. "type": {
  25649. "type": "string",
  25650. "enum": ["synthetic"]
  25651. }
  25652. },
  25653. "required": ["id", "time", "sessionID", "text", "type"],
  25654. "additionalProperties": false
  25655. },
  25656. "SessionMessageSystem": {
  25657. "type": "object",
  25658. "properties": {
  25659. "id": {
  25660. "type": "string",
  25661. "pattern": "^msg_"
  25662. },
  25663. "metadata": {
  25664. "type": "object"
  25665. },
  25666. "time": {
  25667. "type": "object",
  25668. "properties": {
  25669. "created": {
  25670. "type": "number"
  25671. }
  25672. },
  25673. "required": ["created"],
  25674. "additionalProperties": false
  25675. },
  25676. "type": {
  25677. "type": "string",
  25678. "enum": ["system"]
  25679. },
  25680. "text": {
  25681. "type": "string"
  25682. }
  25683. },
  25684. "required": ["id", "time", "type", "text"],
  25685. "additionalProperties": false
  25686. },
  25687. "SessionMessageShell": {
  25688. "type": "object",
  25689. "properties": {
  25690. "id": {
  25691. "type": "string",
  25692. "pattern": "^msg_"
  25693. },
  25694. "metadata": {
  25695. "type": "object"
  25696. },
  25697. "time": {
  25698. "type": "object",
  25699. "properties": {
  25700. "created": {
  25701. "type": "number"
  25702. },
  25703. "completed": {
  25704. "type": "number"
  25705. }
  25706. },
  25707. "required": ["created"],
  25708. "additionalProperties": false
  25709. },
  25710. "type": {
  25711. "type": "string",
  25712. "enum": ["shell"]
  25713. },
  25714. "callID": {
  25715. "type": "string"
  25716. },
  25717. "command": {
  25718. "type": "string"
  25719. },
  25720. "output": {
  25721. "type": "string"
  25722. }
  25723. },
  25724. "required": ["id", "time", "type", "callID", "command", "output"],
  25725. "additionalProperties": false
  25726. },
  25727. "SessionMessageAssistantText": {
  25728. "type": "object",
  25729. "properties": {
  25730. "type": {
  25731. "type": "string",
  25732. "enum": ["text"]
  25733. },
  25734. "id": {
  25735. "type": "string"
  25736. },
  25737. "text": {
  25738. "type": "string"
  25739. }
  25740. },
  25741. "required": ["type", "id", "text"],
  25742. "additionalProperties": false
  25743. },
  25744. "SessionMessageAssistantReasoning": {
  25745. "type": "object",
  25746. "properties": {
  25747. "type": {
  25748. "type": "string",
  25749. "enum": ["reasoning"]
  25750. },
  25751. "id": {
  25752. "type": "string"
  25753. },
  25754. "text": {
  25755. "type": "string"
  25756. },
  25757. "providerMetadata": {
  25758. "type": "object",
  25759. "additionalProperties": {
  25760. "type": "object"
  25761. }
  25762. }
  25763. },
  25764. "required": ["type", "id", "text"],
  25765. "additionalProperties": false
  25766. },
  25767. "SessionMessageToolStatePending": {
  25768. "type": "object",
  25769. "properties": {
  25770. "status": {
  25771. "type": "string",
  25772. "enum": ["pending"]
  25773. },
  25774. "input": {
  25775. "type": "string"
  25776. }
  25777. },
  25778. "required": ["status", "input"],
  25779. "additionalProperties": false
  25780. },
  25781. "SessionMessageToolStateRunning": {
  25782. "type": "object",
  25783. "properties": {
  25784. "status": {
  25785. "type": "string",
  25786. "enum": ["running"]
  25787. },
  25788. "input": {
  25789. "type": "object"
  25790. },
  25791. "structured": {
  25792. "type": "object"
  25793. },
  25794. "content": {
  25795. "type": "array",
  25796. "items": {
  25797. "anyOf": [
  25798. {
  25799. "$ref": "#/components/schemas/ToolTextContent"
  25800. },
  25801. {
  25802. "$ref": "#/components/schemas/ToolFileContent"
  25803. }
  25804. ]
  25805. }
  25806. }
  25807. },
  25808. "required": ["status", "input", "structured", "content"],
  25809. "additionalProperties": false
  25810. },
  25811. "SessionMessageToolStateCompleted": {
  25812. "type": "object",
  25813. "properties": {
  25814. "status": {
  25815. "type": "string",
  25816. "enum": ["completed"]
  25817. },
  25818. "input": {
  25819. "type": "object"
  25820. },
  25821. "attachments": {
  25822. "type": "array",
  25823. "items": {
  25824. "$ref": "#/components/schemas/PromptFileAttachment"
  25825. }
  25826. },
  25827. "content": {
  25828. "type": "array",
  25829. "items": {
  25830. "anyOf": [
  25831. {
  25832. "$ref": "#/components/schemas/ToolTextContent"
  25833. },
  25834. {
  25835. "$ref": "#/components/schemas/ToolFileContent"
  25836. }
  25837. ]
  25838. }
  25839. },
  25840. "outputPaths": {
  25841. "type": "array",
  25842. "items": {
  25843. "type": "string"
  25844. }
  25845. },
  25846. "structured": {
  25847. "type": "object"
  25848. },
  25849. "result": {}
  25850. },
  25851. "required": ["status", "input", "content", "structured"],
  25852. "additionalProperties": false
  25853. },
  25854. "SessionMessageToolStateError": {
  25855. "type": "object",
  25856. "properties": {
  25857. "status": {
  25858. "type": "string",
  25859. "enum": ["error"]
  25860. },
  25861. "input": {
  25862. "type": "object"
  25863. },
  25864. "content": {
  25865. "type": "array",
  25866. "items": {
  25867. "anyOf": [
  25868. {
  25869. "$ref": "#/components/schemas/ToolTextContent"
  25870. },
  25871. {
  25872. "$ref": "#/components/schemas/ToolFileContent"
  25873. }
  25874. ]
  25875. }
  25876. },
  25877. "structured": {
  25878. "type": "object"
  25879. },
  25880. "error": {
  25881. "$ref": "#/components/schemas/SessionErrorUnknown"
  25882. },
  25883. "result": {}
  25884. },
  25885. "required": ["status", "input", "content", "structured", "error"],
  25886. "additionalProperties": false
  25887. },
  25888. "SessionMessageAssistantTool": {
  25889. "type": "object",
  25890. "properties": {
  25891. "type": {
  25892. "type": "string",
  25893. "enum": ["tool"]
  25894. },
  25895. "id": {
  25896. "type": "string"
  25897. },
  25898. "name": {
  25899. "type": "string"
  25900. },
  25901. "provider": {
  25902. "type": "object",
  25903. "properties": {
  25904. "executed": {
  25905. "type": "boolean"
  25906. },
  25907. "metadata": {
  25908. "type": "object",
  25909. "additionalProperties": {
  25910. "type": "object"
  25911. }
  25912. },
  25913. "resultMetadata": {
  25914. "type": "object",
  25915. "additionalProperties": {
  25916. "type": "object"
  25917. }
  25918. }
  25919. },
  25920. "required": ["executed"],
  25921. "additionalProperties": false
  25922. },
  25923. "state": {
  25924. "anyOf": [
  25925. {
  25926. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  25927. },
  25928. {
  25929. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  25930. },
  25931. {
  25932. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  25933. },
  25934. {
  25935. "$ref": "#/components/schemas/SessionMessageToolStateError"
  25936. }
  25937. ]
  25938. },
  25939. "time": {
  25940. "type": "object",
  25941. "properties": {
  25942. "created": {
  25943. "type": "number"
  25944. },
  25945. "ran": {
  25946. "type": "number"
  25947. },
  25948. "completed": {
  25949. "type": "number"
  25950. },
  25951. "pruned": {
  25952. "type": "number"
  25953. }
  25954. },
  25955. "required": ["created"],
  25956. "additionalProperties": false
  25957. }
  25958. },
  25959. "required": ["type", "id", "name", "state", "time"],
  25960. "additionalProperties": false
  25961. },
  25962. "SessionMessageAssistant": {
  25963. "type": "object",
  25964. "properties": {
  25965. "id": {
  25966. "type": "string",
  25967. "pattern": "^msg_"
  25968. },
  25969. "metadata": {
  25970. "type": "object"
  25971. },
  25972. "time": {
  25973. "type": "object",
  25974. "properties": {
  25975. "created": {
  25976. "type": "number"
  25977. },
  25978. "completed": {
  25979. "type": "number"
  25980. }
  25981. },
  25982. "required": ["created"],
  25983. "additionalProperties": false
  25984. },
  25985. "type": {
  25986. "type": "string",
  25987. "enum": ["assistant"]
  25988. },
  25989. "agent": {
  25990. "type": "string"
  25991. },
  25992. "model": {
  25993. "type": "object",
  25994. "properties": {
  25995. "id": {
  25996. "type": "string"
  25997. },
  25998. "providerID": {
  25999. "type": "string"
  26000. },
  26001. "variant": {
  26002. "type": "string"
  26003. }
  26004. },
  26005. "required": ["id", "providerID"],
  26006. "additionalProperties": false
  26007. },
  26008. "content": {
  26009. "type": "array",
  26010. "items": {
  26011. "anyOf": [
  26012. {
  26013. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26014. },
  26015. {
  26016. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26017. },
  26018. {
  26019. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26020. }
  26021. ]
  26022. }
  26023. },
  26024. "snapshot": {
  26025. "type": "object",
  26026. "properties": {
  26027. "start": {
  26028. "type": "string"
  26029. },
  26030. "end": {
  26031. "type": "string"
  26032. }
  26033. },
  26034. "additionalProperties": false
  26035. },
  26036. "finish": {
  26037. "type": "string"
  26038. },
  26039. "cost": {
  26040. "type": "number"
  26041. },
  26042. "tokens": {
  26043. "type": "object",
  26044. "properties": {
  26045. "input": {
  26046. "type": "number"
  26047. },
  26048. "output": {
  26049. "type": "number"
  26050. },
  26051. "reasoning": {
  26052. "type": "number"
  26053. },
  26054. "cache": {
  26055. "type": "object",
  26056. "properties": {
  26057. "read": {
  26058. "type": "number"
  26059. },
  26060. "write": {
  26061. "type": "number"
  26062. }
  26063. },
  26064. "required": ["read", "write"],
  26065. "additionalProperties": false
  26066. }
  26067. },
  26068. "required": ["input", "output", "reasoning", "cache"],
  26069. "additionalProperties": false
  26070. },
  26071. "error": {
  26072. "$ref": "#/components/schemas/SessionErrorUnknown"
  26073. }
  26074. },
  26075. "required": ["id", "time", "type", "agent", "model", "content"],
  26076. "additionalProperties": false
  26077. },
  26078. "SessionMessageCompaction": {
  26079. "type": "object",
  26080. "properties": {
  26081. "type": {
  26082. "type": "string",
  26083. "enum": ["compaction"]
  26084. },
  26085. "reason": {
  26086. "type": "string",
  26087. "enum": ["auto", "manual"]
  26088. },
  26089. "summary": {
  26090. "type": "string"
  26091. },
  26092. "recent": {
  26093. "type": "string"
  26094. },
  26095. "id": {
  26096. "type": "string",
  26097. "pattern": "^msg_"
  26098. },
  26099. "metadata": {
  26100. "type": "object"
  26101. },
  26102. "time": {
  26103. "type": "object",
  26104. "properties": {
  26105. "created": {
  26106. "type": "number"
  26107. }
  26108. },
  26109. "required": ["created"],
  26110. "additionalProperties": false
  26111. }
  26112. },
  26113. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26114. "additionalProperties": false
  26115. },
  26116. "SessionMessage": {
  26117. "anyOf": [
  26118. {
  26119. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26120. },
  26121. {
  26122. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26123. },
  26124. {
  26125. "$ref": "#/components/schemas/SessionMessageUser"
  26126. },
  26127. {
  26128. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26129. },
  26130. {
  26131. "$ref": "#/components/schemas/SessionMessageSystem"
  26132. },
  26133. {
  26134. "$ref": "#/components/schemas/SessionMessageShell"
  26135. },
  26136. {
  26137. "$ref": "#/components/schemas/SessionMessageAssistant"
  26138. },
  26139. {
  26140. "$ref": "#/components/schemas/SessionMessageCompaction"
  26141. }
  26142. ]
  26143. },
  26144. "ProviderV2Info": {
  26145. "type": "object",
  26146. "properties": {
  26147. "id": {
  26148. "type": "string"
  26149. },
  26150. "name": {
  26151. "type": "string"
  26152. },
  26153. "enabled": {
  26154. "anyOf": [
  26155. {
  26156. "type": "boolean",
  26157. "enum": [false]
  26158. },
  26159. {
  26160. "type": "object",
  26161. "properties": {
  26162. "via": {
  26163. "type": "string",
  26164. "enum": ["env"]
  26165. },
  26166. "name": {
  26167. "type": "string"
  26168. }
  26169. },
  26170. "required": ["via", "name"],
  26171. "additionalProperties": false
  26172. },
  26173. {
  26174. "type": "object",
  26175. "properties": {
  26176. "via": {
  26177. "type": "string",
  26178. "enum": ["credential"]
  26179. },
  26180. "credentialID": {
  26181. "type": "string"
  26182. }
  26183. },
  26184. "required": ["via", "credentialID"],
  26185. "additionalProperties": false
  26186. },
  26187. {
  26188. "type": "object",
  26189. "properties": {
  26190. "via": {
  26191. "type": "string",
  26192. "enum": ["custom"]
  26193. },
  26194. "data": {
  26195. "type": "object"
  26196. }
  26197. },
  26198. "required": ["via", "data"],
  26199. "additionalProperties": false
  26200. }
  26201. ]
  26202. },
  26203. "env": {
  26204. "type": "array",
  26205. "items": {
  26206. "type": "string"
  26207. }
  26208. },
  26209. "api": {
  26210. "anyOf": [
  26211. {
  26212. "type": "object",
  26213. "properties": {
  26214. "type": {
  26215. "type": "string",
  26216. "enum": ["aisdk"]
  26217. },
  26218. "package": {
  26219. "type": "string"
  26220. },
  26221. "url": {
  26222. "type": "string"
  26223. },
  26224. "settings": {
  26225. "type": "object"
  26226. }
  26227. },
  26228. "required": ["type", "package"],
  26229. "additionalProperties": false
  26230. },
  26231. {
  26232. "type": "object",
  26233. "properties": {
  26234. "type": {
  26235. "type": "string",
  26236. "enum": ["native"]
  26237. },
  26238. "url": {
  26239. "type": "string"
  26240. },
  26241. "settings": {
  26242. "type": "object"
  26243. }
  26244. },
  26245. "required": ["type", "settings"],
  26246. "additionalProperties": false
  26247. }
  26248. ]
  26249. },
  26250. "request": {
  26251. "type": "object",
  26252. "properties": {
  26253. "headers": {
  26254. "type": "object",
  26255. "additionalProperties": {
  26256. "type": "string"
  26257. }
  26258. },
  26259. "body": {
  26260. "type": "object"
  26261. }
  26262. },
  26263. "required": ["headers", "body"],
  26264. "additionalProperties": false
  26265. }
  26266. },
  26267. "required": ["id", "name", "enabled", "env", "api", "request"],
  26268. "additionalProperties": false
  26269. },
  26270. "ConnectorWhen": {
  26271. "type": "object",
  26272. "properties": {
  26273. "key": {
  26274. "type": "string"
  26275. },
  26276. "op": {
  26277. "type": "string",
  26278. "enum": ["eq", "neq"]
  26279. },
  26280. "value": {
  26281. "type": "string"
  26282. }
  26283. },
  26284. "required": ["key", "op", "value"],
  26285. "additionalProperties": false
  26286. },
  26287. "ConnectorTextPrompt": {
  26288. "type": "object",
  26289. "properties": {
  26290. "type": {
  26291. "type": "string",
  26292. "enum": ["text"]
  26293. },
  26294. "key": {
  26295. "type": "string"
  26296. },
  26297. "message": {
  26298. "type": "string"
  26299. },
  26300. "placeholder": {
  26301. "type": "string"
  26302. },
  26303. "when": {
  26304. "$ref": "#/components/schemas/ConnectorWhen"
  26305. }
  26306. },
  26307. "required": ["type", "key", "message"],
  26308. "additionalProperties": false
  26309. },
  26310. "ConnectorSelectPrompt": {
  26311. "type": "object",
  26312. "properties": {
  26313. "type": {
  26314. "type": "string",
  26315. "enum": ["select"]
  26316. },
  26317. "key": {
  26318. "type": "string"
  26319. },
  26320. "message": {
  26321. "type": "string"
  26322. },
  26323. "options": {
  26324. "type": "array",
  26325. "items": {
  26326. "type": "object",
  26327. "properties": {
  26328. "label": {
  26329. "type": "string"
  26330. },
  26331. "value": {
  26332. "type": "string"
  26333. },
  26334. "hint": {
  26335. "type": "string"
  26336. }
  26337. },
  26338. "required": ["label", "value"],
  26339. "additionalProperties": false
  26340. }
  26341. },
  26342. "when": {
  26343. "$ref": "#/components/schemas/ConnectorWhen"
  26344. }
  26345. },
  26346. "required": ["type", "key", "message", "options"],
  26347. "additionalProperties": false
  26348. },
  26349. "ConnectorOAuthMethod": {
  26350. "type": "object",
  26351. "properties": {
  26352. "id": {
  26353. "type": "string"
  26354. },
  26355. "type": {
  26356. "type": "string",
  26357. "enum": ["oauth"]
  26358. },
  26359. "label": {
  26360. "type": "string"
  26361. },
  26362. "prompts": {
  26363. "type": "array",
  26364. "items": {
  26365. "anyOf": [
  26366. {
  26367. "$ref": "#/components/schemas/ConnectorTextPrompt"
  26368. },
  26369. {
  26370. "$ref": "#/components/schemas/ConnectorSelectPrompt"
  26371. }
  26372. ]
  26373. }
  26374. }
  26375. },
  26376. "required": ["id", "type", "label"],
  26377. "additionalProperties": false
  26378. },
  26379. "ConnectorKeyMethod": {
  26380. "type": "object",
  26381. "properties": {
  26382. "id": {
  26383. "type": "string"
  26384. },
  26385. "type": {
  26386. "type": "string",
  26387. "enum": ["key"]
  26388. },
  26389. "label": {
  26390. "type": "string"
  26391. },
  26392. "prompts": {
  26393. "type": "array",
  26394. "items": {
  26395. "anyOf": [
  26396. {
  26397. "$ref": "#/components/schemas/ConnectorTextPrompt"
  26398. },
  26399. {
  26400. "$ref": "#/components/schemas/ConnectorSelectPrompt"
  26401. }
  26402. ]
  26403. }
  26404. }
  26405. },
  26406. "required": ["id", "type", "label"],
  26407. "additionalProperties": false
  26408. },
  26409. "ConnectorInfo": {
  26410. "type": "object",
  26411. "properties": {
  26412. "id": {
  26413. "type": "string"
  26414. },
  26415. "name": {
  26416. "type": "string"
  26417. },
  26418. "methods": {
  26419. "type": "array",
  26420. "items": {
  26421. "anyOf": [
  26422. {
  26423. "$ref": "#/components/schemas/ConnectorOAuthMethod"
  26424. },
  26425. {
  26426. "$ref": "#/components/schemas/ConnectorKeyMethod"
  26427. }
  26428. ]
  26429. }
  26430. }
  26431. },
  26432. "required": ["id", "name", "methods"],
  26433. "additionalProperties": false
  26434. },
  26435. "ConnectorAttempt": {
  26436. "type": "object",
  26437. "properties": {
  26438. "attemptID": {
  26439. "type": "string"
  26440. },
  26441. "url": {
  26442. "type": "string"
  26443. },
  26444. "instructions": {
  26445. "type": "string"
  26446. },
  26447. "mode": {
  26448. "type": "string",
  26449. "enum": ["auto", "code"]
  26450. },
  26451. "time": {
  26452. "type": "object",
  26453. "properties": {
  26454. "created": {
  26455. "anyOf": [
  26456. {
  26457. "type": "number"
  26458. },
  26459. {
  26460. "type": "string",
  26461. "enum": ["NaN"]
  26462. },
  26463. {
  26464. "type": "string",
  26465. "enum": ["Infinity"]
  26466. },
  26467. {
  26468. "type": "string",
  26469. "enum": ["-Infinity"]
  26470. },
  26471. {
  26472. "type": "string",
  26473. "enum": ["Infinity", "-Infinity", "NaN"]
  26474. }
  26475. ]
  26476. },
  26477. "expires": {
  26478. "anyOf": [
  26479. {
  26480. "type": "number"
  26481. },
  26482. {
  26483. "type": "string",
  26484. "enum": ["NaN"]
  26485. },
  26486. {
  26487. "type": "string",
  26488. "enum": ["Infinity"]
  26489. },
  26490. {
  26491. "type": "string",
  26492. "enum": ["-Infinity"]
  26493. },
  26494. {
  26495. "type": "string",
  26496. "enum": ["Infinity", "-Infinity", "NaN"]
  26497. }
  26498. ]
  26499. }
  26500. },
  26501. "required": ["created", "expires"],
  26502. "additionalProperties": false
  26503. }
  26504. },
  26505. "required": ["attemptID", "url", "instructions", "mode", "time"],
  26506. "additionalProperties": false
  26507. },
  26508. "PermissionV2Request": {
  26509. "type": "object",
  26510. "properties": {
  26511. "id": {
  26512. "type": "string",
  26513. "pattern": "^per"
  26514. },
  26515. "sessionID": {
  26516. "type": "string",
  26517. "pattern": "^ses"
  26518. },
  26519. "action": {
  26520. "type": "string"
  26521. },
  26522. "resources": {
  26523. "type": "array",
  26524. "items": {
  26525. "type": "string"
  26526. }
  26527. },
  26528. "save": {
  26529. "type": "array",
  26530. "items": {
  26531. "type": "string"
  26532. }
  26533. },
  26534. "metadata": {
  26535. "type": "object"
  26536. },
  26537. "source": {
  26538. "$ref": "#/components/schemas/PermissionV2Source"
  26539. }
  26540. },
  26541. "required": ["id", "sessionID", "action", "resources"],
  26542. "additionalProperties": false
  26543. },
  26544. "PermissionSavedInfo": {
  26545. "type": "object",
  26546. "properties": {
  26547. "id": {
  26548. "type": "string"
  26549. },
  26550. "projectID": {
  26551. "type": "string"
  26552. },
  26553. "action": {
  26554. "type": "string"
  26555. },
  26556. "resource": {
  26557. "type": "string"
  26558. }
  26559. },
  26560. "required": ["id", "projectID", "action", "resource"],
  26561. "additionalProperties": false
  26562. },
  26563. "FileSystemContent": {
  26564. "type": "object",
  26565. "properties": {
  26566. "uri": {
  26567. "type": "string"
  26568. },
  26569. "name": {
  26570. "type": "string"
  26571. },
  26572. "content": {
  26573. "type": "string"
  26574. },
  26575. "encoding": {
  26576. "type": "string",
  26577. "enum": ["utf8", "base64"]
  26578. },
  26579. "mime": {
  26580. "type": "string"
  26581. }
  26582. },
  26583. "required": ["uri", "content", "encoding", "mime"],
  26584. "additionalProperties": false
  26585. },
  26586. "FileSystemEntry": {
  26587. "type": "object",
  26588. "properties": {
  26589. "path": {
  26590. "type": "string"
  26591. },
  26592. "type": {
  26593. "type": "string",
  26594. "enum": ["file", "directory"]
  26595. },
  26596. "mime": {
  26597. "type": "string"
  26598. }
  26599. },
  26600. "required": ["path", "type", "mime"],
  26601. "additionalProperties": false
  26602. },
  26603. "CommandV2Info": {
  26604. "type": "object",
  26605. "properties": {
  26606. "name": {
  26607. "type": "string"
  26608. },
  26609. "template": {
  26610. "type": "string"
  26611. },
  26612. "description": {
  26613. "type": "string"
  26614. },
  26615. "agent": {
  26616. "type": "string"
  26617. },
  26618. "model": {
  26619. "type": "object",
  26620. "properties": {
  26621. "id": {
  26622. "type": "string"
  26623. },
  26624. "providerID": {
  26625. "type": "string"
  26626. },
  26627. "variant": {
  26628. "type": "string"
  26629. }
  26630. },
  26631. "required": ["id", "providerID"],
  26632. "additionalProperties": false
  26633. },
  26634. "subtask": {
  26635. "type": "boolean"
  26636. }
  26637. },
  26638. "required": ["name", "template"],
  26639. "additionalProperties": false
  26640. },
  26641. "SkillV2Info": {
  26642. "type": "object",
  26643. "properties": {
  26644. "name": {
  26645. "type": "string"
  26646. },
  26647. "description": {
  26648. "type": "string"
  26649. },
  26650. "slash": {
  26651. "type": "boolean"
  26652. },
  26653. "location": {
  26654. "type": "string"
  26655. },
  26656. "content": {
  26657. "type": "string"
  26658. }
  26659. },
  26660. "required": ["name", "location", "content"],
  26661. "additionalProperties": false
  26662. },
  26663. "QuestionV2Request": {
  26664. "type": "object",
  26665. "properties": {
  26666. "id": {
  26667. "type": "string",
  26668. "pattern": "^que"
  26669. },
  26670. "sessionID": {
  26671. "type": "string",
  26672. "pattern": "^ses"
  26673. },
  26674. "questions": {
  26675. "type": "array",
  26676. "items": {
  26677. "$ref": "#/components/schemas/QuestionV2Info"
  26678. },
  26679. "description": "Questions to ask"
  26680. },
  26681. "tool": {
  26682. "$ref": "#/components/schemas/QuestionV2Tool"
  26683. }
  26684. },
  26685. "required": ["id", "sessionID", "questions"],
  26686. "additionalProperties": false
  26687. },
  26688. "QuestionV2Reply": {
  26689. "type": "object",
  26690. "properties": {
  26691. "answers": {
  26692. "type": "array",
  26693. "items": {
  26694. "$ref": "#/components/schemas/QuestionV2Answer"
  26695. },
  26696. "description": "User answers in order of questions (each answer is an array of selected labels)"
  26697. }
  26698. },
  26699. "required": ["answers"],
  26700. "additionalProperties": false
  26701. },
  26702. "ReferenceLocalSource": {
  26703. "type": "object",
  26704. "properties": {
  26705. "type": {
  26706. "type": "string",
  26707. "enum": ["local"]
  26708. },
  26709. "path": {
  26710. "type": "string"
  26711. },
  26712. "description": {
  26713. "type": "string"
  26714. },
  26715. "hidden": {
  26716. "type": "boolean"
  26717. }
  26718. },
  26719. "required": ["type", "path"],
  26720. "additionalProperties": false
  26721. },
  26722. "ReferenceGitSource": {
  26723. "type": "object",
  26724. "properties": {
  26725. "type": {
  26726. "type": "string",
  26727. "enum": ["git"]
  26728. },
  26729. "repository": {
  26730. "type": "string"
  26731. },
  26732. "branch": {
  26733. "type": "string"
  26734. },
  26735. "description": {
  26736. "type": "string"
  26737. },
  26738. "hidden": {
  26739. "type": "boolean"
  26740. }
  26741. },
  26742. "required": ["type", "repository"],
  26743. "additionalProperties": false
  26744. },
  26745. "ReferenceInfo": {
  26746. "type": "object",
  26747. "properties": {
  26748. "name": {
  26749. "type": "string"
  26750. },
  26751. "path": {
  26752. "type": "string"
  26753. },
  26754. "description": {
  26755. "type": "string"
  26756. },
  26757. "hidden": {
  26758. "type": "boolean"
  26759. },
  26760. "source": {
  26761. "anyOf": [
  26762. {
  26763. "$ref": "#/components/schemas/ReferenceLocalSource"
  26764. },
  26765. {
  26766. "$ref": "#/components/schemas/ReferenceGitSource"
  26767. }
  26768. ]
  26769. }
  26770. },
  26771. "required": ["name", "path", "source"],
  26772. "additionalProperties": false
  26773. },
  26774. "EventModels-devRefreshed": {
  26775. "type": "object",
  26776. "properties": {
  26777. "id": {
  26778. "type": "string",
  26779. "pattern": "^evt_"
  26780. },
  26781. "type": {
  26782. "type": "string",
  26783. "enum": ["models-dev.refreshed"]
  26784. },
  26785. "properties": {
  26786. "type": "object",
  26787. "properties": {}
  26788. }
  26789. },
  26790. "required": ["id", "type", "properties"],
  26791. "additionalProperties": false
  26792. },
  26793. "EventCredentialAdded": {
  26794. "type": "object",
  26795. "properties": {
  26796. "id": {
  26797. "type": "string",
  26798. "pattern": "^evt_"
  26799. },
  26800. "type": {
  26801. "type": "string",
  26802. "enum": ["credential.added"]
  26803. },
  26804. "properties": {
  26805. "type": "object",
  26806. "properties": {
  26807. "credential": {
  26808. "$ref": "#/components/schemas/CredentialInfo"
  26809. }
  26810. },
  26811. "required": ["credential"],
  26812. "additionalProperties": false
  26813. }
  26814. },
  26815. "required": ["id", "type", "properties"],
  26816. "additionalProperties": false
  26817. },
  26818. "EventCredentialRemoved": {
  26819. "type": "object",
  26820. "properties": {
  26821. "id": {
  26822. "type": "string",
  26823. "pattern": "^evt_"
  26824. },
  26825. "type": {
  26826. "type": "string",
  26827. "enum": ["credential.removed"]
  26828. },
  26829. "properties": {
  26830. "type": "object",
  26831. "properties": {
  26832. "credential": {
  26833. "$ref": "#/components/schemas/CredentialInfo"
  26834. }
  26835. },
  26836. "required": ["credential"],
  26837. "additionalProperties": false
  26838. }
  26839. },
  26840. "required": ["id", "type", "properties"],
  26841. "additionalProperties": false
  26842. },
  26843. "EventCredentialSwitched": {
  26844. "type": "object",
  26845. "properties": {
  26846. "id": {
  26847. "type": "string",
  26848. "pattern": "^evt_"
  26849. },
  26850. "type": {
  26851. "type": "string",
  26852. "enum": ["credential.switched"]
  26853. },
  26854. "properties": {
  26855. "type": "object",
  26856. "properties": {
  26857. "connectorID": {
  26858. "type": "string"
  26859. },
  26860. "from": {
  26861. "type": "string"
  26862. },
  26863. "to": {
  26864. "type": "string"
  26865. }
  26866. },
  26867. "required": ["connectorID"],
  26868. "additionalProperties": false
  26869. }
  26870. },
  26871. "required": ["id", "type", "properties"],
  26872. "additionalProperties": false
  26873. },
  26874. "EventPluginAdded": {
  26875. "type": "object",
  26876. "properties": {
  26877. "id": {
  26878. "type": "string",
  26879. "pattern": "^evt_"
  26880. },
  26881. "type": {
  26882. "type": "string",
  26883. "enum": ["plugin.added"]
  26884. },
  26885. "properties": {
  26886. "type": "object",
  26887. "properties": {
  26888. "id": {
  26889. "type": "string"
  26890. }
  26891. },
  26892. "required": ["id"],
  26893. "additionalProperties": false
  26894. }
  26895. },
  26896. "required": ["id", "type", "properties"],
  26897. "additionalProperties": false
  26898. },
  26899. "ModelV2Info1": {
  26900. "type": "object",
  26901. "properties": {
  26902. "id": {
  26903. "type": "string"
  26904. },
  26905. "providerID": {
  26906. "type": "string"
  26907. },
  26908. "family": {
  26909. "type": "string"
  26910. },
  26911. "name": {
  26912. "type": "string"
  26913. },
  26914. "api": {
  26915. "anyOf": [
  26916. {
  26917. "type": "object",
  26918. "properties": {
  26919. "id": {
  26920. "type": "string"
  26921. },
  26922. "type": {
  26923. "type": "string",
  26924. "enum": ["aisdk"]
  26925. },
  26926. "package": {
  26927. "type": "string"
  26928. },
  26929. "url": {
  26930. "type": "string"
  26931. },
  26932. "settings": {
  26933. "type": "object"
  26934. }
  26935. },
  26936. "required": ["id", "type", "package"],
  26937. "additionalProperties": false
  26938. },
  26939. {
  26940. "type": "object",
  26941. "properties": {
  26942. "id": {
  26943. "type": "string"
  26944. },
  26945. "type": {
  26946. "type": "string",
  26947. "enum": ["native"]
  26948. },
  26949. "url": {
  26950. "type": "string"
  26951. },
  26952. "settings": {
  26953. "type": "object"
  26954. }
  26955. },
  26956. "required": ["id", "type", "settings"],
  26957. "additionalProperties": false
  26958. }
  26959. ]
  26960. },
  26961. "capabilities": {
  26962. "type": "object",
  26963. "properties": {
  26964. "tools": {
  26965. "type": "boolean"
  26966. },
  26967. "input": {
  26968. "type": "array",
  26969. "items": {
  26970. "type": "string"
  26971. }
  26972. },
  26973. "output": {
  26974. "type": "array",
  26975. "items": {
  26976. "type": "string"
  26977. }
  26978. }
  26979. },
  26980. "required": ["tools", "input", "output"],
  26981. "additionalProperties": false
  26982. },
  26983. "request": {
  26984. "type": "object",
  26985. "properties": {
  26986. "headers": {
  26987. "type": "object",
  26988. "additionalProperties": {
  26989. "type": "string"
  26990. }
  26991. },
  26992. "body": {
  26993. "type": "object"
  26994. },
  26995. "generation": {
  26996. "type": "object",
  26997. "properties": {
  26998. "maxTokens": {
  26999. "anyOf": [
  27000. {
  27001. "type": "number"
  27002. },
  27003. {
  27004. "type": "string",
  27005. "enum": ["NaN"]
  27006. },
  27007. {
  27008. "type": "string",
  27009. "enum": ["Infinity"]
  27010. },
  27011. {
  27012. "type": "string",
  27013. "enum": ["-Infinity"]
  27014. }
  27015. ]
  27016. },
  27017. "temperature": {
  27018. "anyOf": [
  27019. {
  27020. "type": "number"
  27021. },
  27022. {
  27023. "type": "string",
  27024. "enum": ["NaN"]
  27025. },
  27026. {
  27027. "type": "string",
  27028. "enum": ["Infinity"]
  27029. },
  27030. {
  27031. "type": "string",
  27032. "enum": ["-Infinity"]
  27033. }
  27034. ]
  27035. },
  27036. "topP": {
  27037. "anyOf": [
  27038. {
  27039. "type": "number"
  27040. },
  27041. {
  27042. "type": "string",
  27043. "enum": ["NaN"]
  27044. },
  27045. {
  27046. "type": "string",
  27047. "enum": ["Infinity"]
  27048. },
  27049. {
  27050. "type": "string",
  27051. "enum": ["-Infinity"]
  27052. }
  27053. ]
  27054. },
  27055. "topK": {
  27056. "anyOf": [
  27057. {
  27058. "type": "number"
  27059. },
  27060. {
  27061. "type": "string",
  27062. "enum": ["NaN"]
  27063. },
  27064. {
  27065. "type": "string",
  27066. "enum": ["Infinity"]
  27067. },
  27068. {
  27069. "type": "string",
  27070. "enum": ["-Infinity"]
  27071. }
  27072. ]
  27073. },
  27074. "frequencyPenalty": {
  27075. "anyOf": [
  27076. {
  27077. "type": "number"
  27078. },
  27079. {
  27080. "type": "string",
  27081. "enum": ["NaN"]
  27082. },
  27083. {
  27084. "type": "string",
  27085. "enum": ["Infinity"]
  27086. },
  27087. {
  27088. "type": "string",
  27089. "enum": ["-Infinity"]
  27090. }
  27091. ]
  27092. },
  27093. "presencePenalty": {
  27094. "anyOf": [
  27095. {
  27096. "type": "number"
  27097. },
  27098. {
  27099. "type": "string",
  27100. "enum": ["NaN"]
  27101. },
  27102. {
  27103. "type": "string",
  27104. "enum": ["Infinity"]
  27105. },
  27106. {
  27107. "type": "string",
  27108. "enum": ["-Infinity"]
  27109. }
  27110. ]
  27111. },
  27112. "seed": {
  27113. "anyOf": [
  27114. {
  27115. "type": "number"
  27116. },
  27117. {
  27118. "type": "string",
  27119. "enum": ["NaN"]
  27120. },
  27121. {
  27122. "type": "string",
  27123. "enum": ["Infinity"]
  27124. },
  27125. {
  27126. "type": "string",
  27127. "enum": ["-Infinity"]
  27128. }
  27129. ]
  27130. },
  27131. "stop": {
  27132. "type": "array",
  27133. "items": {
  27134. "type": "string"
  27135. }
  27136. }
  27137. },
  27138. "additionalProperties": false
  27139. },
  27140. "options": {
  27141. "type": "object"
  27142. },
  27143. "variant": {
  27144. "type": "string"
  27145. }
  27146. },
  27147. "required": ["headers", "body"],
  27148. "additionalProperties": false
  27149. },
  27150. "variants": {
  27151. "type": "array",
  27152. "items": {
  27153. "type": "object",
  27154. "properties": {
  27155. "id": {
  27156. "type": "string"
  27157. },
  27158. "headers": {
  27159. "type": "object",
  27160. "additionalProperties": {
  27161. "type": "string"
  27162. }
  27163. },
  27164. "body": {
  27165. "type": "object"
  27166. },
  27167. "generation": {
  27168. "type": "object",
  27169. "properties": {
  27170. "maxTokens": {
  27171. "anyOf": [
  27172. {
  27173. "type": "number"
  27174. },
  27175. {
  27176. "type": "string",
  27177. "enum": ["NaN"]
  27178. },
  27179. {
  27180. "type": "string",
  27181. "enum": ["Infinity"]
  27182. },
  27183. {
  27184. "type": "string",
  27185. "enum": ["-Infinity"]
  27186. }
  27187. ]
  27188. },
  27189. "temperature": {
  27190. "anyOf": [
  27191. {
  27192. "type": "number"
  27193. },
  27194. {
  27195. "type": "string",
  27196. "enum": ["NaN"]
  27197. },
  27198. {
  27199. "type": "string",
  27200. "enum": ["Infinity"]
  27201. },
  27202. {
  27203. "type": "string",
  27204. "enum": ["-Infinity"]
  27205. }
  27206. ]
  27207. },
  27208. "topP": {
  27209. "anyOf": [
  27210. {
  27211. "type": "number"
  27212. },
  27213. {
  27214. "type": "string",
  27215. "enum": ["NaN"]
  27216. },
  27217. {
  27218. "type": "string",
  27219. "enum": ["Infinity"]
  27220. },
  27221. {
  27222. "type": "string",
  27223. "enum": ["-Infinity"]
  27224. }
  27225. ]
  27226. },
  27227. "topK": {
  27228. "anyOf": [
  27229. {
  27230. "type": "number"
  27231. },
  27232. {
  27233. "type": "string",
  27234. "enum": ["NaN"]
  27235. },
  27236. {
  27237. "type": "string",
  27238. "enum": ["Infinity"]
  27239. },
  27240. {
  27241. "type": "string",
  27242. "enum": ["-Infinity"]
  27243. }
  27244. ]
  27245. },
  27246. "frequencyPenalty": {
  27247. "anyOf": [
  27248. {
  27249. "type": "number"
  27250. },
  27251. {
  27252. "type": "string",
  27253. "enum": ["NaN"]
  27254. },
  27255. {
  27256. "type": "string",
  27257. "enum": ["Infinity"]
  27258. },
  27259. {
  27260. "type": "string",
  27261. "enum": ["-Infinity"]
  27262. }
  27263. ]
  27264. },
  27265. "presencePenalty": {
  27266. "anyOf": [
  27267. {
  27268. "type": "number"
  27269. },
  27270. {
  27271. "type": "string",
  27272. "enum": ["NaN"]
  27273. },
  27274. {
  27275. "type": "string",
  27276. "enum": ["Infinity"]
  27277. },
  27278. {
  27279. "type": "string",
  27280. "enum": ["-Infinity"]
  27281. }
  27282. ]
  27283. },
  27284. "seed": {
  27285. "anyOf": [
  27286. {
  27287. "type": "number"
  27288. },
  27289. {
  27290. "type": "string",
  27291. "enum": ["NaN"]
  27292. },
  27293. {
  27294. "type": "string",
  27295. "enum": ["Infinity"]
  27296. },
  27297. {
  27298. "type": "string",
  27299. "enum": ["-Infinity"]
  27300. }
  27301. ]
  27302. },
  27303. "stop": {
  27304. "type": "array",
  27305. "items": {
  27306. "type": "string"
  27307. }
  27308. }
  27309. },
  27310. "additionalProperties": false
  27311. },
  27312. "options": {
  27313. "type": "object"
  27314. }
  27315. },
  27316. "required": ["id", "headers", "body"],
  27317. "additionalProperties": false
  27318. }
  27319. },
  27320. "time": {
  27321. "type": "object",
  27322. "properties": {
  27323. "released": {
  27324. "anyOf": [
  27325. {
  27326. "type": "number"
  27327. },
  27328. {
  27329. "type": "string",
  27330. "enum": ["NaN"]
  27331. },
  27332. {
  27333. "type": "string",
  27334. "enum": ["Infinity"]
  27335. },
  27336. {
  27337. "type": "string",
  27338. "enum": ["-Infinity"]
  27339. }
  27340. ]
  27341. }
  27342. },
  27343. "required": ["released"],
  27344. "additionalProperties": false
  27345. },
  27346. "cost": {
  27347. "type": "array",
  27348. "items": {
  27349. "type": "object",
  27350. "properties": {
  27351. "tier": {
  27352. "type": "object",
  27353. "properties": {
  27354. "type": {
  27355. "type": "string",
  27356. "enum": ["context"]
  27357. },
  27358. "size": {
  27359. "type": "integer"
  27360. }
  27361. },
  27362. "required": ["type", "size"],
  27363. "additionalProperties": false
  27364. },
  27365. "input": {
  27366. "type": "number"
  27367. },
  27368. "output": {
  27369. "type": "number"
  27370. },
  27371. "cache": {
  27372. "type": "object",
  27373. "properties": {
  27374. "read": {
  27375. "type": "number"
  27376. },
  27377. "write": {
  27378. "type": "number"
  27379. }
  27380. },
  27381. "required": ["read", "write"],
  27382. "additionalProperties": false
  27383. }
  27384. },
  27385. "required": ["input", "output", "cache"],
  27386. "additionalProperties": false
  27387. }
  27388. },
  27389. "status": {
  27390. "type": "string",
  27391. "enum": ["alpha", "beta", "deprecated", "active"]
  27392. },
  27393. "enabled": {
  27394. "type": "boolean"
  27395. },
  27396. "limit": {
  27397. "type": "object",
  27398. "properties": {
  27399. "context": {
  27400. "type": "integer"
  27401. },
  27402. "input": {
  27403. "type": "integer"
  27404. },
  27405. "output": {
  27406. "type": "integer"
  27407. }
  27408. },
  27409. "required": ["context", "output"],
  27410. "additionalProperties": false
  27411. }
  27412. },
  27413. "required": [
  27414. "id",
  27415. "providerID",
  27416. "name",
  27417. "api",
  27418. "capabilities",
  27419. "request",
  27420. "variants",
  27421. "time",
  27422. "cost",
  27423. "status",
  27424. "enabled",
  27425. "limit"
  27426. ],
  27427. "additionalProperties": false
  27428. },
  27429. "EventCatalogModelUpdated": {
  27430. "type": "object",
  27431. "properties": {
  27432. "id": {
  27433. "type": "string",
  27434. "pattern": "^evt_"
  27435. },
  27436. "type": {
  27437. "type": "string",
  27438. "enum": ["catalog.model.updated"]
  27439. },
  27440. "properties": {
  27441. "type": "object",
  27442. "properties": {
  27443. "model": {
  27444. "$ref": "#/components/schemas/ModelV2Info1"
  27445. }
  27446. },
  27447. "required": ["model"],
  27448. "additionalProperties": false
  27449. }
  27450. },
  27451. "required": ["id", "type", "properties"],
  27452. "additionalProperties": false
  27453. },
  27454. "EventSessionCreated": {
  27455. "type": "object",
  27456. "properties": {
  27457. "id": {
  27458. "type": "string",
  27459. "pattern": "^evt_"
  27460. },
  27461. "type": {
  27462. "type": "string",
  27463. "enum": ["session.created"]
  27464. },
  27465. "properties": {
  27466. "type": "object",
  27467. "properties": {
  27468. "sessionID": {
  27469. "type": "string",
  27470. "pattern": "^ses"
  27471. },
  27472. "info": {
  27473. "$ref": "#/components/schemas/Session"
  27474. }
  27475. },
  27476. "required": ["sessionID", "info"],
  27477. "additionalProperties": false
  27478. }
  27479. },
  27480. "required": ["id", "type", "properties"],
  27481. "additionalProperties": false
  27482. },
  27483. "EventSessionUpdated": {
  27484. "type": "object",
  27485. "properties": {
  27486. "id": {
  27487. "type": "string",
  27488. "pattern": "^evt_"
  27489. },
  27490. "type": {
  27491. "type": "string",
  27492. "enum": ["session.updated"]
  27493. },
  27494. "properties": {
  27495. "type": "object",
  27496. "properties": {
  27497. "sessionID": {
  27498. "type": "string",
  27499. "pattern": "^ses"
  27500. },
  27501. "info": {
  27502. "$ref": "#/components/schemas/Session"
  27503. }
  27504. },
  27505. "required": ["sessionID", "info"],
  27506. "additionalProperties": false
  27507. }
  27508. },
  27509. "required": ["id", "type", "properties"],
  27510. "additionalProperties": false
  27511. },
  27512. "EventSessionDeleted": {
  27513. "type": "object",
  27514. "properties": {
  27515. "id": {
  27516. "type": "string",
  27517. "pattern": "^evt_"
  27518. },
  27519. "type": {
  27520. "type": "string",
  27521. "enum": ["session.deleted"]
  27522. },
  27523. "properties": {
  27524. "type": "object",
  27525. "properties": {
  27526. "sessionID": {
  27527. "type": "string",
  27528. "pattern": "^ses"
  27529. },
  27530. "info": {
  27531. "$ref": "#/components/schemas/Session"
  27532. }
  27533. },
  27534. "required": ["sessionID", "info"],
  27535. "additionalProperties": false
  27536. }
  27537. },
  27538. "required": ["id", "type", "properties"],
  27539. "additionalProperties": false
  27540. },
  27541. "EventMessageUpdated": {
  27542. "type": "object",
  27543. "properties": {
  27544. "id": {
  27545. "type": "string",
  27546. "pattern": "^evt_"
  27547. },
  27548. "type": {
  27549. "type": "string",
  27550. "enum": ["message.updated"]
  27551. },
  27552. "properties": {
  27553. "type": "object",
  27554. "properties": {
  27555. "sessionID": {
  27556. "type": "string",
  27557. "pattern": "^ses"
  27558. },
  27559. "info": {
  27560. "$ref": "#/components/schemas/Message"
  27561. }
  27562. },
  27563. "required": ["sessionID", "info"],
  27564. "additionalProperties": false
  27565. }
  27566. },
  27567. "required": ["id", "type", "properties"],
  27568. "additionalProperties": false
  27569. },
  27570. "EventMessageRemoved": {
  27571. "type": "object",
  27572. "properties": {
  27573. "id": {
  27574. "type": "string",
  27575. "pattern": "^evt_"
  27576. },
  27577. "type": {
  27578. "type": "string",
  27579. "enum": ["message.removed"]
  27580. },
  27581. "properties": {
  27582. "type": "object",
  27583. "properties": {
  27584. "sessionID": {
  27585. "type": "string",
  27586. "pattern": "^ses"
  27587. },
  27588. "messageID": {
  27589. "type": "string",
  27590. "pattern": "^msg"
  27591. }
  27592. },
  27593. "required": ["sessionID", "messageID"],
  27594. "additionalProperties": false
  27595. }
  27596. },
  27597. "required": ["id", "type", "properties"],
  27598. "additionalProperties": false
  27599. },
  27600. "EventMessagePartUpdated": {
  27601. "type": "object",
  27602. "properties": {
  27603. "id": {
  27604. "type": "string",
  27605. "pattern": "^evt_"
  27606. },
  27607. "type": {
  27608. "type": "string",
  27609. "enum": ["message.part.updated"]
  27610. },
  27611. "properties": {
  27612. "type": "object",
  27613. "properties": {
  27614. "sessionID": {
  27615. "type": "string",
  27616. "pattern": "^ses"
  27617. },
  27618. "part": {
  27619. "$ref": "#/components/schemas/Part"
  27620. },
  27621. "time": {
  27622. "type": "number"
  27623. }
  27624. },
  27625. "required": ["sessionID", "part", "time"],
  27626. "additionalProperties": false
  27627. }
  27628. },
  27629. "required": ["id", "type", "properties"],
  27630. "additionalProperties": false
  27631. },
  27632. "EventMessagePartRemoved": {
  27633. "type": "object",
  27634. "properties": {
  27635. "id": {
  27636. "type": "string",
  27637. "pattern": "^evt_"
  27638. },
  27639. "type": {
  27640. "type": "string",
  27641. "enum": ["message.part.removed"]
  27642. },
  27643. "properties": {
  27644. "type": "object",
  27645. "properties": {
  27646. "sessionID": {
  27647. "type": "string",
  27648. "pattern": "^ses"
  27649. },
  27650. "messageID": {
  27651. "type": "string",
  27652. "pattern": "^msg"
  27653. },
  27654. "partID": {
  27655. "type": "string",
  27656. "pattern": "^prt"
  27657. }
  27658. },
  27659. "required": ["sessionID", "messageID", "partID"],
  27660. "additionalProperties": false
  27661. }
  27662. },
  27663. "required": ["id", "type", "properties"],
  27664. "additionalProperties": false
  27665. },
  27666. "EventSessionNextAgentSwitched": {
  27667. "type": "object",
  27668. "properties": {
  27669. "id": {
  27670. "type": "string",
  27671. "pattern": "^evt_"
  27672. },
  27673. "type": {
  27674. "type": "string",
  27675. "enum": ["session.next.agent.switched"]
  27676. },
  27677. "properties": {
  27678. "type": "object",
  27679. "properties": {
  27680. "timestamp": {
  27681. "type": "number"
  27682. },
  27683. "sessionID": {
  27684. "type": "string",
  27685. "pattern": "^ses"
  27686. },
  27687. "messageID": {
  27688. "type": "string",
  27689. "pattern": "^msg_"
  27690. },
  27691. "agent": {
  27692. "type": "string"
  27693. }
  27694. },
  27695. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27696. "additionalProperties": false
  27697. }
  27698. },
  27699. "required": ["id", "type", "properties"],
  27700. "additionalProperties": false
  27701. },
  27702. "EventSessionNextModelSwitched": {
  27703. "type": "object",
  27704. "properties": {
  27705. "id": {
  27706. "type": "string",
  27707. "pattern": "^evt_"
  27708. },
  27709. "type": {
  27710. "type": "string",
  27711. "enum": ["session.next.model.switched"]
  27712. },
  27713. "properties": {
  27714. "type": "object",
  27715. "properties": {
  27716. "timestamp": {
  27717. "type": "number"
  27718. },
  27719. "sessionID": {
  27720. "type": "string",
  27721. "pattern": "^ses"
  27722. },
  27723. "messageID": {
  27724. "type": "string",
  27725. "pattern": "^msg_"
  27726. },
  27727. "model": {
  27728. "type": "object",
  27729. "properties": {
  27730. "id": {
  27731. "type": "string"
  27732. },
  27733. "providerID": {
  27734. "type": "string"
  27735. },
  27736. "variant": {
  27737. "type": "string"
  27738. }
  27739. },
  27740. "required": ["id", "providerID"],
  27741. "additionalProperties": false
  27742. }
  27743. },
  27744. "required": ["timestamp", "sessionID", "messageID", "model"],
  27745. "additionalProperties": false
  27746. }
  27747. },
  27748. "required": ["id", "type", "properties"],
  27749. "additionalProperties": false
  27750. },
  27751. "EventSessionNextMoved": {
  27752. "type": "object",
  27753. "properties": {
  27754. "id": {
  27755. "type": "string",
  27756. "pattern": "^evt_"
  27757. },
  27758. "type": {
  27759. "type": "string",
  27760. "enum": ["session.next.moved"]
  27761. },
  27762. "properties": {
  27763. "type": "object",
  27764. "properties": {
  27765. "timestamp": {
  27766. "type": "number"
  27767. },
  27768. "sessionID": {
  27769. "type": "string",
  27770. "pattern": "^ses"
  27771. },
  27772. "location": {
  27773. "$ref": "#/components/schemas/LocationRef"
  27774. },
  27775. "subdirectory": {
  27776. "type": "string"
  27777. }
  27778. },
  27779. "required": ["timestamp", "sessionID", "location"],
  27780. "additionalProperties": false
  27781. }
  27782. },
  27783. "required": ["id", "type", "properties"],
  27784. "additionalProperties": false
  27785. },
  27786. "EventSessionNextPrompted": {
  27787. "type": "object",
  27788. "properties": {
  27789. "id": {
  27790. "type": "string",
  27791. "pattern": "^evt_"
  27792. },
  27793. "type": {
  27794. "type": "string",
  27795. "enum": ["session.next.prompted"]
  27796. },
  27797. "properties": {
  27798. "type": "object",
  27799. "properties": {
  27800. "timestamp": {
  27801. "type": "number"
  27802. },
  27803. "sessionID": {
  27804. "type": "string",
  27805. "pattern": "^ses"
  27806. },
  27807. "messageID": {
  27808. "type": "string",
  27809. "pattern": "^msg_"
  27810. },
  27811. "prompt": {
  27812. "$ref": "#/components/schemas/Prompt"
  27813. },
  27814. "delivery": {
  27815. "type": "string",
  27816. "enum": ["steer", "queue"]
  27817. }
  27818. },
  27819. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27820. "additionalProperties": false
  27821. }
  27822. },
  27823. "required": ["id", "type", "properties"],
  27824. "additionalProperties": false
  27825. },
  27826. "EventSessionNextPromptAdmitted": {
  27827. "type": "object",
  27828. "properties": {
  27829. "id": {
  27830. "type": "string",
  27831. "pattern": "^evt_"
  27832. },
  27833. "type": {
  27834. "type": "string",
  27835. "enum": ["session.next.prompt.admitted"]
  27836. },
  27837. "properties": {
  27838. "type": "object",
  27839. "properties": {
  27840. "timestamp": {
  27841. "type": "number"
  27842. },
  27843. "sessionID": {
  27844. "type": "string",
  27845. "pattern": "^ses"
  27846. },
  27847. "messageID": {
  27848. "type": "string",
  27849. "pattern": "^msg_"
  27850. },
  27851. "prompt": {
  27852. "$ref": "#/components/schemas/Prompt"
  27853. },
  27854. "delivery": {
  27855. "type": "string",
  27856. "enum": ["steer", "queue"]
  27857. }
  27858. },
  27859. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27860. "additionalProperties": false
  27861. }
  27862. },
  27863. "required": ["id", "type", "properties"],
  27864. "additionalProperties": false
  27865. },
  27866. "EventSessionNextPromptPromoted": {
  27867. "type": "object",
  27868. "properties": {
  27869. "id": {
  27870. "type": "string",
  27871. "pattern": "^evt_"
  27872. },
  27873. "type": {
  27874. "type": "string",
  27875. "enum": ["session.next.prompt.promoted"]
  27876. },
  27877. "properties": {
  27878. "type": "object",
  27879. "properties": {
  27880. "timestamp": {
  27881. "type": "number"
  27882. },
  27883. "sessionID": {
  27884. "type": "string",
  27885. "pattern": "^ses"
  27886. },
  27887. "messageID": {
  27888. "type": "string",
  27889. "pattern": "^msg_"
  27890. },
  27891. "prompt": {
  27892. "$ref": "#/components/schemas/Prompt"
  27893. },
  27894. "timeCreated": {
  27895. "type": "number"
  27896. }
  27897. },
  27898. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  27899. "additionalProperties": false
  27900. }
  27901. },
  27902. "required": ["id", "type", "properties"],
  27903. "additionalProperties": false
  27904. },
  27905. "EventSessionNextInterruptRequested": {
  27906. "type": "object",
  27907. "properties": {
  27908. "id": {
  27909. "type": "string",
  27910. "pattern": "^evt_"
  27911. },
  27912. "type": {
  27913. "type": "string",
  27914. "enum": ["session.next.interrupt.requested"]
  27915. },
  27916. "properties": {
  27917. "type": "object",
  27918. "properties": {
  27919. "timestamp": {
  27920. "type": "number"
  27921. },
  27922. "sessionID": {
  27923. "type": "string",
  27924. "pattern": "^ses"
  27925. }
  27926. },
  27927. "required": ["timestamp", "sessionID"],
  27928. "additionalProperties": false
  27929. }
  27930. },
  27931. "required": ["id", "type", "properties"],
  27932. "additionalProperties": false
  27933. },
  27934. "EventSessionNextContextUpdated": {
  27935. "type": "object",
  27936. "properties": {
  27937. "id": {
  27938. "type": "string",
  27939. "pattern": "^evt_"
  27940. },
  27941. "type": {
  27942. "type": "string",
  27943. "enum": ["session.next.context.updated"]
  27944. },
  27945. "properties": {
  27946. "type": "object",
  27947. "properties": {
  27948. "timestamp": {
  27949. "type": "number"
  27950. },
  27951. "sessionID": {
  27952. "type": "string",
  27953. "pattern": "^ses"
  27954. },
  27955. "messageID": {
  27956. "type": "string",
  27957. "pattern": "^msg_"
  27958. },
  27959. "text": {
  27960. "type": "string"
  27961. }
  27962. },
  27963. "required": ["timestamp", "sessionID", "messageID", "text"],
  27964. "additionalProperties": false
  27965. }
  27966. },
  27967. "required": ["id", "type", "properties"],
  27968. "additionalProperties": false
  27969. },
  27970. "EventSessionNextSynthetic": {
  27971. "type": "object",
  27972. "properties": {
  27973. "id": {
  27974. "type": "string",
  27975. "pattern": "^evt_"
  27976. },
  27977. "type": {
  27978. "type": "string",
  27979. "enum": ["session.next.synthetic"]
  27980. },
  27981. "properties": {
  27982. "type": "object",
  27983. "properties": {
  27984. "timestamp": {
  27985. "type": "number"
  27986. },
  27987. "sessionID": {
  27988. "type": "string",
  27989. "pattern": "^ses"
  27990. },
  27991. "messageID": {
  27992. "type": "string",
  27993. "pattern": "^msg_"
  27994. },
  27995. "text": {
  27996. "type": "string"
  27997. }
  27998. },
  27999. "required": ["timestamp", "sessionID", "messageID", "text"],
  28000. "additionalProperties": false
  28001. }
  28002. },
  28003. "required": ["id", "type", "properties"],
  28004. "additionalProperties": false
  28005. },
  28006. "EventSessionNextShellStarted": {
  28007. "type": "object",
  28008. "properties": {
  28009. "id": {
  28010. "type": "string",
  28011. "pattern": "^evt_"
  28012. },
  28013. "type": {
  28014. "type": "string",
  28015. "enum": ["session.next.shell.started"]
  28016. },
  28017. "properties": {
  28018. "type": "object",
  28019. "properties": {
  28020. "timestamp": {
  28021. "type": "number"
  28022. },
  28023. "sessionID": {
  28024. "type": "string",
  28025. "pattern": "^ses"
  28026. },
  28027. "messageID": {
  28028. "type": "string",
  28029. "pattern": "^msg_"
  28030. },
  28031. "callID": {
  28032. "type": "string"
  28033. },
  28034. "command": {
  28035. "type": "string"
  28036. }
  28037. },
  28038. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28039. "additionalProperties": false
  28040. }
  28041. },
  28042. "required": ["id", "type", "properties"],
  28043. "additionalProperties": false
  28044. },
  28045. "EventSessionNextShellEnded": {
  28046. "type": "object",
  28047. "properties": {
  28048. "id": {
  28049. "type": "string",
  28050. "pattern": "^evt_"
  28051. },
  28052. "type": {
  28053. "type": "string",
  28054. "enum": ["session.next.shell.ended"]
  28055. },
  28056. "properties": {
  28057. "type": "object",
  28058. "properties": {
  28059. "timestamp": {
  28060. "type": "number"
  28061. },
  28062. "sessionID": {
  28063. "type": "string",
  28064. "pattern": "^ses"
  28065. },
  28066. "callID": {
  28067. "type": "string"
  28068. },
  28069. "output": {
  28070. "type": "string"
  28071. }
  28072. },
  28073. "required": ["timestamp", "sessionID", "callID", "output"],
  28074. "additionalProperties": false
  28075. }
  28076. },
  28077. "required": ["id", "type", "properties"],
  28078. "additionalProperties": false
  28079. },
  28080. "EventSessionNextStepStarted": {
  28081. "type": "object",
  28082. "properties": {
  28083. "id": {
  28084. "type": "string",
  28085. "pattern": "^evt_"
  28086. },
  28087. "type": {
  28088. "type": "string",
  28089. "enum": ["session.next.step.started"]
  28090. },
  28091. "properties": {
  28092. "type": "object",
  28093. "properties": {
  28094. "timestamp": {
  28095. "type": "number"
  28096. },
  28097. "sessionID": {
  28098. "type": "string",
  28099. "pattern": "^ses"
  28100. },
  28101. "assistantMessageID": {
  28102. "type": "string",
  28103. "pattern": "^msg_"
  28104. },
  28105. "agent": {
  28106. "type": "string"
  28107. },
  28108. "model": {
  28109. "type": "object",
  28110. "properties": {
  28111. "id": {
  28112. "type": "string"
  28113. },
  28114. "providerID": {
  28115. "type": "string"
  28116. },
  28117. "variant": {
  28118. "type": "string"
  28119. }
  28120. },
  28121. "required": ["id", "providerID"],
  28122. "additionalProperties": false
  28123. },
  28124. "snapshot": {
  28125. "type": "string"
  28126. }
  28127. },
  28128. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28129. "additionalProperties": false
  28130. }
  28131. },
  28132. "required": ["id", "type", "properties"],
  28133. "additionalProperties": false
  28134. },
  28135. "EventSessionNextStepEnded": {
  28136. "type": "object",
  28137. "properties": {
  28138. "id": {
  28139. "type": "string",
  28140. "pattern": "^evt_"
  28141. },
  28142. "type": {
  28143. "type": "string",
  28144. "enum": ["session.next.step.ended"]
  28145. },
  28146. "properties": {
  28147. "type": "object",
  28148. "properties": {
  28149. "timestamp": {
  28150. "type": "number"
  28151. },
  28152. "sessionID": {
  28153. "type": "string",
  28154. "pattern": "^ses"
  28155. },
  28156. "assistantMessageID": {
  28157. "type": "string",
  28158. "pattern": "^msg_"
  28159. },
  28160. "finish": {
  28161. "type": "string"
  28162. },
  28163. "cost": {
  28164. "type": "number"
  28165. },
  28166. "tokens": {
  28167. "type": "object",
  28168. "properties": {
  28169. "input": {
  28170. "type": "number"
  28171. },
  28172. "output": {
  28173. "type": "number"
  28174. },
  28175. "reasoning": {
  28176. "type": "number"
  28177. },
  28178. "cache": {
  28179. "type": "object",
  28180. "properties": {
  28181. "read": {
  28182. "type": "number"
  28183. },
  28184. "write": {
  28185. "type": "number"
  28186. }
  28187. },
  28188. "required": ["read", "write"],
  28189. "additionalProperties": false
  28190. }
  28191. },
  28192. "required": ["input", "output", "reasoning", "cache"],
  28193. "additionalProperties": false
  28194. },
  28195. "snapshot": {
  28196. "type": "string"
  28197. }
  28198. },
  28199. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28200. "additionalProperties": false
  28201. }
  28202. },
  28203. "required": ["id", "type", "properties"],
  28204. "additionalProperties": false
  28205. },
  28206. "EventSessionNextStepFailed": {
  28207. "type": "object",
  28208. "properties": {
  28209. "id": {
  28210. "type": "string",
  28211. "pattern": "^evt_"
  28212. },
  28213. "type": {
  28214. "type": "string",
  28215. "enum": ["session.next.step.failed"]
  28216. },
  28217. "properties": {
  28218. "type": "object",
  28219. "properties": {
  28220. "timestamp": {
  28221. "type": "number"
  28222. },
  28223. "sessionID": {
  28224. "type": "string",
  28225. "pattern": "^ses"
  28226. },
  28227. "assistantMessageID": {
  28228. "type": "string",
  28229. "pattern": "^msg_"
  28230. },
  28231. "error": {
  28232. "$ref": "#/components/schemas/SessionErrorUnknown"
  28233. }
  28234. },
  28235. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28236. "additionalProperties": false
  28237. }
  28238. },
  28239. "required": ["id", "type", "properties"],
  28240. "additionalProperties": false
  28241. },
  28242. "EventSessionNextTextStarted": {
  28243. "type": "object",
  28244. "properties": {
  28245. "id": {
  28246. "type": "string",
  28247. "pattern": "^evt_"
  28248. },
  28249. "type": {
  28250. "type": "string",
  28251. "enum": ["session.next.text.started"]
  28252. },
  28253. "properties": {
  28254. "type": "object",
  28255. "properties": {
  28256. "timestamp": {
  28257. "type": "number"
  28258. },
  28259. "sessionID": {
  28260. "type": "string",
  28261. "pattern": "^ses"
  28262. },
  28263. "assistantMessageID": {
  28264. "type": "string",
  28265. "pattern": "^msg_"
  28266. },
  28267. "textID": {
  28268. "type": "string"
  28269. }
  28270. },
  28271. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28272. "additionalProperties": false
  28273. }
  28274. },
  28275. "required": ["id", "type", "properties"],
  28276. "additionalProperties": false
  28277. },
  28278. "EventSessionNextTextDelta": {
  28279. "type": "object",
  28280. "properties": {
  28281. "id": {
  28282. "type": "string",
  28283. "pattern": "^evt_"
  28284. },
  28285. "type": {
  28286. "type": "string",
  28287. "enum": ["session.next.text.delta"]
  28288. },
  28289. "properties": {
  28290. "type": "object",
  28291. "properties": {
  28292. "timestamp": {
  28293. "type": "number"
  28294. },
  28295. "sessionID": {
  28296. "type": "string",
  28297. "pattern": "^ses"
  28298. },
  28299. "assistantMessageID": {
  28300. "type": "string",
  28301. "pattern": "^msg_"
  28302. },
  28303. "textID": {
  28304. "type": "string"
  28305. },
  28306. "delta": {
  28307. "type": "string"
  28308. }
  28309. },
  28310. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28311. "additionalProperties": false
  28312. }
  28313. },
  28314. "required": ["id", "type", "properties"],
  28315. "additionalProperties": false
  28316. },
  28317. "EventSessionNextTextEnded": {
  28318. "type": "object",
  28319. "properties": {
  28320. "id": {
  28321. "type": "string",
  28322. "pattern": "^evt_"
  28323. },
  28324. "type": {
  28325. "type": "string",
  28326. "enum": ["session.next.text.ended"]
  28327. },
  28328. "properties": {
  28329. "type": "object",
  28330. "properties": {
  28331. "timestamp": {
  28332. "type": "number"
  28333. },
  28334. "sessionID": {
  28335. "type": "string",
  28336. "pattern": "^ses"
  28337. },
  28338. "assistantMessageID": {
  28339. "type": "string",
  28340. "pattern": "^msg_"
  28341. },
  28342. "textID": {
  28343. "type": "string"
  28344. },
  28345. "text": {
  28346. "type": "string"
  28347. }
  28348. },
  28349. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28350. "additionalProperties": false
  28351. }
  28352. },
  28353. "required": ["id", "type", "properties"],
  28354. "additionalProperties": false
  28355. },
  28356. "EventSessionNextReasoningStarted": {
  28357. "type": "object",
  28358. "properties": {
  28359. "id": {
  28360. "type": "string",
  28361. "pattern": "^evt_"
  28362. },
  28363. "type": {
  28364. "type": "string",
  28365. "enum": ["session.next.reasoning.started"]
  28366. },
  28367. "properties": {
  28368. "type": "object",
  28369. "properties": {
  28370. "timestamp": {
  28371. "type": "number"
  28372. },
  28373. "sessionID": {
  28374. "type": "string",
  28375. "pattern": "^ses"
  28376. },
  28377. "assistantMessageID": {
  28378. "type": "string",
  28379. "pattern": "^msg_"
  28380. },
  28381. "reasoningID": {
  28382. "type": "string"
  28383. },
  28384. "providerMetadata": {
  28385. "type": "object",
  28386. "additionalProperties": {
  28387. "type": "object"
  28388. }
  28389. }
  28390. },
  28391. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28392. "additionalProperties": false
  28393. }
  28394. },
  28395. "required": ["id", "type", "properties"],
  28396. "additionalProperties": false
  28397. },
  28398. "EventSessionNextReasoningDelta": {
  28399. "type": "object",
  28400. "properties": {
  28401. "id": {
  28402. "type": "string",
  28403. "pattern": "^evt_"
  28404. },
  28405. "type": {
  28406. "type": "string",
  28407. "enum": ["session.next.reasoning.delta"]
  28408. },
  28409. "properties": {
  28410. "type": "object",
  28411. "properties": {
  28412. "timestamp": {
  28413. "type": "number"
  28414. },
  28415. "sessionID": {
  28416. "type": "string",
  28417. "pattern": "^ses"
  28418. },
  28419. "assistantMessageID": {
  28420. "type": "string",
  28421. "pattern": "^msg_"
  28422. },
  28423. "reasoningID": {
  28424. "type": "string"
  28425. },
  28426. "delta": {
  28427. "type": "string"
  28428. }
  28429. },
  28430. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28431. "additionalProperties": false
  28432. }
  28433. },
  28434. "required": ["id", "type", "properties"],
  28435. "additionalProperties": false
  28436. },
  28437. "EventSessionNextReasoningEnded": {
  28438. "type": "object",
  28439. "properties": {
  28440. "id": {
  28441. "type": "string",
  28442. "pattern": "^evt_"
  28443. },
  28444. "type": {
  28445. "type": "string",
  28446. "enum": ["session.next.reasoning.ended"]
  28447. },
  28448. "properties": {
  28449. "type": "object",
  28450. "properties": {
  28451. "timestamp": {
  28452. "type": "number"
  28453. },
  28454. "sessionID": {
  28455. "type": "string",
  28456. "pattern": "^ses"
  28457. },
  28458. "assistantMessageID": {
  28459. "type": "string",
  28460. "pattern": "^msg_"
  28461. },
  28462. "reasoningID": {
  28463. "type": "string"
  28464. },
  28465. "text": {
  28466. "type": "string"
  28467. },
  28468. "providerMetadata": {
  28469. "type": "object",
  28470. "additionalProperties": {
  28471. "type": "object"
  28472. }
  28473. }
  28474. },
  28475. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28476. "additionalProperties": false
  28477. }
  28478. },
  28479. "required": ["id", "type", "properties"],
  28480. "additionalProperties": false
  28481. },
  28482. "EventSessionNextToolInputStarted": {
  28483. "type": "object",
  28484. "properties": {
  28485. "id": {
  28486. "type": "string",
  28487. "pattern": "^evt_"
  28488. },
  28489. "type": {
  28490. "type": "string",
  28491. "enum": ["session.next.tool.input.started"]
  28492. },
  28493. "properties": {
  28494. "type": "object",
  28495. "properties": {
  28496. "timestamp": {
  28497. "type": "number"
  28498. },
  28499. "sessionID": {
  28500. "type": "string",
  28501. "pattern": "^ses"
  28502. },
  28503. "assistantMessageID": {
  28504. "type": "string",
  28505. "pattern": "^msg_"
  28506. },
  28507. "callID": {
  28508. "type": "string"
  28509. },
  28510. "name": {
  28511. "type": "string"
  28512. }
  28513. },
  28514. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28515. "additionalProperties": false
  28516. }
  28517. },
  28518. "required": ["id", "type", "properties"],
  28519. "additionalProperties": false
  28520. },
  28521. "EventSessionNextToolInputDelta": {
  28522. "type": "object",
  28523. "properties": {
  28524. "id": {
  28525. "type": "string",
  28526. "pattern": "^evt_"
  28527. },
  28528. "type": {
  28529. "type": "string",
  28530. "enum": ["session.next.tool.input.delta"]
  28531. },
  28532. "properties": {
  28533. "type": "object",
  28534. "properties": {
  28535. "timestamp": {
  28536. "type": "number"
  28537. },
  28538. "sessionID": {
  28539. "type": "string",
  28540. "pattern": "^ses"
  28541. },
  28542. "assistantMessageID": {
  28543. "type": "string",
  28544. "pattern": "^msg_"
  28545. },
  28546. "callID": {
  28547. "type": "string"
  28548. },
  28549. "delta": {
  28550. "type": "string"
  28551. }
  28552. },
  28553. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28554. "additionalProperties": false
  28555. }
  28556. },
  28557. "required": ["id", "type", "properties"],
  28558. "additionalProperties": false
  28559. },
  28560. "EventSessionNextToolInputEnded": {
  28561. "type": "object",
  28562. "properties": {
  28563. "id": {
  28564. "type": "string",
  28565. "pattern": "^evt_"
  28566. },
  28567. "type": {
  28568. "type": "string",
  28569. "enum": ["session.next.tool.input.ended"]
  28570. },
  28571. "properties": {
  28572. "type": "object",
  28573. "properties": {
  28574. "timestamp": {
  28575. "type": "number"
  28576. },
  28577. "sessionID": {
  28578. "type": "string",
  28579. "pattern": "^ses"
  28580. },
  28581. "assistantMessageID": {
  28582. "type": "string",
  28583. "pattern": "^msg_"
  28584. },
  28585. "callID": {
  28586. "type": "string"
  28587. },
  28588. "text": {
  28589. "type": "string"
  28590. }
  28591. },
  28592. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28593. "additionalProperties": false
  28594. }
  28595. },
  28596. "required": ["id", "type", "properties"],
  28597. "additionalProperties": false
  28598. },
  28599. "EventSessionNextToolCalled": {
  28600. "type": "object",
  28601. "properties": {
  28602. "id": {
  28603. "type": "string",
  28604. "pattern": "^evt_"
  28605. },
  28606. "type": {
  28607. "type": "string",
  28608. "enum": ["session.next.tool.called"]
  28609. },
  28610. "properties": {
  28611. "type": "object",
  28612. "properties": {
  28613. "timestamp": {
  28614. "type": "number"
  28615. },
  28616. "sessionID": {
  28617. "type": "string",
  28618. "pattern": "^ses"
  28619. },
  28620. "assistantMessageID": {
  28621. "type": "string",
  28622. "pattern": "^msg_"
  28623. },
  28624. "callID": {
  28625. "type": "string"
  28626. },
  28627. "tool": {
  28628. "type": "string"
  28629. },
  28630. "input": {
  28631. "type": "object"
  28632. },
  28633. "provider": {
  28634. "type": "object",
  28635. "properties": {
  28636. "executed": {
  28637. "type": "boolean"
  28638. },
  28639. "metadata": {
  28640. "type": "object",
  28641. "additionalProperties": {
  28642. "type": "object"
  28643. }
  28644. }
  28645. },
  28646. "required": ["executed"],
  28647. "additionalProperties": false
  28648. }
  28649. },
  28650. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28651. "additionalProperties": false
  28652. }
  28653. },
  28654. "required": ["id", "type", "properties"],
  28655. "additionalProperties": false
  28656. },
  28657. "EventSessionNextToolProgress": {
  28658. "type": "object",
  28659. "properties": {
  28660. "id": {
  28661. "type": "string",
  28662. "pattern": "^evt_"
  28663. },
  28664. "type": {
  28665. "type": "string",
  28666. "enum": ["session.next.tool.progress"]
  28667. },
  28668. "properties": {
  28669. "type": "object",
  28670. "properties": {
  28671. "timestamp": {
  28672. "type": "number"
  28673. },
  28674. "sessionID": {
  28675. "type": "string",
  28676. "pattern": "^ses"
  28677. },
  28678. "assistantMessageID": {
  28679. "type": "string",
  28680. "pattern": "^msg_"
  28681. },
  28682. "callID": {
  28683. "type": "string"
  28684. },
  28685. "structured": {
  28686. "type": "object"
  28687. },
  28688. "content": {
  28689. "type": "array",
  28690. "items": {
  28691. "anyOf": [
  28692. {
  28693. "$ref": "#/components/schemas/ToolTextContent"
  28694. },
  28695. {
  28696. "$ref": "#/components/schemas/ToolFileContent"
  28697. }
  28698. ]
  28699. }
  28700. }
  28701. },
  28702. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28703. "additionalProperties": false
  28704. }
  28705. },
  28706. "required": ["id", "type", "properties"],
  28707. "additionalProperties": false
  28708. },
  28709. "EventSessionNextToolSuccess": {
  28710. "type": "object",
  28711. "properties": {
  28712. "id": {
  28713. "type": "string",
  28714. "pattern": "^evt_"
  28715. },
  28716. "type": {
  28717. "type": "string",
  28718. "enum": ["session.next.tool.success"]
  28719. },
  28720. "properties": {
  28721. "type": "object",
  28722. "properties": {
  28723. "timestamp": {
  28724. "type": "number"
  28725. },
  28726. "sessionID": {
  28727. "type": "string",
  28728. "pattern": "^ses"
  28729. },
  28730. "assistantMessageID": {
  28731. "type": "string",
  28732. "pattern": "^msg_"
  28733. },
  28734. "callID": {
  28735. "type": "string"
  28736. },
  28737. "structured": {
  28738. "type": "object"
  28739. },
  28740. "content": {
  28741. "type": "array",
  28742. "items": {
  28743. "anyOf": [
  28744. {
  28745. "$ref": "#/components/schemas/ToolTextContent"
  28746. },
  28747. {
  28748. "$ref": "#/components/schemas/ToolFileContent"
  28749. }
  28750. ]
  28751. }
  28752. },
  28753. "outputPaths": {
  28754. "type": "array",
  28755. "items": {
  28756. "type": "string"
  28757. }
  28758. },
  28759. "result": {},
  28760. "provider": {
  28761. "type": "object",
  28762. "properties": {
  28763. "executed": {
  28764. "type": "boolean"
  28765. },
  28766. "metadata": {
  28767. "type": "object",
  28768. "additionalProperties": {
  28769. "type": "object"
  28770. }
  28771. }
  28772. },
  28773. "required": ["executed"],
  28774. "additionalProperties": false
  28775. }
  28776. },
  28777. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  28778. "additionalProperties": false
  28779. }
  28780. },
  28781. "required": ["id", "type", "properties"],
  28782. "additionalProperties": false
  28783. },
  28784. "EventSessionNextToolFailed": {
  28785. "type": "object",
  28786. "properties": {
  28787. "id": {
  28788. "type": "string",
  28789. "pattern": "^evt_"
  28790. },
  28791. "type": {
  28792. "type": "string",
  28793. "enum": ["session.next.tool.failed"]
  28794. },
  28795. "properties": {
  28796. "type": "object",
  28797. "properties": {
  28798. "timestamp": {
  28799. "type": "number"
  28800. },
  28801. "sessionID": {
  28802. "type": "string",
  28803. "pattern": "^ses"
  28804. },
  28805. "assistantMessageID": {
  28806. "type": "string",
  28807. "pattern": "^msg_"
  28808. },
  28809. "callID": {
  28810. "type": "string"
  28811. },
  28812. "error": {
  28813. "$ref": "#/components/schemas/SessionErrorUnknown"
  28814. },
  28815. "result": {},
  28816. "provider": {
  28817. "type": "object",
  28818. "properties": {
  28819. "executed": {
  28820. "type": "boolean"
  28821. },
  28822. "metadata": {
  28823. "type": "object",
  28824. "additionalProperties": {
  28825. "type": "object"
  28826. }
  28827. }
  28828. },
  28829. "required": ["executed"],
  28830. "additionalProperties": false
  28831. }
  28832. },
  28833. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  28834. "additionalProperties": false
  28835. }
  28836. },
  28837. "required": ["id", "type", "properties"],
  28838. "additionalProperties": false
  28839. },
  28840. "EventSessionNextRetried": {
  28841. "type": "object",
  28842. "properties": {
  28843. "id": {
  28844. "type": "string",
  28845. "pattern": "^evt_"
  28846. },
  28847. "type": {
  28848. "type": "string",
  28849. "enum": ["session.next.retried"]
  28850. },
  28851. "properties": {
  28852. "type": "object",
  28853. "properties": {
  28854. "timestamp": {
  28855. "type": "number"
  28856. },
  28857. "sessionID": {
  28858. "type": "string",
  28859. "pattern": "^ses"
  28860. },
  28861. "attempt": {
  28862. "type": "number"
  28863. },
  28864. "error": {
  28865. "$ref": "#/components/schemas/SessionNextRetry_error"
  28866. }
  28867. },
  28868. "required": ["timestamp", "sessionID", "attempt", "error"],
  28869. "additionalProperties": false
  28870. }
  28871. },
  28872. "required": ["id", "type", "properties"],
  28873. "additionalProperties": false
  28874. },
  28875. "EventSessionNextCompactionStarted": {
  28876. "type": "object",
  28877. "properties": {
  28878. "id": {
  28879. "type": "string",
  28880. "pattern": "^evt_"
  28881. },
  28882. "type": {
  28883. "type": "string",
  28884. "enum": ["session.next.compaction.started"]
  28885. },
  28886. "properties": {
  28887. "type": "object",
  28888. "properties": {
  28889. "timestamp": {
  28890. "type": "number"
  28891. },
  28892. "sessionID": {
  28893. "type": "string",
  28894. "pattern": "^ses"
  28895. },
  28896. "messageID": {
  28897. "type": "string",
  28898. "pattern": "^msg_"
  28899. },
  28900. "reason": {
  28901. "type": "string",
  28902. "enum": ["auto", "manual"]
  28903. }
  28904. },
  28905. "required": ["timestamp", "sessionID", "messageID", "reason"],
  28906. "additionalProperties": false
  28907. }
  28908. },
  28909. "required": ["id", "type", "properties"],
  28910. "additionalProperties": false
  28911. },
  28912. "EventSessionNextCompactionDelta": {
  28913. "type": "object",
  28914. "properties": {
  28915. "id": {
  28916. "type": "string",
  28917. "pattern": "^evt_"
  28918. },
  28919. "type": {
  28920. "type": "string",
  28921. "enum": ["session.next.compaction.delta"]
  28922. },
  28923. "properties": {
  28924. "type": "object",
  28925. "properties": {
  28926. "timestamp": {
  28927. "type": "number"
  28928. },
  28929. "sessionID": {
  28930. "type": "string",
  28931. "pattern": "^ses"
  28932. },
  28933. "messageID": {
  28934. "type": "string",
  28935. "pattern": "^msg_"
  28936. },
  28937. "text": {
  28938. "type": "string"
  28939. }
  28940. },
  28941. "required": ["timestamp", "sessionID", "messageID", "text"],
  28942. "additionalProperties": false
  28943. }
  28944. },
  28945. "required": ["id", "type", "properties"],
  28946. "additionalProperties": false
  28947. },
  28948. "EventSessionNextCompactionEnded": {
  28949. "type": "object",
  28950. "properties": {
  28951. "id": {
  28952. "type": "string",
  28953. "pattern": "^evt_"
  28954. },
  28955. "type": {
  28956. "type": "string",
  28957. "enum": ["session.next.compaction.ended"]
  28958. },
  28959. "properties": {
  28960. "type": "object",
  28961. "properties": {
  28962. "timestamp": {
  28963. "type": "number"
  28964. },
  28965. "sessionID": {
  28966. "type": "string",
  28967. "pattern": "^ses"
  28968. },
  28969. "messageID": {
  28970. "type": "string",
  28971. "pattern": "^msg_"
  28972. },
  28973. "reason": {
  28974. "type": "string",
  28975. "enum": ["auto", "manual"]
  28976. },
  28977. "text": {
  28978. "type": "string"
  28979. },
  28980. "recent": {
  28981. "type": "string"
  28982. }
  28983. },
  28984. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  28985. "additionalProperties": false
  28986. }
  28987. },
  28988. "required": ["id", "type", "properties"],
  28989. "additionalProperties": false
  28990. },
  28991. "EventMessagePartDelta": {
  28992. "type": "object",
  28993. "properties": {
  28994. "id": {
  28995. "type": "string",
  28996. "pattern": "^evt_"
  28997. },
  28998. "type": {
  28999. "type": "string",
  29000. "enum": ["message.part.delta"]
  29001. },
  29002. "properties": {
  29003. "type": "object",
  29004. "properties": {
  29005. "sessionID": {
  29006. "type": "string",
  29007. "pattern": "^ses"
  29008. },
  29009. "messageID": {
  29010. "type": "string",
  29011. "pattern": "^msg"
  29012. },
  29013. "partID": {
  29014. "type": "string",
  29015. "pattern": "^prt"
  29016. },
  29017. "field": {
  29018. "type": "string"
  29019. },
  29020. "delta": {
  29021. "type": "string"
  29022. }
  29023. },
  29024. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29025. "additionalProperties": false
  29026. }
  29027. },
  29028. "required": ["id", "type", "properties"],
  29029. "additionalProperties": false
  29030. },
  29031. "EventSessionDiff": {
  29032. "type": "object",
  29033. "properties": {
  29034. "id": {
  29035. "type": "string",
  29036. "pattern": "^evt_"
  29037. },
  29038. "type": {
  29039. "type": "string",
  29040. "enum": ["session.diff"]
  29041. },
  29042. "properties": {
  29043. "type": "object",
  29044. "properties": {
  29045. "sessionID": {
  29046. "type": "string",
  29047. "pattern": "^ses"
  29048. },
  29049. "diff": {
  29050. "type": "array",
  29051. "items": {
  29052. "$ref": "#/components/schemas/SnapshotFileDiff"
  29053. }
  29054. }
  29055. },
  29056. "required": ["sessionID", "diff"],
  29057. "additionalProperties": false
  29058. }
  29059. },
  29060. "required": ["id", "type", "properties"],
  29061. "additionalProperties": false
  29062. },
  29063. "EventSessionError": {
  29064. "type": "object",
  29065. "properties": {
  29066. "id": {
  29067. "type": "string",
  29068. "pattern": "^evt_"
  29069. },
  29070. "type": {
  29071. "type": "string",
  29072. "enum": ["session.error"]
  29073. },
  29074. "properties": {
  29075. "type": "object",
  29076. "properties": {
  29077. "sessionID": {
  29078. "type": "string",
  29079. "pattern": "^ses"
  29080. },
  29081. "error": {
  29082. "anyOf": [
  29083. {
  29084. "$ref": "#/components/schemas/ProviderAuthError"
  29085. },
  29086. {
  29087. "$ref": "#/components/schemas/UnknownError"
  29088. },
  29089. {
  29090. "$ref": "#/components/schemas/MessageOutputLengthError"
  29091. },
  29092. {
  29093. "$ref": "#/components/schemas/MessageAbortedError"
  29094. },
  29095. {
  29096. "$ref": "#/components/schemas/StructuredOutputError"
  29097. },
  29098. {
  29099. "$ref": "#/components/schemas/ContextOverflowError"
  29100. },
  29101. {
  29102. "$ref": "#/components/schemas/APIError"
  29103. }
  29104. ]
  29105. }
  29106. },
  29107. "additionalProperties": false
  29108. }
  29109. },
  29110. "required": ["id", "type", "properties"],
  29111. "additionalProperties": false
  29112. },
  29113. "EventInstallationUpdated": {
  29114. "type": "object",
  29115. "properties": {
  29116. "id": {
  29117. "type": "string",
  29118. "pattern": "^evt_"
  29119. },
  29120. "type": {
  29121. "type": "string",
  29122. "enum": ["installation.updated"]
  29123. },
  29124. "properties": {
  29125. "type": "object",
  29126. "properties": {
  29127. "version": {
  29128. "type": "string"
  29129. }
  29130. },
  29131. "required": ["version"],
  29132. "additionalProperties": false
  29133. }
  29134. },
  29135. "required": ["id", "type", "properties"],
  29136. "additionalProperties": false
  29137. },
  29138. "EventInstallationUpdate-available": {
  29139. "type": "object",
  29140. "properties": {
  29141. "id": {
  29142. "type": "string",
  29143. "pattern": "^evt_"
  29144. },
  29145. "type": {
  29146. "type": "string",
  29147. "enum": ["installation.update-available"]
  29148. },
  29149. "properties": {
  29150. "type": "object",
  29151. "properties": {
  29152. "version": {
  29153. "type": "string"
  29154. }
  29155. },
  29156. "required": ["version"],
  29157. "additionalProperties": false
  29158. }
  29159. },
  29160. "required": ["id", "type", "properties"],
  29161. "additionalProperties": false
  29162. },
  29163. "EventFileEdited": {
  29164. "type": "object",
  29165. "properties": {
  29166. "id": {
  29167. "type": "string",
  29168. "pattern": "^evt_"
  29169. },
  29170. "type": {
  29171. "type": "string",
  29172. "enum": ["file.edited"]
  29173. },
  29174. "properties": {
  29175. "type": "object",
  29176. "properties": {
  29177. "file": {
  29178. "type": "string"
  29179. }
  29180. },
  29181. "required": ["file"],
  29182. "additionalProperties": false
  29183. }
  29184. },
  29185. "required": ["id", "type", "properties"],
  29186. "additionalProperties": false
  29187. },
  29188. "EventConnectorUpdated": {
  29189. "type": "object",
  29190. "properties": {
  29191. "id": {
  29192. "type": "string",
  29193. "pattern": "^evt_"
  29194. },
  29195. "type": {
  29196. "type": "string",
  29197. "enum": ["connector.updated"]
  29198. },
  29199. "properties": {
  29200. "type": "object",
  29201. "properties": {}
  29202. }
  29203. },
  29204. "required": ["id", "type", "properties"],
  29205. "additionalProperties": false
  29206. },
  29207. "EventPermissionV2Asked": {
  29208. "type": "object",
  29209. "properties": {
  29210. "id": {
  29211. "type": "string",
  29212. "pattern": "^evt_"
  29213. },
  29214. "type": {
  29215. "type": "string",
  29216. "enum": ["permission.v2.asked"]
  29217. },
  29218. "properties": {
  29219. "type": "object",
  29220. "properties": {
  29221. "id": {
  29222. "type": "string",
  29223. "pattern": "^per"
  29224. },
  29225. "sessionID": {
  29226. "type": "string",
  29227. "pattern": "^ses"
  29228. },
  29229. "action": {
  29230. "type": "string"
  29231. },
  29232. "resources": {
  29233. "type": "array",
  29234. "items": {
  29235. "type": "string"
  29236. }
  29237. },
  29238. "save": {
  29239. "type": "array",
  29240. "items": {
  29241. "type": "string"
  29242. }
  29243. },
  29244. "metadata": {
  29245. "type": "object"
  29246. },
  29247. "source": {
  29248. "$ref": "#/components/schemas/PermissionV2Source"
  29249. }
  29250. },
  29251. "required": ["id", "sessionID", "action", "resources"],
  29252. "additionalProperties": false
  29253. }
  29254. },
  29255. "required": ["id", "type", "properties"],
  29256. "additionalProperties": false
  29257. },
  29258. "EventPermissionV2Replied": {
  29259. "type": "object",
  29260. "properties": {
  29261. "id": {
  29262. "type": "string",
  29263. "pattern": "^evt_"
  29264. },
  29265. "type": {
  29266. "type": "string",
  29267. "enum": ["permission.v2.replied"]
  29268. },
  29269. "properties": {
  29270. "type": "object",
  29271. "properties": {
  29272. "sessionID": {
  29273. "type": "string",
  29274. "pattern": "^ses"
  29275. },
  29276. "requestID": {
  29277. "type": "string",
  29278. "pattern": "^per"
  29279. },
  29280. "reply": {
  29281. "$ref": "#/components/schemas/PermissionV2Reply"
  29282. }
  29283. },
  29284. "required": ["sessionID", "requestID", "reply"],
  29285. "additionalProperties": false
  29286. }
  29287. },
  29288. "required": ["id", "type", "properties"],
  29289. "additionalProperties": false
  29290. },
  29291. "EventReferenceUpdated": {
  29292. "type": "object",
  29293. "properties": {
  29294. "id": {
  29295. "type": "string",
  29296. "pattern": "^evt_"
  29297. },
  29298. "type": {
  29299. "type": "string",
  29300. "enum": ["reference.updated"]
  29301. },
  29302. "properties": {
  29303. "type": "object",
  29304. "properties": {}
  29305. }
  29306. },
  29307. "required": ["id", "type", "properties"],
  29308. "additionalProperties": false
  29309. },
  29310. "EventFileWatcherUpdated": {
  29311. "type": "object",
  29312. "properties": {
  29313. "id": {
  29314. "type": "string",
  29315. "pattern": "^evt_"
  29316. },
  29317. "type": {
  29318. "type": "string",
  29319. "enum": ["file.watcher.updated"]
  29320. },
  29321. "properties": {
  29322. "type": "object",
  29323. "properties": {
  29324. "file": {
  29325. "type": "string"
  29326. },
  29327. "event": {
  29328. "type": "string",
  29329. "enum": ["add", "change", "unlink"]
  29330. }
  29331. },
  29332. "required": ["file", "event"],
  29333. "additionalProperties": false
  29334. }
  29335. },
  29336. "required": ["id", "type", "properties"],
  29337. "additionalProperties": false
  29338. },
  29339. "EventPtyCreated": {
  29340. "type": "object",
  29341. "properties": {
  29342. "id": {
  29343. "type": "string",
  29344. "pattern": "^evt_"
  29345. },
  29346. "type": {
  29347. "type": "string",
  29348. "enum": ["pty.created"]
  29349. },
  29350. "properties": {
  29351. "type": "object",
  29352. "properties": {
  29353. "info": {
  29354. "$ref": "#/components/schemas/Pty"
  29355. }
  29356. },
  29357. "required": ["info"],
  29358. "additionalProperties": false
  29359. }
  29360. },
  29361. "required": ["id", "type", "properties"],
  29362. "additionalProperties": false
  29363. },
  29364. "EventPtyUpdated": {
  29365. "type": "object",
  29366. "properties": {
  29367. "id": {
  29368. "type": "string",
  29369. "pattern": "^evt_"
  29370. },
  29371. "type": {
  29372. "type": "string",
  29373. "enum": ["pty.updated"]
  29374. },
  29375. "properties": {
  29376. "type": "object",
  29377. "properties": {
  29378. "info": {
  29379. "$ref": "#/components/schemas/Pty"
  29380. }
  29381. },
  29382. "required": ["info"],
  29383. "additionalProperties": false
  29384. }
  29385. },
  29386. "required": ["id", "type", "properties"],
  29387. "additionalProperties": false
  29388. },
  29389. "EventPtyExited": {
  29390. "type": "object",
  29391. "properties": {
  29392. "id": {
  29393. "type": "string",
  29394. "pattern": "^evt_"
  29395. },
  29396. "type": {
  29397. "type": "string",
  29398. "enum": ["pty.exited"]
  29399. },
  29400. "properties": {
  29401. "type": "object",
  29402. "properties": {
  29403. "id": {
  29404. "type": "string",
  29405. "pattern": "^pty"
  29406. },
  29407. "exitCode": {
  29408. "type": "integer",
  29409. "minimum": 0
  29410. }
  29411. },
  29412. "required": ["id", "exitCode"],
  29413. "additionalProperties": false
  29414. }
  29415. },
  29416. "required": ["id", "type", "properties"],
  29417. "additionalProperties": false
  29418. },
  29419. "EventPtyDeleted": {
  29420. "type": "object",
  29421. "properties": {
  29422. "id": {
  29423. "type": "string",
  29424. "pattern": "^evt_"
  29425. },
  29426. "type": {
  29427. "type": "string",
  29428. "enum": ["pty.deleted"]
  29429. },
  29430. "properties": {
  29431. "type": "object",
  29432. "properties": {
  29433. "id": {
  29434. "type": "string",
  29435. "pattern": "^pty"
  29436. }
  29437. },
  29438. "required": ["id"],
  29439. "additionalProperties": false
  29440. }
  29441. },
  29442. "required": ["id", "type", "properties"],
  29443. "additionalProperties": false
  29444. },
  29445. "EventQuestionV2Asked": {
  29446. "type": "object",
  29447. "properties": {
  29448. "id": {
  29449. "type": "string",
  29450. "pattern": "^evt_"
  29451. },
  29452. "type": {
  29453. "type": "string",
  29454. "enum": ["question.v2.asked"]
  29455. },
  29456. "properties": {
  29457. "type": "object",
  29458. "properties": {
  29459. "id": {
  29460. "type": "string",
  29461. "pattern": "^que"
  29462. },
  29463. "sessionID": {
  29464. "type": "string",
  29465. "pattern": "^ses"
  29466. },
  29467. "questions": {
  29468. "type": "array",
  29469. "items": {
  29470. "$ref": "#/components/schemas/QuestionV2Info"
  29471. },
  29472. "description": "Questions to ask"
  29473. },
  29474. "tool": {
  29475. "$ref": "#/components/schemas/QuestionV2Tool"
  29476. }
  29477. },
  29478. "required": ["id", "sessionID", "questions"],
  29479. "additionalProperties": false
  29480. }
  29481. },
  29482. "required": ["id", "type", "properties"],
  29483. "additionalProperties": false
  29484. },
  29485. "EventQuestionV2Replied": {
  29486. "type": "object",
  29487. "properties": {
  29488. "id": {
  29489. "type": "string",
  29490. "pattern": "^evt_"
  29491. },
  29492. "type": {
  29493. "type": "string",
  29494. "enum": ["question.v2.replied"]
  29495. },
  29496. "properties": {
  29497. "type": "object",
  29498. "properties": {
  29499. "sessionID": {
  29500. "type": "string",
  29501. "pattern": "^ses"
  29502. },
  29503. "requestID": {
  29504. "type": "string",
  29505. "pattern": "^que"
  29506. },
  29507. "answers": {
  29508. "type": "array",
  29509. "items": {
  29510. "$ref": "#/components/schemas/QuestionV2Answer"
  29511. }
  29512. }
  29513. },
  29514. "required": ["sessionID", "requestID", "answers"],
  29515. "additionalProperties": false
  29516. }
  29517. },
  29518. "required": ["id", "type", "properties"],
  29519. "additionalProperties": false
  29520. },
  29521. "EventQuestionV2Rejected": {
  29522. "type": "object",
  29523. "properties": {
  29524. "id": {
  29525. "type": "string",
  29526. "pattern": "^evt_"
  29527. },
  29528. "type": {
  29529. "type": "string",
  29530. "enum": ["question.v2.rejected"]
  29531. },
  29532. "properties": {
  29533. "type": "object",
  29534. "properties": {
  29535. "sessionID": {
  29536. "type": "string",
  29537. "pattern": "^ses"
  29538. },
  29539. "requestID": {
  29540. "type": "string",
  29541. "pattern": "^que"
  29542. }
  29543. },
  29544. "required": ["sessionID", "requestID"],
  29545. "additionalProperties": false
  29546. }
  29547. },
  29548. "required": ["id", "type", "properties"],
  29549. "additionalProperties": false
  29550. },
  29551. "EventTodoUpdated": {
  29552. "type": "object",
  29553. "properties": {
  29554. "id": {
  29555. "type": "string",
  29556. "pattern": "^evt_"
  29557. },
  29558. "type": {
  29559. "type": "string",
  29560. "enum": ["todo.updated"]
  29561. },
  29562. "properties": {
  29563. "type": "object",
  29564. "properties": {
  29565. "sessionID": {
  29566. "type": "string",
  29567. "pattern": "^ses"
  29568. },
  29569. "todos": {
  29570. "type": "array",
  29571. "items": {
  29572. "$ref": "#/components/schemas/Todo"
  29573. }
  29574. }
  29575. },
  29576. "required": ["sessionID", "todos"],
  29577. "additionalProperties": false
  29578. }
  29579. },
  29580. "required": ["id", "type", "properties"],
  29581. "additionalProperties": false
  29582. },
  29583. "EventLspUpdated": {
  29584. "type": "object",
  29585. "properties": {
  29586. "id": {
  29587. "type": "string",
  29588. "pattern": "^evt_"
  29589. },
  29590. "type": {
  29591. "type": "string",
  29592. "enum": ["lsp.updated"]
  29593. },
  29594. "properties": {
  29595. "type": "object",
  29596. "properties": {}
  29597. }
  29598. },
  29599. "required": ["id", "type", "properties"],
  29600. "additionalProperties": false
  29601. },
  29602. "EventPermissionAsked": {
  29603. "type": "object",
  29604. "properties": {
  29605. "id": {
  29606. "type": "string",
  29607. "pattern": "^evt_"
  29608. },
  29609. "type": {
  29610. "type": "string",
  29611. "enum": ["permission.asked"]
  29612. },
  29613. "properties": {
  29614. "type": "object",
  29615. "properties": {
  29616. "id": {
  29617. "type": "string",
  29618. "pattern": "^per"
  29619. },
  29620. "sessionID": {
  29621. "type": "string",
  29622. "pattern": "^ses"
  29623. },
  29624. "permission": {
  29625. "type": "string"
  29626. },
  29627. "patterns": {
  29628. "type": "array",
  29629. "items": {
  29630. "type": "string"
  29631. }
  29632. },
  29633. "metadata": {
  29634. "type": "object"
  29635. },
  29636. "always": {
  29637. "type": "array",
  29638. "items": {
  29639. "type": "string"
  29640. }
  29641. },
  29642. "tool": {
  29643. "type": "object",
  29644. "properties": {
  29645. "messageID": {
  29646. "type": "string"
  29647. },
  29648. "callID": {
  29649. "type": "string"
  29650. }
  29651. },
  29652. "required": ["messageID", "callID"],
  29653. "additionalProperties": false
  29654. }
  29655. },
  29656. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  29657. "additionalProperties": false
  29658. }
  29659. },
  29660. "required": ["id", "type", "properties"],
  29661. "additionalProperties": false
  29662. },
  29663. "EventPermissionReplied": {
  29664. "type": "object",
  29665. "properties": {
  29666. "id": {
  29667. "type": "string",
  29668. "pattern": "^evt_"
  29669. },
  29670. "type": {
  29671. "type": "string",
  29672. "enum": ["permission.replied"]
  29673. },
  29674. "properties": {
  29675. "type": "object",
  29676. "properties": {
  29677. "sessionID": {
  29678. "type": "string",
  29679. "pattern": "^ses"
  29680. },
  29681. "requestID": {
  29682. "type": "string",
  29683. "pattern": "^per"
  29684. },
  29685. "reply": {
  29686. "type": "string",
  29687. "enum": ["once", "always", "reject"]
  29688. }
  29689. },
  29690. "required": ["sessionID", "requestID", "reply"],
  29691. "additionalProperties": false
  29692. }
  29693. },
  29694. "required": ["id", "type", "properties"],
  29695. "additionalProperties": false
  29696. },
  29697. "EventMcpToolsChanged": {
  29698. "type": "object",
  29699. "properties": {
  29700. "id": {
  29701. "type": "string",
  29702. "pattern": "^evt_"
  29703. },
  29704. "type": {
  29705. "type": "string",
  29706. "enum": ["mcp.tools.changed"]
  29707. },
  29708. "properties": {
  29709. "type": "object",
  29710. "properties": {
  29711. "server": {
  29712. "type": "string"
  29713. }
  29714. },
  29715. "required": ["server"],
  29716. "additionalProperties": false
  29717. }
  29718. },
  29719. "required": ["id", "type", "properties"],
  29720. "additionalProperties": false
  29721. },
  29722. "EventMcpBrowserOpenFailed": {
  29723. "type": "object",
  29724. "properties": {
  29725. "id": {
  29726. "type": "string",
  29727. "pattern": "^evt_"
  29728. },
  29729. "type": {
  29730. "type": "string",
  29731. "enum": ["mcp.browser.open.failed"]
  29732. },
  29733. "properties": {
  29734. "type": "object",
  29735. "properties": {
  29736. "mcpName": {
  29737. "type": "string"
  29738. },
  29739. "url": {
  29740. "type": "string"
  29741. }
  29742. },
  29743. "required": ["mcpName", "url"],
  29744. "additionalProperties": false
  29745. }
  29746. },
  29747. "required": ["id", "type", "properties"],
  29748. "additionalProperties": false
  29749. },
  29750. "EventCommandExecuted": {
  29751. "type": "object",
  29752. "properties": {
  29753. "id": {
  29754. "type": "string",
  29755. "pattern": "^evt_"
  29756. },
  29757. "type": {
  29758. "type": "string",
  29759. "enum": ["command.executed"]
  29760. },
  29761. "properties": {
  29762. "type": "object",
  29763. "properties": {
  29764. "name": {
  29765. "type": "string"
  29766. },
  29767. "sessionID": {
  29768. "type": "string",
  29769. "pattern": "^ses"
  29770. },
  29771. "arguments": {
  29772. "type": "string"
  29773. },
  29774. "messageID": {
  29775. "type": "string",
  29776. "pattern": "^msg"
  29777. }
  29778. },
  29779. "required": ["name", "sessionID", "arguments", "messageID"],
  29780. "additionalProperties": false
  29781. }
  29782. },
  29783. "required": ["id", "type", "properties"],
  29784. "additionalProperties": false
  29785. },
  29786. "EventProjectDirectoriesUpdated": {
  29787. "type": "object",
  29788. "properties": {
  29789. "id": {
  29790. "type": "string",
  29791. "pattern": "^evt_"
  29792. },
  29793. "type": {
  29794. "type": "string",
  29795. "enum": ["project.directories.updated"]
  29796. },
  29797. "properties": {
  29798. "type": "object",
  29799. "properties": {
  29800. "projectID": {
  29801. "type": "string"
  29802. }
  29803. },
  29804. "required": ["projectID"],
  29805. "additionalProperties": false
  29806. }
  29807. },
  29808. "required": ["id", "type", "properties"],
  29809. "additionalProperties": false
  29810. },
  29811. "EventProjectUpdated": {
  29812. "type": "object",
  29813. "properties": {
  29814. "id": {
  29815. "type": "string",
  29816. "pattern": "^evt_"
  29817. },
  29818. "type": {
  29819. "type": "string",
  29820. "enum": ["project.updated"]
  29821. },
  29822. "properties": {
  29823. "type": "object",
  29824. "properties": {
  29825. "id": {
  29826. "type": "string"
  29827. },
  29828. "worktree": {
  29829. "type": "string"
  29830. },
  29831. "vcs": {
  29832. "type": "string",
  29833. "enum": ["git"]
  29834. },
  29835. "name": {
  29836. "type": "string"
  29837. },
  29838. "icon": {
  29839. "type": "object",
  29840. "properties": {
  29841. "url": {
  29842. "type": "string"
  29843. },
  29844. "override": {
  29845. "type": "string"
  29846. },
  29847. "color": {
  29848. "type": "string"
  29849. }
  29850. },
  29851. "additionalProperties": false
  29852. },
  29853. "commands": {
  29854. "type": "object",
  29855. "properties": {
  29856. "start": {
  29857. "type": "string",
  29858. "description": "Startup script to run when creating a new workspace (worktree)"
  29859. }
  29860. },
  29861. "additionalProperties": false
  29862. },
  29863. "time": {
  29864. "type": "object",
  29865. "properties": {
  29866. "created": {
  29867. "type": "integer",
  29868. "minimum": 0
  29869. },
  29870. "updated": {
  29871. "type": "integer",
  29872. "minimum": 0
  29873. },
  29874. "initialized": {
  29875. "type": "integer",
  29876. "minimum": 0
  29877. }
  29878. },
  29879. "required": ["created", "updated"],
  29880. "additionalProperties": false
  29881. },
  29882. "sandboxes": {
  29883. "type": "array",
  29884. "items": {
  29885. "type": "string"
  29886. }
  29887. }
  29888. },
  29889. "required": ["id", "worktree", "time", "sandboxes"],
  29890. "additionalProperties": false
  29891. }
  29892. },
  29893. "required": ["id", "type", "properties"],
  29894. "additionalProperties": false
  29895. },
  29896. "EventVcsBranchUpdated": {
  29897. "type": "object",
  29898. "properties": {
  29899. "id": {
  29900. "type": "string",
  29901. "pattern": "^evt_"
  29902. },
  29903. "type": {
  29904. "type": "string",
  29905. "enum": ["vcs.branch.updated"]
  29906. },
  29907. "properties": {
  29908. "type": "object",
  29909. "properties": {
  29910. "branch": {
  29911. "type": "string"
  29912. }
  29913. },
  29914. "additionalProperties": false
  29915. }
  29916. },
  29917. "required": ["id", "type", "properties"],
  29918. "additionalProperties": false
  29919. },
  29920. "EventQuestionAsked": {
  29921. "type": "object",
  29922. "properties": {
  29923. "id": {
  29924. "type": "string",
  29925. "pattern": "^evt_"
  29926. },
  29927. "type": {
  29928. "type": "string",
  29929. "enum": ["question.asked"]
  29930. },
  29931. "properties": {
  29932. "type": "object",
  29933. "properties": {
  29934. "id": {
  29935. "type": "string",
  29936. "pattern": "^que"
  29937. },
  29938. "sessionID": {
  29939. "type": "string",
  29940. "pattern": "^ses"
  29941. },
  29942. "questions": {
  29943. "type": "array",
  29944. "items": {
  29945. "$ref": "#/components/schemas/QuestionInfo"
  29946. },
  29947. "description": "Questions to ask"
  29948. },
  29949. "tool": {
  29950. "$ref": "#/components/schemas/QuestionTool"
  29951. }
  29952. },
  29953. "required": ["id", "sessionID", "questions"],
  29954. "additionalProperties": false
  29955. }
  29956. },
  29957. "required": ["id", "type", "properties"],
  29958. "additionalProperties": false
  29959. },
  29960. "EventQuestionReplied": {
  29961. "type": "object",
  29962. "properties": {
  29963. "id": {
  29964. "type": "string",
  29965. "pattern": "^evt_"
  29966. },
  29967. "type": {
  29968. "type": "string",
  29969. "enum": ["question.replied"]
  29970. },
  29971. "properties": {
  29972. "type": "object",
  29973. "properties": {
  29974. "sessionID": {
  29975. "type": "string",
  29976. "pattern": "^ses"
  29977. },
  29978. "requestID": {
  29979. "type": "string",
  29980. "pattern": "^que"
  29981. },
  29982. "answers": {
  29983. "type": "array",
  29984. "items": {
  29985. "$ref": "#/components/schemas/QuestionAnswer"
  29986. }
  29987. }
  29988. },
  29989. "required": ["sessionID", "requestID", "answers"],
  29990. "additionalProperties": false
  29991. }
  29992. },
  29993. "required": ["id", "type", "properties"],
  29994. "additionalProperties": false
  29995. },
  29996. "EventQuestionRejected": {
  29997. "type": "object",
  29998. "properties": {
  29999. "id": {
  30000. "type": "string",
  30001. "pattern": "^evt_"
  30002. },
  30003. "type": {
  30004. "type": "string",
  30005. "enum": ["question.rejected"]
  30006. },
  30007. "properties": {
  30008. "type": "object",
  30009. "properties": {
  30010. "sessionID": {
  30011. "type": "string",
  30012. "pattern": "^ses"
  30013. },
  30014. "requestID": {
  30015. "type": "string",
  30016. "pattern": "^que"
  30017. }
  30018. },
  30019. "required": ["sessionID", "requestID"],
  30020. "additionalProperties": false
  30021. }
  30022. },
  30023. "required": ["id", "type", "properties"],
  30024. "additionalProperties": false
  30025. },
  30026. "EventSessionStatus": {
  30027. "type": "object",
  30028. "properties": {
  30029. "id": {
  30030. "type": "string",
  30031. "pattern": "^evt_"
  30032. },
  30033. "type": {
  30034. "type": "string",
  30035. "enum": ["session.status"]
  30036. },
  30037. "properties": {
  30038. "type": "object",
  30039. "properties": {
  30040. "sessionID": {
  30041. "type": "string",
  30042. "pattern": "^ses"
  30043. },
  30044. "status": {
  30045. "$ref": "#/components/schemas/SessionStatus"
  30046. }
  30047. },
  30048. "required": ["sessionID", "status"],
  30049. "additionalProperties": false
  30050. }
  30051. },
  30052. "required": ["id", "type", "properties"],
  30053. "additionalProperties": false
  30054. },
  30055. "EventSessionIdle": {
  30056. "type": "object",
  30057. "properties": {
  30058. "id": {
  30059. "type": "string",
  30060. "pattern": "^evt_"
  30061. },
  30062. "type": {
  30063. "type": "string",
  30064. "enum": ["session.idle"]
  30065. },
  30066. "properties": {
  30067. "type": "object",
  30068. "properties": {
  30069. "sessionID": {
  30070. "type": "string",
  30071. "pattern": "^ses"
  30072. }
  30073. },
  30074. "required": ["sessionID"],
  30075. "additionalProperties": false
  30076. }
  30077. },
  30078. "required": ["id", "type", "properties"],
  30079. "additionalProperties": false
  30080. },
  30081. "EventSessionCompacted": {
  30082. "type": "object",
  30083. "properties": {
  30084. "id": {
  30085. "type": "string",
  30086. "pattern": "^evt_"
  30087. },
  30088. "type": {
  30089. "type": "string",
  30090. "enum": ["session.compacted"]
  30091. },
  30092. "properties": {
  30093. "type": "object",
  30094. "properties": {
  30095. "sessionID": {
  30096. "type": "string",
  30097. "pattern": "^ses"
  30098. }
  30099. },
  30100. "required": ["sessionID"],
  30101. "additionalProperties": false
  30102. }
  30103. },
  30104. "required": ["id", "type", "properties"],
  30105. "additionalProperties": false
  30106. },
  30107. "EventWorktreeReady": {
  30108. "type": "object",
  30109. "properties": {
  30110. "id": {
  30111. "type": "string",
  30112. "pattern": "^evt_"
  30113. },
  30114. "type": {
  30115. "type": "string",
  30116. "enum": ["worktree.ready"]
  30117. },
  30118. "properties": {
  30119. "type": "object",
  30120. "properties": {
  30121. "name": {
  30122. "type": "string"
  30123. },
  30124. "branch": {
  30125. "type": "string"
  30126. }
  30127. },
  30128. "required": ["name"],
  30129. "additionalProperties": false
  30130. }
  30131. },
  30132. "required": ["id", "type", "properties"],
  30133. "additionalProperties": false
  30134. },
  30135. "EventWorktreeFailed": {
  30136. "type": "object",
  30137. "properties": {
  30138. "id": {
  30139. "type": "string",
  30140. "pattern": "^evt_"
  30141. },
  30142. "type": {
  30143. "type": "string",
  30144. "enum": ["worktree.failed"]
  30145. },
  30146. "properties": {
  30147. "type": "object",
  30148. "properties": {
  30149. "message": {
  30150. "type": "string"
  30151. }
  30152. },
  30153. "required": ["message"],
  30154. "additionalProperties": false
  30155. }
  30156. },
  30157. "required": ["id", "type", "properties"],
  30158. "additionalProperties": false
  30159. },
  30160. "EventWorkspaceReady": {
  30161. "type": "object",
  30162. "properties": {
  30163. "id": {
  30164. "type": "string",
  30165. "pattern": "^evt_"
  30166. },
  30167. "type": {
  30168. "type": "string",
  30169. "enum": ["workspace.ready"]
  30170. },
  30171. "properties": {
  30172. "type": "object",
  30173. "properties": {
  30174. "name": {
  30175. "type": "string"
  30176. }
  30177. },
  30178. "required": ["name"],
  30179. "additionalProperties": false
  30180. }
  30181. },
  30182. "required": ["id", "type", "properties"],
  30183. "additionalProperties": false
  30184. },
  30185. "EventWorkspaceFailed": {
  30186. "type": "object",
  30187. "properties": {
  30188. "id": {
  30189. "type": "string",
  30190. "pattern": "^evt_"
  30191. },
  30192. "type": {
  30193. "type": "string",
  30194. "enum": ["workspace.failed"]
  30195. },
  30196. "properties": {
  30197. "type": "object",
  30198. "properties": {
  30199. "message": {
  30200. "type": "string"
  30201. }
  30202. },
  30203. "required": ["message"],
  30204. "additionalProperties": false
  30205. }
  30206. },
  30207. "required": ["id", "type", "properties"],
  30208. "additionalProperties": false
  30209. },
  30210. "EventWorkspaceStatus": {
  30211. "type": "object",
  30212. "properties": {
  30213. "id": {
  30214. "type": "string",
  30215. "pattern": "^evt_"
  30216. },
  30217. "type": {
  30218. "type": "string",
  30219. "enum": ["workspace.status"]
  30220. },
  30221. "properties": {
  30222. "type": "object",
  30223. "properties": {
  30224. "workspaceID": {
  30225. "type": "string",
  30226. "pattern": "^wrk"
  30227. },
  30228. "status": {
  30229. "type": "string",
  30230. "enum": ["connected", "connecting", "disconnected", "error"]
  30231. }
  30232. },
  30233. "required": ["workspaceID", "status"],
  30234. "additionalProperties": false
  30235. }
  30236. },
  30237. "required": ["id", "type", "properties"],
  30238. "additionalProperties": false
  30239. },
  30240. "EventServerConnected": {
  30241. "type": "object",
  30242. "properties": {
  30243. "id": {
  30244. "type": "string",
  30245. "pattern": "^evt_"
  30246. },
  30247. "type": {
  30248. "type": "string",
  30249. "enum": ["server.connected"]
  30250. },
  30251. "properties": {
  30252. "type": "object",
  30253. "properties": {}
  30254. }
  30255. },
  30256. "required": ["id", "type", "properties"],
  30257. "additionalProperties": false
  30258. },
  30259. "EventGlobalDisposed": {
  30260. "type": "object",
  30261. "properties": {
  30262. "id": {
  30263. "type": "string",
  30264. "pattern": "^evt_"
  30265. },
  30266. "type": {
  30267. "type": "string",
  30268. "enum": ["global.disposed"]
  30269. },
  30270. "properties": {
  30271. "type": "object",
  30272. "properties": {}
  30273. }
  30274. },
  30275. "required": ["id", "type", "properties"],
  30276. "additionalProperties": false
  30277. },
  30278. "BadRequestError": {
  30279. "type": "object",
  30280. "required": ["name", "data"],
  30281. "properties": {
  30282. "name": {
  30283. "type": "string",
  30284. "enum": ["BadRequest"]
  30285. },
  30286. "data": {
  30287. "type": "object",
  30288. "required": ["message"],
  30289. "properties": {
  30290. "message": {
  30291. "type": "string"
  30292. },
  30293. "kind": {
  30294. "type": "string",
  30295. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30296. }
  30297. }
  30298. }
  30299. }
  30300. }
  30301. }
  30302. },
  30303. "security": [],
  30304. "tags": [
  30305. {
  30306. "name": "control",
  30307. "description": "Control plane routes."
  30308. },
  30309. {
  30310. "name": "controlPlane",
  30311. "description": "Control-plane orchestration routes."
  30312. },
  30313. {
  30314. "name": "global",
  30315. "description": "Global server routes."
  30316. },
  30317. {
  30318. "name": "event",
  30319. "description": "Instance event stream route."
  30320. },
  30321. {
  30322. "name": "config",
  30323. "description": "Experimental HttpApi config routes."
  30324. },
  30325. {
  30326. "name": "experimental",
  30327. "description": "Experimental HttpApi read-only routes."
  30328. },
  30329. {
  30330. "name": "file",
  30331. "description": "Experimental HttpApi file routes."
  30332. },
  30333. {
  30334. "name": "instance",
  30335. "description": "Experimental HttpApi instance read routes."
  30336. },
  30337. {
  30338. "name": "mcp",
  30339. "description": "Experimental HttpApi MCP routes."
  30340. },
  30341. {
  30342. "name": "project",
  30343. "description": "Experimental HttpApi project routes."
  30344. },
  30345. {
  30346. "name": "projectCopy",
  30347. "description": "Project copy management routes."
  30348. },
  30349. {
  30350. "name": "pty",
  30351. "description": "Experimental HttpApi PTY routes."
  30352. },
  30353. {
  30354. "name": "question",
  30355. "description": "Question routes."
  30356. },
  30357. {
  30358. "name": "permission",
  30359. "description": "Experimental HttpApi permission routes."
  30360. },
  30361. {
  30362. "name": "provider",
  30363. "description": "Experimental HttpApi provider routes."
  30364. },
  30365. {
  30366. "name": "session",
  30367. "description": "Experimental HttpApi session routes."
  30368. },
  30369. {
  30370. "name": "sync",
  30371. "description": "Experimental HttpApi sync routes."
  30372. },
  30373. {
  30374. "name": "tui",
  30375. "description": "Experimental HttpApi TUI routes."
  30376. },
  30377. {
  30378. "name": "workspace",
  30379. "description": "Experimental HttpApi workspace routes."
  30380. },
  30381. {
  30382. "name": "opencode HttpApi",
  30383. "description": "Experimental HttpApi surface for selected instance routes."
  30384. },
  30385. {
  30386. "name": "opencode HttpApi",
  30387. "description": "Experimental HttpApi surface for selected instance routes."
  30388. },
  30389. {
  30390. "name": "opencode HttpApi",
  30391. "description": "Experimental HttpApi surface for selected instance routes."
  30392. },
  30393. {
  30394. "name": "sessions",
  30395. "description": "Experimental session routes."
  30396. },
  30397. {
  30398. "name": "messages",
  30399. "description": "Experimental message routes."
  30400. },
  30401. {
  30402. "name": "models",
  30403. "description": "Experimental model routes."
  30404. },
  30405. {
  30406. "name": "providers",
  30407. "description": "Experimental provider routes."
  30408. },
  30409. {
  30410. "name": "connectors",
  30411. "description": "Connector discovery and authentication routes."
  30412. },
  30413. {
  30414. "name": "permissions",
  30415. "description": "Experimental permission routes."
  30416. },
  30417. {
  30418. "name": "filesystem",
  30419. "description": "Experimental location-scoped filesystem routes."
  30420. },
  30421. {
  30422. "name": "commands",
  30423. "description": "Experimental command routes."
  30424. },
  30425. {
  30426. "name": "skills",
  30427. "description": "Experimental skill routes."
  30428. },
  30429. {
  30430. "name": "events",
  30431. "description": "Experimental event stream route."
  30432. },
  30433. {
  30434. "name": "session questions",
  30435. "description": "Experimental session question routes."
  30436. },
  30437. {
  30438. "name": "reference",
  30439. "description": "Location-scoped project references."
  30440. },
  30441. {
  30442. "name": "pty",
  30443. "description": "PTY websocket route."
  30444. }
  30445. ]
  30446. }