openapi.json 865 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350
  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/integration": {
  11188. "get": {
  11189. "tags": ["integrations"],
  11190. "operationId": "v2.integration.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/IntegrationInfo"
  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 integrations and their authentication methods.",
  11259. "summary": "List integrations",
  11260. "x-codeSamples": [
  11261. {
  11262. "lang": "js",
  11263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11264. }
  11265. ]
  11266. }
  11267. },
  11268. "/api/integration/{integrationID}": {
  11269. "get": {
  11270. "tags": ["integrations"],
  11271. "operationId": "v2.integration.get",
  11272. "parameters": [
  11273. {
  11274. "name": "integrationID",
  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/IntegrationInfo"
  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 integration and its authentication methods.",
  11345. "summary": "Get integration",
  11346. "x-codeSamples": [
  11347. {
  11348. "lang": "js",
  11349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11350. }
  11351. ]
  11352. }
  11353. },
  11354. "/api/integration/{integrationID}/connect/key": {
  11355. "post": {
  11356. "tags": ["integrations"],
  11357. "operationId": "v2.integration.connect.key",
  11358. "parameters": [
  11359. {
  11360. "name": "integrationID",
  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. "key": {
  11429. "type": "string"
  11430. },
  11431. "label": {
  11432. "type": "string"
  11433. }
  11434. },
  11435. "required": ["key"],
  11436. "additionalProperties": false
  11437. }
  11438. }
  11439. },
  11440. "required": true
  11441. },
  11442. "x-codeSamples": [
  11443. {
  11444. "lang": "js",
  11445. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11446. }
  11447. ]
  11448. }
  11449. },
  11450. "/api/integration/{integrationID}/connect/oauth": {
  11451. "post": {
  11452. "tags": ["integrations"],
  11453. "operationId": "v2.integration.connect.oauth",
  11454. "parameters": [
  11455. {
  11456. "name": "integrationID",
  11457. "in": "path",
  11458. "schema": {
  11459. "type": "string"
  11460. },
  11461. "required": true
  11462. },
  11463. {
  11464. "name": "location",
  11465. "in": "query",
  11466. "schema": {
  11467. "type": "object",
  11468. "properties": {
  11469. "directory": {
  11470. "type": "string"
  11471. },
  11472. "workspace": {
  11473. "type": "string"
  11474. }
  11475. },
  11476. "additionalProperties": false
  11477. },
  11478. "required": false,
  11479. "style": "deepObject",
  11480. "explode": true
  11481. }
  11482. ],
  11483. "security": [],
  11484. "responses": {
  11485. "200": {
  11486. "description": "Success",
  11487. "content": {
  11488. "application/json": {
  11489. "schema": {
  11490. "type": "object",
  11491. "properties": {
  11492. "location": {
  11493. "$ref": "#/components/schemas/LocationInfo"
  11494. },
  11495. "data": {
  11496. "$ref": "#/components/schemas/IntegrationAttempt"
  11497. }
  11498. },
  11499. "required": ["location", "data"],
  11500. "additionalProperties": false
  11501. }
  11502. }
  11503. }
  11504. },
  11505. "400": {
  11506. "description": "InvalidRequestError",
  11507. "content": {
  11508. "application/json": {
  11509. "schema": {
  11510. "anyOf": [
  11511. {
  11512. "$ref": "#/components/schemas/InvalidRequestError"
  11513. },
  11514. {
  11515. "$ref": "#/components/schemas/InvalidRequestError"
  11516. }
  11517. ]
  11518. }
  11519. }
  11520. }
  11521. },
  11522. "401": {
  11523. "description": "UnauthorizedError",
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "$ref": "#/components/schemas/UnauthorizedError"
  11528. }
  11529. }
  11530. }
  11531. }
  11532. },
  11533. "description": "Start an OAuth attempt and return the authorization details.",
  11534. "summary": "Begin OAuth connection",
  11535. "requestBody": {
  11536. "content": {
  11537. "application/json": {
  11538. "schema": {
  11539. "type": "object",
  11540. "properties": {
  11541. "methodID": {
  11542. "type": "string"
  11543. },
  11544. "inputs": {
  11545. "type": "object",
  11546. "additionalProperties": {
  11547. "type": "string"
  11548. }
  11549. },
  11550. "label": {
  11551. "type": "string"
  11552. }
  11553. },
  11554. "required": ["methodID", "inputs"],
  11555. "additionalProperties": false
  11556. }
  11557. }
  11558. },
  11559. "required": true
  11560. },
  11561. "x-codeSamples": [
  11562. {
  11563. "lang": "js",
  11564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11565. }
  11566. ]
  11567. }
  11568. },
  11569. "/api/integration/attempt/{attemptID}": {
  11570. "get": {
  11571. "tags": ["integrations"],
  11572. "operationId": "v2.integration.attempt.status",
  11573. "parameters": [
  11574. {
  11575. "name": "attemptID",
  11576. "in": "path",
  11577. "schema": {
  11578. "type": "string"
  11579. },
  11580. "required": true
  11581. },
  11582. {
  11583. "name": "location",
  11584. "in": "query",
  11585. "schema": {
  11586. "type": "object",
  11587. "properties": {
  11588. "directory": {
  11589. "type": "string"
  11590. },
  11591. "workspace": {
  11592. "type": "string"
  11593. }
  11594. },
  11595. "additionalProperties": false
  11596. },
  11597. "required": false,
  11598. "style": "deepObject",
  11599. "explode": true
  11600. }
  11601. ],
  11602. "security": [],
  11603. "responses": {
  11604. "200": {
  11605. "description": "Success",
  11606. "content": {
  11607. "application/json": {
  11608. "schema": {
  11609. "type": "object",
  11610. "properties": {
  11611. "location": {
  11612. "$ref": "#/components/schemas/LocationInfo"
  11613. },
  11614. "data": {
  11615. "anyOf": [
  11616. {
  11617. "type": "object",
  11618. "properties": {
  11619. "status": {
  11620. "type": "string",
  11621. "enum": ["pending"]
  11622. },
  11623. "time": {
  11624. "type": "object",
  11625. "properties": {
  11626. "created": {
  11627. "anyOf": [
  11628. {
  11629. "type": "number"
  11630. },
  11631. {
  11632. "type": "string",
  11633. "enum": ["NaN"]
  11634. },
  11635. {
  11636. "type": "string",
  11637. "enum": ["Infinity"]
  11638. },
  11639. {
  11640. "type": "string",
  11641. "enum": ["-Infinity"]
  11642. },
  11643. {
  11644. "type": "string",
  11645. "enum": ["Infinity", "-Infinity", "NaN"]
  11646. }
  11647. ]
  11648. },
  11649. "expires": {
  11650. "anyOf": [
  11651. {
  11652. "type": "number"
  11653. },
  11654. {
  11655. "type": "string",
  11656. "enum": ["NaN"]
  11657. },
  11658. {
  11659. "type": "string",
  11660. "enum": ["Infinity"]
  11661. },
  11662. {
  11663. "type": "string",
  11664. "enum": ["-Infinity"]
  11665. },
  11666. {
  11667. "type": "string",
  11668. "enum": ["Infinity", "-Infinity", "NaN"]
  11669. }
  11670. ]
  11671. }
  11672. },
  11673. "required": ["created", "expires"],
  11674. "additionalProperties": false
  11675. }
  11676. },
  11677. "required": ["status", "time"],
  11678. "additionalProperties": false
  11679. },
  11680. {
  11681. "type": "object",
  11682. "properties": {
  11683. "status": {
  11684. "type": "string",
  11685. "enum": ["complete"]
  11686. },
  11687. "time": {
  11688. "type": "object",
  11689. "properties": {
  11690. "created": {
  11691. "anyOf": [
  11692. {
  11693. "type": "number"
  11694. },
  11695. {
  11696. "type": "string",
  11697. "enum": ["NaN"]
  11698. },
  11699. {
  11700. "type": "string",
  11701. "enum": ["Infinity"]
  11702. },
  11703. {
  11704. "type": "string",
  11705. "enum": ["-Infinity"]
  11706. },
  11707. {
  11708. "type": "string",
  11709. "enum": ["Infinity", "-Infinity", "NaN"]
  11710. }
  11711. ]
  11712. },
  11713. "expires": {
  11714. "anyOf": [
  11715. {
  11716. "type": "number"
  11717. },
  11718. {
  11719. "type": "string",
  11720. "enum": ["NaN"]
  11721. },
  11722. {
  11723. "type": "string",
  11724. "enum": ["Infinity"]
  11725. },
  11726. {
  11727. "type": "string",
  11728. "enum": ["-Infinity"]
  11729. },
  11730. {
  11731. "type": "string",
  11732. "enum": ["Infinity", "-Infinity", "NaN"]
  11733. }
  11734. ]
  11735. }
  11736. },
  11737. "required": ["created", "expires"],
  11738. "additionalProperties": false
  11739. }
  11740. },
  11741. "required": ["status", "time"],
  11742. "additionalProperties": false
  11743. },
  11744. {
  11745. "type": "object",
  11746. "properties": {
  11747. "status": {
  11748. "type": "string",
  11749. "enum": ["failed"]
  11750. },
  11751. "message": {
  11752. "type": "string"
  11753. },
  11754. "time": {
  11755. "type": "object",
  11756. "properties": {
  11757. "created": {
  11758. "anyOf": [
  11759. {
  11760. "type": "number"
  11761. },
  11762. {
  11763. "type": "string",
  11764. "enum": ["NaN"]
  11765. },
  11766. {
  11767. "type": "string",
  11768. "enum": ["Infinity"]
  11769. },
  11770. {
  11771. "type": "string",
  11772. "enum": ["-Infinity"]
  11773. },
  11774. {
  11775. "type": "string",
  11776. "enum": ["Infinity", "-Infinity", "NaN"]
  11777. }
  11778. ]
  11779. },
  11780. "expires": {
  11781. "anyOf": [
  11782. {
  11783. "type": "number"
  11784. },
  11785. {
  11786. "type": "string",
  11787. "enum": ["NaN"]
  11788. },
  11789. {
  11790. "type": "string",
  11791. "enum": ["Infinity"]
  11792. },
  11793. {
  11794. "type": "string",
  11795. "enum": ["-Infinity"]
  11796. },
  11797. {
  11798. "type": "string",
  11799. "enum": ["Infinity", "-Infinity", "NaN"]
  11800. }
  11801. ]
  11802. }
  11803. },
  11804. "required": ["created", "expires"],
  11805. "additionalProperties": false
  11806. }
  11807. },
  11808. "required": ["status", "message", "time"],
  11809. "additionalProperties": false
  11810. },
  11811. {
  11812. "type": "object",
  11813. "properties": {
  11814. "status": {
  11815. "type": "string",
  11816. "enum": ["expired"]
  11817. },
  11818. "time": {
  11819. "type": "object",
  11820. "properties": {
  11821. "created": {
  11822. "anyOf": [
  11823. {
  11824. "type": "number"
  11825. },
  11826. {
  11827. "type": "string",
  11828. "enum": ["NaN"]
  11829. },
  11830. {
  11831. "type": "string",
  11832. "enum": ["Infinity"]
  11833. },
  11834. {
  11835. "type": "string",
  11836. "enum": ["-Infinity"]
  11837. },
  11838. {
  11839. "type": "string",
  11840. "enum": ["Infinity", "-Infinity", "NaN"]
  11841. }
  11842. ]
  11843. },
  11844. "expires": {
  11845. "anyOf": [
  11846. {
  11847. "type": "number"
  11848. },
  11849. {
  11850. "type": "string",
  11851. "enum": ["NaN"]
  11852. },
  11853. {
  11854. "type": "string",
  11855. "enum": ["Infinity"]
  11856. },
  11857. {
  11858. "type": "string",
  11859. "enum": ["-Infinity"]
  11860. },
  11861. {
  11862. "type": "string",
  11863. "enum": ["Infinity", "-Infinity", "NaN"]
  11864. }
  11865. ]
  11866. }
  11867. },
  11868. "required": ["created", "expires"],
  11869. "additionalProperties": false
  11870. }
  11871. },
  11872. "required": ["status", "time"],
  11873. "additionalProperties": false
  11874. }
  11875. ]
  11876. }
  11877. },
  11878. "required": ["location", "data"],
  11879. "additionalProperties": false
  11880. }
  11881. }
  11882. }
  11883. },
  11884. "400": {
  11885. "description": "InvalidRequestError",
  11886. "content": {
  11887. "application/json": {
  11888. "schema": {
  11889. "$ref": "#/components/schemas/InvalidRequestError"
  11890. }
  11891. }
  11892. }
  11893. },
  11894. "401": {
  11895. "description": "UnauthorizedError",
  11896. "content": {
  11897. "application/json": {
  11898. "schema": {
  11899. "$ref": "#/components/schemas/UnauthorizedError"
  11900. }
  11901. }
  11902. }
  11903. }
  11904. },
  11905. "description": "Poll the current status of an OAuth attempt.",
  11906. "summary": "Get OAuth attempt status",
  11907. "x-codeSamples": [
  11908. {
  11909. "lang": "js",
  11910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  11911. }
  11912. ]
  11913. },
  11914. "delete": {
  11915. "tags": ["integrations"],
  11916. "operationId": "v2.integration.attempt.cancel",
  11917. "parameters": [
  11918. {
  11919. "name": "attemptID",
  11920. "in": "path",
  11921. "schema": {
  11922. "type": "string"
  11923. },
  11924. "required": true
  11925. },
  11926. {
  11927. "name": "location",
  11928. "in": "query",
  11929. "schema": {
  11930. "type": "object",
  11931. "properties": {
  11932. "directory": {
  11933. "type": "string"
  11934. },
  11935. "workspace": {
  11936. "type": "string"
  11937. }
  11938. },
  11939. "additionalProperties": false
  11940. },
  11941. "required": false,
  11942. "style": "deepObject",
  11943. "explode": true
  11944. }
  11945. ],
  11946. "security": [],
  11947. "responses": {
  11948. "204": {
  11949. "description": "<No Content>"
  11950. },
  11951. "400": {
  11952. "description": "InvalidRequestError",
  11953. "content": {
  11954. "application/json": {
  11955. "schema": {
  11956. "$ref": "#/components/schemas/InvalidRequestError"
  11957. }
  11958. }
  11959. }
  11960. },
  11961. "401": {
  11962. "description": "UnauthorizedError",
  11963. "content": {
  11964. "application/json": {
  11965. "schema": {
  11966. "$ref": "#/components/schemas/UnauthorizedError"
  11967. }
  11968. }
  11969. }
  11970. }
  11971. },
  11972. "description": "Cancel an OAuth attempt and release its resources.",
  11973. "summary": "Cancel OAuth connection",
  11974. "x-codeSamples": [
  11975. {
  11976. "lang": "js",
  11977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  11978. }
  11979. ]
  11980. }
  11981. },
  11982. "/api/integration/attempt/{attemptID}/complete": {
  11983. "post": {
  11984. "tags": ["integrations"],
  11985. "operationId": "v2.integration.attempt.complete",
  11986. "parameters": [
  11987. {
  11988. "name": "attemptID",
  11989. "in": "path",
  11990. "schema": {
  11991. "type": "string"
  11992. },
  11993. "required": true
  11994. },
  11995. {
  11996. "name": "location",
  11997. "in": "query",
  11998. "schema": {
  11999. "type": "object",
  12000. "properties": {
  12001. "directory": {
  12002. "type": "string"
  12003. },
  12004. "workspace": {
  12005. "type": "string"
  12006. }
  12007. },
  12008. "additionalProperties": false
  12009. },
  12010. "required": false,
  12011. "style": "deepObject",
  12012. "explode": true
  12013. }
  12014. ],
  12015. "security": [],
  12016. "responses": {
  12017. "204": {
  12018. "description": "<No Content>"
  12019. },
  12020. "400": {
  12021. "description": "InvalidRequestError",
  12022. "content": {
  12023. "application/json": {
  12024. "schema": {
  12025. "anyOf": [
  12026. {
  12027. "$ref": "#/components/schemas/InvalidRequestError"
  12028. },
  12029. {
  12030. "$ref": "#/components/schemas/InvalidRequestError"
  12031. }
  12032. ]
  12033. }
  12034. }
  12035. }
  12036. },
  12037. "401": {
  12038. "description": "UnauthorizedError",
  12039. "content": {
  12040. "application/json": {
  12041. "schema": {
  12042. "$ref": "#/components/schemas/UnauthorizedError"
  12043. }
  12044. }
  12045. }
  12046. }
  12047. },
  12048. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12049. "summary": "Complete OAuth connection",
  12050. "requestBody": {
  12051. "content": {
  12052. "application/json": {
  12053. "schema": {
  12054. "type": "object",
  12055. "properties": {
  12056. "code": {
  12057. "type": "string"
  12058. }
  12059. },
  12060. "additionalProperties": false
  12061. }
  12062. }
  12063. },
  12064. "required": true
  12065. },
  12066. "x-codeSamples": [
  12067. {
  12068. "lang": "js",
  12069. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12070. }
  12071. ]
  12072. }
  12073. },
  12074. "/api/credential/{credentialID}": {
  12075. "patch": {
  12076. "tags": ["opencode HttpApi"],
  12077. "operationId": "v2.credential.update",
  12078. "parameters": [
  12079. {
  12080. "name": "credentialID",
  12081. "in": "path",
  12082. "schema": {
  12083. "type": "string"
  12084. },
  12085. "required": true
  12086. }
  12087. ],
  12088. "security": [],
  12089. "responses": {
  12090. "204": {
  12091. "description": "<No Content>"
  12092. },
  12093. "400": {
  12094. "description": "InvalidRequestError",
  12095. "content": {
  12096. "application/json": {
  12097. "schema": {
  12098. "$ref": "#/components/schemas/InvalidRequestError"
  12099. }
  12100. }
  12101. }
  12102. },
  12103. "401": {
  12104. "description": "UnauthorizedError",
  12105. "content": {
  12106. "application/json": {
  12107. "schema": {
  12108. "$ref": "#/components/schemas/UnauthorizedError"
  12109. }
  12110. }
  12111. }
  12112. }
  12113. },
  12114. "description": "Update a stored credential label.",
  12115. "summary": "Update credential",
  12116. "requestBody": {
  12117. "content": {
  12118. "application/json": {
  12119. "schema": {
  12120. "type": "object",
  12121. "properties": {
  12122. "label": {
  12123. "type": "string"
  12124. }
  12125. },
  12126. "required": ["label"],
  12127. "additionalProperties": false
  12128. }
  12129. }
  12130. },
  12131. "required": true
  12132. },
  12133. "x-codeSamples": [
  12134. {
  12135. "lang": "js",
  12136. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12137. }
  12138. ]
  12139. },
  12140. "delete": {
  12141. "tags": ["opencode HttpApi"],
  12142. "operationId": "v2.credential.remove",
  12143. "parameters": [
  12144. {
  12145. "name": "credentialID",
  12146. "in": "path",
  12147. "schema": {
  12148. "type": "string"
  12149. },
  12150. "required": true
  12151. }
  12152. ],
  12153. "security": [],
  12154. "responses": {
  12155. "204": {
  12156. "description": "<No Content>"
  12157. },
  12158. "400": {
  12159. "description": "InvalidRequestError",
  12160. "content": {
  12161. "application/json": {
  12162. "schema": {
  12163. "$ref": "#/components/schemas/InvalidRequestError"
  12164. }
  12165. }
  12166. }
  12167. },
  12168. "401": {
  12169. "description": "UnauthorizedError",
  12170. "content": {
  12171. "application/json": {
  12172. "schema": {
  12173. "$ref": "#/components/schemas/UnauthorizedError"
  12174. }
  12175. }
  12176. }
  12177. }
  12178. },
  12179. "description": "Remove a stored integration credential.",
  12180. "summary": "Remove credential",
  12181. "x-codeSamples": [
  12182. {
  12183. "lang": "js",
  12184. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12185. }
  12186. ]
  12187. }
  12188. },
  12189. "/api/permission/request": {
  12190. "get": {
  12191. "tags": ["permissions"],
  12192. "operationId": "v2.permission.request.list",
  12193. "parameters": [
  12194. {
  12195. "name": "location",
  12196. "in": "query",
  12197. "schema": {
  12198. "type": "object",
  12199. "properties": {
  12200. "directory": {
  12201. "type": "string"
  12202. },
  12203. "workspace": {
  12204. "type": "string"
  12205. }
  12206. },
  12207. "additionalProperties": false
  12208. },
  12209. "required": false,
  12210. "style": "deepObject",
  12211. "explode": true
  12212. }
  12213. ],
  12214. "security": [],
  12215. "responses": {
  12216. "200": {
  12217. "description": "Success",
  12218. "content": {
  12219. "application/json": {
  12220. "schema": {
  12221. "type": "object",
  12222. "properties": {
  12223. "location": {
  12224. "$ref": "#/components/schemas/LocationInfo"
  12225. },
  12226. "data": {
  12227. "type": "array",
  12228. "items": {
  12229. "$ref": "#/components/schemas/PermissionV2Request"
  12230. }
  12231. }
  12232. },
  12233. "required": ["location", "data"],
  12234. "additionalProperties": false
  12235. }
  12236. }
  12237. }
  12238. },
  12239. "400": {
  12240. "description": "InvalidRequestError",
  12241. "content": {
  12242. "application/json": {
  12243. "schema": {
  12244. "$ref": "#/components/schemas/InvalidRequestError"
  12245. }
  12246. }
  12247. }
  12248. },
  12249. "401": {
  12250. "description": "UnauthorizedError",
  12251. "content": {
  12252. "application/json": {
  12253. "schema": {
  12254. "$ref": "#/components/schemas/UnauthorizedError"
  12255. }
  12256. }
  12257. }
  12258. }
  12259. },
  12260. "description": "Retrieve pending permission requests for a location.",
  12261. "summary": "List pending permission requests",
  12262. "x-codeSamples": [
  12263. {
  12264. "lang": "js",
  12265. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12266. }
  12267. ]
  12268. }
  12269. },
  12270. "/api/permission/saved": {
  12271. "get": {
  12272. "tags": ["permissions"],
  12273. "operationId": "v2.permission.saved.list",
  12274. "parameters": [
  12275. {
  12276. "name": "projectID",
  12277. "in": "query",
  12278. "schema": {
  12279. "type": "string"
  12280. },
  12281. "required": false
  12282. }
  12283. ],
  12284. "security": [],
  12285. "responses": {
  12286. "200": {
  12287. "description": "Success",
  12288. "content": {
  12289. "application/json": {
  12290. "schema": {
  12291. "type": "object",
  12292. "properties": {
  12293. "data": {
  12294. "type": "array",
  12295. "items": {
  12296. "$ref": "#/components/schemas/PermissionSavedInfo"
  12297. }
  12298. }
  12299. },
  12300. "required": ["data"],
  12301. "additionalProperties": false
  12302. }
  12303. }
  12304. }
  12305. },
  12306. "400": {
  12307. "description": "InvalidRequestError",
  12308. "content": {
  12309. "application/json": {
  12310. "schema": {
  12311. "$ref": "#/components/schemas/InvalidRequestError"
  12312. }
  12313. }
  12314. }
  12315. },
  12316. "401": {
  12317. "description": "UnauthorizedError",
  12318. "content": {
  12319. "application/json": {
  12320. "schema": {
  12321. "$ref": "#/components/schemas/UnauthorizedError"
  12322. }
  12323. }
  12324. }
  12325. }
  12326. },
  12327. "description": "Retrieve saved permissions, optionally filtered by project.",
  12328. "summary": "List saved permissions",
  12329. "x-codeSamples": [
  12330. {
  12331. "lang": "js",
  12332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12333. }
  12334. ]
  12335. }
  12336. },
  12337. "/api/permission/saved/{id}": {
  12338. "delete": {
  12339. "tags": ["permissions"],
  12340. "operationId": "v2.permission.saved.remove",
  12341. "parameters": [
  12342. {
  12343. "name": "id",
  12344. "in": "path",
  12345. "schema": {
  12346. "type": "string"
  12347. },
  12348. "required": true
  12349. }
  12350. ],
  12351. "security": [],
  12352. "responses": {
  12353. "204": {
  12354. "description": "<No Content>"
  12355. },
  12356. "400": {
  12357. "description": "InvalidRequestError",
  12358. "content": {
  12359. "application/json": {
  12360. "schema": {
  12361. "$ref": "#/components/schemas/InvalidRequestError"
  12362. }
  12363. }
  12364. }
  12365. },
  12366. "401": {
  12367. "description": "UnauthorizedError",
  12368. "content": {
  12369. "application/json": {
  12370. "schema": {
  12371. "$ref": "#/components/schemas/UnauthorizedError"
  12372. }
  12373. }
  12374. }
  12375. }
  12376. },
  12377. "description": "Remove a saved permission by ID.",
  12378. "summary": "Remove saved permission",
  12379. "x-codeSamples": [
  12380. {
  12381. "lang": "js",
  12382. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12383. }
  12384. ]
  12385. }
  12386. },
  12387. "/api/session/{sessionID}/permission": {
  12388. "get": {
  12389. "tags": ["permissions"],
  12390. "operationId": "v2.session.permission.list",
  12391. "parameters": [
  12392. {
  12393. "name": "sessionID",
  12394. "in": "path",
  12395. "schema": {
  12396. "type": "string",
  12397. "pattern": "^ses"
  12398. },
  12399. "required": true
  12400. }
  12401. ],
  12402. "security": [],
  12403. "responses": {
  12404. "200": {
  12405. "description": "Success",
  12406. "content": {
  12407. "application/json": {
  12408. "schema": {
  12409. "type": "object",
  12410. "properties": {
  12411. "data": {
  12412. "type": "array",
  12413. "items": {
  12414. "$ref": "#/components/schemas/PermissionV2Request"
  12415. }
  12416. }
  12417. },
  12418. "required": ["data"],
  12419. "additionalProperties": false
  12420. }
  12421. }
  12422. }
  12423. },
  12424. "400": {
  12425. "description": "InvalidRequestError",
  12426. "content": {
  12427. "application/json": {
  12428. "schema": {
  12429. "$ref": "#/components/schemas/InvalidRequestError"
  12430. }
  12431. }
  12432. }
  12433. },
  12434. "401": {
  12435. "description": "UnauthorizedError",
  12436. "content": {
  12437. "application/json": {
  12438. "schema": {
  12439. "$ref": "#/components/schemas/UnauthorizedError"
  12440. }
  12441. }
  12442. }
  12443. },
  12444. "404": {
  12445. "description": "SessionNotFoundError",
  12446. "content": {
  12447. "application/json": {
  12448. "schema": {
  12449. "anyOf": [
  12450. {
  12451. "$ref": "#/components/schemas/SessionNotFoundError"
  12452. },
  12453. {
  12454. "$ref": "#/components/schemas/SessionNotFoundError"
  12455. }
  12456. ]
  12457. }
  12458. }
  12459. }
  12460. }
  12461. },
  12462. "description": "Retrieve pending permission requests owned by a session.",
  12463. "summary": "List session permission requests",
  12464. "x-codeSamples": [
  12465. {
  12466. "lang": "js",
  12467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12468. }
  12469. ]
  12470. }
  12471. },
  12472. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12473. "post": {
  12474. "tags": ["permissions"],
  12475. "operationId": "v2.session.permission.reply",
  12476. "parameters": [
  12477. {
  12478. "name": "sessionID",
  12479. "in": "path",
  12480. "schema": {
  12481. "type": "string",
  12482. "pattern": "^ses"
  12483. },
  12484. "required": true
  12485. },
  12486. {
  12487. "name": "requestID",
  12488. "in": "path",
  12489. "schema": {
  12490. "type": "string",
  12491. "pattern": "^per"
  12492. },
  12493. "required": true
  12494. }
  12495. ],
  12496. "security": [],
  12497. "responses": {
  12498. "204": {
  12499. "description": "<No Content>"
  12500. },
  12501. "400": {
  12502. "description": "InvalidRequestError",
  12503. "content": {
  12504. "application/json": {
  12505. "schema": {
  12506. "$ref": "#/components/schemas/InvalidRequestError"
  12507. }
  12508. }
  12509. }
  12510. },
  12511. "401": {
  12512. "description": "UnauthorizedError",
  12513. "content": {
  12514. "application/json": {
  12515. "schema": {
  12516. "$ref": "#/components/schemas/UnauthorizedError"
  12517. }
  12518. }
  12519. }
  12520. },
  12521. "404": {
  12522. "description": "SessionNotFoundError | PermissionNotFoundError",
  12523. "content": {
  12524. "application/json": {
  12525. "schema": {
  12526. "anyOf": [
  12527. {
  12528. "$ref": "#/components/schemas/PermissionNotFoundError"
  12529. },
  12530. {
  12531. "$ref": "#/components/schemas/SessionNotFoundError"
  12532. },
  12533. {
  12534. "$ref": "#/components/schemas/SessionNotFoundError"
  12535. }
  12536. ]
  12537. }
  12538. }
  12539. }
  12540. }
  12541. },
  12542. "description": "Respond to a pending permission request owned by a session.",
  12543. "summary": "Reply to pending permission request",
  12544. "requestBody": {
  12545. "content": {
  12546. "application/json": {
  12547. "schema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "reply": {
  12551. "$ref": "#/components/schemas/PermissionV2Reply"
  12552. },
  12553. "message": {
  12554. "type": "string"
  12555. }
  12556. },
  12557. "required": ["reply"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. },
  12562. "required": true
  12563. },
  12564. "x-codeSamples": [
  12565. {
  12566. "lang": "js",
  12567. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12568. }
  12569. ]
  12570. }
  12571. },
  12572. "/api/fs/read/*": {
  12573. "get": {
  12574. "tags": ["filesystem"],
  12575. "operationId": "v2.fs.read",
  12576. "parameters": [
  12577. {
  12578. "name": "location",
  12579. "in": "query",
  12580. "schema": {
  12581. "type": "object",
  12582. "properties": {
  12583. "directory": {
  12584. "type": "string"
  12585. },
  12586. "workspace": {
  12587. "type": "string"
  12588. }
  12589. },
  12590. "additionalProperties": false
  12591. },
  12592. "required": false,
  12593. "style": "deepObject",
  12594. "explode": true
  12595. }
  12596. ],
  12597. "security": [],
  12598. "responses": {
  12599. "200": {
  12600. "description": "Success",
  12601. "content": {
  12602. "application/octet-stream": {
  12603. "schema": {
  12604. "type": "string",
  12605. "format": "binary"
  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": "Serve one file relative to the requested location.",
  12632. "summary": "Read file",
  12633. "x-codeSamples": [
  12634. {
  12635. "lang": "js",
  12636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12637. }
  12638. ]
  12639. }
  12640. },
  12641. "/api/fs/list": {
  12642. "get": {
  12643. "tags": ["filesystem"],
  12644. "operationId": "v2.fs.list",
  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": "path",
  12667. "in": "query",
  12668. "schema": {
  12669. "type": "string"
  12670. },
  12671. "required": false
  12672. }
  12673. ],
  12674. "security": [],
  12675. "responses": {
  12676. "200": {
  12677. "description": "Success",
  12678. "content": {
  12679. "application/json": {
  12680. "schema": {
  12681. "type": "object",
  12682. "properties": {
  12683. "location": {
  12684. "$ref": "#/components/schemas/LocationInfo"
  12685. },
  12686. "data": {
  12687. "type": "array",
  12688. "items": {
  12689. "$ref": "#/components/schemas/FileSystemEntry"
  12690. }
  12691. }
  12692. },
  12693. "required": ["location", "data"],
  12694. "additionalProperties": false
  12695. }
  12696. }
  12697. }
  12698. },
  12699. "400": {
  12700. "description": "InvalidRequestError",
  12701. "content": {
  12702. "application/json": {
  12703. "schema": {
  12704. "$ref": "#/components/schemas/InvalidRequestError"
  12705. }
  12706. }
  12707. }
  12708. },
  12709. "401": {
  12710. "description": "UnauthorizedError",
  12711. "content": {
  12712. "application/json": {
  12713. "schema": {
  12714. "$ref": "#/components/schemas/UnauthorizedError"
  12715. }
  12716. }
  12717. }
  12718. }
  12719. },
  12720. "description": "List direct children of one directory relative to the requested location.",
  12721. "summary": "List directory",
  12722. "x-codeSamples": [
  12723. {
  12724. "lang": "js",
  12725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12726. }
  12727. ]
  12728. }
  12729. },
  12730. "/api/fs/find": {
  12731. "get": {
  12732. "tags": ["filesystem"],
  12733. "operationId": "v2.fs.find",
  12734. "parameters": [
  12735. {
  12736. "name": "location",
  12737. "in": "query",
  12738. "schema": {
  12739. "type": "object",
  12740. "properties": {
  12741. "directory": {
  12742. "type": "string"
  12743. },
  12744. "workspace": {
  12745. "type": "string"
  12746. }
  12747. },
  12748. "additionalProperties": false
  12749. },
  12750. "required": false,
  12751. "style": "deepObject",
  12752. "explode": true
  12753. },
  12754. {
  12755. "name": "query",
  12756. "in": "query",
  12757. "schema": {
  12758. "type": "string"
  12759. },
  12760. "required": true
  12761. },
  12762. {
  12763. "name": "type",
  12764. "in": "query",
  12765. "schema": {
  12766. "type": "string",
  12767. "enum": ["file", "directory"]
  12768. },
  12769. "required": false
  12770. },
  12771. {
  12772. "name": "limit",
  12773. "in": "query",
  12774. "schema": {
  12775. "type": "string"
  12776. },
  12777. "required": false
  12778. }
  12779. ],
  12780. "security": [],
  12781. "responses": {
  12782. "200": {
  12783. "description": "Success",
  12784. "content": {
  12785. "application/json": {
  12786. "schema": {
  12787. "type": "object",
  12788. "properties": {
  12789. "location": {
  12790. "$ref": "#/components/schemas/LocationInfo"
  12791. },
  12792. "data": {
  12793. "type": "array",
  12794. "items": {
  12795. "$ref": "#/components/schemas/FileSystemEntry"
  12796. }
  12797. }
  12798. },
  12799. "required": ["location", "data"],
  12800. "additionalProperties": false
  12801. }
  12802. }
  12803. }
  12804. },
  12805. "400": {
  12806. "description": "InvalidRequestError",
  12807. "content": {
  12808. "application/json": {
  12809. "schema": {
  12810. "$ref": "#/components/schemas/InvalidRequestError"
  12811. }
  12812. }
  12813. }
  12814. },
  12815. "401": {
  12816. "description": "UnauthorizedError",
  12817. "content": {
  12818. "application/json": {
  12819. "schema": {
  12820. "$ref": "#/components/schemas/UnauthorizedError"
  12821. }
  12822. }
  12823. }
  12824. }
  12825. },
  12826. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12827. "summary": "Find files",
  12828. "x-codeSamples": [
  12829. {
  12830. "lang": "js",
  12831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12832. }
  12833. ]
  12834. }
  12835. },
  12836. "/api/command": {
  12837. "get": {
  12838. "tags": ["commands"],
  12839. "operationId": "v2.command.list",
  12840. "parameters": [
  12841. {
  12842. "name": "location",
  12843. "in": "query",
  12844. "schema": {
  12845. "type": "object",
  12846. "properties": {
  12847. "directory": {
  12848. "type": "string"
  12849. },
  12850. "workspace": {
  12851. "type": "string"
  12852. }
  12853. },
  12854. "additionalProperties": false
  12855. },
  12856. "required": false,
  12857. "style": "deepObject",
  12858. "explode": true
  12859. }
  12860. ],
  12861. "security": [],
  12862. "responses": {
  12863. "200": {
  12864. "description": "Success",
  12865. "content": {
  12866. "application/json": {
  12867. "schema": {
  12868. "type": "object",
  12869. "properties": {
  12870. "location": {
  12871. "$ref": "#/components/schemas/LocationInfo"
  12872. },
  12873. "data": {
  12874. "type": "array",
  12875. "items": {
  12876. "$ref": "#/components/schemas/CommandV2Info"
  12877. }
  12878. }
  12879. },
  12880. "required": ["location", "data"],
  12881. "additionalProperties": false
  12882. }
  12883. }
  12884. }
  12885. },
  12886. "400": {
  12887. "description": "InvalidRequestError",
  12888. "content": {
  12889. "application/json": {
  12890. "schema": {
  12891. "$ref": "#/components/schemas/InvalidRequestError"
  12892. }
  12893. }
  12894. }
  12895. },
  12896. "401": {
  12897. "description": "UnauthorizedError",
  12898. "content": {
  12899. "application/json": {
  12900. "schema": {
  12901. "$ref": "#/components/schemas/UnauthorizedError"
  12902. }
  12903. }
  12904. }
  12905. }
  12906. },
  12907. "description": "Retrieve currently registered commands.",
  12908. "summary": "List commands",
  12909. "x-codeSamples": [
  12910. {
  12911. "lang": "js",
  12912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  12913. }
  12914. ]
  12915. }
  12916. },
  12917. "/api/skill": {
  12918. "get": {
  12919. "tags": ["skills"],
  12920. "operationId": "v2.skill.list",
  12921. "parameters": [
  12922. {
  12923. "name": "location",
  12924. "in": "query",
  12925. "schema": {
  12926. "type": "object",
  12927. "properties": {
  12928. "directory": {
  12929. "type": "string"
  12930. },
  12931. "workspace": {
  12932. "type": "string"
  12933. }
  12934. },
  12935. "additionalProperties": false
  12936. },
  12937. "required": false,
  12938. "style": "deepObject",
  12939. "explode": true
  12940. }
  12941. ],
  12942. "security": [],
  12943. "responses": {
  12944. "200": {
  12945. "description": "Success",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "type": "object",
  12950. "properties": {
  12951. "location": {
  12952. "$ref": "#/components/schemas/LocationInfo"
  12953. },
  12954. "data": {
  12955. "type": "array",
  12956. "items": {
  12957. "$ref": "#/components/schemas/SkillV2Info"
  12958. }
  12959. }
  12960. },
  12961. "required": ["location", "data"],
  12962. "additionalProperties": false
  12963. }
  12964. }
  12965. }
  12966. },
  12967. "400": {
  12968. "description": "InvalidRequestError",
  12969. "content": {
  12970. "application/json": {
  12971. "schema": {
  12972. "$ref": "#/components/schemas/InvalidRequestError"
  12973. }
  12974. }
  12975. }
  12976. },
  12977. "401": {
  12978. "description": "UnauthorizedError",
  12979. "content": {
  12980. "application/json": {
  12981. "schema": {
  12982. "$ref": "#/components/schemas/UnauthorizedError"
  12983. }
  12984. }
  12985. }
  12986. }
  12987. },
  12988. "description": "Retrieve currently registered skills.",
  12989. "summary": "List skills",
  12990. "x-codeSamples": [
  12991. {
  12992. "lang": "js",
  12993. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12994. }
  12995. ]
  12996. }
  12997. },
  12998. "/api/event": {
  12999. "get": {
  13000. "tags": ["events"],
  13001. "operationId": "v2.event.subscribe",
  13002. "parameters": [
  13003. {
  13004. "name": "location",
  13005. "in": "query",
  13006. "schema": {
  13007. "type": "object",
  13008. "properties": {
  13009. "directory": {
  13010. "type": "string"
  13011. },
  13012. "workspace": {
  13013. "type": "string"
  13014. }
  13015. },
  13016. "additionalProperties": false
  13017. },
  13018. "required": false,
  13019. "style": "deepObject",
  13020. "explode": true
  13021. }
  13022. ],
  13023. "security": [],
  13024. "responses": {
  13025. "200": {
  13026. "description": "Success",
  13027. "content": {
  13028. "text/event-stream": {
  13029. "schema": {
  13030. "type": "string"
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "400": {
  13036. "description": "InvalidRequestError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/InvalidRequestError"
  13041. }
  13042. }
  13043. }
  13044. },
  13045. "401": {
  13046. "description": "UnauthorizedError",
  13047. "content": {
  13048. "application/json": {
  13049. "schema": {
  13050. "$ref": "#/components/schemas/UnauthorizedError"
  13051. }
  13052. }
  13053. }
  13054. }
  13055. },
  13056. "description": "Subscribe to native event payloads for a location.",
  13057. "summary": "Subscribe to events",
  13058. "x-codeSamples": [
  13059. {
  13060. "lang": "js",
  13061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13062. }
  13063. ]
  13064. }
  13065. },
  13066. "/api/question/request": {
  13067. "get": {
  13068. "tags": ["session questions"],
  13069. "operationId": "v2.question.request.list",
  13070. "parameters": [
  13071. {
  13072. "name": "location",
  13073. "in": "query",
  13074. "schema": {
  13075. "type": "object",
  13076. "properties": {
  13077. "directory": {
  13078. "type": "string"
  13079. },
  13080. "workspace": {
  13081. "type": "string"
  13082. }
  13083. },
  13084. "additionalProperties": false
  13085. },
  13086. "required": false,
  13087. "style": "deepObject",
  13088. "explode": true
  13089. }
  13090. ],
  13091. "security": [],
  13092. "responses": {
  13093. "200": {
  13094. "description": "Success",
  13095. "content": {
  13096. "application/json": {
  13097. "schema": {
  13098. "type": "object",
  13099. "properties": {
  13100. "location": {
  13101. "$ref": "#/components/schemas/LocationInfo"
  13102. },
  13103. "data": {
  13104. "type": "array",
  13105. "items": {
  13106. "$ref": "#/components/schemas/QuestionV2Request"
  13107. }
  13108. }
  13109. },
  13110. "required": ["location", "data"],
  13111. "additionalProperties": false
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "400": {
  13117. "description": "InvalidRequestError",
  13118. "content": {
  13119. "application/json": {
  13120. "schema": {
  13121. "$ref": "#/components/schemas/InvalidRequestError"
  13122. }
  13123. }
  13124. }
  13125. },
  13126. "401": {
  13127. "description": "UnauthorizedError",
  13128. "content": {
  13129. "application/json": {
  13130. "schema": {
  13131. "$ref": "#/components/schemas/UnauthorizedError"
  13132. }
  13133. }
  13134. }
  13135. }
  13136. },
  13137. "description": "Retrieve pending question requests for a location.",
  13138. "summary": "List pending question requests",
  13139. "x-codeSamples": [
  13140. {
  13141. "lang": "js",
  13142. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13143. }
  13144. ]
  13145. }
  13146. },
  13147. "/api/session/{sessionID}/question": {
  13148. "get": {
  13149. "tags": ["session questions"],
  13150. "operationId": "v2.session.question.list",
  13151. "parameters": [
  13152. {
  13153. "name": "sessionID",
  13154. "in": "path",
  13155. "schema": {
  13156. "type": "string",
  13157. "pattern": "^ses"
  13158. },
  13159. "required": true
  13160. }
  13161. ],
  13162. "security": [],
  13163. "responses": {
  13164. "200": {
  13165. "description": "Success",
  13166. "content": {
  13167. "application/json": {
  13168. "schema": {
  13169. "type": "object",
  13170. "properties": {
  13171. "data": {
  13172. "type": "array",
  13173. "items": {
  13174. "$ref": "#/components/schemas/QuestionV2Request"
  13175. }
  13176. }
  13177. },
  13178. "required": ["data"],
  13179. "additionalProperties": false
  13180. }
  13181. }
  13182. }
  13183. },
  13184. "400": {
  13185. "description": "InvalidRequestError",
  13186. "content": {
  13187. "application/json": {
  13188. "schema": {
  13189. "$ref": "#/components/schemas/InvalidRequestError"
  13190. }
  13191. }
  13192. }
  13193. },
  13194. "401": {
  13195. "description": "UnauthorizedError",
  13196. "content": {
  13197. "application/json": {
  13198. "schema": {
  13199. "$ref": "#/components/schemas/UnauthorizedError"
  13200. }
  13201. }
  13202. }
  13203. },
  13204. "404": {
  13205. "description": "SessionNotFoundError",
  13206. "content": {
  13207. "application/json": {
  13208. "schema": {
  13209. "anyOf": [
  13210. {
  13211. "$ref": "#/components/schemas/SessionNotFoundError"
  13212. },
  13213. {
  13214. "$ref": "#/components/schemas/SessionNotFoundError"
  13215. }
  13216. ]
  13217. }
  13218. }
  13219. }
  13220. }
  13221. },
  13222. "description": "Retrieve pending question requests owned by a session.",
  13223. "summary": "List session question requests",
  13224. "x-codeSamples": [
  13225. {
  13226. "lang": "js",
  13227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  13228. }
  13229. ]
  13230. }
  13231. },
  13232. "/api/session/{sessionID}/question/{requestID}/reply": {
  13233. "post": {
  13234. "tags": ["session questions"],
  13235. "operationId": "v2.session.question.reply",
  13236. "parameters": [
  13237. {
  13238. "name": "sessionID",
  13239. "in": "path",
  13240. "schema": {
  13241. "type": "string",
  13242. "pattern": "^ses"
  13243. },
  13244. "required": true
  13245. },
  13246. {
  13247. "name": "requestID",
  13248. "in": "path",
  13249. "schema": {
  13250. "type": "string",
  13251. "pattern": "^que"
  13252. },
  13253. "required": true
  13254. }
  13255. ],
  13256. "security": [],
  13257. "responses": {
  13258. "204": {
  13259. "description": "<No Content>"
  13260. },
  13261. "400": {
  13262. "description": "InvalidRequestError",
  13263. "content": {
  13264. "application/json": {
  13265. "schema": {
  13266. "$ref": "#/components/schemas/InvalidRequestError"
  13267. }
  13268. }
  13269. }
  13270. },
  13271. "401": {
  13272. "description": "UnauthorizedError",
  13273. "content": {
  13274. "application/json": {
  13275. "schema": {
  13276. "$ref": "#/components/schemas/UnauthorizedError"
  13277. }
  13278. }
  13279. }
  13280. },
  13281. "404": {
  13282. "description": "SessionNotFoundError | QuestionNotFoundError",
  13283. "content": {
  13284. "application/json": {
  13285. "schema": {
  13286. "anyOf": [
  13287. {
  13288. "$ref": "#/components/schemas/QuestionNotFoundError"
  13289. },
  13290. {
  13291. "$ref": "#/components/schemas/SessionNotFoundError"
  13292. },
  13293. {
  13294. "$ref": "#/components/schemas/SessionNotFoundError"
  13295. }
  13296. ]
  13297. }
  13298. }
  13299. }
  13300. }
  13301. },
  13302. "description": "Answer a pending question request owned by a session.",
  13303. "summary": "Reply to pending question request",
  13304. "requestBody": {
  13305. "content": {
  13306. "application/json": {
  13307. "schema": {
  13308. "$ref": "#/components/schemas/QuestionV2Reply"
  13309. }
  13310. }
  13311. },
  13312. "required": true
  13313. },
  13314. "x-codeSamples": [
  13315. {
  13316. "lang": "js",
  13317. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  13318. }
  13319. ]
  13320. }
  13321. },
  13322. "/api/session/{sessionID}/question/{requestID}/reject": {
  13323. "post": {
  13324. "tags": ["session questions"],
  13325. "operationId": "v2.session.question.reject",
  13326. "parameters": [
  13327. {
  13328. "name": "sessionID",
  13329. "in": "path",
  13330. "schema": {
  13331. "type": "string",
  13332. "pattern": "^ses"
  13333. },
  13334. "required": true
  13335. },
  13336. {
  13337. "name": "requestID",
  13338. "in": "path",
  13339. "schema": {
  13340. "type": "string",
  13341. "pattern": "^que"
  13342. },
  13343. "required": true
  13344. }
  13345. ],
  13346. "security": [],
  13347. "responses": {
  13348. "204": {
  13349. "description": "<No Content>"
  13350. },
  13351. "400": {
  13352. "description": "InvalidRequestError",
  13353. "content": {
  13354. "application/json": {
  13355. "schema": {
  13356. "$ref": "#/components/schemas/InvalidRequestError"
  13357. }
  13358. }
  13359. }
  13360. },
  13361. "401": {
  13362. "description": "UnauthorizedError",
  13363. "content": {
  13364. "application/json": {
  13365. "schema": {
  13366. "$ref": "#/components/schemas/UnauthorizedError"
  13367. }
  13368. }
  13369. }
  13370. },
  13371. "404": {
  13372. "description": "SessionNotFoundError | QuestionNotFoundError",
  13373. "content": {
  13374. "application/json": {
  13375. "schema": {
  13376. "anyOf": [
  13377. {
  13378. "$ref": "#/components/schemas/QuestionNotFoundError"
  13379. },
  13380. {
  13381. "$ref": "#/components/schemas/SessionNotFoundError"
  13382. },
  13383. {
  13384. "$ref": "#/components/schemas/SessionNotFoundError"
  13385. }
  13386. ]
  13387. }
  13388. }
  13389. }
  13390. }
  13391. },
  13392. "description": "Reject a pending question request owned by a session.",
  13393. "summary": "Reject pending question request",
  13394. "x-codeSamples": [
  13395. {
  13396. "lang": "js",
  13397. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  13398. }
  13399. ]
  13400. }
  13401. },
  13402. "/api/reference": {
  13403. "get": {
  13404. "tags": ["reference"],
  13405. "operationId": "v2.reference.list",
  13406. "parameters": [
  13407. {
  13408. "name": "location",
  13409. "in": "query",
  13410. "schema": {
  13411. "type": "object",
  13412. "properties": {
  13413. "directory": {
  13414. "type": "string"
  13415. },
  13416. "workspace": {
  13417. "type": "string"
  13418. }
  13419. },
  13420. "additionalProperties": false
  13421. },
  13422. "required": false,
  13423. "style": "deepObject",
  13424. "explode": true
  13425. }
  13426. ],
  13427. "security": [],
  13428. "responses": {
  13429. "200": {
  13430. "description": "Success",
  13431. "content": {
  13432. "application/json": {
  13433. "schema": {
  13434. "type": "object",
  13435. "properties": {
  13436. "location": {
  13437. "$ref": "#/components/schemas/LocationInfo"
  13438. },
  13439. "data": {
  13440. "type": "array",
  13441. "items": {
  13442. "$ref": "#/components/schemas/ReferenceInfo"
  13443. }
  13444. }
  13445. },
  13446. "required": ["location", "data"],
  13447. "additionalProperties": false
  13448. }
  13449. }
  13450. }
  13451. },
  13452. "400": {
  13453. "description": "InvalidRequestError",
  13454. "content": {
  13455. "application/json": {
  13456. "schema": {
  13457. "$ref": "#/components/schemas/InvalidRequestError"
  13458. }
  13459. }
  13460. }
  13461. },
  13462. "401": {
  13463. "description": "UnauthorizedError",
  13464. "content": {
  13465. "application/json": {
  13466. "schema": {
  13467. "$ref": "#/components/schemas/UnauthorizedError"
  13468. }
  13469. }
  13470. }
  13471. }
  13472. },
  13473. "description": "List references available in the requested location.",
  13474. "summary": "List references",
  13475. "x-codeSamples": [
  13476. {
  13477. "lang": "js",
  13478. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  13479. }
  13480. ]
  13481. }
  13482. },
  13483. "/pty/{ptyID}/connect": {
  13484. "get": {
  13485. "tags": ["pty"],
  13486. "operationId": "pty.connect",
  13487. "parameters": [
  13488. {
  13489. "name": "ptyID",
  13490. "in": "path",
  13491. "schema": {
  13492. "type": "string",
  13493. "pattern": "^pty"
  13494. },
  13495. "required": true
  13496. },
  13497. {
  13498. "in": "query",
  13499. "name": "directory",
  13500. "schema": {
  13501. "type": "string"
  13502. }
  13503. },
  13504. {
  13505. "in": "query",
  13506. "name": "workspace",
  13507. "schema": {
  13508. "type": "string"
  13509. }
  13510. },
  13511. {
  13512. "in": "query",
  13513. "name": "cursor",
  13514. "schema": {
  13515. "type": "string"
  13516. }
  13517. },
  13518. {
  13519. "in": "query",
  13520. "name": "ticket",
  13521. "schema": {
  13522. "type": "string"
  13523. }
  13524. }
  13525. ],
  13526. "responses": {
  13527. "200": {
  13528. "description": "Connected session",
  13529. "content": {
  13530. "application/json": {
  13531. "schema": {
  13532. "type": "boolean",
  13533. "description": "Connected session"
  13534. }
  13535. }
  13536. }
  13537. },
  13538. "403": {
  13539. "description": "Forbidden",
  13540. "content": {
  13541. "application/json": {
  13542. "schema": {
  13543. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  13544. }
  13545. }
  13546. }
  13547. },
  13548. "404": {
  13549. "description": "Not found",
  13550. "content": {
  13551. "application/json": {
  13552. "schema": {
  13553. "$ref": "#/components/schemas/NotFoundError"
  13554. }
  13555. }
  13556. }
  13557. }
  13558. },
  13559. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  13560. "summary": "Connect to PTY session",
  13561. "x-codeSamples": [
  13562. {
  13563. "lang": "js",
  13564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  13565. }
  13566. ]
  13567. }
  13568. }
  13569. },
  13570. "components": {
  13571. "schemas": {
  13572. "Event": {
  13573. "anyOf": [
  13574. {
  13575. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13576. },
  13577. {
  13578. "$ref": "#/components/schemas/EventPluginAdded"
  13579. },
  13580. {
  13581. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13582. },
  13583. {
  13584. "$ref": "#/components/schemas/EventSessionCreated"
  13585. },
  13586. {
  13587. "$ref": "#/components/schemas/EventSessionUpdated"
  13588. },
  13589. {
  13590. "$ref": "#/components/schemas/EventSessionDeleted"
  13591. },
  13592. {
  13593. "$ref": "#/components/schemas/EventMessageUpdated"
  13594. },
  13595. {
  13596. "$ref": "#/components/schemas/EventMessageRemoved"
  13597. },
  13598. {
  13599. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13600. },
  13601. {
  13602. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13603. },
  13604. {
  13605. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13606. },
  13607. {
  13608. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13609. },
  13610. {
  13611. "$ref": "#/components/schemas/EventSessionNextMoved"
  13612. },
  13613. {
  13614. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13615. },
  13616. {
  13617. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  13618. },
  13619. {
  13620. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  13621. },
  13622. {
  13623. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  13624. },
  13625. {
  13626. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  13627. },
  13628. {
  13629. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13630. },
  13631. {
  13632. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13633. },
  13634. {
  13635. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13636. },
  13637. {
  13638. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13639. },
  13640. {
  13641. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13642. },
  13643. {
  13644. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13645. },
  13646. {
  13647. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13648. },
  13649. {
  13650. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13651. },
  13652. {
  13653. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13654. },
  13655. {
  13656. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13657. },
  13658. {
  13659. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13660. },
  13661. {
  13662. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13663. },
  13664. {
  13665. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13666. },
  13667. {
  13668. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13669. },
  13670. {
  13671. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13672. },
  13673. {
  13674. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13675. },
  13676. {
  13677. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13678. },
  13679. {
  13680. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13681. },
  13682. {
  13683. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13684. },
  13685. {
  13686. "$ref": "#/components/schemas/EventSessionNextRetried"
  13687. },
  13688. {
  13689. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13690. },
  13691. {
  13692. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13693. },
  13694. {
  13695. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13696. },
  13697. {
  13698. "$ref": "#/components/schemas/EventMessagePartDelta"
  13699. },
  13700. {
  13701. "$ref": "#/components/schemas/EventSessionDiff"
  13702. },
  13703. {
  13704. "$ref": "#/components/schemas/EventSessionError"
  13705. },
  13706. {
  13707. "$ref": "#/components/schemas/EventInstallationUpdated"
  13708. },
  13709. {
  13710. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13711. },
  13712. {
  13713. "$ref": "#/components/schemas/EventFileEdited"
  13714. },
  13715. {
  13716. "$ref": "#/components/schemas/EventIntegrationUpdated"
  13717. },
  13718. {
  13719. "$ref": "#/components/schemas/EventPermissionV2Asked"
  13720. },
  13721. {
  13722. "$ref": "#/components/schemas/EventPermissionV2Replied"
  13723. },
  13724. {
  13725. "$ref": "#/components/schemas/EventReferenceUpdated"
  13726. },
  13727. {
  13728. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  13729. },
  13730. {
  13731. "$ref": "#/components/schemas/EventPtyCreated"
  13732. },
  13733. {
  13734. "$ref": "#/components/schemas/EventPtyUpdated"
  13735. },
  13736. {
  13737. "$ref": "#/components/schemas/EventPtyExited"
  13738. },
  13739. {
  13740. "$ref": "#/components/schemas/EventPtyDeleted"
  13741. },
  13742. {
  13743. "$ref": "#/components/schemas/EventQuestionV2Asked"
  13744. },
  13745. {
  13746. "$ref": "#/components/schemas/EventQuestionV2Replied"
  13747. },
  13748. {
  13749. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  13750. },
  13751. {
  13752. "$ref": "#/components/schemas/EventTodoUpdated"
  13753. },
  13754. {
  13755. "$ref": "#/components/schemas/EventLspUpdated"
  13756. },
  13757. {
  13758. "$ref": "#/components/schemas/EventPermissionAsked"
  13759. },
  13760. {
  13761. "$ref": "#/components/schemas/EventPermissionReplied"
  13762. },
  13763. {
  13764. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13765. },
  13766. {
  13767. "$ref": "#/components/schemas/Event.tui.command.execute"
  13768. },
  13769. {
  13770. "$ref": "#/components/schemas/Event.tui.toast.show"
  13771. },
  13772. {
  13773. "$ref": "#/components/schemas/Event.tui.session.select"
  13774. },
  13775. {
  13776. "$ref": "#/components/schemas/EventMcpToolsChanged"
  13777. },
  13778. {
  13779. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  13780. },
  13781. {
  13782. "$ref": "#/components/schemas/EventCommandExecuted"
  13783. },
  13784. {
  13785. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  13786. },
  13787. {
  13788. "$ref": "#/components/schemas/EventProjectUpdated"
  13789. },
  13790. {
  13791. "$ref": "#/components/schemas/EventSessionStatus"
  13792. },
  13793. {
  13794. "$ref": "#/components/schemas/EventSessionIdle"
  13795. },
  13796. {
  13797. "$ref": "#/components/schemas/EventQuestionAsked"
  13798. },
  13799. {
  13800. "$ref": "#/components/schemas/EventQuestionReplied"
  13801. },
  13802. {
  13803. "$ref": "#/components/schemas/EventQuestionRejected"
  13804. },
  13805. {
  13806. "$ref": "#/components/schemas/EventSessionCompacted"
  13807. },
  13808. {
  13809. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  13810. },
  13811. {
  13812. "$ref": "#/components/schemas/EventWorkspaceReady"
  13813. },
  13814. {
  13815. "$ref": "#/components/schemas/EventWorkspaceFailed"
  13816. },
  13817. {
  13818. "$ref": "#/components/schemas/EventWorkspaceStatus"
  13819. },
  13820. {
  13821. "$ref": "#/components/schemas/EventWorktreeReady"
  13822. },
  13823. {
  13824. "$ref": "#/components/schemas/EventWorktreeFailed"
  13825. },
  13826. {
  13827. "$ref": "#/components/schemas/EventServerConnected"
  13828. },
  13829. {
  13830. "$ref": "#/components/schemas/EventGlobalDisposed"
  13831. },
  13832. {
  13833. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  13834. }
  13835. ]
  13836. },
  13837. "QuestionReplied": {
  13838. "type": "object",
  13839. "properties": {
  13840. "sessionID": {
  13841. "type": "string",
  13842. "pattern": "^ses"
  13843. },
  13844. "requestID": {
  13845. "type": "string",
  13846. "pattern": "^que"
  13847. },
  13848. "answers": {
  13849. "type": "array",
  13850. "items": {
  13851. "$ref": "#/components/schemas/QuestionAnswer"
  13852. }
  13853. }
  13854. },
  13855. "required": ["sessionID", "requestID", "answers"],
  13856. "additionalProperties": false
  13857. },
  13858. "QuestionRejected": {
  13859. "type": "object",
  13860. "properties": {
  13861. "sessionID": {
  13862. "type": "string",
  13863. "pattern": "^ses"
  13864. },
  13865. "requestID": {
  13866. "type": "string",
  13867. "pattern": "^que"
  13868. }
  13869. },
  13870. "required": ["sessionID", "requestID"],
  13871. "additionalProperties": false
  13872. },
  13873. "OAuth": {
  13874. "type": "object",
  13875. "properties": {
  13876. "type": {
  13877. "type": "string",
  13878. "enum": ["oauth"]
  13879. },
  13880. "refresh": {
  13881. "type": "string"
  13882. },
  13883. "access": {
  13884. "type": "string"
  13885. },
  13886. "expires": {
  13887. "type": "integer",
  13888. "minimum": 0
  13889. },
  13890. "accountId": {
  13891. "type": "string"
  13892. },
  13893. "enterpriseUrl": {
  13894. "type": "string"
  13895. }
  13896. },
  13897. "required": ["type", "refresh", "access", "expires"],
  13898. "additionalProperties": false
  13899. },
  13900. "ApiAuth": {
  13901. "type": "object",
  13902. "properties": {
  13903. "type": {
  13904. "type": "string",
  13905. "enum": ["api"]
  13906. },
  13907. "key": {
  13908. "type": "string"
  13909. },
  13910. "metadata": {
  13911. "type": "object",
  13912. "additionalProperties": {
  13913. "type": "string"
  13914. }
  13915. }
  13916. },
  13917. "required": ["type", "key"],
  13918. "additionalProperties": false
  13919. },
  13920. "WellKnownAuth": {
  13921. "type": "object",
  13922. "properties": {
  13923. "type": {
  13924. "type": "string",
  13925. "enum": ["wellknown"]
  13926. },
  13927. "key": {
  13928. "type": "string"
  13929. },
  13930. "token": {
  13931. "type": "string"
  13932. }
  13933. },
  13934. "required": ["type", "key", "token"],
  13935. "additionalProperties": false
  13936. },
  13937. "Auth": {
  13938. "anyOf": [
  13939. {
  13940. "$ref": "#/components/schemas/OAuth"
  13941. },
  13942. {
  13943. "$ref": "#/components/schemas/ApiAuth"
  13944. },
  13945. {
  13946. "$ref": "#/components/schemas/WellKnownAuth"
  13947. }
  13948. ]
  13949. },
  13950. "effect_HttpApiError_BadRequest": {
  13951. "type": "object",
  13952. "properties": {
  13953. "_tag": {
  13954. "type": "string",
  13955. "enum": ["BadRequest"]
  13956. }
  13957. },
  13958. "required": ["_tag"],
  13959. "additionalProperties": false
  13960. },
  13961. "InvalidRequestError": {
  13962. "type": "object",
  13963. "properties": {
  13964. "_tag": {
  13965. "type": "string",
  13966. "enum": ["InvalidRequestError"]
  13967. },
  13968. "message": {
  13969. "type": "string"
  13970. },
  13971. "kind": {
  13972. "type": "string"
  13973. },
  13974. "field": {
  13975. "type": "string"
  13976. }
  13977. },
  13978. "required": ["_tag", "message"],
  13979. "additionalProperties": false
  13980. },
  13981. "MoveSessionError": {
  13982. "type": "object",
  13983. "properties": {
  13984. "name": {
  13985. "type": "string",
  13986. "enum": ["MoveSessionError"]
  13987. },
  13988. "data": {
  13989. "type": "object",
  13990. "properties": {
  13991. "message": {
  13992. "type": "string"
  13993. }
  13994. },
  13995. "required": ["message"],
  13996. "additionalProperties": false
  13997. }
  13998. },
  13999. "required": ["name", "data"],
  14000. "additionalProperties": false
  14001. },
  14002. "SnapshotFileDiff": {
  14003. "type": "object",
  14004. "properties": {
  14005. "file": {
  14006. "type": "string"
  14007. },
  14008. "patch": {
  14009. "type": "string"
  14010. },
  14011. "additions": {
  14012. "type": "number"
  14013. },
  14014. "deletions": {
  14015. "type": "number"
  14016. },
  14017. "status": {
  14018. "type": "string",
  14019. "enum": ["added", "deleted", "modified"]
  14020. }
  14021. },
  14022. "required": ["additions", "deletions"],
  14023. "additionalProperties": false
  14024. },
  14025. "PermissionAction": {
  14026. "type": "string",
  14027. "enum": ["allow", "deny", "ask"]
  14028. },
  14029. "PermissionRule": {
  14030. "type": "object",
  14031. "properties": {
  14032. "permission": {
  14033. "type": "string"
  14034. },
  14035. "pattern": {
  14036. "type": "string"
  14037. },
  14038. "action": {
  14039. "$ref": "#/components/schemas/PermissionAction"
  14040. }
  14041. },
  14042. "required": ["permission", "pattern", "action"],
  14043. "additionalProperties": false
  14044. },
  14045. "PermissionRuleset": {
  14046. "type": "array",
  14047. "items": {
  14048. "$ref": "#/components/schemas/PermissionRule"
  14049. }
  14050. },
  14051. "Session": {
  14052. "type": "object",
  14053. "properties": {
  14054. "id": {
  14055. "type": "string",
  14056. "pattern": "^ses"
  14057. },
  14058. "slug": {
  14059. "type": "string"
  14060. },
  14061. "projectID": {
  14062. "type": "string"
  14063. },
  14064. "workspaceID": {
  14065. "type": "string",
  14066. "pattern": "^wrk"
  14067. },
  14068. "directory": {
  14069. "type": "string"
  14070. },
  14071. "path": {
  14072. "type": "string"
  14073. },
  14074. "parentID": {
  14075. "type": "string",
  14076. "pattern": "^ses"
  14077. },
  14078. "summary": {
  14079. "type": "object",
  14080. "properties": {
  14081. "additions": {
  14082. "type": "number"
  14083. },
  14084. "deletions": {
  14085. "type": "number"
  14086. },
  14087. "files": {
  14088. "type": "number"
  14089. },
  14090. "diffs": {
  14091. "type": "array",
  14092. "items": {
  14093. "$ref": "#/components/schemas/SnapshotFileDiff"
  14094. }
  14095. }
  14096. },
  14097. "required": ["additions", "deletions", "files"],
  14098. "additionalProperties": false
  14099. },
  14100. "cost": {
  14101. "type": "number"
  14102. },
  14103. "tokens": {
  14104. "type": "object",
  14105. "properties": {
  14106. "input": {
  14107. "type": "number"
  14108. },
  14109. "output": {
  14110. "type": "number"
  14111. },
  14112. "reasoning": {
  14113. "type": "number"
  14114. },
  14115. "cache": {
  14116. "type": "object",
  14117. "properties": {
  14118. "read": {
  14119. "type": "number"
  14120. },
  14121. "write": {
  14122. "type": "number"
  14123. }
  14124. },
  14125. "required": ["read", "write"],
  14126. "additionalProperties": false
  14127. }
  14128. },
  14129. "required": ["input", "output", "reasoning", "cache"],
  14130. "additionalProperties": false
  14131. },
  14132. "share": {
  14133. "type": "object",
  14134. "properties": {
  14135. "url": {
  14136. "type": "string"
  14137. }
  14138. },
  14139. "required": ["url"],
  14140. "additionalProperties": false
  14141. },
  14142. "title": {
  14143. "type": "string"
  14144. },
  14145. "agent": {
  14146. "type": "string"
  14147. },
  14148. "model": {
  14149. "type": "object",
  14150. "properties": {
  14151. "id": {
  14152. "type": "string"
  14153. },
  14154. "providerID": {
  14155. "type": "string"
  14156. },
  14157. "variant": {
  14158. "type": "string"
  14159. }
  14160. },
  14161. "required": ["id", "providerID"],
  14162. "additionalProperties": false
  14163. },
  14164. "version": {
  14165. "type": "string"
  14166. },
  14167. "metadata": {
  14168. "type": "object"
  14169. },
  14170. "time": {
  14171. "type": "object",
  14172. "properties": {
  14173. "created": {
  14174. "type": "integer",
  14175. "minimum": 0
  14176. },
  14177. "updated": {
  14178. "type": "integer",
  14179. "minimum": 0
  14180. },
  14181. "compacting": {
  14182. "type": "integer",
  14183. "minimum": 0
  14184. },
  14185. "archived": {
  14186. "type": "number"
  14187. }
  14188. },
  14189. "required": ["created", "updated"],
  14190. "additionalProperties": false
  14191. },
  14192. "permission": {
  14193. "$ref": "#/components/schemas/PermissionRuleset"
  14194. },
  14195. "revert": {
  14196. "type": "object",
  14197. "properties": {
  14198. "messageID": {
  14199. "type": "string",
  14200. "pattern": "^msg"
  14201. },
  14202. "partID": {
  14203. "type": "string",
  14204. "pattern": "^prt"
  14205. },
  14206. "snapshot": {
  14207. "type": "string"
  14208. },
  14209. "diff": {
  14210. "type": "string"
  14211. }
  14212. },
  14213. "required": ["messageID"],
  14214. "additionalProperties": false
  14215. }
  14216. },
  14217. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  14218. "additionalProperties": false
  14219. },
  14220. "OutputFormatText": {
  14221. "type": "object",
  14222. "properties": {
  14223. "type": {
  14224. "type": "string",
  14225. "enum": ["text"]
  14226. }
  14227. },
  14228. "required": ["type"],
  14229. "additionalProperties": false
  14230. },
  14231. "JSONSchema": {
  14232. "type": "object"
  14233. },
  14234. "OutputFormatJsonSchema": {
  14235. "type": "object",
  14236. "properties": {
  14237. "type": {
  14238. "type": "string",
  14239. "enum": ["json_schema"]
  14240. },
  14241. "schema": {
  14242. "$ref": "#/components/schemas/JSONSchema"
  14243. },
  14244. "retryCount": {
  14245. "type": "integer",
  14246. "minimum": 0
  14247. }
  14248. },
  14249. "required": ["type", "schema"],
  14250. "additionalProperties": false
  14251. },
  14252. "OutputFormat": {
  14253. "anyOf": [
  14254. {
  14255. "$ref": "#/components/schemas/OutputFormatText"
  14256. },
  14257. {
  14258. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  14259. }
  14260. ]
  14261. },
  14262. "UserMessage": {
  14263. "type": "object",
  14264. "properties": {
  14265. "id": {
  14266. "type": "string",
  14267. "pattern": "^msg"
  14268. },
  14269. "sessionID": {
  14270. "type": "string",
  14271. "pattern": "^ses"
  14272. },
  14273. "role": {
  14274. "type": "string",
  14275. "enum": ["user"]
  14276. },
  14277. "time": {
  14278. "type": "object",
  14279. "properties": {
  14280. "created": {
  14281. "type": "number",
  14282. "minimum": 0
  14283. }
  14284. },
  14285. "required": ["created"],
  14286. "additionalProperties": false
  14287. },
  14288. "format": {
  14289. "$ref": "#/components/schemas/OutputFormat"
  14290. },
  14291. "summary": {
  14292. "type": "object",
  14293. "properties": {
  14294. "title": {
  14295. "type": "string"
  14296. },
  14297. "body": {
  14298. "type": "string"
  14299. },
  14300. "diffs": {
  14301. "type": "array",
  14302. "items": {
  14303. "$ref": "#/components/schemas/SnapshotFileDiff"
  14304. }
  14305. }
  14306. },
  14307. "required": ["diffs"],
  14308. "additionalProperties": false
  14309. },
  14310. "agent": {
  14311. "type": "string"
  14312. },
  14313. "model": {
  14314. "type": "object",
  14315. "properties": {
  14316. "providerID": {
  14317. "type": "string"
  14318. },
  14319. "modelID": {
  14320. "type": "string"
  14321. },
  14322. "variant": {
  14323. "type": "string"
  14324. }
  14325. },
  14326. "required": ["providerID", "modelID"],
  14327. "additionalProperties": false
  14328. },
  14329. "system": {
  14330. "type": "string"
  14331. },
  14332. "tools": {
  14333. "type": "object",
  14334. "additionalProperties": {
  14335. "type": "boolean"
  14336. }
  14337. }
  14338. },
  14339. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  14340. "additionalProperties": false
  14341. },
  14342. "ProviderAuthError": {
  14343. "type": "object",
  14344. "properties": {
  14345. "name": {
  14346. "type": "string",
  14347. "enum": ["ProviderAuthError"]
  14348. },
  14349. "data": {
  14350. "type": "object",
  14351. "properties": {
  14352. "providerID": {
  14353. "type": "string"
  14354. },
  14355. "message": {
  14356. "type": "string"
  14357. }
  14358. },
  14359. "required": ["providerID", "message"],
  14360. "additionalProperties": false
  14361. }
  14362. },
  14363. "required": ["name", "data"],
  14364. "additionalProperties": false
  14365. },
  14366. "UnknownError": {
  14367. "type": "object",
  14368. "properties": {
  14369. "name": {
  14370. "type": "string",
  14371. "enum": ["UnknownError"]
  14372. },
  14373. "data": {
  14374. "type": "object",
  14375. "properties": {
  14376. "message": {
  14377. "type": "string"
  14378. },
  14379. "ref": {
  14380. "type": "string"
  14381. }
  14382. },
  14383. "required": ["message"],
  14384. "additionalProperties": false
  14385. }
  14386. },
  14387. "required": ["name", "data"],
  14388. "additionalProperties": false
  14389. },
  14390. "MessageOutputLengthError": {
  14391. "type": "object",
  14392. "properties": {
  14393. "name": {
  14394. "type": "string",
  14395. "enum": ["MessageOutputLengthError"]
  14396. },
  14397. "data": {
  14398. "type": "object",
  14399. "properties": {}
  14400. }
  14401. },
  14402. "required": ["name", "data"],
  14403. "additionalProperties": false
  14404. },
  14405. "MessageAbortedError": {
  14406. "type": "object",
  14407. "properties": {
  14408. "name": {
  14409. "type": "string",
  14410. "enum": ["MessageAbortedError"]
  14411. },
  14412. "data": {
  14413. "type": "object",
  14414. "properties": {
  14415. "message": {
  14416. "type": "string"
  14417. }
  14418. },
  14419. "required": ["message"],
  14420. "additionalProperties": false
  14421. }
  14422. },
  14423. "required": ["name", "data"],
  14424. "additionalProperties": false
  14425. },
  14426. "StructuredOutputError": {
  14427. "type": "object",
  14428. "properties": {
  14429. "name": {
  14430. "type": "string",
  14431. "enum": ["StructuredOutputError"]
  14432. },
  14433. "data": {
  14434. "type": "object",
  14435. "properties": {
  14436. "message": {
  14437. "type": "string"
  14438. },
  14439. "retries": {
  14440. "type": "integer",
  14441. "minimum": 0
  14442. }
  14443. },
  14444. "required": ["message", "retries"],
  14445. "additionalProperties": false
  14446. }
  14447. },
  14448. "required": ["name", "data"],
  14449. "additionalProperties": false
  14450. },
  14451. "ContextOverflowError": {
  14452. "type": "object",
  14453. "properties": {
  14454. "name": {
  14455. "type": "string",
  14456. "enum": ["ContextOverflowError"]
  14457. },
  14458. "data": {
  14459. "type": "object",
  14460. "properties": {
  14461. "message": {
  14462. "type": "string"
  14463. },
  14464. "responseBody": {
  14465. "type": "string"
  14466. }
  14467. },
  14468. "required": ["message"],
  14469. "additionalProperties": false
  14470. }
  14471. },
  14472. "required": ["name", "data"],
  14473. "additionalProperties": false
  14474. },
  14475. "ContentFilterError": {
  14476. "type": "object",
  14477. "properties": {
  14478. "name": {
  14479. "type": "string",
  14480. "enum": ["ContentFilterError"]
  14481. },
  14482. "data": {
  14483. "type": "object",
  14484. "properties": {
  14485. "message": {
  14486. "type": "string"
  14487. }
  14488. },
  14489. "required": ["message"],
  14490. "additionalProperties": false
  14491. }
  14492. },
  14493. "required": ["name", "data"],
  14494. "additionalProperties": false
  14495. },
  14496. "APIError": {
  14497. "type": "object",
  14498. "properties": {
  14499. "name": {
  14500. "type": "string",
  14501. "enum": ["APIError"]
  14502. },
  14503. "data": {
  14504. "type": "object",
  14505. "properties": {
  14506. "message": {
  14507. "type": "string"
  14508. },
  14509. "statusCode": {
  14510. "type": "integer",
  14511. "minimum": 0
  14512. },
  14513. "isRetryable": {
  14514. "type": "boolean"
  14515. },
  14516. "responseHeaders": {
  14517. "type": "object",
  14518. "additionalProperties": {
  14519. "type": "string"
  14520. }
  14521. },
  14522. "responseBody": {
  14523. "type": "string"
  14524. },
  14525. "metadata": {
  14526. "type": "object",
  14527. "additionalProperties": {
  14528. "type": "string"
  14529. }
  14530. }
  14531. },
  14532. "required": ["message", "isRetryable"],
  14533. "additionalProperties": false
  14534. }
  14535. },
  14536. "required": ["name", "data"],
  14537. "additionalProperties": false
  14538. },
  14539. "AssistantMessage": {
  14540. "type": "object",
  14541. "properties": {
  14542. "id": {
  14543. "type": "string",
  14544. "pattern": "^msg"
  14545. },
  14546. "sessionID": {
  14547. "type": "string",
  14548. "pattern": "^ses"
  14549. },
  14550. "role": {
  14551. "type": "string",
  14552. "enum": ["assistant"]
  14553. },
  14554. "time": {
  14555. "type": "object",
  14556. "properties": {
  14557. "created": {
  14558. "type": "integer",
  14559. "minimum": 0
  14560. },
  14561. "completed": {
  14562. "type": "integer",
  14563. "minimum": 0
  14564. }
  14565. },
  14566. "required": ["created"],
  14567. "additionalProperties": false
  14568. },
  14569. "error": {
  14570. "anyOf": [
  14571. {
  14572. "$ref": "#/components/schemas/ProviderAuthError"
  14573. },
  14574. {
  14575. "$ref": "#/components/schemas/UnknownError"
  14576. },
  14577. {
  14578. "$ref": "#/components/schemas/MessageOutputLengthError"
  14579. },
  14580. {
  14581. "$ref": "#/components/schemas/MessageAbortedError"
  14582. },
  14583. {
  14584. "$ref": "#/components/schemas/StructuredOutputError"
  14585. },
  14586. {
  14587. "$ref": "#/components/schemas/ContextOverflowError"
  14588. },
  14589. {
  14590. "$ref": "#/components/schemas/ContentFilterError"
  14591. },
  14592. {
  14593. "$ref": "#/components/schemas/APIError"
  14594. }
  14595. ]
  14596. },
  14597. "parentID": {
  14598. "type": "string",
  14599. "pattern": "^msg"
  14600. },
  14601. "modelID": {
  14602. "type": "string"
  14603. },
  14604. "providerID": {
  14605. "type": "string"
  14606. },
  14607. "mode": {
  14608. "type": "string"
  14609. },
  14610. "agent": {
  14611. "type": "string"
  14612. },
  14613. "path": {
  14614. "type": "object",
  14615. "properties": {
  14616. "cwd": {
  14617. "type": "string"
  14618. },
  14619. "root": {
  14620. "type": "string"
  14621. }
  14622. },
  14623. "required": ["cwd", "root"],
  14624. "additionalProperties": false
  14625. },
  14626. "summary": {
  14627. "type": "boolean"
  14628. },
  14629. "cost": {
  14630. "type": "number"
  14631. },
  14632. "tokens": {
  14633. "type": "object",
  14634. "properties": {
  14635. "total": {
  14636. "type": "number"
  14637. },
  14638. "input": {
  14639. "type": "number"
  14640. },
  14641. "output": {
  14642. "type": "number"
  14643. },
  14644. "reasoning": {
  14645. "type": "number"
  14646. },
  14647. "cache": {
  14648. "type": "object",
  14649. "properties": {
  14650. "read": {
  14651. "type": "number"
  14652. },
  14653. "write": {
  14654. "type": "number"
  14655. }
  14656. },
  14657. "required": ["read", "write"],
  14658. "additionalProperties": false
  14659. }
  14660. },
  14661. "required": ["input", "output", "reasoning", "cache"],
  14662. "additionalProperties": false
  14663. },
  14664. "structured": {},
  14665. "variant": {
  14666. "type": "string"
  14667. },
  14668. "finish": {
  14669. "type": "string"
  14670. }
  14671. },
  14672. "required": [
  14673. "id",
  14674. "sessionID",
  14675. "role",
  14676. "time",
  14677. "parentID",
  14678. "modelID",
  14679. "providerID",
  14680. "mode",
  14681. "agent",
  14682. "path",
  14683. "cost",
  14684. "tokens"
  14685. ],
  14686. "additionalProperties": false
  14687. },
  14688. "Message": {
  14689. "anyOf": [
  14690. {
  14691. "$ref": "#/components/schemas/UserMessage"
  14692. },
  14693. {
  14694. "$ref": "#/components/schemas/AssistantMessage"
  14695. }
  14696. ]
  14697. },
  14698. "TextPart": {
  14699. "type": "object",
  14700. "properties": {
  14701. "id": {
  14702. "type": "string",
  14703. "pattern": "^prt"
  14704. },
  14705. "sessionID": {
  14706. "type": "string",
  14707. "pattern": "^ses"
  14708. },
  14709. "messageID": {
  14710. "type": "string",
  14711. "pattern": "^msg"
  14712. },
  14713. "type": {
  14714. "type": "string",
  14715. "enum": ["text"]
  14716. },
  14717. "text": {
  14718. "type": "string"
  14719. },
  14720. "synthetic": {
  14721. "type": "boolean"
  14722. },
  14723. "ignored": {
  14724. "type": "boolean"
  14725. },
  14726. "time": {
  14727. "type": "object",
  14728. "properties": {
  14729. "start": {
  14730. "type": "integer",
  14731. "minimum": 0
  14732. },
  14733. "end": {
  14734. "type": "integer",
  14735. "minimum": 0
  14736. }
  14737. },
  14738. "required": ["start"],
  14739. "additionalProperties": false
  14740. },
  14741. "metadata": {
  14742. "type": "object"
  14743. }
  14744. },
  14745. "required": ["id", "sessionID", "messageID", "type", "text"],
  14746. "additionalProperties": false
  14747. },
  14748. "SubtaskPart": {
  14749. "type": "object",
  14750. "properties": {
  14751. "id": {
  14752. "type": "string",
  14753. "pattern": "^prt"
  14754. },
  14755. "sessionID": {
  14756. "type": "string",
  14757. "pattern": "^ses"
  14758. },
  14759. "messageID": {
  14760. "type": "string",
  14761. "pattern": "^msg"
  14762. },
  14763. "type": {
  14764. "type": "string",
  14765. "enum": ["subtask"]
  14766. },
  14767. "prompt": {
  14768. "type": "string"
  14769. },
  14770. "description": {
  14771. "type": "string"
  14772. },
  14773. "agent": {
  14774. "type": "string"
  14775. },
  14776. "model": {
  14777. "type": "object",
  14778. "properties": {
  14779. "providerID": {
  14780. "type": "string"
  14781. },
  14782. "modelID": {
  14783. "type": "string"
  14784. }
  14785. },
  14786. "required": ["providerID", "modelID"],
  14787. "additionalProperties": false
  14788. },
  14789. "command": {
  14790. "type": "string"
  14791. }
  14792. },
  14793. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  14794. "additionalProperties": false
  14795. },
  14796. "ReasoningPart": {
  14797. "type": "object",
  14798. "properties": {
  14799. "id": {
  14800. "type": "string",
  14801. "pattern": "^prt"
  14802. },
  14803. "sessionID": {
  14804. "type": "string",
  14805. "pattern": "^ses"
  14806. },
  14807. "messageID": {
  14808. "type": "string",
  14809. "pattern": "^msg"
  14810. },
  14811. "type": {
  14812. "type": "string",
  14813. "enum": ["reasoning"]
  14814. },
  14815. "text": {
  14816. "type": "string"
  14817. },
  14818. "metadata": {
  14819. "type": "object"
  14820. },
  14821. "time": {
  14822. "type": "object",
  14823. "properties": {
  14824. "start": {
  14825. "type": "integer",
  14826. "minimum": 0
  14827. },
  14828. "end": {
  14829. "type": "integer",
  14830. "minimum": 0
  14831. }
  14832. },
  14833. "required": ["start"],
  14834. "additionalProperties": false
  14835. }
  14836. },
  14837. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  14838. "additionalProperties": false
  14839. },
  14840. "FilePartSourceText": {
  14841. "type": "object",
  14842. "properties": {
  14843. "value": {
  14844. "type": "string"
  14845. },
  14846. "start": {
  14847. "type": "number"
  14848. },
  14849. "end": {
  14850. "type": "number"
  14851. }
  14852. },
  14853. "required": ["value", "start", "end"],
  14854. "additionalProperties": false
  14855. },
  14856. "FileSource": {
  14857. "type": "object",
  14858. "properties": {
  14859. "text": {
  14860. "$ref": "#/components/schemas/FilePartSourceText"
  14861. },
  14862. "type": {
  14863. "type": "string",
  14864. "enum": ["file"]
  14865. },
  14866. "path": {
  14867. "type": "string"
  14868. }
  14869. },
  14870. "required": ["text", "type", "path"],
  14871. "additionalProperties": false
  14872. },
  14873. "Range": {
  14874. "type": "object",
  14875. "properties": {
  14876. "start": {
  14877. "type": "object",
  14878. "properties": {
  14879. "line": {
  14880. "type": "integer",
  14881. "minimum": 0
  14882. },
  14883. "character": {
  14884. "type": "integer",
  14885. "minimum": 0
  14886. }
  14887. },
  14888. "required": ["line", "character"],
  14889. "additionalProperties": false
  14890. },
  14891. "end": {
  14892. "type": "object",
  14893. "properties": {
  14894. "line": {
  14895. "type": "integer",
  14896. "minimum": 0
  14897. },
  14898. "character": {
  14899. "type": "integer",
  14900. "minimum": 0
  14901. }
  14902. },
  14903. "required": ["line", "character"],
  14904. "additionalProperties": false
  14905. }
  14906. },
  14907. "required": ["start", "end"],
  14908. "additionalProperties": false
  14909. },
  14910. "SymbolSource": {
  14911. "type": "object",
  14912. "properties": {
  14913. "text": {
  14914. "$ref": "#/components/schemas/FilePartSourceText"
  14915. },
  14916. "type": {
  14917. "type": "string",
  14918. "enum": ["symbol"]
  14919. },
  14920. "path": {
  14921. "type": "string"
  14922. },
  14923. "range": {
  14924. "$ref": "#/components/schemas/Range"
  14925. },
  14926. "name": {
  14927. "type": "string"
  14928. },
  14929. "kind": {
  14930. "type": "integer",
  14931. "minimum": 0
  14932. }
  14933. },
  14934. "required": ["text", "type", "path", "range", "name", "kind"],
  14935. "additionalProperties": false
  14936. },
  14937. "ResourceSource": {
  14938. "type": "object",
  14939. "properties": {
  14940. "text": {
  14941. "$ref": "#/components/schemas/FilePartSourceText"
  14942. },
  14943. "type": {
  14944. "type": "string",
  14945. "enum": ["resource"]
  14946. },
  14947. "clientName": {
  14948. "type": "string"
  14949. },
  14950. "uri": {
  14951. "type": "string"
  14952. }
  14953. },
  14954. "required": ["text", "type", "clientName", "uri"],
  14955. "additionalProperties": false
  14956. },
  14957. "FilePartSource": {
  14958. "anyOf": [
  14959. {
  14960. "$ref": "#/components/schemas/FileSource"
  14961. },
  14962. {
  14963. "$ref": "#/components/schemas/SymbolSource"
  14964. },
  14965. {
  14966. "$ref": "#/components/schemas/ResourceSource"
  14967. }
  14968. ]
  14969. },
  14970. "FilePart": {
  14971. "type": "object",
  14972. "properties": {
  14973. "id": {
  14974. "type": "string",
  14975. "pattern": "^prt"
  14976. },
  14977. "sessionID": {
  14978. "type": "string",
  14979. "pattern": "^ses"
  14980. },
  14981. "messageID": {
  14982. "type": "string",
  14983. "pattern": "^msg"
  14984. },
  14985. "type": {
  14986. "type": "string",
  14987. "enum": ["file"]
  14988. },
  14989. "mime": {
  14990. "type": "string"
  14991. },
  14992. "filename": {
  14993. "type": "string"
  14994. },
  14995. "url": {
  14996. "type": "string"
  14997. },
  14998. "source": {
  14999. "$ref": "#/components/schemas/FilePartSource"
  15000. }
  15001. },
  15002. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  15003. "additionalProperties": false
  15004. },
  15005. "ToolStatePending": {
  15006. "type": "object",
  15007. "properties": {
  15008. "status": {
  15009. "type": "string",
  15010. "enum": ["pending"]
  15011. },
  15012. "input": {
  15013. "type": "object"
  15014. },
  15015. "raw": {
  15016. "type": "string"
  15017. }
  15018. },
  15019. "required": ["status", "input", "raw"],
  15020. "additionalProperties": false
  15021. },
  15022. "ToolStateRunning": {
  15023. "type": "object",
  15024. "properties": {
  15025. "status": {
  15026. "type": "string",
  15027. "enum": ["running"]
  15028. },
  15029. "input": {
  15030. "type": "object"
  15031. },
  15032. "title": {
  15033. "type": "string"
  15034. },
  15035. "metadata": {
  15036. "type": "object"
  15037. },
  15038. "time": {
  15039. "type": "object",
  15040. "properties": {
  15041. "start": {
  15042. "type": "integer",
  15043. "minimum": 0
  15044. }
  15045. },
  15046. "required": ["start"],
  15047. "additionalProperties": false
  15048. }
  15049. },
  15050. "required": ["status", "input", "time"],
  15051. "additionalProperties": false
  15052. },
  15053. "ToolStateCompleted": {
  15054. "type": "object",
  15055. "properties": {
  15056. "status": {
  15057. "type": "string",
  15058. "enum": ["completed"]
  15059. },
  15060. "input": {
  15061. "type": "object"
  15062. },
  15063. "output": {
  15064. "type": "string"
  15065. },
  15066. "title": {
  15067. "type": "string"
  15068. },
  15069. "metadata": {
  15070. "type": "object"
  15071. },
  15072. "time": {
  15073. "type": "object",
  15074. "properties": {
  15075. "start": {
  15076. "type": "integer",
  15077. "minimum": 0
  15078. },
  15079. "end": {
  15080. "type": "integer",
  15081. "minimum": 0
  15082. },
  15083. "compacted": {
  15084. "type": "integer",
  15085. "minimum": 0
  15086. }
  15087. },
  15088. "required": ["start", "end"],
  15089. "additionalProperties": false
  15090. },
  15091. "attachments": {
  15092. "type": "array",
  15093. "items": {
  15094. "$ref": "#/components/schemas/FilePart"
  15095. }
  15096. }
  15097. },
  15098. "required": ["status", "input", "output", "title", "metadata", "time"],
  15099. "additionalProperties": false
  15100. },
  15101. "ToolStateError": {
  15102. "type": "object",
  15103. "properties": {
  15104. "status": {
  15105. "type": "string",
  15106. "enum": ["error"]
  15107. },
  15108. "input": {
  15109. "type": "object"
  15110. },
  15111. "error": {
  15112. "type": "string"
  15113. },
  15114. "metadata": {
  15115. "type": "object"
  15116. },
  15117. "time": {
  15118. "type": "object",
  15119. "properties": {
  15120. "start": {
  15121. "type": "integer",
  15122. "minimum": 0
  15123. },
  15124. "end": {
  15125. "type": "integer",
  15126. "minimum": 0
  15127. }
  15128. },
  15129. "required": ["start", "end"],
  15130. "additionalProperties": false
  15131. }
  15132. },
  15133. "required": ["status", "input", "error", "time"],
  15134. "additionalProperties": false
  15135. },
  15136. "ToolState": {
  15137. "anyOf": [
  15138. {
  15139. "$ref": "#/components/schemas/ToolStatePending"
  15140. },
  15141. {
  15142. "$ref": "#/components/schemas/ToolStateRunning"
  15143. },
  15144. {
  15145. "$ref": "#/components/schemas/ToolStateCompleted"
  15146. },
  15147. {
  15148. "$ref": "#/components/schemas/ToolStateError"
  15149. }
  15150. ]
  15151. },
  15152. "ToolPart": {
  15153. "type": "object",
  15154. "properties": {
  15155. "id": {
  15156. "type": "string",
  15157. "pattern": "^prt"
  15158. },
  15159. "sessionID": {
  15160. "type": "string",
  15161. "pattern": "^ses"
  15162. },
  15163. "messageID": {
  15164. "type": "string",
  15165. "pattern": "^msg"
  15166. },
  15167. "type": {
  15168. "type": "string",
  15169. "enum": ["tool"]
  15170. },
  15171. "callID": {
  15172. "type": "string"
  15173. },
  15174. "tool": {
  15175. "type": "string"
  15176. },
  15177. "state": {
  15178. "$ref": "#/components/schemas/ToolState"
  15179. },
  15180. "metadata": {
  15181. "type": "object"
  15182. }
  15183. },
  15184. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  15185. "additionalProperties": false
  15186. },
  15187. "StepStartPart": {
  15188. "type": "object",
  15189. "properties": {
  15190. "id": {
  15191. "type": "string",
  15192. "pattern": "^prt"
  15193. },
  15194. "sessionID": {
  15195. "type": "string",
  15196. "pattern": "^ses"
  15197. },
  15198. "messageID": {
  15199. "type": "string",
  15200. "pattern": "^msg"
  15201. },
  15202. "type": {
  15203. "type": "string",
  15204. "enum": ["step-start"]
  15205. },
  15206. "snapshot": {
  15207. "type": "string"
  15208. }
  15209. },
  15210. "required": ["id", "sessionID", "messageID", "type"],
  15211. "additionalProperties": false
  15212. },
  15213. "StepFinishPart": {
  15214. "type": "object",
  15215. "properties": {
  15216. "id": {
  15217. "type": "string",
  15218. "pattern": "^prt"
  15219. },
  15220. "sessionID": {
  15221. "type": "string",
  15222. "pattern": "^ses"
  15223. },
  15224. "messageID": {
  15225. "type": "string",
  15226. "pattern": "^msg"
  15227. },
  15228. "type": {
  15229. "type": "string",
  15230. "enum": ["step-finish"]
  15231. },
  15232. "reason": {
  15233. "type": "string"
  15234. },
  15235. "snapshot": {
  15236. "type": "string"
  15237. },
  15238. "cost": {
  15239. "type": "number"
  15240. },
  15241. "tokens": {
  15242. "type": "object",
  15243. "properties": {
  15244. "total": {
  15245. "type": "number"
  15246. },
  15247. "input": {
  15248. "type": "number"
  15249. },
  15250. "output": {
  15251. "type": "number"
  15252. },
  15253. "reasoning": {
  15254. "type": "number"
  15255. },
  15256. "cache": {
  15257. "type": "object",
  15258. "properties": {
  15259. "read": {
  15260. "type": "number"
  15261. },
  15262. "write": {
  15263. "type": "number"
  15264. }
  15265. },
  15266. "required": ["read", "write"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["input", "output", "reasoning", "cache"],
  15271. "additionalProperties": false
  15272. }
  15273. },
  15274. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  15275. "additionalProperties": false
  15276. },
  15277. "SnapshotPart": {
  15278. "type": "object",
  15279. "properties": {
  15280. "id": {
  15281. "type": "string",
  15282. "pattern": "^prt"
  15283. },
  15284. "sessionID": {
  15285. "type": "string",
  15286. "pattern": "^ses"
  15287. },
  15288. "messageID": {
  15289. "type": "string",
  15290. "pattern": "^msg"
  15291. },
  15292. "type": {
  15293. "type": "string",
  15294. "enum": ["snapshot"]
  15295. },
  15296. "snapshot": {
  15297. "type": "string"
  15298. }
  15299. },
  15300. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  15301. "additionalProperties": false
  15302. },
  15303. "PatchPart": {
  15304. "type": "object",
  15305. "properties": {
  15306. "id": {
  15307. "type": "string",
  15308. "pattern": "^prt"
  15309. },
  15310. "sessionID": {
  15311. "type": "string",
  15312. "pattern": "^ses"
  15313. },
  15314. "messageID": {
  15315. "type": "string",
  15316. "pattern": "^msg"
  15317. },
  15318. "type": {
  15319. "type": "string",
  15320. "enum": ["patch"]
  15321. },
  15322. "hash": {
  15323. "type": "string"
  15324. },
  15325. "files": {
  15326. "type": "array",
  15327. "items": {
  15328. "type": "string"
  15329. }
  15330. }
  15331. },
  15332. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  15333. "additionalProperties": false
  15334. },
  15335. "AgentPart": {
  15336. "type": "object",
  15337. "properties": {
  15338. "id": {
  15339. "type": "string",
  15340. "pattern": "^prt"
  15341. },
  15342. "sessionID": {
  15343. "type": "string",
  15344. "pattern": "^ses"
  15345. },
  15346. "messageID": {
  15347. "type": "string",
  15348. "pattern": "^msg"
  15349. },
  15350. "type": {
  15351. "type": "string",
  15352. "enum": ["agent"]
  15353. },
  15354. "name": {
  15355. "type": "string"
  15356. },
  15357. "source": {
  15358. "type": "object",
  15359. "properties": {
  15360. "value": {
  15361. "type": "string"
  15362. },
  15363. "start": {
  15364. "type": "integer",
  15365. "minimum": 0
  15366. },
  15367. "end": {
  15368. "type": "integer",
  15369. "minimum": 0
  15370. }
  15371. },
  15372. "required": ["value", "start", "end"],
  15373. "additionalProperties": false
  15374. }
  15375. },
  15376. "required": ["id", "sessionID", "messageID", "type", "name"],
  15377. "additionalProperties": false
  15378. },
  15379. "RetryPart": {
  15380. "type": "object",
  15381. "properties": {
  15382. "id": {
  15383. "type": "string",
  15384. "pattern": "^prt"
  15385. },
  15386. "sessionID": {
  15387. "type": "string",
  15388. "pattern": "^ses"
  15389. },
  15390. "messageID": {
  15391. "type": "string",
  15392. "pattern": "^msg"
  15393. },
  15394. "type": {
  15395. "type": "string",
  15396. "enum": ["retry"]
  15397. },
  15398. "attempt": {
  15399. "type": "integer",
  15400. "minimum": 0
  15401. },
  15402. "error": {
  15403. "$ref": "#/components/schemas/APIError"
  15404. },
  15405. "time": {
  15406. "type": "object",
  15407. "properties": {
  15408. "created": {
  15409. "type": "integer",
  15410. "minimum": 0
  15411. }
  15412. },
  15413. "required": ["created"],
  15414. "additionalProperties": false
  15415. }
  15416. },
  15417. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  15418. "additionalProperties": false
  15419. },
  15420. "CompactionPart": {
  15421. "type": "object",
  15422. "properties": {
  15423. "id": {
  15424. "type": "string",
  15425. "pattern": "^prt"
  15426. },
  15427. "sessionID": {
  15428. "type": "string",
  15429. "pattern": "^ses"
  15430. },
  15431. "messageID": {
  15432. "type": "string",
  15433. "pattern": "^msg"
  15434. },
  15435. "type": {
  15436. "type": "string",
  15437. "enum": ["compaction"]
  15438. },
  15439. "auto": {
  15440. "type": "boolean"
  15441. },
  15442. "overflow": {
  15443. "type": "boolean"
  15444. },
  15445. "tail_start_id": {
  15446. "type": "string",
  15447. "pattern": "^msg"
  15448. }
  15449. },
  15450. "required": ["id", "sessionID", "messageID", "type", "auto"],
  15451. "additionalProperties": false
  15452. },
  15453. "Part": {
  15454. "anyOf": [
  15455. {
  15456. "$ref": "#/components/schemas/TextPart"
  15457. },
  15458. {
  15459. "$ref": "#/components/schemas/SubtaskPart"
  15460. },
  15461. {
  15462. "$ref": "#/components/schemas/ReasoningPart"
  15463. },
  15464. {
  15465. "$ref": "#/components/schemas/FilePart"
  15466. },
  15467. {
  15468. "$ref": "#/components/schemas/ToolPart"
  15469. },
  15470. {
  15471. "$ref": "#/components/schemas/StepStartPart"
  15472. },
  15473. {
  15474. "$ref": "#/components/schemas/StepFinishPart"
  15475. },
  15476. {
  15477. "$ref": "#/components/schemas/SnapshotPart"
  15478. },
  15479. {
  15480. "$ref": "#/components/schemas/PatchPart"
  15481. },
  15482. {
  15483. "$ref": "#/components/schemas/AgentPart"
  15484. },
  15485. {
  15486. "$ref": "#/components/schemas/RetryPart"
  15487. },
  15488. {
  15489. "$ref": "#/components/schemas/CompactionPart"
  15490. }
  15491. ]
  15492. },
  15493. "Prompt": {
  15494. "type": "object",
  15495. "properties": {
  15496. "text": {
  15497. "type": "string"
  15498. },
  15499. "files": {
  15500. "type": "array",
  15501. "items": {
  15502. "$ref": "#/components/schemas/PromptFileAttachment"
  15503. }
  15504. },
  15505. "agents": {
  15506. "type": "array",
  15507. "items": {
  15508. "$ref": "#/components/schemas/PromptAgentAttachment"
  15509. }
  15510. }
  15511. },
  15512. "required": ["text"],
  15513. "additionalProperties": false
  15514. },
  15515. "Pty": {
  15516. "type": "object",
  15517. "properties": {
  15518. "id": {
  15519. "type": "string",
  15520. "pattern": "^pty"
  15521. },
  15522. "title": {
  15523. "type": "string"
  15524. },
  15525. "command": {
  15526. "type": "string"
  15527. },
  15528. "args": {
  15529. "type": "array",
  15530. "items": {
  15531. "type": "string"
  15532. }
  15533. },
  15534. "cwd": {
  15535. "type": "string"
  15536. },
  15537. "status": {
  15538. "type": "string",
  15539. "enum": ["running", "exited"]
  15540. },
  15541. "pid": {
  15542. "type": "integer",
  15543. "minimum": 0
  15544. }
  15545. },
  15546. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  15547. "additionalProperties": false
  15548. },
  15549. "Todo": {
  15550. "type": "object",
  15551. "properties": {
  15552. "content": {
  15553. "type": "string",
  15554. "description": "Brief description of the task"
  15555. },
  15556. "status": {
  15557. "type": "string",
  15558. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  15559. },
  15560. "priority": {
  15561. "type": "string",
  15562. "description": "Priority level of the task: high, medium, low"
  15563. }
  15564. },
  15565. "required": ["content", "status", "priority"],
  15566. "additionalProperties": false
  15567. },
  15568. "SessionStatus": {
  15569. "anyOf": [
  15570. {
  15571. "type": "object",
  15572. "properties": {
  15573. "type": {
  15574. "type": "string",
  15575. "enum": ["idle"]
  15576. }
  15577. },
  15578. "required": ["type"],
  15579. "additionalProperties": false
  15580. },
  15581. {
  15582. "type": "object",
  15583. "properties": {
  15584. "type": {
  15585. "type": "string",
  15586. "enum": ["retry"]
  15587. },
  15588. "attempt": {
  15589. "type": "integer",
  15590. "minimum": 0
  15591. },
  15592. "message": {
  15593. "type": "string"
  15594. },
  15595. "action": {
  15596. "type": "object",
  15597. "properties": {
  15598. "reason": {
  15599. "type": "string"
  15600. },
  15601. "provider": {
  15602. "type": "string"
  15603. },
  15604. "title": {
  15605. "type": "string"
  15606. },
  15607. "message": {
  15608. "type": "string"
  15609. },
  15610. "label": {
  15611. "type": "string"
  15612. },
  15613. "link": {
  15614. "type": "string"
  15615. }
  15616. },
  15617. "required": ["reason", "provider", "title", "message", "label"],
  15618. "additionalProperties": false
  15619. },
  15620. "next": {
  15621. "type": "integer",
  15622. "minimum": 0
  15623. }
  15624. },
  15625. "required": ["type", "attempt", "message", "next"],
  15626. "additionalProperties": false
  15627. },
  15628. {
  15629. "type": "object",
  15630. "properties": {
  15631. "type": {
  15632. "type": "string",
  15633. "enum": ["busy"]
  15634. }
  15635. },
  15636. "required": ["type"],
  15637. "additionalProperties": false
  15638. }
  15639. ]
  15640. },
  15641. "QuestionOption": {
  15642. "type": "object",
  15643. "properties": {
  15644. "label": {
  15645. "type": "string",
  15646. "description": "Display text (1-5 words, concise)"
  15647. },
  15648. "description": {
  15649. "type": "string",
  15650. "description": "Explanation of choice"
  15651. }
  15652. },
  15653. "required": ["label", "description"],
  15654. "additionalProperties": false
  15655. },
  15656. "QuestionInfo": {
  15657. "type": "object",
  15658. "properties": {
  15659. "question": {
  15660. "type": "string",
  15661. "description": "Complete question"
  15662. },
  15663. "header": {
  15664. "type": "string",
  15665. "description": "Very short label (max 30 chars)"
  15666. },
  15667. "options": {
  15668. "type": "array",
  15669. "items": {
  15670. "$ref": "#/components/schemas/QuestionOption"
  15671. },
  15672. "description": "Available choices"
  15673. },
  15674. "multiple": {
  15675. "type": "boolean"
  15676. },
  15677. "custom": {
  15678. "type": "boolean"
  15679. }
  15680. },
  15681. "required": ["question", "header", "options"],
  15682. "additionalProperties": false
  15683. },
  15684. "QuestionTool": {
  15685. "type": "object",
  15686. "properties": {
  15687. "messageID": {
  15688. "type": "string",
  15689. "pattern": "^msg"
  15690. },
  15691. "callID": {
  15692. "type": "string"
  15693. }
  15694. },
  15695. "required": ["messageID", "callID"],
  15696. "additionalProperties": false
  15697. },
  15698. "QuestionAnswer": {
  15699. "type": "array",
  15700. "items": {
  15701. "type": "string"
  15702. }
  15703. },
  15704. "GlobalEvent": {
  15705. "type": "object",
  15706. "properties": {
  15707. "directory": {
  15708. "type": "string"
  15709. },
  15710. "project": {
  15711. "type": "string"
  15712. },
  15713. "workspace": {
  15714. "type": "string"
  15715. },
  15716. "payload": {
  15717. "anyOf": [
  15718. {
  15719. "type": "object",
  15720. "properties": {
  15721. "id": {
  15722. "type": "string",
  15723. "pattern": "^evt_"
  15724. },
  15725. "type": {
  15726. "type": "string",
  15727. "enum": ["models-dev.refreshed"]
  15728. },
  15729. "properties": {
  15730. "type": "object",
  15731. "properties": {}
  15732. }
  15733. },
  15734. "required": ["id", "type", "properties"],
  15735. "additionalProperties": false
  15736. },
  15737. {
  15738. "type": "object",
  15739. "properties": {
  15740. "id": {
  15741. "type": "string",
  15742. "pattern": "^evt_"
  15743. },
  15744. "type": {
  15745. "type": "string",
  15746. "enum": ["plugin.added"]
  15747. },
  15748. "properties": {
  15749. "type": "object",
  15750. "properties": {
  15751. "id": {
  15752. "type": "string"
  15753. }
  15754. },
  15755. "required": ["id"],
  15756. "additionalProperties": false
  15757. }
  15758. },
  15759. "required": ["id", "type", "properties"],
  15760. "additionalProperties": false
  15761. },
  15762. {
  15763. "type": "object",
  15764. "properties": {
  15765. "id": {
  15766. "type": "string",
  15767. "pattern": "^evt_"
  15768. },
  15769. "type": {
  15770. "type": "string",
  15771. "enum": ["catalog.model.updated"]
  15772. },
  15773. "properties": {
  15774. "type": "object",
  15775. "properties": {
  15776. "model": {
  15777. "$ref": "#/components/schemas/ModelV2Info"
  15778. }
  15779. },
  15780. "required": ["model"],
  15781. "additionalProperties": false
  15782. }
  15783. },
  15784. "required": ["id", "type", "properties"],
  15785. "additionalProperties": false
  15786. },
  15787. {
  15788. "type": "object",
  15789. "properties": {
  15790. "id": {
  15791. "type": "string",
  15792. "pattern": "^evt_"
  15793. },
  15794. "type": {
  15795. "type": "string",
  15796. "enum": ["session.created"]
  15797. },
  15798. "properties": {
  15799. "type": "object",
  15800. "properties": {
  15801. "sessionID": {
  15802. "type": "string",
  15803. "pattern": "^ses"
  15804. },
  15805. "info": {
  15806. "$ref": "#/components/schemas/Session"
  15807. }
  15808. },
  15809. "required": ["sessionID", "info"],
  15810. "additionalProperties": false
  15811. }
  15812. },
  15813. "required": ["id", "type", "properties"],
  15814. "additionalProperties": false
  15815. },
  15816. {
  15817. "type": "object",
  15818. "properties": {
  15819. "id": {
  15820. "type": "string",
  15821. "pattern": "^evt_"
  15822. },
  15823. "type": {
  15824. "type": "string",
  15825. "enum": ["session.updated"]
  15826. },
  15827. "properties": {
  15828. "type": "object",
  15829. "properties": {
  15830. "sessionID": {
  15831. "type": "string",
  15832. "pattern": "^ses"
  15833. },
  15834. "info": {
  15835. "$ref": "#/components/schemas/Session"
  15836. }
  15837. },
  15838. "required": ["sessionID", "info"],
  15839. "additionalProperties": false
  15840. }
  15841. },
  15842. "required": ["id", "type", "properties"],
  15843. "additionalProperties": false
  15844. },
  15845. {
  15846. "type": "object",
  15847. "properties": {
  15848. "id": {
  15849. "type": "string",
  15850. "pattern": "^evt_"
  15851. },
  15852. "type": {
  15853. "type": "string",
  15854. "enum": ["session.deleted"]
  15855. },
  15856. "properties": {
  15857. "type": "object",
  15858. "properties": {
  15859. "sessionID": {
  15860. "type": "string",
  15861. "pattern": "^ses"
  15862. },
  15863. "info": {
  15864. "$ref": "#/components/schemas/Session"
  15865. }
  15866. },
  15867. "required": ["sessionID", "info"],
  15868. "additionalProperties": false
  15869. }
  15870. },
  15871. "required": ["id", "type", "properties"],
  15872. "additionalProperties": false
  15873. },
  15874. {
  15875. "type": "object",
  15876. "properties": {
  15877. "id": {
  15878. "type": "string",
  15879. "pattern": "^evt_"
  15880. },
  15881. "type": {
  15882. "type": "string",
  15883. "enum": ["message.updated"]
  15884. },
  15885. "properties": {
  15886. "type": "object",
  15887. "properties": {
  15888. "sessionID": {
  15889. "type": "string",
  15890. "pattern": "^ses"
  15891. },
  15892. "info": {
  15893. "$ref": "#/components/schemas/Message"
  15894. }
  15895. },
  15896. "required": ["sessionID", "info"],
  15897. "additionalProperties": false
  15898. }
  15899. },
  15900. "required": ["id", "type", "properties"],
  15901. "additionalProperties": false
  15902. },
  15903. {
  15904. "type": "object",
  15905. "properties": {
  15906. "id": {
  15907. "type": "string",
  15908. "pattern": "^evt_"
  15909. },
  15910. "type": {
  15911. "type": "string",
  15912. "enum": ["message.removed"]
  15913. },
  15914. "properties": {
  15915. "type": "object",
  15916. "properties": {
  15917. "sessionID": {
  15918. "type": "string",
  15919. "pattern": "^ses"
  15920. },
  15921. "messageID": {
  15922. "type": "string",
  15923. "pattern": "^msg"
  15924. }
  15925. },
  15926. "required": ["sessionID", "messageID"],
  15927. "additionalProperties": false
  15928. }
  15929. },
  15930. "required": ["id", "type", "properties"],
  15931. "additionalProperties": false
  15932. },
  15933. {
  15934. "type": "object",
  15935. "properties": {
  15936. "id": {
  15937. "type": "string",
  15938. "pattern": "^evt_"
  15939. },
  15940. "type": {
  15941. "type": "string",
  15942. "enum": ["message.part.updated"]
  15943. },
  15944. "properties": {
  15945. "type": "object",
  15946. "properties": {
  15947. "sessionID": {
  15948. "type": "string",
  15949. "pattern": "^ses"
  15950. },
  15951. "part": {
  15952. "$ref": "#/components/schemas/Part"
  15953. },
  15954. "time": {
  15955. "type": "number"
  15956. }
  15957. },
  15958. "required": ["sessionID", "part", "time"],
  15959. "additionalProperties": false
  15960. }
  15961. },
  15962. "required": ["id", "type", "properties"],
  15963. "additionalProperties": false
  15964. },
  15965. {
  15966. "type": "object",
  15967. "properties": {
  15968. "id": {
  15969. "type": "string",
  15970. "pattern": "^evt_"
  15971. },
  15972. "type": {
  15973. "type": "string",
  15974. "enum": ["message.part.removed"]
  15975. },
  15976. "properties": {
  15977. "type": "object",
  15978. "properties": {
  15979. "sessionID": {
  15980. "type": "string",
  15981. "pattern": "^ses"
  15982. },
  15983. "messageID": {
  15984. "type": "string",
  15985. "pattern": "^msg"
  15986. },
  15987. "partID": {
  15988. "type": "string",
  15989. "pattern": "^prt"
  15990. }
  15991. },
  15992. "required": ["sessionID", "messageID", "partID"],
  15993. "additionalProperties": false
  15994. }
  15995. },
  15996. "required": ["id", "type", "properties"],
  15997. "additionalProperties": false
  15998. },
  15999. {
  16000. "type": "object",
  16001. "properties": {
  16002. "id": {
  16003. "type": "string",
  16004. "pattern": "^evt_"
  16005. },
  16006. "type": {
  16007. "type": "string",
  16008. "enum": ["session.next.agent.switched"]
  16009. },
  16010. "properties": {
  16011. "type": "object",
  16012. "properties": {
  16013. "timestamp": {
  16014. "type": "number"
  16015. },
  16016. "sessionID": {
  16017. "type": "string",
  16018. "pattern": "^ses"
  16019. },
  16020. "messageID": {
  16021. "type": "string",
  16022. "pattern": "^msg_"
  16023. },
  16024. "agent": {
  16025. "type": "string"
  16026. }
  16027. },
  16028. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16029. "additionalProperties": false
  16030. }
  16031. },
  16032. "required": ["id", "type", "properties"],
  16033. "additionalProperties": false
  16034. },
  16035. {
  16036. "type": "object",
  16037. "properties": {
  16038. "id": {
  16039. "type": "string",
  16040. "pattern": "^evt_"
  16041. },
  16042. "type": {
  16043. "type": "string",
  16044. "enum": ["session.next.model.switched"]
  16045. },
  16046. "properties": {
  16047. "type": "object",
  16048. "properties": {
  16049. "timestamp": {
  16050. "type": "number"
  16051. },
  16052. "sessionID": {
  16053. "type": "string",
  16054. "pattern": "^ses"
  16055. },
  16056. "messageID": {
  16057. "type": "string",
  16058. "pattern": "^msg_"
  16059. },
  16060. "model": {
  16061. "type": "object",
  16062. "properties": {
  16063. "id": {
  16064. "type": "string"
  16065. },
  16066. "providerID": {
  16067. "type": "string"
  16068. },
  16069. "variant": {
  16070. "type": "string"
  16071. }
  16072. },
  16073. "required": ["id", "providerID"],
  16074. "additionalProperties": false
  16075. }
  16076. },
  16077. "required": ["timestamp", "sessionID", "messageID", "model"],
  16078. "additionalProperties": false
  16079. }
  16080. },
  16081. "required": ["id", "type", "properties"],
  16082. "additionalProperties": false
  16083. },
  16084. {
  16085. "type": "object",
  16086. "properties": {
  16087. "id": {
  16088. "type": "string",
  16089. "pattern": "^evt_"
  16090. },
  16091. "type": {
  16092. "type": "string",
  16093. "enum": ["session.next.moved"]
  16094. },
  16095. "properties": {
  16096. "type": "object",
  16097. "properties": {
  16098. "timestamp": {
  16099. "type": "number"
  16100. },
  16101. "sessionID": {
  16102. "type": "string",
  16103. "pattern": "^ses"
  16104. },
  16105. "location": {
  16106. "$ref": "#/components/schemas/LocationRef"
  16107. },
  16108. "subdirectory": {
  16109. "type": "string"
  16110. }
  16111. },
  16112. "required": ["timestamp", "sessionID", "location"],
  16113. "additionalProperties": false
  16114. }
  16115. },
  16116. "required": ["id", "type", "properties"],
  16117. "additionalProperties": false
  16118. },
  16119. {
  16120. "type": "object",
  16121. "properties": {
  16122. "id": {
  16123. "type": "string",
  16124. "pattern": "^evt_"
  16125. },
  16126. "type": {
  16127. "type": "string",
  16128. "enum": ["session.next.prompted"]
  16129. },
  16130. "properties": {
  16131. "type": "object",
  16132. "properties": {
  16133. "timestamp": {
  16134. "type": "number"
  16135. },
  16136. "sessionID": {
  16137. "type": "string",
  16138. "pattern": "^ses"
  16139. },
  16140. "messageID": {
  16141. "type": "string",
  16142. "pattern": "^msg_"
  16143. },
  16144. "prompt": {
  16145. "$ref": "#/components/schemas/Prompt"
  16146. },
  16147. "delivery": {
  16148. "type": "string",
  16149. "enum": ["steer", "queue"]
  16150. }
  16151. },
  16152. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16153. "additionalProperties": false
  16154. }
  16155. },
  16156. "required": ["id", "type", "properties"],
  16157. "additionalProperties": false
  16158. },
  16159. {
  16160. "type": "object",
  16161. "properties": {
  16162. "id": {
  16163. "type": "string",
  16164. "pattern": "^evt_"
  16165. },
  16166. "type": {
  16167. "type": "string",
  16168. "enum": ["session.next.prompt.admitted"]
  16169. },
  16170. "properties": {
  16171. "type": "object",
  16172. "properties": {
  16173. "timestamp": {
  16174. "type": "number"
  16175. },
  16176. "sessionID": {
  16177. "type": "string",
  16178. "pattern": "^ses"
  16179. },
  16180. "messageID": {
  16181. "type": "string",
  16182. "pattern": "^msg_"
  16183. },
  16184. "prompt": {
  16185. "$ref": "#/components/schemas/Prompt"
  16186. },
  16187. "delivery": {
  16188. "type": "string",
  16189. "enum": ["steer", "queue"]
  16190. }
  16191. },
  16192. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16193. "additionalProperties": false
  16194. }
  16195. },
  16196. "required": ["id", "type", "properties"],
  16197. "additionalProperties": false
  16198. },
  16199. {
  16200. "type": "object",
  16201. "properties": {
  16202. "id": {
  16203. "type": "string",
  16204. "pattern": "^evt_"
  16205. },
  16206. "type": {
  16207. "type": "string",
  16208. "enum": ["session.next.prompt.promoted"]
  16209. },
  16210. "properties": {
  16211. "type": "object",
  16212. "properties": {
  16213. "timestamp": {
  16214. "type": "number"
  16215. },
  16216. "sessionID": {
  16217. "type": "string",
  16218. "pattern": "^ses"
  16219. },
  16220. "messageID": {
  16221. "type": "string",
  16222. "pattern": "^msg_"
  16223. },
  16224. "prompt": {
  16225. "$ref": "#/components/schemas/Prompt"
  16226. },
  16227. "timeCreated": {
  16228. "type": "number"
  16229. }
  16230. },
  16231. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  16232. "additionalProperties": false
  16233. }
  16234. },
  16235. "required": ["id", "type", "properties"],
  16236. "additionalProperties": false
  16237. },
  16238. {
  16239. "type": "object",
  16240. "properties": {
  16241. "id": {
  16242. "type": "string",
  16243. "pattern": "^evt_"
  16244. },
  16245. "type": {
  16246. "type": "string",
  16247. "enum": ["session.next.interrupt.requested"]
  16248. },
  16249. "properties": {
  16250. "type": "object",
  16251. "properties": {
  16252. "timestamp": {
  16253. "type": "number"
  16254. },
  16255. "sessionID": {
  16256. "type": "string",
  16257. "pattern": "^ses"
  16258. }
  16259. },
  16260. "required": ["timestamp", "sessionID"],
  16261. "additionalProperties": false
  16262. }
  16263. },
  16264. "required": ["id", "type", "properties"],
  16265. "additionalProperties": false
  16266. },
  16267. {
  16268. "type": "object",
  16269. "properties": {
  16270. "id": {
  16271. "type": "string",
  16272. "pattern": "^evt_"
  16273. },
  16274. "type": {
  16275. "type": "string",
  16276. "enum": ["session.next.context.updated"]
  16277. },
  16278. "properties": {
  16279. "type": "object",
  16280. "properties": {
  16281. "timestamp": {
  16282. "type": "number"
  16283. },
  16284. "sessionID": {
  16285. "type": "string",
  16286. "pattern": "^ses"
  16287. },
  16288. "messageID": {
  16289. "type": "string",
  16290. "pattern": "^msg_"
  16291. },
  16292. "text": {
  16293. "type": "string"
  16294. }
  16295. },
  16296. "required": ["timestamp", "sessionID", "messageID", "text"],
  16297. "additionalProperties": false
  16298. }
  16299. },
  16300. "required": ["id", "type", "properties"],
  16301. "additionalProperties": false
  16302. },
  16303. {
  16304. "type": "object",
  16305. "properties": {
  16306. "id": {
  16307. "type": "string",
  16308. "pattern": "^evt_"
  16309. },
  16310. "type": {
  16311. "type": "string",
  16312. "enum": ["session.next.synthetic"]
  16313. },
  16314. "properties": {
  16315. "type": "object",
  16316. "properties": {
  16317. "timestamp": {
  16318. "type": "number"
  16319. },
  16320. "sessionID": {
  16321. "type": "string",
  16322. "pattern": "^ses"
  16323. },
  16324. "messageID": {
  16325. "type": "string",
  16326. "pattern": "^msg_"
  16327. },
  16328. "text": {
  16329. "type": "string"
  16330. }
  16331. },
  16332. "required": ["timestamp", "sessionID", "messageID", "text"],
  16333. "additionalProperties": false
  16334. }
  16335. },
  16336. "required": ["id", "type", "properties"],
  16337. "additionalProperties": false
  16338. },
  16339. {
  16340. "type": "object",
  16341. "properties": {
  16342. "id": {
  16343. "type": "string",
  16344. "pattern": "^evt_"
  16345. },
  16346. "type": {
  16347. "type": "string",
  16348. "enum": ["session.next.shell.started"]
  16349. },
  16350. "properties": {
  16351. "type": "object",
  16352. "properties": {
  16353. "timestamp": {
  16354. "type": "number"
  16355. },
  16356. "sessionID": {
  16357. "type": "string",
  16358. "pattern": "^ses"
  16359. },
  16360. "messageID": {
  16361. "type": "string",
  16362. "pattern": "^msg_"
  16363. },
  16364. "callID": {
  16365. "type": "string"
  16366. },
  16367. "command": {
  16368. "type": "string"
  16369. }
  16370. },
  16371. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  16372. "additionalProperties": false
  16373. }
  16374. },
  16375. "required": ["id", "type", "properties"],
  16376. "additionalProperties": false
  16377. },
  16378. {
  16379. "type": "object",
  16380. "properties": {
  16381. "id": {
  16382. "type": "string",
  16383. "pattern": "^evt_"
  16384. },
  16385. "type": {
  16386. "type": "string",
  16387. "enum": ["session.next.shell.ended"]
  16388. },
  16389. "properties": {
  16390. "type": "object",
  16391. "properties": {
  16392. "timestamp": {
  16393. "type": "number"
  16394. },
  16395. "sessionID": {
  16396. "type": "string",
  16397. "pattern": "^ses"
  16398. },
  16399. "callID": {
  16400. "type": "string"
  16401. },
  16402. "output": {
  16403. "type": "string"
  16404. }
  16405. },
  16406. "required": ["timestamp", "sessionID", "callID", "output"],
  16407. "additionalProperties": false
  16408. }
  16409. },
  16410. "required": ["id", "type", "properties"],
  16411. "additionalProperties": false
  16412. },
  16413. {
  16414. "type": "object",
  16415. "properties": {
  16416. "id": {
  16417. "type": "string",
  16418. "pattern": "^evt_"
  16419. },
  16420. "type": {
  16421. "type": "string",
  16422. "enum": ["session.next.step.started"]
  16423. },
  16424. "properties": {
  16425. "type": "object",
  16426. "properties": {
  16427. "timestamp": {
  16428. "type": "number"
  16429. },
  16430. "sessionID": {
  16431. "type": "string",
  16432. "pattern": "^ses"
  16433. },
  16434. "assistantMessageID": {
  16435. "type": "string",
  16436. "pattern": "^msg_"
  16437. },
  16438. "agent": {
  16439. "type": "string"
  16440. },
  16441. "model": {
  16442. "type": "object",
  16443. "properties": {
  16444. "id": {
  16445. "type": "string"
  16446. },
  16447. "providerID": {
  16448. "type": "string"
  16449. },
  16450. "variant": {
  16451. "type": "string"
  16452. }
  16453. },
  16454. "required": ["id", "providerID"],
  16455. "additionalProperties": false
  16456. },
  16457. "snapshot": {
  16458. "type": "string"
  16459. }
  16460. },
  16461. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  16462. "additionalProperties": false
  16463. }
  16464. },
  16465. "required": ["id", "type", "properties"],
  16466. "additionalProperties": false
  16467. },
  16468. {
  16469. "type": "object",
  16470. "properties": {
  16471. "id": {
  16472. "type": "string",
  16473. "pattern": "^evt_"
  16474. },
  16475. "type": {
  16476. "type": "string",
  16477. "enum": ["session.next.step.ended"]
  16478. },
  16479. "properties": {
  16480. "type": "object",
  16481. "properties": {
  16482. "timestamp": {
  16483. "type": "number"
  16484. },
  16485. "sessionID": {
  16486. "type": "string",
  16487. "pattern": "^ses"
  16488. },
  16489. "assistantMessageID": {
  16490. "type": "string",
  16491. "pattern": "^msg_"
  16492. },
  16493. "finish": {
  16494. "type": "string"
  16495. },
  16496. "cost": {
  16497. "type": "number"
  16498. },
  16499. "tokens": {
  16500. "type": "object",
  16501. "properties": {
  16502. "input": {
  16503. "type": "number"
  16504. },
  16505. "output": {
  16506. "type": "number"
  16507. },
  16508. "reasoning": {
  16509. "type": "number"
  16510. },
  16511. "cache": {
  16512. "type": "object",
  16513. "properties": {
  16514. "read": {
  16515. "type": "number"
  16516. },
  16517. "write": {
  16518. "type": "number"
  16519. }
  16520. },
  16521. "required": ["read", "write"],
  16522. "additionalProperties": false
  16523. }
  16524. },
  16525. "required": ["input", "output", "reasoning", "cache"],
  16526. "additionalProperties": false
  16527. },
  16528. "snapshot": {
  16529. "type": "string"
  16530. }
  16531. },
  16532. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  16533. "additionalProperties": false
  16534. }
  16535. },
  16536. "required": ["id", "type", "properties"],
  16537. "additionalProperties": false
  16538. },
  16539. {
  16540. "type": "object",
  16541. "properties": {
  16542. "id": {
  16543. "type": "string",
  16544. "pattern": "^evt_"
  16545. },
  16546. "type": {
  16547. "type": "string",
  16548. "enum": ["session.next.step.failed"]
  16549. },
  16550. "properties": {
  16551. "type": "object",
  16552. "properties": {
  16553. "timestamp": {
  16554. "type": "number"
  16555. },
  16556. "sessionID": {
  16557. "type": "string",
  16558. "pattern": "^ses"
  16559. },
  16560. "assistantMessageID": {
  16561. "type": "string",
  16562. "pattern": "^msg_"
  16563. },
  16564. "error": {
  16565. "$ref": "#/components/schemas/SessionErrorUnknown"
  16566. }
  16567. },
  16568. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  16569. "additionalProperties": false
  16570. }
  16571. },
  16572. "required": ["id", "type", "properties"],
  16573. "additionalProperties": false
  16574. },
  16575. {
  16576. "type": "object",
  16577. "properties": {
  16578. "id": {
  16579. "type": "string",
  16580. "pattern": "^evt_"
  16581. },
  16582. "type": {
  16583. "type": "string",
  16584. "enum": ["session.next.text.started"]
  16585. },
  16586. "properties": {
  16587. "type": "object",
  16588. "properties": {
  16589. "timestamp": {
  16590. "type": "number"
  16591. },
  16592. "sessionID": {
  16593. "type": "string",
  16594. "pattern": "^ses"
  16595. },
  16596. "assistantMessageID": {
  16597. "type": "string",
  16598. "pattern": "^msg_"
  16599. },
  16600. "textID": {
  16601. "type": "string"
  16602. }
  16603. },
  16604. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  16605. "additionalProperties": false
  16606. }
  16607. },
  16608. "required": ["id", "type", "properties"],
  16609. "additionalProperties": false
  16610. },
  16611. {
  16612. "type": "object",
  16613. "properties": {
  16614. "id": {
  16615. "type": "string",
  16616. "pattern": "^evt_"
  16617. },
  16618. "type": {
  16619. "type": "string",
  16620. "enum": ["session.next.text.delta"]
  16621. },
  16622. "properties": {
  16623. "type": "object",
  16624. "properties": {
  16625. "timestamp": {
  16626. "type": "number"
  16627. },
  16628. "sessionID": {
  16629. "type": "string",
  16630. "pattern": "^ses"
  16631. },
  16632. "assistantMessageID": {
  16633. "type": "string",
  16634. "pattern": "^msg_"
  16635. },
  16636. "textID": {
  16637. "type": "string"
  16638. },
  16639. "delta": {
  16640. "type": "string"
  16641. }
  16642. },
  16643. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  16644. "additionalProperties": false
  16645. }
  16646. },
  16647. "required": ["id", "type", "properties"],
  16648. "additionalProperties": false
  16649. },
  16650. {
  16651. "type": "object",
  16652. "properties": {
  16653. "id": {
  16654. "type": "string",
  16655. "pattern": "^evt_"
  16656. },
  16657. "type": {
  16658. "type": "string",
  16659. "enum": ["session.next.text.ended"]
  16660. },
  16661. "properties": {
  16662. "type": "object",
  16663. "properties": {
  16664. "timestamp": {
  16665. "type": "number"
  16666. },
  16667. "sessionID": {
  16668. "type": "string",
  16669. "pattern": "^ses"
  16670. },
  16671. "assistantMessageID": {
  16672. "type": "string",
  16673. "pattern": "^msg_"
  16674. },
  16675. "textID": {
  16676. "type": "string"
  16677. },
  16678. "text": {
  16679. "type": "string"
  16680. }
  16681. },
  16682. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  16683. "additionalProperties": false
  16684. }
  16685. },
  16686. "required": ["id", "type", "properties"],
  16687. "additionalProperties": false
  16688. },
  16689. {
  16690. "type": "object",
  16691. "properties": {
  16692. "id": {
  16693. "type": "string",
  16694. "pattern": "^evt_"
  16695. },
  16696. "type": {
  16697. "type": "string",
  16698. "enum": ["session.next.reasoning.started"]
  16699. },
  16700. "properties": {
  16701. "type": "object",
  16702. "properties": {
  16703. "timestamp": {
  16704. "type": "number"
  16705. },
  16706. "sessionID": {
  16707. "type": "string",
  16708. "pattern": "^ses"
  16709. },
  16710. "assistantMessageID": {
  16711. "type": "string",
  16712. "pattern": "^msg_"
  16713. },
  16714. "reasoningID": {
  16715. "type": "string"
  16716. },
  16717. "providerMetadata": {
  16718. "type": "object",
  16719. "additionalProperties": {
  16720. "type": "object"
  16721. }
  16722. }
  16723. },
  16724. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  16725. "additionalProperties": false
  16726. }
  16727. },
  16728. "required": ["id", "type", "properties"],
  16729. "additionalProperties": false
  16730. },
  16731. {
  16732. "type": "object",
  16733. "properties": {
  16734. "id": {
  16735. "type": "string",
  16736. "pattern": "^evt_"
  16737. },
  16738. "type": {
  16739. "type": "string",
  16740. "enum": ["session.next.reasoning.delta"]
  16741. },
  16742. "properties": {
  16743. "type": "object",
  16744. "properties": {
  16745. "timestamp": {
  16746. "type": "number"
  16747. },
  16748. "sessionID": {
  16749. "type": "string",
  16750. "pattern": "^ses"
  16751. },
  16752. "assistantMessageID": {
  16753. "type": "string",
  16754. "pattern": "^msg_"
  16755. },
  16756. "reasoningID": {
  16757. "type": "string"
  16758. },
  16759. "delta": {
  16760. "type": "string"
  16761. }
  16762. },
  16763. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  16764. "additionalProperties": false
  16765. }
  16766. },
  16767. "required": ["id", "type", "properties"],
  16768. "additionalProperties": false
  16769. },
  16770. {
  16771. "type": "object",
  16772. "properties": {
  16773. "id": {
  16774. "type": "string",
  16775. "pattern": "^evt_"
  16776. },
  16777. "type": {
  16778. "type": "string",
  16779. "enum": ["session.next.reasoning.ended"]
  16780. },
  16781. "properties": {
  16782. "type": "object",
  16783. "properties": {
  16784. "timestamp": {
  16785. "type": "number"
  16786. },
  16787. "sessionID": {
  16788. "type": "string",
  16789. "pattern": "^ses"
  16790. },
  16791. "assistantMessageID": {
  16792. "type": "string",
  16793. "pattern": "^msg_"
  16794. },
  16795. "reasoningID": {
  16796. "type": "string"
  16797. },
  16798. "text": {
  16799. "type": "string"
  16800. },
  16801. "providerMetadata": {
  16802. "type": "object",
  16803. "additionalProperties": {
  16804. "type": "object"
  16805. }
  16806. }
  16807. },
  16808. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  16809. "additionalProperties": false
  16810. }
  16811. },
  16812. "required": ["id", "type", "properties"],
  16813. "additionalProperties": false
  16814. },
  16815. {
  16816. "type": "object",
  16817. "properties": {
  16818. "id": {
  16819. "type": "string",
  16820. "pattern": "^evt_"
  16821. },
  16822. "type": {
  16823. "type": "string",
  16824. "enum": ["session.next.tool.input.started"]
  16825. },
  16826. "properties": {
  16827. "type": "object",
  16828. "properties": {
  16829. "timestamp": {
  16830. "type": "number"
  16831. },
  16832. "sessionID": {
  16833. "type": "string",
  16834. "pattern": "^ses"
  16835. },
  16836. "assistantMessageID": {
  16837. "type": "string",
  16838. "pattern": "^msg_"
  16839. },
  16840. "callID": {
  16841. "type": "string"
  16842. },
  16843. "name": {
  16844. "type": "string"
  16845. }
  16846. },
  16847. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  16848. "additionalProperties": false
  16849. }
  16850. },
  16851. "required": ["id", "type", "properties"],
  16852. "additionalProperties": false
  16853. },
  16854. {
  16855. "type": "object",
  16856. "properties": {
  16857. "id": {
  16858. "type": "string",
  16859. "pattern": "^evt_"
  16860. },
  16861. "type": {
  16862. "type": "string",
  16863. "enum": ["session.next.tool.input.delta"]
  16864. },
  16865. "properties": {
  16866. "type": "object",
  16867. "properties": {
  16868. "timestamp": {
  16869. "type": "number"
  16870. },
  16871. "sessionID": {
  16872. "type": "string",
  16873. "pattern": "^ses"
  16874. },
  16875. "assistantMessageID": {
  16876. "type": "string",
  16877. "pattern": "^msg_"
  16878. },
  16879. "callID": {
  16880. "type": "string"
  16881. },
  16882. "delta": {
  16883. "type": "string"
  16884. }
  16885. },
  16886. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  16887. "additionalProperties": false
  16888. }
  16889. },
  16890. "required": ["id", "type", "properties"],
  16891. "additionalProperties": false
  16892. },
  16893. {
  16894. "type": "object",
  16895. "properties": {
  16896. "id": {
  16897. "type": "string",
  16898. "pattern": "^evt_"
  16899. },
  16900. "type": {
  16901. "type": "string",
  16902. "enum": ["session.next.tool.input.ended"]
  16903. },
  16904. "properties": {
  16905. "type": "object",
  16906. "properties": {
  16907. "timestamp": {
  16908. "type": "number"
  16909. },
  16910. "sessionID": {
  16911. "type": "string",
  16912. "pattern": "^ses"
  16913. },
  16914. "assistantMessageID": {
  16915. "type": "string",
  16916. "pattern": "^msg_"
  16917. },
  16918. "callID": {
  16919. "type": "string"
  16920. },
  16921. "text": {
  16922. "type": "string"
  16923. }
  16924. },
  16925. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  16926. "additionalProperties": false
  16927. }
  16928. },
  16929. "required": ["id", "type", "properties"],
  16930. "additionalProperties": false
  16931. },
  16932. {
  16933. "type": "object",
  16934. "properties": {
  16935. "id": {
  16936. "type": "string",
  16937. "pattern": "^evt_"
  16938. },
  16939. "type": {
  16940. "type": "string",
  16941. "enum": ["session.next.tool.called"]
  16942. },
  16943. "properties": {
  16944. "type": "object",
  16945. "properties": {
  16946. "timestamp": {
  16947. "type": "number"
  16948. },
  16949. "sessionID": {
  16950. "type": "string",
  16951. "pattern": "^ses"
  16952. },
  16953. "assistantMessageID": {
  16954. "type": "string",
  16955. "pattern": "^msg_"
  16956. },
  16957. "callID": {
  16958. "type": "string"
  16959. },
  16960. "tool": {
  16961. "type": "string"
  16962. },
  16963. "input": {
  16964. "type": "object"
  16965. },
  16966. "provider": {
  16967. "type": "object",
  16968. "properties": {
  16969. "executed": {
  16970. "type": "boolean"
  16971. },
  16972. "metadata": {
  16973. "type": "object",
  16974. "additionalProperties": {
  16975. "type": "object"
  16976. }
  16977. }
  16978. },
  16979. "required": ["executed"],
  16980. "additionalProperties": false
  16981. }
  16982. },
  16983. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  16984. "additionalProperties": false
  16985. }
  16986. },
  16987. "required": ["id", "type", "properties"],
  16988. "additionalProperties": false
  16989. },
  16990. {
  16991. "type": "object",
  16992. "properties": {
  16993. "id": {
  16994. "type": "string",
  16995. "pattern": "^evt_"
  16996. },
  16997. "type": {
  16998. "type": "string",
  16999. "enum": ["session.next.tool.progress"]
  17000. },
  17001. "properties": {
  17002. "type": "object",
  17003. "properties": {
  17004. "timestamp": {
  17005. "type": "number"
  17006. },
  17007. "sessionID": {
  17008. "type": "string",
  17009. "pattern": "^ses"
  17010. },
  17011. "assistantMessageID": {
  17012. "type": "string",
  17013. "pattern": "^msg_"
  17014. },
  17015. "callID": {
  17016. "type": "string"
  17017. },
  17018. "structured": {
  17019. "type": "object"
  17020. },
  17021. "content": {
  17022. "type": "array",
  17023. "items": {
  17024. "anyOf": [
  17025. {
  17026. "$ref": "#/components/schemas/ToolTextContent"
  17027. },
  17028. {
  17029. "$ref": "#/components/schemas/ToolFileContent"
  17030. }
  17031. ]
  17032. }
  17033. }
  17034. },
  17035. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17036. "additionalProperties": false
  17037. }
  17038. },
  17039. "required": ["id", "type", "properties"],
  17040. "additionalProperties": false
  17041. },
  17042. {
  17043. "type": "object",
  17044. "properties": {
  17045. "id": {
  17046. "type": "string",
  17047. "pattern": "^evt_"
  17048. },
  17049. "type": {
  17050. "type": "string",
  17051. "enum": ["session.next.tool.success"]
  17052. },
  17053. "properties": {
  17054. "type": "object",
  17055. "properties": {
  17056. "timestamp": {
  17057. "type": "number"
  17058. },
  17059. "sessionID": {
  17060. "type": "string",
  17061. "pattern": "^ses"
  17062. },
  17063. "assistantMessageID": {
  17064. "type": "string",
  17065. "pattern": "^msg_"
  17066. },
  17067. "callID": {
  17068. "type": "string"
  17069. },
  17070. "structured": {
  17071. "type": "object"
  17072. },
  17073. "content": {
  17074. "type": "array",
  17075. "items": {
  17076. "anyOf": [
  17077. {
  17078. "$ref": "#/components/schemas/ToolTextContent"
  17079. },
  17080. {
  17081. "$ref": "#/components/schemas/ToolFileContent"
  17082. }
  17083. ]
  17084. }
  17085. },
  17086. "outputPaths": {
  17087. "type": "array",
  17088. "items": {
  17089. "type": "string"
  17090. }
  17091. },
  17092. "result": {},
  17093. "provider": {
  17094. "type": "object",
  17095. "properties": {
  17096. "executed": {
  17097. "type": "boolean"
  17098. },
  17099. "metadata": {
  17100. "type": "object",
  17101. "additionalProperties": {
  17102. "type": "object"
  17103. }
  17104. }
  17105. },
  17106. "required": ["executed"],
  17107. "additionalProperties": false
  17108. }
  17109. },
  17110. "required": [
  17111. "timestamp",
  17112. "sessionID",
  17113. "assistantMessageID",
  17114. "callID",
  17115. "structured",
  17116. "content",
  17117. "provider"
  17118. ],
  17119. "additionalProperties": false
  17120. }
  17121. },
  17122. "required": ["id", "type", "properties"],
  17123. "additionalProperties": false
  17124. },
  17125. {
  17126. "type": "object",
  17127. "properties": {
  17128. "id": {
  17129. "type": "string",
  17130. "pattern": "^evt_"
  17131. },
  17132. "type": {
  17133. "type": "string",
  17134. "enum": ["session.next.tool.failed"]
  17135. },
  17136. "properties": {
  17137. "type": "object",
  17138. "properties": {
  17139. "timestamp": {
  17140. "type": "number"
  17141. },
  17142. "sessionID": {
  17143. "type": "string",
  17144. "pattern": "^ses"
  17145. },
  17146. "assistantMessageID": {
  17147. "type": "string",
  17148. "pattern": "^msg_"
  17149. },
  17150. "callID": {
  17151. "type": "string"
  17152. },
  17153. "error": {
  17154. "$ref": "#/components/schemas/SessionErrorUnknown"
  17155. },
  17156. "result": {},
  17157. "provider": {
  17158. "type": "object",
  17159. "properties": {
  17160. "executed": {
  17161. "type": "boolean"
  17162. },
  17163. "metadata": {
  17164. "type": "object",
  17165. "additionalProperties": {
  17166. "type": "object"
  17167. }
  17168. }
  17169. },
  17170. "required": ["executed"],
  17171. "additionalProperties": false
  17172. }
  17173. },
  17174. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  17175. "additionalProperties": false
  17176. }
  17177. },
  17178. "required": ["id", "type", "properties"],
  17179. "additionalProperties": false
  17180. },
  17181. {
  17182. "type": "object",
  17183. "properties": {
  17184. "id": {
  17185. "type": "string",
  17186. "pattern": "^evt_"
  17187. },
  17188. "type": {
  17189. "type": "string",
  17190. "enum": ["session.next.retried"]
  17191. },
  17192. "properties": {
  17193. "type": "object",
  17194. "properties": {
  17195. "timestamp": {
  17196. "type": "number"
  17197. },
  17198. "sessionID": {
  17199. "type": "string",
  17200. "pattern": "^ses"
  17201. },
  17202. "attempt": {
  17203. "type": "number"
  17204. },
  17205. "error": {
  17206. "$ref": "#/components/schemas/SessionNextRetry_error"
  17207. }
  17208. },
  17209. "required": ["timestamp", "sessionID", "attempt", "error"],
  17210. "additionalProperties": false
  17211. }
  17212. },
  17213. "required": ["id", "type", "properties"],
  17214. "additionalProperties": false
  17215. },
  17216. {
  17217. "type": "object",
  17218. "properties": {
  17219. "id": {
  17220. "type": "string",
  17221. "pattern": "^evt_"
  17222. },
  17223. "type": {
  17224. "type": "string",
  17225. "enum": ["session.next.compaction.started"]
  17226. },
  17227. "properties": {
  17228. "type": "object",
  17229. "properties": {
  17230. "timestamp": {
  17231. "type": "number"
  17232. },
  17233. "sessionID": {
  17234. "type": "string",
  17235. "pattern": "^ses"
  17236. },
  17237. "messageID": {
  17238. "type": "string",
  17239. "pattern": "^msg_"
  17240. },
  17241. "reason": {
  17242. "type": "string",
  17243. "enum": ["auto", "manual"]
  17244. }
  17245. },
  17246. "required": ["timestamp", "sessionID", "messageID", "reason"],
  17247. "additionalProperties": false
  17248. }
  17249. },
  17250. "required": ["id", "type", "properties"],
  17251. "additionalProperties": false
  17252. },
  17253. {
  17254. "type": "object",
  17255. "properties": {
  17256. "id": {
  17257. "type": "string",
  17258. "pattern": "^evt_"
  17259. },
  17260. "type": {
  17261. "type": "string",
  17262. "enum": ["session.next.compaction.delta"]
  17263. },
  17264. "properties": {
  17265. "type": "object",
  17266. "properties": {
  17267. "timestamp": {
  17268. "type": "number"
  17269. },
  17270. "sessionID": {
  17271. "type": "string",
  17272. "pattern": "^ses"
  17273. },
  17274. "messageID": {
  17275. "type": "string",
  17276. "pattern": "^msg_"
  17277. },
  17278. "text": {
  17279. "type": "string"
  17280. }
  17281. },
  17282. "required": ["timestamp", "sessionID", "messageID", "text"],
  17283. "additionalProperties": false
  17284. }
  17285. },
  17286. "required": ["id", "type", "properties"],
  17287. "additionalProperties": false
  17288. },
  17289. {
  17290. "type": "object",
  17291. "properties": {
  17292. "id": {
  17293. "type": "string",
  17294. "pattern": "^evt_"
  17295. },
  17296. "type": {
  17297. "type": "string",
  17298. "enum": ["session.next.compaction.ended"]
  17299. },
  17300. "properties": {
  17301. "type": "object",
  17302. "properties": {
  17303. "timestamp": {
  17304. "type": "number"
  17305. },
  17306. "sessionID": {
  17307. "type": "string",
  17308. "pattern": "^ses"
  17309. },
  17310. "messageID": {
  17311. "type": "string",
  17312. "pattern": "^msg_"
  17313. },
  17314. "reason": {
  17315. "type": "string",
  17316. "enum": ["auto", "manual"]
  17317. },
  17318. "text": {
  17319. "type": "string"
  17320. },
  17321. "recent": {
  17322. "type": "string"
  17323. }
  17324. },
  17325. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  17326. "additionalProperties": false
  17327. }
  17328. },
  17329. "required": ["id", "type", "properties"],
  17330. "additionalProperties": false
  17331. },
  17332. {
  17333. "type": "object",
  17334. "properties": {
  17335. "id": {
  17336. "type": "string",
  17337. "pattern": "^evt_"
  17338. },
  17339. "type": {
  17340. "type": "string",
  17341. "enum": ["message.part.delta"]
  17342. },
  17343. "properties": {
  17344. "type": "object",
  17345. "properties": {
  17346. "sessionID": {
  17347. "type": "string",
  17348. "pattern": "^ses"
  17349. },
  17350. "messageID": {
  17351. "type": "string",
  17352. "pattern": "^msg"
  17353. },
  17354. "partID": {
  17355. "type": "string",
  17356. "pattern": "^prt"
  17357. },
  17358. "field": {
  17359. "type": "string"
  17360. },
  17361. "delta": {
  17362. "type": "string"
  17363. }
  17364. },
  17365. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17366. "additionalProperties": false
  17367. }
  17368. },
  17369. "required": ["id", "type", "properties"],
  17370. "additionalProperties": false
  17371. },
  17372. {
  17373. "type": "object",
  17374. "properties": {
  17375. "id": {
  17376. "type": "string",
  17377. "pattern": "^evt_"
  17378. },
  17379. "type": {
  17380. "type": "string",
  17381. "enum": ["session.diff"]
  17382. },
  17383. "properties": {
  17384. "type": "object",
  17385. "properties": {
  17386. "sessionID": {
  17387. "type": "string",
  17388. "pattern": "^ses"
  17389. },
  17390. "diff": {
  17391. "type": "array",
  17392. "items": {
  17393. "$ref": "#/components/schemas/SnapshotFileDiff"
  17394. }
  17395. }
  17396. },
  17397. "required": ["sessionID", "diff"],
  17398. "additionalProperties": false
  17399. }
  17400. },
  17401. "required": ["id", "type", "properties"],
  17402. "additionalProperties": false
  17403. },
  17404. {
  17405. "type": "object",
  17406. "properties": {
  17407. "id": {
  17408. "type": "string",
  17409. "pattern": "^evt_"
  17410. },
  17411. "type": {
  17412. "type": "string",
  17413. "enum": ["session.error"]
  17414. },
  17415. "properties": {
  17416. "type": "object",
  17417. "properties": {
  17418. "sessionID": {
  17419. "type": "string",
  17420. "pattern": "^ses"
  17421. },
  17422. "error": {
  17423. "anyOf": [
  17424. {
  17425. "$ref": "#/components/schemas/ProviderAuthError"
  17426. },
  17427. {
  17428. "$ref": "#/components/schemas/UnknownError"
  17429. },
  17430. {
  17431. "$ref": "#/components/schemas/MessageOutputLengthError"
  17432. },
  17433. {
  17434. "$ref": "#/components/schemas/MessageAbortedError"
  17435. },
  17436. {
  17437. "$ref": "#/components/schemas/StructuredOutputError"
  17438. },
  17439. {
  17440. "$ref": "#/components/schemas/ContextOverflowError"
  17441. },
  17442. {
  17443. "$ref": "#/components/schemas/ContentFilterError"
  17444. },
  17445. {
  17446. "$ref": "#/components/schemas/APIError"
  17447. }
  17448. ]
  17449. }
  17450. },
  17451. "additionalProperties": false
  17452. }
  17453. },
  17454. "required": ["id", "type", "properties"],
  17455. "additionalProperties": false
  17456. },
  17457. {
  17458. "type": "object",
  17459. "properties": {
  17460. "id": {
  17461. "type": "string",
  17462. "pattern": "^evt_"
  17463. },
  17464. "type": {
  17465. "type": "string",
  17466. "enum": ["installation.updated"]
  17467. },
  17468. "properties": {
  17469. "type": "object",
  17470. "properties": {
  17471. "version": {
  17472. "type": "string"
  17473. }
  17474. },
  17475. "required": ["version"],
  17476. "additionalProperties": false
  17477. }
  17478. },
  17479. "required": ["id", "type", "properties"],
  17480. "additionalProperties": false
  17481. },
  17482. {
  17483. "type": "object",
  17484. "properties": {
  17485. "id": {
  17486. "type": "string",
  17487. "pattern": "^evt_"
  17488. },
  17489. "type": {
  17490. "type": "string",
  17491. "enum": ["installation.update-available"]
  17492. },
  17493. "properties": {
  17494. "type": "object",
  17495. "properties": {
  17496. "version": {
  17497. "type": "string"
  17498. }
  17499. },
  17500. "required": ["version"],
  17501. "additionalProperties": false
  17502. }
  17503. },
  17504. "required": ["id", "type", "properties"],
  17505. "additionalProperties": false
  17506. },
  17507. {
  17508. "type": "object",
  17509. "properties": {
  17510. "id": {
  17511. "type": "string",
  17512. "pattern": "^evt_"
  17513. },
  17514. "type": {
  17515. "type": "string",
  17516. "enum": ["file.edited"]
  17517. },
  17518. "properties": {
  17519. "type": "object",
  17520. "properties": {
  17521. "file": {
  17522. "type": "string"
  17523. }
  17524. },
  17525. "required": ["file"],
  17526. "additionalProperties": false
  17527. }
  17528. },
  17529. "required": ["id", "type", "properties"],
  17530. "additionalProperties": false
  17531. },
  17532. {
  17533. "type": "object",
  17534. "properties": {
  17535. "id": {
  17536. "type": "string",
  17537. "pattern": "^evt_"
  17538. },
  17539. "type": {
  17540. "type": "string",
  17541. "enum": ["integration.updated"]
  17542. },
  17543. "properties": {
  17544. "type": "object",
  17545. "properties": {}
  17546. }
  17547. },
  17548. "required": ["id", "type", "properties"],
  17549. "additionalProperties": false
  17550. },
  17551. {
  17552. "type": "object",
  17553. "properties": {
  17554. "id": {
  17555. "type": "string",
  17556. "pattern": "^evt_"
  17557. },
  17558. "type": {
  17559. "type": "string",
  17560. "enum": ["permission.v2.asked"]
  17561. },
  17562. "properties": {
  17563. "type": "object",
  17564. "properties": {
  17565. "id": {
  17566. "type": "string",
  17567. "pattern": "^per"
  17568. },
  17569. "sessionID": {
  17570. "type": "string",
  17571. "pattern": "^ses"
  17572. },
  17573. "action": {
  17574. "type": "string"
  17575. },
  17576. "resources": {
  17577. "type": "array",
  17578. "items": {
  17579. "type": "string"
  17580. }
  17581. },
  17582. "save": {
  17583. "type": "array",
  17584. "items": {
  17585. "type": "string"
  17586. }
  17587. },
  17588. "metadata": {
  17589. "type": "object"
  17590. },
  17591. "source": {
  17592. "$ref": "#/components/schemas/PermissionV2Source"
  17593. }
  17594. },
  17595. "required": ["id", "sessionID", "action", "resources"],
  17596. "additionalProperties": false
  17597. }
  17598. },
  17599. "required": ["id", "type", "properties"],
  17600. "additionalProperties": false
  17601. },
  17602. {
  17603. "type": "object",
  17604. "properties": {
  17605. "id": {
  17606. "type": "string",
  17607. "pattern": "^evt_"
  17608. },
  17609. "type": {
  17610. "type": "string",
  17611. "enum": ["permission.v2.replied"]
  17612. },
  17613. "properties": {
  17614. "type": "object",
  17615. "properties": {
  17616. "sessionID": {
  17617. "type": "string",
  17618. "pattern": "^ses"
  17619. },
  17620. "requestID": {
  17621. "type": "string",
  17622. "pattern": "^per"
  17623. },
  17624. "reply": {
  17625. "$ref": "#/components/schemas/PermissionV2Reply"
  17626. }
  17627. },
  17628. "required": ["sessionID", "requestID", "reply"],
  17629. "additionalProperties": false
  17630. }
  17631. },
  17632. "required": ["id", "type", "properties"],
  17633. "additionalProperties": false
  17634. },
  17635. {
  17636. "type": "object",
  17637. "properties": {
  17638. "id": {
  17639. "type": "string",
  17640. "pattern": "^evt_"
  17641. },
  17642. "type": {
  17643. "type": "string",
  17644. "enum": ["reference.updated"]
  17645. },
  17646. "properties": {
  17647. "type": "object",
  17648. "properties": {}
  17649. }
  17650. },
  17651. "required": ["id", "type", "properties"],
  17652. "additionalProperties": false
  17653. },
  17654. {
  17655. "type": "object",
  17656. "properties": {
  17657. "id": {
  17658. "type": "string",
  17659. "pattern": "^evt_"
  17660. },
  17661. "type": {
  17662. "type": "string",
  17663. "enum": ["file.watcher.updated"]
  17664. },
  17665. "properties": {
  17666. "type": "object",
  17667. "properties": {
  17668. "file": {
  17669. "type": "string"
  17670. },
  17671. "event": {
  17672. "type": "string",
  17673. "enum": ["add", "change", "unlink"]
  17674. }
  17675. },
  17676. "required": ["file", "event"],
  17677. "additionalProperties": false
  17678. }
  17679. },
  17680. "required": ["id", "type", "properties"],
  17681. "additionalProperties": false
  17682. },
  17683. {
  17684. "type": "object",
  17685. "properties": {
  17686. "id": {
  17687. "type": "string",
  17688. "pattern": "^evt_"
  17689. },
  17690. "type": {
  17691. "type": "string",
  17692. "enum": ["pty.created"]
  17693. },
  17694. "properties": {
  17695. "type": "object",
  17696. "properties": {
  17697. "info": {
  17698. "$ref": "#/components/schemas/Pty"
  17699. }
  17700. },
  17701. "required": ["info"],
  17702. "additionalProperties": false
  17703. }
  17704. },
  17705. "required": ["id", "type", "properties"],
  17706. "additionalProperties": false
  17707. },
  17708. {
  17709. "type": "object",
  17710. "properties": {
  17711. "id": {
  17712. "type": "string",
  17713. "pattern": "^evt_"
  17714. },
  17715. "type": {
  17716. "type": "string",
  17717. "enum": ["pty.updated"]
  17718. },
  17719. "properties": {
  17720. "type": "object",
  17721. "properties": {
  17722. "info": {
  17723. "$ref": "#/components/schemas/Pty"
  17724. }
  17725. },
  17726. "required": ["info"],
  17727. "additionalProperties": false
  17728. }
  17729. },
  17730. "required": ["id", "type", "properties"],
  17731. "additionalProperties": false
  17732. },
  17733. {
  17734. "type": "object",
  17735. "properties": {
  17736. "id": {
  17737. "type": "string",
  17738. "pattern": "^evt_"
  17739. },
  17740. "type": {
  17741. "type": "string",
  17742. "enum": ["pty.exited"]
  17743. },
  17744. "properties": {
  17745. "type": "object",
  17746. "properties": {
  17747. "id": {
  17748. "type": "string",
  17749. "pattern": "^pty"
  17750. },
  17751. "exitCode": {
  17752. "type": "integer",
  17753. "minimum": 0
  17754. }
  17755. },
  17756. "required": ["id", "exitCode"],
  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": ["pty.deleted"]
  17773. },
  17774. "properties": {
  17775. "type": "object",
  17776. "properties": {
  17777. "id": {
  17778. "type": "string",
  17779. "pattern": "^pty"
  17780. }
  17781. },
  17782. "required": ["id"],
  17783. "additionalProperties": false
  17784. }
  17785. },
  17786. "required": ["id", "type", "properties"],
  17787. "additionalProperties": false
  17788. },
  17789. {
  17790. "type": "object",
  17791. "properties": {
  17792. "id": {
  17793. "type": "string",
  17794. "pattern": "^evt_"
  17795. },
  17796. "type": {
  17797. "type": "string",
  17798. "enum": ["question.v2.asked"]
  17799. },
  17800. "properties": {
  17801. "type": "object",
  17802. "properties": {
  17803. "id": {
  17804. "type": "string",
  17805. "pattern": "^que"
  17806. },
  17807. "sessionID": {
  17808. "type": "string",
  17809. "pattern": "^ses"
  17810. },
  17811. "questions": {
  17812. "type": "array",
  17813. "items": {
  17814. "$ref": "#/components/schemas/QuestionV2Info"
  17815. },
  17816. "description": "Questions to ask"
  17817. },
  17818. "tool": {
  17819. "$ref": "#/components/schemas/QuestionV2Tool"
  17820. }
  17821. },
  17822. "required": ["id", "sessionID", "questions"],
  17823. "additionalProperties": false
  17824. }
  17825. },
  17826. "required": ["id", "type", "properties"],
  17827. "additionalProperties": false
  17828. },
  17829. {
  17830. "type": "object",
  17831. "properties": {
  17832. "id": {
  17833. "type": "string",
  17834. "pattern": "^evt_"
  17835. },
  17836. "type": {
  17837. "type": "string",
  17838. "enum": ["question.v2.replied"]
  17839. },
  17840. "properties": {
  17841. "type": "object",
  17842. "properties": {
  17843. "sessionID": {
  17844. "type": "string",
  17845. "pattern": "^ses"
  17846. },
  17847. "requestID": {
  17848. "type": "string",
  17849. "pattern": "^que"
  17850. },
  17851. "answers": {
  17852. "type": "array",
  17853. "items": {
  17854. "$ref": "#/components/schemas/QuestionV2Answer"
  17855. }
  17856. }
  17857. },
  17858. "required": ["sessionID", "requestID", "answers"],
  17859. "additionalProperties": false
  17860. }
  17861. },
  17862. "required": ["id", "type", "properties"],
  17863. "additionalProperties": false
  17864. },
  17865. {
  17866. "type": "object",
  17867. "properties": {
  17868. "id": {
  17869. "type": "string",
  17870. "pattern": "^evt_"
  17871. },
  17872. "type": {
  17873. "type": "string",
  17874. "enum": ["question.v2.rejected"]
  17875. },
  17876. "properties": {
  17877. "type": "object",
  17878. "properties": {
  17879. "sessionID": {
  17880. "type": "string",
  17881. "pattern": "^ses"
  17882. },
  17883. "requestID": {
  17884. "type": "string",
  17885. "pattern": "^que"
  17886. }
  17887. },
  17888. "required": ["sessionID", "requestID"],
  17889. "additionalProperties": false
  17890. }
  17891. },
  17892. "required": ["id", "type", "properties"],
  17893. "additionalProperties": false
  17894. },
  17895. {
  17896. "type": "object",
  17897. "properties": {
  17898. "id": {
  17899. "type": "string",
  17900. "pattern": "^evt_"
  17901. },
  17902. "type": {
  17903. "type": "string",
  17904. "enum": ["todo.updated"]
  17905. },
  17906. "properties": {
  17907. "type": "object",
  17908. "properties": {
  17909. "sessionID": {
  17910. "type": "string",
  17911. "pattern": "^ses"
  17912. },
  17913. "todos": {
  17914. "type": "array",
  17915. "items": {
  17916. "$ref": "#/components/schemas/Todo"
  17917. }
  17918. }
  17919. },
  17920. "required": ["sessionID", "todos"],
  17921. "additionalProperties": false
  17922. }
  17923. },
  17924. "required": ["id", "type", "properties"],
  17925. "additionalProperties": false
  17926. },
  17927. {
  17928. "type": "object",
  17929. "properties": {
  17930. "id": {
  17931. "type": "string",
  17932. "pattern": "^evt_"
  17933. },
  17934. "type": {
  17935. "type": "string",
  17936. "enum": ["lsp.updated"]
  17937. },
  17938. "properties": {
  17939. "type": "object",
  17940. "properties": {}
  17941. }
  17942. },
  17943. "required": ["id", "type", "properties"],
  17944. "additionalProperties": false
  17945. },
  17946. {
  17947. "type": "object",
  17948. "properties": {
  17949. "id": {
  17950. "type": "string",
  17951. "pattern": "^evt_"
  17952. },
  17953. "type": {
  17954. "type": "string",
  17955. "enum": ["permission.asked"]
  17956. },
  17957. "properties": {
  17958. "type": "object",
  17959. "properties": {
  17960. "id": {
  17961. "type": "string",
  17962. "pattern": "^per"
  17963. },
  17964. "sessionID": {
  17965. "type": "string",
  17966. "pattern": "^ses"
  17967. },
  17968. "permission": {
  17969. "type": "string"
  17970. },
  17971. "patterns": {
  17972. "type": "array",
  17973. "items": {
  17974. "type": "string"
  17975. }
  17976. },
  17977. "metadata": {
  17978. "type": "object"
  17979. },
  17980. "always": {
  17981. "type": "array",
  17982. "items": {
  17983. "type": "string"
  17984. }
  17985. },
  17986. "tool": {
  17987. "type": "object",
  17988. "properties": {
  17989. "messageID": {
  17990. "type": "string"
  17991. },
  17992. "callID": {
  17993. "type": "string"
  17994. }
  17995. },
  17996. "required": ["messageID", "callID"],
  17997. "additionalProperties": false
  17998. }
  17999. },
  18000. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18001. "additionalProperties": false
  18002. }
  18003. },
  18004. "required": ["id", "type", "properties"],
  18005. "additionalProperties": false
  18006. },
  18007. {
  18008. "type": "object",
  18009. "properties": {
  18010. "id": {
  18011. "type": "string",
  18012. "pattern": "^evt_"
  18013. },
  18014. "type": {
  18015. "type": "string",
  18016. "enum": ["permission.replied"]
  18017. },
  18018. "properties": {
  18019. "type": "object",
  18020. "properties": {
  18021. "sessionID": {
  18022. "type": "string",
  18023. "pattern": "^ses"
  18024. },
  18025. "requestID": {
  18026. "type": "string",
  18027. "pattern": "^per"
  18028. },
  18029. "reply": {
  18030. "type": "string",
  18031. "enum": ["once", "always", "reject"]
  18032. }
  18033. },
  18034. "required": ["sessionID", "requestID", "reply"],
  18035. "additionalProperties": false
  18036. }
  18037. },
  18038. "required": ["id", "type", "properties"],
  18039. "additionalProperties": false
  18040. },
  18041. {
  18042. "type": "object",
  18043. "properties": {
  18044. "id": {
  18045. "type": "string",
  18046. "pattern": "^evt_"
  18047. },
  18048. "type": {
  18049. "type": "string",
  18050. "enum": ["tui.prompt.append"]
  18051. },
  18052. "properties": {
  18053. "type": "object",
  18054. "properties": {
  18055. "text": {
  18056. "type": "string"
  18057. }
  18058. },
  18059. "required": ["text"],
  18060. "additionalProperties": false
  18061. }
  18062. },
  18063. "required": ["id", "type", "properties"],
  18064. "additionalProperties": false
  18065. },
  18066. {
  18067. "type": "object",
  18068. "properties": {
  18069. "id": {
  18070. "type": "string",
  18071. "pattern": "^evt_"
  18072. },
  18073. "type": {
  18074. "type": "string",
  18075. "enum": ["tui.command.execute"]
  18076. },
  18077. "properties": {
  18078. "type": "object",
  18079. "properties": {
  18080. "command": {
  18081. "anyOf": [
  18082. {
  18083. "type": "string",
  18084. "enum": [
  18085. "session.list",
  18086. "session.new",
  18087. "session.share",
  18088. "session.interrupt",
  18089. "session.compact",
  18090. "session.page.up",
  18091. "session.page.down",
  18092. "session.line.up",
  18093. "session.line.down",
  18094. "session.half.page.up",
  18095. "session.half.page.down",
  18096. "session.first",
  18097. "session.last",
  18098. "prompt.clear",
  18099. "prompt.submit",
  18100. "agent.cycle"
  18101. ]
  18102. },
  18103. {
  18104. "type": "string"
  18105. }
  18106. ]
  18107. }
  18108. },
  18109. "required": ["command"],
  18110. "additionalProperties": false
  18111. }
  18112. },
  18113. "required": ["id", "type", "properties"],
  18114. "additionalProperties": false
  18115. },
  18116. {
  18117. "type": "object",
  18118. "properties": {
  18119. "id": {
  18120. "type": "string",
  18121. "pattern": "^evt_"
  18122. },
  18123. "type": {
  18124. "type": "string",
  18125. "enum": ["tui.toast.show"]
  18126. },
  18127. "properties": {
  18128. "type": "object",
  18129. "properties": {
  18130. "title": {
  18131. "type": "string"
  18132. },
  18133. "message": {
  18134. "type": "string"
  18135. },
  18136. "variant": {
  18137. "type": "string",
  18138. "enum": ["info", "success", "warning", "error"]
  18139. },
  18140. "duration": {
  18141. "type": "integer",
  18142. "exclusiveMinimum": 0
  18143. }
  18144. },
  18145. "required": ["message", "variant"],
  18146. "additionalProperties": false
  18147. }
  18148. },
  18149. "required": ["id", "type", "properties"],
  18150. "additionalProperties": false
  18151. },
  18152. {
  18153. "type": "object",
  18154. "properties": {
  18155. "id": {
  18156. "type": "string",
  18157. "pattern": "^evt_"
  18158. },
  18159. "type": {
  18160. "type": "string",
  18161. "enum": ["tui.session.select"]
  18162. },
  18163. "properties": {
  18164. "type": "object",
  18165. "properties": {
  18166. "sessionID": {
  18167. "type": "string",
  18168. "pattern": "^ses",
  18169. "description": "Session ID to navigate to"
  18170. }
  18171. },
  18172. "required": ["sessionID"],
  18173. "additionalProperties": false
  18174. }
  18175. },
  18176. "required": ["id", "type", "properties"],
  18177. "additionalProperties": false
  18178. },
  18179. {
  18180. "type": "object",
  18181. "properties": {
  18182. "id": {
  18183. "type": "string",
  18184. "pattern": "^evt_"
  18185. },
  18186. "type": {
  18187. "type": "string",
  18188. "enum": ["mcp.tools.changed"]
  18189. },
  18190. "properties": {
  18191. "type": "object",
  18192. "properties": {
  18193. "server": {
  18194. "type": "string"
  18195. }
  18196. },
  18197. "required": ["server"],
  18198. "additionalProperties": false
  18199. }
  18200. },
  18201. "required": ["id", "type", "properties"],
  18202. "additionalProperties": false
  18203. },
  18204. {
  18205. "type": "object",
  18206. "properties": {
  18207. "id": {
  18208. "type": "string",
  18209. "pattern": "^evt_"
  18210. },
  18211. "type": {
  18212. "type": "string",
  18213. "enum": ["mcp.browser.open.failed"]
  18214. },
  18215. "properties": {
  18216. "type": "object",
  18217. "properties": {
  18218. "mcpName": {
  18219. "type": "string"
  18220. },
  18221. "url": {
  18222. "type": "string"
  18223. }
  18224. },
  18225. "required": ["mcpName", "url"],
  18226. "additionalProperties": false
  18227. }
  18228. },
  18229. "required": ["id", "type", "properties"],
  18230. "additionalProperties": false
  18231. },
  18232. {
  18233. "type": "object",
  18234. "properties": {
  18235. "id": {
  18236. "type": "string",
  18237. "pattern": "^evt_"
  18238. },
  18239. "type": {
  18240. "type": "string",
  18241. "enum": ["command.executed"]
  18242. },
  18243. "properties": {
  18244. "type": "object",
  18245. "properties": {
  18246. "name": {
  18247. "type": "string"
  18248. },
  18249. "sessionID": {
  18250. "type": "string",
  18251. "pattern": "^ses"
  18252. },
  18253. "arguments": {
  18254. "type": "string"
  18255. },
  18256. "messageID": {
  18257. "type": "string",
  18258. "pattern": "^msg"
  18259. }
  18260. },
  18261. "required": ["name", "sessionID", "arguments", "messageID"],
  18262. "additionalProperties": false
  18263. }
  18264. },
  18265. "required": ["id", "type", "properties"],
  18266. "additionalProperties": false
  18267. },
  18268. {
  18269. "type": "object",
  18270. "properties": {
  18271. "id": {
  18272. "type": "string",
  18273. "pattern": "^evt_"
  18274. },
  18275. "type": {
  18276. "type": "string",
  18277. "enum": ["project.directories.updated"]
  18278. },
  18279. "properties": {
  18280. "type": "object",
  18281. "properties": {
  18282. "projectID": {
  18283. "type": "string"
  18284. }
  18285. },
  18286. "required": ["projectID"],
  18287. "additionalProperties": false
  18288. }
  18289. },
  18290. "required": ["id", "type", "properties"],
  18291. "additionalProperties": false
  18292. },
  18293. {
  18294. "type": "object",
  18295. "properties": {
  18296. "id": {
  18297. "type": "string",
  18298. "pattern": "^evt_"
  18299. },
  18300. "type": {
  18301. "type": "string",
  18302. "enum": ["project.updated"]
  18303. },
  18304. "properties": {
  18305. "type": "object",
  18306. "properties": {
  18307. "id": {
  18308. "type": "string"
  18309. },
  18310. "worktree": {
  18311. "type": "string"
  18312. },
  18313. "vcs": {
  18314. "type": "string",
  18315. "enum": ["git"]
  18316. },
  18317. "name": {
  18318. "type": "string"
  18319. },
  18320. "icon": {
  18321. "type": "object",
  18322. "properties": {
  18323. "url": {
  18324. "type": "string"
  18325. },
  18326. "override": {
  18327. "type": "string"
  18328. },
  18329. "color": {
  18330. "type": "string"
  18331. }
  18332. },
  18333. "additionalProperties": false
  18334. },
  18335. "commands": {
  18336. "type": "object",
  18337. "properties": {
  18338. "start": {
  18339. "type": "string",
  18340. "description": "Startup script to run when creating a new workspace (worktree)"
  18341. }
  18342. },
  18343. "additionalProperties": false
  18344. },
  18345. "time": {
  18346. "type": "object",
  18347. "properties": {
  18348. "created": {
  18349. "type": "integer",
  18350. "minimum": 0
  18351. },
  18352. "updated": {
  18353. "type": "integer",
  18354. "minimum": 0
  18355. },
  18356. "initialized": {
  18357. "type": "integer",
  18358. "minimum": 0
  18359. }
  18360. },
  18361. "required": ["created", "updated"],
  18362. "additionalProperties": false
  18363. },
  18364. "sandboxes": {
  18365. "type": "array",
  18366. "items": {
  18367. "type": "string"
  18368. }
  18369. }
  18370. },
  18371. "required": ["id", "worktree", "time", "sandboxes"],
  18372. "additionalProperties": false
  18373. }
  18374. },
  18375. "required": ["id", "type", "properties"],
  18376. "additionalProperties": false
  18377. },
  18378. {
  18379. "type": "object",
  18380. "properties": {
  18381. "id": {
  18382. "type": "string",
  18383. "pattern": "^evt_"
  18384. },
  18385. "type": {
  18386. "type": "string",
  18387. "enum": ["session.status"]
  18388. },
  18389. "properties": {
  18390. "type": "object",
  18391. "properties": {
  18392. "sessionID": {
  18393. "type": "string",
  18394. "pattern": "^ses"
  18395. },
  18396. "status": {
  18397. "$ref": "#/components/schemas/SessionStatus"
  18398. }
  18399. },
  18400. "required": ["sessionID", "status"],
  18401. "additionalProperties": false
  18402. }
  18403. },
  18404. "required": ["id", "type", "properties"],
  18405. "additionalProperties": false
  18406. },
  18407. {
  18408. "type": "object",
  18409. "properties": {
  18410. "id": {
  18411. "type": "string",
  18412. "pattern": "^evt_"
  18413. },
  18414. "type": {
  18415. "type": "string",
  18416. "enum": ["session.idle"]
  18417. },
  18418. "properties": {
  18419. "type": "object",
  18420. "properties": {
  18421. "sessionID": {
  18422. "type": "string",
  18423. "pattern": "^ses"
  18424. }
  18425. },
  18426. "required": ["sessionID"],
  18427. "additionalProperties": false
  18428. }
  18429. },
  18430. "required": ["id", "type", "properties"],
  18431. "additionalProperties": false
  18432. },
  18433. {
  18434. "type": "object",
  18435. "properties": {
  18436. "id": {
  18437. "type": "string",
  18438. "pattern": "^evt_"
  18439. },
  18440. "type": {
  18441. "type": "string",
  18442. "enum": ["question.asked"]
  18443. },
  18444. "properties": {
  18445. "type": "object",
  18446. "properties": {
  18447. "id": {
  18448. "type": "string",
  18449. "pattern": "^que"
  18450. },
  18451. "sessionID": {
  18452. "type": "string",
  18453. "pattern": "^ses"
  18454. },
  18455. "questions": {
  18456. "type": "array",
  18457. "items": {
  18458. "$ref": "#/components/schemas/QuestionInfo"
  18459. },
  18460. "description": "Questions to ask"
  18461. },
  18462. "tool": {
  18463. "$ref": "#/components/schemas/QuestionTool"
  18464. }
  18465. },
  18466. "required": ["id", "sessionID", "questions"],
  18467. "additionalProperties": false
  18468. }
  18469. },
  18470. "required": ["id", "type", "properties"],
  18471. "additionalProperties": false
  18472. },
  18473. {
  18474. "type": "object",
  18475. "properties": {
  18476. "id": {
  18477. "type": "string",
  18478. "pattern": "^evt_"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["question.replied"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "sessionID": {
  18488. "type": "string",
  18489. "pattern": "^ses"
  18490. },
  18491. "requestID": {
  18492. "type": "string",
  18493. "pattern": "^que"
  18494. },
  18495. "answers": {
  18496. "type": "array",
  18497. "items": {
  18498. "$ref": "#/components/schemas/QuestionAnswer"
  18499. }
  18500. }
  18501. },
  18502. "required": ["sessionID", "requestID", "answers"],
  18503. "additionalProperties": false
  18504. }
  18505. },
  18506. "required": ["id", "type", "properties"],
  18507. "additionalProperties": false
  18508. },
  18509. {
  18510. "type": "object",
  18511. "properties": {
  18512. "id": {
  18513. "type": "string",
  18514. "pattern": "^evt_"
  18515. },
  18516. "type": {
  18517. "type": "string",
  18518. "enum": ["question.rejected"]
  18519. },
  18520. "properties": {
  18521. "type": "object",
  18522. "properties": {
  18523. "sessionID": {
  18524. "type": "string",
  18525. "pattern": "^ses"
  18526. },
  18527. "requestID": {
  18528. "type": "string",
  18529. "pattern": "^que"
  18530. }
  18531. },
  18532. "required": ["sessionID", "requestID"],
  18533. "additionalProperties": false
  18534. }
  18535. },
  18536. "required": ["id", "type", "properties"],
  18537. "additionalProperties": false
  18538. },
  18539. {
  18540. "type": "object",
  18541. "properties": {
  18542. "id": {
  18543. "type": "string",
  18544. "pattern": "^evt_"
  18545. },
  18546. "type": {
  18547. "type": "string",
  18548. "enum": ["session.compacted"]
  18549. },
  18550. "properties": {
  18551. "type": "object",
  18552. "properties": {
  18553. "sessionID": {
  18554. "type": "string",
  18555. "pattern": "^ses"
  18556. }
  18557. },
  18558. "required": ["sessionID"],
  18559. "additionalProperties": false
  18560. }
  18561. },
  18562. "required": ["id", "type", "properties"],
  18563. "additionalProperties": false
  18564. },
  18565. {
  18566. "type": "object",
  18567. "properties": {
  18568. "id": {
  18569. "type": "string",
  18570. "pattern": "^evt_"
  18571. },
  18572. "type": {
  18573. "type": "string",
  18574. "enum": ["vcs.branch.updated"]
  18575. },
  18576. "properties": {
  18577. "type": "object",
  18578. "properties": {
  18579. "branch": {
  18580. "type": "string"
  18581. }
  18582. },
  18583. "additionalProperties": false
  18584. }
  18585. },
  18586. "required": ["id", "type", "properties"],
  18587. "additionalProperties": false
  18588. },
  18589. {
  18590. "type": "object",
  18591. "properties": {
  18592. "id": {
  18593. "type": "string",
  18594. "pattern": "^evt_"
  18595. },
  18596. "type": {
  18597. "type": "string",
  18598. "enum": ["workspace.ready"]
  18599. },
  18600. "properties": {
  18601. "type": "object",
  18602. "properties": {
  18603. "name": {
  18604. "type": "string"
  18605. }
  18606. },
  18607. "required": ["name"],
  18608. "additionalProperties": false
  18609. }
  18610. },
  18611. "required": ["id", "type", "properties"],
  18612. "additionalProperties": false
  18613. },
  18614. {
  18615. "type": "object",
  18616. "properties": {
  18617. "id": {
  18618. "type": "string",
  18619. "pattern": "^evt_"
  18620. },
  18621. "type": {
  18622. "type": "string",
  18623. "enum": ["workspace.failed"]
  18624. },
  18625. "properties": {
  18626. "type": "object",
  18627. "properties": {
  18628. "message": {
  18629. "type": "string"
  18630. }
  18631. },
  18632. "required": ["message"],
  18633. "additionalProperties": false
  18634. }
  18635. },
  18636. "required": ["id", "type", "properties"],
  18637. "additionalProperties": false
  18638. },
  18639. {
  18640. "type": "object",
  18641. "properties": {
  18642. "id": {
  18643. "type": "string",
  18644. "pattern": "^evt_"
  18645. },
  18646. "type": {
  18647. "type": "string",
  18648. "enum": ["workspace.status"]
  18649. },
  18650. "properties": {
  18651. "type": "object",
  18652. "properties": {
  18653. "workspaceID": {
  18654. "type": "string",
  18655. "pattern": "^wrk"
  18656. },
  18657. "status": {
  18658. "type": "string",
  18659. "enum": ["connected", "connecting", "disconnected", "error"]
  18660. }
  18661. },
  18662. "required": ["workspaceID", "status"],
  18663. "additionalProperties": false
  18664. }
  18665. },
  18666. "required": ["id", "type", "properties"],
  18667. "additionalProperties": false
  18668. },
  18669. {
  18670. "type": "object",
  18671. "properties": {
  18672. "id": {
  18673. "type": "string",
  18674. "pattern": "^evt_"
  18675. },
  18676. "type": {
  18677. "type": "string",
  18678. "enum": ["worktree.ready"]
  18679. },
  18680. "properties": {
  18681. "type": "object",
  18682. "properties": {
  18683. "name": {
  18684. "type": "string"
  18685. },
  18686. "branch": {
  18687. "type": "string"
  18688. }
  18689. },
  18690. "required": ["name"],
  18691. "additionalProperties": false
  18692. }
  18693. },
  18694. "required": ["id", "type", "properties"],
  18695. "additionalProperties": false
  18696. },
  18697. {
  18698. "type": "object",
  18699. "properties": {
  18700. "id": {
  18701. "type": "string",
  18702. "pattern": "^evt_"
  18703. },
  18704. "type": {
  18705. "type": "string",
  18706. "enum": ["worktree.failed"]
  18707. },
  18708. "properties": {
  18709. "type": "object",
  18710. "properties": {
  18711. "message": {
  18712. "type": "string"
  18713. }
  18714. },
  18715. "required": ["message"],
  18716. "additionalProperties": false
  18717. }
  18718. },
  18719. "required": ["id", "type", "properties"],
  18720. "additionalProperties": false
  18721. },
  18722. {
  18723. "type": "object",
  18724. "properties": {
  18725. "id": {
  18726. "type": "string",
  18727. "pattern": "^evt_"
  18728. },
  18729. "type": {
  18730. "type": "string",
  18731. "enum": ["server.connected"]
  18732. },
  18733. "properties": {
  18734. "type": "object",
  18735. "properties": {}
  18736. }
  18737. },
  18738. "required": ["id", "type", "properties"],
  18739. "additionalProperties": false
  18740. },
  18741. {
  18742. "type": "object",
  18743. "properties": {
  18744. "id": {
  18745. "type": "string",
  18746. "pattern": "^evt_"
  18747. },
  18748. "type": {
  18749. "type": "string",
  18750. "enum": ["global.disposed"]
  18751. },
  18752. "properties": {
  18753. "type": "object",
  18754. "properties": {}
  18755. }
  18756. },
  18757. "required": ["id", "type", "properties"],
  18758. "additionalProperties": false
  18759. },
  18760. {
  18761. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  18762. },
  18763. {
  18764. "$ref": "#/components/schemas/SyncEventSessionCreated"
  18765. },
  18766. {
  18767. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  18768. },
  18769. {
  18770. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  18771. },
  18772. {
  18773. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  18774. },
  18775. {
  18776. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  18777. },
  18778. {
  18779. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  18780. },
  18781. {
  18782. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  18783. },
  18784. {
  18785. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  18786. },
  18787. {
  18788. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  18789. },
  18790. {
  18791. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  18792. },
  18793. {
  18794. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  18795. },
  18796. {
  18797. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  18798. },
  18799. {
  18800. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  18801. },
  18802. {
  18803. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  18804. },
  18805. {
  18806. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  18807. },
  18808. {
  18809. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  18810. },
  18811. {
  18812. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  18813. },
  18814. {
  18815. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  18816. },
  18817. {
  18818. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  18819. },
  18820. {
  18821. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  18822. },
  18823. {
  18824. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  18825. },
  18826. {
  18827. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  18828. },
  18829. {
  18830. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  18831. },
  18832. {
  18833. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  18834. },
  18835. {
  18836. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  18837. },
  18838. {
  18839. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  18840. },
  18841. {
  18842. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  18843. },
  18844. {
  18845. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  18846. },
  18847. {
  18848. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  18849. },
  18850. {
  18851. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  18852. },
  18853. {
  18854. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  18855. },
  18856. {
  18857. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  18858. },
  18859. {
  18860. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  18861. },
  18862. {
  18863. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  18864. }
  18865. ]
  18866. }
  18867. },
  18868. "required": ["directory", "payload"],
  18869. "additionalProperties": false
  18870. },
  18871. "LogLevel": {
  18872. "type": "string",
  18873. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  18874. "description": "Log level"
  18875. },
  18876. "ServerConfig": {
  18877. "type": "object",
  18878. "properties": {
  18879. "port": {
  18880. "type": "integer",
  18881. "exclusiveMinimum": 0
  18882. },
  18883. "hostname": {
  18884. "type": "string"
  18885. },
  18886. "mdns": {
  18887. "type": "boolean"
  18888. },
  18889. "mdnsDomain": {
  18890. "type": "string"
  18891. },
  18892. "cors": {
  18893. "type": "array",
  18894. "items": {
  18895. "type": "string"
  18896. }
  18897. }
  18898. },
  18899. "additionalProperties": false,
  18900. "description": "Server configuration for opencode serve and web commands"
  18901. },
  18902. "PermissionActionConfig": {
  18903. "type": "string",
  18904. "enum": ["ask", "allow", "deny"]
  18905. },
  18906. "PermissionObjectConfig": {
  18907. "type": "object",
  18908. "additionalProperties": {
  18909. "$ref": "#/components/schemas/PermissionActionConfig"
  18910. }
  18911. },
  18912. "PermissionRuleConfig": {
  18913. "anyOf": [
  18914. {
  18915. "$ref": "#/components/schemas/PermissionActionConfig"
  18916. },
  18917. {
  18918. "$ref": "#/components/schemas/PermissionObjectConfig"
  18919. }
  18920. ]
  18921. },
  18922. "PermissionConfig": {
  18923. "anyOf": [
  18924. {
  18925. "$ref": "#/components/schemas/PermissionActionConfig"
  18926. },
  18927. {
  18928. "type": "object",
  18929. "properties": {
  18930. "read": {
  18931. "$ref": "#/components/schemas/PermissionRuleConfig"
  18932. },
  18933. "edit": {
  18934. "$ref": "#/components/schemas/PermissionRuleConfig"
  18935. },
  18936. "glob": {
  18937. "$ref": "#/components/schemas/PermissionRuleConfig"
  18938. },
  18939. "grep": {
  18940. "$ref": "#/components/schemas/PermissionRuleConfig"
  18941. },
  18942. "list": {
  18943. "$ref": "#/components/schemas/PermissionRuleConfig"
  18944. },
  18945. "bash": {
  18946. "$ref": "#/components/schemas/PermissionRuleConfig"
  18947. },
  18948. "task": {
  18949. "$ref": "#/components/schemas/PermissionRuleConfig"
  18950. },
  18951. "external_directory": {
  18952. "$ref": "#/components/schemas/PermissionRuleConfig"
  18953. },
  18954. "todowrite": {
  18955. "$ref": "#/components/schemas/PermissionActionConfig"
  18956. },
  18957. "question": {
  18958. "$ref": "#/components/schemas/PermissionActionConfig"
  18959. },
  18960. "webfetch": {
  18961. "$ref": "#/components/schemas/PermissionActionConfig"
  18962. },
  18963. "websearch": {
  18964. "$ref": "#/components/schemas/PermissionActionConfig"
  18965. },
  18966. "lsp": {
  18967. "$ref": "#/components/schemas/PermissionRuleConfig"
  18968. },
  18969. "doom_loop": {
  18970. "$ref": "#/components/schemas/PermissionActionConfig"
  18971. },
  18972. "skill": {
  18973. "$ref": "#/components/schemas/PermissionRuleConfig"
  18974. }
  18975. },
  18976. "additionalProperties": {
  18977. "$ref": "#/components/schemas/PermissionRuleConfig"
  18978. }
  18979. }
  18980. ]
  18981. },
  18982. "AgentConfig": {
  18983. "type": "object",
  18984. "properties": {
  18985. "model": {
  18986. "type": "string"
  18987. },
  18988. "variant": {
  18989. "type": "string"
  18990. },
  18991. "temperature": {
  18992. "type": "number"
  18993. },
  18994. "top_p": {
  18995. "type": "number"
  18996. },
  18997. "prompt": {
  18998. "type": "string"
  18999. },
  19000. "tools": {
  19001. "type": "object",
  19002. "additionalProperties": {
  19003. "type": "boolean"
  19004. }
  19005. },
  19006. "disable": {
  19007. "type": "boolean"
  19008. },
  19009. "description": {
  19010. "type": "string"
  19011. },
  19012. "mode": {
  19013. "type": "string",
  19014. "enum": ["subagent", "primary", "all"]
  19015. },
  19016. "hidden": {
  19017. "type": "boolean"
  19018. },
  19019. "options": {
  19020. "type": "object"
  19021. },
  19022. "color": {
  19023. "anyOf": [
  19024. {
  19025. "type": "string",
  19026. "pattern": "^#[0-9a-fA-F]{6}$"
  19027. },
  19028. {
  19029. "type": "string",
  19030. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  19031. }
  19032. ],
  19033. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  19034. },
  19035. "steps": {
  19036. "type": "integer",
  19037. "exclusiveMinimum": 0
  19038. },
  19039. "maxSteps": {
  19040. "type": "integer",
  19041. "exclusiveMinimum": 0
  19042. },
  19043. "permission": {
  19044. "$ref": "#/components/schemas/PermissionConfig"
  19045. }
  19046. },
  19047. "additionalProperties": {}
  19048. },
  19049. "ProviderConfig": {
  19050. "type": "object",
  19051. "properties": {
  19052. "api": {
  19053. "type": "string"
  19054. },
  19055. "name": {
  19056. "type": "string"
  19057. },
  19058. "env": {
  19059. "type": "array",
  19060. "items": {
  19061. "type": "string"
  19062. }
  19063. },
  19064. "id": {
  19065. "type": "string"
  19066. },
  19067. "npm": {
  19068. "type": "string"
  19069. },
  19070. "whitelist": {
  19071. "type": "array",
  19072. "items": {
  19073. "type": "string"
  19074. }
  19075. },
  19076. "blacklist": {
  19077. "type": "array",
  19078. "items": {
  19079. "type": "string"
  19080. }
  19081. },
  19082. "options": {
  19083. "type": "object",
  19084. "properties": {
  19085. "apiKey": {
  19086. "type": "string"
  19087. },
  19088. "baseURL": {
  19089. "type": "string"
  19090. },
  19091. "enterpriseUrl": {
  19092. "type": "string"
  19093. },
  19094. "setCacheKey": {
  19095. "type": "boolean"
  19096. },
  19097. "timeout": {
  19098. "anyOf": [
  19099. {
  19100. "type": "integer",
  19101. "exclusiveMinimum": 0
  19102. },
  19103. {
  19104. "type": "boolean",
  19105. "enum": [false]
  19106. }
  19107. ],
  19108. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  19109. },
  19110. "headerTimeout": {
  19111. "anyOf": [
  19112. {
  19113. "type": "integer",
  19114. "exclusiveMinimum": 0
  19115. },
  19116. {
  19117. "type": "boolean",
  19118. "enum": [false]
  19119. }
  19120. ],
  19121. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  19122. },
  19123. "chunkTimeout": {
  19124. "type": "integer",
  19125. "exclusiveMinimum": 0
  19126. }
  19127. },
  19128. "additionalProperties": {}
  19129. },
  19130. "models": {
  19131. "type": "object",
  19132. "additionalProperties": {
  19133. "type": "object",
  19134. "properties": {
  19135. "id": {
  19136. "type": "string"
  19137. },
  19138. "name": {
  19139. "type": "string"
  19140. },
  19141. "family": {
  19142. "type": "string"
  19143. },
  19144. "release_date": {
  19145. "type": "string"
  19146. },
  19147. "attachment": {
  19148. "type": "boolean"
  19149. },
  19150. "reasoning": {
  19151. "type": "boolean"
  19152. },
  19153. "temperature": {
  19154. "type": "boolean"
  19155. },
  19156. "tool_call": {
  19157. "type": "boolean"
  19158. },
  19159. "interleaved": {
  19160. "anyOf": [
  19161. {
  19162. "type": "boolean",
  19163. "enum": [true]
  19164. },
  19165. {
  19166. "type": "object",
  19167. "properties": {
  19168. "field": {
  19169. "type": "string",
  19170. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19171. }
  19172. },
  19173. "required": ["field"],
  19174. "additionalProperties": false
  19175. }
  19176. ]
  19177. },
  19178. "cost": {
  19179. "type": "object",
  19180. "properties": {
  19181. "input": {
  19182. "type": "number"
  19183. },
  19184. "output": {
  19185. "type": "number"
  19186. },
  19187. "cache_read": {
  19188. "type": "number"
  19189. },
  19190. "cache_write": {
  19191. "type": "number"
  19192. },
  19193. "context_over_200k": {
  19194. "type": "object",
  19195. "properties": {
  19196. "input": {
  19197. "type": "number"
  19198. },
  19199. "output": {
  19200. "type": "number"
  19201. },
  19202. "cache_read": {
  19203. "type": "number"
  19204. },
  19205. "cache_write": {
  19206. "type": "number"
  19207. }
  19208. },
  19209. "required": ["input", "output"],
  19210. "additionalProperties": false
  19211. }
  19212. },
  19213. "required": ["input", "output"],
  19214. "additionalProperties": false
  19215. },
  19216. "limit": {
  19217. "type": "object",
  19218. "properties": {
  19219. "context": {
  19220. "type": "number"
  19221. },
  19222. "input": {
  19223. "type": "number"
  19224. },
  19225. "output": {
  19226. "type": "number"
  19227. }
  19228. },
  19229. "required": ["context", "output"],
  19230. "additionalProperties": false
  19231. },
  19232. "modalities": {
  19233. "type": "object",
  19234. "properties": {
  19235. "input": {
  19236. "type": "array",
  19237. "items": {
  19238. "type": "string",
  19239. "enum": ["text", "audio", "image", "video", "pdf"]
  19240. }
  19241. },
  19242. "output": {
  19243. "type": "array",
  19244. "items": {
  19245. "type": "string",
  19246. "enum": ["text", "audio", "image", "video", "pdf"]
  19247. }
  19248. }
  19249. },
  19250. "additionalProperties": false
  19251. },
  19252. "experimental": {
  19253. "type": "boolean"
  19254. },
  19255. "status": {
  19256. "type": "string",
  19257. "enum": ["alpha", "beta", "deprecated", "active"]
  19258. },
  19259. "provider": {
  19260. "type": "object",
  19261. "properties": {
  19262. "npm": {
  19263. "type": "string"
  19264. },
  19265. "api": {
  19266. "type": "string"
  19267. }
  19268. },
  19269. "additionalProperties": false
  19270. },
  19271. "options": {
  19272. "type": "object"
  19273. },
  19274. "headers": {
  19275. "type": "object",
  19276. "additionalProperties": {
  19277. "type": "string"
  19278. }
  19279. },
  19280. "variants": {
  19281. "type": "object",
  19282. "additionalProperties": {
  19283. "type": "object",
  19284. "properties": {
  19285. "disabled": {
  19286. "type": "boolean"
  19287. }
  19288. },
  19289. "additionalProperties": {}
  19290. },
  19291. "description": "Variant-specific configuration"
  19292. }
  19293. },
  19294. "additionalProperties": false
  19295. }
  19296. }
  19297. },
  19298. "additionalProperties": false
  19299. },
  19300. "McpLocalConfig": {
  19301. "type": "object",
  19302. "properties": {
  19303. "type": {
  19304. "type": "string",
  19305. "enum": ["local"],
  19306. "description": "Type of MCP server connection"
  19307. },
  19308. "command": {
  19309. "type": "array",
  19310. "items": {
  19311. "type": "string"
  19312. },
  19313. "description": "Command and arguments to run the MCP server"
  19314. },
  19315. "cwd": {
  19316. "type": "string"
  19317. },
  19318. "environment": {
  19319. "type": "object",
  19320. "additionalProperties": {
  19321. "type": "string"
  19322. }
  19323. },
  19324. "enabled": {
  19325. "type": "boolean"
  19326. },
  19327. "timeout": {
  19328. "type": "integer",
  19329. "exclusiveMinimum": 0
  19330. }
  19331. },
  19332. "required": ["type", "command"],
  19333. "additionalProperties": false
  19334. },
  19335. "McpOAuthConfig": {
  19336. "type": "object",
  19337. "properties": {
  19338. "clientId": {
  19339. "type": "string"
  19340. },
  19341. "clientSecret": {
  19342. "type": "string"
  19343. },
  19344. "scope": {
  19345. "type": "string"
  19346. },
  19347. "callbackPort": {
  19348. "type": "integer",
  19349. "minimum": 1,
  19350. "maximum": 65535
  19351. },
  19352. "redirectUri": {
  19353. "type": "string"
  19354. }
  19355. },
  19356. "additionalProperties": false
  19357. },
  19358. "McpRemoteConfig": {
  19359. "type": "object",
  19360. "properties": {
  19361. "type": {
  19362. "type": "string",
  19363. "enum": ["remote"],
  19364. "description": "Type of MCP server connection"
  19365. },
  19366. "url": {
  19367. "type": "string",
  19368. "description": "URL of the remote MCP server"
  19369. },
  19370. "enabled": {
  19371. "type": "boolean"
  19372. },
  19373. "headers": {
  19374. "type": "object",
  19375. "additionalProperties": {
  19376. "type": "string"
  19377. }
  19378. },
  19379. "oauth": {
  19380. "anyOf": [
  19381. {
  19382. "$ref": "#/components/schemas/McpOAuthConfig"
  19383. },
  19384. {
  19385. "type": "boolean",
  19386. "enum": [false]
  19387. }
  19388. ],
  19389. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  19390. },
  19391. "timeout": {
  19392. "type": "integer",
  19393. "exclusiveMinimum": 0
  19394. }
  19395. },
  19396. "required": ["type", "url"],
  19397. "additionalProperties": false
  19398. },
  19399. "LayoutConfig": {
  19400. "type": "string",
  19401. "enum": ["auto", "stretch"],
  19402. "description": "@deprecated Always uses stretch layout."
  19403. },
  19404. "ImageAttachmentConfig": {
  19405. "type": "object",
  19406. "properties": {
  19407. "auto_resize": {
  19408. "type": "boolean"
  19409. },
  19410. "max_width": {
  19411. "type": "integer",
  19412. "exclusiveMinimum": 0
  19413. },
  19414. "max_height": {
  19415. "type": "integer",
  19416. "exclusiveMinimum": 0
  19417. },
  19418. "max_base64_bytes": {
  19419. "type": "integer",
  19420. "exclusiveMinimum": 0
  19421. }
  19422. },
  19423. "additionalProperties": false
  19424. },
  19425. "AttachmentConfig": {
  19426. "type": "object",
  19427. "properties": {
  19428. "image": {
  19429. "$ref": "#/components/schemas/ImageAttachmentConfig"
  19430. }
  19431. },
  19432. "additionalProperties": false
  19433. },
  19434. "Config": {
  19435. "type": "object",
  19436. "properties": {
  19437. "$schema": {
  19438. "type": "string"
  19439. },
  19440. "shell": {
  19441. "type": "string"
  19442. },
  19443. "logLevel": {
  19444. "$ref": "#/components/schemas/LogLevel"
  19445. },
  19446. "server": {
  19447. "$ref": "#/components/schemas/ServerConfig"
  19448. },
  19449. "command": {
  19450. "type": "object",
  19451. "additionalProperties": {
  19452. "type": "object",
  19453. "properties": {
  19454. "template": {
  19455. "type": "string"
  19456. },
  19457. "description": {
  19458. "type": "string"
  19459. },
  19460. "agent": {
  19461. "type": "string"
  19462. },
  19463. "model": {
  19464. "type": "string"
  19465. },
  19466. "variant": {
  19467. "type": "string"
  19468. },
  19469. "subtask": {
  19470. "type": "boolean"
  19471. }
  19472. },
  19473. "required": ["template"],
  19474. "additionalProperties": false
  19475. }
  19476. },
  19477. "skills": {
  19478. "type": "object",
  19479. "properties": {
  19480. "paths": {
  19481. "type": "array",
  19482. "items": {
  19483. "type": "string"
  19484. }
  19485. },
  19486. "urls": {
  19487. "type": "array",
  19488. "items": {
  19489. "type": "string"
  19490. }
  19491. }
  19492. },
  19493. "additionalProperties": false
  19494. },
  19495. "references": {
  19496. "type": "object",
  19497. "additionalProperties": {
  19498. "anyOf": [
  19499. {
  19500. "type": "string"
  19501. },
  19502. {
  19503. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19504. },
  19505. {
  19506. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19507. }
  19508. ]
  19509. }
  19510. },
  19511. "reference": {
  19512. "type": "object",
  19513. "additionalProperties": {
  19514. "anyOf": [
  19515. {
  19516. "type": "string"
  19517. },
  19518. {
  19519. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  19520. },
  19521. {
  19522. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  19523. }
  19524. ]
  19525. }
  19526. },
  19527. "watcher": {
  19528. "type": "object",
  19529. "properties": {
  19530. "ignore": {
  19531. "type": "array",
  19532. "items": {
  19533. "type": "string"
  19534. }
  19535. }
  19536. },
  19537. "additionalProperties": false
  19538. },
  19539. "snapshot": {
  19540. "type": "boolean"
  19541. },
  19542. "plugin": {
  19543. "type": "array",
  19544. "items": {
  19545. "anyOf": [
  19546. {
  19547. "type": "string"
  19548. },
  19549. {
  19550. "type": "array",
  19551. "prefixItems": [
  19552. {
  19553. "type": "string"
  19554. },
  19555. {
  19556. "type": "object"
  19557. }
  19558. ],
  19559. "maxItems": 2,
  19560. "minItems": 2
  19561. }
  19562. ]
  19563. }
  19564. },
  19565. "share": {
  19566. "type": "string",
  19567. "enum": ["manual", "auto", "disabled"]
  19568. },
  19569. "autoshare": {
  19570. "type": "boolean"
  19571. },
  19572. "autoupdate": {
  19573. "anyOf": [
  19574. {
  19575. "type": "boolean"
  19576. },
  19577. {
  19578. "type": "string",
  19579. "enum": ["notify"]
  19580. }
  19581. ],
  19582. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  19583. },
  19584. "disabled_providers": {
  19585. "type": "array",
  19586. "items": {
  19587. "type": "string"
  19588. }
  19589. },
  19590. "enabled_providers": {
  19591. "type": "array",
  19592. "items": {
  19593. "type": "string"
  19594. }
  19595. },
  19596. "model": {
  19597. "type": "string"
  19598. },
  19599. "small_model": {
  19600. "type": "string"
  19601. },
  19602. "default_agent": {
  19603. "type": "string"
  19604. },
  19605. "username": {
  19606. "type": "string"
  19607. },
  19608. "mode": {
  19609. "type": "object",
  19610. "properties": {
  19611. "build": {
  19612. "$ref": "#/components/schemas/AgentConfig"
  19613. },
  19614. "plan": {
  19615. "$ref": "#/components/schemas/AgentConfig"
  19616. }
  19617. },
  19618. "additionalProperties": {
  19619. "$ref": "#/components/schemas/AgentConfig"
  19620. }
  19621. },
  19622. "agent": {
  19623. "type": "object",
  19624. "properties": {
  19625. "plan": {
  19626. "$ref": "#/components/schemas/AgentConfig"
  19627. },
  19628. "build": {
  19629. "$ref": "#/components/schemas/AgentConfig"
  19630. },
  19631. "general": {
  19632. "$ref": "#/components/schemas/AgentConfig"
  19633. },
  19634. "explore": {
  19635. "$ref": "#/components/schemas/AgentConfig"
  19636. },
  19637. "title": {
  19638. "$ref": "#/components/schemas/AgentConfig"
  19639. },
  19640. "summary": {
  19641. "$ref": "#/components/schemas/AgentConfig"
  19642. },
  19643. "compaction": {
  19644. "$ref": "#/components/schemas/AgentConfig"
  19645. }
  19646. },
  19647. "additionalProperties": {
  19648. "$ref": "#/components/schemas/AgentConfig"
  19649. }
  19650. },
  19651. "provider": {
  19652. "type": "object",
  19653. "additionalProperties": {
  19654. "$ref": "#/components/schemas/ProviderConfig"
  19655. }
  19656. },
  19657. "mcp": {
  19658. "type": "object",
  19659. "additionalProperties": {
  19660. "anyOf": [
  19661. {
  19662. "$ref": "#/components/schemas/McpLocalConfig"
  19663. },
  19664. {
  19665. "$ref": "#/components/schemas/McpRemoteConfig"
  19666. },
  19667. {
  19668. "type": "object",
  19669. "properties": {
  19670. "enabled": {
  19671. "type": "boolean"
  19672. }
  19673. },
  19674. "required": ["enabled"],
  19675. "additionalProperties": false
  19676. }
  19677. ]
  19678. }
  19679. },
  19680. "formatter": {
  19681. "anyOf": [
  19682. {
  19683. "type": "boolean"
  19684. },
  19685. {
  19686. "type": "object",
  19687. "additionalProperties": {
  19688. "type": "object",
  19689. "properties": {
  19690. "disabled": {
  19691. "type": "boolean"
  19692. },
  19693. "command": {
  19694. "type": "array",
  19695. "items": {
  19696. "type": "string"
  19697. }
  19698. },
  19699. "environment": {
  19700. "type": "object",
  19701. "additionalProperties": {
  19702. "type": "string"
  19703. }
  19704. },
  19705. "extensions": {
  19706. "type": "array",
  19707. "items": {
  19708. "type": "string"
  19709. }
  19710. }
  19711. },
  19712. "additionalProperties": false
  19713. }
  19714. }
  19715. ],
  19716. "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."
  19717. },
  19718. "lsp": {
  19719. "anyOf": [
  19720. {
  19721. "type": "boolean"
  19722. },
  19723. {
  19724. "type": "object",
  19725. "additionalProperties": {
  19726. "anyOf": [
  19727. {
  19728. "type": "object",
  19729. "properties": {
  19730. "disabled": {
  19731. "type": "boolean",
  19732. "enum": [true]
  19733. }
  19734. },
  19735. "required": ["disabled"],
  19736. "additionalProperties": false
  19737. },
  19738. {
  19739. "type": "object",
  19740. "properties": {
  19741. "command": {
  19742. "type": "array",
  19743. "items": {
  19744. "type": "string"
  19745. }
  19746. },
  19747. "extensions": {
  19748. "type": "array",
  19749. "items": {
  19750. "type": "string"
  19751. }
  19752. },
  19753. "disabled": {
  19754. "type": "boolean"
  19755. },
  19756. "env": {
  19757. "type": "object",
  19758. "additionalProperties": {
  19759. "type": "string"
  19760. }
  19761. },
  19762. "initialization": {
  19763. "type": "object"
  19764. }
  19765. },
  19766. "required": ["command"],
  19767. "additionalProperties": false
  19768. }
  19769. ]
  19770. }
  19771. }
  19772. ],
  19773. "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."
  19774. },
  19775. "instructions": {
  19776. "type": "array",
  19777. "items": {
  19778. "type": "string"
  19779. }
  19780. },
  19781. "layout": {
  19782. "$ref": "#/components/schemas/LayoutConfig"
  19783. },
  19784. "permission": {
  19785. "$ref": "#/components/schemas/PermissionConfig"
  19786. },
  19787. "tools": {
  19788. "type": "object",
  19789. "additionalProperties": {
  19790. "type": "boolean"
  19791. }
  19792. },
  19793. "attachment": {
  19794. "$ref": "#/components/schemas/AttachmentConfig"
  19795. },
  19796. "enterprise": {
  19797. "type": "object",
  19798. "properties": {
  19799. "url": {
  19800. "type": "string"
  19801. }
  19802. },
  19803. "additionalProperties": false
  19804. },
  19805. "tool_output": {
  19806. "type": "object",
  19807. "properties": {
  19808. "max_lines": {
  19809. "type": "integer",
  19810. "exclusiveMinimum": 0
  19811. },
  19812. "max_bytes": {
  19813. "type": "integer",
  19814. "exclusiveMinimum": 0
  19815. }
  19816. },
  19817. "additionalProperties": false
  19818. },
  19819. "compaction": {
  19820. "type": "object",
  19821. "properties": {
  19822. "auto": {
  19823. "type": "boolean"
  19824. },
  19825. "prune": {
  19826. "type": "boolean"
  19827. },
  19828. "tail_turns": {
  19829. "type": "integer",
  19830. "minimum": 0
  19831. },
  19832. "preserve_recent_tokens": {
  19833. "type": "integer",
  19834. "minimum": 0
  19835. },
  19836. "reserved": {
  19837. "type": "integer",
  19838. "minimum": 0
  19839. }
  19840. },
  19841. "additionalProperties": false
  19842. },
  19843. "experimental": {
  19844. "type": "object",
  19845. "properties": {
  19846. "disable_paste_summary": {
  19847. "type": "boolean"
  19848. },
  19849. "batch_tool": {
  19850. "type": "boolean"
  19851. },
  19852. "openTelemetry": {
  19853. "type": "boolean"
  19854. },
  19855. "primary_tools": {
  19856. "type": "array",
  19857. "items": {
  19858. "type": "string"
  19859. }
  19860. },
  19861. "continue_loop_on_deny": {
  19862. "type": "boolean"
  19863. },
  19864. "mcp_timeout": {
  19865. "type": "integer",
  19866. "exclusiveMinimum": 0
  19867. },
  19868. "policies": {
  19869. "type": "array",
  19870. "items": {
  19871. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  19872. }
  19873. }
  19874. },
  19875. "additionalProperties": false
  19876. }
  19877. },
  19878. "additionalProperties": false
  19879. },
  19880. "Model": {
  19881. "type": "object",
  19882. "properties": {
  19883. "id": {
  19884. "type": "string"
  19885. },
  19886. "providerID": {
  19887. "type": "string"
  19888. },
  19889. "api": {
  19890. "type": "object",
  19891. "properties": {
  19892. "id": {
  19893. "type": "string"
  19894. },
  19895. "url": {
  19896. "type": "string"
  19897. },
  19898. "npm": {
  19899. "type": "string"
  19900. }
  19901. },
  19902. "required": ["id", "url", "npm"],
  19903. "additionalProperties": false
  19904. },
  19905. "name": {
  19906. "type": "string"
  19907. },
  19908. "family": {
  19909. "type": "string"
  19910. },
  19911. "capabilities": {
  19912. "type": "object",
  19913. "properties": {
  19914. "temperature": {
  19915. "type": "boolean"
  19916. },
  19917. "reasoning": {
  19918. "type": "boolean"
  19919. },
  19920. "attachment": {
  19921. "type": "boolean"
  19922. },
  19923. "toolcall": {
  19924. "type": "boolean"
  19925. },
  19926. "input": {
  19927. "type": "object",
  19928. "properties": {
  19929. "text": {
  19930. "type": "boolean"
  19931. },
  19932. "audio": {
  19933. "type": "boolean"
  19934. },
  19935. "image": {
  19936. "type": "boolean"
  19937. },
  19938. "video": {
  19939. "type": "boolean"
  19940. },
  19941. "pdf": {
  19942. "type": "boolean"
  19943. }
  19944. },
  19945. "required": ["text", "audio", "image", "video", "pdf"],
  19946. "additionalProperties": false
  19947. },
  19948. "output": {
  19949. "type": "object",
  19950. "properties": {
  19951. "text": {
  19952. "type": "boolean"
  19953. },
  19954. "audio": {
  19955. "type": "boolean"
  19956. },
  19957. "image": {
  19958. "type": "boolean"
  19959. },
  19960. "video": {
  19961. "type": "boolean"
  19962. },
  19963. "pdf": {
  19964. "type": "boolean"
  19965. }
  19966. },
  19967. "required": ["text", "audio", "image", "video", "pdf"],
  19968. "additionalProperties": false
  19969. },
  19970. "interleaved": {
  19971. "anyOf": [
  19972. {
  19973. "type": "boolean"
  19974. },
  19975. {
  19976. "type": "object",
  19977. "properties": {
  19978. "field": {
  19979. "type": "string",
  19980. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19981. }
  19982. },
  19983. "required": ["field"],
  19984. "additionalProperties": false
  19985. }
  19986. ]
  19987. }
  19988. },
  19989. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  19990. "additionalProperties": false
  19991. },
  19992. "cost": {
  19993. "type": "object",
  19994. "properties": {
  19995. "input": {
  19996. "type": "number"
  19997. },
  19998. "output": {
  19999. "type": "number"
  20000. },
  20001. "cache": {
  20002. "type": "object",
  20003. "properties": {
  20004. "read": {
  20005. "type": "number"
  20006. },
  20007. "write": {
  20008. "type": "number"
  20009. }
  20010. },
  20011. "required": ["read", "write"],
  20012. "additionalProperties": false
  20013. },
  20014. "tiers": {
  20015. "type": "array",
  20016. "items": {
  20017. "type": "object",
  20018. "properties": {
  20019. "input": {
  20020. "type": "number"
  20021. },
  20022. "output": {
  20023. "type": "number"
  20024. },
  20025. "cache": {
  20026. "type": "object",
  20027. "properties": {
  20028. "read": {
  20029. "type": "number"
  20030. },
  20031. "write": {
  20032. "type": "number"
  20033. }
  20034. },
  20035. "required": ["read", "write"],
  20036. "additionalProperties": false
  20037. },
  20038. "tier": {
  20039. "type": "object",
  20040. "properties": {
  20041. "type": {
  20042. "type": "string",
  20043. "enum": ["context"]
  20044. },
  20045. "size": {
  20046. "type": "number"
  20047. }
  20048. },
  20049. "required": ["type", "size"],
  20050. "additionalProperties": false
  20051. }
  20052. },
  20053. "required": ["input", "output", "cache", "tier"],
  20054. "additionalProperties": false
  20055. }
  20056. },
  20057. "experimentalOver200K": {
  20058. "type": "object",
  20059. "properties": {
  20060. "input": {
  20061. "type": "number"
  20062. },
  20063. "output": {
  20064. "type": "number"
  20065. },
  20066. "cache": {
  20067. "type": "object",
  20068. "properties": {
  20069. "read": {
  20070. "type": "number"
  20071. },
  20072. "write": {
  20073. "type": "number"
  20074. }
  20075. },
  20076. "required": ["read", "write"],
  20077. "additionalProperties": false
  20078. }
  20079. },
  20080. "required": ["input", "output", "cache"],
  20081. "additionalProperties": false
  20082. }
  20083. },
  20084. "required": ["input", "output", "cache"],
  20085. "additionalProperties": false
  20086. },
  20087. "limit": {
  20088. "type": "object",
  20089. "properties": {
  20090. "context": {
  20091. "type": "number"
  20092. },
  20093. "input": {
  20094. "type": "number"
  20095. },
  20096. "output": {
  20097. "type": "number"
  20098. }
  20099. },
  20100. "required": ["context", "output"],
  20101. "additionalProperties": false
  20102. },
  20103. "status": {
  20104. "type": "string",
  20105. "enum": ["alpha", "beta", "deprecated", "active"]
  20106. },
  20107. "options": {
  20108. "type": "object"
  20109. },
  20110. "headers": {
  20111. "type": "object",
  20112. "additionalProperties": {
  20113. "type": "string"
  20114. }
  20115. },
  20116. "release_date": {
  20117. "type": "string"
  20118. },
  20119. "variants": {
  20120. "type": "object",
  20121. "additionalProperties": {
  20122. "type": "object"
  20123. }
  20124. }
  20125. },
  20126. "required": [
  20127. "id",
  20128. "providerID",
  20129. "api",
  20130. "name",
  20131. "capabilities",
  20132. "cost",
  20133. "limit",
  20134. "status",
  20135. "options",
  20136. "headers",
  20137. "release_date"
  20138. ],
  20139. "additionalProperties": false
  20140. },
  20141. "Provider": {
  20142. "type": "object",
  20143. "properties": {
  20144. "id": {
  20145. "type": "string"
  20146. },
  20147. "name": {
  20148. "type": "string"
  20149. },
  20150. "source": {
  20151. "type": "string",
  20152. "enum": ["env", "config", "custom", "api"]
  20153. },
  20154. "env": {
  20155. "type": "array",
  20156. "items": {
  20157. "type": "string"
  20158. }
  20159. },
  20160. "key": {
  20161. "type": "string"
  20162. },
  20163. "options": {
  20164. "type": "object"
  20165. },
  20166. "models": {
  20167. "type": "object",
  20168. "additionalProperties": {
  20169. "$ref": "#/components/schemas/Model"
  20170. }
  20171. }
  20172. },
  20173. "required": ["id", "name", "source", "env", "options", "models"],
  20174. "additionalProperties": false
  20175. },
  20176. "ConsoleState": {
  20177. "type": "object",
  20178. "properties": {
  20179. "consoleManagedProviders": {
  20180. "type": "array",
  20181. "items": {
  20182. "type": "string"
  20183. }
  20184. },
  20185. "activeOrgName": {
  20186. "type": "string"
  20187. },
  20188. "switchableOrgCount": {
  20189. "type": "integer",
  20190. "minimum": 0
  20191. }
  20192. },
  20193. "required": ["consoleManagedProviders", "switchableOrgCount"],
  20194. "additionalProperties": false
  20195. },
  20196. "effect_HttpApiError_InternalServerError": {
  20197. "type": "object",
  20198. "properties": {
  20199. "_tag": {
  20200. "type": "string",
  20201. "enum": ["InternalServerError"]
  20202. }
  20203. },
  20204. "required": ["_tag"],
  20205. "additionalProperties": false
  20206. },
  20207. "ToolListItem": {
  20208. "type": "object",
  20209. "properties": {
  20210. "id": {
  20211. "type": "string"
  20212. },
  20213. "description": {
  20214. "type": "string"
  20215. },
  20216. "parameters": {}
  20217. },
  20218. "required": ["id", "description", "parameters"],
  20219. "additionalProperties": false
  20220. },
  20221. "ToolList": {
  20222. "type": "array",
  20223. "items": {
  20224. "$ref": "#/components/schemas/ToolListItem"
  20225. }
  20226. },
  20227. "ToolIDs": {
  20228. "type": "array",
  20229. "items": {
  20230. "type": "string"
  20231. }
  20232. },
  20233. "WorktreeError": {
  20234. "type": "object",
  20235. "properties": {
  20236. "name": {
  20237. "type": "string",
  20238. "enum": [
  20239. "WorktreeNotGitError",
  20240. "WorktreeNameGenerationFailedError",
  20241. "WorktreeCreateFailedError",
  20242. "WorktreeStartCommandFailedError",
  20243. "WorktreeRemoveFailedError",
  20244. "WorktreeResetFailedError",
  20245. "WorktreeListFailedError"
  20246. ]
  20247. },
  20248. "data": {
  20249. "type": "object",
  20250. "properties": {
  20251. "message": {
  20252. "type": "string"
  20253. }
  20254. },
  20255. "required": ["message"],
  20256. "additionalProperties": false
  20257. }
  20258. },
  20259. "required": ["name", "data"],
  20260. "additionalProperties": false
  20261. },
  20262. "WorktreeCreateInput": {
  20263. "type": "object",
  20264. "properties": {
  20265. "name": {
  20266. "type": "string"
  20267. },
  20268. "startCommand": {
  20269. "type": "string",
  20270. "description": "Additional startup script to run after the project's start command"
  20271. }
  20272. },
  20273. "additionalProperties": false
  20274. },
  20275. "Worktree": {
  20276. "type": "object",
  20277. "properties": {
  20278. "name": {
  20279. "type": "string"
  20280. },
  20281. "branch": {
  20282. "type": "string"
  20283. },
  20284. "directory": {
  20285. "type": "string"
  20286. }
  20287. },
  20288. "required": ["name", "directory"],
  20289. "additionalProperties": false
  20290. },
  20291. "WorktreeRemoveInput": {
  20292. "type": "object",
  20293. "properties": {
  20294. "directory": {
  20295. "type": "string"
  20296. }
  20297. },
  20298. "required": ["directory"],
  20299. "additionalProperties": false
  20300. },
  20301. "WorktreeResetInput": {
  20302. "type": "object",
  20303. "properties": {
  20304. "directory": {
  20305. "type": "string"
  20306. }
  20307. },
  20308. "required": ["directory"],
  20309. "additionalProperties": false
  20310. },
  20311. "ProjectSummary": {
  20312. "type": "object",
  20313. "properties": {
  20314. "id": {
  20315. "type": "string"
  20316. },
  20317. "name": {
  20318. "type": "string"
  20319. },
  20320. "worktree": {
  20321. "type": "string"
  20322. }
  20323. },
  20324. "required": ["id", "worktree"],
  20325. "additionalProperties": false
  20326. },
  20327. "GlobalSession": {
  20328. "type": "object",
  20329. "properties": {
  20330. "id": {
  20331. "type": "string",
  20332. "pattern": "^ses"
  20333. },
  20334. "slug": {
  20335. "type": "string"
  20336. },
  20337. "projectID": {
  20338. "type": "string"
  20339. },
  20340. "workspaceID": {
  20341. "type": "string",
  20342. "pattern": "^wrk"
  20343. },
  20344. "directory": {
  20345. "type": "string"
  20346. },
  20347. "path": {
  20348. "type": "string"
  20349. },
  20350. "parentID": {
  20351. "type": "string",
  20352. "pattern": "^ses"
  20353. },
  20354. "summary": {
  20355. "type": "object",
  20356. "properties": {
  20357. "additions": {
  20358. "type": "number"
  20359. },
  20360. "deletions": {
  20361. "type": "number"
  20362. },
  20363. "files": {
  20364. "type": "number"
  20365. },
  20366. "diffs": {
  20367. "type": "array",
  20368. "items": {
  20369. "$ref": "#/components/schemas/SnapshotFileDiff"
  20370. }
  20371. }
  20372. },
  20373. "required": ["additions", "deletions", "files"],
  20374. "additionalProperties": false
  20375. },
  20376. "cost": {
  20377. "type": "number"
  20378. },
  20379. "tokens": {
  20380. "type": "object",
  20381. "properties": {
  20382. "input": {
  20383. "type": "number"
  20384. },
  20385. "output": {
  20386. "type": "number"
  20387. },
  20388. "reasoning": {
  20389. "type": "number"
  20390. },
  20391. "cache": {
  20392. "type": "object",
  20393. "properties": {
  20394. "read": {
  20395. "type": "number"
  20396. },
  20397. "write": {
  20398. "type": "number"
  20399. }
  20400. },
  20401. "required": ["read", "write"],
  20402. "additionalProperties": false
  20403. }
  20404. },
  20405. "required": ["input", "output", "reasoning", "cache"],
  20406. "additionalProperties": false
  20407. },
  20408. "share": {
  20409. "type": "object",
  20410. "properties": {
  20411. "url": {
  20412. "type": "string"
  20413. }
  20414. },
  20415. "required": ["url"],
  20416. "additionalProperties": false
  20417. },
  20418. "title": {
  20419. "type": "string"
  20420. },
  20421. "agent": {
  20422. "type": "string"
  20423. },
  20424. "model": {
  20425. "type": "object",
  20426. "properties": {
  20427. "id": {
  20428. "type": "string"
  20429. },
  20430. "providerID": {
  20431. "type": "string"
  20432. },
  20433. "variant": {
  20434. "type": "string"
  20435. }
  20436. },
  20437. "required": ["id", "providerID"],
  20438. "additionalProperties": false
  20439. },
  20440. "version": {
  20441. "type": "string"
  20442. },
  20443. "metadata": {
  20444. "type": "object"
  20445. },
  20446. "time": {
  20447. "type": "object",
  20448. "properties": {
  20449. "created": {
  20450. "type": "integer",
  20451. "minimum": 0
  20452. },
  20453. "updated": {
  20454. "type": "integer",
  20455. "minimum": 0
  20456. },
  20457. "compacting": {
  20458. "type": "integer",
  20459. "minimum": 0
  20460. },
  20461. "archived": {
  20462. "type": "number"
  20463. }
  20464. },
  20465. "required": ["created", "updated"],
  20466. "additionalProperties": false
  20467. },
  20468. "permission": {
  20469. "$ref": "#/components/schemas/PermissionRuleset"
  20470. },
  20471. "revert": {
  20472. "type": "object",
  20473. "properties": {
  20474. "messageID": {
  20475. "type": "string",
  20476. "pattern": "^msg"
  20477. },
  20478. "partID": {
  20479. "type": "string",
  20480. "pattern": "^prt"
  20481. },
  20482. "snapshot": {
  20483. "type": "string"
  20484. },
  20485. "diff": {
  20486. "type": "string"
  20487. }
  20488. },
  20489. "required": ["messageID"],
  20490. "additionalProperties": false
  20491. },
  20492. "project": {
  20493. "anyOf": [
  20494. {
  20495. "$ref": "#/components/schemas/ProjectSummary"
  20496. },
  20497. {
  20498. "type": "null"
  20499. }
  20500. ]
  20501. }
  20502. },
  20503. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  20504. "additionalProperties": false
  20505. },
  20506. "McpResource": {
  20507. "type": "object",
  20508. "properties": {
  20509. "name": {
  20510. "type": "string"
  20511. },
  20512. "uri": {
  20513. "type": "string"
  20514. },
  20515. "description": {
  20516. "type": "string"
  20517. },
  20518. "mimeType": {
  20519. "type": "string"
  20520. },
  20521. "client": {
  20522. "type": "string"
  20523. }
  20524. },
  20525. "required": ["name", "uri", "client"],
  20526. "additionalProperties": false
  20527. },
  20528. "Symbol": {
  20529. "type": "object",
  20530. "properties": {
  20531. "name": {
  20532. "type": "string"
  20533. },
  20534. "kind": {
  20535. "type": "integer",
  20536. "minimum": 0
  20537. },
  20538. "location": {
  20539. "type": "object",
  20540. "properties": {
  20541. "uri": {
  20542. "type": "string"
  20543. },
  20544. "range": {
  20545. "$ref": "#/components/schemas/Range"
  20546. }
  20547. },
  20548. "required": ["uri", "range"],
  20549. "additionalProperties": false
  20550. }
  20551. },
  20552. "required": ["name", "kind", "location"],
  20553. "additionalProperties": false
  20554. },
  20555. "FileNode": {
  20556. "type": "object",
  20557. "properties": {
  20558. "name": {
  20559. "type": "string"
  20560. },
  20561. "path": {
  20562. "type": "string"
  20563. },
  20564. "absolute": {
  20565. "type": "string"
  20566. },
  20567. "type": {
  20568. "type": "string",
  20569. "enum": ["file", "directory"]
  20570. },
  20571. "ignored": {
  20572. "type": "boolean"
  20573. }
  20574. },
  20575. "required": ["name", "path", "absolute", "type", "ignored"],
  20576. "additionalProperties": false
  20577. },
  20578. "FileContent": {
  20579. "type": "object",
  20580. "properties": {
  20581. "type": {
  20582. "type": "string",
  20583. "enum": ["text", "binary"]
  20584. },
  20585. "content": {
  20586. "type": "string"
  20587. },
  20588. "diff": {
  20589. "type": "string"
  20590. },
  20591. "patch": {
  20592. "type": "object",
  20593. "properties": {
  20594. "oldFileName": {
  20595. "type": "string"
  20596. },
  20597. "newFileName": {
  20598. "type": "string"
  20599. },
  20600. "oldHeader": {
  20601. "type": "string"
  20602. },
  20603. "newHeader": {
  20604. "type": "string"
  20605. },
  20606. "hunks": {
  20607. "type": "array",
  20608. "items": {
  20609. "type": "object",
  20610. "properties": {
  20611. "oldStart": {
  20612. "type": "integer",
  20613. "minimum": 0
  20614. },
  20615. "oldLines": {
  20616. "type": "integer",
  20617. "minimum": 0
  20618. },
  20619. "newStart": {
  20620. "type": "integer",
  20621. "minimum": 0
  20622. },
  20623. "newLines": {
  20624. "type": "integer",
  20625. "minimum": 0
  20626. },
  20627. "lines": {
  20628. "type": "array",
  20629. "items": {
  20630. "type": "string"
  20631. }
  20632. }
  20633. },
  20634. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  20635. "additionalProperties": false
  20636. }
  20637. },
  20638. "index": {
  20639. "type": "string"
  20640. }
  20641. },
  20642. "required": ["oldFileName", "newFileName", "hunks"],
  20643. "additionalProperties": false
  20644. },
  20645. "encoding": {
  20646. "type": "string",
  20647. "enum": ["base64"]
  20648. },
  20649. "mimeType": {
  20650. "type": "string"
  20651. }
  20652. },
  20653. "required": ["type", "content"],
  20654. "additionalProperties": false
  20655. },
  20656. "File": {
  20657. "type": "object",
  20658. "properties": {
  20659. "path": {
  20660. "type": "string"
  20661. },
  20662. "added": {
  20663. "type": "integer",
  20664. "minimum": 0
  20665. },
  20666. "removed": {
  20667. "type": "integer",
  20668. "minimum": 0
  20669. },
  20670. "status": {
  20671. "type": "string",
  20672. "enum": ["added", "deleted", "modified"]
  20673. }
  20674. },
  20675. "required": ["path", "added", "removed", "status"],
  20676. "additionalProperties": false
  20677. },
  20678. "Path": {
  20679. "type": "object",
  20680. "properties": {
  20681. "home": {
  20682. "type": "string"
  20683. },
  20684. "state": {
  20685. "type": "string"
  20686. },
  20687. "config": {
  20688. "type": "string"
  20689. },
  20690. "worktree": {
  20691. "type": "string"
  20692. },
  20693. "directory": {
  20694. "type": "string"
  20695. }
  20696. },
  20697. "required": ["home", "state", "config", "worktree", "directory"],
  20698. "additionalProperties": false
  20699. },
  20700. "VcsInfo": {
  20701. "type": "object",
  20702. "properties": {
  20703. "branch": {
  20704. "type": "string"
  20705. },
  20706. "default_branch": {
  20707. "type": "string"
  20708. }
  20709. },
  20710. "additionalProperties": false
  20711. },
  20712. "VcsFileStatus": {
  20713. "type": "object",
  20714. "properties": {
  20715. "file": {
  20716. "type": "string"
  20717. },
  20718. "additions": {
  20719. "type": "number"
  20720. },
  20721. "deletions": {
  20722. "type": "number"
  20723. },
  20724. "status": {
  20725. "type": "string",
  20726. "enum": ["added", "deleted", "modified"]
  20727. }
  20728. },
  20729. "required": ["file", "additions", "deletions", "status"],
  20730. "additionalProperties": false
  20731. },
  20732. "VcsFileDiff": {
  20733. "type": "object",
  20734. "properties": {
  20735. "file": {
  20736. "type": "string"
  20737. },
  20738. "patch": {
  20739. "type": "string"
  20740. },
  20741. "additions": {
  20742. "type": "number"
  20743. },
  20744. "deletions": {
  20745. "type": "number"
  20746. },
  20747. "status": {
  20748. "type": "string",
  20749. "enum": ["added", "deleted", "modified"]
  20750. }
  20751. },
  20752. "required": ["file", "additions", "deletions"],
  20753. "additionalProperties": false
  20754. },
  20755. "VcsApplyError": {
  20756. "type": "object",
  20757. "properties": {
  20758. "name": {
  20759. "type": "string",
  20760. "enum": ["VcsApplyError"]
  20761. },
  20762. "data": {
  20763. "type": "object",
  20764. "properties": {
  20765. "message": {
  20766. "type": "string"
  20767. },
  20768. "reason": {
  20769. "type": "string",
  20770. "enum": ["non-git", "not-clean"]
  20771. }
  20772. },
  20773. "required": ["message", "reason"],
  20774. "additionalProperties": false
  20775. }
  20776. },
  20777. "required": ["name", "data"],
  20778. "additionalProperties": false
  20779. },
  20780. "Command": {
  20781. "type": "object",
  20782. "properties": {
  20783. "name": {
  20784. "type": "string"
  20785. },
  20786. "description": {
  20787. "type": "string"
  20788. },
  20789. "agent": {
  20790. "type": "string"
  20791. },
  20792. "model": {
  20793. "type": "string"
  20794. },
  20795. "source": {
  20796. "type": "string",
  20797. "enum": ["command", "mcp", "skill"]
  20798. },
  20799. "template": {
  20800. "type": "string"
  20801. },
  20802. "subtask": {
  20803. "type": "boolean"
  20804. },
  20805. "hints": {
  20806. "type": "array",
  20807. "items": {
  20808. "type": "string"
  20809. }
  20810. }
  20811. },
  20812. "required": ["name", "template", "hints"],
  20813. "additionalProperties": false
  20814. },
  20815. "Agent": {
  20816. "type": "object",
  20817. "properties": {
  20818. "name": {
  20819. "type": "string"
  20820. },
  20821. "description": {
  20822. "type": "string"
  20823. },
  20824. "mode": {
  20825. "type": "string",
  20826. "enum": ["subagent", "primary", "all"]
  20827. },
  20828. "native": {
  20829. "type": "boolean"
  20830. },
  20831. "hidden": {
  20832. "type": "boolean"
  20833. },
  20834. "topP": {
  20835. "type": "number"
  20836. },
  20837. "temperature": {
  20838. "type": "number"
  20839. },
  20840. "color": {
  20841. "type": "string"
  20842. },
  20843. "permission": {
  20844. "$ref": "#/components/schemas/PermissionRuleset"
  20845. },
  20846. "model": {
  20847. "type": "object",
  20848. "properties": {
  20849. "modelID": {
  20850. "type": "string"
  20851. },
  20852. "providerID": {
  20853. "type": "string"
  20854. }
  20855. },
  20856. "required": ["modelID", "providerID"],
  20857. "additionalProperties": false
  20858. },
  20859. "variant": {
  20860. "type": "string"
  20861. },
  20862. "prompt": {
  20863. "type": "string"
  20864. },
  20865. "options": {
  20866. "type": "object"
  20867. },
  20868. "steps": {
  20869. "type": "number"
  20870. }
  20871. },
  20872. "required": ["name", "mode", "permission", "options"],
  20873. "additionalProperties": false
  20874. },
  20875. "LSPStatus": {
  20876. "type": "object",
  20877. "properties": {
  20878. "id": {
  20879. "type": "string"
  20880. },
  20881. "name": {
  20882. "type": "string"
  20883. },
  20884. "root": {
  20885. "type": "string"
  20886. },
  20887. "status": {
  20888. "type": "string",
  20889. "enum": ["connected", "error"]
  20890. }
  20891. },
  20892. "required": ["id", "name", "root", "status"],
  20893. "additionalProperties": false
  20894. },
  20895. "FormatterStatus": {
  20896. "type": "object",
  20897. "properties": {
  20898. "name": {
  20899. "type": "string"
  20900. },
  20901. "extensions": {
  20902. "type": "array",
  20903. "items": {
  20904. "type": "string"
  20905. }
  20906. },
  20907. "enabled": {
  20908. "type": "boolean"
  20909. }
  20910. },
  20911. "required": ["name", "extensions", "enabled"],
  20912. "additionalProperties": false
  20913. },
  20914. "MCPStatusConnected": {
  20915. "type": "object",
  20916. "properties": {
  20917. "status": {
  20918. "type": "string",
  20919. "enum": ["connected"]
  20920. }
  20921. },
  20922. "required": ["status"],
  20923. "additionalProperties": false
  20924. },
  20925. "MCPStatusDisabled": {
  20926. "type": "object",
  20927. "properties": {
  20928. "status": {
  20929. "type": "string",
  20930. "enum": ["disabled"]
  20931. }
  20932. },
  20933. "required": ["status"],
  20934. "additionalProperties": false
  20935. },
  20936. "MCPStatusFailed": {
  20937. "type": "object",
  20938. "properties": {
  20939. "status": {
  20940. "type": "string",
  20941. "enum": ["failed"]
  20942. },
  20943. "error": {
  20944. "type": "string"
  20945. }
  20946. },
  20947. "required": ["status", "error"],
  20948. "additionalProperties": false
  20949. },
  20950. "MCPStatusNeedsAuth": {
  20951. "type": "object",
  20952. "properties": {
  20953. "status": {
  20954. "type": "string",
  20955. "enum": ["needs_auth"]
  20956. }
  20957. },
  20958. "required": ["status"],
  20959. "additionalProperties": false
  20960. },
  20961. "MCPStatusNeedsClientRegistration": {
  20962. "type": "object",
  20963. "properties": {
  20964. "status": {
  20965. "type": "string",
  20966. "enum": ["needs_client_registration"]
  20967. },
  20968. "error": {
  20969. "type": "string"
  20970. }
  20971. },
  20972. "required": ["status", "error"],
  20973. "additionalProperties": false
  20974. },
  20975. "MCPStatus": {
  20976. "anyOf": [
  20977. {
  20978. "$ref": "#/components/schemas/MCPStatusConnected"
  20979. },
  20980. {
  20981. "$ref": "#/components/schemas/MCPStatusDisabled"
  20982. },
  20983. {
  20984. "$ref": "#/components/schemas/MCPStatusFailed"
  20985. },
  20986. {
  20987. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  20988. },
  20989. {
  20990. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  20991. }
  20992. ]
  20993. },
  20994. "McpUnsupportedOAuthError": {
  20995. "type": "object",
  20996. "properties": {
  20997. "error": {
  20998. "type": "string"
  20999. }
  21000. },
  21001. "required": ["error"],
  21002. "additionalProperties": false
  21003. },
  21004. "McpServerNotFoundError": {
  21005. "type": "object",
  21006. "properties": {
  21007. "_tag": {
  21008. "type": "string",
  21009. "enum": ["McpServerNotFoundError"]
  21010. },
  21011. "name": {
  21012. "type": "string"
  21013. },
  21014. "message": {
  21015. "type": "string"
  21016. }
  21017. },
  21018. "required": ["_tag", "name", "message"],
  21019. "additionalProperties": false
  21020. },
  21021. "Project": {
  21022. "type": "object",
  21023. "properties": {
  21024. "id": {
  21025. "type": "string"
  21026. },
  21027. "worktree": {
  21028. "type": "string"
  21029. },
  21030. "vcs": {
  21031. "type": "string",
  21032. "enum": ["git"]
  21033. },
  21034. "name": {
  21035. "type": "string"
  21036. },
  21037. "icon": {
  21038. "type": "object",
  21039. "properties": {
  21040. "url": {
  21041. "type": "string"
  21042. },
  21043. "override": {
  21044. "type": "string"
  21045. },
  21046. "color": {
  21047. "type": "string"
  21048. }
  21049. },
  21050. "additionalProperties": false
  21051. },
  21052. "commands": {
  21053. "type": "object",
  21054. "properties": {
  21055. "start": {
  21056. "type": "string",
  21057. "description": "Startup script to run when creating a new workspace (worktree)"
  21058. }
  21059. },
  21060. "additionalProperties": false
  21061. },
  21062. "time": {
  21063. "type": "object",
  21064. "properties": {
  21065. "created": {
  21066. "type": "integer",
  21067. "minimum": 0
  21068. },
  21069. "updated": {
  21070. "type": "integer",
  21071. "minimum": 0
  21072. },
  21073. "initialized": {
  21074. "type": "integer",
  21075. "minimum": 0
  21076. }
  21077. },
  21078. "required": ["created", "updated"],
  21079. "additionalProperties": false
  21080. },
  21081. "sandboxes": {
  21082. "type": "array",
  21083. "items": {
  21084. "type": "string"
  21085. }
  21086. }
  21087. },
  21088. "required": ["id", "worktree", "time", "sandboxes"],
  21089. "additionalProperties": false
  21090. },
  21091. "ProjectNotFoundError": {
  21092. "type": "object",
  21093. "properties": {
  21094. "_tag": {
  21095. "type": "string",
  21096. "enum": ["ProjectNotFoundError"]
  21097. },
  21098. "projectID": {
  21099. "type": "string"
  21100. },
  21101. "message": {
  21102. "type": "string"
  21103. }
  21104. },
  21105. "required": ["_tag", "projectID", "message"],
  21106. "additionalProperties": false
  21107. },
  21108. "ProjectCopyError": {
  21109. "type": "object",
  21110. "properties": {
  21111. "name": {
  21112. "type": "string",
  21113. "enum": ["ProjectCopyError"]
  21114. },
  21115. "data": {
  21116. "type": "object",
  21117. "properties": {
  21118. "message": {
  21119. "type": "string"
  21120. },
  21121. "forceRequired": {
  21122. "type": "boolean"
  21123. }
  21124. },
  21125. "required": ["message"],
  21126. "additionalProperties": false
  21127. }
  21128. },
  21129. "required": ["name", "data"],
  21130. "additionalProperties": false
  21131. },
  21132. "PtyNotFoundError": {
  21133. "type": "object",
  21134. "properties": {
  21135. "_tag": {
  21136. "type": "string",
  21137. "enum": ["PtyNotFoundError"]
  21138. },
  21139. "ptyID": {
  21140. "type": "string"
  21141. },
  21142. "message": {
  21143. "type": "string"
  21144. }
  21145. },
  21146. "required": ["_tag", "ptyID", "message"],
  21147. "additionalProperties": false
  21148. },
  21149. "PtyForbiddenError": {
  21150. "type": "object",
  21151. "properties": {
  21152. "_tag": {
  21153. "type": "string",
  21154. "enum": ["PtyForbiddenError"]
  21155. },
  21156. "message": {
  21157. "type": "string"
  21158. }
  21159. },
  21160. "required": ["_tag", "message"],
  21161. "additionalProperties": false
  21162. },
  21163. "QuestionRequest": {
  21164. "type": "object",
  21165. "properties": {
  21166. "id": {
  21167. "type": "string",
  21168. "pattern": "^que"
  21169. },
  21170. "sessionID": {
  21171. "type": "string",
  21172. "pattern": "^ses"
  21173. },
  21174. "questions": {
  21175. "type": "array",
  21176. "items": {
  21177. "$ref": "#/components/schemas/QuestionInfo"
  21178. },
  21179. "description": "Questions to ask"
  21180. },
  21181. "tool": {
  21182. "$ref": "#/components/schemas/QuestionTool"
  21183. }
  21184. },
  21185. "required": ["id", "sessionID", "questions"],
  21186. "additionalProperties": false
  21187. },
  21188. "QuestionNotFoundError": {
  21189. "type": "object",
  21190. "properties": {
  21191. "_tag": {
  21192. "type": "string",
  21193. "enum": ["QuestionNotFoundError"]
  21194. },
  21195. "requestID": {
  21196. "type": "string"
  21197. },
  21198. "message": {
  21199. "type": "string"
  21200. }
  21201. },
  21202. "required": ["_tag", "requestID", "message"],
  21203. "additionalProperties": false
  21204. },
  21205. "PermissionRequest": {
  21206. "type": "object",
  21207. "properties": {
  21208. "id": {
  21209. "type": "string",
  21210. "pattern": "^per"
  21211. },
  21212. "sessionID": {
  21213. "type": "string",
  21214. "pattern": "^ses"
  21215. },
  21216. "permission": {
  21217. "type": "string"
  21218. },
  21219. "patterns": {
  21220. "type": "array",
  21221. "items": {
  21222. "type": "string"
  21223. }
  21224. },
  21225. "metadata": {
  21226. "type": "object"
  21227. },
  21228. "always": {
  21229. "type": "array",
  21230. "items": {
  21231. "type": "string"
  21232. }
  21233. },
  21234. "tool": {
  21235. "type": "object",
  21236. "properties": {
  21237. "messageID": {
  21238. "type": "string"
  21239. },
  21240. "callID": {
  21241. "type": "string"
  21242. }
  21243. },
  21244. "required": ["messageID", "callID"],
  21245. "additionalProperties": false
  21246. }
  21247. },
  21248. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  21249. "additionalProperties": false
  21250. },
  21251. "PermissionNotFoundError": {
  21252. "type": "object",
  21253. "properties": {
  21254. "_tag": {
  21255. "type": "string",
  21256. "enum": ["PermissionNotFoundError"]
  21257. },
  21258. "requestID": {
  21259. "type": "string"
  21260. },
  21261. "message": {
  21262. "type": "string"
  21263. }
  21264. },
  21265. "required": ["_tag", "requestID", "message"],
  21266. "additionalProperties": false
  21267. },
  21268. "ProviderAuthMethod": {
  21269. "type": "object",
  21270. "properties": {
  21271. "type": {
  21272. "type": "string",
  21273. "enum": ["oauth", "api"]
  21274. },
  21275. "label": {
  21276. "type": "string"
  21277. },
  21278. "prompts": {
  21279. "type": "array",
  21280. "items": {
  21281. "anyOf": [
  21282. {
  21283. "type": "object",
  21284. "properties": {
  21285. "type": {
  21286. "type": "string",
  21287. "enum": ["text"]
  21288. },
  21289. "key": {
  21290. "type": "string"
  21291. },
  21292. "message": {
  21293. "type": "string"
  21294. },
  21295. "placeholder": {
  21296. "type": "string"
  21297. },
  21298. "when": {
  21299. "type": "object",
  21300. "properties": {
  21301. "key": {
  21302. "type": "string"
  21303. },
  21304. "op": {
  21305. "type": "string",
  21306. "enum": ["eq", "neq"]
  21307. },
  21308. "value": {
  21309. "type": "string"
  21310. }
  21311. },
  21312. "required": ["key", "op", "value"],
  21313. "additionalProperties": false
  21314. }
  21315. },
  21316. "required": ["type", "key", "message"],
  21317. "additionalProperties": false
  21318. },
  21319. {
  21320. "type": "object",
  21321. "properties": {
  21322. "type": {
  21323. "type": "string",
  21324. "enum": ["select"]
  21325. },
  21326. "key": {
  21327. "type": "string"
  21328. },
  21329. "message": {
  21330. "type": "string"
  21331. },
  21332. "options": {
  21333. "type": "array",
  21334. "items": {
  21335. "type": "object",
  21336. "properties": {
  21337. "label": {
  21338. "type": "string"
  21339. },
  21340. "value": {
  21341. "type": "string"
  21342. },
  21343. "hint": {
  21344. "type": "string"
  21345. }
  21346. },
  21347. "required": ["label", "value"],
  21348. "additionalProperties": false
  21349. }
  21350. },
  21351. "when": {
  21352. "type": "object",
  21353. "properties": {
  21354. "key": {
  21355. "type": "string"
  21356. },
  21357. "op": {
  21358. "type": "string",
  21359. "enum": ["eq", "neq"]
  21360. },
  21361. "value": {
  21362. "type": "string"
  21363. }
  21364. },
  21365. "required": ["key", "op", "value"],
  21366. "additionalProperties": false
  21367. }
  21368. },
  21369. "required": ["type", "key", "message", "options"],
  21370. "additionalProperties": false
  21371. }
  21372. ]
  21373. }
  21374. }
  21375. },
  21376. "required": ["type", "label"],
  21377. "additionalProperties": false
  21378. },
  21379. "ProviderAuthAuthorization": {
  21380. "type": "object",
  21381. "properties": {
  21382. "url": {
  21383. "type": "string"
  21384. },
  21385. "method": {
  21386. "type": "string",
  21387. "enum": ["auto", "code"]
  21388. },
  21389. "instructions": {
  21390. "type": "string"
  21391. }
  21392. },
  21393. "required": ["url", "method", "instructions"],
  21394. "additionalProperties": false
  21395. },
  21396. "ProviderAuthError1": {
  21397. "type": "object",
  21398. "properties": {
  21399. "name": {
  21400. "type": "string",
  21401. "enum": [
  21402. "BadRequest",
  21403. "ProviderAuthOauthMissing",
  21404. "ProviderAuthOauthCodeMissing",
  21405. "ProviderAuthOauthCallbackFailed",
  21406. "ProviderAuthValidationFailed"
  21407. ]
  21408. },
  21409. "data": {
  21410. "type": "object",
  21411. "properties": {
  21412. "providerID": {
  21413. "type": "string"
  21414. },
  21415. "field": {
  21416. "type": "string"
  21417. },
  21418. "message": {
  21419. "type": "string"
  21420. },
  21421. "kind": {
  21422. "type": "string"
  21423. }
  21424. },
  21425. "additionalProperties": false
  21426. }
  21427. },
  21428. "required": ["name", "data"],
  21429. "additionalProperties": false
  21430. },
  21431. "NotFoundError": {
  21432. "type": "object",
  21433. "required": ["name", "data"],
  21434. "properties": {
  21435. "name": {
  21436. "type": "string",
  21437. "enum": ["NotFoundError"]
  21438. },
  21439. "data": {
  21440. "type": "object",
  21441. "required": ["message"],
  21442. "properties": {
  21443. "message": {
  21444. "type": "string"
  21445. }
  21446. }
  21447. }
  21448. }
  21449. },
  21450. "TextPartInput": {
  21451. "type": "object",
  21452. "properties": {
  21453. "id": {
  21454. "type": "string",
  21455. "pattern": "^prt"
  21456. },
  21457. "type": {
  21458. "type": "string",
  21459. "enum": ["text"]
  21460. },
  21461. "text": {
  21462. "type": "string"
  21463. },
  21464. "synthetic": {
  21465. "type": "boolean"
  21466. },
  21467. "ignored": {
  21468. "type": "boolean"
  21469. },
  21470. "time": {
  21471. "type": "object",
  21472. "properties": {
  21473. "start": {
  21474. "type": "integer",
  21475. "minimum": 0
  21476. },
  21477. "end": {
  21478. "type": "integer",
  21479. "minimum": 0
  21480. }
  21481. },
  21482. "required": ["start"],
  21483. "additionalProperties": false
  21484. },
  21485. "metadata": {
  21486. "type": "object"
  21487. }
  21488. },
  21489. "required": ["type", "text"],
  21490. "additionalProperties": false
  21491. },
  21492. "FilePartInput": {
  21493. "type": "object",
  21494. "properties": {
  21495. "id": {
  21496. "type": "string",
  21497. "pattern": "^prt"
  21498. },
  21499. "type": {
  21500. "type": "string",
  21501. "enum": ["file"]
  21502. },
  21503. "mime": {
  21504. "type": "string"
  21505. },
  21506. "filename": {
  21507. "type": "string"
  21508. },
  21509. "url": {
  21510. "type": "string"
  21511. },
  21512. "source": {
  21513. "$ref": "#/components/schemas/FilePartSource"
  21514. }
  21515. },
  21516. "required": ["type", "mime", "url"],
  21517. "additionalProperties": false
  21518. },
  21519. "AgentPartInput": {
  21520. "type": "object",
  21521. "properties": {
  21522. "id": {
  21523. "type": "string",
  21524. "pattern": "^prt"
  21525. },
  21526. "type": {
  21527. "type": "string",
  21528. "enum": ["agent"]
  21529. },
  21530. "name": {
  21531. "type": "string"
  21532. },
  21533. "source": {
  21534. "type": "object",
  21535. "properties": {
  21536. "value": {
  21537. "type": "string"
  21538. },
  21539. "start": {
  21540. "type": "integer",
  21541. "minimum": 0
  21542. },
  21543. "end": {
  21544. "type": "integer",
  21545. "minimum": 0
  21546. }
  21547. },
  21548. "required": ["value", "start", "end"],
  21549. "additionalProperties": false
  21550. }
  21551. },
  21552. "required": ["type", "name"],
  21553. "additionalProperties": false
  21554. },
  21555. "SubtaskPartInput": {
  21556. "type": "object",
  21557. "properties": {
  21558. "id": {
  21559. "type": "string",
  21560. "pattern": "^prt"
  21561. },
  21562. "type": {
  21563. "type": "string",
  21564. "enum": ["subtask"]
  21565. },
  21566. "prompt": {
  21567. "type": "string"
  21568. },
  21569. "description": {
  21570. "type": "string"
  21571. },
  21572. "agent": {
  21573. "type": "string"
  21574. },
  21575. "model": {
  21576. "type": "object",
  21577. "properties": {
  21578. "providerID": {
  21579. "type": "string"
  21580. },
  21581. "modelID": {
  21582. "type": "string"
  21583. }
  21584. },
  21585. "required": ["providerID", "modelID"],
  21586. "additionalProperties": false
  21587. },
  21588. "command": {
  21589. "type": "string"
  21590. }
  21591. },
  21592. "required": ["type", "prompt", "description", "agent"],
  21593. "additionalProperties": false
  21594. },
  21595. "SessionBusyError": {
  21596. "type": "object",
  21597. "properties": {
  21598. "_tag": {
  21599. "type": "string",
  21600. "enum": ["SessionBusyError"]
  21601. },
  21602. "sessionID": {
  21603. "type": "string"
  21604. },
  21605. "message": {
  21606. "type": "string"
  21607. }
  21608. },
  21609. "required": ["_tag", "sessionID", "message"],
  21610. "additionalProperties": false
  21611. },
  21612. "EventTuiPromptAppend": {
  21613. "type": "object",
  21614. "properties": {
  21615. "type": {
  21616. "type": "string",
  21617. "enum": ["tui.prompt.append"]
  21618. },
  21619. "properties": {
  21620. "type": "object",
  21621. "properties": {
  21622. "text": {
  21623. "type": "string"
  21624. }
  21625. },
  21626. "required": ["text"],
  21627. "additionalProperties": false
  21628. }
  21629. },
  21630. "required": ["type", "properties"],
  21631. "additionalProperties": false
  21632. },
  21633. "EventTuiCommandExecute": {
  21634. "type": "object",
  21635. "properties": {
  21636. "type": {
  21637. "type": "string",
  21638. "enum": ["tui.command.execute"]
  21639. },
  21640. "properties": {
  21641. "type": "object",
  21642. "properties": {
  21643. "command": {
  21644. "anyOf": [
  21645. {
  21646. "type": "string",
  21647. "enum": [
  21648. "session.list",
  21649. "session.new",
  21650. "session.share",
  21651. "session.interrupt",
  21652. "session.compact",
  21653. "session.page.up",
  21654. "session.page.down",
  21655. "session.line.up",
  21656. "session.line.down",
  21657. "session.half.page.up",
  21658. "session.half.page.down",
  21659. "session.first",
  21660. "session.last",
  21661. "prompt.clear",
  21662. "prompt.submit",
  21663. "agent.cycle"
  21664. ]
  21665. },
  21666. {
  21667. "type": "string"
  21668. }
  21669. ]
  21670. }
  21671. },
  21672. "required": ["command"],
  21673. "additionalProperties": false
  21674. }
  21675. },
  21676. "required": ["type", "properties"],
  21677. "additionalProperties": false
  21678. },
  21679. "EventTuiToastShow": {
  21680. "type": "object",
  21681. "properties": {
  21682. "type": {
  21683. "type": "string",
  21684. "enum": ["tui.toast.show"]
  21685. },
  21686. "properties": {
  21687. "type": "object",
  21688. "properties": {
  21689. "title": {
  21690. "type": "string"
  21691. },
  21692. "message": {
  21693. "type": "string"
  21694. },
  21695. "variant": {
  21696. "type": "string",
  21697. "enum": ["info", "success", "warning", "error"]
  21698. },
  21699. "duration": {
  21700. "type": "integer",
  21701. "exclusiveMinimum": 0
  21702. }
  21703. },
  21704. "required": ["message", "variant"],
  21705. "additionalProperties": false
  21706. }
  21707. },
  21708. "required": ["type", "properties"],
  21709. "additionalProperties": false
  21710. },
  21711. "EventTuiSessionSelect": {
  21712. "type": "object",
  21713. "properties": {
  21714. "type": {
  21715. "type": "string",
  21716. "enum": ["tui.session.select"]
  21717. },
  21718. "properties": {
  21719. "type": "object",
  21720. "properties": {
  21721. "sessionID": {
  21722. "type": "string",
  21723. "pattern": "^ses",
  21724. "description": "Session ID to navigate to"
  21725. }
  21726. },
  21727. "required": ["sessionID"],
  21728. "additionalProperties": false
  21729. }
  21730. },
  21731. "required": ["type", "properties"],
  21732. "additionalProperties": false
  21733. },
  21734. "Workspace": {
  21735. "type": "object",
  21736. "properties": {
  21737. "id": {
  21738. "type": "string",
  21739. "pattern": "^wrk"
  21740. },
  21741. "type": {
  21742. "type": "string"
  21743. },
  21744. "name": {
  21745. "type": "string"
  21746. },
  21747. "branch": {
  21748. "anyOf": [
  21749. {
  21750. "type": "string"
  21751. },
  21752. {
  21753. "type": "null"
  21754. }
  21755. ]
  21756. },
  21757. "directory": {
  21758. "anyOf": [
  21759. {
  21760. "type": "string"
  21761. },
  21762. {
  21763. "type": "null"
  21764. }
  21765. ]
  21766. },
  21767. "extra": {
  21768. "anyOf": [
  21769. {},
  21770. {
  21771. "type": "null"
  21772. }
  21773. ]
  21774. },
  21775. "projectID": {
  21776. "type": "string"
  21777. },
  21778. "timeUsed": {
  21779. "anyOf": [
  21780. {
  21781. "type": "number"
  21782. },
  21783. {
  21784. "type": "string",
  21785. "enum": ["NaN"]
  21786. },
  21787. {
  21788. "type": "string",
  21789. "enum": ["Infinity"]
  21790. },
  21791. {
  21792. "type": "string",
  21793. "enum": ["-Infinity"]
  21794. },
  21795. {
  21796. "type": "string",
  21797. "enum": ["Infinity", "-Infinity", "NaN"]
  21798. }
  21799. ]
  21800. }
  21801. },
  21802. "required": ["id", "type", "name", "projectID", "timeUsed"],
  21803. "additionalProperties": false
  21804. },
  21805. "WorkspaceCreateError": {
  21806. "type": "object",
  21807. "properties": {
  21808. "name": {
  21809. "type": "string",
  21810. "enum": ["WorkspaceCreateError"]
  21811. },
  21812. "data": {
  21813. "type": "object",
  21814. "properties": {
  21815. "message": {
  21816. "type": "string"
  21817. }
  21818. },
  21819. "required": ["message"],
  21820. "additionalProperties": false
  21821. }
  21822. },
  21823. "required": ["name", "data"],
  21824. "additionalProperties": false
  21825. },
  21826. "WorkspaceWarpError": {
  21827. "type": "object",
  21828. "properties": {
  21829. "name": {
  21830. "type": "string",
  21831. "enum": ["WorkspaceWarpError"]
  21832. },
  21833. "data": {
  21834. "type": "object",
  21835. "properties": {
  21836. "message": {
  21837. "type": "string"
  21838. }
  21839. },
  21840. "required": ["message"],
  21841. "additionalProperties": false
  21842. }
  21843. },
  21844. "required": ["name", "data"],
  21845. "additionalProperties": false
  21846. },
  21847. "UnauthorizedError": {
  21848. "type": "object",
  21849. "properties": {
  21850. "_tag": {
  21851. "type": "string",
  21852. "enum": ["UnauthorizedError"]
  21853. },
  21854. "message": {
  21855. "type": "string"
  21856. }
  21857. },
  21858. "required": ["_tag", "message"],
  21859. "additionalProperties": false
  21860. },
  21861. "SessionsResponse": {
  21862. "type": "object",
  21863. "properties": {
  21864. "data": {
  21865. "type": "array",
  21866. "items": {
  21867. "$ref": "#/components/schemas/SessionV2Info"
  21868. }
  21869. },
  21870. "cursor": {
  21871. "type": "object",
  21872. "properties": {
  21873. "previous": {
  21874. "type": "string"
  21875. },
  21876. "next": {
  21877. "type": "string"
  21878. }
  21879. },
  21880. "additionalProperties": false
  21881. }
  21882. },
  21883. "required": ["data", "cursor"],
  21884. "additionalProperties": false
  21885. },
  21886. "InvalidCursorError": {
  21887. "type": "object",
  21888. "properties": {
  21889. "_tag": {
  21890. "type": "string",
  21891. "enum": ["InvalidCursorError"]
  21892. },
  21893. "message": {
  21894. "type": "string"
  21895. }
  21896. },
  21897. "required": ["_tag", "message"],
  21898. "additionalProperties": false
  21899. },
  21900. "SessionNotFoundError": {
  21901. "type": "object",
  21902. "properties": {
  21903. "_tag": {
  21904. "type": "string",
  21905. "enum": ["SessionNotFoundError"]
  21906. },
  21907. "sessionID": {
  21908. "type": "string"
  21909. },
  21910. "message": {
  21911. "type": "string"
  21912. }
  21913. },
  21914. "required": ["_tag", "sessionID", "message"],
  21915. "additionalProperties": false
  21916. },
  21917. "ConflictError": {
  21918. "type": "object",
  21919. "properties": {
  21920. "_tag": {
  21921. "type": "string",
  21922. "enum": ["ConflictError"]
  21923. },
  21924. "message": {
  21925. "type": "string"
  21926. },
  21927. "resource": {
  21928. "type": "string"
  21929. }
  21930. },
  21931. "required": ["_tag", "message"],
  21932. "additionalProperties": false
  21933. },
  21934. "ServiceUnavailableError": {
  21935. "type": "object",
  21936. "properties": {
  21937. "_tag": {
  21938. "type": "string",
  21939. "enum": ["ServiceUnavailableError"]
  21940. },
  21941. "message": {
  21942. "type": "string"
  21943. },
  21944. "service": {
  21945. "type": "string"
  21946. }
  21947. },
  21948. "required": ["_tag", "message"],
  21949. "additionalProperties": false
  21950. },
  21951. "UnknownError1": {
  21952. "type": "object",
  21953. "properties": {
  21954. "_tag": {
  21955. "type": "string",
  21956. "enum": ["UnknownError"]
  21957. },
  21958. "message": {
  21959. "type": "string"
  21960. },
  21961. "ref": {
  21962. "type": "string"
  21963. }
  21964. },
  21965. "required": ["_tag", "message"],
  21966. "additionalProperties": false
  21967. },
  21968. "SessionMessagesResponse": {
  21969. "type": "object",
  21970. "properties": {
  21971. "data": {
  21972. "type": "array",
  21973. "items": {
  21974. "$ref": "#/components/schemas/SessionMessage"
  21975. }
  21976. },
  21977. "cursor": {
  21978. "type": "object",
  21979. "properties": {
  21980. "previous": {
  21981. "type": "string"
  21982. },
  21983. "next": {
  21984. "type": "string"
  21985. }
  21986. },
  21987. "additionalProperties": false
  21988. }
  21989. },
  21990. "required": ["data", "cursor"],
  21991. "additionalProperties": false
  21992. },
  21993. "ProviderNotFoundError": {
  21994. "type": "object",
  21995. "properties": {
  21996. "_tag": {
  21997. "type": "string",
  21998. "enum": ["ProviderNotFoundError"]
  21999. },
  22000. "providerID": {
  22001. "type": "string"
  22002. },
  22003. "message": {
  22004. "type": "string"
  22005. }
  22006. },
  22007. "required": ["_tag", "providerID", "message"],
  22008. "additionalProperties": false
  22009. },
  22010. "effect_HttpApiError_Forbidden": {
  22011. "type": "object",
  22012. "properties": {
  22013. "_tag": {
  22014. "type": "string",
  22015. "enum": ["Forbidden"]
  22016. }
  22017. },
  22018. "required": ["_tag"],
  22019. "additionalProperties": false
  22020. },
  22021. "Event.tui.prompt.append": {
  22022. "type": "object",
  22023. "properties": {
  22024. "id": {
  22025. "type": "string",
  22026. "pattern": "^evt_"
  22027. },
  22028. "type": {
  22029. "type": "string",
  22030. "enum": ["tui.prompt.append"]
  22031. },
  22032. "properties": {
  22033. "type": "object",
  22034. "properties": {
  22035. "text": {
  22036. "type": "string"
  22037. }
  22038. },
  22039. "required": ["text"],
  22040. "additionalProperties": false
  22041. }
  22042. },
  22043. "required": ["id", "type", "properties"],
  22044. "additionalProperties": false
  22045. },
  22046. "Event.tui.command.execute": {
  22047. "type": "object",
  22048. "properties": {
  22049. "id": {
  22050. "type": "string",
  22051. "pattern": "^evt_"
  22052. },
  22053. "type": {
  22054. "type": "string",
  22055. "enum": ["tui.command.execute"]
  22056. },
  22057. "properties": {
  22058. "type": "object",
  22059. "properties": {
  22060. "command": {
  22061. "anyOf": [
  22062. {
  22063. "type": "string",
  22064. "enum": [
  22065. "session.list",
  22066. "session.new",
  22067. "session.share",
  22068. "session.interrupt",
  22069. "session.compact",
  22070. "session.page.up",
  22071. "session.page.down",
  22072. "session.line.up",
  22073. "session.line.down",
  22074. "session.half.page.up",
  22075. "session.half.page.down",
  22076. "session.first",
  22077. "session.last",
  22078. "prompt.clear",
  22079. "prompt.submit",
  22080. "agent.cycle"
  22081. ]
  22082. },
  22083. {
  22084. "type": "string"
  22085. }
  22086. ]
  22087. }
  22088. },
  22089. "required": ["command"],
  22090. "additionalProperties": false
  22091. }
  22092. },
  22093. "required": ["id", "type", "properties"],
  22094. "additionalProperties": false
  22095. },
  22096. "Event.tui.toast.show": {
  22097. "type": "object",
  22098. "properties": {
  22099. "id": {
  22100. "type": "string",
  22101. "pattern": "^evt_"
  22102. },
  22103. "type": {
  22104. "type": "string",
  22105. "enum": ["tui.toast.show"]
  22106. },
  22107. "properties": {
  22108. "type": "object",
  22109. "properties": {
  22110. "title": {
  22111. "type": "string"
  22112. },
  22113. "message": {
  22114. "type": "string"
  22115. },
  22116. "variant": {
  22117. "type": "string",
  22118. "enum": ["info", "success", "warning", "error"]
  22119. },
  22120. "duration": {
  22121. "type": "integer",
  22122. "exclusiveMinimum": 0
  22123. }
  22124. },
  22125. "required": ["message", "variant"],
  22126. "additionalProperties": false
  22127. }
  22128. },
  22129. "required": ["id", "type", "properties"],
  22130. "additionalProperties": false
  22131. },
  22132. "Event.tui.session.select": {
  22133. "type": "object",
  22134. "properties": {
  22135. "id": {
  22136. "type": "string",
  22137. "pattern": "^evt_"
  22138. },
  22139. "type": {
  22140. "type": "string",
  22141. "enum": ["tui.session.select"]
  22142. },
  22143. "properties": {
  22144. "type": "object",
  22145. "properties": {
  22146. "sessionID": {
  22147. "type": "string",
  22148. "pattern": "^ses",
  22149. "description": "Session ID to navigate to"
  22150. }
  22151. },
  22152. "required": ["sessionID"],
  22153. "additionalProperties": false
  22154. }
  22155. },
  22156. "required": ["id", "type", "properties"],
  22157. "additionalProperties": false
  22158. },
  22159. "MoveSessionDestination": {
  22160. "type": "object",
  22161. "properties": {
  22162. "directory": {
  22163. "type": "string"
  22164. }
  22165. },
  22166. "required": ["directory"],
  22167. "additionalProperties": false
  22168. },
  22169. "ModelV2Info": {
  22170. "type": "object",
  22171. "properties": {
  22172. "id": {
  22173. "type": "string"
  22174. },
  22175. "providerID": {
  22176. "type": "string"
  22177. },
  22178. "family": {
  22179. "type": "string"
  22180. },
  22181. "name": {
  22182. "type": "string"
  22183. },
  22184. "api": {
  22185. "anyOf": [
  22186. {
  22187. "type": "object",
  22188. "properties": {
  22189. "id": {
  22190. "type": "string"
  22191. },
  22192. "type": {
  22193. "type": "string",
  22194. "enum": ["aisdk"]
  22195. },
  22196. "package": {
  22197. "type": "string"
  22198. },
  22199. "url": {
  22200. "type": "string"
  22201. },
  22202. "settings": {
  22203. "type": "object"
  22204. }
  22205. },
  22206. "required": ["id", "type", "package"],
  22207. "additionalProperties": false
  22208. },
  22209. {
  22210. "type": "object",
  22211. "properties": {
  22212. "id": {
  22213. "type": "string"
  22214. },
  22215. "type": {
  22216. "type": "string",
  22217. "enum": ["native"]
  22218. },
  22219. "url": {
  22220. "type": "string"
  22221. },
  22222. "settings": {
  22223. "type": "object"
  22224. }
  22225. },
  22226. "required": ["id", "type", "settings"],
  22227. "additionalProperties": false
  22228. }
  22229. ]
  22230. },
  22231. "capabilities": {
  22232. "type": "object",
  22233. "properties": {
  22234. "tools": {
  22235. "type": "boolean"
  22236. },
  22237. "input": {
  22238. "type": "array",
  22239. "items": {
  22240. "type": "string"
  22241. }
  22242. },
  22243. "output": {
  22244. "type": "array",
  22245. "items": {
  22246. "type": "string"
  22247. }
  22248. }
  22249. },
  22250. "required": ["tools", "input", "output"],
  22251. "additionalProperties": false
  22252. },
  22253. "request": {
  22254. "type": "object",
  22255. "properties": {
  22256. "headers": {
  22257. "type": "object",
  22258. "additionalProperties": {
  22259. "type": "string"
  22260. }
  22261. },
  22262. "body": {
  22263. "type": "object"
  22264. },
  22265. "generation": {
  22266. "type": "object",
  22267. "properties": {
  22268. "maxTokens": {
  22269. "anyOf": [
  22270. {
  22271. "type": "number"
  22272. },
  22273. {
  22274. "type": "string",
  22275. "enum": ["NaN"]
  22276. },
  22277. {
  22278. "type": "string",
  22279. "enum": ["Infinity"]
  22280. },
  22281. {
  22282. "type": "string",
  22283. "enum": ["-Infinity"]
  22284. },
  22285. {
  22286. "type": "string",
  22287. "enum": ["Infinity", "-Infinity", "NaN"]
  22288. }
  22289. ]
  22290. },
  22291. "temperature": {
  22292. "anyOf": [
  22293. {
  22294. "type": "number"
  22295. },
  22296. {
  22297. "type": "string",
  22298. "enum": ["NaN"]
  22299. },
  22300. {
  22301. "type": "string",
  22302. "enum": ["Infinity"]
  22303. },
  22304. {
  22305. "type": "string",
  22306. "enum": ["-Infinity"]
  22307. },
  22308. {
  22309. "type": "string",
  22310. "enum": ["Infinity", "-Infinity", "NaN"]
  22311. }
  22312. ]
  22313. },
  22314. "topP": {
  22315. "anyOf": [
  22316. {
  22317. "type": "number"
  22318. },
  22319. {
  22320. "type": "string",
  22321. "enum": ["NaN"]
  22322. },
  22323. {
  22324. "type": "string",
  22325. "enum": ["Infinity"]
  22326. },
  22327. {
  22328. "type": "string",
  22329. "enum": ["-Infinity"]
  22330. },
  22331. {
  22332. "type": "string",
  22333. "enum": ["Infinity", "-Infinity", "NaN"]
  22334. }
  22335. ]
  22336. },
  22337. "topK": {
  22338. "anyOf": [
  22339. {
  22340. "type": "number"
  22341. },
  22342. {
  22343. "type": "string",
  22344. "enum": ["NaN"]
  22345. },
  22346. {
  22347. "type": "string",
  22348. "enum": ["Infinity"]
  22349. },
  22350. {
  22351. "type": "string",
  22352. "enum": ["-Infinity"]
  22353. },
  22354. {
  22355. "type": "string",
  22356. "enum": ["Infinity", "-Infinity", "NaN"]
  22357. }
  22358. ]
  22359. },
  22360. "frequencyPenalty": {
  22361. "anyOf": [
  22362. {
  22363. "type": "number"
  22364. },
  22365. {
  22366. "type": "string",
  22367. "enum": ["NaN"]
  22368. },
  22369. {
  22370. "type": "string",
  22371. "enum": ["Infinity"]
  22372. },
  22373. {
  22374. "type": "string",
  22375. "enum": ["-Infinity"]
  22376. },
  22377. {
  22378. "type": "string",
  22379. "enum": ["Infinity", "-Infinity", "NaN"]
  22380. }
  22381. ]
  22382. },
  22383. "presencePenalty": {
  22384. "anyOf": [
  22385. {
  22386. "type": "number"
  22387. },
  22388. {
  22389. "type": "string",
  22390. "enum": ["NaN"]
  22391. },
  22392. {
  22393. "type": "string",
  22394. "enum": ["Infinity"]
  22395. },
  22396. {
  22397. "type": "string",
  22398. "enum": ["-Infinity"]
  22399. },
  22400. {
  22401. "type": "string",
  22402. "enum": ["Infinity", "-Infinity", "NaN"]
  22403. }
  22404. ]
  22405. },
  22406. "seed": {
  22407. "anyOf": [
  22408. {
  22409. "type": "number"
  22410. },
  22411. {
  22412. "type": "string",
  22413. "enum": ["NaN"]
  22414. },
  22415. {
  22416. "type": "string",
  22417. "enum": ["Infinity"]
  22418. },
  22419. {
  22420. "type": "string",
  22421. "enum": ["-Infinity"]
  22422. },
  22423. {
  22424. "type": "string",
  22425. "enum": ["Infinity", "-Infinity", "NaN"]
  22426. }
  22427. ]
  22428. },
  22429. "stop": {
  22430. "type": "array",
  22431. "items": {
  22432. "type": "string"
  22433. }
  22434. }
  22435. },
  22436. "additionalProperties": false
  22437. },
  22438. "options": {
  22439. "type": "object"
  22440. },
  22441. "variant": {
  22442. "type": "string"
  22443. }
  22444. },
  22445. "required": ["headers", "body"],
  22446. "additionalProperties": false
  22447. },
  22448. "variants": {
  22449. "type": "array",
  22450. "items": {
  22451. "type": "object",
  22452. "properties": {
  22453. "id": {
  22454. "type": "string"
  22455. },
  22456. "headers": {
  22457. "type": "object",
  22458. "additionalProperties": {
  22459. "type": "string"
  22460. }
  22461. },
  22462. "body": {
  22463. "type": "object"
  22464. },
  22465. "generation": {
  22466. "type": "object",
  22467. "properties": {
  22468. "maxTokens": {
  22469. "anyOf": [
  22470. {
  22471. "type": "number"
  22472. },
  22473. {
  22474. "type": "string",
  22475. "enum": ["NaN"]
  22476. },
  22477. {
  22478. "type": "string",
  22479. "enum": ["Infinity"]
  22480. },
  22481. {
  22482. "type": "string",
  22483. "enum": ["-Infinity"]
  22484. },
  22485. {
  22486. "type": "string",
  22487. "enum": ["Infinity", "-Infinity", "NaN"]
  22488. }
  22489. ]
  22490. },
  22491. "temperature": {
  22492. "anyOf": [
  22493. {
  22494. "type": "number"
  22495. },
  22496. {
  22497. "type": "string",
  22498. "enum": ["NaN"]
  22499. },
  22500. {
  22501. "type": "string",
  22502. "enum": ["Infinity"]
  22503. },
  22504. {
  22505. "type": "string",
  22506. "enum": ["-Infinity"]
  22507. },
  22508. {
  22509. "type": "string",
  22510. "enum": ["Infinity", "-Infinity", "NaN"]
  22511. }
  22512. ]
  22513. },
  22514. "topP": {
  22515. "anyOf": [
  22516. {
  22517. "type": "number"
  22518. },
  22519. {
  22520. "type": "string",
  22521. "enum": ["NaN"]
  22522. },
  22523. {
  22524. "type": "string",
  22525. "enum": ["Infinity"]
  22526. },
  22527. {
  22528. "type": "string",
  22529. "enum": ["-Infinity"]
  22530. },
  22531. {
  22532. "type": "string",
  22533. "enum": ["Infinity", "-Infinity", "NaN"]
  22534. }
  22535. ]
  22536. },
  22537. "topK": {
  22538. "anyOf": [
  22539. {
  22540. "type": "number"
  22541. },
  22542. {
  22543. "type": "string",
  22544. "enum": ["NaN"]
  22545. },
  22546. {
  22547. "type": "string",
  22548. "enum": ["Infinity"]
  22549. },
  22550. {
  22551. "type": "string",
  22552. "enum": ["-Infinity"]
  22553. },
  22554. {
  22555. "type": "string",
  22556. "enum": ["Infinity", "-Infinity", "NaN"]
  22557. }
  22558. ]
  22559. },
  22560. "frequencyPenalty": {
  22561. "anyOf": [
  22562. {
  22563. "type": "number"
  22564. },
  22565. {
  22566. "type": "string",
  22567. "enum": ["NaN"]
  22568. },
  22569. {
  22570. "type": "string",
  22571. "enum": ["Infinity"]
  22572. },
  22573. {
  22574. "type": "string",
  22575. "enum": ["-Infinity"]
  22576. },
  22577. {
  22578. "type": "string",
  22579. "enum": ["Infinity", "-Infinity", "NaN"]
  22580. }
  22581. ]
  22582. },
  22583. "presencePenalty": {
  22584. "anyOf": [
  22585. {
  22586. "type": "number"
  22587. },
  22588. {
  22589. "type": "string",
  22590. "enum": ["NaN"]
  22591. },
  22592. {
  22593. "type": "string",
  22594. "enum": ["Infinity"]
  22595. },
  22596. {
  22597. "type": "string",
  22598. "enum": ["-Infinity"]
  22599. },
  22600. {
  22601. "type": "string",
  22602. "enum": ["Infinity", "-Infinity", "NaN"]
  22603. }
  22604. ]
  22605. },
  22606. "seed": {
  22607. "anyOf": [
  22608. {
  22609. "type": "number"
  22610. },
  22611. {
  22612. "type": "string",
  22613. "enum": ["NaN"]
  22614. },
  22615. {
  22616. "type": "string",
  22617. "enum": ["Infinity"]
  22618. },
  22619. {
  22620. "type": "string",
  22621. "enum": ["-Infinity"]
  22622. },
  22623. {
  22624. "type": "string",
  22625. "enum": ["Infinity", "-Infinity", "NaN"]
  22626. }
  22627. ]
  22628. },
  22629. "stop": {
  22630. "type": "array",
  22631. "items": {
  22632. "type": "string"
  22633. }
  22634. }
  22635. },
  22636. "additionalProperties": false
  22637. },
  22638. "options": {
  22639. "type": "object"
  22640. }
  22641. },
  22642. "required": ["id", "headers", "body"],
  22643. "additionalProperties": false
  22644. }
  22645. },
  22646. "time": {
  22647. "type": "object",
  22648. "properties": {
  22649. "released": {
  22650. "anyOf": [
  22651. {
  22652. "type": "number"
  22653. },
  22654. {
  22655. "type": "string",
  22656. "enum": ["NaN"]
  22657. },
  22658. {
  22659. "type": "string",
  22660. "enum": ["Infinity"]
  22661. },
  22662. {
  22663. "type": "string",
  22664. "enum": ["-Infinity"]
  22665. },
  22666. {
  22667. "type": "string",
  22668. "enum": ["Infinity", "-Infinity", "NaN"]
  22669. }
  22670. ]
  22671. }
  22672. },
  22673. "required": ["released"],
  22674. "additionalProperties": false
  22675. },
  22676. "cost": {
  22677. "type": "array",
  22678. "items": {
  22679. "type": "object",
  22680. "properties": {
  22681. "tier": {
  22682. "type": "object",
  22683. "properties": {
  22684. "type": {
  22685. "type": "string",
  22686. "enum": ["context"]
  22687. },
  22688. "size": {
  22689. "type": "integer"
  22690. }
  22691. },
  22692. "required": ["type", "size"],
  22693. "additionalProperties": false
  22694. },
  22695. "input": {
  22696. "type": "number"
  22697. },
  22698. "output": {
  22699. "type": "number"
  22700. },
  22701. "cache": {
  22702. "type": "object",
  22703. "properties": {
  22704. "read": {
  22705. "type": "number"
  22706. },
  22707. "write": {
  22708. "type": "number"
  22709. }
  22710. },
  22711. "required": ["read", "write"],
  22712. "additionalProperties": false
  22713. }
  22714. },
  22715. "required": ["input", "output", "cache"],
  22716. "additionalProperties": false
  22717. }
  22718. },
  22719. "status": {
  22720. "type": "string",
  22721. "enum": ["alpha", "beta", "deprecated", "active"]
  22722. },
  22723. "enabled": {
  22724. "type": "boolean"
  22725. },
  22726. "limit": {
  22727. "type": "object",
  22728. "properties": {
  22729. "context": {
  22730. "type": "integer"
  22731. },
  22732. "input": {
  22733. "type": "integer"
  22734. },
  22735. "output": {
  22736. "type": "integer"
  22737. }
  22738. },
  22739. "required": ["context", "output"],
  22740. "additionalProperties": false
  22741. }
  22742. },
  22743. "required": [
  22744. "id",
  22745. "providerID",
  22746. "name",
  22747. "api",
  22748. "capabilities",
  22749. "request",
  22750. "variants",
  22751. "time",
  22752. "cost",
  22753. "status",
  22754. "enabled",
  22755. "limit"
  22756. ],
  22757. "additionalProperties": false
  22758. },
  22759. "LocationRef": {
  22760. "type": "object",
  22761. "properties": {
  22762. "directory": {
  22763. "type": "string"
  22764. },
  22765. "workspaceID": {
  22766. "type": "string",
  22767. "pattern": "^wrk"
  22768. }
  22769. },
  22770. "required": ["directory"],
  22771. "additionalProperties": false
  22772. },
  22773. "PromptSource": {
  22774. "type": "object",
  22775. "properties": {
  22776. "start": {
  22777. "type": "number"
  22778. },
  22779. "end": {
  22780. "type": "number"
  22781. },
  22782. "text": {
  22783. "type": "string"
  22784. }
  22785. },
  22786. "required": ["start", "end", "text"],
  22787. "additionalProperties": false
  22788. },
  22789. "PromptFileAttachment": {
  22790. "type": "object",
  22791. "properties": {
  22792. "uri": {
  22793. "type": "string"
  22794. },
  22795. "mime": {
  22796. "type": "string"
  22797. },
  22798. "name": {
  22799. "type": "string"
  22800. },
  22801. "description": {
  22802. "type": "string"
  22803. },
  22804. "source": {
  22805. "$ref": "#/components/schemas/PromptSource"
  22806. }
  22807. },
  22808. "required": ["uri", "mime"],
  22809. "additionalProperties": false
  22810. },
  22811. "PromptAgentAttachment": {
  22812. "type": "object",
  22813. "properties": {
  22814. "name": {
  22815. "type": "string"
  22816. },
  22817. "source": {
  22818. "$ref": "#/components/schemas/PromptSource"
  22819. }
  22820. },
  22821. "required": ["name"],
  22822. "additionalProperties": false
  22823. },
  22824. "SessionErrorUnknown": {
  22825. "type": "object",
  22826. "properties": {
  22827. "type": {
  22828. "type": "string",
  22829. "enum": ["unknown"]
  22830. },
  22831. "message": {
  22832. "type": "string"
  22833. }
  22834. },
  22835. "required": ["type", "message"],
  22836. "additionalProperties": false
  22837. },
  22838. "ToolTextContent": {
  22839. "type": "object",
  22840. "properties": {
  22841. "type": {
  22842. "type": "string",
  22843. "enum": ["text"]
  22844. },
  22845. "text": {
  22846. "type": "string"
  22847. }
  22848. },
  22849. "required": ["type", "text"],
  22850. "additionalProperties": false
  22851. },
  22852. "ToolFileContent": {
  22853. "type": "object",
  22854. "properties": {
  22855. "type": {
  22856. "type": "string",
  22857. "enum": ["file"]
  22858. },
  22859. "uri": {
  22860. "type": "string"
  22861. },
  22862. "mime": {
  22863. "type": "string"
  22864. },
  22865. "name": {
  22866. "type": "string"
  22867. }
  22868. },
  22869. "required": ["type", "uri", "mime"],
  22870. "additionalProperties": false
  22871. },
  22872. "SessionNextRetry_error": {
  22873. "type": "object",
  22874. "properties": {
  22875. "message": {
  22876. "type": "string"
  22877. },
  22878. "statusCode": {
  22879. "type": "number"
  22880. },
  22881. "isRetryable": {
  22882. "type": "boolean"
  22883. },
  22884. "responseHeaders": {
  22885. "type": "object",
  22886. "additionalProperties": {
  22887. "type": "string"
  22888. }
  22889. },
  22890. "responseBody": {
  22891. "type": "string"
  22892. },
  22893. "metadata": {
  22894. "type": "object",
  22895. "additionalProperties": {
  22896. "type": "string"
  22897. }
  22898. }
  22899. },
  22900. "required": ["message", "isRetryable"],
  22901. "additionalProperties": false
  22902. },
  22903. "PermissionV2Source": {
  22904. "type": "object",
  22905. "properties": {
  22906. "type": {
  22907. "type": "string",
  22908. "enum": ["tool"]
  22909. },
  22910. "messageID": {
  22911. "type": "string"
  22912. },
  22913. "callID": {
  22914. "type": "string"
  22915. }
  22916. },
  22917. "required": ["type", "messageID", "callID"],
  22918. "additionalProperties": false
  22919. },
  22920. "PermissionV2Reply": {
  22921. "type": "string",
  22922. "enum": ["once", "always", "reject"]
  22923. },
  22924. "QuestionV2Option": {
  22925. "type": "object",
  22926. "properties": {
  22927. "label": {
  22928. "type": "string",
  22929. "description": "Display text (1-5 words, concise)"
  22930. },
  22931. "description": {
  22932. "type": "string",
  22933. "description": "Explanation of choice"
  22934. }
  22935. },
  22936. "required": ["label", "description"],
  22937. "additionalProperties": false
  22938. },
  22939. "QuestionV2Info": {
  22940. "type": "object",
  22941. "properties": {
  22942. "question": {
  22943. "type": "string",
  22944. "description": "Complete question"
  22945. },
  22946. "header": {
  22947. "type": "string",
  22948. "description": "Very short label (max 30 chars)"
  22949. },
  22950. "options": {
  22951. "type": "array",
  22952. "items": {
  22953. "$ref": "#/components/schemas/QuestionV2Option"
  22954. },
  22955. "description": "Available choices"
  22956. },
  22957. "multiple": {
  22958. "type": "boolean"
  22959. },
  22960. "custom": {
  22961. "type": "boolean"
  22962. }
  22963. },
  22964. "required": ["question", "header", "options"],
  22965. "additionalProperties": false
  22966. },
  22967. "QuestionV2Tool": {
  22968. "type": "object",
  22969. "properties": {
  22970. "messageID": {
  22971. "type": "string"
  22972. },
  22973. "callID": {
  22974. "type": "string"
  22975. }
  22976. },
  22977. "required": ["messageID", "callID"],
  22978. "additionalProperties": false
  22979. },
  22980. "QuestionV2Answer": {
  22981. "type": "array",
  22982. "items": {
  22983. "type": "string"
  22984. }
  22985. },
  22986. "EventServerInstanceDisposed": {
  22987. "type": "object",
  22988. "properties": {
  22989. "id": {
  22990. "type": "string"
  22991. },
  22992. "type": {
  22993. "type": "string",
  22994. "enum": ["server.instance.disposed"]
  22995. },
  22996. "properties": {
  22997. "type": "object",
  22998. "properties": {
  22999. "directory": {
  23000. "type": "string"
  23001. }
  23002. },
  23003. "required": ["directory"],
  23004. "additionalProperties": false
  23005. }
  23006. },
  23007. "required": ["id", "type", "properties"],
  23008. "additionalProperties": false
  23009. },
  23010. "SyncEventSessionCreated": {
  23011. "type": "object",
  23012. "properties": {
  23013. "type": {
  23014. "type": "string",
  23015. "enum": ["sync"]
  23016. },
  23017. "id": {
  23018. "type": "string",
  23019. "pattern": "^evt_"
  23020. },
  23021. "syncEvent": {
  23022. "type": "object",
  23023. "properties": {
  23024. "type": {
  23025. "type": "string",
  23026. "enum": ["session.created.1"]
  23027. },
  23028. "id": {
  23029. "type": "string",
  23030. "pattern": "^evt_"
  23031. },
  23032. "seq": {
  23033. "type": "number"
  23034. },
  23035. "aggregateID": {
  23036. "type": "string"
  23037. },
  23038. "data": {
  23039. "type": "object",
  23040. "properties": {
  23041. "sessionID": {
  23042. "type": "string",
  23043. "pattern": "^ses"
  23044. },
  23045. "info": {
  23046. "$ref": "#/components/schemas/Session"
  23047. }
  23048. },
  23049. "required": ["sessionID", "info"],
  23050. "additionalProperties": false
  23051. }
  23052. },
  23053. "required": ["type", "id", "seq", "aggregateID", "data"],
  23054. "additionalProperties": false
  23055. }
  23056. },
  23057. "required": ["type", "id", "syncEvent"],
  23058. "additionalProperties": false
  23059. },
  23060. "SyncEventSessionUpdated": {
  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.updated.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. "SyncEventSessionDeleted": {
  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.deleted.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. "SyncEventMessageUpdated": {
  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": ["message.updated.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/Message"
  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. "SyncEventMessageRemoved": {
  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.removed.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. "messageID": {
  23246. "type": "string",
  23247. "pattern": "^msg"
  23248. }
  23249. },
  23250. "required": ["sessionID", "messageID"],
  23251. "additionalProperties": false
  23252. }
  23253. },
  23254. "required": ["type", "id", "seq", "aggregateID", "data"],
  23255. "additionalProperties": false
  23256. }
  23257. },
  23258. "required": ["type", "id", "syncEvent"],
  23259. "additionalProperties": false
  23260. },
  23261. "SyncEventMessagePartUpdated": {
  23262. "type": "object",
  23263. "properties": {
  23264. "type": {
  23265. "type": "string",
  23266. "enum": ["sync"]
  23267. },
  23268. "id": {
  23269. "type": "string",
  23270. "pattern": "^evt_"
  23271. },
  23272. "syncEvent": {
  23273. "type": "object",
  23274. "properties": {
  23275. "type": {
  23276. "type": "string",
  23277. "enum": ["message.part.updated.1"]
  23278. },
  23279. "id": {
  23280. "type": "string",
  23281. "pattern": "^evt_"
  23282. },
  23283. "seq": {
  23284. "type": "number"
  23285. },
  23286. "aggregateID": {
  23287. "type": "string"
  23288. },
  23289. "data": {
  23290. "type": "object",
  23291. "properties": {
  23292. "sessionID": {
  23293. "type": "string",
  23294. "pattern": "^ses"
  23295. },
  23296. "part": {
  23297. "$ref": "#/components/schemas/Part"
  23298. },
  23299. "time": {
  23300. "type": "number"
  23301. }
  23302. },
  23303. "required": ["sessionID", "part", "time"],
  23304. "additionalProperties": false
  23305. }
  23306. },
  23307. "required": ["type", "id", "seq", "aggregateID", "data"],
  23308. "additionalProperties": false
  23309. }
  23310. },
  23311. "required": ["type", "id", "syncEvent"],
  23312. "additionalProperties": false
  23313. },
  23314. "SyncEventMessagePartRemoved": {
  23315. "type": "object",
  23316. "properties": {
  23317. "type": {
  23318. "type": "string",
  23319. "enum": ["sync"]
  23320. },
  23321. "id": {
  23322. "type": "string",
  23323. "pattern": "^evt_"
  23324. },
  23325. "syncEvent": {
  23326. "type": "object",
  23327. "properties": {
  23328. "type": {
  23329. "type": "string",
  23330. "enum": ["message.part.removed.1"]
  23331. },
  23332. "id": {
  23333. "type": "string",
  23334. "pattern": "^evt_"
  23335. },
  23336. "seq": {
  23337. "type": "number"
  23338. },
  23339. "aggregateID": {
  23340. "type": "string"
  23341. },
  23342. "data": {
  23343. "type": "object",
  23344. "properties": {
  23345. "sessionID": {
  23346. "type": "string",
  23347. "pattern": "^ses"
  23348. },
  23349. "messageID": {
  23350. "type": "string",
  23351. "pattern": "^msg"
  23352. },
  23353. "partID": {
  23354. "type": "string",
  23355. "pattern": "^prt"
  23356. }
  23357. },
  23358. "required": ["sessionID", "messageID", "partID"],
  23359. "additionalProperties": false
  23360. }
  23361. },
  23362. "required": ["type", "id", "seq", "aggregateID", "data"],
  23363. "additionalProperties": false
  23364. }
  23365. },
  23366. "required": ["type", "id", "syncEvent"],
  23367. "additionalProperties": false
  23368. },
  23369. "SyncEventSessionNextAgentSwitched": {
  23370. "type": "object",
  23371. "properties": {
  23372. "type": {
  23373. "type": "string",
  23374. "enum": ["sync"]
  23375. },
  23376. "id": {
  23377. "type": "string",
  23378. "pattern": "^evt_"
  23379. },
  23380. "syncEvent": {
  23381. "type": "object",
  23382. "properties": {
  23383. "type": {
  23384. "type": "string",
  23385. "enum": ["session.next.agent.switched.1"]
  23386. },
  23387. "id": {
  23388. "type": "string",
  23389. "pattern": "^evt_"
  23390. },
  23391. "seq": {
  23392. "type": "number"
  23393. },
  23394. "aggregateID": {
  23395. "type": "string"
  23396. },
  23397. "data": {
  23398. "type": "object",
  23399. "properties": {
  23400. "timestamp": {
  23401. "type": "number"
  23402. },
  23403. "sessionID": {
  23404. "type": "string",
  23405. "pattern": "^ses"
  23406. },
  23407. "messageID": {
  23408. "type": "string",
  23409. "pattern": "^msg_"
  23410. },
  23411. "agent": {
  23412. "type": "string"
  23413. }
  23414. },
  23415. "required": ["timestamp", "sessionID", "messageID", "agent"],
  23416. "additionalProperties": false
  23417. }
  23418. },
  23419. "required": ["type", "id", "seq", "aggregateID", "data"],
  23420. "additionalProperties": false
  23421. }
  23422. },
  23423. "required": ["type", "id", "syncEvent"],
  23424. "additionalProperties": false
  23425. },
  23426. "SyncEventSessionNextModelSwitched": {
  23427. "type": "object",
  23428. "properties": {
  23429. "type": {
  23430. "type": "string",
  23431. "enum": ["sync"]
  23432. },
  23433. "id": {
  23434. "type": "string",
  23435. "pattern": "^evt_"
  23436. },
  23437. "syncEvent": {
  23438. "type": "object",
  23439. "properties": {
  23440. "type": {
  23441. "type": "string",
  23442. "enum": ["session.next.model.switched.1"]
  23443. },
  23444. "id": {
  23445. "type": "string",
  23446. "pattern": "^evt_"
  23447. },
  23448. "seq": {
  23449. "type": "number"
  23450. },
  23451. "aggregateID": {
  23452. "type": "string"
  23453. },
  23454. "data": {
  23455. "type": "object",
  23456. "properties": {
  23457. "timestamp": {
  23458. "type": "number"
  23459. },
  23460. "sessionID": {
  23461. "type": "string",
  23462. "pattern": "^ses"
  23463. },
  23464. "messageID": {
  23465. "type": "string",
  23466. "pattern": "^msg_"
  23467. },
  23468. "model": {
  23469. "type": "object",
  23470. "properties": {
  23471. "id": {
  23472. "type": "string"
  23473. },
  23474. "providerID": {
  23475. "type": "string"
  23476. },
  23477. "variant": {
  23478. "type": "string"
  23479. }
  23480. },
  23481. "required": ["id", "providerID"],
  23482. "additionalProperties": false
  23483. }
  23484. },
  23485. "required": ["timestamp", "sessionID", "messageID", "model"],
  23486. "additionalProperties": false
  23487. }
  23488. },
  23489. "required": ["type", "id", "seq", "aggregateID", "data"],
  23490. "additionalProperties": false
  23491. }
  23492. },
  23493. "required": ["type", "id", "syncEvent"],
  23494. "additionalProperties": false
  23495. },
  23496. "SyncEventSessionNextMoved": {
  23497. "type": "object",
  23498. "properties": {
  23499. "type": {
  23500. "type": "string",
  23501. "enum": ["sync"]
  23502. },
  23503. "id": {
  23504. "type": "string",
  23505. "pattern": "^evt_"
  23506. },
  23507. "syncEvent": {
  23508. "type": "object",
  23509. "properties": {
  23510. "type": {
  23511. "type": "string",
  23512. "enum": ["session.next.moved.1"]
  23513. },
  23514. "id": {
  23515. "type": "string",
  23516. "pattern": "^evt_"
  23517. },
  23518. "seq": {
  23519. "type": "number"
  23520. },
  23521. "aggregateID": {
  23522. "type": "string"
  23523. },
  23524. "data": {
  23525. "type": "object",
  23526. "properties": {
  23527. "timestamp": {
  23528. "type": "number"
  23529. },
  23530. "sessionID": {
  23531. "type": "string",
  23532. "pattern": "^ses"
  23533. },
  23534. "location": {
  23535. "$ref": "#/components/schemas/LocationRef"
  23536. },
  23537. "subdirectory": {
  23538. "type": "string"
  23539. }
  23540. },
  23541. "required": ["timestamp", "sessionID", "location"],
  23542. "additionalProperties": false
  23543. }
  23544. },
  23545. "required": ["type", "id", "seq", "aggregateID", "data"],
  23546. "additionalProperties": false
  23547. }
  23548. },
  23549. "required": ["type", "id", "syncEvent"],
  23550. "additionalProperties": false
  23551. },
  23552. "SyncEventSessionNextPrompted": {
  23553. "type": "object",
  23554. "properties": {
  23555. "type": {
  23556. "type": "string",
  23557. "enum": ["sync"]
  23558. },
  23559. "id": {
  23560. "type": "string",
  23561. "pattern": "^evt_"
  23562. },
  23563. "syncEvent": {
  23564. "type": "object",
  23565. "properties": {
  23566. "type": {
  23567. "type": "string",
  23568. "enum": ["session.next.prompted.1"]
  23569. },
  23570. "id": {
  23571. "type": "string",
  23572. "pattern": "^evt_"
  23573. },
  23574. "seq": {
  23575. "type": "number"
  23576. },
  23577. "aggregateID": {
  23578. "type": "string"
  23579. },
  23580. "data": {
  23581. "type": "object",
  23582. "properties": {
  23583. "timestamp": {
  23584. "type": "number"
  23585. },
  23586. "sessionID": {
  23587. "type": "string",
  23588. "pattern": "^ses"
  23589. },
  23590. "messageID": {
  23591. "type": "string",
  23592. "pattern": "^msg_"
  23593. },
  23594. "prompt": {
  23595. "$ref": "#/components/schemas/Prompt"
  23596. },
  23597. "delivery": {
  23598. "type": "string",
  23599. "enum": ["steer", "queue"]
  23600. }
  23601. },
  23602. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23603. "additionalProperties": false
  23604. }
  23605. },
  23606. "required": ["type", "id", "seq", "aggregateID", "data"],
  23607. "additionalProperties": false
  23608. }
  23609. },
  23610. "required": ["type", "id", "syncEvent"],
  23611. "additionalProperties": false
  23612. },
  23613. "SyncEventSessionNextPromptAdmitted": {
  23614. "type": "object",
  23615. "properties": {
  23616. "type": {
  23617. "type": "string",
  23618. "enum": ["sync"]
  23619. },
  23620. "id": {
  23621. "type": "string",
  23622. "pattern": "^evt_"
  23623. },
  23624. "syncEvent": {
  23625. "type": "object",
  23626. "properties": {
  23627. "type": {
  23628. "type": "string",
  23629. "enum": ["session.next.prompt.admitted.1"]
  23630. },
  23631. "id": {
  23632. "type": "string",
  23633. "pattern": "^evt_"
  23634. },
  23635. "seq": {
  23636. "type": "number"
  23637. },
  23638. "aggregateID": {
  23639. "type": "string"
  23640. },
  23641. "data": {
  23642. "type": "object",
  23643. "properties": {
  23644. "timestamp": {
  23645. "type": "number"
  23646. },
  23647. "sessionID": {
  23648. "type": "string",
  23649. "pattern": "^ses"
  23650. },
  23651. "messageID": {
  23652. "type": "string",
  23653. "pattern": "^msg_"
  23654. },
  23655. "prompt": {
  23656. "$ref": "#/components/schemas/Prompt"
  23657. },
  23658. "delivery": {
  23659. "type": "string",
  23660. "enum": ["steer", "queue"]
  23661. }
  23662. },
  23663. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23664. "additionalProperties": false
  23665. }
  23666. },
  23667. "required": ["type", "id", "seq", "aggregateID", "data"],
  23668. "additionalProperties": false
  23669. }
  23670. },
  23671. "required": ["type", "id", "syncEvent"],
  23672. "additionalProperties": false
  23673. },
  23674. "SyncEventSessionNextPromptPromoted": {
  23675. "type": "object",
  23676. "properties": {
  23677. "type": {
  23678. "type": "string",
  23679. "enum": ["sync"]
  23680. },
  23681. "id": {
  23682. "type": "string",
  23683. "pattern": "^evt_"
  23684. },
  23685. "syncEvent": {
  23686. "type": "object",
  23687. "properties": {
  23688. "type": {
  23689. "type": "string",
  23690. "enum": ["session.next.prompt.promoted.1"]
  23691. },
  23692. "id": {
  23693. "type": "string",
  23694. "pattern": "^evt_"
  23695. },
  23696. "seq": {
  23697. "type": "number"
  23698. },
  23699. "aggregateID": {
  23700. "type": "string"
  23701. },
  23702. "data": {
  23703. "type": "object",
  23704. "properties": {
  23705. "timestamp": {
  23706. "type": "number"
  23707. },
  23708. "sessionID": {
  23709. "type": "string",
  23710. "pattern": "^ses"
  23711. },
  23712. "messageID": {
  23713. "type": "string",
  23714. "pattern": "^msg_"
  23715. },
  23716. "prompt": {
  23717. "$ref": "#/components/schemas/Prompt"
  23718. },
  23719. "timeCreated": {
  23720. "type": "number"
  23721. }
  23722. },
  23723. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  23724. "additionalProperties": false
  23725. }
  23726. },
  23727. "required": ["type", "id", "seq", "aggregateID", "data"],
  23728. "additionalProperties": false
  23729. }
  23730. },
  23731. "required": ["type", "id", "syncEvent"],
  23732. "additionalProperties": false
  23733. },
  23734. "SyncEventSessionNextInterruptRequested": {
  23735. "type": "object",
  23736. "properties": {
  23737. "type": {
  23738. "type": "string",
  23739. "enum": ["sync"]
  23740. },
  23741. "id": {
  23742. "type": "string",
  23743. "pattern": "^evt_"
  23744. },
  23745. "syncEvent": {
  23746. "type": "object",
  23747. "properties": {
  23748. "type": {
  23749. "type": "string",
  23750. "enum": ["session.next.interrupt.requested.1"]
  23751. },
  23752. "id": {
  23753. "type": "string",
  23754. "pattern": "^evt_"
  23755. },
  23756. "seq": {
  23757. "type": "number"
  23758. },
  23759. "aggregateID": {
  23760. "type": "string"
  23761. },
  23762. "data": {
  23763. "type": "object",
  23764. "properties": {
  23765. "timestamp": {
  23766. "type": "number"
  23767. },
  23768. "sessionID": {
  23769. "type": "string",
  23770. "pattern": "^ses"
  23771. }
  23772. },
  23773. "required": ["timestamp", "sessionID"],
  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. "SyncEventSessionNextContextUpdated": {
  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.context.updated.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. "messageID": {
  23823. "type": "string",
  23824. "pattern": "^msg_"
  23825. },
  23826. "text": {
  23827. "type": "string"
  23828. }
  23829. },
  23830. "required": ["timestamp", "sessionID", "messageID", "text"],
  23831. "additionalProperties": false
  23832. }
  23833. },
  23834. "required": ["type", "id", "seq", "aggregateID", "data"],
  23835. "additionalProperties": false
  23836. }
  23837. },
  23838. "required": ["type", "id", "syncEvent"],
  23839. "additionalProperties": false
  23840. },
  23841. "SyncEventSessionNextSynthetic": {
  23842. "type": "object",
  23843. "properties": {
  23844. "type": {
  23845. "type": "string",
  23846. "enum": ["sync"]
  23847. },
  23848. "id": {
  23849. "type": "string",
  23850. "pattern": "^evt_"
  23851. },
  23852. "syncEvent": {
  23853. "type": "object",
  23854. "properties": {
  23855. "type": {
  23856. "type": "string",
  23857. "enum": ["session.next.synthetic.1"]
  23858. },
  23859. "id": {
  23860. "type": "string",
  23861. "pattern": "^evt_"
  23862. },
  23863. "seq": {
  23864. "type": "number"
  23865. },
  23866. "aggregateID": {
  23867. "type": "string"
  23868. },
  23869. "data": {
  23870. "type": "object",
  23871. "properties": {
  23872. "timestamp": {
  23873. "type": "number"
  23874. },
  23875. "sessionID": {
  23876. "type": "string",
  23877. "pattern": "^ses"
  23878. },
  23879. "messageID": {
  23880. "type": "string",
  23881. "pattern": "^msg_"
  23882. },
  23883. "text": {
  23884. "type": "string"
  23885. }
  23886. },
  23887. "required": ["timestamp", "sessionID", "messageID", "text"],
  23888. "additionalProperties": false
  23889. }
  23890. },
  23891. "required": ["type", "id", "seq", "aggregateID", "data"],
  23892. "additionalProperties": false
  23893. }
  23894. },
  23895. "required": ["type", "id", "syncEvent"],
  23896. "additionalProperties": false
  23897. },
  23898. "SyncEventSessionNextShellStarted": {
  23899. "type": "object",
  23900. "properties": {
  23901. "type": {
  23902. "type": "string",
  23903. "enum": ["sync"]
  23904. },
  23905. "id": {
  23906. "type": "string",
  23907. "pattern": "^evt_"
  23908. },
  23909. "syncEvent": {
  23910. "type": "object",
  23911. "properties": {
  23912. "type": {
  23913. "type": "string",
  23914. "enum": ["session.next.shell.started.1"]
  23915. },
  23916. "id": {
  23917. "type": "string",
  23918. "pattern": "^evt_"
  23919. },
  23920. "seq": {
  23921. "type": "number"
  23922. },
  23923. "aggregateID": {
  23924. "type": "string"
  23925. },
  23926. "data": {
  23927. "type": "object",
  23928. "properties": {
  23929. "timestamp": {
  23930. "type": "number"
  23931. },
  23932. "sessionID": {
  23933. "type": "string",
  23934. "pattern": "^ses"
  23935. },
  23936. "messageID": {
  23937. "type": "string",
  23938. "pattern": "^msg_"
  23939. },
  23940. "callID": {
  23941. "type": "string"
  23942. },
  23943. "command": {
  23944. "type": "string"
  23945. }
  23946. },
  23947. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  23948. "additionalProperties": false
  23949. }
  23950. },
  23951. "required": ["type", "id", "seq", "aggregateID", "data"],
  23952. "additionalProperties": false
  23953. }
  23954. },
  23955. "required": ["type", "id", "syncEvent"],
  23956. "additionalProperties": false
  23957. },
  23958. "SyncEventSessionNextShellEnded": {
  23959. "type": "object",
  23960. "properties": {
  23961. "type": {
  23962. "type": "string",
  23963. "enum": ["sync"]
  23964. },
  23965. "id": {
  23966. "type": "string",
  23967. "pattern": "^evt_"
  23968. },
  23969. "syncEvent": {
  23970. "type": "object",
  23971. "properties": {
  23972. "type": {
  23973. "type": "string",
  23974. "enum": ["session.next.shell.ended.1"]
  23975. },
  23976. "id": {
  23977. "type": "string",
  23978. "pattern": "^evt_"
  23979. },
  23980. "seq": {
  23981. "type": "number"
  23982. },
  23983. "aggregateID": {
  23984. "type": "string"
  23985. },
  23986. "data": {
  23987. "type": "object",
  23988. "properties": {
  23989. "timestamp": {
  23990. "type": "number"
  23991. },
  23992. "sessionID": {
  23993. "type": "string",
  23994. "pattern": "^ses"
  23995. },
  23996. "callID": {
  23997. "type": "string"
  23998. },
  23999. "output": {
  24000. "type": "string"
  24001. }
  24002. },
  24003. "required": ["timestamp", "sessionID", "callID", "output"],
  24004. "additionalProperties": false
  24005. }
  24006. },
  24007. "required": ["type", "id", "seq", "aggregateID", "data"],
  24008. "additionalProperties": false
  24009. }
  24010. },
  24011. "required": ["type", "id", "syncEvent"],
  24012. "additionalProperties": false
  24013. },
  24014. "SyncEventSessionNextStepStarted": {
  24015. "type": "object",
  24016. "properties": {
  24017. "type": {
  24018. "type": "string",
  24019. "enum": ["sync"]
  24020. },
  24021. "id": {
  24022. "type": "string",
  24023. "pattern": "^evt_"
  24024. },
  24025. "syncEvent": {
  24026. "type": "object",
  24027. "properties": {
  24028. "type": {
  24029. "type": "string",
  24030. "enum": ["session.next.step.started.1"]
  24031. },
  24032. "id": {
  24033. "type": "string",
  24034. "pattern": "^evt_"
  24035. },
  24036. "seq": {
  24037. "type": "number"
  24038. },
  24039. "aggregateID": {
  24040. "type": "string"
  24041. },
  24042. "data": {
  24043. "type": "object",
  24044. "properties": {
  24045. "timestamp": {
  24046. "type": "number"
  24047. },
  24048. "sessionID": {
  24049. "type": "string",
  24050. "pattern": "^ses"
  24051. },
  24052. "assistantMessageID": {
  24053. "type": "string",
  24054. "pattern": "^msg_"
  24055. },
  24056. "agent": {
  24057. "type": "string"
  24058. },
  24059. "model": {
  24060. "type": "object",
  24061. "properties": {
  24062. "id": {
  24063. "type": "string"
  24064. },
  24065. "providerID": {
  24066. "type": "string"
  24067. },
  24068. "variant": {
  24069. "type": "string"
  24070. }
  24071. },
  24072. "required": ["id", "providerID"],
  24073. "additionalProperties": false
  24074. },
  24075. "snapshot": {
  24076. "type": "string"
  24077. }
  24078. },
  24079. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24080. "additionalProperties": false
  24081. }
  24082. },
  24083. "required": ["type", "id", "seq", "aggregateID", "data"],
  24084. "additionalProperties": false
  24085. }
  24086. },
  24087. "required": ["type", "id", "syncEvent"],
  24088. "additionalProperties": false
  24089. },
  24090. "SyncEventSessionNextStepEnded": {
  24091. "type": "object",
  24092. "properties": {
  24093. "type": {
  24094. "type": "string",
  24095. "enum": ["sync"]
  24096. },
  24097. "id": {
  24098. "type": "string",
  24099. "pattern": "^evt_"
  24100. },
  24101. "syncEvent": {
  24102. "type": "object",
  24103. "properties": {
  24104. "type": {
  24105. "type": "string",
  24106. "enum": ["session.next.step.ended.2"]
  24107. },
  24108. "id": {
  24109. "type": "string",
  24110. "pattern": "^evt_"
  24111. },
  24112. "seq": {
  24113. "type": "number"
  24114. },
  24115. "aggregateID": {
  24116. "type": "string"
  24117. },
  24118. "data": {
  24119. "type": "object",
  24120. "properties": {
  24121. "timestamp": {
  24122. "type": "number"
  24123. },
  24124. "sessionID": {
  24125. "type": "string",
  24126. "pattern": "^ses"
  24127. },
  24128. "assistantMessageID": {
  24129. "type": "string",
  24130. "pattern": "^msg_"
  24131. },
  24132. "finish": {
  24133. "type": "string"
  24134. },
  24135. "cost": {
  24136. "type": "number"
  24137. },
  24138. "tokens": {
  24139. "type": "object",
  24140. "properties": {
  24141. "input": {
  24142. "type": "number"
  24143. },
  24144. "output": {
  24145. "type": "number"
  24146. },
  24147. "reasoning": {
  24148. "type": "number"
  24149. },
  24150. "cache": {
  24151. "type": "object",
  24152. "properties": {
  24153. "read": {
  24154. "type": "number"
  24155. },
  24156. "write": {
  24157. "type": "number"
  24158. }
  24159. },
  24160. "required": ["read", "write"],
  24161. "additionalProperties": false
  24162. }
  24163. },
  24164. "required": ["input", "output", "reasoning", "cache"],
  24165. "additionalProperties": false
  24166. },
  24167. "snapshot": {
  24168. "type": "string"
  24169. }
  24170. },
  24171. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24172. "additionalProperties": false
  24173. }
  24174. },
  24175. "required": ["type", "id", "seq", "aggregateID", "data"],
  24176. "additionalProperties": false
  24177. }
  24178. },
  24179. "required": ["type", "id", "syncEvent"],
  24180. "additionalProperties": false
  24181. },
  24182. "SyncEventSessionNextStepFailed": {
  24183. "type": "object",
  24184. "properties": {
  24185. "type": {
  24186. "type": "string",
  24187. "enum": ["sync"]
  24188. },
  24189. "id": {
  24190. "type": "string",
  24191. "pattern": "^evt_"
  24192. },
  24193. "syncEvent": {
  24194. "type": "object",
  24195. "properties": {
  24196. "type": {
  24197. "type": "string",
  24198. "enum": ["session.next.step.failed.2"]
  24199. },
  24200. "id": {
  24201. "type": "string",
  24202. "pattern": "^evt_"
  24203. },
  24204. "seq": {
  24205. "type": "number"
  24206. },
  24207. "aggregateID": {
  24208. "type": "string"
  24209. },
  24210. "data": {
  24211. "type": "object",
  24212. "properties": {
  24213. "timestamp": {
  24214. "type": "number"
  24215. },
  24216. "sessionID": {
  24217. "type": "string",
  24218. "pattern": "^ses"
  24219. },
  24220. "assistantMessageID": {
  24221. "type": "string",
  24222. "pattern": "^msg_"
  24223. },
  24224. "error": {
  24225. "$ref": "#/components/schemas/SessionErrorUnknown"
  24226. }
  24227. },
  24228. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24229. "additionalProperties": false
  24230. }
  24231. },
  24232. "required": ["type", "id", "seq", "aggregateID", "data"],
  24233. "additionalProperties": false
  24234. }
  24235. },
  24236. "required": ["type", "id", "syncEvent"],
  24237. "additionalProperties": false
  24238. },
  24239. "SyncEventSessionNextTextStarted": {
  24240. "type": "object",
  24241. "properties": {
  24242. "type": {
  24243. "type": "string",
  24244. "enum": ["sync"]
  24245. },
  24246. "id": {
  24247. "type": "string",
  24248. "pattern": "^evt_"
  24249. },
  24250. "syncEvent": {
  24251. "type": "object",
  24252. "properties": {
  24253. "type": {
  24254. "type": "string",
  24255. "enum": ["session.next.text.started.1"]
  24256. },
  24257. "id": {
  24258. "type": "string",
  24259. "pattern": "^evt_"
  24260. },
  24261. "seq": {
  24262. "type": "number"
  24263. },
  24264. "aggregateID": {
  24265. "type": "string"
  24266. },
  24267. "data": {
  24268. "type": "object",
  24269. "properties": {
  24270. "timestamp": {
  24271. "type": "number"
  24272. },
  24273. "sessionID": {
  24274. "type": "string",
  24275. "pattern": "^ses"
  24276. },
  24277. "assistantMessageID": {
  24278. "type": "string",
  24279. "pattern": "^msg_"
  24280. },
  24281. "textID": {
  24282. "type": "string"
  24283. }
  24284. },
  24285. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24286. "additionalProperties": false
  24287. }
  24288. },
  24289. "required": ["type", "id", "seq", "aggregateID", "data"],
  24290. "additionalProperties": false
  24291. }
  24292. },
  24293. "required": ["type", "id", "syncEvent"],
  24294. "additionalProperties": false
  24295. },
  24296. "SyncEventSessionNextTextEnded": {
  24297. "type": "object",
  24298. "properties": {
  24299. "type": {
  24300. "type": "string",
  24301. "enum": ["sync"]
  24302. },
  24303. "id": {
  24304. "type": "string",
  24305. "pattern": "^evt_"
  24306. },
  24307. "syncEvent": {
  24308. "type": "object",
  24309. "properties": {
  24310. "type": {
  24311. "type": "string",
  24312. "enum": ["session.next.text.ended.1"]
  24313. },
  24314. "id": {
  24315. "type": "string",
  24316. "pattern": "^evt_"
  24317. },
  24318. "seq": {
  24319. "type": "number"
  24320. },
  24321. "aggregateID": {
  24322. "type": "string"
  24323. },
  24324. "data": {
  24325. "type": "object",
  24326. "properties": {
  24327. "timestamp": {
  24328. "type": "number"
  24329. },
  24330. "sessionID": {
  24331. "type": "string",
  24332. "pattern": "^ses"
  24333. },
  24334. "assistantMessageID": {
  24335. "type": "string",
  24336. "pattern": "^msg_"
  24337. },
  24338. "textID": {
  24339. "type": "string"
  24340. },
  24341. "text": {
  24342. "type": "string"
  24343. }
  24344. },
  24345. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24346. "additionalProperties": false
  24347. }
  24348. },
  24349. "required": ["type", "id", "seq", "aggregateID", "data"],
  24350. "additionalProperties": false
  24351. }
  24352. },
  24353. "required": ["type", "id", "syncEvent"],
  24354. "additionalProperties": false
  24355. },
  24356. "SyncEventSessionNextReasoningStarted": {
  24357. "type": "object",
  24358. "properties": {
  24359. "type": {
  24360. "type": "string",
  24361. "enum": ["sync"]
  24362. },
  24363. "id": {
  24364. "type": "string",
  24365. "pattern": "^evt_"
  24366. },
  24367. "syncEvent": {
  24368. "type": "object",
  24369. "properties": {
  24370. "type": {
  24371. "type": "string",
  24372. "enum": ["session.next.reasoning.started.1"]
  24373. },
  24374. "id": {
  24375. "type": "string",
  24376. "pattern": "^evt_"
  24377. },
  24378. "seq": {
  24379. "type": "number"
  24380. },
  24381. "aggregateID": {
  24382. "type": "string"
  24383. },
  24384. "data": {
  24385. "type": "object",
  24386. "properties": {
  24387. "timestamp": {
  24388. "type": "number"
  24389. },
  24390. "sessionID": {
  24391. "type": "string",
  24392. "pattern": "^ses"
  24393. },
  24394. "assistantMessageID": {
  24395. "type": "string",
  24396. "pattern": "^msg_"
  24397. },
  24398. "reasoningID": {
  24399. "type": "string"
  24400. },
  24401. "providerMetadata": {
  24402. "type": "object",
  24403. "additionalProperties": {
  24404. "type": "object"
  24405. }
  24406. }
  24407. },
  24408. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24409. "additionalProperties": false
  24410. }
  24411. },
  24412. "required": ["type", "id", "seq", "aggregateID", "data"],
  24413. "additionalProperties": false
  24414. }
  24415. },
  24416. "required": ["type", "id", "syncEvent"],
  24417. "additionalProperties": false
  24418. },
  24419. "SyncEventSessionNextReasoningEnded": {
  24420. "type": "object",
  24421. "properties": {
  24422. "type": {
  24423. "type": "string",
  24424. "enum": ["sync"]
  24425. },
  24426. "id": {
  24427. "type": "string",
  24428. "pattern": "^evt_"
  24429. },
  24430. "syncEvent": {
  24431. "type": "object",
  24432. "properties": {
  24433. "type": {
  24434. "type": "string",
  24435. "enum": ["session.next.reasoning.ended.1"]
  24436. },
  24437. "id": {
  24438. "type": "string",
  24439. "pattern": "^evt_"
  24440. },
  24441. "seq": {
  24442. "type": "number"
  24443. },
  24444. "aggregateID": {
  24445. "type": "string"
  24446. },
  24447. "data": {
  24448. "type": "object",
  24449. "properties": {
  24450. "timestamp": {
  24451. "type": "number"
  24452. },
  24453. "sessionID": {
  24454. "type": "string",
  24455. "pattern": "^ses"
  24456. },
  24457. "assistantMessageID": {
  24458. "type": "string",
  24459. "pattern": "^msg_"
  24460. },
  24461. "reasoningID": {
  24462. "type": "string"
  24463. },
  24464. "text": {
  24465. "type": "string"
  24466. },
  24467. "providerMetadata": {
  24468. "type": "object",
  24469. "additionalProperties": {
  24470. "type": "object"
  24471. }
  24472. }
  24473. },
  24474. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  24475. "additionalProperties": false
  24476. }
  24477. },
  24478. "required": ["type", "id", "seq", "aggregateID", "data"],
  24479. "additionalProperties": false
  24480. }
  24481. },
  24482. "required": ["type", "id", "syncEvent"],
  24483. "additionalProperties": false
  24484. },
  24485. "SyncEventSessionNextToolInputStarted": {
  24486. "type": "object",
  24487. "properties": {
  24488. "type": {
  24489. "type": "string",
  24490. "enum": ["sync"]
  24491. },
  24492. "id": {
  24493. "type": "string",
  24494. "pattern": "^evt_"
  24495. },
  24496. "syncEvent": {
  24497. "type": "object",
  24498. "properties": {
  24499. "type": {
  24500. "type": "string",
  24501. "enum": ["session.next.tool.input.started.1"]
  24502. },
  24503. "id": {
  24504. "type": "string",
  24505. "pattern": "^evt_"
  24506. },
  24507. "seq": {
  24508. "type": "number"
  24509. },
  24510. "aggregateID": {
  24511. "type": "string"
  24512. },
  24513. "data": {
  24514. "type": "object",
  24515. "properties": {
  24516. "timestamp": {
  24517. "type": "number"
  24518. },
  24519. "sessionID": {
  24520. "type": "string",
  24521. "pattern": "^ses"
  24522. },
  24523. "assistantMessageID": {
  24524. "type": "string",
  24525. "pattern": "^msg_"
  24526. },
  24527. "callID": {
  24528. "type": "string"
  24529. },
  24530. "name": {
  24531. "type": "string"
  24532. }
  24533. },
  24534. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  24535. "additionalProperties": false
  24536. }
  24537. },
  24538. "required": ["type", "id", "seq", "aggregateID", "data"],
  24539. "additionalProperties": false
  24540. }
  24541. },
  24542. "required": ["type", "id", "syncEvent"],
  24543. "additionalProperties": false
  24544. },
  24545. "SyncEventSessionNextToolInputEnded": {
  24546. "type": "object",
  24547. "properties": {
  24548. "type": {
  24549. "type": "string",
  24550. "enum": ["sync"]
  24551. },
  24552. "id": {
  24553. "type": "string",
  24554. "pattern": "^evt_"
  24555. },
  24556. "syncEvent": {
  24557. "type": "object",
  24558. "properties": {
  24559. "type": {
  24560. "type": "string",
  24561. "enum": ["session.next.tool.input.ended.1"]
  24562. },
  24563. "id": {
  24564. "type": "string",
  24565. "pattern": "^evt_"
  24566. },
  24567. "seq": {
  24568. "type": "number"
  24569. },
  24570. "aggregateID": {
  24571. "type": "string"
  24572. },
  24573. "data": {
  24574. "type": "object",
  24575. "properties": {
  24576. "timestamp": {
  24577. "type": "number"
  24578. },
  24579. "sessionID": {
  24580. "type": "string",
  24581. "pattern": "^ses"
  24582. },
  24583. "assistantMessageID": {
  24584. "type": "string",
  24585. "pattern": "^msg_"
  24586. },
  24587. "callID": {
  24588. "type": "string"
  24589. },
  24590. "text": {
  24591. "type": "string"
  24592. }
  24593. },
  24594. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  24595. "additionalProperties": false
  24596. }
  24597. },
  24598. "required": ["type", "id", "seq", "aggregateID", "data"],
  24599. "additionalProperties": false
  24600. }
  24601. },
  24602. "required": ["type", "id", "syncEvent"],
  24603. "additionalProperties": false
  24604. },
  24605. "SyncEventSessionNextToolCalled": {
  24606. "type": "object",
  24607. "properties": {
  24608. "type": {
  24609. "type": "string",
  24610. "enum": ["sync"]
  24611. },
  24612. "id": {
  24613. "type": "string",
  24614. "pattern": "^evt_"
  24615. },
  24616. "syncEvent": {
  24617. "type": "object",
  24618. "properties": {
  24619. "type": {
  24620. "type": "string",
  24621. "enum": ["session.next.tool.called.1"]
  24622. },
  24623. "id": {
  24624. "type": "string",
  24625. "pattern": "^evt_"
  24626. },
  24627. "seq": {
  24628. "type": "number"
  24629. },
  24630. "aggregateID": {
  24631. "type": "string"
  24632. },
  24633. "data": {
  24634. "type": "object",
  24635. "properties": {
  24636. "timestamp": {
  24637. "type": "number"
  24638. },
  24639. "sessionID": {
  24640. "type": "string",
  24641. "pattern": "^ses"
  24642. },
  24643. "assistantMessageID": {
  24644. "type": "string",
  24645. "pattern": "^msg_"
  24646. },
  24647. "callID": {
  24648. "type": "string"
  24649. },
  24650. "tool": {
  24651. "type": "string"
  24652. },
  24653. "input": {
  24654. "type": "object"
  24655. },
  24656. "provider": {
  24657. "type": "object",
  24658. "properties": {
  24659. "executed": {
  24660. "type": "boolean"
  24661. },
  24662. "metadata": {
  24663. "type": "object",
  24664. "additionalProperties": {
  24665. "type": "object"
  24666. }
  24667. }
  24668. },
  24669. "required": ["executed"],
  24670. "additionalProperties": false
  24671. }
  24672. },
  24673. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  24674. "additionalProperties": false
  24675. }
  24676. },
  24677. "required": ["type", "id", "seq", "aggregateID", "data"],
  24678. "additionalProperties": false
  24679. }
  24680. },
  24681. "required": ["type", "id", "syncEvent"],
  24682. "additionalProperties": false
  24683. },
  24684. "SyncEventSessionNextToolProgress": {
  24685. "type": "object",
  24686. "properties": {
  24687. "type": {
  24688. "type": "string",
  24689. "enum": ["sync"]
  24690. },
  24691. "id": {
  24692. "type": "string",
  24693. "pattern": "^evt_"
  24694. },
  24695. "syncEvent": {
  24696. "type": "object",
  24697. "properties": {
  24698. "type": {
  24699. "type": "string",
  24700. "enum": ["session.next.tool.progress.1"]
  24701. },
  24702. "id": {
  24703. "type": "string",
  24704. "pattern": "^evt_"
  24705. },
  24706. "seq": {
  24707. "type": "number"
  24708. },
  24709. "aggregateID": {
  24710. "type": "string"
  24711. },
  24712. "data": {
  24713. "type": "object",
  24714. "properties": {
  24715. "timestamp": {
  24716. "type": "number"
  24717. },
  24718. "sessionID": {
  24719. "type": "string",
  24720. "pattern": "^ses"
  24721. },
  24722. "assistantMessageID": {
  24723. "type": "string",
  24724. "pattern": "^msg_"
  24725. },
  24726. "callID": {
  24727. "type": "string"
  24728. },
  24729. "structured": {
  24730. "type": "object"
  24731. },
  24732. "content": {
  24733. "type": "array",
  24734. "items": {
  24735. "anyOf": [
  24736. {
  24737. "$ref": "#/components/schemas/ToolTextContent"
  24738. },
  24739. {
  24740. "$ref": "#/components/schemas/ToolFileContent"
  24741. }
  24742. ]
  24743. }
  24744. }
  24745. },
  24746. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  24747. "additionalProperties": false
  24748. }
  24749. },
  24750. "required": ["type", "id", "seq", "aggregateID", "data"],
  24751. "additionalProperties": false
  24752. }
  24753. },
  24754. "required": ["type", "id", "syncEvent"],
  24755. "additionalProperties": false
  24756. },
  24757. "SyncEventSessionNextToolSuccess": {
  24758. "type": "object",
  24759. "properties": {
  24760. "type": {
  24761. "type": "string",
  24762. "enum": ["sync"]
  24763. },
  24764. "id": {
  24765. "type": "string",
  24766. "pattern": "^evt_"
  24767. },
  24768. "syncEvent": {
  24769. "type": "object",
  24770. "properties": {
  24771. "type": {
  24772. "type": "string",
  24773. "enum": ["session.next.tool.success.1"]
  24774. },
  24775. "id": {
  24776. "type": "string",
  24777. "pattern": "^evt_"
  24778. },
  24779. "seq": {
  24780. "type": "number"
  24781. },
  24782. "aggregateID": {
  24783. "type": "string"
  24784. },
  24785. "data": {
  24786. "type": "object",
  24787. "properties": {
  24788. "timestamp": {
  24789. "type": "number"
  24790. },
  24791. "sessionID": {
  24792. "type": "string",
  24793. "pattern": "^ses"
  24794. },
  24795. "assistantMessageID": {
  24796. "type": "string",
  24797. "pattern": "^msg_"
  24798. },
  24799. "callID": {
  24800. "type": "string"
  24801. },
  24802. "structured": {
  24803. "type": "object"
  24804. },
  24805. "content": {
  24806. "type": "array",
  24807. "items": {
  24808. "anyOf": [
  24809. {
  24810. "$ref": "#/components/schemas/ToolTextContent"
  24811. },
  24812. {
  24813. "$ref": "#/components/schemas/ToolFileContent"
  24814. }
  24815. ]
  24816. }
  24817. },
  24818. "outputPaths": {
  24819. "type": "array",
  24820. "items": {
  24821. "type": "string"
  24822. }
  24823. },
  24824. "result": {},
  24825. "provider": {
  24826. "type": "object",
  24827. "properties": {
  24828. "executed": {
  24829. "type": "boolean"
  24830. },
  24831. "metadata": {
  24832. "type": "object",
  24833. "additionalProperties": {
  24834. "type": "object"
  24835. }
  24836. }
  24837. },
  24838. "required": ["executed"],
  24839. "additionalProperties": false
  24840. }
  24841. },
  24842. "required": [
  24843. "timestamp",
  24844. "sessionID",
  24845. "assistantMessageID",
  24846. "callID",
  24847. "structured",
  24848. "content",
  24849. "provider"
  24850. ],
  24851. "additionalProperties": false
  24852. }
  24853. },
  24854. "required": ["type", "id", "seq", "aggregateID", "data"],
  24855. "additionalProperties": false
  24856. }
  24857. },
  24858. "required": ["type", "id", "syncEvent"],
  24859. "additionalProperties": false
  24860. },
  24861. "SyncEventSessionNextToolFailed": {
  24862. "type": "object",
  24863. "properties": {
  24864. "type": {
  24865. "type": "string",
  24866. "enum": ["sync"]
  24867. },
  24868. "id": {
  24869. "type": "string",
  24870. "pattern": "^evt_"
  24871. },
  24872. "syncEvent": {
  24873. "type": "object",
  24874. "properties": {
  24875. "type": {
  24876. "type": "string",
  24877. "enum": ["session.next.tool.failed.1"]
  24878. },
  24879. "id": {
  24880. "type": "string",
  24881. "pattern": "^evt_"
  24882. },
  24883. "seq": {
  24884. "type": "number"
  24885. },
  24886. "aggregateID": {
  24887. "type": "string"
  24888. },
  24889. "data": {
  24890. "type": "object",
  24891. "properties": {
  24892. "timestamp": {
  24893. "type": "number"
  24894. },
  24895. "sessionID": {
  24896. "type": "string",
  24897. "pattern": "^ses"
  24898. },
  24899. "assistantMessageID": {
  24900. "type": "string",
  24901. "pattern": "^msg_"
  24902. },
  24903. "callID": {
  24904. "type": "string"
  24905. },
  24906. "error": {
  24907. "$ref": "#/components/schemas/SessionErrorUnknown"
  24908. },
  24909. "result": {},
  24910. "provider": {
  24911. "type": "object",
  24912. "properties": {
  24913. "executed": {
  24914. "type": "boolean"
  24915. },
  24916. "metadata": {
  24917. "type": "object",
  24918. "additionalProperties": {
  24919. "type": "object"
  24920. }
  24921. }
  24922. },
  24923. "required": ["executed"],
  24924. "additionalProperties": false
  24925. }
  24926. },
  24927. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  24928. "additionalProperties": false
  24929. }
  24930. },
  24931. "required": ["type", "id", "seq", "aggregateID", "data"],
  24932. "additionalProperties": false
  24933. }
  24934. },
  24935. "required": ["type", "id", "syncEvent"],
  24936. "additionalProperties": false
  24937. },
  24938. "SyncEventSessionNextRetried": {
  24939. "type": "object",
  24940. "properties": {
  24941. "type": {
  24942. "type": "string",
  24943. "enum": ["sync"]
  24944. },
  24945. "id": {
  24946. "type": "string",
  24947. "pattern": "^evt_"
  24948. },
  24949. "syncEvent": {
  24950. "type": "object",
  24951. "properties": {
  24952. "type": {
  24953. "type": "string",
  24954. "enum": ["session.next.retried.1"]
  24955. },
  24956. "id": {
  24957. "type": "string",
  24958. "pattern": "^evt_"
  24959. },
  24960. "seq": {
  24961. "type": "number"
  24962. },
  24963. "aggregateID": {
  24964. "type": "string"
  24965. },
  24966. "data": {
  24967. "type": "object",
  24968. "properties": {
  24969. "timestamp": {
  24970. "type": "number"
  24971. },
  24972. "sessionID": {
  24973. "type": "string",
  24974. "pattern": "^ses"
  24975. },
  24976. "attempt": {
  24977. "type": "number"
  24978. },
  24979. "error": {
  24980. "$ref": "#/components/schemas/SessionNextRetry_error"
  24981. }
  24982. },
  24983. "required": ["timestamp", "sessionID", "attempt", "error"],
  24984. "additionalProperties": false
  24985. }
  24986. },
  24987. "required": ["type", "id", "seq", "aggregateID", "data"],
  24988. "additionalProperties": false
  24989. }
  24990. },
  24991. "required": ["type", "id", "syncEvent"],
  24992. "additionalProperties": false
  24993. },
  24994. "SyncEventSessionNextCompactionStarted": {
  24995. "type": "object",
  24996. "properties": {
  24997. "type": {
  24998. "type": "string",
  24999. "enum": ["sync"]
  25000. },
  25001. "id": {
  25002. "type": "string",
  25003. "pattern": "^evt_"
  25004. },
  25005. "syncEvent": {
  25006. "type": "object",
  25007. "properties": {
  25008. "type": {
  25009. "type": "string",
  25010. "enum": ["session.next.compaction.started.1"]
  25011. },
  25012. "id": {
  25013. "type": "string",
  25014. "pattern": "^evt_"
  25015. },
  25016. "seq": {
  25017. "type": "number"
  25018. },
  25019. "aggregateID": {
  25020. "type": "string"
  25021. },
  25022. "data": {
  25023. "type": "object",
  25024. "properties": {
  25025. "timestamp": {
  25026. "type": "number"
  25027. },
  25028. "sessionID": {
  25029. "type": "string",
  25030. "pattern": "^ses"
  25031. },
  25032. "messageID": {
  25033. "type": "string",
  25034. "pattern": "^msg_"
  25035. },
  25036. "reason": {
  25037. "type": "string",
  25038. "enum": ["auto", "manual"]
  25039. }
  25040. },
  25041. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25042. "additionalProperties": false
  25043. }
  25044. },
  25045. "required": ["type", "id", "seq", "aggregateID", "data"],
  25046. "additionalProperties": false
  25047. }
  25048. },
  25049. "required": ["type", "id", "syncEvent"],
  25050. "additionalProperties": false
  25051. },
  25052. "SyncEventSessionNextCompactionEnded": {
  25053. "type": "object",
  25054. "properties": {
  25055. "type": {
  25056. "type": "string",
  25057. "enum": ["sync"]
  25058. },
  25059. "id": {
  25060. "type": "string",
  25061. "pattern": "^evt_"
  25062. },
  25063. "syncEvent": {
  25064. "type": "object",
  25065. "properties": {
  25066. "type": {
  25067. "type": "string",
  25068. "enum": ["session.next.compaction.ended.2"]
  25069. },
  25070. "id": {
  25071. "type": "string",
  25072. "pattern": "^evt_"
  25073. },
  25074. "seq": {
  25075. "type": "number"
  25076. },
  25077. "aggregateID": {
  25078. "type": "string"
  25079. },
  25080. "data": {
  25081. "type": "object",
  25082. "properties": {
  25083. "timestamp": {
  25084. "type": "number"
  25085. },
  25086. "sessionID": {
  25087. "type": "string",
  25088. "pattern": "^ses"
  25089. },
  25090. "messageID": {
  25091. "type": "string",
  25092. "pattern": "^msg_"
  25093. },
  25094. "reason": {
  25095. "type": "string",
  25096. "enum": ["auto", "manual"]
  25097. },
  25098. "text": {
  25099. "type": "string"
  25100. },
  25101. "recent": {
  25102. "type": "string"
  25103. }
  25104. },
  25105. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25106. "additionalProperties": false
  25107. }
  25108. },
  25109. "required": ["type", "id", "seq", "aggregateID", "data"],
  25110. "additionalProperties": false
  25111. }
  25112. },
  25113. "required": ["type", "id", "syncEvent"],
  25114. "additionalProperties": false
  25115. },
  25116. "ConfigV2ReferenceGit": {
  25117. "type": "object",
  25118. "properties": {
  25119. "repository": {
  25120. "type": "string"
  25121. },
  25122. "branch": {
  25123. "type": "string"
  25124. },
  25125. "description": {
  25126. "type": "string"
  25127. },
  25128. "hidden": {
  25129. "type": "boolean"
  25130. }
  25131. },
  25132. "required": ["repository"],
  25133. "additionalProperties": false
  25134. },
  25135. "ConfigV2ReferenceLocal": {
  25136. "type": "object",
  25137. "properties": {
  25138. "path": {
  25139. "type": "string"
  25140. },
  25141. "description": {
  25142. "type": "string"
  25143. },
  25144. "hidden": {
  25145. "type": "boolean"
  25146. }
  25147. },
  25148. "required": ["path"],
  25149. "additionalProperties": false
  25150. },
  25151. "PolicyEffect": {
  25152. "type": "string",
  25153. "enum": ["allow", "deny"]
  25154. },
  25155. "ConfigV2ExperimentalPolicy": {
  25156. "type": "object",
  25157. "properties": {
  25158. "action": {
  25159. "type": "string",
  25160. "enum": ["provider.use"]
  25161. },
  25162. "effect": {
  25163. "$ref": "#/components/schemas/PolicyEffect"
  25164. },
  25165. "resource": {
  25166. "type": "string"
  25167. }
  25168. },
  25169. "required": ["action", "effect", "resource"],
  25170. "additionalProperties": false
  25171. },
  25172. "ProjectDirectories": {
  25173. "type": "array",
  25174. "items": {
  25175. "type": "object",
  25176. "properties": {
  25177. "directory": {
  25178. "type": "string"
  25179. },
  25180. "type": {
  25181. "type": "string",
  25182. "enum": ["main", "root", "git_worktree"]
  25183. }
  25184. },
  25185. "required": ["directory", "type"],
  25186. "additionalProperties": false
  25187. }
  25188. },
  25189. "ProjectCopyCopy": {
  25190. "type": "object",
  25191. "properties": {
  25192. "directory": {
  25193. "type": "string"
  25194. }
  25195. },
  25196. "required": ["directory"],
  25197. "additionalProperties": false
  25198. },
  25199. "LocationInfo": {
  25200. "type": "object",
  25201. "properties": {
  25202. "directory": {
  25203. "type": "string"
  25204. },
  25205. "workspaceID": {
  25206. "type": "string",
  25207. "pattern": "^wrk"
  25208. },
  25209. "project": {
  25210. "type": "object",
  25211. "properties": {
  25212. "id": {
  25213. "type": "string"
  25214. },
  25215. "directory": {
  25216. "type": "string"
  25217. }
  25218. },
  25219. "required": ["id", "directory"],
  25220. "additionalProperties": false
  25221. }
  25222. },
  25223. "required": ["directory", "project"],
  25224. "additionalProperties": false
  25225. },
  25226. "PermissionV2Effect": {
  25227. "type": "string",
  25228. "enum": ["allow", "deny", "ask"]
  25229. },
  25230. "PermissionV2Rule": {
  25231. "type": "object",
  25232. "properties": {
  25233. "action": {
  25234. "type": "string"
  25235. },
  25236. "resource": {
  25237. "type": "string"
  25238. },
  25239. "effect": {
  25240. "$ref": "#/components/schemas/PermissionV2Effect"
  25241. }
  25242. },
  25243. "required": ["action", "resource", "effect"],
  25244. "additionalProperties": false
  25245. },
  25246. "PermissionV2Ruleset": {
  25247. "type": "array",
  25248. "items": {
  25249. "$ref": "#/components/schemas/PermissionV2Rule"
  25250. }
  25251. },
  25252. "AgentV2Info": {
  25253. "type": "object",
  25254. "properties": {
  25255. "id": {
  25256. "type": "string"
  25257. },
  25258. "model": {
  25259. "type": "object",
  25260. "properties": {
  25261. "id": {
  25262. "type": "string"
  25263. },
  25264. "providerID": {
  25265. "type": "string"
  25266. },
  25267. "variant": {
  25268. "type": "string"
  25269. }
  25270. },
  25271. "required": ["id", "providerID"],
  25272. "additionalProperties": false
  25273. },
  25274. "request": {
  25275. "type": "object",
  25276. "properties": {
  25277. "headers": {
  25278. "type": "object",
  25279. "additionalProperties": {
  25280. "type": "string"
  25281. }
  25282. },
  25283. "body": {
  25284. "type": "object"
  25285. }
  25286. },
  25287. "required": ["headers", "body"],
  25288. "additionalProperties": false
  25289. },
  25290. "system": {
  25291. "type": "string"
  25292. },
  25293. "description": {
  25294. "type": "string"
  25295. },
  25296. "mode": {
  25297. "type": "string",
  25298. "enum": ["subagent", "primary", "all"]
  25299. },
  25300. "hidden": {
  25301. "type": "boolean"
  25302. },
  25303. "color": {
  25304. "anyOf": [
  25305. {
  25306. "type": "string",
  25307. "pattern": "^#[0-9a-fA-F]{6}$"
  25308. },
  25309. {
  25310. "type": "string",
  25311. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25312. }
  25313. ]
  25314. },
  25315. "steps": {
  25316. "type": "integer",
  25317. "exclusiveMinimum": 0
  25318. },
  25319. "permissions": {
  25320. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25321. }
  25322. },
  25323. "required": ["id", "request", "mode", "hidden", "permissions"],
  25324. "additionalProperties": false
  25325. },
  25326. "SessionV2Info": {
  25327. "type": "object",
  25328. "properties": {
  25329. "id": {
  25330. "type": "string",
  25331. "pattern": "^ses"
  25332. },
  25333. "parentID": {
  25334. "type": "string",
  25335. "pattern": "^ses"
  25336. },
  25337. "projectID": {
  25338. "type": "string"
  25339. },
  25340. "agent": {
  25341. "type": "string"
  25342. },
  25343. "model": {
  25344. "type": "object",
  25345. "properties": {
  25346. "id": {
  25347. "type": "string"
  25348. },
  25349. "providerID": {
  25350. "type": "string"
  25351. },
  25352. "variant": {
  25353. "type": "string"
  25354. }
  25355. },
  25356. "required": ["id", "providerID"],
  25357. "additionalProperties": false
  25358. },
  25359. "cost": {
  25360. "type": "number"
  25361. },
  25362. "tokens": {
  25363. "type": "object",
  25364. "properties": {
  25365. "input": {
  25366. "type": "number"
  25367. },
  25368. "output": {
  25369. "type": "number"
  25370. },
  25371. "reasoning": {
  25372. "type": "number"
  25373. },
  25374. "cache": {
  25375. "type": "object",
  25376. "properties": {
  25377. "read": {
  25378. "type": "number"
  25379. },
  25380. "write": {
  25381. "type": "number"
  25382. }
  25383. },
  25384. "required": ["read", "write"],
  25385. "additionalProperties": false
  25386. }
  25387. },
  25388. "required": ["input", "output", "reasoning", "cache"],
  25389. "additionalProperties": false
  25390. },
  25391. "time": {
  25392. "type": "object",
  25393. "properties": {
  25394. "created": {
  25395. "type": "number"
  25396. },
  25397. "updated": {
  25398. "type": "number"
  25399. },
  25400. "archived": {
  25401. "type": "number"
  25402. }
  25403. },
  25404. "required": ["created", "updated"],
  25405. "additionalProperties": false
  25406. },
  25407. "title": {
  25408. "type": "string"
  25409. },
  25410. "location": {
  25411. "$ref": "#/components/schemas/LocationRef"
  25412. },
  25413. "subpath": {
  25414. "type": "string"
  25415. }
  25416. },
  25417. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25418. "additionalProperties": false
  25419. },
  25420. "SessionInputAdmitted": {
  25421. "type": "object",
  25422. "properties": {
  25423. "admittedSeq": {
  25424. "type": "integer",
  25425. "minimum": 0
  25426. },
  25427. "id": {
  25428. "type": "string",
  25429. "pattern": "^msg_"
  25430. },
  25431. "sessionID": {
  25432. "type": "string",
  25433. "pattern": "^ses"
  25434. },
  25435. "prompt": {
  25436. "$ref": "#/components/schemas/Prompt"
  25437. },
  25438. "delivery": {
  25439. "type": "string",
  25440. "enum": ["steer", "queue"]
  25441. },
  25442. "timeCreated": {
  25443. "type": "number"
  25444. },
  25445. "promotedSeq": {
  25446. "type": "integer",
  25447. "minimum": 0
  25448. }
  25449. },
  25450. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  25451. "additionalProperties": false
  25452. },
  25453. "SessionMessageAgentSwitched": {
  25454. "type": "object",
  25455. "properties": {
  25456. "id": {
  25457. "type": "string",
  25458. "pattern": "^msg_"
  25459. },
  25460. "metadata": {
  25461. "type": "object"
  25462. },
  25463. "time": {
  25464. "type": "object",
  25465. "properties": {
  25466. "created": {
  25467. "type": "number"
  25468. }
  25469. },
  25470. "required": ["created"],
  25471. "additionalProperties": false
  25472. },
  25473. "type": {
  25474. "type": "string",
  25475. "enum": ["agent-switched"]
  25476. },
  25477. "agent": {
  25478. "type": "string"
  25479. }
  25480. },
  25481. "required": ["id", "time", "type", "agent"],
  25482. "additionalProperties": false
  25483. },
  25484. "SessionMessageModelSwitched": {
  25485. "type": "object",
  25486. "properties": {
  25487. "id": {
  25488. "type": "string",
  25489. "pattern": "^msg_"
  25490. },
  25491. "metadata": {
  25492. "type": "object"
  25493. },
  25494. "time": {
  25495. "type": "object",
  25496. "properties": {
  25497. "created": {
  25498. "type": "number"
  25499. }
  25500. },
  25501. "required": ["created"],
  25502. "additionalProperties": false
  25503. },
  25504. "type": {
  25505. "type": "string",
  25506. "enum": ["model-switched"]
  25507. },
  25508. "model": {
  25509. "type": "object",
  25510. "properties": {
  25511. "id": {
  25512. "type": "string"
  25513. },
  25514. "providerID": {
  25515. "type": "string"
  25516. },
  25517. "variant": {
  25518. "type": "string"
  25519. }
  25520. },
  25521. "required": ["id", "providerID"],
  25522. "additionalProperties": false
  25523. }
  25524. },
  25525. "required": ["id", "time", "type", "model"],
  25526. "additionalProperties": false
  25527. },
  25528. "SessionMessageUser": {
  25529. "type": "object",
  25530. "properties": {
  25531. "id": {
  25532. "type": "string",
  25533. "pattern": "^msg_"
  25534. },
  25535. "metadata": {
  25536. "type": "object"
  25537. },
  25538. "time": {
  25539. "type": "object",
  25540. "properties": {
  25541. "created": {
  25542. "type": "number"
  25543. }
  25544. },
  25545. "required": ["created"],
  25546. "additionalProperties": false
  25547. },
  25548. "text": {
  25549. "type": "string"
  25550. },
  25551. "files": {
  25552. "type": "array",
  25553. "items": {
  25554. "$ref": "#/components/schemas/PromptFileAttachment"
  25555. }
  25556. },
  25557. "agents": {
  25558. "type": "array",
  25559. "items": {
  25560. "$ref": "#/components/schemas/PromptAgentAttachment"
  25561. }
  25562. },
  25563. "type": {
  25564. "type": "string",
  25565. "enum": ["user"]
  25566. }
  25567. },
  25568. "required": ["id", "time", "text", "type"],
  25569. "additionalProperties": false
  25570. },
  25571. "SessionMessageSynthetic": {
  25572. "type": "object",
  25573. "properties": {
  25574. "id": {
  25575. "type": "string",
  25576. "pattern": "^msg_"
  25577. },
  25578. "metadata": {
  25579. "type": "object"
  25580. },
  25581. "time": {
  25582. "type": "object",
  25583. "properties": {
  25584. "created": {
  25585. "type": "number"
  25586. }
  25587. },
  25588. "required": ["created"],
  25589. "additionalProperties": false
  25590. },
  25591. "sessionID": {
  25592. "type": "string",
  25593. "pattern": "^ses"
  25594. },
  25595. "text": {
  25596. "type": "string"
  25597. },
  25598. "type": {
  25599. "type": "string",
  25600. "enum": ["synthetic"]
  25601. }
  25602. },
  25603. "required": ["id", "time", "sessionID", "text", "type"],
  25604. "additionalProperties": false
  25605. },
  25606. "SessionMessageSystem": {
  25607. "type": "object",
  25608. "properties": {
  25609. "id": {
  25610. "type": "string",
  25611. "pattern": "^msg_"
  25612. },
  25613. "metadata": {
  25614. "type": "object"
  25615. },
  25616. "time": {
  25617. "type": "object",
  25618. "properties": {
  25619. "created": {
  25620. "type": "number"
  25621. }
  25622. },
  25623. "required": ["created"],
  25624. "additionalProperties": false
  25625. },
  25626. "type": {
  25627. "type": "string",
  25628. "enum": ["system"]
  25629. },
  25630. "text": {
  25631. "type": "string"
  25632. }
  25633. },
  25634. "required": ["id", "time", "type", "text"],
  25635. "additionalProperties": false
  25636. },
  25637. "SessionMessageShell": {
  25638. "type": "object",
  25639. "properties": {
  25640. "id": {
  25641. "type": "string",
  25642. "pattern": "^msg_"
  25643. },
  25644. "metadata": {
  25645. "type": "object"
  25646. },
  25647. "time": {
  25648. "type": "object",
  25649. "properties": {
  25650. "created": {
  25651. "type": "number"
  25652. },
  25653. "completed": {
  25654. "type": "number"
  25655. }
  25656. },
  25657. "required": ["created"],
  25658. "additionalProperties": false
  25659. },
  25660. "type": {
  25661. "type": "string",
  25662. "enum": ["shell"]
  25663. },
  25664. "callID": {
  25665. "type": "string"
  25666. },
  25667. "command": {
  25668. "type": "string"
  25669. },
  25670. "output": {
  25671. "type": "string"
  25672. }
  25673. },
  25674. "required": ["id", "time", "type", "callID", "command", "output"],
  25675. "additionalProperties": false
  25676. },
  25677. "SessionMessageAssistantText": {
  25678. "type": "object",
  25679. "properties": {
  25680. "type": {
  25681. "type": "string",
  25682. "enum": ["text"]
  25683. },
  25684. "id": {
  25685. "type": "string"
  25686. },
  25687. "text": {
  25688. "type": "string"
  25689. }
  25690. },
  25691. "required": ["type", "id", "text"],
  25692. "additionalProperties": false
  25693. },
  25694. "SessionMessageAssistantReasoning": {
  25695. "type": "object",
  25696. "properties": {
  25697. "type": {
  25698. "type": "string",
  25699. "enum": ["reasoning"]
  25700. },
  25701. "id": {
  25702. "type": "string"
  25703. },
  25704. "text": {
  25705. "type": "string"
  25706. },
  25707. "providerMetadata": {
  25708. "type": "object",
  25709. "additionalProperties": {
  25710. "type": "object"
  25711. }
  25712. }
  25713. },
  25714. "required": ["type", "id", "text"],
  25715. "additionalProperties": false
  25716. },
  25717. "SessionMessageToolStatePending": {
  25718. "type": "object",
  25719. "properties": {
  25720. "status": {
  25721. "type": "string",
  25722. "enum": ["pending"]
  25723. },
  25724. "input": {
  25725. "type": "string"
  25726. }
  25727. },
  25728. "required": ["status", "input"],
  25729. "additionalProperties": false
  25730. },
  25731. "SessionMessageToolStateRunning": {
  25732. "type": "object",
  25733. "properties": {
  25734. "status": {
  25735. "type": "string",
  25736. "enum": ["running"]
  25737. },
  25738. "input": {
  25739. "type": "object"
  25740. },
  25741. "structured": {
  25742. "type": "object"
  25743. },
  25744. "content": {
  25745. "type": "array",
  25746. "items": {
  25747. "anyOf": [
  25748. {
  25749. "$ref": "#/components/schemas/ToolTextContent"
  25750. },
  25751. {
  25752. "$ref": "#/components/schemas/ToolFileContent"
  25753. }
  25754. ]
  25755. }
  25756. }
  25757. },
  25758. "required": ["status", "input", "structured", "content"],
  25759. "additionalProperties": false
  25760. },
  25761. "SessionMessageToolStateCompleted": {
  25762. "type": "object",
  25763. "properties": {
  25764. "status": {
  25765. "type": "string",
  25766. "enum": ["completed"]
  25767. },
  25768. "input": {
  25769. "type": "object"
  25770. },
  25771. "attachments": {
  25772. "type": "array",
  25773. "items": {
  25774. "$ref": "#/components/schemas/PromptFileAttachment"
  25775. }
  25776. },
  25777. "content": {
  25778. "type": "array",
  25779. "items": {
  25780. "anyOf": [
  25781. {
  25782. "$ref": "#/components/schemas/ToolTextContent"
  25783. },
  25784. {
  25785. "$ref": "#/components/schemas/ToolFileContent"
  25786. }
  25787. ]
  25788. }
  25789. },
  25790. "outputPaths": {
  25791. "type": "array",
  25792. "items": {
  25793. "type": "string"
  25794. }
  25795. },
  25796. "structured": {
  25797. "type": "object"
  25798. },
  25799. "result": {}
  25800. },
  25801. "required": ["status", "input", "content", "structured"],
  25802. "additionalProperties": false
  25803. },
  25804. "SessionMessageToolStateError": {
  25805. "type": "object",
  25806. "properties": {
  25807. "status": {
  25808. "type": "string",
  25809. "enum": ["error"]
  25810. },
  25811. "input": {
  25812. "type": "object"
  25813. },
  25814. "content": {
  25815. "type": "array",
  25816. "items": {
  25817. "anyOf": [
  25818. {
  25819. "$ref": "#/components/schemas/ToolTextContent"
  25820. },
  25821. {
  25822. "$ref": "#/components/schemas/ToolFileContent"
  25823. }
  25824. ]
  25825. }
  25826. },
  25827. "structured": {
  25828. "type": "object"
  25829. },
  25830. "error": {
  25831. "$ref": "#/components/schemas/SessionErrorUnknown"
  25832. },
  25833. "result": {}
  25834. },
  25835. "required": ["status", "input", "content", "structured", "error"],
  25836. "additionalProperties": false
  25837. },
  25838. "SessionMessageAssistantTool": {
  25839. "type": "object",
  25840. "properties": {
  25841. "type": {
  25842. "type": "string",
  25843. "enum": ["tool"]
  25844. },
  25845. "id": {
  25846. "type": "string"
  25847. },
  25848. "name": {
  25849. "type": "string"
  25850. },
  25851. "provider": {
  25852. "type": "object",
  25853. "properties": {
  25854. "executed": {
  25855. "type": "boolean"
  25856. },
  25857. "metadata": {
  25858. "type": "object",
  25859. "additionalProperties": {
  25860. "type": "object"
  25861. }
  25862. },
  25863. "resultMetadata": {
  25864. "type": "object",
  25865. "additionalProperties": {
  25866. "type": "object"
  25867. }
  25868. }
  25869. },
  25870. "required": ["executed"],
  25871. "additionalProperties": false
  25872. },
  25873. "state": {
  25874. "anyOf": [
  25875. {
  25876. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  25877. },
  25878. {
  25879. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  25880. },
  25881. {
  25882. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  25883. },
  25884. {
  25885. "$ref": "#/components/schemas/SessionMessageToolStateError"
  25886. }
  25887. ]
  25888. },
  25889. "time": {
  25890. "type": "object",
  25891. "properties": {
  25892. "created": {
  25893. "type": "number"
  25894. },
  25895. "ran": {
  25896. "type": "number"
  25897. },
  25898. "completed": {
  25899. "type": "number"
  25900. },
  25901. "pruned": {
  25902. "type": "number"
  25903. }
  25904. },
  25905. "required": ["created"],
  25906. "additionalProperties": false
  25907. }
  25908. },
  25909. "required": ["type", "id", "name", "state", "time"],
  25910. "additionalProperties": false
  25911. },
  25912. "SessionMessageAssistant": {
  25913. "type": "object",
  25914. "properties": {
  25915. "id": {
  25916. "type": "string",
  25917. "pattern": "^msg_"
  25918. },
  25919. "metadata": {
  25920. "type": "object"
  25921. },
  25922. "time": {
  25923. "type": "object",
  25924. "properties": {
  25925. "created": {
  25926. "type": "number"
  25927. },
  25928. "completed": {
  25929. "type": "number"
  25930. }
  25931. },
  25932. "required": ["created"],
  25933. "additionalProperties": false
  25934. },
  25935. "type": {
  25936. "type": "string",
  25937. "enum": ["assistant"]
  25938. },
  25939. "agent": {
  25940. "type": "string"
  25941. },
  25942. "model": {
  25943. "type": "object",
  25944. "properties": {
  25945. "id": {
  25946. "type": "string"
  25947. },
  25948. "providerID": {
  25949. "type": "string"
  25950. },
  25951. "variant": {
  25952. "type": "string"
  25953. }
  25954. },
  25955. "required": ["id", "providerID"],
  25956. "additionalProperties": false
  25957. },
  25958. "content": {
  25959. "type": "array",
  25960. "items": {
  25961. "anyOf": [
  25962. {
  25963. "$ref": "#/components/schemas/SessionMessageAssistantText"
  25964. },
  25965. {
  25966. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  25967. },
  25968. {
  25969. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  25970. }
  25971. ]
  25972. }
  25973. },
  25974. "snapshot": {
  25975. "type": "object",
  25976. "properties": {
  25977. "start": {
  25978. "type": "string"
  25979. },
  25980. "end": {
  25981. "type": "string"
  25982. }
  25983. },
  25984. "additionalProperties": false
  25985. },
  25986. "finish": {
  25987. "type": "string"
  25988. },
  25989. "cost": {
  25990. "type": "number"
  25991. },
  25992. "tokens": {
  25993. "type": "object",
  25994. "properties": {
  25995. "input": {
  25996. "type": "number"
  25997. },
  25998. "output": {
  25999. "type": "number"
  26000. },
  26001. "reasoning": {
  26002. "type": "number"
  26003. },
  26004. "cache": {
  26005. "type": "object",
  26006. "properties": {
  26007. "read": {
  26008. "type": "number"
  26009. },
  26010. "write": {
  26011. "type": "number"
  26012. }
  26013. },
  26014. "required": ["read", "write"],
  26015. "additionalProperties": false
  26016. }
  26017. },
  26018. "required": ["input", "output", "reasoning", "cache"],
  26019. "additionalProperties": false
  26020. },
  26021. "error": {
  26022. "$ref": "#/components/schemas/SessionErrorUnknown"
  26023. }
  26024. },
  26025. "required": ["id", "time", "type", "agent", "model", "content"],
  26026. "additionalProperties": false
  26027. },
  26028. "SessionMessageCompaction": {
  26029. "type": "object",
  26030. "properties": {
  26031. "type": {
  26032. "type": "string",
  26033. "enum": ["compaction"]
  26034. },
  26035. "reason": {
  26036. "type": "string",
  26037. "enum": ["auto", "manual"]
  26038. },
  26039. "summary": {
  26040. "type": "string"
  26041. },
  26042. "recent": {
  26043. "type": "string"
  26044. },
  26045. "id": {
  26046. "type": "string",
  26047. "pattern": "^msg_"
  26048. },
  26049. "metadata": {
  26050. "type": "object"
  26051. },
  26052. "time": {
  26053. "type": "object",
  26054. "properties": {
  26055. "created": {
  26056. "type": "number"
  26057. }
  26058. },
  26059. "required": ["created"],
  26060. "additionalProperties": false
  26061. }
  26062. },
  26063. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26064. "additionalProperties": false
  26065. },
  26066. "SessionMessage": {
  26067. "anyOf": [
  26068. {
  26069. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26070. },
  26071. {
  26072. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26073. },
  26074. {
  26075. "$ref": "#/components/schemas/SessionMessageUser"
  26076. },
  26077. {
  26078. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26079. },
  26080. {
  26081. "$ref": "#/components/schemas/SessionMessageSystem"
  26082. },
  26083. {
  26084. "$ref": "#/components/schemas/SessionMessageShell"
  26085. },
  26086. {
  26087. "$ref": "#/components/schemas/SessionMessageAssistant"
  26088. },
  26089. {
  26090. "$ref": "#/components/schemas/SessionMessageCompaction"
  26091. }
  26092. ]
  26093. },
  26094. "ProviderV2Info": {
  26095. "type": "object",
  26096. "properties": {
  26097. "id": {
  26098. "type": "string"
  26099. },
  26100. "name": {
  26101. "type": "string"
  26102. },
  26103. "enabled": {
  26104. "anyOf": [
  26105. {
  26106. "type": "boolean",
  26107. "enum": [false]
  26108. },
  26109. {
  26110. "type": "object",
  26111. "properties": {
  26112. "via": {
  26113. "type": "string",
  26114. "enum": ["env"]
  26115. },
  26116. "name": {
  26117. "type": "string"
  26118. }
  26119. },
  26120. "required": ["via", "name"],
  26121. "additionalProperties": false
  26122. },
  26123. {
  26124. "type": "object",
  26125. "properties": {
  26126. "via": {
  26127. "type": "string",
  26128. "enum": ["credential"]
  26129. },
  26130. "credentialID": {
  26131. "type": "string"
  26132. }
  26133. },
  26134. "required": ["via", "credentialID"],
  26135. "additionalProperties": false
  26136. },
  26137. {
  26138. "type": "object",
  26139. "properties": {
  26140. "via": {
  26141. "type": "string",
  26142. "enum": ["custom"]
  26143. },
  26144. "data": {
  26145. "type": "object"
  26146. }
  26147. },
  26148. "required": ["via", "data"],
  26149. "additionalProperties": false
  26150. }
  26151. ]
  26152. },
  26153. "env": {
  26154. "type": "array",
  26155. "items": {
  26156. "type": "string"
  26157. }
  26158. },
  26159. "api": {
  26160. "anyOf": [
  26161. {
  26162. "type": "object",
  26163. "properties": {
  26164. "type": {
  26165. "type": "string",
  26166. "enum": ["aisdk"]
  26167. },
  26168. "package": {
  26169. "type": "string"
  26170. },
  26171. "url": {
  26172. "type": "string"
  26173. },
  26174. "settings": {
  26175. "type": "object"
  26176. }
  26177. },
  26178. "required": ["type", "package"],
  26179. "additionalProperties": false
  26180. },
  26181. {
  26182. "type": "object",
  26183. "properties": {
  26184. "type": {
  26185. "type": "string",
  26186. "enum": ["native"]
  26187. },
  26188. "url": {
  26189. "type": "string"
  26190. },
  26191. "settings": {
  26192. "type": "object"
  26193. }
  26194. },
  26195. "required": ["type", "settings"],
  26196. "additionalProperties": false
  26197. }
  26198. ]
  26199. },
  26200. "request": {
  26201. "type": "object",
  26202. "properties": {
  26203. "headers": {
  26204. "type": "object",
  26205. "additionalProperties": {
  26206. "type": "string"
  26207. }
  26208. },
  26209. "body": {
  26210. "type": "object"
  26211. }
  26212. },
  26213. "required": ["headers", "body"],
  26214. "additionalProperties": false
  26215. }
  26216. },
  26217. "required": ["id", "name", "enabled", "env", "api", "request"],
  26218. "additionalProperties": false
  26219. },
  26220. "IntegrationWhen": {
  26221. "type": "object",
  26222. "properties": {
  26223. "key": {
  26224. "type": "string"
  26225. },
  26226. "op": {
  26227. "type": "string",
  26228. "enum": ["eq", "neq"]
  26229. },
  26230. "value": {
  26231. "type": "string"
  26232. }
  26233. },
  26234. "required": ["key", "op", "value"],
  26235. "additionalProperties": false
  26236. },
  26237. "IntegrationTextPrompt": {
  26238. "type": "object",
  26239. "properties": {
  26240. "type": {
  26241. "type": "string",
  26242. "enum": ["text"]
  26243. },
  26244. "key": {
  26245. "type": "string"
  26246. },
  26247. "message": {
  26248. "type": "string"
  26249. },
  26250. "placeholder": {
  26251. "type": "string"
  26252. },
  26253. "when": {
  26254. "$ref": "#/components/schemas/IntegrationWhen"
  26255. }
  26256. },
  26257. "required": ["type", "key", "message"],
  26258. "additionalProperties": false
  26259. },
  26260. "IntegrationSelectPrompt": {
  26261. "type": "object",
  26262. "properties": {
  26263. "type": {
  26264. "type": "string",
  26265. "enum": ["select"]
  26266. },
  26267. "key": {
  26268. "type": "string"
  26269. },
  26270. "message": {
  26271. "type": "string"
  26272. },
  26273. "options": {
  26274. "type": "array",
  26275. "items": {
  26276. "type": "object",
  26277. "properties": {
  26278. "label": {
  26279. "type": "string"
  26280. },
  26281. "value": {
  26282. "type": "string"
  26283. },
  26284. "hint": {
  26285. "type": "string"
  26286. }
  26287. },
  26288. "required": ["label", "value"],
  26289. "additionalProperties": false
  26290. }
  26291. },
  26292. "when": {
  26293. "$ref": "#/components/schemas/IntegrationWhen"
  26294. }
  26295. },
  26296. "required": ["type", "key", "message", "options"],
  26297. "additionalProperties": false
  26298. },
  26299. "IntegrationOAuthMethod": {
  26300. "type": "object",
  26301. "properties": {
  26302. "id": {
  26303. "type": "string"
  26304. },
  26305. "type": {
  26306. "type": "string",
  26307. "enum": ["oauth"]
  26308. },
  26309. "label": {
  26310. "type": "string"
  26311. },
  26312. "prompts": {
  26313. "type": "array",
  26314. "items": {
  26315. "anyOf": [
  26316. {
  26317. "$ref": "#/components/schemas/IntegrationTextPrompt"
  26318. },
  26319. {
  26320. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  26321. }
  26322. ]
  26323. }
  26324. }
  26325. },
  26326. "required": ["id", "type", "label"],
  26327. "additionalProperties": false
  26328. },
  26329. "IntegrationKeyMethod": {
  26330. "type": "object",
  26331. "properties": {
  26332. "type": {
  26333. "type": "string",
  26334. "enum": ["key"]
  26335. },
  26336. "label": {
  26337. "type": "string"
  26338. }
  26339. },
  26340. "required": ["type"],
  26341. "additionalProperties": false
  26342. },
  26343. "IntegrationEnvMethod": {
  26344. "type": "object",
  26345. "properties": {
  26346. "type": {
  26347. "type": "string",
  26348. "enum": ["env"]
  26349. },
  26350. "names": {
  26351. "type": "array",
  26352. "items": {
  26353. "type": "string"
  26354. }
  26355. }
  26356. },
  26357. "required": ["type", "names"],
  26358. "additionalProperties": false
  26359. },
  26360. "ConnectionCredentialInfo": {
  26361. "type": "object",
  26362. "properties": {
  26363. "type": {
  26364. "type": "string",
  26365. "enum": ["credential"]
  26366. },
  26367. "id": {
  26368. "type": "string"
  26369. },
  26370. "label": {
  26371. "type": "string"
  26372. }
  26373. },
  26374. "required": ["type", "id", "label"],
  26375. "additionalProperties": false
  26376. },
  26377. "ConnectionEnvInfo": {
  26378. "type": "object",
  26379. "properties": {
  26380. "type": {
  26381. "type": "string",
  26382. "enum": ["env"]
  26383. },
  26384. "name": {
  26385. "type": "string"
  26386. }
  26387. },
  26388. "required": ["type", "name"],
  26389. "additionalProperties": false
  26390. },
  26391. "ConnectionInfo": {
  26392. "anyOf": [
  26393. {
  26394. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  26395. },
  26396. {
  26397. "$ref": "#/components/schemas/ConnectionEnvInfo"
  26398. }
  26399. ]
  26400. },
  26401. "IntegrationInfo": {
  26402. "type": "object",
  26403. "properties": {
  26404. "id": {
  26405. "type": "string"
  26406. },
  26407. "name": {
  26408. "type": "string"
  26409. },
  26410. "methods": {
  26411. "type": "array",
  26412. "items": {
  26413. "anyOf": [
  26414. {
  26415. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  26416. },
  26417. {
  26418. "$ref": "#/components/schemas/IntegrationKeyMethod"
  26419. },
  26420. {
  26421. "$ref": "#/components/schemas/IntegrationEnvMethod"
  26422. }
  26423. ]
  26424. }
  26425. },
  26426. "connections": {
  26427. "type": "array",
  26428. "items": {
  26429. "$ref": "#/components/schemas/ConnectionInfo"
  26430. }
  26431. }
  26432. },
  26433. "required": ["id", "name", "methods", "connections"],
  26434. "additionalProperties": false
  26435. },
  26436. "IntegrationAttempt": {
  26437. "type": "object",
  26438. "properties": {
  26439. "attemptID": {
  26440. "type": "string"
  26441. },
  26442. "url": {
  26443. "type": "string"
  26444. },
  26445. "instructions": {
  26446. "type": "string"
  26447. },
  26448. "mode": {
  26449. "type": "string",
  26450. "enum": ["auto", "code"]
  26451. },
  26452. "time": {
  26453. "type": "object",
  26454. "properties": {
  26455. "created": {
  26456. "anyOf": [
  26457. {
  26458. "type": "number"
  26459. },
  26460. {
  26461. "type": "string",
  26462. "enum": ["NaN"]
  26463. },
  26464. {
  26465. "type": "string",
  26466. "enum": ["Infinity"]
  26467. },
  26468. {
  26469. "type": "string",
  26470. "enum": ["-Infinity"]
  26471. },
  26472. {
  26473. "type": "string",
  26474. "enum": ["Infinity", "-Infinity", "NaN"]
  26475. }
  26476. ]
  26477. },
  26478. "expires": {
  26479. "anyOf": [
  26480. {
  26481. "type": "number"
  26482. },
  26483. {
  26484. "type": "string",
  26485. "enum": ["NaN"]
  26486. },
  26487. {
  26488. "type": "string",
  26489. "enum": ["Infinity"]
  26490. },
  26491. {
  26492. "type": "string",
  26493. "enum": ["-Infinity"]
  26494. },
  26495. {
  26496. "type": "string",
  26497. "enum": ["Infinity", "-Infinity", "NaN"]
  26498. }
  26499. ]
  26500. }
  26501. },
  26502. "required": ["created", "expires"],
  26503. "additionalProperties": false
  26504. }
  26505. },
  26506. "required": ["attemptID", "url", "instructions", "mode", "time"],
  26507. "additionalProperties": false
  26508. },
  26509. "PermissionV2Request": {
  26510. "type": "object",
  26511. "properties": {
  26512. "id": {
  26513. "type": "string",
  26514. "pattern": "^per"
  26515. },
  26516. "sessionID": {
  26517. "type": "string",
  26518. "pattern": "^ses"
  26519. },
  26520. "action": {
  26521. "type": "string"
  26522. },
  26523. "resources": {
  26524. "type": "array",
  26525. "items": {
  26526. "type": "string"
  26527. }
  26528. },
  26529. "save": {
  26530. "type": "array",
  26531. "items": {
  26532. "type": "string"
  26533. }
  26534. },
  26535. "metadata": {
  26536. "type": "object"
  26537. },
  26538. "source": {
  26539. "$ref": "#/components/schemas/PermissionV2Source"
  26540. }
  26541. },
  26542. "required": ["id", "sessionID", "action", "resources"],
  26543. "additionalProperties": false
  26544. },
  26545. "PermissionSavedInfo": {
  26546. "type": "object",
  26547. "properties": {
  26548. "id": {
  26549. "type": "string"
  26550. },
  26551. "projectID": {
  26552. "type": "string"
  26553. },
  26554. "action": {
  26555. "type": "string"
  26556. },
  26557. "resource": {
  26558. "type": "string"
  26559. }
  26560. },
  26561. "required": ["id", "projectID", "action", "resource"],
  26562. "additionalProperties": false
  26563. },
  26564. "FileSystemEntry": {
  26565. "type": "object",
  26566. "properties": {
  26567. "path": {
  26568. "type": "string"
  26569. },
  26570. "type": {
  26571. "type": "string",
  26572. "enum": ["file", "directory"]
  26573. },
  26574. "mime": {
  26575. "type": "string"
  26576. }
  26577. },
  26578. "required": ["path", "type", "mime"],
  26579. "additionalProperties": false
  26580. },
  26581. "CommandV2Info": {
  26582. "type": "object",
  26583. "properties": {
  26584. "name": {
  26585. "type": "string"
  26586. },
  26587. "template": {
  26588. "type": "string"
  26589. },
  26590. "description": {
  26591. "type": "string"
  26592. },
  26593. "agent": {
  26594. "type": "string"
  26595. },
  26596. "model": {
  26597. "type": "object",
  26598. "properties": {
  26599. "id": {
  26600. "type": "string"
  26601. },
  26602. "providerID": {
  26603. "type": "string"
  26604. },
  26605. "variant": {
  26606. "type": "string"
  26607. }
  26608. },
  26609. "required": ["id", "providerID"],
  26610. "additionalProperties": false
  26611. },
  26612. "subtask": {
  26613. "type": "boolean"
  26614. }
  26615. },
  26616. "required": ["name", "template"],
  26617. "additionalProperties": false
  26618. },
  26619. "SkillV2Info": {
  26620. "type": "object",
  26621. "properties": {
  26622. "name": {
  26623. "type": "string"
  26624. },
  26625. "description": {
  26626. "type": "string"
  26627. },
  26628. "slash": {
  26629. "type": "boolean"
  26630. },
  26631. "location": {
  26632. "type": "string"
  26633. },
  26634. "content": {
  26635. "type": "string"
  26636. }
  26637. },
  26638. "required": ["name", "location", "content"],
  26639. "additionalProperties": false
  26640. },
  26641. "QuestionV2Request": {
  26642. "type": "object",
  26643. "properties": {
  26644. "id": {
  26645. "type": "string",
  26646. "pattern": "^que"
  26647. },
  26648. "sessionID": {
  26649. "type": "string",
  26650. "pattern": "^ses"
  26651. },
  26652. "questions": {
  26653. "type": "array",
  26654. "items": {
  26655. "$ref": "#/components/schemas/QuestionV2Info"
  26656. },
  26657. "description": "Questions to ask"
  26658. },
  26659. "tool": {
  26660. "$ref": "#/components/schemas/QuestionV2Tool"
  26661. }
  26662. },
  26663. "required": ["id", "sessionID", "questions"],
  26664. "additionalProperties": false
  26665. },
  26666. "QuestionV2Reply": {
  26667. "type": "object",
  26668. "properties": {
  26669. "answers": {
  26670. "type": "array",
  26671. "items": {
  26672. "$ref": "#/components/schemas/QuestionV2Answer"
  26673. },
  26674. "description": "User answers in order of questions (each answer is an array of selected labels)"
  26675. }
  26676. },
  26677. "required": ["answers"],
  26678. "additionalProperties": false
  26679. },
  26680. "ReferenceLocalSource": {
  26681. "type": "object",
  26682. "properties": {
  26683. "type": {
  26684. "type": "string",
  26685. "enum": ["local"]
  26686. },
  26687. "path": {
  26688. "type": "string"
  26689. },
  26690. "description": {
  26691. "type": "string"
  26692. },
  26693. "hidden": {
  26694. "type": "boolean"
  26695. }
  26696. },
  26697. "required": ["type", "path"],
  26698. "additionalProperties": false
  26699. },
  26700. "ReferenceGitSource": {
  26701. "type": "object",
  26702. "properties": {
  26703. "type": {
  26704. "type": "string",
  26705. "enum": ["git"]
  26706. },
  26707. "repository": {
  26708. "type": "string"
  26709. },
  26710. "branch": {
  26711. "type": "string"
  26712. },
  26713. "description": {
  26714. "type": "string"
  26715. },
  26716. "hidden": {
  26717. "type": "boolean"
  26718. }
  26719. },
  26720. "required": ["type", "repository"],
  26721. "additionalProperties": false
  26722. },
  26723. "ReferenceInfo": {
  26724. "type": "object",
  26725. "properties": {
  26726. "name": {
  26727. "type": "string"
  26728. },
  26729. "path": {
  26730. "type": "string"
  26731. },
  26732. "description": {
  26733. "type": "string"
  26734. },
  26735. "hidden": {
  26736. "type": "boolean"
  26737. },
  26738. "source": {
  26739. "anyOf": [
  26740. {
  26741. "$ref": "#/components/schemas/ReferenceLocalSource"
  26742. },
  26743. {
  26744. "$ref": "#/components/schemas/ReferenceGitSource"
  26745. }
  26746. ]
  26747. }
  26748. },
  26749. "required": ["name", "path", "source"],
  26750. "additionalProperties": false
  26751. },
  26752. "EventModels-devRefreshed": {
  26753. "type": "object",
  26754. "properties": {
  26755. "id": {
  26756. "type": "string",
  26757. "pattern": "^evt_"
  26758. },
  26759. "type": {
  26760. "type": "string",
  26761. "enum": ["models-dev.refreshed"]
  26762. },
  26763. "properties": {
  26764. "type": "object",
  26765. "properties": {}
  26766. }
  26767. },
  26768. "required": ["id", "type", "properties"],
  26769. "additionalProperties": false
  26770. },
  26771. "EventPluginAdded": {
  26772. "type": "object",
  26773. "properties": {
  26774. "id": {
  26775. "type": "string",
  26776. "pattern": "^evt_"
  26777. },
  26778. "type": {
  26779. "type": "string",
  26780. "enum": ["plugin.added"]
  26781. },
  26782. "properties": {
  26783. "type": "object",
  26784. "properties": {
  26785. "id": {
  26786. "type": "string"
  26787. }
  26788. },
  26789. "required": ["id"],
  26790. "additionalProperties": false
  26791. }
  26792. },
  26793. "required": ["id", "type", "properties"],
  26794. "additionalProperties": false
  26795. },
  26796. "ModelV2Info1": {
  26797. "type": "object",
  26798. "properties": {
  26799. "id": {
  26800. "type": "string"
  26801. },
  26802. "providerID": {
  26803. "type": "string"
  26804. },
  26805. "family": {
  26806. "type": "string"
  26807. },
  26808. "name": {
  26809. "type": "string"
  26810. },
  26811. "api": {
  26812. "anyOf": [
  26813. {
  26814. "type": "object",
  26815. "properties": {
  26816. "id": {
  26817. "type": "string"
  26818. },
  26819. "type": {
  26820. "type": "string",
  26821. "enum": ["aisdk"]
  26822. },
  26823. "package": {
  26824. "type": "string"
  26825. },
  26826. "url": {
  26827. "type": "string"
  26828. },
  26829. "settings": {
  26830. "type": "object"
  26831. }
  26832. },
  26833. "required": ["id", "type", "package"],
  26834. "additionalProperties": false
  26835. },
  26836. {
  26837. "type": "object",
  26838. "properties": {
  26839. "id": {
  26840. "type": "string"
  26841. },
  26842. "type": {
  26843. "type": "string",
  26844. "enum": ["native"]
  26845. },
  26846. "url": {
  26847. "type": "string"
  26848. },
  26849. "settings": {
  26850. "type": "object"
  26851. }
  26852. },
  26853. "required": ["id", "type", "settings"],
  26854. "additionalProperties": false
  26855. }
  26856. ]
  26857. },
  26858. "capabilities": {
  26859. "type": "object",
  26860. "properties": {
  26861. "tools": {
  26862. "type": "boolean"
  26863. },
  26864. "input": {
  26865. "type": "array",
  26866. "items": {
  26867. "type": "string"
  26868. }
  26869. },
  26870. "output": {
  26871. "type": "array",
  26872. "items": {
  26873. "type": "string"
  26874. }
  26875. }
  26876. },
  26877. "required": ["tools", "input", "output"],
  26878. "additionalProperties": false
  26879. },
  26880. "request": {
  26881. "type": "object",
  26882. "properties": {
  26883. "headers": {
  26884. "type": "object",
  26885. "additionalProperties": {
  26886. "type": "string"
  26887. }
  26888. },
  26889. "body": {
  26890. "type": "object"
  26891. },
  26892. "generation": {
  26893. "type": "object",
  26894. "properties": {
  26895. "maxTokens": {
  26896. "anyOf": [
  26897. {
  26898. "type": "number"
  26899. },
  26900. {
  26901. "type": "string",
  26902. "enum": ["NaN"]
  26903. },
  26904. {
  26905. "type": "string",
  26906. "enum": ["Infinity"]
  26907. },
  26908. {
  26909. "type": "string",
  26910. "enum": ["-Infinity"]
  26911. }
  26912. ]
  26913. },
  26914. "temperature": {
  26915. "anyOf": [
  26916. {
  26917. "type": "number"
  26918. },
  26919. {
  26920. "type": "string",
  26921. "enum": ["NaN"]
  26922. },
  26923. {
  26924. "type": "string",
  26925. "enum": ["Infinity"]
  26926. },
  26927. {
  26928. "type": "string",
  26929. "enum": ["-Infinity"]
  26930. }
  26931. ]
  26932. },
  26933. "topP": {
  26934. "anyOf": [
  26935. {
  26936. "type": "number"
  26937. },
  26938. {
  26939. "type": "string",
  26940. "enum": ["NaN"]
  26941. },
  26942. {
  26943. "type": "string",
  26944. "enum": ["Infinity"]
  26945. },
  26946. {
  26947. "type": "string",
  26948. "enum": ["-Infinity"]
  26949. }
  26950. ]
  26951. },
  26952. "topK": {
  26953. "anyOf": [
  26954. {
  26955. "type": "number"
  26956. },
  26957. {
  26958. "type": "string",
  26959. "enum": ["NaN"]
  26960. },
  26961. {
  26962. "type": "string",
  26963. "enum": ["Infinity"]
  26964. },
  26965. {
  26966. "type": "string",
  26967. "enum": ["-Infinity"]
  26968. }
  26969. ]
  26970. },
  26971. "frequencyPenalty": {
  26972. "anyOf": [
  26973. {
  26974. "type": "number"
  26975. },
  26976. {
  26977. "type": "string",
  26978. "enum": ["NaN"]
  26979. },
  26980. {
  26981. "type": "string",
  26982. "enum": ["Infinity"]
  26983. },
  26984. {
  26985. "type": "string",
  26986. "enum": ["-Infinity"]
  26987. }
  26988. ]
  26989. },
  26990. "presencePenalty": {
  26991. "anyOf": [
  26992. {
  26993. "type": "number"
  26994. },
  26995. {
  26996. "type": "string",
  26997. "enum": ["NaN"]
  26998. },
  26999. {
  27000. "type": "string",
  27001. "enum": ["Infinity"]
  27002. },
  27003. {
  27004. "type": "string",
  27005. "enum": ["-Infinity"]
  27006. }
  27007. ]
  27008. },
  27009. "seed": {
  27010. "anyOf": [
  27011. {
  27012. "type": "number"
  27013. },
  27014. {
  27015. "type": "string",
  27016. "enum": ["NaN"]
  27017. },
  27018. {
  27019. "type": "string",
  27020. "enum": ["Infinity"]
  27021. },
  27022. {
  27023. "type": "string",
  27024. "enum": ["-Infinity"]
  27025. }
  27026. ]
  27027. },
  27028. "stop": {
  27029. "type": "array",
  27030. "items": {
  27031. "type": "string"
  27032. }
  27033. }
  27034. },
  27035. "additionalProperties": false
  27036. },
  27037. "options": {
  27038. "type": "object"
  27039. },
  27040. "variant": {
  27041. "type": "string"
  27042. }
  27043. },
  27044. "required": ["headers", "body"],
  27045. "additionalProperties": false
  27046. },
  27047. "variants": {
  27048. "type": "array",
  27049. "items": {
  27050. "type": "object",
  27051. "properties": {
  27052. "id": {
  27053. "type": "string"
  27054. },
  27055. "headers": {
  27056. "type": "object",
  27057. "additionalProperties": {
  27058. "type": "string"
  27059. }
  27060. },
  27061. "body": {
  27062. "type": "object"
  27063. },
  27064. "generation": {
  27065. "type": "object",
  27066. "properties": {
  27067. "maxTokens": {
  27068. "anyOf": [
  27069. {
  27070. "type": "number"
  27071. },
  27072. {
  27073. "type": "string",
  27074. "enum": ["NaN"]
  27075. },
  27076. {
  27077. "type": "string",
  27078. "enum": ["Infinity"]
  27079. },
  27080. {
  27081. "type": "string",
  27082. "enum": ["-Infinity"]
  27083. }
  27084. ]
  27085. },
  27086. "temperature": {
  27087. "anyOf": [
  27088. {
  27089. "type": "number"
  27090. },
  27091. {
  27092. "type": "string",
  27093. "enum": ["NaN"]
  27094. },
  27095. {
  27096. "type": "string",
  27097. "enum": ["Infinity"]
  27098. },
  27099. {
  27100. "type": "string",
  27101. "enum": ["-Infinity"]
  27102. }
  27103. ]
  27104. },
  27105. "topP": {
  27106. "anyOf": [
  27107. {
  27108. "type": "number"
  27109. },
  27110. {
  27111. "type": "string",
  27112. "enum": ["NaN"]
  27113. },
  27114. {
  27115. "type": "string",
  27116. "enum": ["Infinity"]
  27117. },
  27118. {
  27119. "type": "string",
  27120. "enum": ["-Infinity"]
  27121. }
  27122. ]
  27123. },
  27124. "topK": {
  27125. "anyOf": [
  27126. {
  27127. "type": "number"
  27128. },
  27129. {
  27130. "type": "string",
  27131. "enum": ["NaN"]
  27132. },
  27133. {
  27134. "type": "string",
  27135. "enum": ["Infinity"]
  27136. },
  27137. {
  27138. "type": "string",
  27139. "enum": ["-Infinity"]
  27140. }
  27141. ]
  27142. },
  27143. "frequencyPenalty": {
  27144. "anyOf": [
  27145. {
  27146. "type": "number"
  27147. },
  27148. {
  27149. "type": "string",
  27150. "enum": ["NaN"]
  27151. },
  27152. {
  27153. "type": "string",
  27154. "enum": ["Infinity"]
  27155. },
  27156. {
  27157. "type": "string",
  27158. "enum": ["-Infinity"]
  27159. }
  27160. ]
  27161. },
  27162. "presencePenalty": {
  27163. "anyOf": [
  27164. {
  27165. "type": "number"
  27166. },
  27167. {
  27168. "type": "string",
  27169. "enum": ["NaN"]
  27170. },
  27171. {
  27172. "type": "string",
  27173. "enum": ["Infinity"]
  27174. },
  27175. {
  27176. "type": "string",
  27177. "enum": ["-Infinity"]
  27178. }
  27179. ]
  27180. },
  27181. "seed": {
  27182. "anyOf": [
  27183. {
  27184. "type": "number"
  27185. },
  27186. {
  27187. "type": "string",
  27188. "enum": ["NaN"]
  27189. },
  27190. {
  27191. "type": "string",
  27192. "enum": ["Infinity"]
  27193. },
  27194. {
  27195. "type": "string",
  27196. "enum": ["-Infinity"]
  27197. }
  27198. ]
  27199. },
  27200. "stop": {
  27201. "type": "array",
  27202. "items": {
  27203. "type": "string"
  27204. }
  27205. }
  27206. },
  27207. "additionalProperties": false
  27208. },
  27209. "options": {
  27210. "type": "object"
  27211. }
  27212. },
  27213. "required": ["id", "headers", "body"],
  27214. "additionalProperties": false
  27215. }
  27216. },
  27217. "time": {
  27218. "type": "object",
  27219. "properties": {
  27220. "released": {
  27221. "anyOf": [
  27222. {
  27223. "type": "number"
  27224. },
  27225. {
  27226. "type": "string",
  27227. "enum": ["NaN"]
  27228. },
  27229. {
  27230. "type": "string",
  27231. "enum": ["Infinity"]
  27232. },
  27233. {
  27234. "type": "string",
  27235. "enum": ["-Infinity"]
  27236. }
  27237. ]
  27238. }
  27239. },
  27240. "required": ["released"],
  27241. "additionalProperties": false
  27242. },
  27243. "cost": {
  27244. "type": "array",
  27245. "items": {
  27246. "type": "object",
  27247. "properties": {
  27248. "tier": {
  27249. "type": "object",
  27250. "properties": {
  27251. "type": {
  27252. "type": "string",
  27253. "enum": ["context"]
  27254. },
  27255. "size": {
  27256. "type": "integer"
  27257. }
  27258. },
  27259. "required": ["type", "size"],
  27260. "additionalProperties": false
  27261. },
  27262. "input": {
  27263. "type": "number"
  27264. },
  27265. "output": {
  27266. "type": "number"
  27267. },
  27268. "cache": {
  27269. "type": "object",
  27270. "properties": {
  27271. "read": {
  27272. "type": "number"
  27273. },
  27274. "write": {
  27275. "type": "number"
  27276. }
  27277. },
  27278. "required": ["read", "write"],
  27279. "additionalProperties": false
  27280. }
  27281. },
  27282. "required": ["input", "output", "cache"],
  27283. "additionalProperties": false
  27284. }
  27285. },
  27286. "status": {
  27287. "type": "string",
  27288. "enum": ["alpha", "beta", "deprecated", "active"]
  27289. },
  27290. "enabled": {
  27291. "type": "boolean"
  27292. },
  27293. "limit": {
  27294. "type": "object",
  27295. "properties": {
  27296. "context": {
  27297. "type": "integer"
  27298. },
  27299. "input": {
  27300. "type": "integer"
  27301. },
  27302. "output": {
  27303. "type": "integer"
  27304. }
  27305. },
  27306. "required": ["context", "output"],
  27307. "additionalProperties": false
  27308. }
  27309. },
  27310. "required": [
  27311. "id",
  27312. "providerID",
  27313. "name",
  27314. "api",
  27315. "capabilities",
  27316. "request",
  27317. "variants",
  27318. "time",
  27319. "cost",
  27320. "status",
  27321. "enabled",
  27322. "limit"
  27323. ],
  27324. "additionalProperties": false
  27325. },
  27326. "EventCatalogModelUpdated": {
  27327. "type": "object",
  27328. "properties": {
  27329. "id": {
  27330. "type": "string",
  27331. "pattern": "^evt_"
  27332. },
  27333. "type": {
  27334. "type": "string",
  27335. "enum": ["catalog.model.updated"]
  27336. },
  27337. "properties": {
  27338. "type": "object",
  27339. "properties": {
  27340. "model": {
  27341. "$ref": "#/components/schemas/ModelV2Info1"
  27342. }
  27343. },
  27344. "required": ["model"],
  27345. "additionalProperties": false
  27346. }
  27347. },
  27348. "required": ["id", "type", "properties"],
  27349. "additionalProperties": false
  27350. },
  27351. "EventSessionCreated": {
  27352. "type": "object",
  27353. "properties": {
  27354. "id": {
  27355. "type": "string",
  27356. "pattern": "^evt_"
  27357. },
  27358. "type": {
  27359. "type": "string",
  27360. "enum": ["session.created"]
  27361. },
  27362. "properties": {
  27363. "type": "object",
  27364. "properties": {
  27365. "sessionID": {
  27366. "type": "string",
  27367. "pattern": "^ses"
  27368. },
  27369. "info": {
  27370. "$ref": "#/components/schemas/Session"
  27371. }
  27372. },
  27373. "required": ["sessionID", "info"],
  27374. "additionalProperties": false
  27375. }
  27376. },
  27377. "required": ["id", "type", "properties"],
  27378. "additionalProperties": false
  27379. },
  27380. "EventSessionUpdated": {
  27381. "type": "object",
  27382. "properties": {
  27383. "id": {
  27384. "type": "string",
  27385. "pattern": "^evt_"
  27386. },
  27387. "type": {
  27388. "type": "string",
  27389. "enum": ["session.updated"]
  27390. },
  27391. "properties": {
  27392. "type": "object",
  27393. "properties": {
  27394. "sessionID": {
  27395. "type": "string",
  27396. "pattern": "^ses"
  27397. },
  27398. "info": {
  27399. "$ref": "#/components/schemas/Session"
  27400. }
  27401. },
  27402. "required": ["sessionID", "info"],
  27403. "additionalProperties": false
  27404. }
  27405. },
  27406. "required": ["id", "type", "properties"],
  27407. "additionalProperties": false
  27408. },
  27409. "EventSessionDeleted": {
  27410. "type": "object",
  27411. "properties": {
  27412. "id": {
  27413. "type": "string",
  27414. "pattern": "^evt_"
  27415. },
  27416. "type": {
  27417. "type": "string",
  27418. "enum": ["session.deleted"]
  27419. },
  27420. "properties": {
  27421. "type": "object",
  27422. "properties": {
  27423. "sessionID": {
  27424. "type": "string",
  27425. "pattern": "^ses"
  27426. },
  27427. "info": {
  27428. "$ref": "#/components/schemas/Session"
  27429. }
  27430. },
  27431. "required": ["sessionID", "info"],
  27432. "additionalProperties": false
  27433. }
  27434. },
  27435. "required": ["id", "type", "properties"],
  27436. "additionalProperties": false
  27437. },
  27438. "EventMessageUpdated": {
  27439. "type": "object",
  27440. "properties": {
  27441. "id": {
  27442. "type": "string",
  27443. "pattern": "^evt_"
  27444. },
  27445. "type": {
  27446. "type": "string",
  27447. "enum": ["message.updated"]
  27448. },
  27449. "properties": {
  27450. "type": "object",
  27451. "properties": {
  27452. "sessionID": {
  27453. "type": "string",
  27454. "pattern": "^ses"
  27455. },
  27456. "info": {
  27457. "$ref": "#/components/schemas/Message"
  27458. }
  27459. },
  27460. "required": ["sessionID", "info"],
  27461. "additionalProperties": false
  27462. }
  27463. },
  27464. "required": ["id", "type", "properties"],
  27465. "additionalProperties": false
  27466. },
  27467. "EventMessageRemoved": {
  27468. "type": "object",
  27469. "properties": {
  27470. "id": {
  27471. "type": "string",
  27472. "pattern": "^evt_"
  27473. },
  27474. "type": {
  27475. "type": "string",
  27476. "enum": ["message.removed"]
  27477. },
  27478. "properties": {
  27479. "type": "object",
  27480. "properties": {
  27481. "sessionID": {
  27482. "type": "string",
  27483. "pattern": "^ses"
  27484. },
  27485. "messageID": {
  27486. "type": "string",
  27487. "pattern": "^msg"
  27488. }
  27489. },
  27490. "required": ["sessionID", "messageID"],
  27491. "additionalProperties": false
  27492. }
  27493. },
  27494. "required": ["id", "type", "properties"],
  27495. "additionalProperties": false
  27496. },
  27497. "EventMessagePartUpdated": {
  27498. "type": "object",
  27499. "properties": {
  27500. "id": {
  27501. "type": "string",
  27502. "pattern": "^evt_"
  27503. },
  27504. "type": {
  27505. "type": "string",
  27506. "enum": ["message.part.updated"]
  27507. },
  27508. "properties": {
  27509. "type": "object",
  27510. "properties": {
  27511. "sessionID": {
  27512. "type": "string",
  27513. "pattern": "^ses"
  27514. },
  27515. "part": {
  27516. "$ref": "#/components/schemas/Part"
  27517. },
  27518. "time": {
  27519. "type": "number"
  27520. }
  27521. },
  27522. "required": ["sessionID", "part", "time"],
  27523. "additionalProperties": false
  27524. }
  27525. },
  27526. "required": ["id", "type", "properties"],
  27527. "additionalProperties": false
  27528. },
  27529. "EventMessagePartRemoved": {
  27530. "type": "object",
  27531. "properties": {
  27532. "id": {
  27533. "type": "string",
  27534. "pattern": "^evt_"
  27535. },
  27536. "type": {
  27537. "type": "string",
  27538. "enum": ["message.part.removed"]
  27539. },
  27540. "properties": {
  27541. "type": "object",
  27542. "properties": {
  27543. "sessionID": {
  27544. "type": "string",
  27545. "pattern": "^ses"
  27546. },
  27547. "messageID": {
  27548. "type": "string",
  27549. "pattern": "^msg"
  27550. },
  27551. "partID": {
  27552. "type": "string",
  27553. "pattern": "^prt"
  27554. }
  27555. },
  27556. "required": ["sessionID", "messageID", "partID"],
  27557. "additionalProperties": false
  27558. }
  27559. },
  27560. "required": ["id", "type", "properties"],
  27561. "additionalProperties": false
  27562. },
  27563. "EventSessionNextAgentSwitched": {
  27564. "type": "object",
  27565. "properties": {
  27566. "id": {
  27567. "type": "string",
  27568. "pattern": "^evt_"
  27569. },
  27570. "type": {
  27571. "type": "string",
  27572. "enum": ["session.next.agent.switched"]
  27573. },
  27574. "properties": {
  27575. "type": "object",
  27576. "properties": {
  27577. "timestamp": {
  27578. "type": "number"
  27579. },
  27580. "sessionID": {
  27581. "type": "string",
  27582. "pattern": "^ses"
  27583. },
  27584. "messageID": {
  27585. "type": "string",
  27586. "pattern": "^msg_"
  27587. },
  27588. "agent": {
  27589. "type": "string"
  27590. }
  27591. },
  27592. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27593. "additionalProperties": false
  27594. }
  27595. },
  27596. "required": ["id", "type", "properties"],
  27597. "additionalProperties": false
  27598. },
  27599. "EventSessionNextModelSwitched": {
  27600. "type": "object",
  27601. "properties": {
  27602. "id": {
  27603. "type": "string",
  27604. "pattern": "^evt_"
  27605. },
  27606. "type": {
  27607. "type": "string",
  27608. "enum": ["session.next.model.switched"]
  27609. },
  27610. "properties": {
  27611. "type": "object",
  27612. "properties": {
  27613. "timestamp": {
  27614. "type": "number"
  27615. },
  27616. "sessionID": {
  27617. "type": "string",
  27618. "pattern": "^ses"
  27619. },
  27620. "messageID": {
  27621. "type": "string",
  27622. "pattern": "^msg_"
  27623. },
  27624. "model": {
  27625. "type": "object",
  27626. "properties": {
  27627. "id": {
  27628. "type": "string"
  27629. },
  27630. "providerID": {
  27631. "type": "string"
  27632. },
  27633. "variant": {
  27634. "type": "string"
  27635. }
  27636. },
  27637. "required": ["id", "providerID"],
  27638. "additionalProperties": false
  27639. }
  27640. },
  27641. "required": ["timestamp", "sessionID", "messageID", "model"],
  27642. "additionalProperties": false
  27643. }
  27644. },
  27645. "required": ["id", "type", "properties"],
  27646. "additionalProperties": false
  27647. },
  27648. "EventSessionNextMoved": {
  27649. "type": "object",
  27650. "properties": {
  27651. "id": {
  27652. "type": "string",
  27653. "pattern": "^evt_"
  27654. },
  27655. "type": {
  27656. "type": "string",
  27657. "enum": ["session.next.moved"]
  27658. },
  27659. "properties": {
  27660. "type": "object",
  27661. "properties": {
  27662. "timestamp": {
  27663. "type": "number"
  27664. },
  27665. "sessionID": {
  27666. "type": "string",
  27667. "pattern": "^ses"
  27668. },
  27669. "location": {
  27670. "$ref": "#/components/schemas/LocationRef"
  27671. },
  27672. "subdirectory": {
  27673. "type": "string"
  27674. }
  27675. },
  27676. "required": ["timestamp", "sessionID", "location"],
  27677. "additionalProperties": false
  27678. }
  27679. },
  27680. "required": ["id", "type", "properties"],
  27681. "additionalProperties": false
  27682. },
  27683. "EventSessionNextPrompted": {
  27684. "type": "object",
  27685. "properties": {
  27686. "id": {
  27687. "type": "string",
  27688. "pattern": "^evt_"
  27689. },
  27690. "type": {
  27691. "type": "string",
  27692. "enum": ["session.next.prompted"]
  27693. },
  27694. "properties": {
  27695. "type": "object",
  27696. "properties": {
  27697. "timestamp": {
  27698. "type": "number"
  27699. },
  27700. "sessionID": {
  27701. "type": "string",
  27702. "pattern": "^ses"
  27703. },
  27704. "messageID": {
  27705. "type": "string",
  27706. "pattern": "^msg_"
  27707. },
  27708. "prompt": {
  27709. "$ref": "#/components/schemas/Prompt"
  27710. },
  27711. "delivery": {
  27712. "type": "string",
  27713. "enum": ["steer", "queue"]
  27714. }
  27715. },
  27716. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27717. "additionalProperties": false
  27718. }
  27719. },
  27720. "required": ["id", "type", "properties"],
  27721. "additionalProperties": false
  27722. },
  27723. "EventSessionNextPromptAdmitted": {
  27724. "type": "object",
  27725. "properties": {
  27726. "id": {
  27727. "type": "string",
  27728. "pattern": "^evt_"
  27729. },
  27730. "type": {
  27731. "type": "string",
  27732. "enum": ["session.next.prompt.admitted"]
  27733. },
  27734. "properties": {
  27735. "type": "object",
  27736. "properties": {
  27737. "timestamp": {
  27738. "type": "number"
  27739. },
  27740. "sessionID": {
  27741. "type": "string",
  27742. "pattern": "^ses"
  27743. },
  27744. "messageID": {
  27745. "type": "string",
  27746. "pattern": "^msg_"
  27747. },
  27748. "prompt": {
  27749. "$ref": "#/components/schemas/Prompt"
  27750. },
  27751. "delivery": {
  27752. "type": "string",
  27753. "enum": ["steer", "queue"]
  27754. }
  27755. },
  27756. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27757. "additionalProperties": false
  27758. }
  27759. },
  27760. "required": ["id", "type", "properties"],
  27761. "additionalProperties": false
  27762. },
  27763. "EventSessionNextPromptPromoted": {
  27764. "type": "object",
  27765. "properties": {
  27766. "id": {
  27767. "type": "string",
  27768. "pattern": "^evt_"
  27769. },
  27770. "type": {
  27771. "type": "string",
  27772. "enum": ["session.next.prompt.promoted"]
  27773. },
  27774. "properties": {
  27775. "type": "object",
  27776. "properties": {
  27777. "timestamp": {
  27778. "type": "number"
  27779. },
  27780. "sessionID": {
  27781. "type": "string",
  27782. "pattern": "^ses"
  27783. },
  27784. "messageID": {
  27785. "type": "string",
  27786. "pattern": "^msg_"
  27787. },
  27788. "prompt": {
  27789. "$ref": "#/components/schemas/Prompt"
  27790. },
  27791. "timeCreated": {
  27792. "type": "number"
  27793. }
  27794. },
  27795. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  27796. "additionalProperties": false
  27797. }
  27798. },
  27799. "required": ["id", "type", "properties"],
  27800. "additionalProperties": false
  27801. },
  27802. "EventSessionNextInterruptRequested": {
  27803. "type": "object",
  27804. "properties": {
  27805. "id": {
  27806. "type": "string",
  27807. "pattern": "^evt_"
  27808. },
  27809. "type": {
  27810. "type": "string",
  27811. "enum": ["session.next.interrupt.requested"]
  27812. },
  27813. "properties": {
  27814. "type": "object",
  27815. "properties": {
  27816. "timestamp": {
  27817. "type": "number"
  27818. },
  27819. "sessionID": {
  27820. "type": "string",
  27821. "pattern": "^ses"
  27822. }
  27823. },
  27824. "required": ["timestamp", "sessionID"],
  27825. "additionalProperties": false
  27826. }
  27827. },
  27828. "required": ["id", "type", "properties"],
  27829. "additionalProperties": false
  27830. },
  27831. "EventSessionNextContextUpdated": {
  27832. "type": "object",
  27833. "properties": {
  27834. "id": {
  27835. "type": "string",
  27836. "pattern": "^evt_"
  27837. },
  27838. "type": {
  27839. "type": "string",
  27840. "enum": ["session.next.context.updated"]
  27841. },
  27842. "properties": {
  27843. "type": "object",
  27844. "properties": {
  27845. "timestamp": {
  27846. "type": "number"
  27847. },
  27848. "sessionID": {
  27849. "type": "string",
  27850. "pattern": "^ses"
  27851. },
  27852. "messageID": {
  27853. "type": "string",
  27854. "pattern": "^msg_"
  27855. },
  27856. "text": {
  27857. "type": "string"
  27858. }
  27859. },
  27860. "required": ["timestamp", "sessionID", "messageID", "text"],
  27861. "additionalProperties": false
  27862. }
  27863. },
  27864. "required": ["id", "type", "properties"],
  27865. "additionalProperties": false
  27866. },
  27867. "EventSessionNextSynthetic": {
  27868. "type": "object",
  27869. "properties": {
  27870. "id": {
  27871. "type": "string",
  27872. "pattern": "^evt_"
  27873. },
  27874. "type": {
  27875. "type": "string",
  27876. "enum": ["session.next.synthetic"]
  27877. },
  27878. "properties": {
  27879. "type": "object",
  27880. "properties": {
  27881. "timestamp": {
  27882. "type": "number"
  27883. },
  27884. "sessionID": {
  27885. "type": "string",
  27886. "pattern": "^ses"
  27887. },
  27888. "messageID": {
  27889. "type": "string",
  27890. "pattern": "^msg_"
  27891. },
  27892. "text": {
  27893. "type": "string"
  27894. }
  27895. },
  27896. "required": ["timestamp", "sessionID", "messageID", "text"],
  27897. "additionalProperties": false
  27898. }
  27899. },
  27900. "required": ["id", "type", "properties"],
  27901. "additionalProperties": false
  27902. },
  27903. "EventSessionNextShellStarted": {
  27904. "type": "object",
  27905. "properties": {
  27906. "id": {
  27907. "type": "string",
  27908. "pattern": "^evt_"
  27909. },
  27910. "type": {
  27911. "type": "string",
  27912. "enum": ["session.next.shell.started"]
  27913. },
  27914. "properties": {
  27915. "type": "object",
  27916. "properties": {
  27917. "timestamp": {
  27918. "type": "number"
  27919. },
  27920. "sessionID": {
  27921. "type": "string",
  27922. "pattern": "^ses"
  27923. },
  27924. "messageID": {
  27925. "type": "string",
  27926. "pattern": "^msg_"
  27927. },
  27928. "callID": {
  27929. "type": "string"
  27930. },
  27931. "command": {
  27932. "type": "string"
  27933. }
  27934. },
  27935. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  27936. "additionalProperties": false
  27937. }
  27938. },
  27939. "required": ["id", "type", "properties"],
  27940. "additionalProperties": false
  27941. },
  27942. "EventSessionNextShellEnded": {
  27943. "type": "object",
  27944. "properties": {
  27945. "id": {
  27946. "type": "string",
  27947. "pattern": "^evt_"
  27948. },
  27949. "type": {
  27950. "type": "string",
  27951. "enum": ["session.next.shell.ended"]
  27952. },
  27953. "properties": {
  27954. "type": "object",
  27955. "properties": {
  27956. "timestamp": {
  27957. "type": "number"
  27958. },
  27959. "sessionID": {
  27960. "type": "string",
  27961. "pattern": "^ses"
  27962. },
  27963. "callID": {
  27964. "type": "string"
  27965. },
  27966. "output": {
  27967. "type": "string"
  27968. }
  27969. },
  27970. "required": ["timestamp", "sessionID", "callID", "output"],
  27971. "additionalProperties": false
  27972. }
  27973. },
  27974. "required": ["id", "type", "properties"],
  27975. "additionalProperties": false
  27976. },
  27977. "EventSessionNextStepStarted": {
  27978. "type": "object",
  27979. "properties": {
  27980. "id": {
  27981. "type": "string",
  27982. "pattern": "^evt_"
  27983. },
  27984. "type": {
  27985. "type": "string",
  27986. "enum": ["session.next.step.started"]
  27987. },
  27988. "properties": {
  27989. "type": "object",
  27990. "properties": {
  27991. "timestamp": {
  27992. "type": "number"
  27993. },
  27994. "sessionID": {
  27995. "type": "string",
  27996. "pattern": "^ses"
  27997. },
  27998. "assistantMessageID": {
  27999. "type": "string",
  28000. "pattern": "^msg_"
  28001. },
  28002. "agent": {
  28003. "type": "string"
  28004. },
  28005. "model": {
  28006. "type": "object",
  28007. "properties": {
  28008. "id": {
  28009. "type": "string"
  28010. },
  28011. "providerID": {
  28012. "type": "string"
  28013. },
  28014. "variant": {
  28015. "type": "string"
  28016. }
  28017. },
  28018. "required": ["id", "providerID"],
  28019. "additionalProperties": false
  28020. },
  28021. "snapshot": {
  28022. "type": "string"
  28023. }
  28024. },
  28025. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28026. "additionalProperties": false
  28027. }
  28028. },
  28029. "required": ["id", "type", "properties"],
  28030. "additionalProperties": false
  28031. },
  28032. "EventSessionNextStepEnded": {
  28033. "type": "object",
  28034. "properties": {
  28035. "id": {
  28036. "type": "string",
  28037. "pattern": "^evt_"
  28038. },
  28039. "type": {
  28040. "type": "string",
  28041. "enum": ["session.next.step.ended"]
  28042. },
  28043. "properties": {
  28044. "type": "object",
  28045. "properties": {
  28046. "timestamp": {
  28047. "type": "number"
  28048. },
  28049. "sessionID": {
  28050. "type": "string",
  28051. "pattern": "^ses"
  28052. },
  28053. "assistantMessageID": {
  28054. "type": "string",
  28055. "pattern": "^msg_"
  28056. },
  28057. "finish": {
  28058. "type": "string"
  28059. },
  28060. "cost": {
  28061. "type": "number"
  28062. },
  28063. "tokens": {
  28064. "type": "object",
  28065. "properties": {
  28066. "input": {
  28067. "type": "number"
  28068. },
  28069. "output": {
  28070. "type": "number"
  28071. },
  28072. "reasoning": {
  28073. "type": "number"
  28074. },
  28075. "cache": {
  28076. "type": "object",
  28077. "properties": {
  28078. "read": {
  28079. "type": "number"
  28080. },
  28081. "write": {
  28082. "type": "number"
  28083. }
  28084. },
  28085. "required": ["read", "write"],
  28086. "additionalProperties": false
  28087. }
  28088. },
  28089. "required": ["input", "output", "reasoning", "cache"],
  28090. "additionalProperties": false
  28091. },
  28092. "snapshot": {
  28093. "type": "string"
  28094. }
  28095. },
  28096. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28097. "additionalProperties": false
  28098. }
  28099. },
  28100. "required": ["id", "type", "properties"],
  28101. "additionalProperties": false
  28102. },
  28103. "EventSessionNextStepFailed": {
  28104. "type": "object",
  28105. "properties": {
  28106. "id": {
  28107. "type": "string",
  28108. "pattern": "^evt_"
  28109. },
  28110. "type": {
  28111. "type": "string",
  28112. "enum": ["session.next.step.failed"]
  28113. },
  28114. "properties": {
  28115. "type": "object",
  28116. "properties": {
  28117. "timestamp": {
  28118. "type": "number"
  28119. },
  28120. "sessionID": {
  28121. "type": "string",
  28122. "pattern": "^ses"
  28123. },
  28124. "assistantMessageID": {
  28125. "type": "string",
  28126. "pattern": "^msg_"
  28127. },
  28128. "error": {
  28129. "$ref": "#/components/schemas/SessionErrorUnknown"
  28130. }
  28131. },
  28132. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28133. "additionalProperties": false
  28134. }
  28135. },
  28136. "required": ["id", "type", "properties"],
  28137. "additionalProperties": false
  28138. },
  28139. "EventSessionNextTextStarted": {
  28140. "type": "object",
  28141. "properties": {
  28142. "id": {
  28143. "type": "string",
  28144. "pattern": "^evt_"
  28145. },
  28146. "type": {
  28147. "type": "string",
  28148. "enum": ["session.next.text.started"]
  28149. },
  28150. "properties": {
  28151. "type": "object",
  28152. "properties": {
  28153. "timestamp": {
  28154. "type": "number"
  28155. },
  28156. "sessionID": {
  28157. "type": "string",
  28158. "pattern": "^ses"
  28159. },
  28160. "assistantMessageID": {
  28161. "type": "string",
  28162. "pattern": "^msg_"
  28163. },
  28164. "textID": {
  28165. "type": "string"
  28166. }
  28167. },
  28168. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28169. "additionalProperties": false
  28170. }
  28171. },
  28172. "required": ["id", "type", "properties"],
  28173. "additionalProperties": false
  28174. },
  28175. "EventSessionNextTextDelta": {
  28176. "type": "object",
  28177. "properties": {
  28178. "id": {
  28179. "type": "string",
  28180. "pattern": "^evt_"
  28181. },
  28182. "type": {
  28183. "type": "string",
  28184. "enum": ["session.next.text.delta"]
  28185. },
  28186. "properties": {
  28187. "type": "object",
  28188. "properties": {
  28189. "timestamp": {
  28190. "type": "number"
  28191. },
  28192. "sessionID": {
  28193. "type": "string",
  28194. "pattern": "^ses"
  28195. },
  28196. "assistantMessageID": {
  28197. "type": "string",
  28198. "pattern": "^msg_"
  28199. },
  28200. "textID": {
  28201. "type": "string"
  28202. },
  28203. "delta": {
  28204. "type": "string"
  28205. }
  28206. },
  28207. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28208. "additionalProperties": false
  28209. }
  28210. },
  28211. "required": ["id", "type", "properties"],
  28212. "additionalProperties": false
  28213. },
  28214. "EventSessionNextTextEnded": {
  28215. "type": "object",
  28216. "properties": {
  28217. "id": {
  28218. "type": "string",
  28219. "pattern": "^evt_"
  28220. },
  28221. "type": {
  28222. "type": "string",
  28223. "enum": ["session.next.text.ended"]
  28224. },
  28225. "properties": {
  28226. "type": "object",
  28227. "properties": {
  28228. "timestamp": {
  28229. "type": "number"
  28230. },
  28231. "sessionID": {
  28232. "type": "string",
  28233. "pattern": "^ses"
  28234. },
  28235. "assistantMessageID": {
  28236. "type": "string",
  28237. "pattern": "^msg_"
  28238. },
  28239. "textID": {
  28240. "type": "string"
  28241. },
  28242. "text": {
  28243. "type": "string"
  28244. }
  28245. },
  28246. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28247. "additionalProperties": false
  28248. }
  28249. },
  28250. "required": ["id", "type", "properties"],
  28251. "additionalProperties": false
  28252. },
  28253. "EventSessionNextReasoningStarted": {
  28254. "type": "object",
  28255. "properties": {
  28256. "id": {
  28257. "type": "string",
  28258. "pattern": "^evt_"
  28259. },
  28260. "type": {
  28261. "type": "string",
  28262. "enum": ["session.next.reasoning.started"]
  28263. },
  28264. "properties": {
  28265. "type": "object",
  28266. "properties": {
  28267. "timestamp": {
  28268. "type": "number"
  28269. },
  28270. "sessionID": {
  28271. "type": "string",
  28272. "pattern": "^ses"
  28273. },
  28274. "assistantMessageID": {
  28275. "type": "string",
  28276. "pattern": "^msg_"
  28277. },
  28278. "reasoningID": {
  28279. "type": "string"
  28280. },
  28281. "providerMetadata": {
  28282. "type": "object",
  28283. "additionalProperties": {
  28284. "type": "object"
  28285. }
  28286. }
  28287. },
  28288. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28289. "additionalProperties": false
  28290. }
  28291. },
  28292. "required": ["id", "type", "properties"],
  28293. "additionalProperties": false
  28294. },
  28295. "EventSessionNextReasoningDelta": {
  28296. "type": "object",
  28297. "properties": {
  28298. "id": {
  28299. "type": "string",
  28300. "pattern": "^evt_"
  28301. },
  28302. "type": {
  28303. "type": "string",
  28304. "enum": ["session.next.reasoning.delta"]
  28305. },
  28306. "properties": {
  28307. "type": "object",
  28308. "properties": {
  28309. "timestamp": {
  28310. "type": "number"
  28311. },
  28312. "sessionID": {
  28313. "type": "string",
  28314. "pattern": "^ses"
  28315. },
  28316. "assistantMessageID": {
  28317. "type": "string",
  28318. "pattern": "^msg_"
  28319. },
  28320. "reasoningID": {
  28321. "type": "string"
  28322. },
  28323. "delta": {
  28324. "type": "string"
  28325. }
  28326. },
  28327. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28328. "additionalProperties": false
  28329. }
  28330. },
  28331. "required": ["id", "type", "properties"],
  28332. "additionalProperties": false
  28333. },
  28334. "EventSessionNextReasoningEnded": {
  28335. "type": "object",
  28336. "properties": {
  28337. "id": {
  28338. "type": "string",
  28339. "pattern": "^evt_"
  28340. },
  28341. "type": {
  28342. "type": "string",
  28343. "enum": ["session.next.reasoning.ended"]
  28344. },
  28345. "properties": {
  28346. "type": "object",
  28347. "properties": {
  28348. "timestamp": {
  28349. "type": "number"
  28350. },
  28351. "sessionID": {
  28352. "type": "string",
  28353. "pattern": "^ses"
  28354. },
  28355. "assistantMessageID": {
  28356. "type": "string",
  28357. "pattern": "^msg_"
  28358. },
  28359. "reasoningID": {
  28360. "type": "string"
  28361. },
  28362. "text": {
  28363. "type": "string"
  28364. },
  28365. "providerMetadata": {
  28366. "type": "object",
  28367. "additionalProperties": {
  28368. "type": "object"
  28369. }
  28370. }
  28371. },
  28372. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28373. "additionalProperties": false
  28374. }
  28375. },
  28376. "required": ["id", "type", "properties"],
  28377. "additionalProperties": false
  28378. },
  28379. "EventSessionNextToolInputStarted": {
  28380. "type": "object",
  28381. "properties": {
  28382. "id": {
  28383. "type": "string",
  28384. "pattern": "^evt_"
  28385. },
  28386. "type": {
  28387. "type": "string",
  28388. "enum": ["session.next.tool.input.started"]
  28389. },
  28390. "properties": {
  28391. "type": "object",
  28392. "properties": {
  28393. "timestamp": {
  28394. "type": "number"
  28395. },
  28396. "sessionID": {
  28397. "type": "string",
  28398. "pattern": "^ses"
  28399. },
  28400. "assistantMessageID": {
  28401. "type": "string",
  28402. "pattern": "^msg_"
  28403. },
  28404. "callID": {
  28405. "type": "string"
  28406. },
  28407. "name": {
  28408. "type": "string"
  28409. }
  28410. },
  28411. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28412. "additionalProperties": false
  28413. }
  28414. },
  28415. "required": ["id", "type", "properties"],
  28416. "additionalProperties": false
  28417. },
  28418. "EventSessionNextToolInputDelta": {
  28419. "type": "object",
  28420. "properties": {
  28421. "id": {
  28422. "type": "string",
  28423. "pattern": "^evt_"
  28424. },
  28425. "type": {
  28426. "type": "string",
  28427. "enum": ["session.next.tool.input.delta"]
  28428. },
  28429. "properties": {
  28430. "type": "object",
  28431. "properties": {
  28432. "timestamp": {
  28433. "type": "number"
  28434. },
  28435. "sessionID": {
  28436. "type": "string",
  28437. "pattern": "^ses"
  28438. },
  28439. "assistantMessageID": {
  28440. "type": "string",
  28441. "pattern": "^msg_"
  28442. },
  28443. "callID": {
  28444. "type": "string"
  28445. },
  28446. "delta": {
  28447. "type": "string"
  28448. }
  28449. },
  28450. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28451. "additionalProperties": false
  28452. }
  28453. },
  28454. "required": ["id", "type", "properties"],
  28455. "additionalProperties": false
  28456. },
  28457. "EventSessionNextToolInputEnded": {
  28458. "type": "object",
  28459. "properties": {
  28460. "id": {
  28461. "type": "string",
  28462. "pattern": "^evt_"
  28463. },
  28464. "type": {
  28465. "type": "string",
  28466. "enum": ["session.next.tool.input.ended"]
  28467. },
  28468. "properties": {
  28469. "type": "object",
  28470. "properties": {
  28471. "timestamp": {
  28472. "type": "number"
  28473. },
  28474. "sessionID": {
  28475. "type": "string",
  28476. "pattern": "^ses"
  28477. },
  28478. "assistantMessageID": {
  28479. "type": "string",
  28480. "pattern": "^msg_"
  28481. },
  28482. "callID": {
  28483. "type": "string"
  28484. },
  28485. "text": {
  28486. "type": "string"
  28487. }
  28488. },
  28489. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28490. "additionalProperties": false
  28491. }
  28492. },
  28493. "required": ["id", "type", "properties"],
  28494. "additionalProperties": false
  28495. },
  28496. "EventSessionNextToolCalled": {
  28497. "type": "object",
  28498. "properties": {
  28499. "id": {
  28500. "type": "string",
  28501. "pattern": "^evt_"
  28502. },
  28503. "type": {
  28504. "type": "string",
  28505. "enum": ["session.next.tool.called"]
  28506. },
  28507. "properties": {
  28508. "type": "object",
  28509. "properties": {
  28510. "timestamp": {
  28511. "type": "number"
  28512. },
  28513. "sessionID": {
  28514. "type": "string",
  28515. "pattern": "^ses"
  28516. },
  28517. "assistantMessageID": {
  28518. "type": "string",
  28519. "pattern": "^msg_"
  28520. },
  28521. "callID": {
  28522. "type": "string"
  28523. },
  28524. "tool": {
  28525. "type": "string"
  28526. },
  28527. "input": {
  28528. "type": "object"
  28529. },
  28530. "provider": {
  28531. "type": "object",
  28532. "properties": {
  28533. "executed": {
  28534. "type": "boolean"
  28535. },
  28536. "metadata": {
  28537. "type": "object",
  28538. "additionalProperties": {
  28539. "type": "object"
  28540. }
  28541. }
  28542. },
  28543. "required": ["executed"],
  28544. "additionalProperties": false
  28545. }
  28546. },
  28547. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28548. "additionalProperties": false
  28549. }
  28550. },
  28551. "required": ["id", "type", "properties"],
  28552. "additionalProperties": false
  28553. },
  28554. "EventSessionNextToolProgress": {
  28555. "type": "object",
  28556. "properties": {
  28557. "id": {
  28558. "type": "string",
  28559. "pattern": "^evt_"
  28560. },
  28561. "type": {
  28562. "type": "string",
  28563. "enum": ["session.next.tool.progress"]
  28564. },
  28565. "properties": {
  28566. "type": "object",
  28567. "properties": {
  28568. "timestamp": {
  28569. "type": "number"
  28570. },
  28571. "sessionID": {
  28572. "type": "string",
  28573. "pattern": "^ses"
  28574. },
  28575. "assistantMessageID": {
  28576. "type": "string",
  28577. "pattern": "^msg_"
  28578. },
  28579. "callID": {
  28580. "type": "string"
  28581. },
  28582. "structured": {
  28583. "type": "object"
  28584. },
  28585. "content": {
  28586. "type": "array",
  28587. "items": {
  28588. "anyOf": [
  28589. {
  28590. "$ref": "#/components/schemas/ToolTextContent"
  28591. },
  28592. {
  28593. "$ref": "#/components/schemas/ToolFileContent"
  28594. }
  28595. ]
  28596. }
  28597. }
  28598. },
  28599. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28600. "additionalProperties": false
  28601. }
  28602. },
  28603. "required": ["id", "type", "properties"],
  28604. "additionalProperties": false
  28605. },
  28606. "EventSessionNextToolSuccess": {
  28607. "type": "object",
  28608. "properties": {
  28609. "id": {
  28610. "type": "string",
  28611. "pattern": "^evt_"
  28612. },
  28613. "type": {
  28614. "type": "string",
  28615. "enum": ["session.next.tool.success"]
  28616. },
  28617. "properties": {
  28618. "type": "object",
  28619. "properties": {
  28620. "timestamp": {
  28621. "type": "number"
  28622. },
  28623. "sessionID": {
  28624. "type": "string",
  28625. "pattern": "^ses"
  28626. },
  28627. "assistantMessageID": {
  28628. "type": "string",
  28629. "pattern": "^msg_"
  28630. },
  28631. "callID": {
  28632. "type": "string"
  28633. },
  28634. "structured": {
  28635. "type": "object"
  28636. },
  28637. "content": {
  28638. "type": "array",
  28639. "items": {
  28640. "anyOf": [
  28641. {
  28642. "$ref": "#/components/schemas/ToolTextContent"
  28643. },
  28644. {
  28645. "$ref": "#/components/schemas/ToolFileContent"
  28646. }
  28647. ]
  28648. }
  28649. },
  28650. "outputPaths": {
  28651. "type": "array",
  28652. "items": {
  28653. "type": "string"
  28654. }
  28655. },
  28656. "result": {},
  28657. "provider": {
  28658. "type": "object",
  28659. "properties": {
  28660. "executed": {
  28661. "type": "boolean"
  28662. },
  28663. "metadata": {
  28664. "type": "object",
  28665. "additionalProperties": {
  28666. "type": "object"
  28667. }
  28668. }
  28669. },
  28670. "required": ["executed"],
  28671. "additionalProperties": false
  28672. }
  28673. },
  28674. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  28675. "additionalProperties": false
  28676. }
  28677. },
  28678. "required": ["id", "type", "properties"],
  28679. "additionalProperties": false
  28680. },
  28681. "EventSessionNextToolFailed": {
  28682. "type": "object",
  28683. "properties": {
  28684. "id": {
  28685. "type": "string",
  28686. "pattern": "^evt_"
  28687. },
  28688. "type": {
  28689. "type": "string",
  28690. "enum": ["session.next.tool.failed"]
  28691. },
  28692. "properties": {
  28693. "type": "object",
  28694. "properties": {
  28695. "timestamp": {
  28696. "type": "number"
  28697. },
  28698. "sessionID": {
  28699. "type": "string",
  28700. "pattern": "^ses"
  28701. },
  28702. "assistantMessageID": {
  28703. "type": "string",
  28704. "pattern": "^msg_"
  28705. },
  28706. "callID": {
  28707. "type": "string"
  28708. },
  28709. "error": {
  28710. "$ref": "#/components/schemas/SessionErrorUnknown"
  28711. },
  28712. "result": {},
  28713. "provider": {
  28714. "type": "object",
  28715. "properties": {
  28716. "executed": {
  28717. "type": "boolean"
  28718. },
  28719. "metadata": {
  28720. "type": "object",
  28721. "additionalProperties": {
  28722. "type": "object"
  28723. }
  28724. }
  28725. },
  28726. "required": ["executed"],
  28727. "additionalProperties": false
  28728. }
  28729. },
  28730. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  28731. "additionalProperties": false
  28732. }
  28733. },
  28734. "required": ["id", "type", "properties"],
  28735. "additionalProperties": false
  28736. },
  28737. "EventSessionNextRetried": {
  28738. "type": "object",
  28739. "properties": {
  28740. "id": {
  28741. "type": "string",
  28742. "pattern": "^evt_"
  28743. },
  28744. "type": {
  28745. "type": "string",
  28746. "enum": ["session.next.retried"]
  28747. },
  28748. "properties": {
  28749. "type": "object",
  28750. "properties": {
  28751. "timestamp": {
  28752. "type": "number"
  28753. },
  28754. "sessionID": {
  28755. "type": "string",
  28756. "pattern": "^ses"
  28757. },
  28758. "attempt": {
  28759. "type": "number"
  28760. },
  28761. "error": {
  28762. "$ref": "#/components/schemas/SessionNextRetry_error"
  28763. }
  28764. },
  28765. "required": ["timestamp", "sessionID", "attempt", "error"],
  28766. "additionalProperties": false
  28767. }
  28768. },
  28769. "required": ["id", "type", "properties"],
  28770. "additionalProperties": false
  28771. },
  28772. "EventSessionNextCompactionStarted": {
  28773. "type": "object",
  28774. "properties": {
  28775. "id": {
  28776. "type": "string",
  28777. "pattern": "^evt_"
  28778. },
  28779. "type": {
  28780. "type": "string",
  28781. "enum": ["session.next.compaction.started"]
  28782. },
  28783. "properties": {
  28784. "type": "object",
  28785. "properties": {
  28786. "timestamp": {
  28787. "type": "number"
  28788. },
  28789. "sessionID": {
  28790. "type": "string",
  28791. "pattern": "^ses"
  28792. },
  28793. "messageID": {
  28794. "type": "string",
  28795. "pattern": "^msg_"
  28796. },
  28797. "reason": {
  28798. "type": "string",
  28799. "enum": ["auto", "manual"]
  28800. }
  28801. },
  28802. "required": ["timestamp", "sessionID", "messageID", "reason"],
  28803. "additionalProperties": false
  28804. }
  28805. },
  28806. "required": ["id", "type", "properties"],
  28807. "additionalProperties": false
  28808. },
  28809. "EventSessionNextCompactionDelta": {
  28810. "type": "object",
  28811. "properties": {
  28812. "id": {
  28813. "type": "string",
  28814. "pattern": "^evt_"
  28815. },
  28816. "type": {
  28817. "type": "string",
  28818. "enum": ["session.next.compaction.delta"]
  28819. },
  28820. "properties": {
  28821. "type": "object",
  28822. "properties": {
  28823. "timestamp": {
  28824. "type": "number"
  28825. },
  28826. "sessionID": {
  28827. "type": "string",
  28828. "pattern": "^ses"
  28829. },
  28830. "messageID": {
  28831. "type": "string",
  28832. "pattern": "^msg_"
  28833. },
  28834. "text": {
  28835. "type": "string"
  28836. }
  28837. },
  28838. "required": ["timestamp", "sessionID", "messageID", "text"],
  28839. "additionalProperties": false
  28840. }
  28841. },
  28842. "required": ["id", "type", "properties"],
  28843. "additionalProperties": false
  28844. },
  28845. "EventSessionNextCompactionEnded": {
  28846. "type": "object",
  28847. "properties": {
  28848. "id": {
  28849. "type": "string",
  28850. "pattern": "^evt_"
  28851. },
  28852. "type": {
  28853. "type": "string",
  28854. "enum": ["session.next.compaction.ended"]
  28855. },
  28856. "properties": {
  28857. "type": "object",
  28858. "properties": {
  28859. "timestamp": {
  28860. "type": "number"
  28861. },
  28862. "sessionID": {
  28863. "type": "string",
  28864. "pattern": "^ses"
  28865. },
  28866. "messageID": {
  28867. "type": "string",
  28868. "pattern": "^msg_"
  28869. },
  28870. "reason": {
  28871. "type": "string",
  28872. "enum": ["auto", "manual"]
  28873. },
  28874. "text": {
  28875. "type": "string"
  28876. },
  28877. "recent": {
  28878. "type": "string"
  28879. }
  28880. },
  28881. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  28882. "additionalProperties": false
  28883. }
  28884. },
  28885. "required": ["id", "type", "properties"],
  28886. "additionalProperties": false
  28887. },
  28888. "EventMessagePartDelta": {
  28889. "type": "object",
  28890. "properties": {
  28891. "id": {
  28892. "type": "string",
  28893. "pattern": "^evt_"
  28894. },
  28895. "type": {
  28896. "type": "string",
  28897. "enum": ["message.part.delta"]
  28898. },
  28899. "properties": {
  28900. "type": "object",
  28901. "properties": {
  28902. "sessionID": {
  28903. "type": "string",
  28904. "pattern": "^ses"
  28905. },
  28906. "messageID": {
  28907. "type": "string",
  28908. "pattern": "^msg"
  28909. },
  28910. "partID": {
  28911. "type": "string",
  28912. "pattern": "^prt"
  28913. },
  28914. "field": {
  28915. "type": "string"
  28916. },
  28917. "delta": {
  28918. "type": "string"
  28919. }
  28920. },
  28921. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  28922. "additionalProperties": false
  28923. }
  28924. },
  28925. "required": ["id", "type", "properties"],
  28926. "additionalProperties": false
  28927. },
  28928. "EventSessionDiff": {
  28929. "type": "object",
  28930. "properties": {
  28931. "id": {
  28932. "type": "string",
  28933. "pattern": "^evt_"
  28934. },
  28935. "type": {
  28936. "type": "string",
  28937. "enum": ["session.diff"]
  28938. },
  28939. "properties": {
  28940. "type": "object",
  28941. "properties": {
  28942. "sessionID": {
  28943. "type": "string",
  28944. "pattern": "^ses"
  28945. },
  28946. "diff": {
  28947. "type": "array",
  28948. "items": {
  28949. "$ref": "#/components/schemas/SnapshotFileDiff"
  28950. }
  28951. }
  28952. },
  28953. "required": ["sessionID", "diff"],
  28954. "additionalProperties": false
  28955. }
  28956. },
  28957. "required": ["id", "type", "properties"],
  28958. "additionalProperties": false
  28959. },
  28960. "EventSessionError": {
  28961. "type": "object",
  28962. "properties": {
  28963. "id": {
  28964. "type": "string",
  28965. "pattern": "^evt_"
  28966. },
  28967. "type": {
  28968. "type": "string",
  28969. "enum": ["session.error"]
  28970. },
  28971. "properties": {
  28972. "type": "object",
  28973. "properties": {
  28974. "sessionID": {
  28975. "type": "string",
  28976. "pattern": "^ses"
  28977. },
  28978. "error": {
  28979. "anyOf": [
  28980. {
  28981. "$ref": "#/components/schemas/ProviderAuthError"
  28982. },
  28983. {
  28984. "$ref": "#/components/schemas/UnknownError"
  28985. },
  28986. {
  28987. "$ref": "#/components/schemas/MessageOutputLengthError"
  28988. },
  28989. {
  28990. "$ref": "#/components/schemas/MessageAbortedError"
  28991. },
  28992. {
  28993. "$ref": "#/components/schemas/StructuredOutputError"
  28994. },
  28995. {
  28996. "$ref": "#/components/schemas/ContextOverflowError"
  28997. },
  28998. {
  28999. "$ref": "#/components/schemas/ContentFilterError"
  29000. },
  29001. {
  29002. "$ref": "#/components/schemas/APIError"
  29003. }
  29004. ]
  29005. }
  29006. },
  29007. "additionalProperties": false
  29008. }
  29009. },
  29010. "required": ["id", "type", "properties"],
  29011. "additionalProperties": false
  29012. },
  29013. "EventInstallationUpdated": {
  29014. "type": "object",
  29015. "properties": {
  29016. "id": {
  29017. "type": "string",
  29018. "pattern": "^evt_"
  29019. },
  29020. "type": {
  29021. "type": "string",
  29022. "enum": ["installation.updated"]
  29023. },
  29024. "properties": {
  29025. "type": "object",
  29026. "properties": {
  29027. "version": {
  29028. "type": "string"
  29029. }
  29030. },
  29031. "required": ["version"],
  29032. "additionalProperties": false
  29033. }
  29034. },
  29035. "required": ["id", "type", "properties"],
  29036. "additionalProperties": false
  29037. },
  29038. "EventInstallationUpdate-available": {
  29039. "type": "object",
  29040. "properties": {
  29041. "id": {
  29042. "type": "string",
  29043. "pattern": "^evt_"
  29044. },
  29045. "type": {
  29046. "type": "string",
  29047. "enum": ["installation.update-available"]
  29048. },
  29049. "properties": {
  29050. "type": "object",
  29051. "properties": {
  29052. "version": {
  29053. "type": "string"
  29054. }
  29055. },
  29056. "required": ["version"],
  29057. "additionalProperties": false
  29058. }
  29059. },
  29060. "required": ["id", "type", "properties"],
  29061. "additionalProperties": false
  29062. },
  29063. "EventFileEdited": {
  29064. "type": "object",
  29065. "properties": {
  29066. "id": {
  29067. "type": "string",
  29068. "pattern": "^evt_"
  29069. },
  29070. "type": {
  29071. "type": "string",
  29072. "enum": ["file.edited"]
  29073. },
  29074. "properties": {
  29075. "type": "object",
  29076. "properties": {
  29077. "file": {
  29078. "type": "string"
  29079. }
  29080. },
  29081. "required": ["file"],
  29082. "additionalProperties": false
  29083. }
  29084. },
  29085. "required": ["id", "type", "properties"],
  29086. "additionalProperties": false
  29087. },
  29088. "EventIntegrationUpdated": {
  29089. "type": "object",
  29090. "properties": {
  29091. "id": {
  29092. "type": "string",
  29093. "pattern": "^evt_"
  29094. },
  29095. "type": {
  29096. "type": "string",
  29097. "enum": ["integration.updated"]
  29098. },
  29099. "properties": {
  29100. "type": "object",
  29101. "properties": {}
  29102. }
  29103. },
  29104. "required": ["id", "type", "properties"],
  29105. "additionalProperties": false
  29106. },
  29107. "EventPermissionV2Asked": {
  29108. "type": "object",
  29109. "properties": {
  29110. "id": {
  29111. "type": "string",
  29112. "pattern": "^evt_"
  29113. },
  29114. "type": {
  29115. "type": "string",
  29116. "enum": ["permission.v2.asked"]
  29117. },
  29118. "properties": {
  29119. "type": "object",
  29120. "properties": {
  29121. "id": {
  29122. "type": "string",
  29123. "pattern": "^per"
  29124. },
  29125. "sessionID": {
  29126. "type": "string",
  29127. "pattern": "^ses"
  29128. },
  29129. "action": {
  29130. "type": "string"
  29131. },
  29132. "resources": {
  29133. "type": "array",
  29134. "items": {
  29135. "type": "string"
  29136. }
  29137. },
  29138. "save": {
  29139. "type": "array",
  29140. "items": {
  29141. "type": "string"
  29142. }
  29143. },
  29144. "metadata": {
  29145. "type": "object"
  29146. },
  29147. "source": {
  29148. "$ref": "#/components/schemas/PermissionV2Source"
  29149. }
  29150. },
  29151. "required": ["id", "sessionID", "action", "resources"],
  29152. "additionalProperties": false
  29153. }
  29154. },
  29155. "required": ["id", "type", "properties"],
  29156. "additionalProperties": false
  29157. },
  29158. "EventPermissionV2Replied": {
  29159. "type": "object",
  29160. "properties": {
  29161. "id": {
  29162. "type": "string",
  29163. "pattern": "^evt_"
  29164. },
  29165. "type": {
  29166. "type": "string",
  29167. "enum": ["permission.v2.replied"]
  29168. },
  29169. "properties": {
  29170. "type": "object",
  29171. "properties": {
  29172. "sessionID": {
  29173. "type": "string",
  29174. "pattern": "^ses"
  29175. },
  29176. "requestID": {
  29177. "type": "string",
  29178. "pattern": "^per"
  29179. },
  29180. "reply": {
  29181. "$ref": "#/components/schemas/PermissionV2Reply"
  29182. }
  29183. },
  29184. "required": ["sessionID", "requestID", "reply"],
  29185. "additionalProperties": false
  29186. }
  29187. },
  29188. "required": ["id", "type", "properties"],
  29189. "additionalProperties": false
  29190. },
  29191. "EventReferenceUpdated": {
  29192. "type": "object",
  29193. "properties": {
  29194. "id": {
  29195. "type": "string",
  29196. "pattern": "^evt_"
  29197. },
  29198. "type": {
  29199. "type": "string",
  29200. "enum": ["reference.updated"]
  29201. },
  29202. "properties": {
  29203. "type": "object",
  29204. "properties": {}
  29205. }
  29206. },
  29207. "required": ["id", "type", "properties"],
  29208. "additionalProperties": false
  29209. },
  29210. "EventFileWatcherUpdated": {
  29211. "type": "object",
  29212. "properties": {
  29213. "id": {
  29214. "type": "string",
  29215. "pattern": "^evt_"
  29216. },
  29217. "type": {
  29218. "type": "string",
  29219. "enum": ["file.watcher.updated"]
  29220. },
  29221. "properties": {
  29222. "type": "object",
  29223. "properties": {
  29224. "file": {
  29225. "type": "string"
  29226. },
  29227. "event": {
  29228. "type": "string",
  29229. "enum": ["add", "change", "unlink"]
  29230. }
  29231. },
  29232. "required": ["file", "event"],
  29233. "additionalProperties": false
  29234. }
  29235. },
  29236. "required": ["id", "type", "properties"],
  29237. "additionalProperties": false
  29238. },
  29239. "EventPtyCreated": {
  29240. "type": "object",
  29241. "properties": {
  29242. "id": {
  29243. "type": "string",
  29244. "pattern": "^evt_"
  29245. },
  29246. "type": {
  29247. "type": "string",
  29248. "enum": ["pty.created"]
  29249. },
  29250. "properties": {
  29251. "type": "object",
  29252. "properties": {
  29253. "info": {
  29254. "$ref": "#/components/schemas/Pty"
  29255. }
  29256. },
  29257. "required": ["info"],
  29258. "additionalProperties": false
  29259. }
  29260. },
  29261. "required": ["id", "type", "properties"],
  29262. "additionalProperties": false
  29263. },
  29264. "EventPtyUpdated": {
  29265. "type": "object",
  29266. "properties": {
  29267. "id": {
  29268. "type": "string",
  29269. "pattern": "^evt_"
  29270. },
  29271. "type": {
  29272. "type": "string",
  29273. "enum": ["pty.updated"]
  29274. },
  29275. "properties": {
  29276. "type": "object",
  29277. "properties": {
  29278. "info": {
  29279. "$ref": "#/components/schemas/Pty"
  29280. }
  29281. },
  29282. "required": ["info"],
  29283. "additionalProperties": false
  29284. }
  29285. },
  29286. "required": ["id", "type", "properties"],
  29287. "additionalProperties": false
  29288. },
  29289. "EventPtyExited": {
  29290. "type": "object",
  29291. "properties": {
  29292. "id": {
  29293. "type": "string",
  29294. "pattern": "^evt_"
  29295. },
  29296. "type": {
  29297. "type": "string",
  29298. "enum": ["pty.exited"]
  29299. },
  29300. "properties": {
  29301. "type": "object",
  29302. "properties": {
  29303. "id": {
  29304. "type": "string",
  29305. "pattern": "^pty"
  29306. },
  29307. "exitCode": {
  29308. "type": "integer",
  29309. "minimum": 0
  29310. }
  29311. },
  29312. "required": ["id", "exitCode"],
  29313. "additionalProperties": false
  29314. }
  29315. },
  29316. "required": ["id", "type", "properties"],
  29317. "additionalProperties": false
  29318. },
  29319. "EventPtyDeleted": {
  29320. "type": "object",
  29321. "properties": {
  29322. "id": {
  29323. "type": "string",
  29324. "pattern": "^evt_"
  29325. },
  29326. "type": {
  29327. "type": "string",
  29328. "enum": ["pty.deleted"]
  29329. },
  29330. "properties": {
  29331. "type": "object",
  29332. "properties": {
  29333. "id": {
  29334. "type": "string",
  29335. "pattern": "^pty"
  29336. }
  29337. },
  29338. "required": ["id"],
  29339. "additionalProperties": false
  29340. }
  29341. },
  29342. "required": ["id", "type", "properties"],
  29343. "additionalProperties": false
  29344. },
  29345. "EventQuestionV2Asked": {
  29346. "type": "object",
  29347. "properties": {
  29348. "id": {
  29349. "type": "string",
  29350. "pattern": "^evt_"
  29351. },
  29352. "type": {
  29353. "type": "string",
  29354. "enum": ["question.v2.asked"]
  29355. },
  29356. "properties": {
  29357. "type": "object",
  29358. "properties": {
  29359. "id": {
  29360. "type": "string",
  29361. "pattern": "^que"
  29362. },
  29363. "sessionID": {
  29364. "type": "string",
  29365. "pattern": "^ses"
  29366. },
  29367. "questions": {
  29368. "type": "array",
  29369. "items": {
  29370. "$ref": "#/components/schemas/QuestionV2Info"
  29371. },
  29372. "description": "Questions to ask"
  29373. },
  29374. "tool": {
  29375. "$ref": "#/components/schemas/QuestionV2Tool"
  29376. }
  29377. },
  29378. "required": ["id", "sessionID", "questions"],
  29379. "additionalProperties": false
  29380. }
  29381. },
  29382. "required": ["id", "type", "properties"],
  29383. "additionalProperties": false
  29384. },
  29385. "EventQuestionV2Replied": {
  29386. "type": "object",
  29387. "properties": {
  29388. "id": {
  29389. "type": "string",
  29390. "pattern": "^evt_"
  29391. },
  29392. "type": {
  29393. "type": "string",
  29394. "enum": ["question.v2.replied"]
  29395. },
  29396. "properties": {
  29397. "type": "object",
  29398. "properties": {
  29399. "sessionID": {
  29400. "type": "string",
  29401. "pattern": "^ses"
  29402. },
  29403. "requestID": {
  29404. "type": "string",
  29405. "pattern": "^que"
  29406. },
  29407. "answers": {
  29408. "type": "array",
  29409. "items": {
  29410. "$ref": "#/components/schemas/QuestionV2Answer"
  29411. }
  29412. }
  29413. },
  29414. "required": ["sessionID", "requestID", "answers"],
  29415. "additionalProperties": false
  29416. }
  29417. },
  29418. "required": ["id", "type", "properties"],
  29419. "additionalProperties": false
  29420. },
  29421. "EventQuestionV2Rejected": {
  29422. "type": "object",
  29423. "properties": {
  29424. "id": {
  29425. "type": "string",
  29426. "pattern": "^evt_"
  29427. },
  29428. "type": {
  29429. "type": "string",
  29430. "enum": ["question.v2.rejected"]
  29431. },
  29432. "properties": {
  29433. "type": "object",
  29434. "properties": {
  29435. "sessionID": {
  29436. "type": "string",
  29437. "pattern": "^ses"
  29438. },
  29439. "requestID": {
  29440. "type": "string",
  29441. "pattern": "^que"
  29442. }
  29443. },
  29444. "required": ["sessionID", "requestID"],
  29445. "additionalProperties": false
  29446. }
  29447. },
  29448. "required": ["id", "type", "properties"],
  29449. "additionalProperties": false
  29450. },
  29451. "EventTodoUpdated": {
  29452. "type": "object",
  29453. "properties": {
  29454. "id": {
  29455. "type": "string",
  29456. "pattern": "^evt_"
  29457. },
  29458. "type": {
  29459. "type": "string",
  29460. "enum": ["todo.updated"]
  29461. },
  29462. "properties": {
  29463. "type": "object",
  29464. "properties": {
  29465. "sessionID": {
  29466. "type": "string",
  29467. "pattern": "^ses"
  29468. },
  29469. "todos": {
  29470. "type": "array",
  29471. "items": {
  29472. "$ref": "#/components/schemas/Todo"
  29473. }
  29474. }
  29475. },
  29476. "required": ["sessionID", "todos"],
  29477. "additionalProperties": false
  29478. }
  29479. },
  29480. "required": ["id", "type", "properties"],
  29481. "additionalProperties": false
  29482. },
  29483. "EventLspUpdated": {
  29484. "type": "object",
  29485. "properties": {
  29486. "id": {
  29487. "type": "string",
  29488. "pattern": "^evt_"
  29489. },
  29490. "type": {
  29491. "type": "string",
  29492. "enum": ["lsp.updated"]
  29493. },
  29494. "properties": {
  29495. "type": "object",
  29496. "properties": {}
  29497. }
  29498. },
  29499. "required": ["id", "type", "properties"],
  29500. "additionalProperties": false
  29501. },
  29502. "EventPermissionAsked": {
  29503. "type": "object",
  29504. "properties": {
  29505. "id": {
  29506. "type": "string",
  29507. "pattern": "^evt_"
  29508. },
  29509. "type": {
  29510. "type": "string",
  29511. "enum": ["permission.asked"]
  29512. },
  29513. "properties": {
  29514. "type": "object",
  29515. "properties": {
  29516. "id": {
  29517. "type": "string",
  29518. "pattern": "^per"
  29519. },
  29520. "sessionID": {
  29521. "type": "string",
  29522. "pattern": "^ses"
  29523. },
  29524. "permission": {
  29525. "type": "string"
  29526. },
  29527. "patterns": {
  29528. "type": "array",
  29529. "items": {
  29530. "type": "string"
  29531. }
  29532. },
  29533. "metadata": {
  29534. "type": "object"
  29535. },
  29536. "always": {
  29537. "type": "array",
  29538. "items": {
  29539. "type": "string"
  29540. }
  29541. },
  29542. "tool": {
  29543. "type": "object",
  29544. "properties": {
  29545. "messageID": {
  29546. "type": "string"
  29547. },
  29548. "callID": {
  29549. "type": "string"
  29550. }
  29551. },
  29552. "required": ["messageID", "callID"],
  29553. "additionalProperties": false
  29554. }
  29555. },
  29556. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  29557. "additionalProperties": false
  29558. }
  29559. },
  29560. "required": ["id", "type", "properties"],
  29561. "additionalProperties": false
  29562. },
  29563. "EventPermissionReplied": {
  29564. "type": "object",
  29565. "properties": {
  29566. "id": {
  29567. "type": "string",
  29568. "pattern": "^evt_"
  29569. },
  29570. "type": {
  29571. "type": "string",
  29572. "enum": ["permission.replied"]
  29573. },
  29574. "properties": {
  29575. "type": "object",
  29576. "properties": {
  29577. "sessionID": {
  29578. "type": "string",
  29579. "pattern": "^ses"
  29580. },
  29581. "requestID": {
  29582. "type": "string",
  29583. "pattern": "^per"
  29584. },
  29585. "reply": {
  29586. "type": "string",
  29587. "enum": ["once", "always", "reject"]
  29588. }
  29589. },
  29590. "required": ["sessionID", "requestID", "reply"],
  29591. "additionalProperties": false
  29592. }
  29593. },
  29594. "required": ["id", "type", "properties"],
  29595. "additionalProperties": false
  29596. },
  29597. "EventMcpToolsChanged": {
  29598. "type": "object",
  29599. "properties": {
  29600. "id": {
  29601. "type": "string",
  29602. "pattern": "^evt_"
  29603. },
  29604. "type": {
  29605. "type": "string",
  29606. "enum": ["mcp.tools.changed"]
  29607. },
  29608. "properties": {
  29609. "type": "object",
  29610. "properties": {
  29611. "server": {
  29612. "type": "string"
  29613. }
  29614. },
  29615. "required": ["server"],
  29616. "additionalProperties": false
  29617. }
  29618. },
  29619. "required": ["id", "type", "properties"],
  29620. "additionalProperties": false
  29621. },
  29622. "EventMcpBrowserOpenFailed": {
  29623. "type": "object",
  29624. "properties": {
  29625. "id": {
  29626. "type": "string",
  29627. "pattern": "^evt_"
  29628. },
  29629. "type": {
  29630. "type": "string",
  29631. "enum": ["mcp.browser.open.failed"]
  29632. },
  29633. "properties": {
  29634. "type": "object",
  29635. "properties": {
  29636. "mcpName": {
  29637. "type": "string"
  29638. },
  29639. "url": {
  29640. "type": "string"
  29641. }
  29642. },
  29643. "required": ["mcpName", "url"],
  29644. "additionalProperties": false
  29645. }
  29646. },
  29647. "required": ["id", "type", "properties"],
  29648. "additionalProperties": false
  29649. },
  29650. "EventCommandExecuted": {
  29651. "type": "object",
  29652. "properties": {
  29653. "id": {
  29654. "type": "string",
  29655. "pattern": "^evt_"
  29656. },
  29657. "type": {
  29658. "type": "string",
  29659. "enum": ["command.executed"]
  29660. },
  29661. "properties": {
  29662. "type": "object",
  29663. "properties": {
  29664. "name": {
  29665. "type": "string"
  29666. },
  29667. "sessionID": {
  29668. "type": "string",
  29669. "pattern": "^ses"
  29670. },
  29671. "arguments": {
  29672. "type": "string"
  29673. },
  29674. "messageID": {
  29675. "type": "string",
  29676. "pattern": "^msg"
  29677. }
  29678. },
  29679. "required": ["name", "sessionID", "arguments", "messageID"],
  29680. "additionalProperties": false
  29681. }
  29682. },
  29683. "required": ["id", "type", "properties"],
  29684. "additionalProperties": false
  29685. },
  29686. "EventProjectDirectoriesUpdated": {
  29687. "type": "object",
  29688. "properties": {
  29689. "id": {
  29690. "type": "string",
  29691. "pattern": "^evt_"
  29692. },
  29693. "type": {
  29694. "type": "string",
  29695. "enum": ["project.directories.updated"]
  29696. },
  29697. "properties": {
  29698. "type": "object",
  29699. "properties": {
  29700. "projectID": {
  29701. "type": "string"
  29702. }
  29703. },
  29704. "required": ["projectID"],
  29705. "additionalProperties": false
  29706. }
  29707. },
  29708. "required": ["id", "type", "properties"],
  29709. "additionalProperties": false
  29710. },
  29711. "EventProjectUpdated": {
  29712. "type": "object",
  29713. "properties": {
  29714. "id": {
  29715. "type": "string",
  29716. "pattern": "^evt_"
  29717. },
  29718. "type": {
  29719. "type": "string",
  29720. "enum": ["project.updated"]
  29721. },
  29722. "properties": {
  29723. "type": "object",
  29724. "properties": {
  29725. "id": {
  29726. "type": "string"
  29727. },
  29728. "worktree": {
  29729. "type": "string"
  29730. },
  29731. "vcs": {
  29732. "type": "string",
  29733. "enum": ["git"]
  29734. },
  29735. "name": {
  29736. "type": "string"
  29737. },
  29738. "icon": {
  29739. "type": "object",
  29740. "properties": {
  29741. "url": {
  29742. "type": "string"
  29743. },
  29744. "override": {
  29745. "type": "string"
  29746. },
  29747. "color": {
  29748. "type": "string"
  29749. }
  29750. },
  29751. "additionalProperties": false
  29752. },
  29753. "commands": {
  29754. "type": "object",
  29755. "properties": {
  29756. "start": {
  29757. "type": "string",
  29758. "description": "Startup script to run when creating a new workspace (worktree)"
  29759. }
  29760. },
  29761. "additionalProperties": false
  29762. },
  29763. "time": {
  29764. "type": "object",
  29765. "properties": {
  29766. "created": {
  29767. "type": "integer",
  29768. "minimum": 0
  29769. },
  29770. "updated": {
  29771. "type": "integer",
  29772. "minimum": 0
  29773. },
  29774. "initialized": {
  29775. "type": "integer",
  29776. "minimum": 0
  29777. }
  29778. },
  29779. "required": ["created", "updated"],
  29780. "additionalProperties": false
  29781. },
  29782. "sandboxes": {
  29783. "type": "array",
  29784. "items": {
  29785. "type": "string"
  29786. }
  29787. }
  29788. },
  29789. "required": ["id", "worktree", "time", "sandboxes"],
  29790. "additionalProperties": false
  29791. }
  29792. },
  29793. "required": ["id", "type", "properties"],
  29794. "additionalProperties": false
  29795. },
  29796. "EventSessionStatus": {
  29797. "type": "object",
  29798. "properties": {
  29799. "id": {
  29800. "type": "string",
  29801. "pattern": "^evt_"
  29802. },
  29803. "type": {
  29804. "type": "string",
  29805. "enum": ["session.status"]
  29806. },
  29807. "properties": {
  29808. "type": "object",
  29809. "properties": {
  29810. "sessionID": {
  29811. "type": "string",
  29812. "pattern": "^ses"
  29813. },
  29814. "status": {
  29815. "$ref": "#/components/schemas/SessionStatus"
  29816. }
  29817. },
  29818. "required": ["sessionID", "status"],
  29819. "additionalProperties": false
  29820. }
  29821. },
  29822. "required": ["id", "type", "properties"],
  29823. "additionalProperties": false
  29824. },
  29825. "EventSessionIdle": {
  29826. "type": "object",
  29827. "properties": {
  29828. "id": {
  29829. "type": "string",
  29830. "pattern": "^evt_"
  29831. },
  29832. "type": {
  29833. "type": "string",
  29834. "enum": ["session.idle"]
  29835. },
  29836. "properties": {
  29837. "type": "object",
  29838. "properties": {
  29839. "sessionID": {
  29840. "type": "string",
  29841. "pattern": "^ses"
  29842. }
  29843. },
  29844. "required": ["sessionID"],
  29845. "additionalProperties": false
  29846. }
  29847. },
  29848. "required": ["id", "type", "properties"],
  29849. "additionalProperties": false
  29850. },
  29851. "EventQuestionAsked": {
  29852. "type": "object",
  29853. "properties": {
  29854. "id": {
  29855. "type": "string",
  29856. "pattern": "^evt_"
  29857. },
  29858. "type": {
  29859. "type": "string",
  29860. "enum": ["question.asked"]
  29861. },
  29862. "properties": {
  29863. "type": "object",
  29864. "properties": {
  29865. "id": {
  29866. "type": "string",
  29867. "pattern": "^que"
  29868. },
  29869. "sessionID": {
  29870. "type": "string",
  29871. "pattern": "^ses"
  29872. },
  29873. "questions": {
  29874. "type": "array",
  29875. "items": {
  29876. "$ref": "#/components/schemas/QuestionInfo"
  29877. },
  29878. "description": "Questions to ask"
  29879. },
  29880. "tool": {
  29881. "$ref": "#/components/schemas/QuestionTool"
  29882. }
  29883. },
  29884. "required": ["id", "sessionID", "questions"],
  29885. "additionalProperties": false
  29886. }
  29887. },
  29888. "required": ["id", "type", "properties"],
  29889. "additionalProperties": false
  29890. },
  29891. "EventQuestionReplied": {
  29892. "type": "object",
  29893. "properties": {
  29894. "id": {
  29895. "type": "string",
  29896. "pattern": "^evt_"
  29897. },
  29898. "type": {
  29899. "type": "string",
  29900. "enum": ["question.replied"]
  29901. },
  29902. "properties": {
  29903. "type": "object",
  29904. "properties": {
  29905. "sessionID": {
  29906. "type": "string",
  29907. "pattern": "^ses"
  29908. },
  29909. "requestID": {
  29910. "type": "string",
  29911. "pattern": "^que"
  29912. },
  29913. "answers": {
  29914. "type": "array",
  29915. "items": {
  29916. "$ref": "#/components/schemas/QuestionAnswer"
  29917. }
  29918. }
  29919. },
  29920. "required": ["sessionID", "requestID", "answers"],
  29921. "additionalProperties": false
  29922. }
  29923. },
  29924. "required": ["id", "type", "properties"],
  29925. "additionalProperties": false
  29926. },
  29927. "EventQuestionRejected": {
  29928. "type": "object",
  29929. "properties": {
  29930. "id": {
  29931. "type": "string",
  29932. "pattern": "^evt_"
  29933. },
  29934. "type": {
  29935. "type": "string",
  29936. "enum": ["question.rejected"]
  29937. },
  29938. "properties": {
  29939. "type": "object",
  29940. "properties": {
  29941. "sessionID": {
  29942. "type": "string",
  29943. "pattern": "^ses"
  29944. },
  29945. "requestID": {
  29946. "type": "string",
  29947. "pattern": "^que"
  29948. }
  29949. },
  29950. "required": ["sessionID", "requestID"],
  29951. "additionalProperties": false
  29952. }
  29953. },
  29954. "required": ["id", "type", "properties"],
  29955. "additionalProperties": false
  29956. },
  29957. "EventSessionCompacted": {
  29958. "type": "object",
  29959. "properties": {
  29960. "id": {
  29961. "type": "string",
  29962. "pattern": "^evt_"
  29963. },
  29964. "type": {
  29965. "type": "string",
  29966. "enum": ["session.compacted"]
  29967. },
  29968. "properties": {
  29969. "type": "object",
  29970. "properties": {
  29971. "sessionID": {
  29972. "type": "string",
  29973. "pattern": "^ses"
  29974. }
  29975. },
  29976. "required": ["sessionID"],
  29977. "additionalProperties": false
  29978. }
  29979. },
  29980. "required": ["id", "type", "properties"],
  29981. "additionalProperties": false
  29982. },
  29983. "EventVcsBranchUpdated": {
  29984. "type": "object",
  29985. "properties": {
  29986. "id": {
  29987. "type": "string",
  29988. "pattern": "^evt_"
  29989. },
  29990. "type": {
  29991. "type": "string",
  29992. "enum": ["vcs.branch.updated"]
  29993. },
  29994. "properties": {
  29995. "type": "object",
  29996. "properties": {
  29997. "branch": {
  29998. "type": "string"
  29999. }
  30000. },
  30001. "additionalProperties": false
  30002. }
  30003. },
  30004. "required": ["id", "type", "properties"],
  30005. "additionalProperties": false
  30006. },
  30007. "EventWorkspaceReady": {
  30008. "type": "object",
  30009. "properties": {
  30010. "id": {
  30011. "type": "string",
  30012. "pattern": "^evt_"
  30013. },
  30014. "type": {
  30015. "type": "string",
  30016. "enum": ["workspace.ready"]
  30017. },
  30018. "properties": {
  30019. "type": "object",
  30020. "properties": {
  30021. "name": {
  30022. "type": "string"
  30023. }
  30024. },
  30025. "required": ["name"],
  30026. "additionalProperties": false
  30027. }
  30028. },
  30029. "required": ["id", "type", "properties"],
  30030. "additionalProperties": false
  30031. },
  30032. "EventWorkspaceFailed": {
  30033. "type": "object",
  30034. "properties": {
  30035. "id": {
  30036. "type": "string",
  30037. "pattern": "^evt_"
  30038. },
  30039. "type": {
  30040. "type": "string",
  30041. "enum": ["workspace.failed"]
  30042. },
  30043. "properties": {
  30044. "type": "object",
  30045. "properties": {
  30046. "message": {
  30047. "type": "string"
  30048. }
  30049. },
  30050. "required": ["message"],
  30051. "additionalProperties": false
  30052. }
  30053. },
  30054. "required": ["id", "type", "properties"],
  30055. "additionalProperties": false
  30056. },
  30057. "EventWorkspaceStatus": {
  30058. "type": "object",
  30059. "properties": {
  30060. "id": {
  30061. "type": "string",
  30062. "pattern": "^evt_"
  30063. },
  30064. "type": {
  30065. "type": "string",
  30066. "enum": ["workspace.status"]
  30067. },
  30068. "properties": {
  30069. "type": "object",
  30070. "properties": {
  30071. "workspaceID": {
  30072. "type": "string",
  30073. "pattern": "^wrk"
  30074. },
  30075. "status": {
  30076. "type": "string",
  30077. "enum": ["connected", "connecting", "disconnected", "error"]
  30078. }
  30079. },
  30080. "required": ["workspaceID", "status"],
  30081. "additionalProperties": false
  30082. }
  30083. },
  30084. "required": ["id", "type", "properties"],
  30085. "additionalProperties": false
  30086. },
  30087. "EventWorktreeReady": {
  30088. "type": "object",
  30089. "properties": {
  30090. "id": {
  30091. "type": "string",
  30092. "pattern": "^evt_"
  30093. },
  30094. "type": {
  30095. "type": "string",
  30096. "enum": ["worktree.ready"]
  30097. },
  30098. "properties": {
  30099. "type": "object",
  30100. "properties": {
  30101. "name": {
  30102. "type": "string"
  30103. },
  30104. "branch": {
  30105. "type": "string"
  30106. }
  30107. },
  30108. "required": ["name"],
  30109. "additionalProperties": false
  30110. }
  30111. },
  30112. "required": ["id", "type", "properties"],
  30113. "additionalProperties": false
  30114. },
  30115. "EventWorktreeFailed": {
  30116. "type": "object",
  30117. "properties": {
  30118. "id": {
  30119. "type": "string",
  30120. "pattern": "^evt_"
  30121. },
  30122. "type": {
  30123. "type": "string",
  30124. "enum": ["worktree.failed"]
  30125. },
  30126. "properties": {
  30127. "type": "object",
  30128. "properties": {
  30129. "message": {
  30130. "type": "string"
  30131. }
  30132. },
  30133. "required": ["message"],
  30134. "additionalProperties": false
  30135. }
  30136. },
  30137. "required": ["id", "type", "properties"],
  30138. "additionalProperties": false
  30139. },
  30140. "EventServerConnected": {
  30141. "type": "object",
  30142. "properties": {
  30143. "id": {
  30144. "type": "string",
  30145. "pattern": "^evt_"
  30146. },
  30147. "type": {
  30148. "type": "string",
  30149. "enum": ["server.connected"]
  30150. },
  30151. "properties": {
  30152. "type": "object",
  30153. "properties": {}
  30154. }
  30155. },
  30156. "required": ["id", "type", "properties"],
  30157. "additionalProperties": false
  30158. },
  30159. "EventGlobalDisposed": {
  30160. "type": "object",
  30161. "properties": {
  30162. "id": {
  30163. "type": "string",
  30164. "pattern": "^evt_"
  30165. },
  30166. "type": {
  30167. "type": "string",
  30168. "enum": ["global.disposed"]
  30169. },
  30170. "properties": {
  30171. "type": "object",
  30172. "properties": {}
  30173. }
  30174. },
  30175. "required": ["id", "type", "properties"],
  30176. "additionalProperties": false
  30177. },
  30178. "BadRequestError": {
  30179. "type": "object",
  30180. "required": ["name", "data"],
  30181. "properties": {
  30182. "name": {
  30183. "type": "string",
  30184. "enum": ["BadRequest"]
  30185. },
  30186. "data": {
  30187. "type": "object",
  30188. "required": ["message"],
  30189. "properties": {
  30190. "message": {
  30191. "type": "string"
  30192. },
  30193. "kind": {
  30194. "type": "string",
  30195. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30196. }
  30197. }
  30198. }
  30199. }
  30200. }
  30201. }
  30202. },
  30203. "security": [],
  30204. "tags": [
  30205. {
  30206. "name": "control",
  30207. "description": "Control plane routes."
  30208. },
  30209. {
  30210. "name": "controlPlane",
  30211. "description": "Control-plane orchestration routes."
  30212. },
  30213. {
  30214. "name": "global",
  30215. "description": "Global server routes."
  30216. },
  30217. {
  30218. "name": "event",
  30219. "description": "Instance event stream route."
  30220. },
  30221. {
  30222. "name": "config",
  30223. "description": "Experimental HttpApi config routes."
  30224. },
  30225. {
  30226. "name": "experimental",
  30227. "description": "Experimental HttpApi read-only routes."
  30228. },
  30229. {
  30230. "name": "file",
  30231. "description": "Experimental HttpApi file routes."
  30232. },
  30233. {
  30234. "name": "instance",
  30235. "description": "Experimental HttpApi instance read routes."
  30236. },
  30237. {
  30238. "name": "mcp",
  30239. "description": "Experimental HttpApi MCP routes."
  30240. },
  30241. {
  30242. "name": "project",
  30243. "description": "Experimental HttpApi project routes."
  30244. },
  30245. {
  30246. "name": "projectCopy",
  30247. "description": "Project copy management routes."
  30248. },
  30249. {
  30250. "name": "pty",
  30251. "description": "Experimental HttpApi PTY routes."
  30252. },
  30253. {
  30254. "name": "question",
  30255. "description": "Question routes."
  30256. },
  30257. {
  30258. "name": "permission",
  30259. "description": "Experimental HttpApi permission routes."
  30260. },
  30261. {
  30262. "name": "provider",
  30263. "description": "Experimental HttpApi provider routes."
  30264. },
  30265. {
  30266. "name": "session",
  30267. "description": "Experimental HttpApi session routes."
  30268. },
  30269. {
  30270. "name": "sync",
  30271. "description": "Experimental HttpApi sync routes."
  30272. },
  30273. {
  30274. "name": "tui",
  30275. "description": "Experimental HttpApi TUI routes."
  30276. },
  30277. {
  30278. "name": "workspace",
  30279. "description": "Experimental HttpApi workspace routes."
  30280. },
  30281. {
  30282. "name": "opencode HttpApi",
  30283. "description": "Experimental HttpApi surface for selected instance routes."
  30284. },
  30285. {
  30286. "name": "opencode HttpApi",
  30287. "description": "Experimental HttpApi surface for selected instance routes."
  30288. },
  30289. {
  30290. "name": "opencode HttpApi",
  30291. "description": "Experimental HttpApi surface for selected instance routes."
  30292. },
  30293. {
  30294. "name": "sessions",
  30295. "description": "Experimental session routes."
  30296. },
  30297. {
  30298. "name": "messages",
  30299. "description": "Experimental message routes."
  30300. },
  30301. {
  30302. "name": "models",
  30303. "description": "Experimental model routes."
  30304. },
  30305. {
  30306. "name": "providers",
  30307. "description": "Experimental provider routes."
  30308. },
  30309. {
  30310. "name": "integrations",
  30311. "description": "Integration discovery and authentication routes."
  30312. },
  30313. {
  30314. "name": "opencode HttpApi",
  30315. "description": "Experimental HttpApi surface for selected instance routes."
  30316. },
  30317. {
  30318. "name": "permissions",
  30319. "description": "Experimental permission routes."
  30320. },
  30321. {
  30322. "name": "filesystem",
  30323. "description": "Experimental location-scoped filesystem routes."
  30324. },
  30325. {
  30326. "name": "commands",
  30327. "description": "Experimental command routes."
  30328. },
  30329. {
  30330. "name": "skills",
  30331. "description": "Experimental skill routes."
  30332. },
  30333. {
  30334. "name": "events",
  30335. "description": "Experimental event stream route."
  30336. },
  30337. {
  30338. "name": "session questions",
  30339. "description": "Experimental session question routes."
  30340. },
  30341. {
  30342. "name": "reference",
  30343. "description": "Location-scoped project references."
  30344. },
  30345. {
  30346. "name": "pty",
  30347. "description": "PTY websocket route."
  30348. }
  30349. ]
  30350. }