openapi.json 607 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. }
  2292. ],
  2293. "responses": {
  2294. "200": {
  2295. "description": "VCS diff",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/VcsFileDiff"
  2302. },
  2303. "description": "VCS diff"
  2304. }
  2305. }
  2306. }
  2307. },
  2308. "400": {
  2309. "description": "Bad request",
  2310. "content": {
  2311. "application/json": {
  2312. "schema": {
  2313. "$ref": "#/components/schemas/BadRequestError"
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2320. "summary": "Get VCS diff",
  2321. "x-codeSamples": [
  2322. {
  2323. "lang": "js",
  2324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2325. }
  2326. ]
  2327. }
  2328. },
  2329. "/vcs/diff/raw": {
  2330. "get": {
  2331. "tags": ["instance"],
  2332. "operationId": "vcs.diff.raw",
  2333. "parameters": [
  2334. {
  2335. "name": "directory",
  2336. "in": "query",
  2337. "schema": {
  2338. "type": "string"
  2339. },
  2340. "required": false
  2341. },
  2342. {
  2343. "name": "workspace",
  2344. "in": "query",
  2345. "schema": {
  2346. "type": "string"
  2347. },
  2348. "required": false
  2349. }
  2350. ],
  2351. "responses": {
  2352. "200": {
  2353. "description": "Raw VCS diff",
  2354. "content": {
  2355. "text/x-diff; charset=utf-8": {
  2356. "schema": {
  2357. "type": "string"
  2358. }
  2359. }
  2360. }
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Retrieve a raw patch for current uncommitted changes.",
  2374. "summary": "Get raw VCS diff",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/vcs/apply": {
  2384. "post": {
  2385. "tags": ["instance"],
  2386. "operationId": "vcs.apply",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "schema": {
  2392. "type": "string"
  2393. },
  2394. "required": false
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "schema": {
  2400. "type": "string"
  2401. },
  2402. "required": false
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "VCS patch applied",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "properties": {
  2413. "applied": {
  2414. "type": "boolean"
  2415. }
  2416. },
  2417. "required": ["applied"],
  2418. "additionalProperties": false,
  2419. "description": "VCS patch applied"
  2420. }
  2421. }
  2422. }
  2423. },
  2424. "400": {
  2425. "description": "VcsApplyError | InvalidRequestError",
  2426. "content": {
  2427. "application/json": {
  2428. "schema": {
  2429. "anyOf": [
  2430. {
  2431. "$ref": "#/components/schemas/VcsApplyError"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/InvalidRequestError"
  2435. }
  2436. ]
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Apply a raw patch to the current working tree.",
  2443. "summary": "Apply VCS patch",
  2444. "requestBody": {
  2445. "content": {
  2446. "application/json": {
  2447. "schema": {
  2448. "type": "object",
  2449. "properties": {
  2450. "patch": {
  2451. "type": "string"
  2452. }
  2453. },
  2454. "required": ["patch"],
  2455. "additionalProperties": false
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/command": {
  2469. "get": {
  2470. "tags": ["instance"],
  2471. "operationId": "command.list",
  2472. "parameters": [
  2473. {
  2474. "name": "directory",
  2475. "in": "query",
  2476. "schema": {
  2477. "type": "string"
  2478. },
  2479. "required": false
  2480. },
  2481. {
  2482. "name": "workspace",
  2483. "in": "query",
  2484. "schema": {
  2485. "type": "string"
  2486. },
  2487. "required": false
  2488. }
  2489. ],
  2490. "responses": {
  2491. "200": {
  2492. "description": "List of commands",
  2493. "content": {
  2494. "application/json": {
  2495. "schema": {
  2496. "type": "array",
  2497. "items": {
  2498. "$ref": "#/components/schemas/Command"
  2499. },
  2500. "description": "List of commands"
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "400": {
  2506. "description": "Bad request",
  2507. "content": {
  2508. "application/json": {
  2509. "schema": {
  2510. "$ref": "#/components/schemas/BadRequestError"
  2511. }
  2512. }
  2513. }
  2514. }
  2515. },
  2516. "description": "Get a list of all available commands in the OpenCode system.",
  2517. "summary": "List commands",
  2518. "x-codeSamples": [
  2519. {
  2520. "lang": "js",
  2521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2522. }
  2523. ]
  2524. }
  2525. },
  2526. "/agent": {
  2527. "get": {
  2528. "tags": ["instance"],
  2529. "operationId": "app.agents",
  2530. "parameters": [
  2531. {
  2532. "name": "directory",
  2533. "in": "query",
  2534. "schema": {
  2535. "type": "string"
  2536. },
  2537. "required": false
  2538. },
  2539. {
  2540. "name": "workspace",
  2541. "in": "query",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": false
  2546. }
  2547. ],
  2548. "responses": {
  2549. "200": {
  2550. "description": "List of agents",
  2551. "content": {
  2552. "application/json": {
  2553. "schema": {
  2554. "type": "array",
  2555. "items": {
  2556. "$ref": "#/components/schemas/Agent"
  2557. },
  2558. "description": "List of agents"
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "400": {
  2564. "description": "Bad request",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "$ref": "#/components/schemas/BadRequestError"
  2569. }
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "description": "Get a list of all available AI agents in the OpenCode system.",
  2575. "summary": "List agents",
  2576. "x-codeSamples": [
  2577. {
  2578. "lang": "js",
  2579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2580. }
  2581. ]
  2582. }
  2583. },
  2584. "/skill": {
  2585. "get": {
  2586. "tags": ["instance"],
  2587. "operationId": "app.skills",
  2588. "parameters": [
  2589. {
  2590. "name": "directory",
  2591. "in": "query",
  2592. "schema": {
  2593. "type": "string"
  2594. },
  2595. "required": false
  2596. },
  2597. {
  2598. "name": "workspace",
  2599. "in": "query",
  2600. "schema": {
  2601. "type": "string"
  2602. },
  2603. "required": false
  2604. }
  2605. ],
  2606. "responses": {
  2607. "200": {
  2608. "description": "List of skills",
  2609. "content": {
  2610. "application/json": {
  2611. "schema": {
  2612. "type": "array",
  2613. "items": {
  2614. "type": "object",
  2615. "properties": {
  2616. "name": {
  2617. "type": "string"
  2618. },
  2619. "description": {
  2620. "type": "string"
  2621. },
  2622. "location": {
  2623. "type": "string"
  2624. },
  2625. "content": {
  2626. "type": "string"
  2627. }
  2628. },
  2629. "required": ["name", "location", "content"],
  2630. "additionalProperties": false
  2631. },
  2632. "description": "List of skills"
  2633. }
  2634. }
  2635. }
  2636. },
  2637. "400": {
  2638. "description": "Bad request",
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "$ref": "#/components/schemas/BadRequestError"
  2643. }
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "description": "Get a list of all available skills in the OpenCode system.",
  2649. "summary": "List skills",
  2650. "x-codeSamples": [
  2651. {
  2652. "lang": "js",
  2653. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2654. }
  2655. ]
  2656. }
  2657. },
  2658. "/lsp": {
  2659. "get": {
  2660. "tags": ["instance"],
  2661. "operationId": "lsp.status",
  2662. "parameters": [
  2663. {
  2664. "name": "directory",
  2665. "in": "query",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": false
  2670. },
  2671. {
  2672. "name": "workspace",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. }
  2679. ],
  2680. "responses": {
  2681. "200": {
  2682. "description": "LSP server status",
  2683. "content": {
  2684. "application/json": {
  2685. "schema": {
  2686. "type": "array",
  2687. "items": {
  2688. "$ref": "#/components/schemas/LSPStatus"
  2689. },
  2690. "description": "LSP server status"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "400": {
  2696. "description": "Bad request",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/BadRequestError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "description": "Get LSP server status",
  2707. "summary": "Get LSP status",
  2708. "x-codeSamples": [
  2709. {
  2710. "lang": "js",
  2711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2712. }
  2713. ]
  2714. }
  2715. },
  2716. "/formatter": {
  2717. "get": {
  2718. "tags": ["instance"],
  2719. "operationId": "formatter.status",
  2720. "parameters": [
  2721. {
  2722. "name": "directory",
  2723. "in": "query",
  2724. "schema": {
  2725. "type": "string"
  2726. },
  2727. "required": false
  2728. },
  2729. {
  2730. "name": "workspace",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. }
  2737. ],
  2738. "responses": {
  2739. "200": {
  2740. "description": "Formatter status",
  2741. "content": {
  2742. "application/json": {
  2743. "schema": {
  2744. "type": "array",
  2745. "items": {
  2746. "$ref": "#/components/schemas/FormatterStatus"
  2747. },
  2748. "description": "Formatter status"
  2749. }
  2750. }
  2751. }
  2752. },
  2753. "400": {
  2754. "description": "Bad request",
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "$ref": "#/components/schemas/BadRequestError"
  2759. }
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "description": "Get formatter status",
  2765. "summary": "Get formatter status",
  2766. "x-codeSamples": [
  2767. {
  2768. "lang": "js",
  2769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2770. }
  2771. ]
  2772. }
  2773. },
  2774. "/mcp": {
  2775. "get": {
  2776. "tags": ["mcp"],
  2777. "operationId": "mcp.status",
  2778. "parameters": [
  2779. {
  2780. "name": "directory",
  2781. "in": "query",
  2782. "schema": {
  2783. "type": "string"
  2784. },
  2785. "required": false
  2786. },
  2787. {
  2788. "name": "workspace",
  2789. "in": "query",
  2790. "schema": {
  2791. "type": "string"
  2792. },
  2793. "required": false
  2794. }
  2795. ],
  2796. "responses": {
  2797. "200": {
  2798. "description": "MCP server status",
  2799. "content": {
  2800. "application/json": {
  2801. "schema": {
  2802. "type": "object",
  2803. "additionalProperties": {
  2804. "$ref": "#/components/schemas/MCPStatus"
  2805. },
  2806. "description": "MCP server status"
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "400": {
  2812. "description": "Bad request",
  2813. "content": {
  2814. "application/json": {
  2815. "schema": {
  2816. "$ref": "#/components/schemas/BadRequestError"
  2817. }
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2823. "summary": "Get MCP status",
  2824. "x-codeSamples": [
  2825. {
  2826. "lang": "js",
  2827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2828. }
  2829. ]
  2830. },
  2831. "post": {
  2832. "tags": ["mcp"],
  2833. "operationId": "mcp.add",
  2834. "parameters": [
  2835. {
  2836. "name": "directory",
  2837. "in": "query",
  2838. "schema": {
  2839. "type": "string"
  2840. },
  2841. "required": false
  2842. },
  2843. {
  2844. "name": "workspace",
  2845. "in": "query",
  2846. "schema": {
  2847. "type": "string"
  2848. },
  2849. "required": false
  2850. }
  2851. ],
  2852. "responses": {
  2853. "200": {
  2854. "description": "MCP server added successfully",
  2855. "content": {
  2856. "application/json": {
  2857. "schema": {
  2858. "type": "object",
  2859. "additionalProperties": {
  2860. "$ref": "#/components/schemas/MCPStatus"
  2861. },
  2862. "description": "MCP server added successfully"
  2863. }
  2864. }
  2865. }
  2866. },
  2867. "400": {
  2868. "description": "BadRequest | InvalidRequestError",
  2869. "content": {
  2870. "application/json": {
  2871. "schema": {
  2872. "anyOf": [
  2873. {
  2874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2875. },
  2876. {
  2877. "$ref": "#/components/schemas/InvalidRequestError"
  2878. }
  2879. ]
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2886. "summary": "Add MCP server",
  2887. "requestBody": {
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "object",
  2892. "properties": {
  2893. "name": {
  2894. "type": "string"
  2895. },
  2896. "config": {
  2897. "anyOf": [
  2898. {
  2899. "$ref": "#/components/schemas/McpLocalConfig"
  2900. },
  2901. {
  2902. "$ref": "#/components/schemas/McpRemoteConfig"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "required": ["name", "config"],
  2908. "additionalProperties": false
  2909. }
  2910. }
  2911. }
  2912. },
  2913. "x-codeSamples": [
  2914. {
  2915. "lang": "js",
  2916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2917. }
  2918. ]
  2919. }
  2920. },
  2921. "/mcp/{name}/auth": {
  2922. "post": {
  2923. "tags": ["mcp"],
  2924. "operationId": "mcp.auth.start",
  2925. "parameters": [
  2926. {
  2927. "name": "name",
  2928. "in": "path",
  2929. "schema": {
  2930. "type": "string"
  2931. },
  2932. "required": true
  2933. },
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "schema": {
  2938. "type": "string"
  2939. },
  2940. "required": false
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "schema": {
  2946. "type": "string"
  2947. },
  2948. "required": false
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "OAuth flow started",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "authorizationUrl": {
  2960. "type": "string"
  2961. },
  2962. "oauthState": {
  2963. "type": "string"
  2964. }
  2965. },
  2966. "required": ["authorizationUrl", "oauthState"],
  2967. "additionalProperties": false,
  2968. "description": "OAuth flow started"
  2969. }
  2970. }
  2971. }
  2972. },
  2973. "400": {
  2974. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2975. "content": {
  2976. "application/json": {
  2977. "schema": {
  2978. "anyOf": [
  2979. {
  2980. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2981. },
  2982. {
  2983. "$ref": "#/components/schemas/InvalidRequestError"
  2984. }
  2985. ]
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "404": {
  2991. "description": "McpServerNotFoundError",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/McpServerNotFoundError"
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3002. "summary": "Start MCP OAuth",
  3003. "x-codeSamples": [
  3004. {
  3005. "lang": "js",
  3006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3007. }
  3008. ]
  3009. },
  3010. "delete": {
  3011. "tags": ["mcp"],
  3012. "operationId": "mcp.auth.remove",
  3013. "parameters": [
  3014. {
  3015. "name": "name",
  3016. "in": "path",
  3017. "schema": {
  3018. "type": "string"
  3019. },
  3020. "required": true
  3021. },
  3022. {
  3023. "name": "directory",
  3024. "in": "query",
  3025. "schema": {
  3026. "type": "string"
  3027. },
  3028. "required": false
  3029. },
  3030. {
  3031. "name": "workspace",
  3032. "in": "query",
  3033. "schema": {
  3034. "type": "string"
  3035. },
  3036. "required": false
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "description": "OAuth credentials removed",
  3042. "content": {
  3043. "application/json": {
  3044. "schema": {
  3045. "type": "object",
  3046. "properties": {
  3047. "success": {
  3048. "type": "boolean",
  3049. "enum": [true]
  3050. }
  3051. },
  3052. "required": ["success"],
  3053. "additionalProperties": false,
  3054. "description": "OAuth credentials removed"
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "400": {
  3060. "description": "Bad request",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/BadRequestError"
  3065. }
  3066. }
  3067. }
  3068. },
  3069. "404": {
  3070. "description": "McpServerNotFoundError",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/McpServerNotFoundError"
  3075. }
  3076. }
  3077. }
  3078. }
  3079. },
  3080. "description": "Remove OAuth credentials for an MCP server.",
  3081. "summary": "Remove MCP OAuth",
  3082. "x-codeSamples": [
  3083. {
  3084. "lang": "js",
  3085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3086. }
  3087. ]
  3088. }
  3089. },
  3090. "/mcp/{name}/auth/callback": {
  3091. "post": {
  3092. "tags": ["mcp"],
  3093. "operationId": "mcp.auth.callback",
  3094. "parameters": [
  3095. {
  3096. "name": "name",
  3097. "in": "path",
  3098. "schema": {
  3099. "type": "string"
  3100. },
  3101. "required": true
  3102. },
  3103. {
  3104. "name": "directory",
  3105. "in": "query",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": false
  3110. },
  3111. {
  3112. "name": "workspace",
  3113. "in": "query",
  3114. "schema": {
  3115. "type": "string"
  3116. },
  3117. "required": false
  3118. }
  3119. ],
  3120. "responses": {
  3121. "200": {
  3122. "description": "OAuth authentication completed",
  3123. "content": {
  3124. "application/json": {
  3125. "schema": {
  3126. "$ref": "#/components/schemas/MCPStatus"
  3127. }
  3128. }
  3129. }
  3130. },
  3131. "400": {
  3132. "description": "BadRequest | InvalidRequestError",
  3133. "content": {
  3134. "application/json": {
  3135. "schema": {
  3136. "anyOf": [
  3137. {
  3138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3139. },
  3140. {
  3141. "$ref": "#/components/schemas/InvalidRequestError"
  3142. }
  3143. ]
  3144. }
  3145. }
  3146. }
  3147. },
  3148. "404": {
  3149. "description": "McpServerNotFoundError",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/McpServerNotFoundError"
  3154. }
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3160. "summary": "Complete MCP OAuth",
  3161. "requestBody": {
  3162. "content": {
  3163. "application/json": {
  3164. "schema": {
  3165. "type": "object",
  3166. "properties": {
  3167. "code": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "required": ["code"],
  3172. "additionalProperties": false
  3173. }
  3174. }
  3175. }
  3176. },
  3177. "x-codeSamples": [
  3178. {
  3179. "lang": "js",
  3180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3181. }
  3182. ]
  3183. }
  3184. },
  3185. "/mcp/{name}/auth/authenticate": {
  3186. "post": {
  3187. "tags": ["mcp"],
  3188. "operationId": "mcp.auth.authenticate",
  3189. "parameters": [
  3190. {
  3191. "name": "name",
  3192. "in": "path",
  3193. "schema": {
  3194. "type": "string"
  3195. },
  3196. "required": true
  3197. },
  3198. {
  3199. "name": "directory",
  3200. "in": "query",
  3201. "schema": {
  3202. "type": "string"
  3203. },
  3204. "required": false
  3205. },
  3206. {
  3207. "name": "workspace",
  3208. "in": "query",
  3209. "schema": {
  3210. "type": "string"
  3211. },
  3212. "required": false
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "description": "OAuth authentication completed",
  3218. "content": {
  3219. "application/json": {
  3220. "schema": {
  3221. "$ref": "#/components/schemas/MCPStatus"
  3222. }
  3223. }
  3224. }
  3225. },
  3226. "400": {
  3227. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3228. "content": {
  3229. "application/json": {
  3230. "schema": {
  3231. "anyOf": [
  3232. {
  3233. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3234. },
  3235. {
  3236. "$ref": "#/components/schemas/InvalidRequestError"
  3237. }
  3238. ]
  3239. }
  3240. }
  3241. }
  3242. },
  3243. "404": {
  3244. "description": "McpServerNotFoundError",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/McpServerNotFoundError"
  3249. }
  3250. }
  3251. }
  3252. }
  3253. },
  3254. "description": "Start OAuth flow and wait for callback (opens browser).",
  3255. "summary": "Authenticate MCP OAuth",
  3256. "x-codeSamples": [
  3257. {
  3258. "lang": "js",
  3259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3260. }
  3261. ]
  3262. }
  3263. },
  3264. "/mcp/{name}/connect": {
  3265. "post": {
  3266. "tags": ["mcp"],
  3267. "operationId": "mcp.connect",
  3268. "parameters": [
  3269. {
  3270. "name": "name",
  3271. "in": "path",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true
  3276. },
  3277. {
  3278. "name": "directory",
  3279. "in": "query",
  3280. "schema": {
  3281. "type": "string"
  3282. },
  3283. "required": false
  3284. },
  3285. {
  3286. "name": "workspace",
  3287. "in": "query",
  3288. "schema": {
  3289. "type": "string"
  3290. },
  3291. "required": false
  3292. }
  3293. ],
  3294. "responses": {
  3295. "200": {
  3296. "description": "MCP server connected successfully",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "type": "boolean",
  3301. "description": "MCP server connected successfully"
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "400": {
  3307. "description": "Bad request",
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "$ref": "#/components/schemas/BadRequestError"
  3312. }
  3313. }
  3314. }
  3315. },
  3316. "404": {
  3317. "description": "McpServerNotFoundError",
  3318. "content": {
  3319. "application/json": {
  3320. "schema": {
  3321. "$ref": "#/components/schemas/McpServerNotFoundError"
  3322. }
  3323. }
  3324. }
  3325. }
  3326. },
  3327. "description": "Connect an MCP server.",
  3328. "x-codeSamples": [
  3329. {
  3330. "lang": "js",
  3331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3332. }
  3333. ]
  3334. }
  3335. },
  3336. "/mcp/{name}/disconnect": {
  3337. "post": {
  3338. "tags": ["mcp"],
  3339. "operationId": "mcp.disconnect",
  3340. "parameters": [
  3341. {
  3342. "name": "name",
  3343. "in": "path",
  3344. "schema": {
  3345. "type": "string"
  3346. },
  3347. "required": true
  3348. },
  3349. {
  3350. "name": "directory",
  3351. "in": "query",
  3352. "schema": {
  3353. "type": "string"
  3354. },
  3355. "required": false
  3356. },
  3357. {
  3358. "name": "workspace",
  3359. "in": "query",
  3360. "schema": {
  3361. "type": "string"
  3362. },
  3363. "required": false
  3364. }
  3365. ],
  3366. "responses": {
  3367. "200": {
  3368. "description": "MCP server disconnected successfully",
  3369. "content": {
  3370. "application/json": {
  3371. "schema": {
  3372. "type": "boolean",
  3373. "description": "MCP server disconnected successfully"
  3374. }
  3375. }
  3376. }
  3377. },
  3378. "400": {
  3379. "description": "Bad request",
  3380. "content": {
  3381. "application/json": {
  3382. "schema": {
  3383. "$ref": "#/components/schemas/BadRequestError"
  3384. }
  3385. }
  3386. }
  3387. },
  3388. "404": {
  3389. "description": "McpServerNotFoundError",
  3390. "content": {
  3391. "application/json": {
  3392. "schema": {
  3393. "$ref": "#/components/schemas/McpServerNotFoundError"
  3394. }
  3395. }
  3396. }
  3397. }
  3398. },
  3399. "description": "Disconnect an MCP server.",
  3400. "x-codeSamples": [
  3401. {
  3402. "lang": "js",
  3403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3404. }
  3405. ]
  3406. }
  3407. },
  3408. "/project": {
  3409. "get": {
  3410. "tags": ["project"],
  3411. "operationId": "project.list",
  3412. "parameters": [
  3413. {
  3414. "name": "directory",
  3415. "in": "query",
  3416. "schema": {
  3417. "type": "string"
  3418. },
  3419. "required": false
  3420. },
  3421. {
  3422. "name": "workspace",
  3423. "in": "query",
  3424. "schema": {
  3425. "type": "string"
  3426. },
  3427. "required": false
  3428. }
  3429. ],
  3430. "responses": {
  3431. "200": {
  3432. "description": "List of projects",
  3433. "content": {
  3434. "application/json": {
  3435. "schema": {
  3436. "type": "array",
  3437. "items": {
  3438. "$ref": "#/components/schemas/Project"
  3439. },
  3440. "description": "List of projects"
  3441. }
  3442. }
  3443. }
  3444. },
  3445. "400": {
  3446. "description": "Bad request",
  3447. "content": {
  3448. "application/json": {
  3449. "schema": {
  3450. "$ref": "#/components/schemas/BadRequestError"
  3451. }
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "description": "Get a list of projects that have been opened with OpenCode.",
  3457. "summary": "List all projects",
  3458. "x-codeSamples": [
  3459. {
  3460. "lang": "js",
  3461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3462. }
  3463. ]
  3464. }
  3465. },
  3466. "/project/current": {
  3467. "get": {
  3468. "tags": ["project"],
  3469. "operationId": "project.current",
  3470. "parameters": [
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "Current project information",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "$ref": "#/components/schemas/Project"
  3495. }
  3496. }
  3497. }
  3498. },
  3499. "400": {
  3500. "description": "Bad request",
  3501. "content": {
  3502. "application/json": {
  3503. "schema": {
  3504. "$ref": "#/components/schemas/BadRequestError"
  3505. }
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "description": "Retrieve the currently active project that OpenCode is working with.",
  3511. "summary": "Get current project",
  3512. "x-codeSamples": [
  3513. {
  3514. "lang": "js",
  3515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3516. }
  3517. ]
  3518. }
  3519. },
  3520. "/project/git/init": {
  3521. "post": {
  3522. "tags": ["project"],
  3523. "operationId": "project.initGit",
  3524. "parameters": [
  3525. {
  3526. "name": "directory",
  3527. "in": "query",
  3528. "schema": {
  3529. "type": "string"
  3530. },
  3531. "required": false
  3532. },
  3533. {
  3534. "name": "workspace",
  3535. "in": "query",
  3536. "schema": {
  3537. "type": "string"
  3538. },
  3539. "required": false
  3540. }
  3541. ],
  3542. "responses": {
  3543. "200": {
  3544. "description": "Project information after git initialization",
  3545. "content": {
  3546. "application/json": {
  3547. "schema": {
  3548. "$ref": "#/components/schemas/Project"
  3549. }
  3550. }
  3551. }
  3552. },
  3553. "400": {
  3554. "description": "Bad request",
  3555. "content": {
  3556. "application/json": {
  3557. "schema": {
  3558. "$ref": "#/components/schemas/BadRequestError"
  3559. }
  3560. }
  3561. }
  3562. }
  3563. },
  3564. "description": "Create a git repository for the current project and return the refreshed project info.",
  3565. "summary": "Initialize git repository",
  3566. "x-codeSamples": [
  3567. {
  3568. "lang": "js",
  3569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3570. }
  3571. ]
  3572. }
  3573. },
  3574. "/project/{projectID}": {
  3575. "patch": {
  3576. "tags": ["project"],
  3577. "operationId": "project.update",
  3578. "parameters": [
  3579. {
  3580. "name": "projectID",
  3581. "in": "path",
  3582. "schema": {
  3583. "type": "string"
  3584. },
  3585. "required": true
  3586. },
  3587. {
  3588. "name": "directory",
  3589. "in": "query",
  3590. "schema": {
  3591. "type": "string"
  3592. },
  3593. "required": false
  3594. },
  3595. {
  3596. "name": "workspace",
  3597. "in": "query",
  3598. "schema": {
  3599. "type": "string"
  3600. },
  3601. "required": false
  3602. }
  3603. ],
  3604. "responses": {
  3605. "200": {
  3606. "description": "Updated project information",
  3607. "content": {
  3608. "application/json": {
  3609. "schema": {
  3610. "$ref": "#/components/schemas/Project"
  3611. }
  3612. }
  3613. }
  3614. },
  3615. "400": {
  3616. "description": "BadRequest | InvalidRequestError",
  3617. "content": {
  3618. "application/json": {
  3619. "schema": {
  3620. "anyOf": [
  3621. {
  3622. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3623. },
  3624. {
  3625. "$ref": "#/components/schemas/InvalidRequestError"
  3626. }
  3627. ]
  3628. }
  3629. }
  3630. }
  3631. },
  3632. "404": {
  3633. "description": "Not found",
  3634. "content": {
  3635. "application/json": {
  3636. "schema": {
  3637. "$ref": "#/components/schemas/NotFoundError"
  3638. }
  3639. }
  3640. }
  3641. }
  3642. },
  3643. "description": "Update project properties such as name, icon, and commands.",
  3644. "summary": "Update project",
  3645. "requestBody": {
  3646. "content": {
  3647. "application/json": {
  3648. "schema": {
  3649. "type": "object",
  3650. "properties": {
  3651. "name": {
  3652. "type": "string"
  3653. },
  3654. "icon": {
  3655. "type": "object",
  3656. "properties": {
  3657. "url": {
  3658. "type": "string"
  3659. },
  3660. "override": {
  3661. "type": "string"
  3662. },
  3663. "color": {
  3664. "type": "string"
  3665. }
  3666. },
  3667. "additionalProperties": false
  3668. },
  3669. "commands": {
  3670. "type": "object",
  3671. "properties": {
  3672. "start": {
  3673. "type": "string",
  3674. "description": "Startup script to run when creating a new workspace (worktree)"
  3675. }
  3676. },
  3677. "additionalProperties": false
  3678. }
  3679. },
  3680. "additionalProperties": false
  3681. }
  3682. }
  3683. }
  3684. },
  3685. "x-codeSamples": [
  3686. {
  3687. "lang": "js",
  3688. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3689. }
  3690. ]
  3691. }
  3692. },
  3693. "/pty/shells": {
  3694. "get": {
  3695. "tags": ["pty"],
  3696. "operationId": "pty.shells",
  3697. "parameters": [
  3698. {
  3699. "name": "directory",
  3700. "in": "query",
  3701. "schema": {
  3702. "type": "string"
  3703. },
  3704. "required": false
  3705. },
  3706. {
  3707. "name": "workspace",
  3708. "in": "query",
  3709. "schema": {
  3710. "type": "string"
  3711. },
  3712. "required": false
  3713. }
  3714. ],
  3715. "responses": {
  3716. "200": {
  3717. "description": "List of shells",
  3718. "content": {
  3719. "application/json": {
  3720. "schema": {
  3721. "type": "array",
  3722. "items": {
  3723. "type": "object",
  3724. "properties": {
  3725. "path": {
  3726. "type": "string"
  3727. },
  3728. "name": {
  3729. "type": "string"
  3730. },
  3731. "acceptable": {
  3732. "type": "boolean"
  3733. }
  3734. },
  3735. "required": ["path", "name", "acceptable"],
  3736. "additionalProperties": false
  3737. },
  3738. "description": "List of shells"
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "400": {
  3744. "description": "Bad request",
  3745. "content": {
  3746. "application/json": {
  3747. "schema": {
  3748. "$ref": "#/components/schemas/BadRequestError"
  3749. }
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "description": "Get a list of available shells on the system.",
  3755. "summary": "List available shells",
  3756. "x-codeSamples": [
  3757. {
  3758. "lang": "js",
  3759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3760. }
  3761. ]
  3762. }
  3763. },
  3764. "/pty": {
  3765. "get": {
  3766. "tags": ["pty"],
  3767. "operationId": "pty.list",
  3768. "parameters": [
  3769. {
  3770. "name": "directory",
  3771. "in": "query",
  3772. "schema": {
  3773. "type": "string"
  3774. },
  3775. "required": false
  3776. },
  3777. {
  3778. "name": "workspace",
  3779. "in": "query",
  3780. "schema": {
  3781. "type": "string"
  3782. },
  3783. "required": false
  3784. }
  3785. ],
  3786. "responses": {
  3787. "200": {
  3788. "description": "List of sessions",
  3789. "content": {
  3790. "application/json": {
  3791. "schema": {
  3792. "type": "array",
  3793. "items": {
  3794. "$ref": "#/components/schemas/Pty"
  3795. },
  3796. "description": "List of sessions"
  3797. }
  3798. }
  3799. }
  3800. },
  3801. "400": {
  3802. "description": "Bad request",
  3803. "content": {
  3804. "application/json": {
  3805. "schema": {
  3806. "$ref": "#/components/schemas/BadRequestError"
  3807. }
  3808. }
  3809. }
  3810. }
  3811. },
  3812. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3813. "summary": "List PTY sessions",
  3814. "x-codeSamples": [
  3815. {
  3816. "lang": "js",
  3817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3818. }
  3819. ]
  3820. },
  3821. "post": {
  3822. "tags": ["pty"],
  3823. "operationId": "pty.create",
  3824. "parameters": [
  3825. {
  3826. "name": "directory",
  3827. "in": "query",
  3828. "schema": {
  3829. "type": "string"
  3830. },
  3831. "required": false
  3832. },
  3833. {
  3834. "name": "workspace",
  3835. "in": "query",
  3836. "schema": {
  3837. "type": "string"
  3838. },
  3839. "required": false
  3840. }
  3841. ],
  3842. "responses": {
  3843. "200": {
  3844. "description": "Created session",
  3845. "content": {
  3846. "application/json": {
  3847. "schema": {
  3848. "$ref": "#/components/schemas/Pty"
  3849. }
  3850. }
  3851. }
  3852. },
  3853. "400": {
  3854. "description": "BadRequest | InvalidRequestError",
  3855. "content": {
  3856. "application/json": {
  3857. "schema": {
  3858. "anyOf": [
  3859. {
  3860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3861. },
  3862. {
  3863. "$ref": "#/components/schemas/InvalidRequestError"
  3864. }
  3865. ]
  3866. }
  3867. }
  3868. }
  3869. }
  3870. },
  3871. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3872. "summary": "Create PTY session",
  3873. "requestBody": {
  3874. "content": {
  3875. "application/json": {
  3876. "schema": {
  3877. "type": "object",
  3878. "properties": {
  3879. "command": {
  3880. "type": "string"
  3881. },
  3882. "args": {
  3883. "type": "array",
  3884. "items": {
  3885. "type": "string"
  3886. }
  3887. },
  3888. "cwd": {
  3889. "type": "string"
  3890. },
  3891. "title": {
  3892. "type": "string"
  3893. },
  3894. "env": {
  3895. "type": "object",
  3896. "additionalProperties": {
  3897. "type": "string"
  3898. }
  3899. }
  3900. },
  3901. "additionalProperties": false
  3902. }
  3903. }
  3904. }
  3905. },
  3906. "x-codeSamples": [
  3907. {
  3908. "lang": "js",
  3909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3910. }
  3911. ]
  3912. }
  3913. },
  3914. "/pty/{ptyID}": {
  3915. "get": {
  3916. "tags": ["pty"],
  3917. "operationId": "pty.get",
  3918. "parameters": [
  3919. {
  3920. "name": "ptyID",
  3921. "in": "path",
  3922. "schema": {
  3923. "type": "string",
  3924. "pattern": "^pty"
  3925. },
  3926. "required": true
  3927. },
  3928. {
  3929. "name": "directory",
  3930. "in": "query",
  3931. "schema": {
  3932. "type": "string"
  3933. },
  3934. "required": false
  3935. },
  3936. {
  3937. "name": "workspace",
  3938. "in": "query",
  3939. "schema": {
  3940. "type": "string"
  3941. },
  3942. "required": false
  3943. }
  3944. ],
  3945. "responses": {
  3946. "200": {
  3947. "description": "Session info",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/Pty"
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "400": {
  3957. "description": "Bad request",
  3958. "content": {
  3959. "application/json": {
  3960. "schema": {
  3961. "$ref": "#/components/schemas/BadRequestError"
  3962. }
  3963. }
  3964. }
  3965. },
  3966. "404": {
  3967. "description": "NotFoundError",
  3968. "content": {
  3969. "application/json": {
  3970. "schema": {
  3971. "$ref": "#/components/schemas/NotFoundError"
  3972. }
  3973. }
  3974. }
  3975. }
  3976. },
  3977. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3978. "summary": "Get PTY session",
  3979. "x-codeSamples": [
  3980. {
  3981. "lang": "js",
  3982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3983. }
  3984. ]
  3985. },
  3986. "put": {
  3987. "tags": ["pty"],
  3988. "operationId": "pty.update",
  3989. "parameters": [
  3990. {
  3991. "name": "ptyID",
  3992. "in": "path",
  3993. "schema": {
  3994. "type": "string",
  3995. "pattern": "^pty"
  3996. },
  3997. "required": true
  3998. },
  3999. {
  4000. "name": "directory",
  4001. "in": "query",
  4002. "schema": {
  4003. "type": "string"
  4004. },
  4005. "required": false
  4006. },
  4007. {
  4008. "name": "workspace",
  4009. "in": "query",
  4010. "schema": {
  4011. "type": "string"
  4012. },
  4013. "required": false
  4014. }
  4015. ],
  4016. "responses": {
  4017. "200": {
  4018. "description": "Updated session",
  4019. "content": {
  4020. "application/json": {
  4021. "schema": {
  4022. "$ref": "#/components/schemas/Pty"
  4023. }
  4024. }
  4025. }
  4026. },
  4027. "400": {
  4028. "description": "BadRequest | InvalidRequestError",
  4029. "content": {
  4030. "application/json": {
  4031. "schema": {
  4032. "anyOf": [
  4033. {
  4034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4035. },
  4036. {
  4037. "$ref": "#/components/schemas/InvalidRequestError"
  4038. }
  4039. ]
  4040. }
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4046. "summary": "Update PTY session",
  4047. "requestBody": {
  4048. "content": {
  4049. "application/json": {
  4050. "schema": {
  4051. "type": "object",
  4052. "properties": {
  4053. "title": {
  4054. "type": "string"
  4055. },
  4056. "size": {
  4057. "type": "object",
  4058. "properties": {
  4059. "rows": {
  4060. "type": "integer",
  4061. "exclusiveMinimum": 0
  4062. },
  4063. "cols": {
  4064. "type": "integer",
  4065. "exclusiveMinimum": 0
  4066. }
  4067. },
  4068. "required": ["rows", "cols"],
  4069. "additionalProperties": false
  4070. }
  4071. },
  4072. "additionalProperties": false
  4073. }
  4074. }
  4075. }
  4076. },
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4081. }
  4082. ]
  4083. },
  4084. "delete": {
  4085. "tags": ["pty"],
  4086. "operationId": "pty.remove",
  4087. "parameters": [
  4088. {
  4089. "name": "ptyID",
  4090. "in": "path",
  4091. "schema": {
  4092. "type": "string",
  4093. "pattern": "^pty"
  4094. },
  4095. "required": true
  4096. },
  4097. {
  4098. "name": "directory",
  4099. "in": "query",
  4100. "schema": {
  4101. "type": "string"
  4102. },
  4103. "required": false
  4104. },
  4105. {
  4106. "name": "workspace",
  4107. "in": "query",
  4108. "schema": {
  4109. "type": "string"
  4110. },
  4111. "required": false
  4112. }
  4113. ],
  4114. "responses": {
  4115. "200": {
  4116. "description": "Session removed",
  4117. "content": {
  4118. "application/json": {
  4119. "schema": {
  4120. "type": "boolean",
  4121. "description": "Session removed"
  4122. }
  4123. }
  4124. }
  4125. },
  4126. "400": {
  4127. "description": "Bad request",
  4128. "content": {
  4129. "application/json": {
  4130. "schema": {
  4131. "$ref": "#/components/schemas/BadRequestError"
  4132. }
  4133. }
  4134. }
  4135. },
  4136. "404": {
  4137. "description": "NotFoundError",
  4138. "content": {
  4139. "application/json": {
  4140. "schema": {
  4141. "$ref": "#/components/schemas/NotFoundError"
  4142. }
  4143. }
  4144. }
  4145. }
  4146. },
  4147. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4148. "summary": "Remove PTY session",
  4149. "x-codeSamples": [
  4150. {
  4151. "lang": "js",
  4152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4153. }
  4154. ]
  4155. }
  4156. },
  4157. "/pty/{ptyID}/connect-token": {
  4158. "post": {
  4159. "tags": ["pty"],
  4160. "operationId": "pty.connectToken",
  4161. "parameters": [
  4162. {
  4163. "name": "ptyID",
  4164. "in": "path",
  4165. "schema": {
  4166. "type": "string",
  4167. "pattern": "^pty"
  4168. },
  4169. "required": true
  4170. },
  4171. {
  4172. "name": "directory",
  4173. "in": "query",
  4174. "schema": {
  4175. "type": "string"
  4176. },
  4177. "required": false
  4178. },
  4179. {
  4180. "name": "workspace",
  4181. "in": "query",
  4182. "schema": {
  4183. "type": "string"
  4184. },
  4185. "required": false
  4186. }
  4187. ],
  4188. "responses": {
  4189. "200": {
  4190. "description": "WebSocket connect token",
  4191. "content": {
  4192. "application/json": {
  4193. "schema": {
  4194. "type": "object",
  4195. "properties": {
  4196. "ticket": {
  4197. "type": "string"
  4198. },
  4199. "expires_in": {
  4200. "type": "integer",
  4201. "exclusiveMinimum": 0
  4202. }
  4203. },
  4204. "required": ["ticket", "expires_in"],
  4205. "additionalProperties": false,
  4206. "description": "WebSocket connect token"
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "400": {
  4212. "description": "Bad request",
  4213. "content": {
  4214. "application/json": {
  4215. "schema": {
  4216. "$ref": "#/components/schemas/BadRequestError"
  4217. }
  4218. }
  4219. }
  4220. },
  4221. "403": {
  4222. "description": "Forbidden",
  4223. "content": {
  4224. "application/json": {
  4225. "schema": {
  4226. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  4227. }
  4228. }
  4229. }
  4230. },
  4231. "404": {
  4232. "description": "NotFoundError",
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "$ref": "#/components/schemas/NotFoundError"
  4237. }
  4238. }
  4239. }
  4240. }
  4241. },
  4242. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4243. "summary": "Create PTY WebSocket token",
  4244. "x-codeSamples": [
  4245. {
  4246. "lang": "js",
  4247. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4248. }
  4249. ]
  4250. }
  4251. },
  4252. "/question": {
  4253. "get": {
  4254. "tags": ["question"],
  4255. "operationId": "question.list",
  4256. "parameters": [
  4257. {
  4258. "name": "directory",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. },
  4265. {
  4266. "name": "workspace",
  4267. "in": "query",
  4268. "schema": {
  4269. "type": "string"
  4270. },
  4271. "required": false
  4272. }
  4273. ],
  4274. "responses": {
  4275. "200": {
  4276. "description": "List of pending questions",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "type": "array",
  4281. "items": {
  4282. "$ref": "#/components/schemas/QuestionRequest"
  4283. },
  4284. "description": "List of pending questions"
  4285. }
  4286. }
  4287. }
  4288. },
  4289. "400": {
  4290. "description": "Bad request",
  4291. "content": {
  4292. "application/json": {
  4293. "schema": {
  4294. "$ref": "#/components/schemas/BadRequestError"
  4295. }
  4296. }
  4297. }
  4298. }
  4299. },
  4300. "description": "Get all pending question requests across all sessions.",
  4301. "summary": "List pending questions",
  4302. "x-codeSamples": [
  4303. {
  4304. "lang": "js",
  4305. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4306. }
  4307. ]
  4308. }
  4309. },
  4310. "/question/{requestID}/reply": {
  4311. "post": {
  4312. "tags": ["question"],
  4313. "operationId": "question.reply",
  4314. "parameters": [
  4315. {
  4316. "name": "requestID",
  4317. "in": "path",
  4318. "schema": {
  4319. "type": "string",
  4320. "pattern": "^que"
  4321. },
  4322. "required": true
  4323. },
  4324. {
  4325. "name": "directory",
  4326. "in": "query",
  4327. "schema": {
  4328. "type": "string"
  4329. },
  4330. "required": false
  4331. },
  4332. {
  4333. "name": "workspace",
  4334. "in": "query",
  4335. "schema": {
  4336. "type": "string"
  4337. },
  4338. "required": false
  4339. }
  4340. ],
  4341. "responses": {
  4342. "200": {
  4343. "description": "Question answered successfully",
  4344. "content": {
  4345. "application/json": {
  4346. "schema": {
  4347. "type": "boolean",
  4348. "description": "Question answered successfully"
  4349. }
  4350. }
  4351. }
  4352. },
  4353. "400": {
  4354. "description": "BadRequest | InvalidRequestError",
  4355. "content": {
  4356. "application/json": {
  4357. "schema": {
  4358. "anyOf": [
  4359. {
  4360. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4361. },
  4362. {
  4363. "$ref": "#/components/schemas/InvalidRequestError"
  4364. }
  4365. ]
  4366. }
  4367. }
  4368. }
  4369. },
  4370. "404": {
  4371. "description": "QuestionNotFoundError",
  4372. "content": {
  4373. "application/json": {
  4374. "schema": {
  4375. "$ref": "#/components/schemas/QuestionNotFoundError"
  4376. }
  4377. }
  4378. }
  4379. }
  4380. },
  4381. "description": "Provide answers to a question request from the AI assistant.",
  4382. "summary": "Reply to question request",
  4383. "requestBody": {
  4384. "content": {
  4385. "application/json": {
  4386. "schema": {
  4387. "type": "object",
  4388. "properties": {
  4389. "answers": {
  4390. "type": "array",
  4391. "items": {
  4392. "$ref": "#/components/schemas/QuestionAnswer"
  4393. },
  4394. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4395. }
  4396. },
  4397. "required": ["answers"],
  4398. "additionalProperties": false
  4399. }
  4400. }
  4401. }
  4402. },
  4403. "x-codeSamples": [
  4404. {
  4405. "lang": "js",
  4406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4407. }
  4408. ]
  4409. }
  4410. },
  4411. "/question/{requestID}/reject": {
  4412. "post": {
  4413. "tags": ["question"],
  4414. "operationId": "question.reject",
  4415. "parameters": [
  4416. {
  4417. "name": "requestID",
  4418. "in": "path",
  4419. "schema": {
  4420. "type": "string",
  4421. "pattern": "^que"
  4422. },
  4423. "required": true
  4424. },
  4425. {
  4426. "name": "directory",
  4427. "in": "query",
  4428. "schema": {
  4429. "type": "string"
  4430. },
  4431. "required": false
  4432. },
  4433. {
  4434. "name": "workspace",
  4435. "in": "query",
  4436. "schema": {
  4437. "type": "string"
  4438. },
  4439. "required": false
  4440. }
  4441. ],
  4442. "responses": {
  4443. "200": {
  4444. "description": "Question rejected successfully",
  4445. "content": {
  4446. "application/json": {
  4447. "schema": {
  4448. "type": "boolean",
  4449. "description": "Question rejected successfully"
  4450. }
  4451. }
  4452. }
  4453. },
  4454. "400": {
  4455. "description": "BadRequest | InvalidRequestError",
  4456. "content": {
  4457. "application/json": {
  4458. "schema": {
  4459. "anyOf": [
  4460. {
  4461. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4462. },
  4463. {
  4464. "$ref": "#/components/schemas/InvalidRequestError"
  4465. }
  4466. ]
  4467. }
  4468. }
  4469. }
  4470. },
  4471. "404": {
  4472. "description": "QuestionNotFoundError",
  4473. "content": {
  4474. "application/json": {
  4475. "schema": {
  4476. "$ref": "#/components/schemas/QuestionNotFoundError"
  4477. }
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "description": "Reject a question request from the AI assistant.",
  4483. "summary": "Reject question request",
  4484. "x-codeSamples": [
  4485. {
  4486. "lang": "js",
  4487. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4488. }
  4489. ]
  4490. }
  4491. },
  4492. "/permission": {
  4493. "get": {
  4494. "tags": ["permission"],
  4495. "operationId": "permission.list",
  4496. "parameters": [
  4497. {
  4498. "name": "directory",
  4499. "in": "query",
  4500. "schema": {
  4501. "type": "string"
  4502. },
  4503. "required": false
  4504. },
  4505. {
  4506. "name": "workspace",
  4507. "in": "query",
  4508. "schema": {
  4509. "type": "string"
  4510. },
  4511. "required": false
  4512. }
  4513. ],
  4514. "responses": {
  4515. "200": {
  4516. "description": "List of pending permissions",
  4517. "content": {
  4518. "application/json": {
  4519. "schema": {
  4520. "type": "array",
  4521. "items": {
  4522. "$ref": "#/components/schemas/PermissionRequest"
  4523. },
  4524. "description": "List of pending permissions"
  4525. }
  4526. }
  4527. }
  4528. },
  4529. "400": {
  4530. "description": "Bad request",
  4531. "content": {
  4532. "application/json": {
  4533. "schema": {
  4534. "$ref": "#/components/schemas/BadRequestError"
  4535. }
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "description": "Get all pending permission requests across all sessions.",
  4541. "summary": "List pending permissions",
  4542. "x-codeSamples": [
  4543. {
  4544. "lang": "js",
  4545. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4546. }
  4547. ]
  4548. }
  4549. },
  4550. "/permission/{requestID}/reply": {
  4551. "post": {
  4552. "tags": ["permission"],
  4553. "operationId": "permission.reply",
  4554. "parameters": [
  4555. {
  4556. "name": "requestID",
  4557. "in": "path",
  4558. "schema": {
  4559. "type": "string",
  4560. "pattern": "^per"
  4561. },
  4562. "required": true
  4563. },
  4564. {
  4565. "name": "directory",
  4566. "in": "query",
  4567. "schema": {
  4568. "type": "string"
  4569. },
  4570. "required": false
  4571. },
  4572. {
  4573. "name": "workspace",
  4574. "in": "query",
  4575. "schema": {
  4576. "type": "string"
  4577. },
  4578. "required": false
  4579. }
  4580. ],
  4581. "responses": {
  4582. "200": {
  4583. "description": "Permission processed successfully",
  4584. "content": {
  4585. "application/json": {
  4586. "schema": {
  4587. "type": "boolean",
  4588. "description": "Permission processed successfully"
  4589. }
  4590. }
  4591. }
  4592. },
  4593. "400": {
  4594. "description": "BadRequest | InvalidRequestError",
  4595. "content": {
  4596. "application/json": {
  4597. "schema": {
  4598. "anyOf": [
  4599. {
  4600. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4601. },
  4602. {
  4603. "$ref": "#/components/schemas/InvalidRequestError"
  4604. }
  4605. ]
  4606. }
  4607. }
  4608. }
  4609. },
  4610. "404": {
  4611. "description": "PermissionNotFoundError",
  4612. "content": {
  4613. "application/json": {
  4614. "schema": {
  4615. "$ref": "#/components/schemas/PermissionNotFoundError"
  4616. }
  4617. }
  4618. }
  4619. }
  4620. },
  4621. "description": "Approve or deny a permission request from the AI assistant.",
  4622. "summary": "Respond to permission request",
  4623. "requestBody": {
  4624. "content": {
  4625. "application/json": {
  4626. "schema": {
  4627. "type": "object",
  4628. "properties": {
  4629. "reply": {
  4630. "type": "string",
  4631. "enum": ["once", "always", "reject"]
  4632. },
  4633. "message": {
  4634. "type": "string"
  4635. }
  4636. },
  4637. "required": ["reply"],
  4638. "additionalProperties": false
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "x-codeSamples": [
  4644. {
  4645. "lang": "js",
  4646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4647. }
  4648. ]
  4649. }
  4650. },
  4651. "/provider": {
  4652. "get": {
  4653. "tags": ["provider"],
  4654. "operationId": "provider.list",
  4655. "parameters": [
  4656. {
  4657. "name": "directory",
  4658. "in": "query",
  4659. "schema": {
  4660. "type": "string"
  4661. },
  4662. "required": false
  4663. },
  4664. {
  4665. "name": "workspace",
  4666. "in": "query",
  4667. "schema": {
  4668. "type": "string"
  4669. },
  4670. "required": false
  4671. }
  4672. ],
  4673. "responses": {
  4674. "200": {
  4675. "description": "List of providers",
  4676. "content": {
  4677. "application/json": {
  4678. "schema": {
  4679. "type": "object",
  4680. "properties": {
  4681. "all": {
  4682. "type": "array",
  4683. "items": {
  4684. "$ref": "#/components/schemas/Provider"
  4685. }
  4686. },
  4687. "default": {
  4688. "type": "object",
  4689. "additionalProperties": {
  4690. "type": "string"
  4691. }
  4692. },
  4693. "connected": {
  4694. "type": "array",
  4695. "items": {
  4696. "type": "string"
  4697. }
  4698. }
  4699. },
  4700. "required": ["all", "default", "connected"],
  4701. "additionalProperties": false,
  4702. "description": "List of providers"
  4703. }
  4704. }
  4705. }
  4706. },
  4707. "400": {
  4708. "description": "Bad request",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "$ref": "#/components/schemas/BadRequestError"
  4713. }
  4714. }
  4715. }
  4716. }
  4717. },
  4718. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4719. "summary": "List providers",
  4720. "x-codeSamples": [
  4721. {
  4722. "lang": "js",
  4723. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4724. }
  4725. ]
  4726. }
  4727. },
  4728. "/provider/auth": {
  4729. "get": {
  4730. "tags": ["provider"],
  4731. "operationId": "provider.auth",
  4732. "parameters": [
  4733. {
  4734. "name": "directory",
  4735. "in": "query",
  4736. "schema": {
  4737. "type": "string"
  4738. },
  4739. "required": false
  4740. },
  4741. {
  4742. "name": "workspace",
  4743. "in": "query",
  4744. "schema": {
  4745. "type": "string"
  4746. },
  4747. "required": false
  4748. }
  4749. ],
  4750. "responses": {
  4751. "200": {
  4752. "description": "Provider auth methods",
  4753. "content": {
  4754. "application/json": {
  4755. "schema": {
  4756. "type": "object",
  4757. "additionalProperties": {
  4758. "type": "array",
  4759. "items": {
  4760. "$ref": "#/components/schemas/ProviderAuthMethod"
  4761. }
  4762. },
  4763. "description": "Provider auth methods"
  4764. }
  4765. }
  4766. }
  4767. },
  4768. "400": {
  4769. "description": "Bad request",
  4770. "content": {
  4771. "application/json": {
  4772. "schema": {
  4773. "$ref": "#/components/schemas/BadRequestError"
  4774. }
  4775. }
  4776. }
  4777. }
  4778. },
  4779. "description": "Retrieve available authentication methods for all AI providers.",
  4780. "summary": "Get provider auth methods",
  4781. "x-codeSamples": [
  4782. {
  4783. "lang": "js",
  4784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4785. }
  4786. ]
  4787. }
  4788. },
  4789. "/provider/{providerID}/oauth/authorize": {
  4790. "post": {
  4791. "tags": ["provider"],
  4792. "operationId": "provider.oauth.authorize",
  4793. "parameters": [
  4794. {
  4795. "name": "providerID",
  4796. "in": "path",
  4797. "schema": {
  4798. "type": "string"
  4799. },
  4800. "required": true
  4801. },
  4802. {
  4803. "name": "directory",
  4804. "in": "query",
  4805. "schema": {
  4806. "type": "string"
  4807. },
  4808. "required": false
  4809. },
  4810. {
  4811. "name": "workspace",
  4812. "in": "query",
  4813. "schema": {
  4814. "type": "string"
  4815. },
  4816. "required": false
  4817. }
  4818. ],
  4819. "responses": {
  4820. "200": {
  4821. "description": "Authorization URL and method",
  4822. "content": {
  4823. "application/json": {
  4824. "schema": {
  4825. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4826. }
  4827. }
  4828. }
  4829. },
  4830. "400": {
  4831. "description": "ProviderAuthError | InvalidRequestError",
  4832. "content": {
  4833. "application/json": {
  4834. "schema": {
  4835. "anyOf": [
  4836. {
  4837. "$ref": "#/components/schemas/ProviderAuthError1"
  4838. },
  4839. {
  4840. "$ref": "#/components/schemas/InvalidRequestError"
  4841. }
  4842. ]
  4843. }
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "description": "Start the OAuth authorization flow for a provider.",
  4849. "summary": "Start OAuth authorization",
  4850. "requestBody": {
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "type": "object",
  4855. "properties": {
  4856. "method": {
  4857. "type": "number",
  4858. "description": "Auth method index"
  4859. },
  4860. "inputs": {
  4861. "type": "object",
  4862. "additionalProperties": {
  4863. "type": "string"
  4864. }
  4865. }
  4866. },
  4867. "required": ["method"],
  4868. "additionalProperties": false
  4869. }
  4870. }
  4871. }
  4872. },
  4873. "x-codeSamples": [
  4874. {
  4875. "lang": "js",
  4876. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4877. }
  4878. ]
  4879. }
  4880. },
  4881. "/provider/{providerID}/oauth/callback": {
  4882. "post": {
  4883. "tags": ["provider"],
  4884. "operationId": "provider.oauth.callback",
  4885. "parameters": [
  4886. {
  4887. "name": "providerID",
  4888. "in": "path",
  4889. "schema": {
  4890. "type": "string"
  4891. },
  4892. "required": true
  4893. },
  4894. {
  4895. "name": "directory",
  4896. "in": "query",
  4897. "schema": {
  4898. "type": "string"
  4899. },
  4900. "required": false
  4901. },
  4902. {
  4903. "name": "workspace",
  4904. "in": "query",
  4905. "schema": {
  4906. "type": "string"
  4907. },
  4908. "required": false
  4909. }
  4910. ],
  4911. "responses": {
  4912. "200": {
  4913. "description": "OAuth callback processed successfully",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "type": "boolean",
  4918. "description": "OAuth callback processed successfully"
  4919. }
  4920. }
  4921. }
  4922. },
  4923. "400": {
  4924. "description": "ProviderAuthError | InvalidRequestError",
  4925. "content": {
  4926. "application/json": {
  4927. "schema": {
  4928. "anyOf": [
  4929. {
  4930. "$ref": "#/components/schemas/ProviderAuthError1"
  4931. },
  4932. {
  4933. "$ref": "#/components/schemas/InvalidRequestError"
  4934. }
  4935. ]
  4936. }
  4937. }
  4938. }
  4939. }
  4940. },
  4941. "description": "Handle the OAuth callback from a provider after user authorization.",
  4942. "summary": "Handle OAuth callback",
  4943. "requestBody": {
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "type": "object",
  4948. "properties": {
  4949. "method": {
  4950. "type": "number",
  4951. "description": "Auth method index"
  4952. },
  4953. "code": {
  4954. "type": "string"
  4955. }
  4956. },
  4957. "required": ["method"],
  4958. "additionalProperties": false
  4959. }
  4960. }
  4961. }
  4962. },
  4963. "x-codeSamples": [
  4964. {
  4965. "lang": "js",
  4966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4967. }
  4968. ]
  4969. }
  4970. },
  4971. "/session": {
  4972. "get": {
  4973. "tags": ["session"],
  4974. "operationId": "session.list",
  4975. "parameters": [
  4976. {
  4977. "name": "directory",
  4978. "in": "query",
  4979. "schema": {
  4980. "type": "string"
  4981. },
  4982. "required": false
  4983. },
  4984. {
  4985. "name": "workspace",
  4986. "in": "query",
  4987. "schema": {
  4988. "type": "string"
  4989. },
  4990. "required": false
  4991. },
  4992. {
  4993. "name": "scope",
  4994. "in": "query",
  4995. "schema": {
  4996. "type": "string",
  4997. "enum": ["project"]
  4998. },
  4999. "required": false
  5000. },
  5001. {
  5002. "name": "path",
  5003. "in": "query",
  5004. "schema": {
  5005. "type": "string"
  5006. },
  5007. "required": false
  5008. },
  5009. {
  5010. "name": "roots",
  5011. "in": "query",
  5012. "schema": {
  5013. "anyOf": [
  5014. {
  5015. "type": "boolean"
  5016. },
  5017. {
  5018. "type": "string",
  5019. "enum": ["true", "false"]
  5020. }
  5021. ]
  5022. },
  5023. "required": false
  5024. },
  5025. {
  5026. "name": "start",
  5027. "in": "query",
  5028. "schema": {
  5029. "type": "number"
  5030. },
  5031. "required": false
  5032. },
  5033. {
  5034. "name": "search",
  5035. "in": "query",
  5036. "schema": {
  5037. "type": "string"
  5038. },
  5039. "required": false
  5040. },
  5041. {
  5042. "name": "limit",
  5043. "in": "query",
  5044. "schema": {
  5045. "type": "number"
  5046. },
  5047. "required": false
  5048. }
  5049. ],
  5050. "responses": {
  5051. "200": {
  5052. "description": "List of sessions",
  5053. "content": {
  5054. "application/json": {
  5055. "schema": {
  5056. "type": "array",
  5057. "items": {
  5058. "$ref": "#/components/schemas/Session"
  5059. },
  5060. "description": "List of sessions"
  5061. }
  5062. }
  5063. }
  5064. },
  5065. "400": {
  5066. "description": "Bad request",
  5067. "content": {
  5068. "application/json": {
  5069. "schema": {
  5070. "$ref": "#/components/schemas/BadRequestError"
  5071. }
  5072. }
  5073. }
  5074. }
  5075. },
  5076. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5077. "summary": "List sessions",
  5078. "x-codeSamples": [
  5079. {
  5080. "lang": "js",
  5081. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5082. }
  5083. ]
  5084. },
  5085. "post": {
  5086. "tags": ["session"],
  5087. "operationId": "session.create",
  5088. "parameters": [
  5089. {
  5090. "name": "directory",
  5091. "in": "query",
  5092. "schema": {
  5093. "type": "string"
  5094. },
  5095. "required": false
  5096. },
  5097. {
  5098. "name": "workspace",
  5099. "in": "query",
  5100. "schema": {
  5101. "type": "string"
  5102. },
  5103. "required": false
  5104. }
  5105. ],
  5106. "responses": {
  5107. "200": {
  5108. "description": "Successfully created session",
  5109. "content": {
  5110. "application/json": {
  5111. "schema": {
  5112. "$ref": "#/components/schemas/Session"
  5113. }
  5114. }
  5115. }
  5116. },
  5117. "400": {
  5118. "description": "BadRequest | InvalidRequestError",
  5119. "content": {
  5120. "application/json": {
  5121. "schema": {
  5122. "anyOf": [
  5123. {
  5124. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5125. },
  5126. {
  5127. "$ref": "#/components/schemas/InvalidRequestError"
  5128. }
  5129. ]
  5130. }
  5131. }
  5132. }
  5133. }
  5134. },
  5135. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5136. "summary": "Create session",
  5137. "requestBody": {
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "type": "object",
  5142. "properties": {
  5143. "parentID": {
  5144. "type": "string",
  5145. "pattern": "^ses"
  5146. },
  5147. "title": {
  5148. "type": "string"
  5149. },
  5150. "agent": {
  5151. "type": "string"
  5152. },
  5153. "model": {
  5154. "type": "object",
  5155. "properties": {
  5156. "id": {
  5157. "type": "string"
  5158. },
  5159. "providerID": {
  5160. "type": "string"
  5161. },
  5162. "variant": {
  5163. "type": "string"
  5164. }
  5165. },
  5166. "required": ["id", "providerID"],
  5167. "additionalProperties": false
  5168. },
  5169. "permission": {
  5170. "$ref": "#/components/schemas/PermissionRuleset"
  5171. },
  5172. "workspaceID": {
  5173. "type": "string",
  5174. "pattern": "^wrk"
  5175. }
  5176. },
  5177. "additionalProperties": false
  5178. }
  5179. }
  5180. }
  5181. },
  5182. "x-codeSamples": [
  5183. {
  5184. "lang": "js",
  5185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5186. }
  5187. ]
  5188. }
  5189. },
  5190. "/session/status": {
  5191. "get": {
  5192. "tags": ["session"],
  5193. "operationId": "session.status",
  5194. "parameters": [
  5195. {
  5196. "name": "directory",
  5197. "in": "query",
  5198. "schema": {
  5199. "type": "string"
  5200. },
  5201. "required": false
  5202. },
  5203. {
  5204. "name": "workspace",
  5205. "in": "query",
  5206. "schema": {
  5207. "type": "string"
  5208. },
  5209. "required": false
  5210. }
  5211. ],
  5212. "responses": {
  5213. "200": {
  5214. "description": "Get session status",
  5215. "content": {
  5216. "application/json": {
  5217. "schema": {
  5218. "type": "object",
  5219. "additionalProperties": {
  5220. "$ref": "#/components/schemas/SessionStatus"
  5221. },
  5222. "description": "Get session status"
  5223. }
  5224. }
  5225. }
  5226. },
  5227. "400": {
  5228. "description": "BadRequest | InvalidRequestError",
  5229. "content": {
  5230. "application/json": {
  5231. "schema": {
  5232. "anyOf": [
  5233. {
  5234. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5235. },
  5236. {
  5237. "$ref": "#/components/schemas/InvalidRequestError"
  5238. }
  5239. ]
  5240. }
  5241. }
  5242. }
  5243. }
  5244. },
  5245. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5246. "summary": "Get session status",
  5247. "x-codeSamples": [
  5248. {
  5249. "lang": "js",
  5250. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5251. }
  5252. ]
  5253. }
  5254. },
  5255. "/session/{sessionID}": {
  5256. "get": {
  5257. "tags": ["session"],
  5258. "operationId": "session.get",
  5259. "parameters": [
  5260. {
  5261. "name": "sessionID",
  5262. "in": "path",
  5263. "schema": {
  5264. "type": "string",
  5265. "pattern": "^ses"
  5266. },
  5267. "required": true
  5268. },
  5269. {
  5270. "name": "directory",
  5271. "in": "query",
  5272. "schema": {
  5273. "type": "string"
  5274. },
  5275. "required": false
  5276. },
  5277. {
  5278. "name": "workspace",
  5279. "in": "query",
  5280. "schema": {
  5281. "type": "string"
  5282. },
  5283. "required": false
  5284. }
  5285. ],
  5286. "responses": {
  5287. "200": {
  5288. "description": "Get session",
  5289. "content": {
  5290. "application/json": {
  5291. "schema": {
  5292. "$ref": "#/components/schemas/Session"
  5293. }
  5294. }
  5295. }
  5296. },
  5297. "400": {
  5298. "description": "BadRequest | InvalidRequestError",
  5299. "content": {
  5300. "application/json": {
  5301. "schema": {
  5302. "anyOf": [
  5303. {
  5304. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5305. },
  5306. {
  5307. "$ref": "#/components/schemas/InvalidRequestError"
  5308. }
  5309. ]
  5310. }
  5311. }
  5312. }
  5313. },
  5314. "404": {
  5315. "description": "NotFoundError",
  5316. "content": {
  5317. "application/json": {
  5318. "schema": {
  5319. "$ref": "#/components/schemas/NotFoundError"
  5320. }
  5321. }
  5322. }
  5323. }
  5324. },
  5325. "description": "Retrieve detailed information about a specific OpenCode session.",
  5326. "summary": "Get session",
  5327. "x-codeSamples": [
  5328. {
  5329. "lang": "js",
  5330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5331. }
  5332. ]
  5333. },
  5334. "delete": {
  5335. "tags": ["session"],
  5336. "operationId": "session.delete",
  5337. "parameters": [
  5338. {
  5339. "name": "sessionID",
  5340. "in": "path",
  5341. "schema": {
  5342. "type": "string",
  5343. "pattern": "^ses"
  5344. },
  5345. "required": true
  5346. },
  5347. {
  5348. "name": "directory",
  5349. "in": "query",
  5350. "schema": {
  5351. "type": "string"
  5352. },
  5353. "required": false
  5354. },
  5355. {
  5356. "name": "workspace",
  5357. "in": "query",
  5358. "schema": {
  5359. "type": "string"
  5360. },
  5361. "required": false
  5362. }
  5363. ],
  5364. "responses": {
  5365. "200": {
  5366. "description": "Successfully deleted session",
  5367. "content": {
  5368. "application/json": {
  5369. "schema": {
  5370. "type": "boolean",
  5371. "description": "Successfully deleted session"
  5372. }
  5373. }
  5374. }
  5375. },
  5376. "400": {
  5377. "description": "BadRequest | InvalidRequestError",
  5378. "content": {
  5379. "application/json": {
  5380. "schema": {
  5381. "anyOf": [
  5382. {
  5383. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5384. },
  5385. {
  5386. "$ref": "#/components/schemas/InvalidRequestError"
  5387. }
  5388. ]
  5389. }
  5390. }
  5391. }
  5392. },
  5393. "404": {
  5394. "description": "NotFoundError",
  5395. "content": {
  5396. "application/json": {
  5397. "schema": {
  5398. "$ref": "#/components/schemas/NotFoundError"
  5399. }
  5400. }
  5401. }
  5402. }
  5403. },
  5404. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5405. "summary": "Delete session",
  5406. "x-codeSamples": [
  5407. {
  5408. "lang": "js",
  5409. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5410. }
  5411. ]
  5412. },
  5413. "patch": {
  5414. "tags": ["session"],
  5415. "operationId": "session.update",
  5416. "parameters": [
  5417. {
  5418. "name": "sessionID",
  5419. "in": "path",
  5420. "schema": {
  5421. "type": "string",
  5422. "pattern": "^ses"
  5423. },
  5424. "required": true
  5425. },
  5426. {
  5427. "name": "directory",
  5428. "in": "query",
  5429. "schema": {
  5430. "type": "string"
  5431. },
  5432. "required": false
  5433. },
  5434. {
  5435. "name": "workspace",
  5436. "in": "query",
  5437. "schema": {
  5438. "type": "string"
  5439. },
  5440. "required": false
  5441. }
  5442. ],
  5443. "responses": {
  5444. "200": {
  5445. "description": "Successfully updated session",
  5446. "content": {
  5447. "application/json": {
  5448. "schema": {
  5449. "$ref": "#/components/schemas/Session"
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "400": {
  5455. "description": "BadRequest | InvalidRequestError",
  5456. "content": {
  5457. "application/json": {
  5458. "schema": {
  5459. "anyOf": [
  5460. {
  5461. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5462. },
  5463. {
  5464. "$ref": "#/components/schemas/InvalidRequestError"
  5465. }
  5466. ]
  5467. }
  5468. }
  5469. }
  5470. },
  5471. "404": {
  5472. "description": "NotFoundError",
  5473. "content": {
  5474. "application/json": {
  5475. "schema": {
  5476. "$ref": "#/components/schemas/NotFoundError"
  5477. }
  5478. }
  5479. }
  5480. }
  5481. },
  5482. "description": "Update properties of an existing session, such as title or other metadata.",
  5483. "summary": "Update session",
  5484. "requestBody": {
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "object",
  5489. "properties": {
  5490. "title": {
  5491. "type": "string"
  5492. },
  5493. "permission": {
  5494. "$ref": "#/components/schemas/PermissionRuleset"
  5495. },
  5496. "time": {
  5497. "type": "object",
  5498. "properties": {
  5499. "archived": {
  5500. "type": "number"
  5501. }
  5502. },
  5503. "additionalProperties": false
  5504. }
  5505. },
  5506. "additionalProperties": false
  5507. }
  5508. }
  5509. }
  5510. },
  5511. "x-codeSamples": [
  5512. {
  5513. "lang": "js",
  5514. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5515. }
  5516. ]
  5517. }
  5518. },
  5519. "/session/{sessionID}/children": {
  5520. "get": {
  5521. "tags": ["session"],
  5522. "operationId": "session.children",
  5523. "parameters": [
  5524. {
  5525. "name": "sessionID",
  5526. "in": "path",
  5527. "schema": {
  5528. "type": "string",
  5529. "pattern": "^ses"
  5530. },
  5531. "required": true
  5532. },
  5533. {
  5534. "name": "directory",
  5535. "in": "query",
  5536. "schema": {
  5537. "type": "string"
  5538. },
  5539. "required": false
  5540. },
  5541. {
  5542. "name": "workspace",
  5543. "in": "query",
  5544. "schema": {
  5545. "type": "string"
  5546. },
  5547. "required": false
  5548. }
  5549. ],
  5550. "responses": {
  5551. "200": {
  5552. "description": "List of children",
  5553. "content": {
  5554. "application/json": {
  5555. "schema": {
  5556. "type": "array",
  5557. "items": {
  5558. "$ref": "#/components/schemas/Session"
  5559. },
  5560. "description": "List of children"
  5561. }
  5562. }
  5563. }
  5564. },
  5565. "400": {
  5566. "description": "BadRequest | InvalidRequestError",
  5567. "content": {
  5568. "application/json": {
  5569. "schema": {
  5570. "anyOf": [
  5571. {
  5572. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5573. },
  5574. {
  5575. "$ref": "#/components/schemas/InvalidRequestError"
  5576. }
  5577. ]
  5578. }
  5579. }
  5580. }
  5581. },
  5582. "404": {
  5583. "description": "NotFoundError",
  5584. "content": {
  5585. "application/json": {
  5586. "schema": {
  5587. "$ref": "#/components/schemas/NotFoundError"
  5588. }
  5589. }
  5590. }
  5591. }
  5592. },
  5593. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5594. "summary": "Get session children",
  5595. "x-codeSamples": [
  5596. {
  5597. "lang": "js",
  5598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5599. }
  5600. ]
  5601. }
  5602. },
  5603. "/session/{sessionID}/todo": {
  5604. "get": {
  5605. "tags": ["session"],
  5606. "operationId": "session.todo",
  5607. "parameters": [
  5608. {
  5609. "name": "sessionID",
  5610. "in": "path",
  5611. "schema": {
  5612. "type": "string",
  5613. "pattern": "^ses"
  5614. },
  5615. "required": true
  5616. },
  5617. {
  5618. "name": "directory",
  5619. "in": "query",
  5620. "schema": {
  5621. "type": "string"
  5622. },
  5623. "required": false
  5624. },
  5625. {
  5626. "name": "workspace",
  5627. "in": "query",
  5628. "schema": {
  5629. "type": "string"
  5630. },
  5631. "required": false
  5632. }
  5633. ],
  5634. "responses": {
  5635. "200": {
  5636. "description": "Todo list",
  5637. "content": {
  5638. "application/json": {
  5639. "schema": {
  5640. "type": "array",
  5641. "items": {
  5642. "$ref": "#/components/schemas/Todo"
  5643. },
  5644. "description": "Todo list"
  5645. }
  5646. }
  5647. }
  5648. },
  5649. "400": {
  5650. "description": "BadRequest | InvalidRequestError",
  5651. "content": {
  5652. "application/json": {
  5653. "schema": {
  5654. "anyOf": [
  5655. {
  5656. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5657. },
  5658. {
  5659. "$ref": "#/components/schemas/InvalidRequestError"
  5660. }
  5661. ]
  5662. }
  5663. }
  5664. }
  5665. },
  5666. "404": {
  5667. "description": "NotFoundError",
  5668. "content": {
  5669. "application/json": {
  5670. "schema": {
  5671. "$ref": "#/components/schemas/NotFoundError"
  5672. }
  5673. }
  5674. }
  5675. }
  5676. },
  5677. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5678. "summary": "Get session todos",
  5679. "x-codeSamples": [
  5680. {
  5681. "lang": "js",
  5682. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5683. }
  5684. ]
  5685. }
  5686. },
  5687. "/session/{sessionID}/diff": {
  5688. "get": {
  5689. "tags": ["session"],
  5690. "operationId": "session.diff",
  5691. "parameters": [
  5692. {
  5693. "name": "sessionID",
  5694. "in": "path",
  5695. "schema": {
  5696. "type": "string",
  5697. "pattern": "^ses"
  5698. },
  5699. "required": true
  5700. },
  5701. {
  5702. "name": "directory",
  5703. "in": "query",
  5704. "schema": {
  5705. "type": "string"
  5706. },
  5707. "required": false
  5708. },
  5709. {
  5710. "name": "workspace",
  5711. "in": "query",
  5712. "schema": {
  5713. "type": "string"
  5714. },
  5715. "required": false
  5716. },
  5717. {
  5718. "name": "messageID",
  5719. "in": "query",
  5720. "schema": {
  5721. "type": "string",
  5722. "pattern": "^msg"
  5723. },
  5724. "required": false
  5725. }
  5726. ],
  5727. "responses": {
  5728. "200": {
  5729. "description": "Successfully retrieved diff",
  5730. "content": {
  5731. "application/json": {
  5732. "schema": {
  5733. "type": "array",
  5734. "items": {
  5735. "$ref": "#/components/schemas/SnapshotFileDiff"
  5736. },
  5737. "description": "Successfully retrieved diff"
  5738. }
  5739. }
  5740. }
  5741. },
  5742. "400": {
  5743. "description": "Bad request",
  5744. "content": {
  5745. "application/json": {
  5746. "schema": {
  5747. "$ref": "#/components/schemas/BadRequestError"
  5748. }
  5749. }
  5750. }
  5751. }
  5752. },
  5753. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5754. "summary": "Get message diff",
  5755. "x-codeSamples": [
  5756. {
  5757. "lang": "js",
  5758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5759. }
  5760. ]
  5761. }
  5762. },
  5763. "/session/{sessionID}/message": {
  5764. "get": {
  5765. "tags": ["session"],
  5766. "operationId": "session.messages",
  5767. "parameters": [
  5768. {
  5769. "name": "sessionID",
  5770. "in": "path",
  5771. "schema": {
  5772. "type": "string",
  5773. "pattern": "^ses"
  5774. },
  5775. "required": true
  5776. },
  5777. {
  5778. "name": "directory",
  5779. "in": "query",
  5780. "schema": {
  5781. "type": "string"
  5782. },
  5783. "required": false
  5784. },
  5785. {
  5786. "name": "workspace",
  5787. "in": "query",
  5788. "schema": {
  5789. "type": "string"
  5790. },
  5791. "required": false
  5792. },
  5793. {
  5794. "name": "limit",
  5795. "in": "query",
  5796. "schema": {
  5797. "type": "integer",
  5798. "minimum": 0,
  5799. "maximum": 9007199254740991
  5800. },
  5801. "required": false
  5802. },
  5803. {
  5804. "name": "before",
  5805. "in": "query",
  5806. "schema": {
  5807. "type": "string"
  5808. },
  5809. "required": false
  5810. }
  5811. ],
  5812. "responses": {
  5813. "200": {
  5814. "description": "List of messages",
  5815. "content": {
  5816. "application/json": {
  5817. "schema": {
  5818. "type": "array",
  5819. "items": {
  5820. "type": "object",
  5821. "properties": {
  5822. "info": {
  5823. "$ref": "#/components/schemas/Message"
  5824. },
  5825. "parts": {
  5826. "type": "array",
  5827. "items": {
  5828. "$ref": "#/components/schemas/Part"
  5829. }
  5830. }
  5831. },
  5832. "required": ["info", "parts"],
  5833. "additionalProperties": false
  5834. },
  5835. "description": "List of messages"
  5836. }
  5837. }
  5838. }
  5839. },
  5840. "400": {
  5841. "description": "BadRequest | InvalidRequestError",
  5842. "content": {
  5843. "application/json": {
  5844. "schema": {
  5845. "anyOf": [
  5846. {
  5847. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5848. },
  5849. {
  5850. "$ref": "#/components/schemas/InvalidRequestError"
  5851. }
  5852. ]
  5853. }
  5854. }
  5855. }
  5856. },
  5857. "404": {
  5858. "description": "NotFoundError",
  5859. "content": {
  5860. "application/json": {
  5861. "schema": {
  5862. "$ref": "#/components/schemas/NotFoundError"
  5863. }
  5864. }
  5865. }
  5866. }
  5867. },
  5868. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5869. "summary": "Get session messages",
  5870. "x-codeSamples": [
  5871. {
  5872. "lang": "js",
  5873. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5874. }
  5875. ]
  5876. },
  5877. "post": {
  5878. "tags": ["session"],
  5879. "operationId": "session.prompt",
  5880. "parameters": [
  5881. {
  5882. "name": "sessionID",
  5883. "in": "path",
  5884. "schema": {
  5885. "type": "string",
  5886. "pattern": "^ses"
  5887. },
  5888. "required": true
  5889. },
  5890. {
  5891. "name": "directory",
  5892. "in": "query",
  5893. "schema": {
  5894. "type": "string"
  5895. },
  5896. "required": false
  5897. },
  5898. {
  5899. "name": "workspace",
  5900. "in": "query",
  5901. "schema": {
  5902. "type": "string"
  5903. },
  5904. "required": false
  5905. }
  5906. ],
  5907. "responses": {
  5908. "200": {
  5909. "description": "Created message",
  5910. "content": {
  5911. "application/json": {
  5912. "schema": {
  5913. "type": "object",
  5914. "required": ["info", "parts"],
  5915. "properties": {
  5916. "info": {
  5917. "$ref": "#/components/schemas/AssistantMessage"
  5918. },
  5919. "parts": {
  5920. "type": "array",
  5921. "items": {
  5922. "$ref": "#/components/schemas/Part"
  5923. }
  5924. }
  5925. }
  5926. }
  5927. }
  5928. }
  5929. },
  5930. "400": {
  5931. "description": "BadRequest | InvalidRequestError",
  5932. "content": {
  5933. "application/json": {
  5934. "schema": {
  5935. "anyOf": [
  5936. {
  5937. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5938. },
  5939. {
  5940. "$ref": "#/components/schemas/InvalidRequestError"
  5941. }
  5942. ]
  5943. }
  5944. }
  5945. }
  5946. },
  5947. "404": {
  5948. "description": "NotFoundError",
  5949. "content": {
  5950. "application/json": {
  5951. "schema": {
  5952. "$ref": "#/components/schemas/NotFoundError"
  5953. }
  5954. }
  5955. }
  5956. }
  5957. },
  5958. "description": "Create and send a new message to a session, streaming the AI response.",
  5959. "summary": "Send message",
  5960. "requestBody": {
  5961. "content": {
  5962. "application/json": {
  5963. "schema": {
  5964. "type": "object",
  5965. "properties": {
  5966. "messageID": {
  5967. "type": "string",
  5968. "pattern": "^msg"
  5969. },
  5970. "model": {
  5971. "type": "object",
  5972. "properties": {
  5973. "providerID": {
  5974. "type": "string"
  5975. },
  5976. "modelID": {
  5977. "type": "string"
  5978. }
  5979. },
  5980. "required": ["providerID", "modelID"],
  5981. "additionalProperties": false
  5982. },
  5983. "agent": {
  5984. "type": "string"
  5985. },
  5986. "noReply": {
  5987. "type": "boolean"
  5988. },
  5989. "tools": {
  5990. "type": "object",
  5991. "additionalProperties": {
  5992. "type": "boolean"
  5993. }
  5994. },
  5995. "format": {
  5996. "$ref": "#/components/schemas/OutputFormat"
  5997. },
  5998. "system": {
  5999. "type": "string"
  6000. },
  6001. "variant": {
  6002. "type": "string"
  6003. },
  6004. "parts": {
  6005. "type": "array",
  6006. "items": {
  6007. "anyOf": [
  6008. {
  6009. "$ref": "#/components/schemas/TextPartInput"
  6010. },
  6011. {
  6012. "$ref": "#/components/schemas/FilePartInput"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/AgentPartInput"
  6016. },
  6017. {
  6018. "$ref": "#/components/schemas/SubtaskPartInput"
  6019. }
  6020. ]
  6021. }
  6022. }
  6023. },
  6024. "required": ["parts"],
  6025. "additionalProperties": false
  6026. }
  6027. }
  6028. }
  6029. },
  6030. "x-codeSamples": [
  6031. {
  6032. "lang": "js",
  6033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6034. }
  6035. ]
  6036. }
  6037. },
  6038. "/session/{sessionID}/message/{messageID}": {
  6039. "get": {
  6040. "tags": ["session"],
  6041. "operationId": "session.message",
  6042. "parameters": [
  6043. {
  6044. "name": "sessionID",
  6045. "in": "path",
  6046. "schema": {
  6047. "type": "string",
  6048. "pattern": "^ses"
  6049. },
  6050. "required": true
  6051. },
  6052. {
  6053. "name": "messageID",
  6054. "in": "path",
  6055. "schema": {
  6056. "type": "string",
  6057. "pattern": "^msg"
  6058. },
  6059. "required": true
  6060. },
  6061. {
  6062. "name": "directory",
  6063. "in": "query",
  6064. "schema": {
  6065. "type": "string"
  6066. },
  6067. "required": false
  6068. },
  6069. {
  6070. "name": "workspace",
  6071. "in": "query",
  6072. "schema": {
  6073. "type": "string"
  6074. },
  6075. "required": false
  6076. }
  6077. ],
  6078. "responses": {
  6079. "200": {
  6080. "description": "Message",
  6081. "content": {
  6082. "application/json": {
  6083. "schema": {
  6084. "type": "object",
  6085. "properties": {
  6086. "info": {
  6087. "$ref": "#/components/schemas/Message"
  6088. },
  6089. "parts": {
  6090. "type": "array",
  6091. "items": {
  6092. "$ref": "#/components/schemas/Part"
  6093. }
  6094. }
  6095. },
  6096. "required": ["info", "parts"],
  6097. "additionalProperties": false,
  6098. "description": "Message"
  6099. }
  6100. }
  6101. }
  6102. },
  6103. "400": {
  6104. "description": "BadRequest | InvalidRequestError",
  6105. "content": {
  6106. "application/json": {
  6107. "schema": {
  6108. "anyOf": [
  6109. {
  6110. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6111. },
  6112. {
  6113. "$ref": "#/components/schemas/InvalidRequestError"
  6114. }
  6115. ]
  6116. }
  6117. }
  6118. }
  6119. },
  6120. "404": {
  6121. "description": "NotFoundError",
  6122. "content": {
  6123. "application/json": {
  6124. "schema": {
  6125. "$ref": "#/components/schemas/NotFoundError"
  6126. }
  6127. }
  6128. }
  6129. }
  6130. },
  6131. "description": "Retrieve a specific message from a session by its message ID.",
  6132. "summary": "Get message",
  6133. "x-codeSamples": [
  6134. {
  6135. "lang": "js",
  6136. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6137. }
  6138. ]
  6139. },
  6140. "delete": {
  6141. "tags": ["session"],
  6142. "operationId": "session.deleteMessage",
  6143. "parameters": [
  6144. {
  6145. "name": "sessionID",
  6146. "in": "path",
  6147. "schema": {
  6148. "type": "string",
  6149. "pattern": "^ses"
  6150. },
  6151. "required": true
  6152. },
  6153. {
  6154. "name": "messageID",
  6155. "in": "path",
  6156. "schema": {
  6157. "type": "string",
  6158. "pattern": "^msg"
  6159. },
  6160. "required": true
  6161. },
  6162. {
  6163. "name": "directory",
  6164. "in": "query",
  6165. "schema": {
  6166. "type": "string"
  6167. },
  6168. "required": false
  6169. },
  6170. {
  6171. "name": "workspace",
  6172. "in": "query",
  6173. "schema": {
  6174. "type": "string"
  6175. },
  6176. "required": false
  6177. }
  6178. ],
  6179. "responses": {
  6180. "200": {
  6181. "description": "Successfully deleted message",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "type": "boolean",
  6186. "description": "Successfully deleted message"
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "400": {
  6192. "description": "BadRequest | InvalidRequestError",
  6193. "content": {
  6194. "application/json": {
  6195. "schema": {
  6196. "anyOf": [
  6197. {
  6198. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6199. },
  6200. {
  6201. "$ref": "#/components/schemas/InvalidRequestError"
  6202. }
  6203. ]
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "404": {
  6209. "description": "NotFoundError",
  6210. "content": {
  6211. "application/json": {
  6212. "schema": {
  6213. "$ref": "#/components/schemas/NotFoundError"
  6214. }
  6215. }
  6216. }
  6217. },
  6218. "409": {
  6219. "description": "SessionBusyError",
  6220. "content": {
  6221. "application/json": {
  6222. "schema": {
  6223. "$ref": "#/components/schemas/SessionBusyError"
  6224. }
  6225. }
  6226. }
  6227. }
  6228. },
  6229. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6230. "summary": "Delete message",
  6231. "x-codeSamples": [
  6232. {
  6233. "lang": "js",
  6234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6235. }
  6236. ]
  6237. }
  6238. },
  6239. "/session/{sessionID}/fork": {
  6240. "post": {
  6241. "tags": ["session"],
  6242. "operationId": "session.fork",
  6243. "parameters": [
  6244. {
  6245. "name": "sessionID",
  6246. "in": "path",
  6247. "schema": {
  6248. "type": "string",
  6249. "pattern": "^ses"
  6250. },
  6251. "required": true
  6252. },
  6253. {
  6254. "name": "directory",
  6255. "in": "query",
  6256. "schema": {
  6257. "type": "string"
  6258. },
  6259. "required": false
  6260. },
  6261. {
  6262. "name": "workspace",
  6263. "in": "query",
  6264. "schema": {
  6265. "type": "string"
  6266. },
  6267. "required": false
  6268. }
  6269. ],
  6270. "responses": {
  6271. "200": {
  6272. "description": "200",
  6273. "content": {
  6274. "application/json": {
  6275. "schema": {
  6276. "$ref": "#/components/schemas/Session"
  6277. }
  6278. }
  6279. }
  6280. },
  6281. "400": {
  6282. "description": "BadRequest | InvalidRequestError",
  6283. "content": {
  6284. "application/json": {
  6285. "schema": {
  6286. "anyOf": [
  6287. {
  6288. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6289. },
  6290. {
  6291. "$ref": "#/components/schemas/InvalidRequestError"
  6292. }
  6293. ]
  6294. }
  6295. }
  6296. }
  6297. },
  6298. "404": {
  6299. "description": "NotFoundError",
  6300. "content": {
  6301. "application/json": {
  6302. "schema": {
  6303. "$ref": "#/components/schemas/NotFoundError"
  6304. }
  6305. }
  6306. }
  6307. }
  6308. },
  6309. "description": "Create a new session by forking an existing session at a specific message point.",
  6310. "summary": "Fork session",
  6311. "requestBody": {
  6312. "content": {
  6313. "application/json": {
  6314. "schema": {
  6315. "type": "object",
  6316. "properties": {
  6317. "messageID": {
  6318. "type": "string",
  6319. "pattern": "^msg"
  6320. }
  6321. },
  6322. "additionalProperties": false
  6323. }
  6324. }
  6325. }
  6326. },
  6327. "x-codeSamples": [
  6328. {
  6329. "lang": "js",
  6330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6331. }
  6332. ]
  6333. }
  6334. },
  6335. "/session/{sessionID}/abort": {
  6336. "post": {
  6337. "tags": ["session"],
  6338. "operationId": "session.abort",
  6339. "parameters": [
  6340. {
  6341. "name": "sessionID",
  6342. "in": "path",
  6343. "schema": {
  6344. "type": "string",
  6345. "pattern": "^ses"
  6346. },
  6347. "required": true
  6348. },
  6349. {
  6350. "name": "directory",
  6351. "in": "query",
  6352. "schema": {
  6353. "type": "string"
  6354. },
  6355. "required": false
  6356. },
  6357. {
  6358. "name": "workspace",
  6359. "in": "query",
  6360. "schema": {
  6361. "type": "string"
  6362. },
  6363. "required": false
  6364. }
  6365. ],
  6366. "responses": {
  6367. "200": {
  6368. "description": "Aborted session",
  6369. "content": {
  6370. "application/json": {
  6371. "schema": {
  6372. "type": "boolean",
  6373. "description": "Aborted session"
  6374. }
  6375. }
  6376. }
  6377. },
  6378. "400": {
  6379. "description": "BadRequest | InvalidRequestError",
  6380. "content": {
  6381. "application/json": {
  6382. "schema": {
  6383. "anyOf": [
  6384. {
  6385. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6386. },
  6387. {
  6388. "$ref": "#/components/schemas/InvalidRequestError"
  6389. }
  6390. ]
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6397. "summary": "Abort session",
  6398. "x-codeSamples": [
  6399. {
  6400. "lang": "js",
  6401. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6402. }
  6403. ]
  6404. }
  6405. },
  6406. "/session/{sessionID}/init": {
  6407. "post": {
  6408. "tags": ["session"],
  6409. "operationId": "session.init",
  6410. "parameters": [
  6411. {
  6412. "name": "sessionID",
  6413. "in": "path",
  6414. "schema": {
  6415. "type": "string",
  6416. "pattern": "^ses"
  6417. },
  6418. "required": true
  6419. },
  6420. {
  6421. "name": "directory",
  6422. "in": "query",
  6423. "schema": {
  6424. "type": "string"
  6425. },
  6426. "required": false
  6427. },
  6428. {
  6429. "name": "workspace",
  6430. "in": "query",
  6431. "schema": {
  6432. "type": "string"
  6433. },
  6434. "required": false
  6435. }
  6436. ],
  6437. "responses": {
  6438. "200": {
  6439. "description": "200",
  6440. "content": {
  6441. "application/json": {
  6442. "schema": {
  6443. "type": "boolean",
  6444. "description": "200"
  6445. }
  6446. }
  6447. }
  6448. },
  6449. "400": {
  6450. "description": "BadRequest | InvalidRequestError",
  6451. "content": {
  6452. "application/json": {
  6453. "schema": {
  6454. "anyOf": [
  6455. {
  6456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6457. },
  6458. {
  6459. "$ref": "#/components/schemas/InvalidRequestError"
  6460. }
  6461. ]
  6462. }
  6463. }
  6464. }
  6465. },
  6466. "404": {
  6467. "description": "NotFoundError",
  6468. "content": {
  6469. "application/json": {
  6470. "schema": {
  6471. "$ref": "#/components/schemas/NotFoundError"
  6472. }
  6473. }
  6474. }
  6475. }
  6476. },
  6477. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6478. "summary": "Initialize session",
  6479. "requestBody": {
  6480. "content": {
  6481. "application/json": {
  6482. "schema": {
  6483. "type": "object",
  6484. "properties": {
  6485. "modelID": {
  6486. "type": "string"
  6487. },
  6488. "providerID": {
  6489. "type": "string"
  6490. },
  6491. "messageID": {
  6492. "type": "string",
  6493. "pattern": "^msg"
  6494. }
  6495. },
  6496. "required": ["modelID", "providerID", "messageID"],
  6497. "additionalProperties": false
  6498. }
  6499. }
  6500. }
  6501. },
  6502. "x-codeSamples": [
  6503. {
  6504. "lang": "js",
  6505. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6506. }
  6507. ]
  6508. }
  6509. },
  6510. "/session/{sessionID}/share": {
  6511. "post": {
  6512. "tags": ["session"],
  6513. "operationId": "session.share",
  6514. "parameters": [
  6515. {
  6516. "name": "sessionID",
  6517. "in": "path",
  6518. "schema": {
  6519. "type": "string",
  6520. "pattern": "^ses"
  6521. },
  6522. "required": true
  6523. },
  6524. {
  6525. "name": "directory",
  6526. "in": "query",
  6527. "schema": {
  6528. "type": "string"
  6529. },
  6530. "required": false
  6531. },
  6532. {
  6533. "name": "workspace",
  6534. "in": "query",
  6535. "schema": {
  6536. "type": "string"
  6537. },
  6538. "required": false
  6539. }
  6540. ],
  6541. "responses": {
  6542. "200": {
  6543. "description": "Successfully shared session",
  6544. "content": {
  6545. "application/json": {
  6546. "schema": {
  6547. "$ref": "#/components/schemas/Session"
  6548. }
  6549. }
  6550. }
  6551. },
  6552. "400": {
  6553. "description": "Bad request",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "$ref": "#/components/schemas/BadRequestError"
  6558. }
  6559. }
  6560. }
  6561. },
  6562. "404": {
  6563. "description": "NotFoundError",
  6564. "content": {
  6565. "application/json": {
  6566. "schema": {
  6567. "$ref": "#/components/schemas/NotFoundError"
  6568. }
  6569. }
  6570. }
  6571. },
  6572. "500": {
  6573. "description": "InternalServerError",
  6574. "content": {
  6575. "application/json": {
  6576. "schema": {
  6577. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6578. }
  6579. }
  6580. }
  6581. }
  6582. },
  6583. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6584. "summary": "Share session",
  6585. "x-codeSamples": [
  6586. {
  6587. "lang": "js",
  6588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6589. }
  6590. ]
  6591. },
  6592. "delete": {
  6593. "tags": ["session"],
  6594. "operationId": "session.unshare",
  6595. "parameters": [
  6596. {
  6597. "name": "sessionID",
  6598. "in": "path",
  6599. "schema": {
  6600. "type": "string",
  6601. "pattern": "^ses"
  6602. },
  6603. "required": true
  6604. },
  6605. {
  6606. "name": "directory",
  6607. "in": "query",
  6608. "schema": {
  6609. "type": "string"
  6610. },
  6611. "required": false
  6612. },
  6613. {
  6614. "name": "workspace",
  6615. "in": "query",
  6616. "schema": {
  6617. "type": "string"
  6618. },
  6619. "required": false
  6620. }
  6621. ],
  6622. "responses": {
  6623. "200": {
  6624. "description": "Successfully unshared session",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/Session"
  6629. }
  6630. }
  6631. }
  6632. },
  6633. "400": {
  6634. "description": "Bad request",
  6635. "content": {
  6636. "application/json": {
  6637. "schema": {
  6638. "$ref": "#/components/schemas/BadRequestError"
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "404": {
  6644. "description": "NotFoundError",
  6645. "content": {
  6646. "application/json": {
  6647. "schema": {
  6648. "$ref": "#/components/schemas/NotFoundError"
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "500": {
  6654. "description": "InternalServerError",
  6655. "content": {
  6656. "application/json": {
  6657. "schema": {
  6658. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6659. }
  6660. }
  6661. }
  6662. }
  6663. },
  6664. "description": "Remove the shareable link for a session, making it private again.",
  6665. "summary": "Unshare session",
  6666. "x-codeSamples": [
  6667. {
  6668. "lang": "js",
  6669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6670. }
  6671. ]
  6672. }
  6673. },
  6674. "/session/{sessionID}/summarize": {
  6675. "post": {
  6676. "tags": ["session"],
  6677. "operationId": "session.summarize",
  6678. "parameters": [
  6679. {
  6680. "name": "sessionID",
  6681. "in": "path",
  6682. "schema": {
  6683. "type": "string",
  6684. "pattern": "^ses"
  6685. },
  6686. "required": true
  6687. },
  6688. {
  6689. "name": "directory",
  6690. "in": "query",
  6691. "schema": {
  6692. "type": "string"
  6693. },
  6694. "required": false
  6695. },
  6696. {
  6697. "name": "workspace",
  6698. "in": "query",
  6699. "schema": {
  6700. "type": "string"
  6701. },
  6702. "required": false
  6703. }
  6704. ],
  6705. "responses": {
  6706. "200": {
  6707. "description": "Summarized session",
  6708. "content": {
  6709. "application/json": {
  6710. "schema": {
  6711. "type": "boolean",
  6712. "description": "Summarized session"
  6713. }
  6714. }
  6715. }
  6716. },
  6717. "400": {
  6718. "description": "BadRequest | InvalidRequestError",
  6719. "content": {
  6720. "application/json": {
  6721. "schema": {
  6722. "anyOf": [
  6723. {
  6724. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6725. },
  6726. {
  6727. "$ref": "#/components/schemas/InvalidRequestError"
  6728. }
  6729. ]
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "404": {
  6735. "description": "NotFoundError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "$ref": "#/components/schemas/NotFoundError"
  6740. }
  6741. }
  6742. }
  6743. }
  6744. },
  6745. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6746. "summary": "Summarize session",
  6747. "requestBody": {
  6748. "content": {
  6749. "application/json": {
  6750. "schema": {
  6751. "type": "object",
  6752. "properties": {
  6753. "providerID": {
  6754. "type": "string"
  6755. },
  6756. "modelID": {
  6757. "type": "string"
  6758. },
  6759. "auto": {
  6760. "type": "boolean"
  6761. }
  6762. },
  6763. "required": ["providerID", "modelID"],
  6764. "additionalProperties": false
  6765. }
  6766. }
  6767. }
  6768. },
  6769. "x-codeSamples": [
  6770. {
  6771. "lang": "js",
  6772. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6773. }
  6774. ]
  6775. }
  6776. },
  6777. "/session/{sessionID}/prompt_async": {
  6778. "post": {
  6779. "tags": ["session"],
  6780. "operationId": "session.prompt_async",
  6781. "parameters": [
  6782. {
  6783. "name": "sessionID",
  6784. "in": "path",
  6785. "schema": {
  6786. "type": "string",
  6787. "pattern": "^ses"
  6788. },
  6789. "required": true
  6790. },
  6791. {
  6792. "name": "directory",
  6793. "in": "query",
  6794. "schema": {
  6795. "type": "string"
  6796. },
  6797. "required": false
  6798. },
  6799. {
  6800. "name": "workspace",
  6801. "in": "query",
  6802. "schema": {
  6803. "type": "string"
  6804. },
  6805. "required": false
  6806. }
  6807. ],
  6808. "responses": {
  6809. "204": {
  6810. "description": "Prompt accepted"
  6811. },
  6812. "400": {
  6813. "description": "BadRequest | InvalidRequestError",
  6814. "content": {
  6815. "application/json": {
  6816. "schema": {
  6817. "anyOf": [
  6818. {
  6819. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6820. },
  6821. {
  6822. "$ref": "#/components/schemas/InvalidRequestError"
  6823. }
  6824. ]
  6825. }
  6826. }
  6827. }
  6828. },
  6829. "404": {
  6830. "description": "NotFoundError",
  6831. "content": {
  6832. "application/json": {
  6833. "schema": {
  6834. "$ref": "#/components/schemas/NotFoundError"
  6835. }
  6836. }
  6837. }
  6838. }
  6839. },
  6840. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6841. "summary": "Send async message",
  6842. "requestBody": {
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "type": "object",
  6847. "properties": {
  6848. "messageID": {
  6849. "type": "string",
  6850. "pattern": "^msg"
  6851. },
  6852. "model": {
  6853. "type": "object",
  6854. "properties": {
  6855. "providerID": {
  6856. "type": "string"
  6857. },
  6858. "modelID": {
  6859. "type": "string"
  6860. }
  6861. },
  6862. "required": ["providerID", "modelID"],
  6863. "additionalProperties": false
  6864. },
  6865. "agent": {
  6866. "type": "string"
  6867. },
  6868. "noReply": {
  6869. "type": "boolean"
  6870. },
  6871. "tools": {
  6872. "type": "object",
  6873. "additionalProperties": {
  6874. "type": "boolean"
  6875. }
  6876. },
  6877. "format": {
  6878. "$ref": "#/components/schemas/OutputFormat"
  6879. },
  6880. "system": {
  6881. "type": "string"
  6882. },
  6883. "variant": {
  6884. "type": "string"
  6885. },
  6886. "parts": {
  6887. "type": "array",
  6888. "items": {
  6889. "anyOf": [
  6890. {
  6891. "$ref": "#/components/schemas/TextPartInput"
  6892. },
  6893. {
  6894. "$ref": "#/components/schemas/FilePartInput"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/AgentPartInput"
  6898. },
  6899. {
  6900. "$ref": "#/components/schemas/SubtaskPartInput"
  6901. }
  6902. ]
  6903. }
  6904. }
  6905. },
  6906. "required": ["parts"],
  6907. "additionalProperties": false
  6908. }
  6909. }
  6910. }
  6911. },
  6912. "x-codeSamples": [
  6913. {
  6914. "lang": "js",
  6915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6916. }
  6917. ]
  6918. }
  6919. },
  6920. "/session/{sessionID}/command": {
  6921. "post": {
  6922. "tags": ["session"],
  6923. "operationId": "session.command",
  6924. "parameters": [
  6925. {
  6926. "name": "sessionID",
  6927. "in": "path",
  6928. "schema": {
  6929. "type": "string",
  6930. "pattern": "^ses"
  6931. },
  6932. "required": true
  6933. },
  6934. {
  6935. "name": "directory",
  6936. "in": "query",
  6937. "schema": {
  6938. "type": "string"
  6939. },
  6940. "required": false
  6941. },
  6942. {
  6943. "name": "workspace",
  6944. "in": "query",
  6945. "schema": {
  6946. "type": "string"
  6947. },
  6948. "required": false
  6949. }
  6950. ],
  6951. "responses": {
  6952. "200": {
  6953. "description": "Created message",
  6954. "content": {
  6955. "application/json": {
  6956. "schema": {
  6957. "type": "object",
  6958. "required": ["info", "parts"],
  6959. "properties": {
  6960. "info": {
  6961. "$ref": "#/components/schemas/AssistantMessage"
  6962. },
  6963. "parts": {
  6964. "type": "array",
  6965. "items": {
  6966. "$ref": "#/components/schemas/Part"
  6967. }
  6968. }
  6969. }
  6970. }
  6971. }
  6972. }
  6973. },
  6974. "400": {
  6975. "description": "BadRequest | InvalidRequestError",
  6976. "content": {
  6977. "application/json": {
  6978. "schema": {
  6979. "anyOf": [
  6980. {
  6981. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6982. },
  6983. {
  6984. "$ref": "#/components/schemas/InvalidRequestError"
  6985. }
  6986. ]
  6987. }
  6988. }
  6989. }
  6990. },
  6991. "404": {
  6992. "description": "NotFoundError",
  6993. "content": {
  6994. "application/json": {
  6995. "schema": {
  6996. "$ref": "#/components/schemas/NotFoundError"
  6997. }
  6998. }
  6999. }
  7000. }
  7001. },
  7002. "description": "Send a new command to a session for execution by the AI assistant.",
  7003. "summary": "Send command",
  7004. "requestBody": {
  7005. "content": {
  7006. "application/json": {
  7007. "schema": {
  7008. "type": "object",
  7009. "properties": {
  7010. "messageID": {
  7011. "type": "string",
  7012. "pattern": "^msg"
  7013. },
  7014. "agent": {
  7015. "type": "string"
  7016. },
  7017. "model": {
  7018. "type": "string"
  7019. },
  7020. "arguments": {
  7021. "type": "string"
  7022. },
  7023. "command": {
  7024. "type": "string"
  7025. },
  7026. "variant": {
  7027. "type": "string"
  7028. },
  7029. "parts": {
  7030. "type": "array",
  7031. "items": {
  7032. "type": "object",
  7033. "properties": {
  7034. "id": {
  7035. "type": "string",
  7036. "pattern": "^prt"
  7037. },
  7038. "type": {
  7039. "type": "string",
  7040. "enum": ["file"]
  7041. },
  7042. "mime": {
  7043. "type": "string"
  7044. },
  7045. "filename": {
  7046. "type": "string"
  7047. },
  7048. "url": {
  7049. "type": "string"
  7050. },
  7051. "source": {
  7052. "$ref": "#/components/schemas/FilePartSource"
  7053. }
  7054. },
  7055. "required": ["type", "mime", "url"],
  7056. "additionalProperties": false
  7057. }
  7058. }
  7059. },
  7060. "required": ["arguments", "command"],
  7061. "additionalProperties": false
  7062. }
  7063. }
  7064. }
  7065. },
  7066. "x-codeSamples": [
  7067. {
  7068. "lang": "js",
  7069. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7070. }
  7071. ]
  7072. }
  7073. },
  7074. "/session/{sessionID}/shell": {
  7075. "post": {
  7076. "tags": ["session"],
  7077. "operationId": "session.shell",
  7078. "parameters": [
  7079. {
  7080. "name": "sessionID",
  7081. "in": "path",
  7082. "schema": {
  7083. "type": "string",
  7084. "pattern": "^ses"
  7085. },
  7086. "required": true
  7087. },
  7088. {
  7089. "name": "directory",
  7090. "in": "query",
  7091. "schema": {
  7092. "type": "string"
  7093. },
  7094. "required": false
  7095. },
  7096. {
  7097. "name": "workspace",
  7098. "in": "query",
  7099. "schema": {
  7100. "type": "string"
  7101. },
  7102. "required": false
  7103. }
  7104. ],
  7105. "responses": {
  7106. "200": {
  7107. "description": "Created message",
  7108. "content": {
  7109. "application/json": {
  7110. "schema": {
  7111. "type": "object",
  7112. "properties": {
  7113. "info": {
  7114. "$ref": "#/components/schemas/Message"
  7115. },
  7116. "parts": {
  7117. "type": "array",
  7118. "items": {
  7119. "$ref": "#/components/schemas/Part"
  7120. }
  7121. }
  7122. },
  7123. "required": ["info", "parts"],
  7124. "additionalProperties": false,
  7125. "description": "Created message"
  7126. }
  7127. }
  7128. }
  7129. },
  7130. "400": {
  7131. "description": "BadRequest | InvalidRequestError",
  7132. "content": {
  7133. "application/json": {
  7134. "schema": {
  7135. "anyOf": [
  7136. {
  7137. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7138. },
  7139. {
  7140. "$ref": "#/components/schemas/InvalidRequestError"
  7141. }
  7142. ]
  7143. }
  7144. }
  7145. }
  7146. },
  7147. "404": {
  7148. "description": "NotFoundError",
  7149. "content": {
  7150. "application/json": {
  7151. "schema": {
  7152. "$ref": "#/components/schemas/NotFoundError"
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "409": {
  7158. "description": "SessionBusyError",
  7159. "content": {
  7160. "application/json": {
  7161. "schema": {
  7162. "$ref": "#/components/schemas/SessionBusyError"
  7163. }
  7164. }
  7165. }
  7166. }
  7167. },
  7168. "description": "Execute a shell command within the session context and return the AI's response.",
  7169. "summary": "Run shell command",
  7170. "requestBody": {
  7171. "content": {
  7172. "application/json": {
  7173. "schema": {
  7174. "type": "object",
  7175. "properties": {
  7176. "messageID": {
  7177. "type": "string",
  7178. "pattern": "^msg"
  7179. },
  7180. "agent": {
  7181. "type": "string"
  7182. },
  7183. "model": {
  7184. "type": "object",
  7185. "properties": {
  7186. "providerID": {
  7187. "type": "string"
  7188. },
  7189. "modelID": {
  7190. "type": "string"
  7191. }
  7192. },
  7193. "required": ["providerID", "modelID"],
  7194. "additionalProperties": false
  7195. },
  7196. "command": {
  7197. "type": "string"
  7198. }
  7199. },
  7200. "required": ["agent", "command"],
  7201. "additionalProperties": false
  7202. }
  7203. }
  7204. }
  7205. },
  7206. "x-codeSamples": [
  7207. {
  7208. "lang": "js",
  7209. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7210. }
  7211. ]
  7212. }
  7213. },
  7214. "/session/{sessionID}/revert": {
  7215. "post": {
  7216. "tags": ["session"],
  7217. "operationId": "session.revert",
  7218. "parameters": [
  7219. {
  7220. "name": "sessionID",
  7221. "in": "path",
  7222. "schema": {
  7223. "type": "string",
  7224. "pattern": "^ses"
  7225. },
  7226. "required": true
  7227. },
  7228. {
  7229. "name": "directory",
  7230. "in": "query",
  7231. "schema": {
  7232. "type": "string"
  7233. },
  7234. "required": false
  7235. },
  7236. {
  7237. "name": "workspace",
  7238. "in": "query",
  7239. "schema": {
  7240. "type": "string"
  7241. },
  7242. "required": false
  7243. }
  7244. ],
  7245. "responses": {
  7246. "200": {
  7247. "description": "Updated session",
  7248. "content": {
  7249. "application/json": {
  7250. "schema": {
  7251. "$ref": "#/components/schemas/Session"
  7252. }
  7253. }
  7254. }
  7255. },
  7256. "400": {
  7257. "description": "BadRequest | InvalidRequestError",
  7258. "content": {
  7259. "application/json": {
  7260. "schema": {
  7261. "anyOf": [
  7262. {
  7263. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7264. },
  7265. {
  7266. "$ref": "#/components/schemas/InvalidRequestError"
  7267. }
  7268. ]
  7269. }
  7270. }
  7271. }
  7272. },
  7273. "404": {
  7274. "description": "NotFoundError",
  7275. "content": {
  7276. "application/json": {
  7277. "schema": {
  7278. "$ref": "#/components/schemas/NotFoundError"
  7279. }
  7280. }
  7281. }
  7282. },
  7283. "409": {
  7284. "description": "SessionBusyError",
  7285. "content": {
  7286. "application/json": {
  7287. "schema": {
  7288. "$ref": "#/components/schemas/SessionBusyError"
  7289. }
  7290. }
  7291. }
  7292. }
  7293. },
  7294. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7295. "summary": "Revert message",
  7296. "requestBody": {
  7297. "content": {
  7298. "application/json": {
  7299. "schema": {
  7300. "type": "object",
  7301. "properties": {
  7302. "messageID": {
  7303. "type": "string",
  7304. "pattern": "^msg"
  7305. },
  7306. "partID": {
  7307. "type": "string",
  7308. "pattern": "^prt"
  7309. }
  7310. },
  7311. "required": ["messageID"],
  7312. "additionalProperties": false
  7313. }
  7314. }
  7315. }
  7316. },
  7317. "x-codeSamples": [
  7318. {
  7319. "lang": "js",
  7320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7321. }
  7322. ]
  7323. }
  7324. },
  7325. "/session/{sessionID}/unrevert": {
  7326. "post": {
  7327. "tags": ["session"],
  7328. "operationId": "session.unrevert",
  7329. "parameters": [
  7330. {
  7331. "name": "sessionID",
  7332. "in": "path",
  7333. "schema": {
  7334. "type": "string",
  7335. "pattern": "^ses"
  7336. },
  7337. "required": true
  7338. },
  7339. {
  7340. "name": "directory",
  7341. "in": "query",
  7342. "schema": {
  7343. "type": "string"
  7344. },
  7345. "required": false
  7346. },
  7347. {
  7348. "name": "workspace",
  7349. "in": "query",
  7350. "schema": {
  7351. "type": "string"
  7352. },
  7353. "required": false
  7354. }
  7355. ],
  7356. "responses": {
  7357. "200": {
  7358. "description": "Updated session",
  7359. "content": {
  7360. "application/json": {
  7361. "schema": {
  7362. "$ref": "#/components/schemas/Session"
  7363. }
  7364. }
  7365. }
  7366. },
  7367. "400": {
  7368. "description": "BadRequest | InvalidRequestError",
  7369. "content": {
  7370. "application/json": {
  7371. "schema": {
  7372. "anyOf": [
  7373. {
  7374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7375. },
  7376. {
  7377. "$ref": "#/components/schemas/InvalidRequestError"
  7378. }
  7379. ]
  7380. }
  7381. }
  7382. }
  7383. },
  7384. "404": {
  7385. "description": "NotFoundError",
  7386. "content": {
  7387. "application/json": {
  7388. "schema": {
  7389. "$ref": "#/components/schemas/NotFoundError"
  7390. }
  7391. }
  7392. }
  7393. },
  7394. "409": {
  7395. "description": "SessionBusyError",
  7396. "content": {
  7397. "application/json": {
  7398. "schema": {
  7399. "$ref": "#/components/schemas/SessionBusyError"
  7400. }
  7401. }
  7402. }
  7403. }
  7404. },
  7405. "description": "Restore all previously reverted messages in a session.",
  7406. "summary": "Restore reverted messages",
  7407. "x-codeSamples": [
  7408. {
  7409. "lang": "js",
  7410. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7411. }
  7412. ]
  7413. }
  7414. },
  7415. "/session/{sessionID}/permissions/{permissionID}": {
  7416. "post": {
  7417. "tags": ["session"],
  7418. "operationId": "permission.respond",
  7419. "parameters": [
  7420. {
  7421. "name": "sessionID",
  7422. "in": "path",
  7423. "schema": {
  7424. "type": "string",
  7425. "pattern": "^ses"
  7426. },
  7427. "required": true
  7428. },
  7429. {
  7430. "name": "permissionID",
  7431. "in": "path",
  7432. "schema": {
  7433. "type": "string",
  7434. "pattern": "^per"
  7435. },
  7436. "required": true
  7437. },
  7438. {
  7439. "name": "directory",
  7440. "in": "query",
  7441. "schema": {
  7442. "type": "string"
  7443. },
  7444. "required": false
  7445. },
  7446. {
  7447. "name": "workspace",
  7448. "in": "query",
  7449. "schema": {
  7450. "type": "string"
  7451. },
  7452. "required": false
  7453. }
  7454. ],
  7455. "responses": {
  7456. "200": {
  7457. "description": "Permission processed successfully",
  7458. "content": {
  7459. "application/json": {
  7460. "schema": {
  7461. "type": "boolean",
  7462. "description": "Permission processed successfully"
  7463. }
  7464. }
  7465. }
  7466. },
  7467. "400": {
  7468. "description": "BadRequest | InvalidRequestError",
  7469. "content": {
  7470. "application/json": {
  7471. "schema": {
  7472. "anyOf": [
  7473. {
  7474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7475. },
  7476. {
  7477. "$ref": "#/components/schemas/InvalidRequestError"
  7478. }
  7479. ]
  7480. }
  7481. }
  7482. }
  7483. },
  7484. "404": {
  7485. "description": "NotFoundError | PermissionNotFoundError",
  7486. "content": {
  7487. "application/json": {
  7488. "schema": {
  7489. "anyOf": [
  7490. {
  7491. "$ref": "#/components/schemas/NotFoundError"
  7492. },
  7493. {
  7494. "$ref": "#/components/schemas/PermissionNotFoundError"
  7495. }
  7496. ]
  7497. }
  7498. }
  7499. }
  7500. }
  7501. },
  7502. "description": "Approve or deny a permission request from the AI assistant.",
  7503. "summary": "Respond to permission",
  7504. "deprecated": true,
  7505. "requestBody": {
  7506. "content": {
  7507. "application/json": {
  7508. "schema": {
  7509. "type": "object",
  7510. "properties": {
  7511. "response": {
  7512. "type": "string",
  7513. "enum": ["once", "always", "reject"]
  7514. }
  7515. },
  7516. "required": ["response"],
  7517. "additionalProperties": false
  7518. }
  7519. }
  7520. }
  7521. },
  7522. "x-codeSamples": [
  7523. {
  7524. "lang": "js",
  7525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7526. }
  7527. ]
  7528. }
  7529. },
  7530. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7531. "delete": {
  7532. "tags": ["session"],
  7533. "operationId": "part.delete",
  7534. "parameters": [
  7535. {
  7536. "name": "sessionID",
  7537. "in": "path",
  7538. "schema": {
  7539. "type": "string",
  7540. "pattern": "^ses"
  7541. },
  7542. "required": true
  7543. },
  7544. {
  7545. "name": "messageID",
  7546. "in": "path",
  7547. "schema": {
  7548. "type": "string",
  7549. "pattern": "^msg"
  7550. },
  7551. "required": true
  7552. },
  7553. {
  7554. "name": "partID",
  7555. "in": "path",
  7556. "schema": {
  7557. "type": "string",
  7558. "pattern": "^prt"
  7559. },
  7560. "required": true
  7561. },
  7562. {
  7563. "name": "directory",
  7564. "in": "query",
  7565. "schema": {
  7566. "type": "string"
  7567. },
  7568. "required": false
  7569. },
  7570. {
  7571. "name": "workspace",
  7572. "in": "query",
  7573. "schema": {
  7574. "type": "string"
  7575. },
  7576. "required": false
  7577. }
  7578. ],
  7579. "responses": {
  7580. "200": {
  7581. "description": "Successfully deleted part",
  7582. "content": {
  7583. "application/json": {
  7584. "schema": {
  7585. "type": "boolean",
  7586. "description": "Successfully deleted part"
  7587. }
  7588. }
  7589. }
  7590. },
  7591. "400": {
  7592. "description": "BadRequest | InvalidRequestError",
  7593. "content": {
  7594. "application/json": {
  7595. "schema": {
  7596. "anyOf": [
  7597. {
  7598. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7599. },
  7600. {
  7601. "$ref": "#/components/schemas/InvalidRequestError"
  7602. }
  7603. ]
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "404": {
  7609. "description": "NotFoundError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "$ref": "#/components/schemas/NotFoundError"
  7614. }
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "description": "Delete a part from a message.",
  7620. "x-codeSamples": [
  7621. {
  7622. "lang": "js",
  7623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7624. }
  7625. ]
  7626. },
  7627. "patch": {
  7628. "tags": ["session"],
  7629. "operationId": "part.update",
  7630. "parameters": [
  7631. {
  7632. "name": "sessionID",
  7633. "in": "path",
  7634. "schema": {
  7635. "type": "string",
  7636. "pattern": "^ses"
  7637. },
  7638. "required": true
  7639. },
  7640. {
  7641. "name": "messageID",
  7642. "in": "path",
  7643. "schema": {
  7644. "type": "string",
  7645. "pattern": "^msg"
  7646. },
  7647. "required": true
  7648. },
  7649. {
  7650. "name": "partID",
  7651. "in": "path",
  7652. "schema": {
  7653. "type": "string",
  7654. "pattern": "^prt"
  7655. },
  7656. "required": true
  7657. },
  7658. {
  7659. "name": "directory",
  7660. "in": "query",
  7661. "schema": {
  7662. "type": "string"
  7663. },
  7664. "required": false
  7665. },
  7666. {
  7667. "name": "workspace",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. }
  7674. ],
  7675. "responses": {
  7676. "200": {
  7677. "description": "Successfully updated part",
  7678. "content": {
  7679. "application/json": {
  7680. "schema": {
  7681. "$ref": "#/components/schemas/Part"
  7682. }
  7683. }
  7684. }
  7685. },
  7686. "400": {
  7687. "description": "BadRequest | InvalidRequestError",
  7688. "content": {
  7689. "application/json": {
  7690. "schema": {
  7691. "anyOf": [
  7692. {
  7693. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7694. },
  7695. {
  7696. "$ref": "#/components/schemas/InvalidRequestError"
  7697. }
  7698. ]
  7699. }
  7700. }
  7701. }
  7702. },
  7703. "404": {
  7704. "description": "NotFoundError",
  7705. "content": {
  7706. "application/json": {
  7707. "schema": {
  7708. "$ref": "#/components/schemas/NotFoundError"
  7709. }
  7710. }
  7711. }
  7712. }
  7713. },
  7714. "description": "Update a part in a message.",
  7715. "requestBody": {
  7716. "content": {
  7717. "application/json": {
  7718. "schema": {
  7719. "$ref": "#/components/schemas/Part"
  7720. }
  7721. }
  7722. }
  7723. },
  7724. "x-codeSamples": [
  7725. {
  7726. "lang": "js",
  7727. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7728. }
  7729. ]
  7730. }
  7731. },
  7732. "/sync/start": {
  7733. "post": {
  7734. "tags": ["sync"],
  7735. "operationId": "sync.start",
  7736. "parameters": [
  7737. {
  7738. "name": "directory",
  7739. "in": "query",
  7740. "schema": {
  7741. "type": "string"
  7742. },
  7743. "required": false
  7744. },
  7745. {
  7746. "name": "workspace",
  7747. "in": "query",
  7748. "schema": {
  7749. "type": "string"
  7750. },
  7751. "required": false
  7752. }
  7753. ],
  7754. "responses": {
  7755. "200": {
  7756. "description": "Workspace sync started",
  7757. "content": {
  7758. "application/json": {
  7759. "schema": {
  7760. "type": "boolean",
  7761. "description": "Workspace sync started"
  7762. }
  7763. }
  7764. }
  7765. },
  7766. "400": {
  7767. "description": "Bad request",
  7768. "content": {
  7769. "application/json": {
  7770. "schema": {
  7771. "$ref": "#/components/schemas/BadRequestError"
  7772. }
  7773. }
  7774. }
  7775. }
  7776. },
  7777. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7778. "summary": "Start workspace sync",
  7779. "x-codeSamples": [
  7780. {
  7781. "lang": "js",
  7782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7783. }
  7784. ]
  7785. }
  7786. },
  7787. "/sync/replay": {
  7788. "post": {
  7789. "tags": ["sync"],
  7790. "operationId": "sync.replay",
  7791. "parameters": [
  7792. {
  7793. "name": "directory",
  7794. "in": "query",
  7795. "schema": {
  7796. "type": "string"
  7797. },
  7798. "required": false
  7799. },
  7800. {
  7801. "name": "workspace",
  7802. "in": "query",
  7803. "schema": {
  7804. "type": "string"
  7805. },
  7806. "required": false
  7807. }
  7808. ],
  7809. "responses": {
  7810. "200": {
  7811. "description": "Replayed sync events",
  7812. "content": {
  7813. "application/json": {
  7814. "schema": {
  7815. "type": "object",
  7816. "properties": {
  7817. "sessionID": {
  7818. "type": "string"
  7819. }
  7820. },
  7821. "required": ["sessionID"],
  7822. "additionalProperties": false,
  7823. "description": "Replayed sync events"
  7824. }
  7825. }
  7826. }
  7827. },
  7828. "400": {
  7829. "description": "BadRequest | InvalidRequestError",
  7830. "content": {
  7831. "application/json": {
  7832. "schema": {
  7833. "anyOf": [
  7834. {
  7835. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7836. },
  7837. {
  7838. "$ref": "#/components/schemas/InvalidRequestError"
  7839. }
  7840. ]
  7841. }
  7842. }
  7843. }
  7844. }
  7845. },
  7846. "description": "Validate and replay a complete sync event history.",
  7847. "summary": "Replay sync events",
  7848. "requestBody": {
  7849. "content": {
  7850. "application/json": {
  7851. "schema": {
  7852. "type": "object",
  7853. "properties": {
  7854. "directory": {
  7855. "type": "string"
  7856. },
  7857. "events": {
  7858. "type": "array",
  7859. "minItems": 1,
  7860. "items": {
  7861. "type": "object",
  7862. "properties": {
  7863. "id": {
  7864. "type": "string"
  7865. },
  7866. "aggregateID": {
  7867. "type": "string"
  7868. },
  7869. "seq": {
  7870. "type": "integer",
  7871. "minimum": 0
  7872. },
  7873. "type": {
  7874. "type": "string"
  7875. },
  7876. "data": {
  7877. "type": "object"
  7878. }
  7879. },
  7880. "required": ["id", "aggregateID", "seq", "type", "data"],
  7881. "additionalProperties": false
  7882. }
  7883. }
  7884. },
  7885. "required": ["directory", "events"],
  7886. "additionalProperties": false
  7887. }
  7888. }
  7889. }
  7890. },
  7891. "x-codeSamples": [
  7892. {
  7893. "lang": "js",
  7894. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7895. }
  7896. ]
  7897. }
  7898. },
  7899. "/sync/steal": {
  7900. "post": {
  7901. "tags": ["sync"],
  7902. "operationId": "sync.steal",
  7903. "parameters": [
  7904. {
  7905. "name": "directory",
  7906. "in": "query",
  7907. "schema": {
  7908. "type": "string"
  7909. },
  7910. "required": false
  7911. },
  7912. {
  7913. "name": "workspace",
  7914. "in": "query",
  7915. "schema": {
  7916. "type": "string"
  7917. },
  7918. "required": false
  7919. }
  7920. ],
  7921. "responses": {
  7922. "200": {
  7923. "description": "Session stolen into workspace",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "type": "object",
  7928. "properties": {
  7929. "sessionID": {
  7930. "type": "string",
  7931. "pattern": "^ses"
  7932. }
  7933. },
  7934. "required": ["sessionID"],
  7935. "additionalProperties": false,
  7936. "description": "Session stolen into workspace"
  7937. }
  7938. }
  7939. }
  7940. },
  7941. "400": {
  7942. "description": "BadRequest | InvalidRequestError",
  7943. "content": {
  7944. "application/json": {
  7945. "schema": {
  7946. "anyOf": [
  7947. {
  7948. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7949. },
  7950. {
  7951. "$ref": "#/components/schemas/InvalidRequestError"
  7952. }
  7953. ]
  7954. }
  7955. }
  7956. }
  7957. }
  7958. },
  7959. "description": "Update a session to belong to the current workspace through the sync event system.",
  7960. "summary": "Steal session into workspace",
  7961. "requestBody": {
  7962. "content": {
  7963. "application/json": {
  7964. "schema": {
  7965. "type": "object",
  7966. "properties": {
  7967. "sessionID": {
  7968. "type": "string",
  7969. "pattern": "^ses"
  7970. }
  7971. },
  7972. "required": ["sessionID"],
  7973. "additionalProperties": false
  7974. }
  7975. }
  7976. }
  7977. },
  7978. "x-codeSamples": [
  7979. {
  7980. "lang": "js",
  7981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7982. }
  7983. ]
  7984. }
  7985. },
  7986. "/sync/history": {
  7987. "post": {
  7988. "tags": ["sync"],
  7989. "operationId": "sync.history.list",
  7990. "parameters": [
  7991. {
  7992. "name": "directory",
  7993. "in": "query",
  7994. "schema": {
  7995. "type": "string"
  7996. },
  7997. "required": false
  7998. },
  7999. {
  8000. "name": "workspace",
  8001. "in": "query",
  8002. "schema": {
  8003. "type": "string"
  8004. },
  8005. "required": false
  8006. }
  8007. ],
  8008. "responses": {
  8009. "200": {
  8010. "description": "Sync events",
  8011. "content": {
  8012. "application/json": {
  8013. "schema": {
  8014. "type": "array",
  8015. "items": {
  8016. "type": "object",
  8017. "properties": {
  8018. "id": {
  8019. "type": "string"
  8020. },
  8021. "aggregate_id": {
  8022. "type": "string"
  8023. },
  8024. "seq": {
  8025. "type": "integer",
  8026. "minimum": 0
  8027. },
  8028. "type": {
  8029. "type": "string"
  8030. },
  8031. "data": {
  8032. "type": "object"
  8033. }
  8034. },
  8035. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8036. "additionalProperties": false
  8037. },
  8038. "description": "Sync events"
  8039. }
  8040. }
  8041. }
  8042. },
  8043. "400": {
  8044. "description": "BadRequest | InvalidRequestError",
  8045. "content": {
  8046. "application/json": {
  8047. "schema": {
  8048. "anyOf": [
  8049. {
  8050. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8051. },
  8052. {
  8053. "$ref": "#/components/schemas/InvalidRequestError"
  8054. }
  8055. ]
  8056. }
  8057. }
  8058. }
  8059. }
  8060. },
  8061. "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.",
  8062. "summary": "List sync events",
  8063. "requestBody": {
  8064. "content": {
  8065. "application/json": {
  8066. "schema": {
  8067. "type": "object",
  8068. "additionalProperties": {
  8069. "type": "integer",
  8070. "minimum": 0
  8071. }
  8072. }
  8073. }
  8074. }
  8075. },
  8076. "x-codeSamples": [
  8077. {
  8078. "lang": "js",
  8079. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8080. }
  8081. ]
  8082. }
  8083. },
  8084. "/api/session": {
  8085. "get": {
  8086. "tags": ["v2"],
  8087. "operationId": "v2.session.list",
  8088. "parameters": [
  8089. {
  8090. "name": "directory",
  8091. "in": "query",
  8092. "schema": {
  8093. "type": "string"
  8094. },
  8095. "required": false
  8096. },
  8097. {
  8098. "name": "workspace",
  8099. "in": "query",
  8100. "schema": {
  8101. "type": "string"
  8102. },
  8103. "required": false
  8104. },
  8105. {
  8106. "name": "limit",
  8107. "in": "query",
  8108. "schema": {
  8109. "type": "number"
  8110. },
  8111. "required": false
  8112. },
  8113. {
  8114. "name": "order",
  8115. "in": "query",
  8116. "schema": {
  8117. "type": "string",
  8118. "enum": ["asc", "desc"]
  8119. },
  8120. "required": false
  8121. },
  8122. {
  8123. "name": "path",
  8124. "in": "query",
  8125. "schema": {
  8126. "type": "string"
  8127. },
  8128. "required": false
  8129. },
  8130. {
  8131. "name": "roots",
  8132. "in": "query",
  8133. "schema": {
  8134. "anyOf": [
  8135. {
  8136. "type": "boolean"
  8137. },
  8138. {
  8139. "type": "string",
  8140. "enum": ["true", "false"]
  8141. }
  8142. ]
  8143. },
  8144. "required": false
  8145. },
  8146. {
  8147. "name": "start",
  8148. "in": "query",
  8149. "schema": {
  8150. "type": "number"
  8151. },
  8152. "required": false
  8153. },
  8154. {
  8155. "name": "search",
  8156. "in": "query",
  8157. "schema": {
  8158. "type": "string"
  8159. },
  8160. "required": false
  8161. },
  8162. {
  8163. "name": "cursor",
  8164. "in": "query",
  8165. "schema": {
  8166. "type": "string",
  8167. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8168. },
  8169. "required": false
  8170. }
  8171. ],
  8172. "security": [],
  8173. "responses": {
  8174. "200": {
  8175. "description": "V2SessionsResponse",
  8176. "content": {
  8177. "application/json": {
  8178. "schema": {
  8179. "$ref": "#/components/schemas/V2SessionsResponse"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "InvalidCursorError | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/InvalidCursorError"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. },
  8196. {
  8197. "$ref": "#/components/schemas/InvalidRequestError"
  8198. }
  8199. ]
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "401": {
  8205. "description": "UnauthorizedError",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/UnauthorizedError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "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.",
  8216. "summary": "List v2 sessions",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/api/session/{sessionID}/prompt": {
  8226. "post": {
  8227. "tags": ["v2"],
  8228. "operationId": "v2.session.prompt",
  8229. "parameters": [
  8230. {
  8231. "name": "sessionID",
  8232. "in": "path",
  8233. "schema": {
  8234. "type": "string",
  8235. "pattern": "^ses"
  8236. },
  8237. "required": true
  8238. },
  8239. {
  8240. "name": "directory",
  8241. "in": "query",
  8242. "schema": {
  8243. "type": "string"
  8244. },
  8245. "required": false
  8246. },
  8247. {
  8248. "name": "workspace",
  8249. "in": "query",
  8250. "schema": {
  8251. "type": "string"
  8252. },
  8253. "required": false
  8254. }
  8255. ],
  8256. "security": [],
  8257. "responses": {
  8258. "200": {
  8259. "description": "Session.Message",
  8260. "content": {
  8261. "application/json": {
  8262. "schema": {
  8263. "$ref": "#/components/schemas/SessionMessage"
  8264. }
  8265. }
  8266. }
  8267. },
  8268. "400": {
  8269. "description": "InvalidRequestError",
  8270. "content": {
  8271. "application/json": {
  8272. "schema": {
  8273. "$ref": "#/components/schemas/InvalidRequestError"
  8274. }
  8275. }
  8276. }
  8277. },
  8278. "401": {
  8279. "description": "UnauthorizedError",
  8280. "content": {
  8281. "application/json": {
  8282. "schema": {
  8283. "$ref": "#/components/schemas/UnauthorizedError"
  8284. }
  8285. }
  8286. }
  8287. },
  8288. "404": {
  8289. "description": "SessionNotFoundError",
  8290. "content": {
  8291. "application/json": {
  8292. "schema": {
  8293. "$ref": "#/components/schemas/SessionNotFoundError"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "503": {
  8299. "description": "ServiceUnavailableError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "$ref": "#/components/schemas/ServiceUnavailableError"
  8304. }
  8305. }
  8306. }
  8307. }
  8308. },
  8309. "description": "Create a v2 session message and queue it for the agent loop.",
  8310. "summary": "Send v2 message",
  8311. "requestBody": {
  8312. "content": {
  8313. "application/json": {
  8314. "schema": {
  8315. "type": "object",
  8316. "properties": {
  8317. "prompt": {
  8318. "$ref": "#/components/schemas/Prompt"
  8319. },
  8320. "delivery": {
  8321. "$ref": "#/components/schemas/SessionDelivery"
  8322. }
  8323. },
  8324. "required": ["prompt"],
  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.v2.session.prompt({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/api/session/{sessionID}/compact": {
  8339. "post": {
  8340. "tags": ["v2"],
  8341. "operationId": "v2.session.compact",
  8342. "parameters": [
  8343. {
  8344. "name": "sessionID",
  8345. "in": "path",
  8346. "schema": {
  8347. "type": "string",
  8348. "pattern": "^ses"
  8349. },
  8350. "required": true
  8351. },
  8352. {
  8353. "name": "directory",
  8354. "in": "query",
  8355. "schema": {
  8356. "type": "string"
  8357. },
  8358. "required": false
  8359. },
  8360. {
  8361. "name": "workspace",
  8362. "in": "query",
  8363. "schema": {
  8364. "type": "string"
  8365. },
  8366. "required": false
  8367. }
  8368. ],
  8369. "security": [],
  8370. "responses": {
  8371. "204": {
  8372. "description": "<No Content>"
  8373. },
  8374. "400": {
  8375. "description": "InvalidRequestError",
  8376. "content": {
  8377. "application/json": {
  8378. "schema": {
  8379. "$ref": "#/components/schemas/InvalidRequestError"
  8380. }
  8381. }
  8382. }
  8383. },
  8384. "401": {
  8385. "description": "UnauthorizedError",
  8386. "content": {
  8387. "application/json": {
  8388. "schema": {
  8389. "$ref": "#/components/schemas/UnauthorizedError"
  8390. }
  8391. }
  8392. }
  8393. },
  8394. "404": {
  8395. "description": "SessionNotFoundError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/SessionNotFoundError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "503": {
  8405. "description": "ServiceUnavailableError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/ServiceUnavailableError"
  8410. }
  8411. }
  8412. }
  8413. }
  8414. },
  8415. "description": "Compact a v2 session conversation.",
  8416. "summary": "Compact v2 session",
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/api/session/{sessionID}/wait": {
  8426. "post": {
  8427. "tags": ["v2"],
  8428. "operationId": "v2.session.wait",
  8429. "parameters": [
  8430. {
  8431. "name": "sessionID",
  8432. "in": "path",
  8433. "schema": {
  8434. "type": "string",
  8435. "pattern": "^ses"
  8436. },
  8437. "required": true
  8438. },
  8439. {
  8440. "name": "directory",
  8441. "in": "query",
  8442. "schema": {
  8443. "type": "string"
  8444. },
  8445. "required": false
  8446. },
  8447. {
  8448. "name": "workspace",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. }
  8455. ],
  8456. "security": [],
  8457. "responses": {
  8458. "204": {
  8459. "description": "<No Content>"
  8460. },
  8461. "400": {
  8462. "description": "InvalidRequestError",
  8463. "content": {
  8464. "application/json": {
  8465. "schema": {
  8466. "$ref": "#/components/schemas/InvalidRequestError"
  8467. }
  8468. }
  8469. }
  8470. },
  8471. "401": {
  8472. "description": "UnauthorizedError",
  8473. "content": {
  8474. "application/json": {
  8475. "schema": {
  8476. "$ref": "#/components/schemas/UnauthorizedError"
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "404": {
  8482. "description": "SessionNotFoundError",
  8483. "content": {
  8484. "application/json": {
  8485. "schema": {
  8486. "$ref": "#/components/schemas/SessionNotFoundError"
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "503": {
  8492. "description": "ServiceUnavailableError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/ServiceUnavailableError"
  8497. }
  8498. }
  8499. }
  8500. }
  8501. },
  8502. "description": "Wait for a v2 session agent loop to become idle.",
  8503. "summary": "Wait for v2 session",
  8504. "x-codeSamples": [
  8505. {
  8506. "lang": "js",
  8507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8508. }
  8509. ]
  8510. }
  8511. },
  8512. "/api/session/{sessionID}/context": {
  8513. "get": {
  8514. "tags": ["v2"],
  8515. "operationId": "v2.session.context",
  8516. "parameters": [
  8517. {
  8518. "name": "sessionID",
  8519. "in": "path",
  8520. "schema": {
  8521. "type": "string",
  8522. "pattern": "^ses"
  8523. },
  8524. "required": true
  8525. },
  8526. {
  8527. "name": "directory",
  8528. "in": "query",
  8529. "schema": {
  8530. "type": "string"
  8531. },
  8532. "required": false
  8533. },
  8534. {
  8535. "name": "workspace",
  8536. "in": "query",
  8537. "schema": {
  8538. "type": "string"
  8539. },
  8540. "required": false
  8541. }
  8542. ],
  8543. "security": [],
  8544. "responses": {
  8545. "200": {
  8546. "description": "Success",
  8547. "content": {
  8548. "application/json": {
  8549. "schema": {
  8550. "type": "array",
  8551. "items": {
  8552. "$ref": "#/components/schemas/SessionMessage"
  8553. }
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "$ref": "#/components/schemas/InvalidRequestError"
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "401": {
  8569. "description": "UnauthorizedError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/UnauthorizedError"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "404": {
  8579. "description": "SessionNotFoundError",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/SessionNotFoundError"
  8584. }
  8585. }
  8586. }
  8587. },
  8588. "500": {
  8589. "description": "UnknownError",
  8590. "content": {
  8591. "application/json": {
  8592. "schema": {
  8593. "$ref": "#/components/schemas/UnknownError1"
  8594. }
  8595. }
  8596. }
  8597. }
  8598. },
  8599. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8600. "summary": "Get v2 session context",
  8601. "x-codeSamples": [
  8602. {
  8603. "lang": "js",
  8604. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8605. }
  8606. ]
  8607. }
  8608. },
  8609. "/api/session/{sessionID}/message": {
  8610. "get": {
  8611. "tags": ["v2 messages"],
  8612. "operationId": "v2.session.messages",
  8613. "parameters": [
  8614. {
  8615. "name": "sessionID",
  8616. "in": "path",
  8617. "schema": {
  8618. "type": "string",
  8619. "pattern": "^ses"
  8620. },
  8621. "required": true
  8622. },
  8623. {
  8624. "name": "directory",
  8625. "in": "query",
  8626. "schema": {
  8627. "type": "string"
  8628. },
  8629. "required": false
  8630. },
  8631. {
  8632. "name": "workspace",
  8633. "in": "query",
  8634. "schema": {
  8635. "type": "string"
  8636. },
  8637. "required": false
  8638. },
  8639. {
  8640. "name": "limit",
  8641. "in": "query",
  8642. "schema": {
  8643. "type": "number"
  8644. },
  8645. "required": false
  8646. },
  8647. {
  8648. "name": "order",
  8649. "in": "query",
  8650. "schema": {
  8651. "type": "string",
  8652. "enum": ["asc", "desc"]
  8653. },
  8654. "required": false
  8655. },
  8656. {
  8657. "name": "cursor",
  8658. "in": "query",
  8659. "schema": {
  8660. "type": "string",
  8661. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8662. },
  8663. "required": false
  8664. }
  8665. ],
  8666. "security": [],
  8667. "responses": {
  8668. "200": {
  8669. "description": "V2SessionMessagesResponse",
  8670. "content": {
  8671. "application/json": {
  8672. "schema": {
  8673. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "400": {
  8679. "description": "InvalidCursorError | InvalidRequestError",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "anyOf": [
  8684. {
  8685. "$ref": "#/components/schemas/InvalidCursorError"
  8686. },
  8687. {
  8688. "$ref": "#/components/schemas/InvalidRequestError"
  8689. }
  8690. ]
  8691. }
  8692. }
  8693. }
  8694. },
  8695. "401": {
  8696. "description": "UnauthorizedError",
  8697. "content": {
  8698. "application/json": {
  8699. "schema": {
  8700. "$ref": "#/components/schemas/UnauthorizedError"
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "404": {
  8706. "description": "SessionNotFoundError",
  8707. "content": {
  8708. "application/json": {
  8709. "schema": {
  8710. "$ref": "#/components/schemas/SessionNotFoundError"
  8711. }
  8712. }
  8713. }
  8714. },
  8715. "500": {
  8716. "description": "UnknownError",
  8717. "content": {
  8718. "application/json": {
  8719. "schema": {
  8720. "$ref": "#/components/schemas/UnknownError1"
  8721. }
  8722. }
  8723. }
  8724. }
  8725. },
  8726. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  8727. "summary": "Get v2 session messages",
  8728. "x-codeSamples": [
  8729. {
  8730. "lang": "js",
  8731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8732. }
  8733. ]
  8734. }
  8735. },
  8736. "/api/model": {
  8737. "get": {
  8738. "tags": ["v2 models"],
  8739. "operationId": "v2.model.list",
  8740. "parameters": [
  8741. {
  8742. "name": "location",
  8743. "in": "query",
  8744. "schema": {
  8745. "type": "object",
  8746. "properties": {
  8747. "directory": {
  8748. "type": "string"
  8749. },
  8750. "workspace": {
  8751. "type": "string"
  8752. }
  8753. },
  8754. "additionalProperties": false
  8755. },
  8756. "required": false,
  8757. "style": "deepObject",
  8758. "explode": true
  8759. }
  8760. ],
  8761. "security": [],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Success",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "array",
  8769. "items": {
  8770. "$ref": "#/components/schemas/ModelV2Info"
  8771. }
  8772. }
  8773. }
  8774. }
  8775. },
  8776. "400": {
  8777. "description": "InvalidRequestError",
  8778. "content": {
  8779. "application/json": {
  8780. "schema": {
  8781. "$ref": "#/components/schemas/InvalidRequestError"
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "401": {
  8787. "description": "UnauthorizedError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/UnauthorizedError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "503": {
  8797. "description": "ServiceUnavailableError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/ServiceUnavailableError"
  8802. }
  8803. }
  8804. }
  8805. }
  8806. },
  8807. "description": "Retrieve available v2 models ordered by release date.",
  8808. "summary": "List v2 models",
  8809. "x-codeSamples": [
  8810. {
  8811. "lang": "js",
  8812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8813. }
  8814. ]
  8815. }
  8816. },
  8817. "/api/provider": {
  8818. "get": {
  8819. "tags": ["v2 providers"],
  8820. "operationId": "v2.provider.list",
  8821. "parameters": [
  8822. {
  8823. "name": "location",
  8824. "in": "query",
  8825. "schema": {
  8826. "type": "object",
  8827. "properties": {
  8828. "directory": {
  8829. "type": "string"
  8830. },
  8831. "workspace": {
  8832. "type": "string"
  8833. }
  8834. },
  8835. "additionalProperties": false
  8836. },
  8837. "required": false,
  8838. "style": "deepObject",
  8839. "explode": true
  8840. }
  8841. ],
  8842. "security": [],
  8843. "responses": {
  8844. "200": {
  8845. "description": "Success",
  8846. "content": {
  8847. "application/json": {
  8848. "schema": {
  8849. "type": "array",
  8850. "items": {
  8851. "$ref": "#/components/schemas/ProviderV2Info"
  8852. }
  8853. }
  8854. }
  8855. }
  8856. },
  8857. "400": {
  8858. "description": "InvalidRequestError",
  8859. "content": {
  8860. "application/json": {
  8861. "schema": {
  8862. "$ref": "#/components/schemas/InvalidRequestError"
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "401": {
  8868. "description": "UnauthorizedError",
  8869. "content": {
  8870. "application/json": {
  8871. "schema": {
  8872. "$ref": "#/components/schemas/UnauthorizedError"
  8873. }
  8874. }
  8875. }
  8876. },
  8877. "503": {
  8878. "description": "ServiceUnavailableError",
  8879. "content": {
  8880. "application/json": {
  8881. "schema": {
  8882. "$ref": "#/components/schemas/ServiceUnavailableError"
  8883. }
  8884. }
  8885. }
  8886. }
  8887. },
  8888. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8889. "summary": "List v2 providers",
  8890. "x-codeSamples": [
  8891. {
  8892. "lang": "js",
  8893. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8894. }
  8895. ]
  8896. }
  8897. },
  8898. "/api/provider/{providerID}": {
  8899. "get": {
  8900. "tags": ["v2 providers"],
  8901. "operationId": "v2.provider.get",
  8902. "parameters": [
  8903. {
  8904. "name": "providerID",
  8905. "in": "path",
  8906. "schema": {
  8907. "type": "string"
  8908. },
  8909. "required": true
  8910. },
  8911. {
  8912. "name": "location",
  8913. "in": "query",
  8914. "schema": {
  8915. "type": "object",
  8916. "properties": {
  8917. "directory": {
  8918. "type": "string"
  8919. },
  8920. "workspace": {
  8921. "type": "string"
  8922. }
  8923. },
  8924. "additionalProperties": false
  8925. },
  8926. "required": false,
  8927. "style": "deepObject",
  8928. "explode": true
  8929. }
  8930. ],
  8931. "security": [],
  8932. "responses": {
  8933. "200": {
  8934. "description": "ProviderV2.Info",
  8935. "content": {
  8936. "application/json": {
  8937. "schema": {
  8938. "$ref": "#/components/schemas/ProviderV2Info"
  8939. }
  8940. }
  8941. }
  8942. },
  8943. "400": {
  8944. "description": "InvalidRequestError",
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "$ref": "#/components/schemas/InvalidRequestError"
  8949. }
  8950. }
  8951. }
  8952. },
  8953. "401": {
  8954. "description": "UnauthorizedError",
  8955. "content": {
  8956. "application/json": {
  8957. "schema": {
  8958. "$ref": "#/components/schemas/UnauthorizedError"
  8959. }
  8960. }
  8961. }
  8962. },
  8963. "404": {
  8964. "description": "ProviderNotFoundError",
  8965. "content": {
  8966. "application/json": {
  8967. "schema": {
  8968. "$ref": "#/components/schemas/ProviderNotFoundError"
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "503": {
  8974. "description": "ServiceUnavailableError",
  8975. "content": {
  8976. "application/json": {
  8977. "schema": {
  8978. "$ref": "#/components/schemas/ServiceUnavailableError"
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8985. "summary": "Get v2 provider",
  8986. "x-codeSamples": [
  8987. {
  8988. "lang": "js",
  8989. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  8990. }
  8991. ]
  8992. }
  8993. },
  8994. "/tui/append-prompt": {
  8995. "post": {
  8996. "tags": ["tui"],
  8997. "operationId": "tui.appendPrompt",
  8998. "parameters": [
  8999. {
  9000. "name": "directory",
  9001. "in": "query",
  9002. "schema": {
  9003. "type": "string"
  9004. },
  9005. "required": false
  9006. },
  9007. {
  9008. "name": "workspace",
  9009. "in": "query",
  9010. "schema": {
  9011. "type": "string"
  9012. },
  9013. "required": false
  9014. }
  9015. ],
  9016. "responses": {
  9017. "200": {
  9018. "description": "Prompt processed successfully",
  9019. "content": {
  9020. "application/json": {
  9021. "schema": {
  9022. "type": "boolean",
  9023. "description": "Prompt processed successfully"
  9024. }
  9025. }
  9026. }
  9027. },
  9028. "400": {
  9029. "description": "BadRequest | InvalidRequestError",
  9030. "content": {
  9031. "application/json": {
  9032. "schema": {
  9033. "anyOf": [
  9034. {
  9035. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9036. },
  9037. {
  9038. "$ref": "#/components/schemas/InvalidRequestError"
  9039. }
  9040. ]
  9041. }
  9042. }
  9043. }
  9044. }
  9045. },
  9046. "description": "Append prompt to the TUI.",
  9047. "summary": "Append TUI prompt",
  9048. "requestBody": {
  9049. "content": {
  9050. "application/json": {
  9051. "schema": {
  9052. "type": "object",
  9053. "properties": {
  9054. "text": {
  9055. "type": "string"
  9056. }
  9057. },
  9058. "required": ["text"],
  9059. "additionalProperties": false
  9060. }
  9061. }
  9062. }
  9063. },
  9064. "x-codeSamples": [
  9065. {
  9066. "lang": "js",
  9067. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9068. }
  9069. ]
  9070. }
  9071. },
  9072. "/tui/open-help": {
  9073. "post": {
  9074. "tags": ["tui"],
  9075. "operationId": "tui.openHelp",
  9076. "parameters": [
  9077. {
  9078. "name": "directory",
  9079. "in": "query",
  9080. "schema": {
  9081. "type": "string"
  9082. },
  9083. "required": false
  9084. },
  9085. {
  9086. "name": "workspace",
  9087. "in": "query",
  9088. "schema": {
  9089. "type": "string"
  9090. },
  9091. "required": false
  9092. }
  9093. ],
  9094. "responses": {
  9095. "200": {
  9096. "description": "Help dialog opened successfully",
  9097. "content": {
  9098. "application/json": {
  9099. "schema": {
  9100. "type": "boolean",
  9101. "description": "Help dialog opened successfully"
  9102. }
  9103. }
  9104. }
  9105. },
  9106. "400": {
  9107. "description": "Bad request",
  9108. "content": {
  9109. "application/json": {
  9110. "schema": {
  9111. "$ref": "#/components/schemas/BadRequestError"
  9112. }
  9113. }
  9114. }
  9115. }
  9116. },
  9117. "description": "Open the help dialog in the TUI to display user assistance information.",
  9118. "summary": "Open help dialog",
  9119. "x-codeSamples": [
  9120. {
  9121. "lang": "js",
  9122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9123. }
  9124. ]
  9125. }
  9126. },
  9127. "/tui/open-sessions": {
  9128. "post": {
  9129. "tags": ["tui"],
  9130. "operationId": "tui.openSessions",
  9131. "parameters": [
  9132. {
  9133. "name": "directory",
  9134. "in": "query",
  9135. "schema": {
  9136. "type": "string"
  9137. },
  9138. "required": false
  9139. },
  9140. {
  9141. "name": "workspace",
  9142. "in": "query",
  9143. "schema": {
  9144. "type": "string"
  9145. },
  9146. "required": false
  9147. }
  9148. ],
  9149. "responses": {
  9150. "200": {
  9151. "description": "Session dialog opened successfully",
  9152. "content": {
  9153. "application/json": {
  9154. "schema": {
  9155. "type": "boolean",
  9156. "description": "Session dialog opened successfully"
  9157. }
  9158. }
  9159. }
  9160. },
  9161. "400": {
  9162. "description": "Bad request",
  9163. "content": {
  9164. "application/json": {
  9165. "schema": {
  9166. "$ref": "#/components/schemas/BadRequestError"
  9167. }
  9168. }
  9169. }
  9170. }
  9171. },
  9172. "description": "Open the session dialog.",
  9173. "summary": "Open sessions dialog",
  9174. "x-codeSamples": [
  9175. {
  9176. "lang": "js",
  9177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9178. }
  9179. ]
  9180. }
  9181. },
  9182. "/tui/open-themes": {
  9183. "post": {
  9184. "tags": ["tui"],
  9185. "operationId": "tui.openThemes",
  9186. "parameters": [
  9187. {
  9188. "name": "directory",
  9189. "in": "query",
  9190. "schema": {
  9191. "type": "string"
  9192. },
  9193. "required": false
  9194. },
  9195. {
  9196. "name": "workspace",
  9197. "in": "query",
  9198. "schema": {
  9199. "type": "string"
  9200. },
  9201. "required": false
  9202. }
  9203. ],
  9204. "responses": {
  9205. "200": {
  9206. "description": "Theme dialog opened successfully",
  9207. "content": {
  9208. "application/json": {
  9209. "schema": {
  9210. "type": "boolean",
  9211. "description": "Theme dialog opened successfully"
  9212. }
  9213. }
  9214. }
  9215. },
  9216. "400": {
  9217. "description": "Bad request",
  9218. "content": {
  9219. "application/json": {
  9220. "schema": {
  9221. "$ref": "#/components/schemas/BadRequestError"
  9222. }
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "description": "Open the theme dialog.",
  9228. "summary": "Open themes dialog",
  9229. "x-codeSamples": [
  9230. {
  9231. "lang": "js",
  9232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9233. }
  9234. ]
  9235. }
  9236. },
  9237. "/tui/open-models": {
  9238. "post": {
  9239. "tags": ["tui"],
  9240. "operationId": "tui.openModels",
  9241. "parameters": [
  9242. {
  9243. "name": "directory",
  9244. "in": "query",
  9245. "schema": {
  9246. "type": "string"
  9247. },
  9248. "required": false
  9249. },
  9250. {
  9251. "name": "workspace",
  9252. "in": "query",
  9253. "schema": {
  9254. "type": "string"
  9255. },
  9256. "required": false
  9257. }
  9258. ],
  9259. "responses": {
  9260. "200": {
  9261. "description": "Model dialog opened successfully",
  9262. "content": {
  9263. "application/json": {
  9264. "schema": {
  9265. "type": "boolean",
  9266. "description": "Model dialog opened successfully"
  9267. }
  9268. }
  9269. }
  9270. },
  9271. "400": {
  9272. "description": "Bad request",
  9273. "content": {
  9274. "application/json": {
  9275. "schema": {
  9276. "$ref": "#/components/schemas/BadRequestError"
  9277. }
  9278. }
  9279. }
  9280. }
  9281. },
  9282. "description": "Open the model dialog.",
  9283. "summary": "Open models dialog",
  9284. "x-codeSamples": [
  9285. {
  9286. "lang": "js",
  9287. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9288. }
  9289. ]
  9290. }
  9291. },
  9292. "/tui/submit-prompt": {
  9293. "post": {
  9294. "tags": ["tui"],
  9295. "operationId": "tui.submitPrompt",
  9296. "parameters": [
  9297. {
  9298. "name": "directory",
  9299. "in": "query",
  9300. "schema": {
  9301. "type": "string"
  9302. },
  9303. "required": false
  9304. },
  9305. {
  9306. "name": "workspace",
  9307. "in": "query",
  9308. "schema": {
  9309. "type": "string"
  9310. },
  9311. "required": false
  9312. }
  9313. ],
  9314. "responses": {
  9315. "200": {
  9316. "description": "Prompt submitted successfully",
  9317. "content": {
  9318. "application/json": {
  9319. "schema": {
  9320. "type": "boolean",
  9321. "description": "Prompt submitted successfully"
  9322. }
  9323. }
  9324. }
  9325. },
  9326. "400": {
  9327. "description": "Bad request",
  9328. "content": {
  9329. "application/json": {
  9330. "schema": {
  9331. "$ref": "#/components/schemas/BadRequestError"
  9332. }
  9333. }
  9334. }
  9335. }
  9336. },
  9337. "description": "Submit the prompt.",
  9338. "summary": "Submit TUI prompt",
  9339. "x-codeSamples": [
  9340. {
  9341. "lang": "js",
  9342. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9343. }
  9344. ]
  9345. }
  9346. },
  9347. "/tui/clear-prompt": {
  9348. "post": {
  9349. "tags": ["tui"],
  9350. "operationId": "tui.clearPrompt",
  9351. "parameters": [
  9352. {
  9353. "name": "directory",
  9354. "in": "query",
  9355. "schema": {
  9356. "type": "string"
  9357. },
  9358. "required": false
  9359. },
  9360. {
  9361. "name": "workspace",
  9362. "in": "query",
  9363. "schema": {
  9364. "type": "string"
  9365. },
  9366. "required": false
  9367. }
  9368. ],
  9369. "responses": {
  9370. "200": {
  9371. "description": "Prompt cleared successfully",
  9372. "content": {
  9373. "application/json": {
  9374. "schema": {
  9375. "type": "boolean",
  9376. "description": "Prompt cleared successfully"
  9377. }
  9378. }
  9379. }
  9380. },
  9381. "400": {
  9382. "description": "Bad request",
  9383. "content": {
  9384. "application/json": {
  9385. "schema": {
  9386. "$ref": "#/components/schemas/BadRequestError"
  9387. }
  9388. }
  9389. }
  9390. }
  9391. },
  9392. "description": "Clear the prompt.",
  9393. "summary": "Clear TUI prompt",
  9394. "x-codeSamples": [
  9395. {
  9396. "lang": "js",
  9397. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9398. }
  9399. ]
  9400. }
  9401. },
  9402. "/tui/execute-command": {
  9403. "post": {
  9404. "tags": ["tui"],
  9405. "operationId": "tui.executeCommand",
  9406. "parameters": [
  9407. {
  9408. "name": "directory",
  9409. "in": "query",
  9410. "schema": {
  9411. "type": "string"
  9412. },
  9413. "required": false
  9414. },
  9415. {
  9416. "name": "workspace",
  9417. "in": "query",
  9418. "schema": {
  9419. "type": "string"
  9420. },
  9421. "required": false
  9422. }
  9423. ],
  9424. "responses": {
  9425. "200": {
  9426. "description": "Command executed successfully",
  9427. "content": {
  9428. "application/json": {
  9429. "schema": {
  9430. "type": "boolean",
  9431. "description": "Command executed successfully"
  9432. }
  9433. }
  9434. }
  9435. },
  9436. "400": {
  9437. "description": "BadRequest | InvalidRequestError",
  9438. "content": {
  9439. "application/json": {
  9440. "schema": {
  9441. "anyOf": [
  9442. {
  9443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9444. },
  9445. {
  9446. "$ref": "#/components/schemas/InvalidRequestError"
  9447. }
  9448. ]
  9449. }
  9450. }
  9451. }
  9452. }
  9453. },
  9454. "description": "Execute a TUI command.",
  9455. "summary": "Execute TUI command",
  9456. "requestBody": {
  9457. "content": {
  9458. "application/json": {
  9459. "schema": {
  9460. "type": "object",
  9461. "properties": {
  9462. "command": {
  9463. "type": "string"
  9464. }
  9465. },
  9466. "required": ["command"],
  9467. "additionalProperties": false
  9468. }
  9469. }
  9470. }
  9471. },
  9472. "x-codeSamples": [
  9473. {
  9474. "lang": "js",
  9475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9476. }
  9477. ]
  9478. }
  9479. },
  9480. "/tui/show-toast": {
  9481. "post": {
  9482. "tags": ["tui"],
  9483. "operationId": "tui.showToast",
  9484. "parameters": [
  9485. {
  9486. "name": "directory",
  9487. "in": "query",
  9488. "schema": {
  9489. "type": "string"
  9490. },
  9491. "required": false
  9492. },
  9493. {
  9494. "name": "workspace",
  9495. "in": "query",
  9496. "schema": {
  9497. "type": "string"
  9498. },
  9499. "required": false
  9500. }
  9501. ],
  9502. "responses": {
  9503. "200": {
  9504. "description": "Toast notification shown successfully",
  9505. "content": {
  9506. "application/json": {
  9507. "schema": {
  9508. "type": "boolean",
  9509. "description": "Toast notification shown successfully"
  9510. }
  9511. }
  9512. }
  9513. },
  9514. "400": {
  9515. "description": "Bad request",
  9516. "content": {
  9517. "application/json": {
  9518. "schema": {
  9519. "$ref": "#/components/schemas/BadRequestError"
  9520. }
  9521. }
  9522. }
  9523. }
  9524. },
  9525. "description": "Show a toast notification in the TUI.",
  9526. "summary": "Show TUI toast",
  9527. "requestBody": {
  9528. "content": {
  9529. "application/json": {
  9530. "schema": {
  9531. "type": "object",
  9532. "properties": {
  9533. "title": {
  9534. "type": "string"
  9535. },
  9536. "message": {
  9537. "type": "string"
  9538. },
  9539. "variant": {
  9540. "type": "string",
  9541. "enum": ["info", "success", "warning", "error"]
  9542. },
  9543. "duration": {
  9544. "type": "integer",
  9545. "exclusiveMinimum": 0
  9546. }
  9547. },
  9548. "required": ["message", "variant"],
  9549. "additionalProperties": false
  9550. }
  9551. }
  9552. }
  9553. },
  9554. "x-codeSamples": [
  9555. {
  9556. "lang": "js",
  9557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9558. }
  9559. ]
  9560. }
  9561. },
  9562. "/tui/publish": {
  9563. "post": {
  9564. "tags": ["tui"],
  9565. "operationId": "tui.publish",
  9566. "parameters": [
  9567. {
  9568. "name": "directory",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. },
  9575. {
  9576. "name": "workspace",
  9577. "in": "query",
  9578. "schema": {
  9579. "type": "string"
  9580. },
  9581. "required": false
  9582. }
  9583. ],
  9584. "responses": {
  9585. "200": {
  9586. "description": "Event published successfully",
  9587. "content": {
  9588. "application/json": {
  9589. "schema": {
  9590. "type": "boolean",
  9591. "description": "Event published successfully"
  9592. }
  9593. }
  9594. }
  9595. },
  9596. "400": {
  9597. "description": "BadRequest | InvalidRequestError",
  9598. "content": {
  9599. "application/json": {
  9600. "schema": {
  9601. "anyOf": [
  9602. {
  9603. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9604. },
  9605. {
  9606. "$ref": "#/components/schemas/InvalidRequestError"
  9607. }
  9608. ]
  9609. }
  9610. }
  9611. }
  9612. }
  9613. },
  9614. "description": "Publish a TUI event.",
  9615. "summary": "Publish TUI event",
  9616. "requestBody": {
  9617. "content": {
  9618. "application/json": {
  9619. "schema": {
  9620. "anyOf": [
  9621. {
  9622. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9623. },
  9624. {
  9625. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9626. },
  9627. {
  9628. "$ref": "#/components/schemas/EventTuiToastShow"
  9629. },
  9630. {
  9631. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9632. }
  9633. ]
  9634. }
  9635. }
  9636. }
  9637. },
  9638. "x-codeSamples": [
  9639. {
  9640. "lang": "js",
  9641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9642. }
  9643. ]
  9644. }
  9645. },
  9646. "/tui/select-session": {
  9647. "post": {
  9648. "tags": ["tui"],
  9649. "operationId": "tui.selectSession",
  9650. "parameters": [
  9651. {
  9652. "name": "directory",
  9653. "in": "query",
  9654. "schema": {
  9655. "type": "string"
  9656. },
  9657. "required": false
  9658. },
  9659. {
  9660. "name": "workspace",
  9661. "in": "query",
  9662. "schema": {
  9663. "type": "string"
  9664. },
  9665. "required": false
  9666. }
  9667. ],
  9668. "responses": {
  9669. "200": {
  9670. "description": "Session selected successfully",
  9671. "content": {
  9672. "application/json": {
  9673. "schema": {
  9674. "type": "boolean",
  9675. "description": "Session selected successfully"
  9676. }
  9677. }
  9678. }
  9679. },
  9680. "400": {
  9681. "description": "BadRequest | InvalidRequestError",
  9682. "content": {
  9683. "application/json": {
  9684. "schema": {
  9685. "anyOf": [
  9686. {
  9687. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9688. },
  9689. {
  9690. "$ref": "#/components/schemas/InvalidRequestError"
  9691. }
  9692. ]
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "404": {
  9698. "description": "NotFoundError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "$ref": "#/components/schemas/NotFoundError"
  9703. }
  9704. }
  9705. }
  9706. }
  9707. },
  9708. "description": "Navigate the TUI to display the specified session.",
  9709. "summary": "Select session",
  9710. "requestBody": {
  9711. "content": {
  9712. "application/json": {
  9713. "schema": {
  9714. "type": "object",
  9715. "properties": {
  9716. "sessionID": {
  9717. "type": "string",
  9718. "pattern": "^ses",
  9719. "description": "Session ID to navigate to"
  9720. }
  9721. },
  9722. "required": ["sessionID"],
  9723. "additionalProperties": false
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "x-codeSamples": [
  9729. {
  9730. "lang": "js",
  9731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9732. }
  9733. ]
  9734. }
  9735. },
  9736. "/tui/control/next": {
  9737. "get": {
  9738. "tags": ["tui"],
  9739. "operationId": "tui.control.next",
  9740. "parameters": [
  9741. {
  9742. "name": "directory",
  9743. "in": "query",
  9744. "schema": {
  9745. "type": "string"
  9746. },
  9747. "required": false
  9748. },
  9749. {
  9750. "name": "workspace",
  9751. "in": "query",
  9752. "schema": {
  9753. "type": "string"
  9754. },
  9755. "required": false
  9756. }
  9757. ],
  9758. "responses": {
  9759. "200": {
  9760. "description": "Next TUI request",
  9761. "content": {
  9762. "application/json": {
  9763. "schema": {
  9764. "type": "object",
  9765. "properties": {
  9766. "path": {
  9767. "type": "string"
  9768. },
  9769. "body": {}
  9770. },
  9771. "required": ["path", "body"],
  9772. "additionalProperties": false,
  9773. "description": "Next TUI request"
  9774. }
  9775. }
  9776. }
  9777. },
  9778. "400": {
  9779. "description": "Bad request",
  9780. "content": {
  9781. "application/json": {
  9782. "schema": {
  9783. "$ref": "#/components/schemas/BadRequestError"
  9784. }
  9785. }
  9786. }
  9787. }
  9788. },
  9789. "description": "Retrieve the next TUI request from the queue for processing.",
  9790. "summary": "Get next TUI request",
  9791. "x-codeSamples": [
  9792. {
  9793. "lang": "js",
  9794. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9795. }
  9796. ]
  9797. }
  9798. },
  9799. "/tui/control/response": {
  9800. "post": {
  9801. "tags": ["tui"],
  9802. "operationId": "tui.control.response",
  9803. "parameters": [
  9804. {
  9805. "name": "directory",
  9806. "in": "query",
  9807. "schema": {
  9808. "type": "string"
  9809. },
  9810. "required": false
  9811. },
  9812. {
  9813. "name": "workspace",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. }
  9820. ],
  9821. "responses": {
  9822. "200": {
  9823. "description": "Response submitted successfully",
  9824. "content": {
  9825. "application/json": {
  9826. "schema": {
  9827. "type": "boolean",
  9828. "description": "Response submitted successfully"
  9829. }
  9830. }
  9831. }
  9832. },
  9833. "400": {
  9834. "description": "Bad request",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "$ref": "#/components/schemas/BadRequestError"
  9839. }
  9840. }
  9841. }
  9842. }
  9843. },
  9844. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9845. "summary": "Submit TUI response",
  9846. "requestBody": {
  9847. "content": {
  9848. "application/json": {
  9849. "schema": {}
  9850. }
  9851. }
  9852. },
  9853. "x-codeSamples": [
  9854. {
  9855. "lang": "js",
  9856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9857. }
  9858. ]
  9859. }
  9860. },
  9861. "/experimental/workspace/adapter": {
  9862. "get": {
  9863. "tags": ["workspace"],
  9864. "operationId": "experimental.workspace.adapter.list",
  9865. "parameters": [
  9866. {
  9867. "name": "directory",
  9868. "in": "query",
  9869. "schema": {
  9870. "type": "string"
  9871. },
  9872. "required": false
  9873. },
  9874. {
  9875. "name": "workspace",
  9876. "in": "query",
  9877. "schema": {
  9878. "type": "string"
  9879. },
  9880. "required": false
  9881. }
  9882. ],
  9883. "responses": {
  9884. "200": {
  9885. "description": "Workspace adapters",
  9886. "content": {
  9887. "application/json": {
  9888. "schema": {
  9889. "type": "array",
  9890. "items": {
  9891. "type": "object",
  9892. "properties": {
  9893. "type": {
  9894. "type": "string"
  9895. },
  9896. "name": {
  9897. "type": "string"
  9898. },
  9899. "description": {
  9900. "type": "string"
  9901. }
  9902. },
  9903. "required": ["type", "name", "description"],
  9904. "additionalProperties": false
  9905. },
  9906. "description": "Workspace adapters"
  9907. }
  9908. }
  9909. }
  9910. },
  9911. "400": {
  9912. "description": "Bad request",
  9913. "content": {
  9914. "application/json": {
  9915. "schema": {
  9916. "$ref": "#/components/schemas/BadRequestError"
  9917. }
  9918. }
  9919. }
  9920. }
  9921. },
  9922. "description": "List all available workspace adapters for the current project.",
  9923. "summary": "List workspace adapters",
  9924. "x-codeSamples": [
  9925. {
  9926. "lang": "js",
  9927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9928. }
  9929. ]
  9930. }
  9931. },
  9932. "/experimental/workspace": {
  9933. "get": {
  9934. "tags": ["workspace"],
  9935. "operationId": "experimental.workspace.list",
  9936. "parameters": [
  9937. {
  9938. "name": "directory",
  9939. "in": "query",
  9940. "schema": {
  9941. "type": "string"
  9942. },
  9943. "required": false
  9944. },
  9945. {
  9946. "name": "workspace",
  9947. "in": "query",
  9948. "schema": {
  9949. "type": "string"
  9950. },
  9951. "required": false
  9952. }
  9953. ],
  9954. "responses": {
  9955. "200": {
  9956. "description": "Workspaces",
  9957. "content": {
  9958. "application/json": {
  9959. "schema": {
  9960. "type": "array",
  9961. "items": {
  9962. "$ref": "#/components/schemas/Workspace"
  9963. },
  9964. "description": "Workspaces"
  9965. }
  9966. }
  9967. }
  9968. },
  9969. "400": {
  9970. "description": "Bad request",
  9971. "content": {
  9972. "application/json": {
  9973. "schema": {
  9974. "$ref": "#/components/schemas/BadRequestError"
  9975. }
  9976. }
  9977. }
  9978. }
  9979. },
  9980. "description": "List all workspaces.",
  9981. "summary": "List workspaces",
  9982. "x-codeSamples": [
  9983. {
  9984. "lang": "js",
  9985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9986. }
  9987. ]
  9988. },
  9989. "post": {
  9990. "tags": ["workspace"],
  9991. "operationId": "experimental.workspace.create",
  9992. "parameters": [
  9993. {
  9994. "name": "directory",
  9995. "in": "query",
  9996. "schema": {
  9997. "type": "string"
  9998. },
  9999. "required": false
  10000. },
  10001. {
  10002. "name": "workspace",
  10003. "in": "query",
  10004. "schema": {
  10005. "type": "string"
  10006. },
  10007. "required": false
  10008. }
  10009. ],
  10010. "responses": {
  10011. "200": {
  10012. "description": "Workspace created",
  10013. "content": {
  10014. "application/json": {
  10015. "schema": {
  10016. "$ref": "#/components/schemas/Workspace"
  10017. }
  10018. }
  10019. }
  10020. },
  10021. "400": {
  10022. "description": "BadRequest | InvalidRequestError",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "anyOf": [
  10027. {
  10028. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10029. },
  10030. {
  10031. "$ref": "#/components/schemas/InvalidRequestError"
  10032. }
  10033. ]
  10034. }
  10035. }
  10036. }
  10037. }
  10038. },
  10039. "description": "Create a workspace for the current project.",
  10040. "summary": "Create workspace",
  10041. "requestBody": {
  10042. "content": {
  10043. "application/json": {
  10044. "schema": {
  10045. "type": "object",
  10046. "properties": {
  10047. "id": {
  10048. "type": "string",
  10049. "pattern": "^wrk"
  10050. },
  10051. "type": {
  10052. "type": "string"
  10053. },
  10054. "branch": {
  10055. "anyOf": [
  10056. {
  10057. "type": "string"
  10058. },
  10059. {
  10060. "type": "null"
  10061. }
  10062. ]
  10063. },
  10064. "extra": {
  10065. "anyOf": [
  10066. {},
  10067. {
  10068. "type": "null"
  10069. }
  10070. ]
  10071. }
  10072. },
  10073. "required": ["type"],
  10074. "additionalProperties": false
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "x-codeSamples": [
  10080. {
  10081. "lang": "js",
  10082. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10083. }
  10084. ]
  10085. }
  10086. },
  10087. "/experimental/workspace/sync-list": {
  10088. "post": {
  10089. "tags": ["workspace"],
  10090. "operationId": "experimental.workspace.syncList",
  10091. "parameters": [
  10092. {
  10093. "name": "directory",
  10094. "in": "query",
  10095. "schema": {
  10096. "type": "string"
  10097. },
  10098. "required": false
  10099. },
  10100. {
  10101. "name": "workspace",
  10102. "in": "query",
  10103. "schema": {
  10104. "type": "string"
  10105. },
  10106. "required": false
  10107. }
  10108. ],
  10109. "responses": {
  10110. "204": {
  10111. "description": "Workspace list synced"
  10112. },
  10113. "400": {
  10114. "description": "Bad request",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "$ref": "#/components/schemas/BadRequestError"
  10119. }
  10120. }
  10121. }
  10122. }
  10123. },
  10124. "description": "Register missing workspaces returned by workspace adapters.",
  10125. "summary": "Sync workspace list",
  10126. "x-codeSamples": [
  10127. {
  10128. "lang": "js",
  10129. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10130. }
  10131. ]
  10132. }
  10133. },
  10134. "/experimental/workspace/status": {
  10135. "get": {
  10136. "tags": ["workspace"],
  10137. "operationId": "experimental.workspace.status",
  10138. "parameters": [
  10139. {
  10140. "name": "directory",
  10141. "in": "query",
  10142. "schema": {
  10143. "type": "string"
  10144. },
  10145. "required": false
  10146. },
  10147. {
  10148. "name": "workspace",
  10149. "in": "query",
  10150. "schema": {
  10151. "type": "string"
  10152. },
  10153. "required": false
  10154. }
  10155. ],
  10156. "responses": {
  10157. "200": {
  10158. "description": "Workspace status",
  10159. "content": {
  10160. "application/json": {
  10161. "schema": {
  10162. "type": "array",
  10163. "items": {
  10164. "type": "object",
  10165. "properties": {
  10166. "workspaceID": {
  10167. "type": "string",
  10168. "pattern": "^wrk"
  10169. },
  10170. "status": {
  10171. "type": "string",
  10172. "enum": ["connected", "connecting", "disconnected", "error"]
  10173. }
  10174. },
  10175. "required": ["workspaceID", "status"],
  10176. "additionalProperties": false
  10177. },
  10178. "description": "Workspace status"
  10179. }
  10180. }
  10181. }
  10182. },
  10183. "400": {
  10184. "description": "Bad request",
  10185. "content": {
  10186. "application/json": {
  10187. "schema": {
  10188. "$ref": "#/components/schemas/BadRequestError"
  10189. }
  10190. }
  10191. }
  10192. }
  10193. },
  10194. "description": "Get connection status for workspaces in the current project.",
  10195. "summary": "Workspace status",
  10196. "x-codeSamples": [
  10197. {
  10198. "lang": "js",
  10199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10200. }
  10201. ]
  10202. }
  10203. },
  10204. "/experimental/workspace/{id}": {
  10205. "delete": {
  10206. "tags": ["workspace"],
  10207. "operationId": "experimental.workspace.remove",
  10208. "parameters": [
  10209. {
  10210. "name": "id",
  10211. "in": "path",
  10212. "schema": {
  10213. "type": "string",
  10214. "pattern": "^wrk"
  10215. },
  10216. "required": true
  10217. },
  10218. {
  10219. "name": "directory",
  10220. "in": "query",
  10221. "schema": {
  10222. "type": "string"
  10223. },
  10224. "required": false
  10225. },
  10226. {
  10227. "name": "workspace",
  10228. "in": "query",
  10229. "schema": {
  10230. "type": "string"
  10231. },
  10232. "required": false
  10233. }
  10234. ],
  10235. "responses": {
  10236. "200": {
  10237. "description": "Workspace removed",
  10238. "content": {
  10239. "application/json": {
  10240. "schema": {
  10241. "$ref": "#/components/schemas/Workspace"
  10242. }
  10243. }
  10244. }
  10245. },
  10246. "400": {
  10247. "description": "BadRequest | InvalidRequestError",
  10248. "content": {
  10249. "application/json": {
  10250. "schema": {
  10251. "anyOf": [
  10252. {
  10253. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10254. },
  10255. {
  10256. "$ref": "#/components/schemas/InvalidRequestError"
  10257. }
  10258. ]
  10259. }
  10260. }
  10261. }
  10262. }
  10263. },
  10264. "description": "Remove an existing workspace.",
  10265. "summary": "Remove workspace",
  10266. "x-codeSamples": [
  10267. {
  10268. "lang": "js",
  10269. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10270. }
  10271. ]
  10272. }
  10273. },
  10274. "/experimental/workspace/warp": {
  10275. "post": {
  10276. "tags": ["workspace"],
  10277. "operationId": "experimental.workspace.warp",
  10278. "parameters": [
  10279. {
  10280. "name": "directory",
  10281. "in": "query",
  10282. "schema": {
  10283. "type": "string"
  10284. },
  10285. "required": false
  10286. },
  10287. {
  10288. "name": "workspace",
  10289. "in": "query",
  10290. "schema": {
  10291. "type": "string"
  10292. },
  10293. "required": false
  10294. }
  10295. ],
  10296. "responses": {
  10297. "204": {
  10298. "description": "Session warped"
  10299. },
  10300. "400": {
  10301. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/WorkspaceWarpError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/VcsApplyError"
  10311. },
  10312. {
  10313. "$ref": "#/components/schemas/InvalidRequestError"
  10314. }
  10315. ]
  10316. }
  10317. }
  10318. }
  10319. }
  10320. },
  10321. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10322. "summary": "Warp session into workspace",
  10323. "requestBody": {
  10324. "content": {
  10325. "application/json": {
  10326. "schema": {
  10327. "type": "object",
  10328. "properties": {
  10329. "id": {
  10330. "anyOf": [
  10331. {
  10332. "type": "string",
  10333. "pattern": "^wrk"
  10334. },
  10335. {
  10336. "type": "null"
  10337. }
  10338. ]
  10339. },
  10340. "sessionID": {
  10341. "type": "string",
  10342. "pattern": "^ses"
  10343. },
  10344. "copyChanges": {
  10345. "type": "boolean"
  10346. }
  10347. },
  10348. "required": ["id", "sessionID"],
  10349. "additionalProperties": false
  10350. }
  10351. }
  10352. }
  10353. },
  10354. "x-codeSamples": [
  10355. {
  10356. "lang": "js",
  10357. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10358. }
  10359. ]
  10360. }
  10361. },
  10362. "/pty/{ptyID}/connect": {
  10363. "get": {
  10364. "tags": ["pty"],
  10365. "operationId": "pty.connect",
  10366. "parameters": [
  10367. {
  10368. "name": "ptyID",
  10369. "in": "path",
  10370. "schema": {
  10371. "type": "string",
  10372. "pattern": "^pty"
  10373. },
  10374. "required": true
  10375. },
  10376. {
  10377. "name": "directory",
  10378. "in": "query",
  10379. "schema": {
  10380. "type": "string"
  10381. },
  10382. "required": false
  10383. },
  10384. {
  10385. "name": "workspace",
  10386. "in": "query",
  10387. "schema": {
  10388. "type": "string"
  10389. },
  10390. "required": false
  10391. }
  10392. ],
  10393. "responses": {
  10394. "200": {
  10395. "description": "Connected session",
  10396. "content": {
  10397. "application/json": {
  10398. "schema": {
  10399. "type": "boolean",
  10400. "description": "Connected session"
  10401. }
  10402. }
  10403. }
  10404. },
  10405. "403": {
  10406. "description": "Forbidden",
  10407. "content": {
  10408. "application/json": {
  10409. "schema": {
  10410. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10411. }
  10412. }
  10413. }
  10414. },
  10415. "404": {
  10416. "description": "Not found",
  10417. "content": {
  10418. "application/json": {
  10419. "schema": {
  10420. "$ref": "#/components/schemas/NotFoundError"
  10421. }
  10422. }
  10423. }
  10424. }
  10425. },
  10426. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10427. "summary": "Connect to PTY session",
  10428. "x-codeSamples": [
  10429. {
  10430. "lang": "js",
  10431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10432. }
  10433. ]
  10434. }
  10435. }
  10436. },
  10437. "components": {
  10438. "schemas": {
  10439. "Event": {
  10440. "anyOf": [
  10441. {
  10442. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10443. },
  10444. {
  10445. "$ref": "#/components/schemas/Event.tui.command.execute"
  10446. },
  10447. {
  10448. "$ref": "#/components/schemas/EventTuiToastShow1"
  10449. },
  10450. {
  10451. "$ref": "#/components/schemas/Event.tui.session.select"
  10452. },
  10453. {
  10454. "$ref": "#/components/schemas/EventServerConnected"
  10455. },
  10456. {
  10457. "$ref": "#/components/schemas/EventGlobalDisposed"
  10458. },
  10459. {
  10460. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/EventFileEdited"
  10464. },
  10465. {
  10466. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10467. },
  10468. {
  10469. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10470. },
  10471. {
  10472. "$ref": "#/components/schemas/EventLspUpdated"
  10473. },
  10474. {
  10475. "$ref": "#/components/schemas/EventMessagePartDelta"
  10476. },
  10477. {
  10478. "$ref": "#/components/schemas/EventPermissionAsked"
  10479. },
  10480. {
  10481. "$ref": "#/components/schemas/EventPermissionReplied"
  10482. },
  10483. {
  10484. "$ref": "#/components/schemas/EventSessionDiff"
  10485. },
  10486. {
  10487. "$ref": "#/components/schemas/EventSessionError"
  10488. },
  10489. {
  10490. "$ref": "#/components/schemas/EventQuestionAsked"
  10491. },
  10492. {
  10493. "$ref": "#/components/schemas/EventQuestionReplied"
  10494. },
  10495. {
  10496. "$ref": "#/components/schemas/EventQuestionRejected"
  10497. },
  10498. {
  10499. "$ref": "#/components/schemas/EventTodoUpdated"
  10500. },
  10501. {
  10502. "$ref": "#/components/schemas/EventSessionStatus"
  10503. },
  10504. {
  10505. "$ref": "#/components/schemas/EventSessionIdle"
  10506. },
  10507. {
  10508. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10509. },
  10510. {
  10511. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10512. },
  10513. {
  10514. "$ref": "#/components/schemas/EventCommandExecuted"
  10515. },
  10516. {
  10517. "$ref": "#/components/schemas/EventProjectUpdated"
  10518. },
  10519. {
  10520. "$ref": "#/components/schemas/EventSessionCompacted"
  10521. },
  10522. {
  10523. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10524. },
  10525. {
  10526. "$ref": "#/components/schemas/EventWorkspaceReady"
  10527. },
  10528. {
  10529. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10530. },
  10531. {
  10532. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10533. },
  10534. {
  10535. "$ref": "#/components/schemas/EventWorktreeReady"
  10536. },
  10537. {
  10538. "$ref": "#/components/schemas/EventWorktreeFailed"
  10539. },
  10540. {
  10541. "$ref": "#/components/schemas/EventPtyCreated"
  10542. },
  10543. {
  10544. "$ref": "#/components/schemas/EventPtyUpdated"
  10545. },
  10546. {
  10547. "$ref": "#/components/schemas/EventPtyExited"
  10548. },
  10549. {
  10550. "$ref": "#/components/schemas/EventPtyDeleted"
  10551. },
  10552. {
  10553. "$ref": "#/components/schemas/EventInstallationUpdated"
  10554. },
  10555. {
  10556. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10557. },
  10558. {
  10559. "$ref": "#/components/schemas/EventMessageUpdated"
  10560. },
  10561. {
  10562. "$ref": "#/components/schemas/EventMessageRemoved"
  10563. },
  10564. {
  10565. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10566. },
  10567. {
  10568. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10569. },
  10570. {
  10571. "$ref": "#/components/schemas/EventSessionCreated"
  10572. },
  10573. {
  10574. "$ref": "#/components/schemas/EventSessionUpdated"
  10575. },
  10576. {
  10577. "$ref": "#/components/schemas/EventSessionDeleted"
  10578. },
  10579. {
  10580. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10581. },
  10582. {
  10583. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10584. },
  10585. {
  10586. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10587. },
  10588. {
  10589. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10590. },
  10591. {
  10592. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10593. },
  10594. {
  10595. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10596. },
  10597. {
  10598. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10599. },
  10600. {
  10601. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10602. },
  10603. {
  10604. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10605. },
  10606. {
  10607. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10608. },
  10609. {
  10610. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10611. },
  10612. {
  10613. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10614. },
  10615. {
  10616. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10617. },
  10618. {
  10619. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10620. },
  10621. {
  10622. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10623. },
  10624. {
  10625. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10626. },
  10627. {
  10628. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10629. },
  10630. {
  10631. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10632. },
  10633. {
  10634. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10635. },
  10636. {
  10637. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10638. },
  10639. {
  10640. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10641. },
  10642. {
  10643. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10644. },
  10645. {
  10646. "$ref": "#/components/schemas/EventSessionNextRetried"
  10647. },
  10648. {
  10649. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10650. },
  10651. {
  10652. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10653. },
  10654. {
  10655. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10659. },
  10660. {
  10661. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10662. },
  10663. {
  10664. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10665. },
  10666. {
  10667. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10668. },
  10669. {
  10670. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10671. },
  10672. {
  10673. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10674. },
  10675. {
  10676. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10677. },
  10678. {
  10679. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10680. },
  10681. {
  10682. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10683. },
  10684. {
  10685. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10686. },
  10687. {
  10688. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10689. },
  10690. {
  10691. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10692. },
  10693. {
  10694. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10695. },
  10696. {
  10697. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10698. },
  10699. {
  10700. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10701. },
  10702. {
  10703. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10704. },
  10705. {
  10706. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10707. },
  10708. {
  10709. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10710. },
  10711. {
  10712. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10713. },
  10714. {
  10715. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10716. },
  10717. {
  10718. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10719. },
  10720. {
  10721. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10722. },
  10723. {
  10724. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10725. },
  10726. {
  10727. "$ref": "#/components/schemas/EventSessionNextRetried"
  10728. },
  10729. {
  10730. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10731. },
  10732. {
  10733. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10734. },
  10735. {
  10736. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10737. },
  10738. {
  10739. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10740. },
  10741. {
  10742. "$ref": "#/components/schemas/EventAccountAdded"
  10743. },
  10744. {
  10745. "$ref": "#/components/schemas/EventAccountRemoved"
  10746. },
  10747. {
  10748. "$ref": "#/components/schemas/EventAccountSwitched"
  10749. }
  10750. ]
  10751. },
  10752. "OAuth": {
  10753. "type": "object",
  10754. "properties": {
  10755. "type": {
  10756. "type": "string",
  10757. "enum": ["oauth"]
  10758. },
  10759. "refresh": {
  10760. "type": "string"
  10761. },
  10762. "access": {
  10763. "type": "string"
  10764. },
  10765. "expires": {
  10766. "type": "integer",
  10767. "minimum": 0
  10768. },
  10769. "accountId": {
  10770. "type": "string"
  10771. },
  10772. "enterpriseUrl": {
  10773. "type": "string"
  10774. }
  10775. },
  10776. "required": ["type", "refresh", "access", "expires"],
  10777. "additionalProperties": false
  10778. },
  10779. "ApiAuth": {
  10780. "type": "object",
  10781. "properties": {
  10782. "type": {
  10783. "type": "string",
  10784. "enum": ["api"]
  10785. },
  10786. "key": {
  10787. "type": "string"
  10788. },
  10789. "metadata": {
  10790. "type": "object",
  10791. "additionalProperties": {
  10792. "type": "string"
  10793. }
  10794. }
  10795. },
  10796. "required": ["type", "key"],
  10797. "additionalProperties": false
  10798. },
  10799. "WellKnownAuth": {
  10800. "type": "object",
  10801. "properties": {
  10802. "type": {
  10803. "type": "string",
  10804. "enum": ["wellknown"]
  10805. },
  10806. "key": {
  10807. "type": "string"
  10808. },
  10809. "token": {
  10810. "type": "string"
  10811. }
  10812. },
  10813. "required": ["type", "key", "token"],
  10814. "additionalProperties": false
  10815. },
  10816. "Auth": {
  10817. "anyOf": [
  10818. {
  10819. "$ref": "#/components/schemas/OAuth"
  10820. },
  10821. {
  10822. "$ref": "#/components/schemas/ApiAuth"
  10823. },
  10824. {
  10825. "$ref": "#/components/schemas/WellKnownAuth"
  10826. }
  10827. ]
  10828. },
  10829. "effect_HttpApiError_BadRequest": {
  10830. "type": "object",
  10831. "properties": {
  10832. "_tag": {
  10833. "type": "string",
  10834. "enum": ["BadRequest"]
  10835. }
  10836. },
  10837. "required": ["_tag"],
  10838. "additionalProperties": false
  10839. },
  10840. "InvalidRequestError": {
  10841. "type": "object",
  10842. "properties": {
  10843. "_tag": {
  10844. "type": "string",
  10845. "enum": ["InvalidRequestError"]
  10846. },
  10847. "message": {
  10848. "type": "string"
  10849. },
  10850. "kind": {
  10851. "type": "string"
  10852. },
  10853. "field": {
  10854. "type": "string"
  10855. }
  10856. },
  10857. "required": ["_tag", "message"],
  10858. "additionalProperties": false
  10859. },
  10860. "Event.tui.prompt.append": {
  10861. "type": "object",
  10862. "properties": {
  10863. "id": {
  10864. "type": "string"
  10865. },
  10866. "type": {
  10867. "type": "string",
  10868. "enum": ["tui.prompt.append"]
  10869. },
  10870. "properties": {
  10871. "type": "object",
  10872. "properties": {
  10873. "text": {
  10874. "type": "string"
  10875. }
  10876. },
  10877. "required": ["text"],
  10878. "additionalProperties": false
  10879. }
  10880. },
  10881. "required": ["id", "type", "properties"],
  10882. "additionalProperties": false
  10883. },
  10884. "Event.tui.command.execute": {
  10885. "type": "object",
  10886. "properties": {
  10887. "id": {
  10888. "type": "string"
  10889. },
  10890. "type": {
  10891. "type": "string",
  10892. "enum": ["tui.command.execute"]
  10893. },
  10894. "properties": {
  10895. "type": "object",
  10896. "properties": {
  10897. "command": {
  10898. "anyOf": [
  10899. {
  10900. "type": "string",
  10901. "enum": [
  10902. "session.list",
  10903. "session.new",
  10904. "session.share",
  10905. "session.interrupt",
  10906. "session.compact",
  10907. "session.page.up",
  10908. "session.page.down",
  10909. "session.line.up",
  10910. "session.line.down",
  10911. "session.half.page.up",
  10912. "session.half.page.down",
  10913. "session.first",
  10914. "session.last",
  10915. "prompt.clear",
  10916. "prompt.submit",
  10917. "agent.cycle"
  10918. ]
  10919. },
  10920. {
  10921. "type": "string"
  10922. }
  10923. ]
  10924. }
  10925. },
  10926. "required": ["command"],
  10927. "additionalProperties": false
  10928. }
  10929. },
  10930. "required": ["id", "type", "properties"],
  10931. "additionalProperties": false
  10932. },
  10933. "Event.tui.toast.show": {
  10934. "type": "object",
  10935. "properties": {
  10936. "id": {
  10937. "type": "string"
  10938. },
  10939. "type": {
  10940. "type": "string",
  10941. "enum": ["tui.toast.show"]
  10942. },
  10943. "properties": {
  10944. "type": "object",
  10945. "properties": {
  10946. "title": {
  10947. "type": "string"
  10948. },
  10949. "message": {
  10950. "type": "string"
  10951. },
  10952. "variant": {
  10953. "type": "string",
  10954. "enum": ["info", "success", "warning", "error"]
  10955. },
  10956. "duration": {
  10957. "type": "integer",
  10958. "exclusiveMinimum": 0
  10959. }
  10960. },
  10961. "required": ["message", "variant"],
  10962. "additionalProperties": false
  10963. }
  10964. },
  10965. "required": ["id", "type", "properties"],
  10966. "additionalProperties": false
  10967. },
  10968. "Event.tui.session.select": {
  10969. "type": "object",
  10970. "properties": {
  10971. "id": {
  10972. "type": "string"
  10973. },
  10974. "type": {
  10975. "type": "string",
  10976. "enum": ["tui.session.select"]
  10977. },
  10978. "properties": {
  10979. "type": "object",
  10980. "properties": {
  10981. "sessionID": {
  10982. "type": "string",
  10983. "pattern": "^ses",
  10984. "description": "Session ID to navigate to"
  10985. }
  10986. },
  10987. "required": ["sessionID"],
  10988. "additionalProperties": false
  10989. }
  10990. },
  10991. "required": ["id", "type", "properties"],
  10992. "additionalProperties": false
  10993. },
  10994. "PermissionRequest": {
  10995. "type": "object",
  10996. "properties": {
  10997. "id": {
  10998. "type": "string",
  10999. "pattern": "^per"
  11000. },
  11001. "sessionID": {
  11002. "type": "string",
  11003. "pattern": "^ses"
  11004. },
  11005. "permission": {
  11006. "type": "string"
  11007. },
  11008. "patterns": {
  11009. "type": "array",
  11010. "items": {
  11011. "type": "string"
  11012. }
  11013. },
  11014. "metadata": {
  11015. "type": "object"
  11016. },
  11017. "always": {
  11018. "type": "array",
  11019. "items": {
  11020. "type": "string"
  11021. }
  11022. },
  11023. "tool": {
  11024. "type": "object",
  11025. "properties": {
  11026. "messageID": {
  11027. "type": "string",
  11028. "pattern": "^msg"
  11029. },
  11030. "callID": {
  11031. "type": "string"
  11032. }
  11033. },
  11034. "required": ["messageID", "callID"],
  11035. "additionalProperties": false
  11036. }
  11037. },
  11038. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11039. "additionalProperties": false
  11040. },
  11041. "SnapshotFileDiff": {
  11042. "type": "object",
  11043. "properties": {
  11044. "file": {
  11045. "type": "string"
  11046. },
  11047. "patch": {
  11048. "type": "string"
  11049. },
  11050. "additions": {
  11051. "type": "number"
  11052. },
  11053. "deletions": {
  11054. "type": "number"
  11055. },
  11056. "status": {
  11057. "type": "string",
  11058. "enum": ["added", "deleted", "modified"]
  11059. }
  11060. },
  11061. "required": ["additions", "deletions"],
  11062. "additionalProperties": false
  11063. },
  11064. "ProviderAuthError": {
  11065. "type": "object",
  11066. "properties": {
  11067. "name": {
  11068. "type": "string",
  11069. "enum": ["ProviderAuthError"]
  11070. },
  11071. "data": {
  11072. "type": "object",
  11073. "properties": {
  11074. "providerID": {
  11075. "type": "string"
  11076. },
  11077. "message": {
  11078. "type": "string"
  11079. }
  11080. },
  11081. "required": ["providerID", "message"],
  11082. "additionalProperties": false
  11083. }
  11084. },
  11085. "required": ["name", "data"],
  11086. "additionalProperties": false
  11087. },
  11088. "UnknownError": {
  11089. "type": "object",
  11090. "properties": {
  11091. "name": {
  11092. "type": "string",
  11093. "enum": ["UnknownError"]
  11094. },
  11095. "data": {
  11096. "type": "object",
  11097. "properties": {
  11098. "message": {
  11099. "type": "string"
  11100. },
  11101. "ref": {
  11102. "type": "string"
  11103. }
  11104. },
  11105. "required": ["message"],
  11106. "additionalProperties": false
  11107. }
  11108. },
  11109. "required": ["name", "data"],
  11110. "additionalProperties": false
  11111. },
  11112. "MessageOutputLengthError": {
  11113. "type": "object",
  11114. "properties": {
  11115. "name": {
  11116. "type": "string",
  11117. "enum": ["MessageOutputLengthError"]
  11118. },
  11119. "data": {
  11120. "type": "object",
  11121. "properties": {}
  11122. }
  11123. },
  11124. "required": ["name", "data"],
  11125. "additionalProperties": false
  11126. },
  11127. "MessageAbortedError": {
  11128. "type": "object",
  11129. "properties": {
  11130. "name": {
  11131. "type": "string",
  11132. "enum": ["MessageAbortedError"]
  11133. },
  11134. "data": {
  11135. "type": "object",
  11136. "properties": {
  11137. "message": {
  11138. "type": "string"
  11139. }
  11140. },
  11141. "required": ["message"],
  11142. "additionalProperties": false
  11143. }
  11144. },
  11145. "required": ["name", "data"],
  11146. "additionalProperties": false
  11147. },
  11148. "StructuredOutputError": {
  11149. "type": "object",
  11150. "properties": {
  11151. "name": {
  11152. "type": "string",
  11153. "enum": ["StructuredOutputError"]
  11154. },
  11155. "data": {
  11156. "type": "object",
  11157. "properties": {
  11158. "message": {
  11159. "type": "string"
  11160. },
  11161. "retries": {
  11162. "type": "integer",
  11163. "minimum": 0
  11164. }
  11165. },
  11166. "required": ["message", "retries"],
  11167. "additionalProperties": false
  11168. }
  11169. },
  11170. "required": ["name", "data"],
  11171. "additionalProperties": false
  11172. },
  11173. "ContextOverflowError": {
  11174. "type": "object",
  11175. "properties": {
  11176. "name": {
  11177. "type": "string",
  11178. "enum": ["ContextOverflowError"]
  11179. },
  11180. "data": {
  11181. "type": "object",
  11182. "properties": {
  11183. "message": {
  11184. "type": "string"
  11185. },
  11186. "responseBody": {
  11187. "type": "string"
  11188. }
  11189. },
  11190. "required": ["message"],
  11191. "additionalProperties": false
  11192. }
  11193. },
  11194. "required": ["name", "data"],
  11195. "additionalProperties": false
  11196. },
  11197. "APIError": {
  11198. "type": "object",
  11199. "properties": {
  11200. "name": {
  11201. "type": "string",
  11202. "enum": ["APIError"]
  11203. },
  11204. "data": {
  11205. "type": "object",
  11206. "properties": {
  11207. "message": {
  11208. "type": "string"
  11209. },
  11210. "statusCode": {
  11211. "type": "integer",
  11212. "minimum": 0
  11213. },
  11214. "isRetryable": {
  11215. "type": "boolean"
  11216. },
  11217. "responseHeaders": {
  11218. "type": "object",
  11219. "additionalProperties": {
  11220. "type": "string"
  11221. }
  11222. },
  11223. "responseBody": {
  11224. "type": "string"
  11225. },
  11226. "metadata": {
  11227. "type": "object",
  11228. "additionalProperties": {
  11229. "type": "string"
  11230. }
  11231. }
  11232. },
  11233. "required": ["message", "isRetryable"],
  11234. "additionalProperties": false
  11235. }
  11236. },
  11237. "required": ["name", "data"],
  11238. "additionalProperties": false
  11239. },
  11240. "QuestionOption": {
  11241. "type": "object",
  11242. "properties": {
  11243. "label": {
  11244. "type": "string",
  11245. "description": "Display text (1-5 words, concise)"
  11246. },
  11247. "description": {
  11248. "type": "string",
  11249. "description": "Explanation of choice"
  11250. }
  11251. },
  11252. "required": ["label", "description"],
  11253. "additionalProperties": false
  11254. },
  11255. "QuestionInfo": {
  11256. "type": "object",
  11257. "properties": {
  11258. "question": {
  11259. "type": "string",
  11260. "description": "Complete question"
  11261. },
  11262. "header": {
  11263. "type": "string",
  11264. "description": "Very short label (max 30 chars)"
  11265. },
  11266. "options": {
  11267. "type": "array",
  11268. "items": {
  11269. "$ref": "#/components/schemas/QuestionOption"
  11270. },
  11271. "description": "Available choices"
  11272. },
  11273. "multiple": {
  11274. "type": "boolean"
  11275. },
  11276. "custom": {
  11277. "type": "boolean"
  11278. }
  11279. },
  11280. "required": ["question", "header", "options"],
  11281. "additionalProperties": false
  11282. },
  11283. "QuestionTool": {
  11284. "type": "object",
  11285. "properties": {
  11286. "messageID": {
  11287. "type": "string",
  11288. "pattern": "^msg"
  11289. },
  11290. "callID": {
  11291. "type": "string"
  11292. }
  11293. },
  11294. "required": ["messageID", "callID"],
  11295. "additionalProperties": false
  11296. },
  11297. "QuestionRequest": {
  11298. "type": "object",
  11299. "properties": {
  11300. "id": {
  11301. "type": "string",
  11302. "pattern": "^que"
  11303. },
  11304. "sessionID": {
  11305. "type": "string",
  11306. "pattern": "^ses"
  11307. },
  11308. "questions": {
  11309. "type": "array",
  11310. "items": {
  11311. "$ref": "#/components/schemas/QuestionInfo"
  11312. },
  11313. "description": "Questions to ask"
  11314. },
  11315. "tool": {
  11316. "$ref": "#/components/schemas/QuestionTool"
  11317. }
  11318. },
  11319. "required": ["id", "sessionID", "questions"],
  11320. "additionalProperties": false
  11321. },
  11322. "QuestionAnswer": {
  11323. "type": "array",
  11324. "items": {
  11325. "type": "string"
  11326. }
  11327. },
  11328. "QuestionReplied": {
  11329. "type": "object",
  11330. "properties": {
  11331. "sessionID": {
  11332. "type": "string",
  11333. "pattern": "^ses"
  11334. },
  11335. "requestID": {
  11336. "type": "string",
  11337. "pattern": "^que"
  11338. },
  11339. "answers": {
  11340. "type": "array",
  11341. "items": {
  11342. "$ref": "#/components/schemas/QuestionAnswer"
  11343. }
  11344. }
  11345. },
  11346. "required": ["sessionID", "requestID", "answers"],
  11347. "additionalProperties": false
  11348. },
  11349. "QuestionRejected": {
  11350. "type": "object",
  11351. "properties": {
  11352. "sessionID": {
  11353. "type": "string",
  11354. "pattern": "^ses"
  11355. },
  11356. "requestID": {
  11357. "type": "string",
  11358. "pattern": "^que"
  11359. }
  11360. },
  11361. "required": ["sessionID", "requestID"],
  11362. "additionalProperties": false
  11363. },
  11364. "Todo": {
  11365. "type": "object",
  11366. "properties": {
  11367. "content": {
  11368. "type": "string",
  11369. "description": "Brief description of the task"
  11370. },
  11371. "status": {
  11372. "type": "string",
  11373. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11374. },
  11375. "priority": {
  11376. "type": "string",
  11377. "description": "Priority level of the task: high, medium, low"
  11378. }
  11379. },
  11380. "required": ["content", "status", "priority"],
  11381. "additionalProperties": false
  11382. },
  11383. "SessionStatus": {
  11384. "anyOf": [
  11385. {
  11386. "type": "object",
  11387. "properties": {
  11388. "type": {
  11389. "type": "string",
  11390. "enum": ["idle"]
  11391. }
  11392. },
  11393. "required": ["type"],
  11394. "additionalProperties": false
  11395. },
  11396. {
  11397. "type": "object",
  11398. "properties": {
  11399. "type": {
  11400. "type": "string",
  11401. "enum": ["retry"]
  11402. },
  11403. "attempt": {
  11404. "type": "integer",
  11405. "minimum": 0
  11406. },
  11407. "message": {
  11408. "type": "string"
  11409. },
  11410. "action": {
  11411. "type": "object",
  11412. "properties": {
  11413. "reason": {
  11414. "type": "string"
  11415. },
  11416. "provider": {
  11417. "type": "string"
  11418. },
  11419. "title": {
  11420. "type": "string"
  11421. },
  11422. "message": {
  11423. "type": "string"
  11424. },
  11425. "label": {
  11426. "type": "string"
  11427. },
  11428. "link": {
  11429. "type": "string"
  11430. }
  11431. },
  11432. "required": ["reason", "provider", "title", "message", "label"],
  11433. "additionalProperties": false
  11434. },
  11435. "next": {
  11436. "type": "integer",
  11437. "minimum": 0
  11438. }
  11439. },
  11440. "required": ["type", "attempt", "message", "next"],
  11441. "additionalProperties": false
  11442. },
  11443. {
  11444. "type": "object",
  11445. "properties": {
  11446. "type": {
  11447. "type": "string",
  11448. "enum": ["busy"]
  11449. }
  11450. },
  11451. "required": ["type"],
  11452. "additionalProperties": false
  11453. }
  11454. ]
  11455. },
  11456. "Project": {
  11457. "type": "object",
  11458. "properties": {
  11459. "id": {
  11460. "type": "string"
  11461. },
  11462. "worktree": {
  11463. "type": "string"
  11464. },
  11465. "vcs": {
  11466. "type": "string",
  11467. "enum": ["git"]
  11468. },
  11469. "name": {
  11470. "type": "string"
  11471. },
  11472. "icon": {
  11473. "type": "object",
  11474. "properties": {
  11475. "url": {
  11476. "type": "string"
  11477. },
  11478. "override": {
  11479. "type": "string"
  11480. },
  11481. "color": {
  11482. "type": "string"
  11483. }
  11484. },
  11485. "additionalProperties": false
  11486. },
  11487. "commands": {
  11488. "type": "object",
  11489. "properties": {
  11490. "start": {
  11491. "type": "string",
  11492. "description": "Startup script to run when creating a new workspace (worktree)"
  11493. }
  11494. },
  11495. "additionalProperties": false
  11496. },
  11497. "time": {
  11498. "type": "object",
  11499. "properties": {
  11500. "created": {
  11501. "type": "integer",
  11502. "minimum": 0
  11503. },
  11504. "updated": {
  11505. "type": "integer",
  11506. "minimum": 0
  11507. },
  11508. "initialized": {
  11509. "type": "integer",
  11510. "minimum": 0
  11511. }
  11512. },
  11513. "required": ["created", "updated"],
  11514. "additionalProperties": false
  11515. },
  11516. "sandboxes": {
  11517. "type": "array",
  11518. "items": {
  11519. "type": "string"
  11520. }
  11521. }
  11522. },
  11523. "required": ["id", "worktree", "time", "sandboxes"],
  11524. "additionalProperties": false
  11525. },
  11526. "Pty": {
  11527. "type": "object",
  11528. "properties": {
  11529. "id": {
  11530. "type": "string",
  11531. "pattern": "^pty"
  11532. },
  11533. "title": {
  11534. "type": "string"
  11535. },
  11536. "command": {
  11537. "type": "string"
  11538. },
  11539. "args": {
  11540. "type": "array",
  11541. "items": {
  11542. "type": "string"
  11543. }
  11544. },
  11545. "cwd": {
  11546. "type": "string"
  11547. },
  11548. "status": {
  11549. "type": "string",
  11550. "enum": ["running", "exited"]
  11551. },
  11552. "pid": {
  11553. "type": "integer",
  11554. "exclusiveMinimum": 0
  11555. }
  11556. },
  11557. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11558. "additionalProperties": false
  11559. },
  11560. "OutputFormatText": {
  11561. "type": "object",
  11562. "properties": {
  11563. "type": {
  11564. "type": "string",
  11565. "enum": ["text"]
  11566. }
  11567. },
  11568. "required": ["type"],
  11569. "additionalProperties": false
  11570. },
  11571. "JSONSchema": {
  11572. "type": "object"
  11573. },
  11574. "OutputFormatJsonSchema": {
  11575. "type": "object",
  11576. "properties": {
  11577. "type": {
  11578. "type": "string",
  11579. "enum": ["json_schema"]
  11580. },
  11581. "schema": {
  11582. "$ref": "#/components/schemas/JSONSchema"
  11583. },
  11584. "retryCount": {
  11585. "type": "integer",
  11586. "minimum": 0
  11587. }
  11588. },
  11589. "required": ["type", "schema"],
  11590. "additionalProperties": false
  11591. },
  11592. "OutputFormat": {
  11593. "anyOf": [
  11594. {
  11595. "$ref": "#/components/schemas/OutputFormatText"
  11596. },
  11597. {
  11598. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11599. }
  11600. ]
  11601. },
  11602. "UserMessage": {
  11603. "type": "object",
  11604. "properties": {
  11605. "id": {
  11606. "type": "string",
  11607. "pattern": "^msg"
  11608. },
  11609. "sessionID": {
  11610. "type": "string",
  11611. "pattern": "^ses"
  11612. },
  11613. "role": {
  11614. "type": "string",
  11615. "enum": ["user"]
  11616. },
  11617. "time": {
  11618. "type": "object",
  11619. "properties": {
  11620. "created": {
  11621. "type": "integer",
  11622. "minimum": 0
  11623. }
  11624. },
  11625. "required": ["created"],
  11626. "additionalProperties": false
  11627. },
  11628. "format": {
  11629. "$ref": "#/components/schemas/OutputFormat"
  11630. },
  11631. "summary": {
  11632. "type": "object",
  11633. "properties": {
  11634. "title": {
  11635. "type": "string"
  11636. },
  11637. "body": {
  11638. "type": "string"
  11639. },
  11640. "diffs": {
  11641. "type": "array",
  11642. "items": {
  11643. "$ref": "#/components/schemas/SnapshotFileDiff"
  11644. }
  11645. }
  11646. },
  11647. "required": ["diffs"],
  11648. "additionalProperties": false
  11649. },
  11650. "agent": {
  11651. "type": "string"
  11652. },
  11653. "model": {
  11654. "type": "object",
  11655. "properties": {
  11656. "providerID": {
  11657. "type": "string"
  11658. },
  11659. "modelID": {
  11660. "type": "string"
  11661. },
  11662. "variant": {
  11663. "type": "string"
  11664. }
  11665. },
  11666. "required": ["providerID", "modelID"],
  11667. "additionalProperties": false
  11668. },
  11669. "system": {
  11670. "type": "string"
  11671. },
  11672. "tools": {
  11673. "type": "object",
  11674. "additionalProperties": {
  11675. "type": "boolean"
  11676. }
  11677. }
  11678. },
  11679. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11680. "additionalProperties": false
  11681. },
  11682. "AssistantMessage": {
  11683. "type": "object",
  11684. "properties": {
  11685. "id": {
  11686. "type": "string",
  11687. "pattern": "^msg"
  11688. },
  11689. "sessionID": {
  11690. "type": "string",
  11691. "pattern": "^ses"
  11692. },
  11693. "role": {
  11694. "type": "string",
  11695. "enum": ["assistant"]
  11696. },
  11697. "time": {
  11698. "type": "object",
  11699. "properties": {
  11700. "created": {
  11701. "type": "integer",
  11702. "minimum": 0
  11703. },
  11704. "completed": {
  11705. "type": "integer",
  11706. "minimum": 0
  11707. }
  11708. },
  11709. "required": ["created"],
  11710. "additionalProperties": false
  11711. },
  11712. "error": {
  11713. "anyOf": [
  11714. {
  11715. "$ref": "#/components/schemas/ProviderAuthError"
  11716. },
  11717. {
  11718. "$ref": "#/components/schemas/UnknownError"
  11719. },
  11720. {
  11721. "$ref": "#/components/schemas/MessageOutputLengthError"
  11722. },
  11723. {
  11724. "$ref": "#/components/schemas/MessageAbortedError"
  11725. },
  11726. {
  11727. "$ref": "#/components/schemas/StructuredOutputError"
  11728. },
  11729. {
  11730. "$ref": "#/components/schemas/ContextOverflowError"
  11731. },
  11732. {
  11733. "$ref": "#/components/schemas/APIError"
  11734. }
  11735. ]
  11736. },
  11737. "parentID": {
  11738. "type": "string",
  11739. "pattern": "^msg"
  11740. },
  11741. "modelID": {
  11742. "type": "string"
  11743. },
  11744. "providerID": {
  11745. "type": "string"
  11746. },
  11747. "mode": {
  11748. "type": "string"
  11749. },
  11750. "agent": {
  11751. "type": "string"
  11752. },
  11753. "path": {
  11754. "type": "object",
  11755. "properties": {
  11756. "cwd": {
  11757. "type": "string"
  11758. },
  11759. "root": {
  11760. "type": "string"
  11761. }
  11762. },
  11763. "required": ["cwd", "root"],
  11764. "additionalProperties": false
  11765. },
  11766. "summary": {
  11767. "type": "boolean"
  11768. },
  11769. "cost": {
  11770. "type": "number"
  11771. },
  11772. "tokens": {
  11773. "type": "object",
  11774. "properties": {
  11775. "total": {
  11776. "type": "number"
  11777. },
  11778. "input": {
  11779. "type": "number"
  11780. },
  11781. "output": {
  11782. "type": "number"
  11783. },
  11784. "reasoning": {
  11785. "type": "number"
  11786. },
  11787. "cache": {
  11788. "type": "object",
  11789. "properties": {
  11790. "read": {
  11791. "type": "number"
  11792. },
  11793. "write": {
  11794. "type": "number"
  11795. }
  11796. },
  11797. "required": ["read", "write"],
  11798. "additionalProperties": false
  11799. }
  11800. },
  11801. "required": ["input", "output", "reasoning", "cache"],
  11802. "additionalProperties": false
  11803. },
  11804. "structured": {},
  11805. "variant": {
  11806. "type": "string"
  11807. },
  11808. "finish": {
  11809. "type": "string"
  11810. }
  11811. },
  11812. "required": [
  11813. "id",
  11814. "sessionID",
  11815. "role",
  11816. "time",
  11817. "parentID",
  11818. "modelID",
  11819. "providerID",
  11820. "mode",
  11821. "agent",
  11822. "path",
  11823. "cost",
  11824. "tokens"
  11825. ],
  11826. "additionalProperties": false
  11827. },
  11828. "Message": {
  11829. "anyOf": [
  11830. {
  11831. "$ref": "#/components/schemas/UserMessage"
  11832. },
  11833. {
  11834. "$ref": "#/components/schemas/AssistantMessage"
  11835. }
  11836. ]
  11837. },
  11838. "TextPart": {
  11839. "type": "object",
  11840. "properties": {
  11841. "id": {
  11842. "type": "string",
  11843. "pattern": "^prt"
  11844. },
  11845. "sessionID": {
  11846. "type": "string",
  11847. "pattern": "^ses"
  11848. },
  11849. "messageID": {
  11850. "type": "string",
  11851. "pattern": "^msg"
  11852. },
  11853. "type": {
  11854. "type": "string",
  11855. "enum": ["text"]
  11856. },
  11857. "text": {
  11858. "type": "string"
  11859. },
  11860. "synthetic": {
  11861. "type": "boolean"
  11862. },
  11863. "ignored": {
  11864. "type": "boolean"
  11865. },
  11866. "time": {
  11867. "type": "object",
  11868. "properties": {
  11869. "start": {
  11870. "type": "integer",
  11871. "minimum": 0
  11872. },
  11873. "end": {
  11874. "type": "integer",
  11875. "minimum": 0
  11876. }
  11877. },
  11878. "required": ["start"],
  11879. "additionalProperties": false
  11880. },
  11881. "metadata": {
  11882. "type": "object"
  11883. }
  11884. },
  11885. "required": ["id", "sessionID", "messageID", "type", "text"],
  11886. "additionalProperties": false
  11887. },
  11888. "SubtaskPart": {
  11889. "type": "object",
  11890. "properties": {
  11891. "id": {
  11892. "type": "string",
  11893. "pattern": "^prt"
  11894. },
  11895. "sessionID": {
  11896. "type": "string",
  11897. "pattern": "^ses"
  11898. },
  11899. "messageID": {
  11900. "type": "string",
  11901. "pattern": "^msg"
  11902. },
  11903. "type": {
  11904. "type": "string",
  11905. "enum": ["subtask"]
  11906. },
  11907. "prompt": {
  11908. "type": "string"
  11909. },
  11910. "description": {
  11911. "type": "string"
  11912. },
  11913. "agent": {
  11914. "type": "string"
  11915. },
  11916. "model": {
  11917. "type": "object",
  11918. "properties": {
  11919. "providerID": {
  11920. "type": "string"
  11921. },
  11922. "modelID": {
  11923. "type": "string"
  11924. }
  11925. },
  11926. "required": ["providerID", "modelID"],
  11927. "additionalProperties": false
  11928. },
  11929. "command": {
  11930. "type": "string"
  11931. }
  11932. },
  11933. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11934. "additionalProperties": false
  11935. },
  11936. "ReasoningPart": {
  11937. "type": "object",
  11938. "properties": {
  11939. "id": {
  11940. "type": "string",
  11941. "pattern": "^prt"
  11942. },
  11943. "sessionID": {
  11944. "type": "string",
  11945. "pattern": "^ses"
  11946. },
  11947. "messageID": {
  11948. "type": "string",
  11949. "pattern": "^msg"
  11950. },
  11951. "type": {
  11952. "type": "string",
  11953. "enum": ["reasoning"]
  11954. },
  11955. "text": {
  11956. "type": "string"
  11957. },
  11958. "metadata": {
  11959. "type": "object"
  11960. },
  11961. "time": {
  11962. "type": "object",
  11963. "properties": {
  11964. "start": {
  11965. "type": "integer",
  11966. "minimum": 0
  11967. },
  11968. "end": {
  11969. "type": "integer",
  11970. "minimum": 0
  11971. }
  11972. },
  11973. "required": ["start"],
  11974. "additionalProperties": false
  11975. }
  11976. },
  11977. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11978. "additionalProperties": false
  11979. },
  11980. "FilePartSourceText": {
  11981. "type": "object",
  11982. "properties": {
  11983. "value": {
  11984. "type": "string"
  11985. },
  11986. "start": {
  11987. "type": "number"
  11988. },
  11989. "end": {
  11990. "type": "number"
  11991. }
  11992. },
  11993. "required": ["value", "start", "end"],
  11994. "additionalProperties": false
  11995. },
  11996. "FileSource": {
  11997. "type": "object",
  11998. "properties": {
  11999. "text": {
  12000. "$ref": "#/components/schemas/FilePartSourceText"
  12001. },
  12002. "type": {
  12003. "type": "string",
  12004. "enum": ["file"]
  12005. },
  12006. "path": {
  12007. "type": "string"
  12008. }
  12009. },
  12010. "required": ["text", "type", "path"],
  12011. "additionalProperties": false
  12012. },
  12013. "Range": {
  12014. "type": "object",
  12015. "properties": {
  12016. "start": {
  12017. "type": "object",
  12018. "properties": {
  12019. "line": {
  12020. "type": "integer",
  12021. "minimum": 0
  12022. },
  12023. "character": {
  12024. "type": "integer",
  12025. "minimum": 0
  12026. }
  12027. },
  12028. "required": ["line", "character"],
  12029. "additionalProperties": false
  12030. },
  12031. "end": {
  12032. "type": "object",
  12033. "properties": {
  12034. "line": {
  12035. "type": "integer",
  12036. "minimum": 0
  12037. },
  12038. "character": {
  12039. "type": "integer",
  12040. "minimum": 0
  12041. }
  12042. },
  12043. "required": ["line", "character"],
  12044. "additionalProperties": false
  12045. }
  12046. },
  12047. "required": ["start", "end"],
  12048. "additionalProperties": false
  12049. },
  12050. "SymbolSource": {
  12051. "type": "object",
  12052. "properties": {
  12053. "text": {
  12054. "$ref": "#/components/schemas/FilePartSourceText"
  12055. },
  12056. "type": {
  12057. "type": "string",
  12058. "enum": ["symbol"]
  12059. },
  12060. "path": {
  12061. "type": "string"
  12062. },
  12063. "range": {
  12064. "$ref": "#/components/schemas/Range"
  12065. },
  12066. "name": {
  12067. "type": "string"
  12068. },
  12069. "kind": {
  12070. "type": "integer",
  12071. "minimum": 0
  12072. }
  12073. },
  12074. "required": ["text", "type", "path", "range", "name", "kind"],
  12075. "additionalProperties": false
  12076. },
  12077. "ResourceSource": {
  12078. "type": "object",
  12079. "properties": {
  12080. "text": {
  12081. "$ref": "#/components/schemas/FilePartSourceText"
  12082. },
  12083. "type": {
  12084. "type": "string",
  12085. "enum": ["resource"]
  12086. },
  12087. "clientName": {
  12088. "type": "string"
  12089. },
  12090. "uri": {
  12091. "type": "string"
  12092. }
  12093. },
  12094. "required": ["text", "type", "clientName", "uri"],
  12095. "additionalProperties": false
  12096. },
  12097. "FilePartSource": {
  12098. "anyOf": [
  12099. {
  12100. "$ref": "#/components/schemas/FileSource"
  12101. },
  12102. {
  12103. "$ref": "#/components/schemas/SymbolSource"
  12104. },
  12105. {
  12106. "$ref": "#/components/schemas/ResourceSource"
  12107. }
  12108. ]
  12109. },
  12110. "FilePart": {
  12111. "type": "object",
  12112. "properties": {
  12113. "id": {
  12114. "type": "string",
  12115. "pattern": "^prt"
  12116. },
  12117. "sessionID": {
  12118. "type": "string",
  12119. "pattern": "^ses"
  12120. },
  12121. "messageID": {
  12122. "type": "string",
  12123. "pattern": "^msg"
  12124. },
  12125. "type": {
  12126. "type": "string",
  12127. "enum": ["file"]
  12128. },
  12129. "mime": {
  12130. "type": "string"
  12131. },
  12132. "filename": {
  12133. "type": "string"
  12134. },
  12135. "url": {
  12136. "type": "string"
  12137. },
  12138. "source": {
  12139. "$ref": "#/components/schemas/FilePartSource"
  12140. }
  12141. },
  12142. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12143. "additionalProperties": false
  12144. },
  12145. "ToolStatePending": {
  12146. "type": "object",
  12147. "properties": {
  12148. "status": {
  12149. "type": "string",
  12150. "enum": ["pending"]
  12151. },
  12152. "input": {
  12153. "type": "object"
  12154. },
  12155. "raw": {
  12156. "type": "string"
  12157. }
  12158. },
  12159. "required": ["status", "input", "raw"],
  12160. "additionalProperties": false
  12161. },
  12162. "ToolStateRunning": {
  12163. "type": "object",
  12164. "properties": {
  12165. "status": {
  12166. "type": "string",
  12167. "enum": ["running"]
  12168. },
  12169. "input": {
  12170. "type": "object"
  12171. },
  12172. "title": {
  12173. "type": "string"
  12174. },
  12175. "metadata": {
  12176. "type": "object"
  12177. },
  12178. "time": {
  12179. "type": "object",
  12180. "properties": {
  12181. "start": {
  12182. "type": "integer",
  12183. "minimum": 0
  12184. }
  12185. },
  12186. "required": ["start"],
  12187. "additionalProperties": false
  12188. }
  12189. },
  12190. "required": ["status", "input", "time"],
  12191. "additionalProperties": false
  12192. },
  12193. "ToolStateCompleted": {
  12194. "type": "object",
  12195. "properties": {
  12196. "status": {
  12197. "type": "string",
  12198. "enum": ["completed"]
  12199. },
  12200. "input": {
  12201. "type": "object"
  12202. },
  12203. "output": {
  12204. "type": "string"
  12205. },
  12206. "title": {
  12207. "type": "string"
  12208. },
  12209. "metadata": {
  12210. "type": "object"
  12211. },
  12212. "time": {
  12213. "type": "object",
  12214. "properties": {
  12215. "start": {
  12216. "type": "integer",
  12217. "minimum": 0
  12218. },
  12219. "end": {
  12220. "type": "integer",
  12221. "minimum": 0
  12222. },
  12223. "compacted": {
  12224. "type": "integer",
  12225. "minimum": 0
  12226. }
  12227. },
  12228. "required": ["start", "end"],
  12229. "additionalProperties": false
  12230. },
  12231. "attachments": {
  12232. "type": "array",
  12233. "items": {
  12234. "$ref": "#/components/schemas/FilePart"
  12235. }
  12236. }
  12237. },
  12238. "required": ["status", "input", "output", "title", "metadata", "time"],
  12239. "additionalProperties": false
  12240. },
  12241. "ToolStateError": {
  12242. "type": "object",
  12243. "properties": {
  12244. "status": {
  12245. "type": "string",
  12246. "enum": ["error"]
  12247. },
  12248. "input": {
  12249. "type": "object"
  12250. },
  12251. "error": {
  12252. "type": "string"
  12253. },
  12254. "metadata": {
  12255. "type": "object"
  12256. },
  12257. "time": {
  12258. "type": "object",
  12259. "properties": {
  12260. "start": {
  12261. "type": "integer",
  12262. "minimum": 0
  12263. },
  12264. "end": {
  12265. "type": "integer",
  12266. "minimum": 0
  12267. }
  12268. },
  12269. "required": ["start", "end"],
  12270. "additionalProperties": false
  12271. }
  12272. },
  12273. "required": ["status", "input", "error", "time"],
  12274. "additionalProperties": false
  12275. },
  12276. "ToolState": {
  12277. "anyOf": [
  12278. {
  12279. "$ref": "#/components/schemas/ToolStatePending"
  12280. },
  12281. {
  12282. "$ref": "#/components/schemas/ToolStateRunning"
  12283. },
  12284. {
  12285. "$ref": "#/components/schemas/ToolStateCompleted"
  12286. },
  12287. {
  12288. "$ref": "#/components/schemas/ToolStateError"
  12289. }
  12290. ]
  12291. },
  12292. "ToolPart": {
  12293. "type": "object",
  12294. "properties": {
  12295. "id": {
  12296. "type": "string",
  12297. "pattern": "^prt"
  12298. },
  12299. "sessionID": {
  12300. "type": "string",
  12301. "pattern": "^ses"
  12302. },
  12303. "messageID": {
  12304. "type": "string",
  12305. "pattern": "^msg"
  12306. },
  12307. "type": {
  12308. "type": "string",
  12309. "enum": ["tool"]
  12310. },
  12311. "callID": {
  12312. "type": "string"
  12313. },
  12314. "tool": {
  12315. "type": "string"
  12316. },
  12317. "state": {
  12318. "$ref": "#/components/schemas/ToolState"
  12319. },
  12320. "metadata": {
  12321. "type": "object"
  12322. }
  12323. },
  12324. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12325. "additionalProperties": false
  12326. },
  12327. "StepStartPart": {
  12328. "type": "object",
  12329. "properties": {
  12330. "id": {
  12331. "type": "string",
  12332. "pattern": "^prt"
  12333. },
  12334. "sessionID": {
  12335. "type": "string",
  12336. "pattern": "^ses"
  12337. },
  12338. "messageID": {
  12339. "type": "string",
  12340. "pattern": "^msg"
  12341. },
  12342. "type": {
  12343. "type": "string",
  12344. "enum": ["step-start"]
  12345. },
  12346. "snapshot": {
  12347. "type": "string"
  12348. }
  12349. },
  12350. "required": ["id", "sessionID", "messageID", "type"],
  12351. "additionalProperties": false
  12352. },
  12353. "StepFinishPart": {
  12354. "type": "object",
  12355. "properties": {
  12356. "id": {
  12357. "type": "string",
  12358. "pattern": "^prt"
  12359. },
  12360. "sessionID": {
  12361. "type": "string",
  12362. "pattern": "^ses"
  12363. },
  12364. "messageID": {
  12365. "type": "string",
  12366. "pattern": "^msg"
  12367. },
  12368. "type": {
  12369. "type": "string",
  12370. "enum": ["step-finish"]
  12371. },
  12372. "reason": {
  12373. "type": "string"
  12374. },
  12375. "snapshot": {
  12376. "type": "string"
  12377. },
  12378. "cost": {
  12379. "type": "number"
  12380. },
  12381. "tokens": {
  12382. "type": "object",
  12383. "properties": {
  12384. "total": {
  12385. "type": "number"
  12386. },
  12387. "input": {
  12388. "type": "number"
  12389. },
  12390. "output": {
  12391. "type": "number"
  12392. },
  12393. "reasoning": {
  12394. "type": "number"
  12395. },
  12396. "cache": {
  12397. "type": "object",
  12398. "properties": {
  12399. "read": {
  12400. "type": "number"
  12401. },
  12402. "write": {
  12403. "type": "number"
  12404. }
  12405. },
  12406. "required": ["read", "write"],
  12407. "additionalProperties": false
  12408. }
  12409. },
  12410. "required": ["input", "output", "reasoning", "cache"],
  12411. "additionalProperties": false
  12412. }
  12413. },
  12414. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12415. "additionalProperties": false
  12416. },
  12417. "SnapshotPart": {
  12418. "type": "object",
  12419. "properties": {
  12420. "id": {
  12421. "type": "string",
  12422. "pattern": "^prt"
  12423. },
  12424. "sessionID": {
  12425. "type": "string",
  12426. "pattern": "^ses"
  12427. },
  12428. "messageID": {
  12429. "type": "string",
  12430. "pattern": "^msg"
  12431. },
  12432. "type": {
  12433. "type": "string",
  12434. "enum": ["snapshot"]
  12435. },
  12436. "snapshot": {
  12437. "type": "string"
  12438. }
  12439. },
  12440. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12441. "additionalProperties": false
  12442. },
  12443. "PatchPart": {
  12444. "type": "object",
  12445. "properties": {
  12446. "id": {
  12447. "type": "string",
  12448. "pattern": "^prt"
  12449. },
  12450. "sessionID": {
  12451. "type": "string",
  12452. "pattern": "^ses"
  12453. },
  12454. "messageID": {
  12455. "type": "string",
  12456. "pattern": "^msg"
  12457. },
  12458. "type": {
  12459. "type": "string",
  12460. "enum": ["patch"]
  12461. },
  12462. "hash": {
  12463. "type": "string"
  12464. },
  12465. "files": {
  12466. "type": "array",
  12467. "items": {
  12468. "type": "string"
  12469. }
  12470. }
  12471. },
  12472. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12473. "additionalProperties": false
  12474. },
  12475. "AgentPart": {
  12476. "type": "object",
  12477. "properties": {
  12478. "id": {
  12479. "type": "string",
  12480. "pattern": "^prt"
  12481. },
  12482. "sessionID": {
  12483. "type": "string",
  12484. "pattern": "^ses"
  12485. },
  12486. "messageID": {
  12487. "type": "string",
  12488. "pattern": "^msg"
  12489. },
  12490. "type": {
  12491. "type": "string",
  12492. "enum": ["agent"]
  12493. },
  12494. "name": {
  12495. "type": "string"
  12496. },
  12497. "source": {
  12498. "type": "object",
  12499. "properties": {
  12500. "value": {
  12501. "type": "string"
  12502. },
  12503. "start": {
  12504. "type": "integer",
  12505. "minimum": 0
  12506. },
  12507. "end": {
  12508. "type": "integer",
  12509. "minimum": 0
  12510. }
  12511. },
  12512. "required": ["value", "start", "end"],
  12513. "additionalProperties": false
  12514. }
  12515. },
  12516. "required": ["id", "sessionID", "messageID", "type", "name"],
  12517. "additionalProperties": false
  12518. },
  12519. "RetryPart": {
  12520. "type": "object",
  12521. "properties": {
  12522. "id": {
  12523. "type": "string",
  12524. "pattern": "^prt"
  12525. },
  12526. "sessionID": {
  12527. "type": "string",
  12528. "pattern": "^ses"
  12529. },
  12530. "messageID": {
  12531. "type": "string",
  12532. "pattern": "^msg"
  12533. },
  12534. "type": {
  12535. "type": "string",
  12536. "enum": ["retry"]
  12537. },
  12538. "attempt": {
  12539. "type": "integer",
  12540. "minimum": 0
  12541. },
  12542. "error": {
  12543. "$ref": "#/components/schemas/APIError"
  12544. },
  12545. "time": {
  12546. "type": "object",
  12547. "properties": {
  12548. "created": {
  12549. "type": "integer",
  12550. "minimum": 0
  12551. }
  12552. },
  12553. "required": ["created"],
  12554. "additionalProperties": false
  12555. }
  12556. },
  12557. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12558. "additionalProperties": false
  12559. },
  12560. "CompactionPart": {
  12561. "type": "object",
  12562. "properties": {
  12563. "id": {
  12564. "type": "string",
  12565. "pattern": "^prt"
  12566. },
  12567. "sessionID": {
  12568. "type": "string",
  12569. "pattern": "^ses"
  12570. },
  12571. "messageID": {
  12572. "type": "string",
  12573. "pattern": "^msg"
  12574. },
  12575. "type": {
  12576. "type": "string",
  12577. "enum": ["compaction"]
  12578. },
  12579. "auto": {
  12580. "type": "boolean"
  12581. },
  12582. "overflow": {
  12583. "type": "boolean"
  12584. },
  12585. "tail_start_id": {
  12586. "type": "string",
  12587. "pattern": "^msg"
  12588. }
  12589. },
  12590. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12591. "additionalProperties": false
  12592. },
  12593. "Part": {
  12594. "anyOf": [
  12595. {
  12596. "$ref": "#/components/schemas/TextPart"
  12597. },
  12598. {
  12599. "$ref": "#/components/schemas/SubtaskPart"
  12600. },
  12601. {
  12602. "$ref": "#/components/schemas/ReasoningPart"
  12603. },
  12604. {
  12605. "$ref": "#/components/schemas/FilePart"
  12606. },
  12607. {
  12608. "$ref": "#/components/schemas/ToolPart"
  12609. },
  12610. {
  12611. "$ref": "#/components/schemas/StepStartPart"
  12612. },
  12613. {
  12614. "$ref": "#/components/schemas/StepFinishPart"
  12615. },
  12616. {
  12617. "$ref": "#/components/schemas/SnapshotPart"
  12618. },
  12619. {
  12620. "$ref": "#/components/schemas/PatchPart"
  12621. },
  12622. {
  12623. "$ref": "#/components/schemas/AgentPart"
  12624. },
  12625. {
  12626. "$ref": "#/components/schemas/RetryPart"
  12627. },
  12628. {
  12629. "$ref": "#/components/schemas/CompactionPart"
  12630. }
  12631. ]
  12632. },
  12633. "PermissionAction": {
  12634. "type": "string",
  12635. "enum": ["allow", "deny", "ask"]
  12636. },
  12637. "PermissionRule": {
  12638. "type": "object",
  12639. "properties": {
  12640. "permission": {
  12641. "type": "string"
  12642. },
  12643. "pattern": {
  12644. "type": "string"
  12645. },
  12646. "action": {
  12647. "$ref": "#/components/schemas/PermissionAction"
  12648. }
  12649. },
  12650. "required": ["permission", "pattern", "action"],
  12651. "additionalProperties": false
  12652. },
  12653. "PermissionRuleset": {
  12654. "type": "array",
  12655. "items": {
  12656. "$ref": "#/components/schemas/PermissionRule"
  12657. }
  12658. },
  12659. "Session": {
  12660. "type": "object",
  12661. "properties": {
  12662. "id": {
  12663. "type": "string",
  12664. "pattern": "^ses"
  12665. },
  12666. "slug": {
  12667. "type": "string"
  12668. },
  12669. "projectID": {
  12670. "type": "string"
  12671. },
  12672. "workspaceID": {
  12673. "type": "string",
  12674. "pattern": "^wrk"
  12675. },
  12676. "directory": {
  12677. "type": "string"
  12678. },
  12679. "path": {
  12680. "type": "string"
  12681. },
  12682. "parentID": {
  12683. "type": "string",
  12684. "pattern": "^ses"
  12685. },
  12686. "summary": {
  12687. "type": "object",
  12688. "properties": {
  12689. "additions": {
  12690. "type": "number"
  12691. },
  12692. "deletions": {
  12693. "type": "number"
  12694. },
  12695. "files": {
  12696. "type": "number"
  12697. },
  12698. "diffs": {
  12699. "type": "array",
  12700. "items": {
  12701. "$ref": "#/components/schemas/SnapshotFileDiff"
  12702. }
  12703. }
  12704. },
  12705. "required": ["additions", "deletions", "files"],
  12706. "additionalProperties": false
  12707. },
  12708. "cost": {
  12709. "type": "number"
  12710. },
  12711. "tokens": {
  12712. "type": "object",
  12713. "properties": {
  12714. "input": {
  12715. "type": "number"
  12716. },
  12717. "output": {
  12718. "type": "number"
  12719. },
  12720. "reasoning": {
  12721. "type": "number"
  12722. },
  12723. "cache": {
  12724. "type": "object",
  12725. "properties": {
  12726. "read": {
  12727. "type": "number"
  12728. },
  12729. "write": {
  12730. "type": "number"
  12731. }
  12732. },
  12733. "required": ["read", "write"],
  12734. "additionalProperties": false
  12735. }
  12736. },
  12737. "required": ["input", "output", "reasoning", "cache"],
  12738. "additionalProperties": false
  12739. },
  12740. "share": {
  12741. "type": "object",
  12742. "properties": {
  12743. "url": {
  12744. "type": "string"
  12745. }
  12746. },
  12747. "required": ["url"],
  12748. "additionalProperties": false
  12749. },
  12750. "title": {
  12751. "type": "string"
  12752. },
  12753. "agent": {
  12754. "type": "string"
  12755. },
  12756. "model": {
  12757. "type": "object",
  12758. "properties": {
  12759. "id": {
  12760. "type": "string"
  12761. },
  12762. "providerID": {
  12763. "type": "string"
  12764. },
  12765. "variant": {
  12766. "type": "string"
  12767. }
  12768. },
  12769. "required": ["id", "providerID"],
  12770. "additionalProperties": false
  12771. },
  12772. "version": {
  12773. "type": "string"
  12774. },
  12775. "time": {
  12776. "type": "object",
  12777. "properties": {
  12778. "created": {
  12779. "type": "integer",
  12780. "minimum": 0
  12781. },
  12782. "updated": {
  12783. "type": "integer",
  12784. "minimum": 0
  12785. },
  12786. "compacting": {
  12787. "type": "integer",
  12788. "minimum": 0
  12789. },
  12790. "archived": {
  12791. "type": "number"
  12792. }
  12793. },
  12794. "required": ["created", "updated"],
  12795. "additionalProperties": false
  12796. },
  12797. "permission": {
  12798. "$ref": "#/components/schemas/PermissionRuleset"
  12799. },
  12800. "revert": {
  12801. "type": "object",
  12802. "properties": {
  12803. "messageID": {
  12804. "type": "string",
  12805. "pattern": "^msg"
  12806. },
  12807. "partID": {
  12808. "type": "string",
  12809. "pattern": "^prt"
  12810. },
  12811. "snapshot": {
  12812. "type": "string"
  12813. },
  12814. "diff": {
  12815. "type": "string"
  12816. }
  12817. },
  12818. "required": ["messageID"],
  12819. "additionalProperties": false
  12820. }
  12821. },
  12822. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12823. "additionalProperties": false
  12824. },
  12825. "Prompt": {
  12826. "type": "object",
  12827. "properties": {
  12828. "text": {
  12829. "type": "string"
  12830. },
  12831. "files": {
  12832. "type": "array",
  12833. "items": {
  12834. "$ref": "#/components/schemas/PromptFileAttachment"
  12835. }
  12836. },
  12837. "agents": {
  12838. "type": "array",
  12839. "items": {
  12840. "$ref": "#/components/schemas/PromptAgentAttachment"
  12841. }
  12842. },
  12843. "references": {
  12844. "type": "array",
  12845. "items": {
  12846. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12847. }
  12848. }
  12849. },
  12850. "required": ["text"],
  12851. "additionalProperties": false
  12852. },
  12853. "GlobalEvent": {
  12854. "type": "object",
  12855. "properties": {
  12856. "directory": {
  12857. "type": "string"
  12858. },
  12859. "project": {
  12860. "type": "string"
  12861. },
  12862. "workspace": {
  12863. "type": "string"
  12864. },
  12865. "payload": {
  12866. "anyOf": [
  12867. {
  12868. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12869. },
  12870. {
  12871. "$ref": "#/components/schemas/Event.tui.command.execute"
  12872. },
  12873. {
  12874. "$ref": "#/components/schemas/Event.tui.toast.show"
  12875. },
  12876. {
  12877. "$ref": "#/components/schemas/Event.tui.session.select"
  12878. },
  12879. {
  12880. "$ref": "#/components/schemas/EventServerConnected"
  12881. },
  12882. {
  12883. "$ref": "#/components/schemas/EventGlobalDisposed"
  12884. },
  12885. {
  12886. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12887. },
  12888. {
  12889. "$ref": "#/components/schemas/EventFileEdited"
  12890. },
  12891. {
  12892. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12893. },
  12894. {
  12895. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12896. },
  12897. {
  12898. "$ref": "#/components/schemas/EventLspUpdated"
  12899. },
  12900. {
  12901. "$ref": "#/components/schemas/EventMessagePartDelta"
  12902. },
  12903. {
  12904. "$ref": "#/components/schemas/EventPermissionAsked"
  12905. },
  12906. {
  12907. "$ref": "#/components/schemas/EventPermissionReplied"
  12908. },
  12909. {
  12910. "$ref": "#/components/schemas/EventSessionDiff"
  12911. },
  12912. {
  12913. "$ref": "#/components/schemas/EventSessionError"
  12914. },
  12915. {
  12916. "$ref": "#/components/schemas/EventQuestionAsked"
  12917. },
  12918. {
  12919. "$ref": "#/components/schemas/EventQuestionReplied"
  12920. },
  12921. {
  12922. "$ref": "#/components/schemas/EventQuestionRejected"
  12923. },
  12924. {
  12925. "$ref": "#/components/schemas/EventTodoUpdated"
  12926. },
  12927. {
  12928. "$ref": "#/components/schemas/EventSessionStatus"
  12929. },
  12930. {
  12931. "$ref": "#/components/schemas/EventSessionIdle"
  12932. },
  12933. {
  12934. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12935. },
  12936. {
  12937. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12938. },
  12939. {
  12940. "$ref": "#/components/schemas/EventCommandExecuted"
  12941. },
  12942. {
  12943. "$ref": "#/components/schemas/EventProjectUpdated"
  12944. },
  12945. {
  12946. "$ref": "#/components/schemas/EventSessionCompacted"
  12947. },
  12948. {
  12949. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12950. },
  12951. {
  12952. "$ref": "#/components/schemas/EventWorkspaceReady"
  12953. },
  12954. {
  12955. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12956. },
  12957. {
  12958. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12959. },
  12960. {
  12961. "$ref": "#/components/schemas/EventWorktreeReady"
  12962. },
  12963. {
  12964. "$ref": "#/components/schemas/EventWorktreeFailed"
  12965. },
  12966. {
  12967. "$ref": "#/components/schemas/EventPtyCreated"
  12968. },
  12969. {
  12970. "$ref": "#/components/schemas/EventPtyUpdated"
  12971. },
  12972. {
  12973. "$ref": "#/components/schemas/EventPtyExited"
  12974. },
  12975. {
  12976. "$ref": "#/components/schemas/EventPtyDeleted"
  12977. },
  12978. {
  12979. "$ref": "#/components/schemas/EventInstallationUpdated"
  12980. },
  12981. {
  12982. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12983. },
  12984. {
  12985. "$ref": "#/components/schemas/EventMessageUpdated"
  12986. },
  12987. {
  12988. "$ref": "#/components/schemas/EventMessageRemoved"
  12989. },
  12990. {
  12991. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12992. },
  12993. {
  12994. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12995. },
  12996. {
  12997. "$ref": "#/components/schemas/EventSessionCreated"
  12998. },
  12999. {
  13000. "$ref": "#/components/schemas/EventSessionUpdated"
  13001. },
  13002. {
  13003. "$ref": "#/components/schemas/EventSessionDeleted"
  13004. },
  13005. {
  13006. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13007. },
  13008. {
  13009. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13010. },
  13011. {
  13012. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13013. },
  13014. {
  13015. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13016. },
  13017. {
  13018. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13019. },
  13020. {
  13021. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13022. },
  13023. {
  13024. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13025. },
  13026. {
  13027. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13028. },
  13029. {
  13030. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13031. },
  13032. {
  13033. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13034. },
  13035. {
  13036. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13037. },
  13038. {
  13039. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13040. },
  13041. {
  13042. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13043. },
  13044. {
  13045. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13046. },
  13047. {
  13048. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13049. },
  13050. {
  13051. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13052. },
  13053. {
  13054. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13055. },
  13056. {
  13057. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13058. },
  13059. {
  13060. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13061. },
  13062. {
  13063. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13064. },
  13065. {
  13066. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13067. },
  13068. {
  13069. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13070. },
  13071. {
  13072. "$ref": "#/components/schemas/EventSessionNextRetried"
  13073. },
  13074. {
  13075. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13076. },
  13077. {
  13078. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13079. },
  13080. {
  13081. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13082. },
  13083. {
  13084. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13085. },
  13086. {
  13087. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13088. },
  13089. {
  13090. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13091. },
  13092. {
  13093. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13094. },
  13095. {
  13096. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13097. },
  13098. {
  13099. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13100. },
  13101. {
  13102. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13103. },
  13104. {
  13105. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13106. },
  13107. {
  13108. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13109. },
  13110. {
  13111. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13112. },
  13113. {
  13114. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13115. },
  13116. {
  13117. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13118. },
  13119. {
  13120. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13121. },
  13122. {
  13123. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13124. },
  13125. {
  13126. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13127. },
  13128. {
  13129. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13130. },
  13131. {
  13132. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13133. },
  13134. {
  13135. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13136. },
  13137. {
  13138. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13139. },
  13140. {
  13141. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13142. },
  13143. {
  13144. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13145. },
  13146. {
  13147. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13148. },
  13149. {
  13150. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13151. },
  13152. {
  13153. "$ref": "#/components/schemas/EventSessionNextRetried"
  13154. },
  13155. {
  13156. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13157. },
  13158. {
  13159. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13160. },
  13161. {
  13162. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13163. },
  13164. {
  13165. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13166. },
  13167. {
  13168. "$ref": "#/components/schemas/EventAccountAdded"
  13169. },
  13170. {
  13171. "$ref": "#/components/schemas/EventAccountRemoved"
  13172. },
  13173. {
  13174. "$ref": "#/components/schemas/EventAccountSwitched"
  13175. },
  13176. {
  13177. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13178. },
  13179. {
  13180. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13181. },
  13182. {
  13183. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13184. },
  13185. {
  13186. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13187. },
  13188. {
  13189. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13190. },
  13191. {
  13192. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13193. },
  13194. {
  13195. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13196. },
  13197. {
  13198. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13199. },
  13200. {
  13201. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13202. },
  13203. {
  13204. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13205. },
  13206. {
  13207. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13208. },
  13209. {
  13210. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13211. },
  13212. {
  13213. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13214. },
  13215. {
  13216. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13217. },
  13218. {
  13219. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13220. },
  13221. {
  13222. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13223. },
  13224. {
  13225. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13226. },
  13227. {
  13228. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13229. },
  13230. {
  13231. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13232. },
  13233. {
  13234. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13235. },
  13236. {
  13237. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13238. },
  13239. {
  13240. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13241. },
  13242. {
  13243. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13244. },
  13245. {
  13246. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13247. },
  13248. {
  13249. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13250. },
  13251. {
  13252. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13253. },
  13254. {
  13255. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13256. },
  13257. {
  13258. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13259. },
  13260. {
  13261. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13262. },
  13263. {
  13264. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13265. },
  13266. {
  13267. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13268. },
  13269. {
  13270. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13271. },
  13272. {
  13273. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13274. }
  13275. ]
  13276. }
  13277. },
  13278. "required": ["directory", "payload"],
  13279. "additionalProperties": false
  13280. },
  13281. "LogLevel": {
  13282. "type": "string",
  13283. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13284. "description": "Log level"
  13285. },
  13286. "ServerConfig": {
  13287. "type": "object",
  13288. "properties": {
  13289. "port": {
  13290. "type": "integer",
  13291. "exclusiveMinimum": 0
  13292. },
  13293. "hostname": {
  13294. "type": "string"
  13295. },
  13296. "mdns": {
  13297. "type": "boolean"
  13298. },
  13299. "mdnsDomain": {
  13300. "type": "string"
  13301. },
  13302. "cors": {
  13303. "type": "array",
  13304. "items": {
  13305. "type": "string"
  13306. }
  13307. }
  13308. },
  13309. "additionalProperties": false,
  13310. "description": "Server configuration for opencode serve and web commands"
  13311. },
  13312. "ReferenceConfigEntry": {
  13313. "anyOf": [
  13314. {
  13315. "type": "string"
  13316. },
  13317. {
  13318. "type": "object",
  13319. "properties": {
  13320. "repository": {
  13321. "type": "string",
  13322. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13323. },
  13324. "branch": {
  13325. "type": "string"
  13326. }
  13327. },
  13328. "required": ["repository"],
  13329. "additionalProperties": false
  13330. },
  13331. {
  13332. "type": "object",
  13333. "properties": {
  13334. "path": {
  13335. "type": "string",
  13336. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13337. }
  13338. },
  13339. "required": ["path"],
  13340. "additionalProperties": false
  13341. }
  13342. ]
  13343. },
  13344. "ReferenceConfig": {
  13345. "type": "object",
  13346. "additionalProperties": {
  13347. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13348. }
  13349. },
  13350. "PermissionActionConfig": {
  13351. "type": "string",
  13352. "enum": ["ask", "allow", "deny"]
  13353. },
  13354. "PermissionObjectConfig": {
  13355. "type": "object",
  13356. "additionalProperties": {
  13357. "$ref": "#/components/schemas/PermissionActionConfig"
  13358. }
  13359. },
  13360. "PermissionRuleConfig": {
  13361. "anyOf": [
  13362. {
  13363. "$ref": "#/components/schemas/PermissionActionConfig"
  13364. },
  13365. {
  13366. "$ref": "#/components/schemas/PermissionObjectConfig"
  13367. }
  13368. ]
  13369. },
  13370. "PermissionConfig": {
  13371. "anyOf": [
  13372. {
  13373. "$ref": "#/components/schemas/PermissionActionConfig"
  13374. },
  13375. {
  13376. "type": "object",
  13377. "properties": {
  13378. "read": {
  13379. "$ref": "#/components/schemas/PermissionRuleConfig"
  13380. },
  13381. "edit": {
  13382. "$ref": "#/components/schemas/PermissionRuleConfig"
  13383. },
  13384. "glob": {
  13385. "$ref": "#/components/schemas/PermissionRuleConfig"
  13386. },
  13387. "grep": {
  13388. "$ref": "#/components/schemas/PermissionRuleConfig"
  13389. },
  13390. "list": {
  13391. "$ref": "#/components/schemas/PermissionRuleConfig"
  13392. },
  13393. "bash": {
  13394. "$ref": "#/components/schemas/PermissionRuleConfig"
  13395. },
  13396. "task": {
  13397. "$ref": "#/components/schemas/PermissionRuleConfig"
  13398. },
  13399. "external_directory": {
  13400. "$ref": "#/components/schemas/PermissionRuleConfig"
  13401. },
  13402. "todowrite": {
  13403. "$ref": "#/components/schemas/PermissionActionConfig"
  13404. },
  13405. "question": {
  13406. "$ref": "#/components/schemas/PermissionActionConfig"
  13407. },
  13408. "webfetch": {
  13409. "$ref": "#/components/schemas/PermissionActionConfig"
  13410. },
  13411. "websearch": {
  13412. "$ref": "#/components/schemas/PermissionActionConfig"
  13413. },
  13414. "repo_clone": {
  13415. "$ref": "#/components/schemas/PermissionRuleConfig"
  13416. },
  13417. "repo_overview": {
  13418. "$ref": "#/components/schemas/PermissionRuleConfig"
  13419. },
  13420. "lsp": {
  13421. "$ref": "#/components/schemas/PermissionRuleConfig"
  13422. },
  13423. "doom_loop": {
  13424. "$ref": "#/components/schemas/PermissionActionConfig"
  13425. },
  13426. "skill": {
  13427. "$ref": "#/components/schemas/PermissionRuleConfig"
  13428. }
  13429. },
  13430. "additionalProperties": {
  13431. "$ref": "#/components/schemas/PermissionRuleConfig"
  13432. }
  13433. }
  13434. ]
  13435. },
  13436. "AgentConfig": {
  13437. "type": "object",
  13438. "properties": {
  13439. "model": {
  13440. "type": "string"
  13441. },
  13442. "variant": {
  13443. "type": "string"
  13444. },
  13445. "temperature": {
  13446. "type": "number"
  13447. },
  13448. "top_p": {
  13449. "type": "number"
  13450. },
  13451. "prompt": {
  13452. "type": "string"
  13453. },
  13454. "tools": {
  13455. "type": "object",
  13456. "additionalProperties": {
  13457. "type": "boolean"
  13458. }
  13459. },
  13460. "disable": {
  13461. "type": "boolean"
  13462. },
  13463. "description": {
  13464. "type": "string"
  13465. },
  13466. "mode": {
  13467. "type": "string",
  13468. "enum": ["subagent", "primary", "all"]
  13469. },
  13470. "hidden": {
  13471. "type": "boolean"
  13472. },
  13473. "options": {
  13474. "type": "object"
  13475. },
  13476. "color": {
  13477. "anyOf": [
  13478. {
  13479. "type": "string",
  13480. "pattern": "^#[0-9a-fA-F]{6}$"
  13481. },
  13482. {
  13483. "type": "string",
  13484. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13485. }
  13486. ],
  13487. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13488. },
  13489. "steps": {
  13490. "type": "integer",
  13491. "exclusiveMinimum": 0
  13492. },
  13493. "maxSteps": {
  13494. "type": "integer",
  13495. "exclusiveMinimum": 0
  13496. },
  13497. "permission": {
  13498. "$ref": "#/components/schemas/PermissionConfig"
  13499. }
  13500. },
  13501. "additionalProperties": {}
  13502. },
  13503. "ProviderConfig": {
  13504. "type": "object",
  13505. "properties": {
  13506. "api": {
  13507. "type": "string"
  13508. },
  13509. "name": {
  13510. "type": "string"
  13511. },
  13512. "env": {
  13513. "type": "array",
  13514. "items": {
  13515. "type": "string"
  13516. }
  13517. },
  13518. "id": {
  13519. "type": "string"
  13520. },
  13521. "npm": {
  13522. "type": "string"
  13523. },
  13524. "whitelist": {
  13525. "type": "array",
  13526. "items": {
  13527. "type": "string"
  13528. }
  13529. },
  13530. "blacklist": {
  13531. "type": "array",
  13532. "items": {
  13533. "type": "string"
  13534. }
  13535. },
  13536. "options": {
  13537. "type": "object",
  13538. "properties": {
  13539. "apiKey": {
  13540. "type": "string"
  13541. },
  13542. "baseURL": {
  13543. "type": "string"
  13544. },
  13545. "enterpriseUrl": {
  13546. "type": "string"
  13547. },
  13548. "setCacheKey": {
  13549. "type": "boolean"
  13550. },
  13551. "timeout": {
  13552. "anyOf": [
  13553. {
  13554. "type": "integer",
  13555. "exclusiveMinimum": 0
  13556. },
  13557. {
  13558. "type": "boolean",
  13559. "enum": [false]
  13560. }
  13561. ],
  13562. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13563. },
  13564. "chunkTimeout": {
  13565. "type": "integer",
  13566. "exclusiveMinimum": 0
  13567. }
  13568. },
  13569. "additionalProperties": {}
  13570. },
  13571. "models": {
  13572. "type": "object",
  13573. "additionalProperties": {
  13574. "type": "object",
  13575. "properties": {
  13576. "id": {
  13577. "type": "string"
  13578. },
  13579. "name": {
  13580. "type": "string"
  13581. },
  13582. "family": {
  13583. "type": "string"
  13584. },
  13585. "release_date": {
  13586. "type": "string"
  13587. },
  13588. "attachment": {
  13589. "type": "boolean"
  13590. },
  13591. "reasoning": {
  13592. "type": "boolean"
  13593. },
  13594. "temperature": {
  13595. "type": "boolean"
  13596. },
  13597. "tool_call": {
  13598. "type": "boolean"
  13599. },
  13600. "interleaved": {
  13601. "anyOf": [
  13602. {
  13603. "type": "boolean",
  13604. "enum": [true]
  13605. },
  13606. {
  13607. "type": "object",
  13608. "properties": {
  13609. "field": {
  13610. "type": "string",
  13611. "enum": ["reasoning_content", "reasoning_details"]
  13612. }
  13613. },
  13614. "required": ["field"],
  13615. "additionalProperties": false
  13616. }
  13617. ]
  13618. },
  13619. "cost": {
  13620. "type": "object",
  13621. "properties": {
  13622. "input": {
  13623. "type": "number"
  13624. },
  13625. "output": {
  13626. "type": "number"
  13627. },
  13628. "cache_read": {
  13629. "type": "number"
  13630. },
  13631. "cache_write": {
  13632. "type": "number"
  13633. },
  13634. "context_over_200k": {
  13635. "type": "object",
  13636. "properties": {
  13637. "input": {
  13638. "type": "number"
  13639. },
  13640. "output": {
  13641. "type": "number"
  13642. },
  13643. "cache_read": {
  13644. "type": "number"
  13645. },
  13646. "cache_write": {
  13647. "type": "number"
  13648. }
  13649. },
  13650. "required": ["input", "output"],
  13651. "additionalProperties": false
  13652. }
  13653. },
  13654. "required": ["input", "output"],
  13655. "additionalProperties": false
  13656. },
  13657. "limit": {
  13658. "type": "object",
  13659. "properties": {
  13660. "context": {
  13661. "type": "number"
  13662. },
  13663. "input": {
  13664. "type": "number"
  13665. },
  13666. "output": {
  13667. "type": "number"
  13668. }
  13669. },
  13670. "required": ["context", "output"],
  13671. "additionalProperties": false
  13672. },
  13673. "modalities": {
  13674. "type": "object",
  13675. "properties": {
  13676. "input": {
  13677. "type": "array",
  13678. "items": {
  13679. "type": "string",
  13680. "enum": ["text", "audio", "image", "video", "pdf"]
  13681. }
  13682. },
  13683. "output": {
  13684. "type": "array",
  13685. "items": {
  13686. "type": "string",
  13687. "enum": ["text", "audio", "image", "video", "pdf"]
  13688. }
  13689. }
  13690. },
  13691. "required": ["input", "output"],
  13692. "additionalProperties": false
  13693. },
  13694. "experimental": {
  13695. "type": "boolean"
  13696. },
  13697. "status": {
  13698. "type": "string",
  13699. "enum": ["alpha", "beta", "deprecated", "active"]
  13700. },
  13701. "provider": {
  13702. "type": "object",
  13703. "properties": {
  13704. "npm": {
  13705. "type": "string"
  13706. },
  13707. "api": {
  13708. "type": "string"
  13709. }
  13710. },
  13711. "additionalProperties": false
  13712. },
  13713. "options": {
  13714. "type": "object"
  13715. },
  13716. "headers": {
  13717. "type": "object",
  13718. "additionalProperties": {
  13719. "type": "string"
  13720. }
  13721. },
  13722. "variants": {
  13723. "type": "object",
  13724. "additionalProperties": {
  13725. "type": "object",
  13726. "properties": {
  13727. "disabled": {
  13728. "type": "boolean"
  13729. }
  13730. },
  13731. "additionalProperties": {}
  13732. },
  13733. "description": "Variant-specific configuration"
  13734. }
  13735. },
  13736. "additionalProperties": false
  13737. }
  13738. }
  13739. },
  13740. "additionalProperties": false
  13741. },
  13742. "McpLocalConfig": {
  13743. "type": "object",
  13744. "properties": {
  13745. "type": {
  13746. "type": "string",
  13747. "enum": ["local"],
  13748. "description": "Type of MCP server connection"
  13749. },
  13750. "command": {
  13751. "type": "array",
  13752. "items": {
  13753. "type": "string"
  13754. },
  13755. "description": "Command and arguments to run the MCP server"
  13756. },
  13757. "environment": {
  13758. "type": "object",
  13759. "additionalProperties": {
  13760. "type": "string"
  13761. }
  13762. },
  13763. "enabled": {
  13764. "type": "boolean"
  13765. },
  13766. "timeout": {
  13767. "type": "integer",
  13768. "exclusiveMinimum": 0
  13769. }
  13770. },
  13771. "required": ["type", "command"],
  13772. "additionalProperties": false
  13773. },
  13774. "McpOAuthConfig": {
  13775. "type": "object",
  13776. "properties": {
  13777. "clientId": {
  13778. "type": "string"
  13779. },
  13780. "clientSecret": {
  13781. "type": "string"
  13782. },
  13783. "scope": {
  13784. "type": "string"
  13785. },
  13786. "callbackPort": {
  13787. "type": "integer",
  13788. "minimum": 1,
  13789. "maximum": 65535
  13790. },
  13791. "redirectUri": {
  13792. "type": "string"
  13793. }
  13794. },
  13795. "additionalProperties": false
  13796. },
  13797. "McpRemoteConfig": {
  13798. "type": "object",
  13799. "properties": {
  13800. "type": {
  13801. "type": "string",
  13802. "enum": ["remote"],
  13803. "description": "Type of MCP server connection"
  13804. },
  13805. "url": {
  13806. "type": "string",
  13807. "description": "URL of the remote MCP server"
  13808. },
  13809. "enabled": {
  13810. "type": "boolean"
  13811. },
  13812. "headers": {
  13813. "type": "object",
  13814. "additionalProperties": {
  13815. "type": "string"
  13816. }
  13817. },
  13818. "oauth": {
  13819. "anyOf": [
  13820. {
  13821. "$ref": "#/components/schemas/McpOAuthConfig"
  13822. },
  13823. {
  13824. "type": "boolean",
  13825. "enum": [false]
  13826. }
  13827. ],
  13828. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13829. },
  13830. "timeout": {
  13831. "type": "integer",
  13832. "exclusiveMinimum": 0
  13833. }
  13834. },
  13835. "required": ["type", "url"],
  13836. "additionalProperties": false
  13837. },
  13838. "LayoutConfig": {
  13839. "type": "string",
  13840. "enum": ["auto", "stretch"],
  13841. "description": "@deprecated Always uses stretch layout."
  13842. },
  13843. "ImageAttachmentConfig": {
  13844. "type": "object",
  13845. "properties": {
  13846. "auto_resize": {
  13847. "type": "boolean"
  13848. },
  13849. "max_width": {
  13850. "type": "integer",
  13851. "exclusiveMinimum": 0
  13852. },
  13853. "max_height": {
  13854. "type": "integer",
  13855. "exclusiveMinimum": 0
  13856. },
  13857. "max_base64_bytes": {
  13858. "type": "integer",
  13859. "exclusiveMinimum": 0
  13860. }
  13861. },
  13862. "additionalProperties": false
  13863. },
  13864. "AttachmentConfig": {
  13865. "type": "object",
  13866. "properties": {
  13867. "image": {
  13868. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13869. }
  13870. },
  13871. "additionalProperties": false
  13872. },
  13873. "Config": {
  13874. "type": "object",
  13875. "properties": {
  13876. "$schema": {
  13877. "type": "string"
  13878. },
  13879. "shell": {
  13880. "type": "string"
  13881. },
  13882. "logLevel": {
  13883. "$ref": "#/components/schemas/LogLevel"
  13884. },
  13885. "server": {
  13886. "$ref": "#/components/schemas/ServerConfig"
  13887. },
  13888. "command": {
  13889. "type": "object",
  13890. "additionalProperties": {
  13891. "type": "object",
  13892. "properties": {
  13893. "template": {
  13894. "type": "string"
  13895. },
  13896. "description": {
  13897. "type": "string"
  13898. },
  13899. "agent": {
  13900. "type": "string"
  13901. },
  13902. "model": {
  13903. "type": "string"
  13904. },
  13905. "subtask": {
  13906. "type": "boolean"
  13907. }
  13908. },
  13909. "required": ["template"],
  13910. "additionalProperties": false
  13911. }
  13912. },
  13913. "skills": {
  13914. "type": "object",
  13915. "properties": {
  13916. "paths": {
  13917. "type": "array",
  13918. "items": {
  13919. "type": "string"
  13920. }
  13921. },
  13922. "urls": {
  13923. "type": "array",
  13924. "items": {
  13925. "type": "string"
  13926. }
  13927. }
  13928. },
  13929. "additionalProperties": false
  13930. },
  13931. "reference": {
  13932. "$ref": "#/components/schemas/ReferenceConfig"
  13933. },
  13934. "watcher": {
  13935. "type": "object",
  13936. "properties": {
  13937. "ignore": {
  13938. "type": "array",
  13939. "items": {
  13940. "type": "string"
  13941. }
  13942. }
  13943. },
  13944. "additionalProperties": false
  13945. },
  13946. "snapshot": {
  13947. "type": "boolean"
  13948. },
  13949. "plugin": {
  13950. "type": "array",
  13951. "items": {
  13952. "anyOf": [
  13953. {
  13954. "type": "string"
  13955. },
  13956. {
  13957. "type": "array",
  13958. "prefixItems": [
  13959. {
  13960. "type": "string"
  13961. },
  13962. {
  13963. "type": "object"
  13964. }
  13965. ],
  13966. "maxItems": 2,
  13967. "minItems": 2
  13968. }
  13969. ]
  13970. }
  13971. },
  13972. "share": {
  13973. "type": "string",
  13974. "enum": ["manual", "auto", "disabled"]
  13975. },
  13976. "autoshare": {
  13977. "type": "boolean"
  13978. },
  13979. "autoupdate": {
  13980. "anyOf": [
  13981. {
  13982. "type": "boolean"
  13983. },
  13984. {
  13985. "type": "string",
  13986. "enum": ["notify"]
  13987. }
  13988. ],
  13989. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13990. },
  13991. "disabled_providers": {
  13992. "type": "array",
  13993. "items": {
  13994. "type": "string"
  13995. }
  13996. },
  13997. "enabled_providers": {
  13998. "type": "array",
  13999. "items": {
  14000. "type": "string"
  14001. }
  14002. },
  14003. "model": {
  14004. "type": "string"
  14005. },
  14006. "small_model": {
  14007. "type": "string"
  14008. },
  14009. "default_agent": {
  14010. "type": "string"
  14011. },
  14012. "username": {
  14013. "type": "string"
  14014. },
  14015. "mode": {
  14016. "type": "object",
  14017. "properties": {
  14018. "build": {
  14019. "$ref": "#/components/schemas/AgentConfig"
  14020. },
  14021. "plan": {
  14022. "$ref": "#/components/schemas/AgentConfig"
  14023. }
  14024. },
  14025. "additionalProperties": {
  14026. "$ref": "#/components/schemas/AgentConfig"
  14027. }
  14028. },
  14029. "agent": {
  14030. "type": "object",
  14031. "properties": {
  14032. "plan": {
  14033. "$ref": "#/components/schemas/AgentConfig"
  14034. },
  14035. "build": {
  14036. "$ref": "#/components/schemas/AgentConfig"
  14037. },
  14038. "general": {
  14039. "$ref": "#/components/schemas/AgentConfig"
  14040. },
  14041. "explore": {
  14042. "$ref": "#/components/schemas/AgentConfig"
  14043. },
  14044. "scout": {
  14045. "$ref": "#/components/schemas/AgentConfig"
  14046. },
  14047. "title": {
  14048. "$ref": "#/components/schemas/AgentConfig"
  14049. },
  14050. "summary": {
  14051. "$ref": "#/components/schemas/AgentConfig"
  14052. },
  14053. "compaction": {
  14054. "$ref": "#/components/schemas/AgentConfig"
  14055. }
  14056. },
  14057. "additionalProperties": {
  14058. "$ref": "#/components/schemas/AgentConfig"
  14059. }
  14060. },
  14061. "provider": {
  14062. "type": "object",
  14063. "additionalProperties": {
  14064. "$ref": "#/components/schemas/ProviderConfig"
  14065. }
  14066. },
  14067. "mcp": {
  14068. "type": "object",
  14069. "additionalProperties": {
  14070. "anyOf": [
  14071. {
  14072. "$ref": "#/components/schemas/McpLocalConfig"
  14073. },
  14074. {
  14075. "$ref": "#/components/schemas/McpRemoteConfig"
  14076. },
  14077. {
  14078. "type": "object",
  14079. "properties": {
  14080. "enabled": {
  14081. "type": "boolean"
  14082. }
  14083. },
  14084. "required": ["enabled"],
  14085. "additionalProperties": false
  14086. }
  14087. ]
  14088. }
  14089. },
  14090. "formatter": {
  14091. "anyOf": [
  14092. {
  14093. "type": "boolean"
  14094. },
  14095. {
  14096. "type": "object",
  14097. "additionalProperties": {
  14098. "type": "object",
  14099. "properties": {
  14100. "disabled": {
  14101. "type": "boolean"
  14102. },
  14103. "command": {
  14104. "type": "array",
  14105. "items": {
  14106. "type": "string"
  14107. }
  14108. },
  14109. "environment": {
  14110. "type": "object",
  14111. "additionalProperties": {
  14112. "type": "string"
  14113. }
  14114. },
  14115. "extensions": {
  14116. "type": "array",
  14117. "items": {
  14118. "type": "string"
  14119. }
  14120. }
  14121. },
  14122. "additionalProperties": false
  14123. }
  14124. }
  14125. ],
  14126. "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."
  14127. },
  14128. "lsp": {
  14129. "anyOf": [
  14130. {
  14131. "type": "boolean"
  14132. },
  14133. {
  14134. "type": "object",
  14135. "additionalProperties": {
  14136. "anyOf": [
  14137. {
  14138. "type": "object",
  14139. "properties": {
  14140. "disabled": {
  14141. "type": "boolean",
  14142. "enum": [true]
  14143. }
  14144. },
  14145. "required": ["disabled"],
  14146. "additionalProperties": false
  14147. },
  14148. {
  14149. "type": "object",
  14150. "properties": {
  14151. "command": {
  14152. "type": "array",
  14153. "items": {
  14154. "type": "string"
  14155. }
  14156. },
  14157. "extensions": {
  14158. "type": "array",
  14159. "items": {
  14160. "type": "string"
  14161. }
  14162. },
  14163. "disabled": {
  14164. "type": "boolean"
  14165. },
  14166. "env": {
  14167. "type": "object",
  14168. "additionalProperties": {
  14169. "type": "string"
  14170. }
  14171. },
  14172. "initialization": {
  14173. "type": "object"
  14174. }
  14175. },
  14176. "required": ["command"],
  14177. "additionalProperties": false
  14178. }
  14179. ]
  14180. }
  14181. }
  14182. ],
  14183. "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."
  14184. },
  14185. "instructions": {
  14186. "type": "array",
  14187. "items": {
  14188. "type": "string"
  14189. }
  14190. },
  14191. "layout": {
  14192. "$ref": "#/components/schemas/LayoutConfig"
  14193. },
  14194. "permission": {
  14195. "$ref": "#/components/schemas/PermissionConfig"
  14196. },
  14197. "tools": {
  14198. "type": "object",
  14199. "additionalProperties": {
  14200. "type": "boolean"
  14201. }
  14202. },
  14203. "attachment": {
  14204. "$ref": "#/components/schemas/AttachmentConfig"
  14205. },
  14206. "enterprise": {
  14207. "type": "object",
  14208. "properties": {
  14209. "url": {
  14210. "type": "string"
  14211. }
  14212. },
  14213. "additionalProperties": false
  14214. },
  14215. "tool_output": {
  14216. "type": "object",
  14217. "properties": {
  14218. "max_lines": {
  14219. "type": "integer",
  14220. "exclusiveMinimum": 0
  14221. },
  14222. "max_bytes": {
  14223. "type": "integer",
  14224. "exclusiveMinimum": 0
  14225. }
  14226. },
  14227. "additionalProperties": false
  14228. },
  14229. "compaction": {
  14230. "type": "object",
  14231. "properties": {
  14232. "auto": {
  14233. "type": "boolean"
  14234. },
  14235. "prune": {
  14236. "type": "boolean"
  14237. },
  14238. "tail_turns": {
  14239. "type": "integer",
  14240. "minimum": 0
  14241. },
  14242. "preserve_recent_tokens": {
  14243. "type": "integer",
  14244. "minimum": 0
  14245. },
  14246. "reserved": {
  14247. "type": "integer",
  14248. "minimum": 0
  14249. }
  14250. },
  14251. "additionalProperties": false
  14252. },
  14253. "experimental": {
  14254. "type": "object",
  14255. "properties": {
  14256. "disable_paste_summary": {
  14257. "type": "boolean"
  14258. },
  14259. "batch_tool": {
  14260. "type": "boolean"
  14261. },
  14262. "openTelemetry": {
  14263. "type": "boolean"
  14264. },
  14265. "primary_tools": {
  14266. "type": "array",
  14267. "items": {
  14268. "type": "string"
  14269. }
  14270. },
  14271. "continue_loop_on_deny": {
  14272. "type": "boolean"
  14273. },
  14274. "mcp_timeout": {
  14275. "type": "integer",
  14276. "exclusiveMinimum": 0
  14277. }
  14278. },
  14279. "additionalProperties": false
  14280. }
  14281. },
  14282. "additionalProperties": false
  14283. },
  14284. "Model": {
  14285. "type": "object",
  14286. "properties": {
  14287. "id": {
  14288. "type": "string"
  14289. },
  14290. "providerID": {
  14291. "type": "string"
  14292. },
  14293. "api": {
  14294. "type": "object",
  14295. "properties": {
  14296. "id": {
  14297. "type": "string"
  14298. },
  14299. "url": {
  14300. "type": "string"
  14301. },
  14302. "npm": {
  14303. "type": "string"
  14304. }
  14305. },
  14306. "required": ["id", "url", "npm"],
  14307. "additionalProperties": false
  14308. },
  14309. "name": {
  14310. "type": "string"
  14311. },
  14312. "family": {
  14313. "type": "string"
  14314. },
  14315. "capabilities": {
  14316. "type": "object",
  14317. "properties": {
  14318. "temperature": {
  14319. "type": "boolean"
  14320. },
  14321. "reasoning": {
  14322. "type": "boolean"
  14323. },
  14324. "attachment": {
  14325. "type": "boolean"
  14326. },
  14327. "toolcall": {
  14328. "type": "boolean"
  14329. },
  14330. "input": {
  14331. "type": "object",
  14332. "properties": {
  14333. "text": {
  14334. "type": "boolean"
  14335. },
  14336. "audio": {
  14337. "type": "boolean"
  14338. },
  14339. "image": {
  14340. "type": "boolean"
  14341. },
  14342. "video": {
  14343. "type": "boolean"
  14344. },
  14345. "pdf": {
  14346. "type": "boolean"
  14347. }
  14348. },
  14349. "required": ["text", "audio", "image", "video", "pdf"],
  14350. "additionalProperties": false
  14351. },
  14352. "output": {
  14353. "type": "object",
  14354. "properties": {
  14355. "text": {
  14356. "type": "boolean"
  14357. },
  14358. "audio": {
  14359. "type": "boolean"
  14360. },
  14361. "image": {
  14362. "type": "boolean"
  14363. },
  14364. "video": {
  14365. "type": "boolean"
  14366. },
  14367. "pdf": {
  14368. "type": "boolean"
  14369. }
  14370. },
  14371. "required": ["text", "audio", "image", "video", "pdf"],
  14372. "additionalProperties": false
  14373. },
  14374. "interleaved": {
  14375. "anyOf": [
  14376. {
  14377. "type": "boolean"
  14378. },
  14379. {
  14380. "type": "object",
  14381. "properties": {
  14382. "field": {
  14383. "type": "string",
  14384. "enum": ["reasoning_content", "reasoning_details"]
  14385. }
  14386. },
  14387. "required": ["field"],
  14388. "additionalProperties": false
  14389. }
  14390. ]
  14391. }
  14392. },
  14393. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14394. "additionalProperties": false
  14395. },
  14396. "cost": {
  14397. "type": "object",
  14398. "properties": {
  14399. "input": {
  14400. "type": "number"
  14401. },
  14402. "output": {
  14403. "type": "number"
  14404. },
  14405. "cache": {
  14406. "type": "object",
  14407. "properties": {
  14408. "read": {
  14409. "type": "number"
  14410. },
  14411. "write": {
  14412. "type": "number"
  14413. }
  14414. },
  14415. "required": ["read", "write"],
  14416. "additionalProperties": false
  14417. },
  14418. "tiers": {
  14419. "type": "array",
  14420. "items": {
  14421. "type": "object",
  14422. "properties": {
  14423. "input": {
  14424. "type": "number"
  14425. },
  14426. "output": {
  14427. "type": "number"
  14428. },
  14429. "cache": {
  14430. "type": "object",
  14431. "properties": {
  14432. "read": {
  14433. "type": "number"
  14434. },
  14435. "write": {
  14436. "type": "number"
  14437. }
  14438. },
  14439. "required": ["read", "write"],
  14440. "additionalProperties": false
  14441. },
  14442. "tier": {
  14443. "type": "object",
  14444. "properties": {
  14445. "type": {
  14446. "type": "string",
  14447. "enum": ["context"]
  14448. },
  14449. "size": {
  14450. "type": "number"
  14451. }
  14452. },
  14453. "required": ["type", "size"],
  14454. "additionalProperties": false
  14455. }
  14456. },
  14457. "required": ["input", "output", "cache", "tier"],
  14458. "additionalProperties": false
  14459. }
  14460. },
  14461. "experimentalOver200K": {
  14462. "type": "object",
  14463. "properties": {
  14464. "input": {
  14465. "type": "number"
  14466. },
  14467. "output": {
  14468. "type": "number"
  14469. },
  14470. "cache": {
  14471. "type": "object",
  14472. "properties": {
  14473. "read": {
  14474. "type": "number"
  14475. },
  14476. "write": {
  14477. "type": "number"
  14478. }
  14479. },
  14480. "required": ["read", "write"],
  14481. "additionalProperties": false
  14482. }
  14483. },
  14484. "required": ["input", "output", "cache"],
  14485. "additionalProperties": false
  14486. }
  14487. },
  14488. "required": ["input", "output", "cache"],
  14489. "additionalProperties": false
  14490. },
  14491. "limit": {
  14492. "type": "object",
  14493. "properties": {
  14494. "context": {
  14495. "type": "number"
  14496. },
  14497. "input": {
  14498. "type": "number"
  14499. },
  14500. "output": {
  14501. "type": "number"
  14502. }
  14503. },
  14504. "required": ["context", "output"],
  14505. "additionalProperties": false
  14506. },
  14507. "status": {
  14508. "type": "string",
  14509. "enum": ["alpha", "beta", "deprecated", "active"]
  14510. },
  14511. "options": {
  14512. "type": "object"
  14513. },
  14514. "headers": {
  14515. "type": "object",
  14516. "additionalProperties": {
  14517. "type": "string"
  14518. }
  14519. },
  14520. "release_date": {
  14521. "type": "string"
  14522. },
  14523. "variants": {
  14524. "type": "object",
  14525. "additionalProperties": {
  14526. "type": "object"
  14527. }
  14528. }
  14529. },
  14530. "required": [
  14531. "id",
  14532. "providerID",
  14533. "api",
  14534. "name",
  14535. "capabilities",
  14536. "cost",
  14537. "limit",
  14538. "status",
  14539. "options",
  14540. "headers",
  14541. "release_date"
  14542. ],
  14543. "additionalProperties": false
  14544. },
  14545. "Provider": {
  14546. "type": "object",
  14547. "properties": {
  14548. "id": {
  14549. "type": "string"
  14550. },
  14551. "name": {
  14552. "type": "string"
  14553. },
  14554. "source": {
  14555. "type": "string",
  14556. "enum": ["env", "config", "custom", "api"]
  14557. },
  14558. "env": {
  14559. "type": "array",
  14560. "items": {
  14561. "type": "string"
  14562. }
  14563. },
  14564. "key": {
  14565. "type": "string"
  14566. },
  14567. "options": {
  14568. "type": "object"
  14569. },
  14570. "models": {
  14571. "type": "object",
  14572. "additionalProperties": {
  14573. "$ref": "#/components/schemas/Model"
  14574. }
  14575. }
  14576. },
  14577. "required": ["id", "name", "source", "env", "options", "models"],
  14578. "additionalProperties": false
  14579. },
  14580. "ConsoleState": {
  14581. "type": "object",
  14582. "properties": {
  14583. "consoleManagedProviders": {
  14584. "type": "array",
  14585. "items": {
  14586. "type": "string"
  14587. }
  14588. },
  14589. "activeOrgName": {
  14590. "type": "string"
  14591. },
  14592. "switchableOrgCount": {
  14593. "type": "integer",
  14594. "minimum": 0
  14595. }
  14596. },
  14597. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14598. "additionalProperties": false
  14599. },
  14600. "effect_HttpApiError_InternalServerError": {
  14601. "type": "object",
  14602. "properties": {
  14603. "_tag": {
  14604. "type": "string",
  14605. "enum": ["InternalServerError"]
  14606. }
  14607. },
  14608. "required": ["_tag"],
  14609. "additionalProperties": false
  14610. },
  14611. "ToolListItem": {
  14612. "type": "object",
  14613. "properties": {
  14614. "id": {
  14615. "type": "string"
  14616. },
  14617. "description": {
  14618. "type": "string"
  14619. },
  14620. "parameters": {}
  14621. },
  14622. "required": ["id", "description", "parameters"],
  14623. "additionalProperties": false
  14624. },
  14625. "ToolList": {
  14626. "type": "array",
  14627. "items": {
  14628. "$ref": "#/components/schemas/ToolListItem"
  14629. }
  14630. },
  14631. "ToolIDs": {
  14632. "type": "array",
  14633. "items": {
  14634. "type": "string"
  14635. }
  14636. },
  14637. "WorktreeError": {
  14638. "type": "object",
  14639. "properties": {
  14640. "name": {
  14641. "type": "string",
  14642. "enum": [
  14643. "WorktreeNotGitError",
  14644. "WorktreeNameGenerationFailedError",
  14645. "WorktreeCreateFailedError",
  14646. "WorktreeStartCommandFailedError",
  14647. "WorktreeRemoveFailedError",
  14648. "WorktreeResetFailedError",
  14649. "WorktreeListFailedError"
  14650. ]
  14651. },
  14652. "data": {
  14653. "type": "object",
  14654. "properties": {
  14655. "message": {
  14656. "type": "string"
  14657. }
  14658. },
  14659. "required": ["message"],
  14660. "additionalProperties": false
  14661. }
  14662. },
  14663. "required": ["name", "data"],
  14664. "additionalProperties": false
  14665. },
  14666. "WorktreeCreateInput": {
  14667. "type": "object",
  14668. "properties": {
  14669. "name": {
  14670. "type": "string"
  14671. },
  14672. "startCommand": {
  14673. "type": "string",
  14674. "description": "Additional startup script to run after the project's start command"
  14675. }
  14676. },
  14677. "additionalProperties": false
  14678. },
  14679. "Worktree": {
  14680. "type": "object",
  14681. "properties": {
  14682. "name": {
  14683. "type": "string"
  14684. },
  14685. "branch": {
  14686. "type": "string"
  14687. },
  14688. "directory": {
  14689. "type": "string"
  14690. }
  14691. },
  14692. "required": ["name", "directory"],
  14693. "additionalProperties": false
  14694. },
  14695. "WorktreeRemoveInput": {
  14696. "type": "object",
  14697. "properties": {
  14698. "directory": {
  14699. "type": "string"
  14700. }
  14701. },
  14702. "required": ["directory"],
  14703. "additionalProperties": false
  14704. },
  14705. "WorktreeResetInput": {
  14706. "type": "object",
  14707. "properties": {
  14708. "directory": {
  14709. "type": "string"
  14710. }
  14711. },
  14712. "required": ["directory"],
  14713. "additionalProperties": false
  14714. },
  14715. "ProjectSummary": {
  14716. "type": "object",
  14717. "properties": {
  14718. "id": {
  14719. "type": "string"
  14720. },
  14721. "name": {
  14722. "type": "string"
  14723. },
  14724. "worktree": {
  14725. "type": "string"
  14726. }
  14727. },
  14728. "required": ["id", "worktree"],
  14729. "additionalProperties": false
  14730. },
  14731. "GlobalSession": {
  14732. "type": "object",
  14733. "properties": {
  14734. "id": {
  14735. "type": "string",
  14736. "pattern": "^ses"
  14737. },
  14738. "slug": {
  14739. "type": "string"
  14740. },
  14741. "projectID": {
  14742. "type": "string"
  14743. },
  14744. "workspaceID": {
  14745. "type": "string",
  14746. "pattern": "^wrk"
  14747. },
  14748. "directory": {
  14749. "type": "string"
  14750. },
  14751. "path": {
  14752. "type": "string"
  14753. },
  14754. "parentID": {
  14755. "type": "string",
  14756. "pattern": "^ses"
  14757. },
  14758. "summary": {
  14759. "type": "object",
  14760. "properties": {
  14761. "additions": {
  14762. "type": "number"
  14763. },
  14764. "deletions": {
  14765. "type": "number"
  14766. },
  14767. "files": {
  14768. "type": "number"
  14769. },
  14770. "diffs": {
  14771. "type": "array",
  14772. "items": {
  14773. "$ref": "#/components/schemas/SnapshotFileDiff"
  14774. }
  14775. }
  14776. },
  14777. "required": ["additions", "deletions", "files"],
  14778. "additionalProperties": false
  14779. },
  14780. "cost": {
  14781. "type": "number"
  14782. },
  14783. "tokens": {
  14784. "type": "object",
  14785. "properties": {
  14786. "input": {
  14787. "type": "number"
  14788. },
  14789. "output": {
  14790. "type": "number"
  14791. },
  14792. "reasoning": {
  14793. "type": "number"
  14794. },
  14795. "cache": {
  14796. "type": "object",
  14797. "properties": {
  14798. "read": {
  14799. "type": "number"
  14800. },
  14801. "write": {
  14802. "type": "number"
  14803. }
  14804. },
  14805. "required": ["read", "write"],
  14806. "additionalProperties": false
  14807. }
  14808. },
  14809. "required": ["input", "output", "reasoning", "cache"],
  14810. "additionalProperties": false
  14811. },
  14812. "share": {
  14813. "type": "object",
  14814. "properties": {
  14815. "url": {
  14816. "type": "string"
  14817. }
  14818. },
  14819. "required": ["url"],
  14820. "additionalProperties": false
  14821. },
  14822. "title": {
  14823. "type": "string"
  14824. },
  14825. "agent": {
  14826. "type": "string"
  14827. },
  14828. "model": {
  14829. "type": "object",
  14830. "properties": {
  14831. "id": {
  14832. "type": "string"
  14833. },
  14834. "providerID": {
  14835. "type": "string"
  14836. },
  14837. "variant": {
  14838. "type": "string"
  14839. }
  14840. },
  14841. "required": ["id", "providerID"],
  14842. "additionalProperties": false
  14843. },
  14844. "version": {
  14845. "type": "string"
  14846. },
  14847. "time": {
  14848. "type": "object",
  14849. "properties": {
  14850. "created": {
  14851. "type": "integer",
  14852. "minimum": 0
  14853. },
  14854. "updated": {
  14855. "type": "integer",
  14856. "minimum": 0
  14857. },
  14858. "compacting": {
  14859. "type": "integer",
  14860. "minimum": 0
  14861. },
  14862. "archived": {
  14863. "type": "number"
  14864. }
  14865. },
  14866. "required": ["created", "updated"],
  14867. "additionalProperties": false
  14868. },
  14869. "permission": {
  14870. "$ref": "#/components/schemas/PermissionRuleset"
  14871. },
  14872. "revert": {
  14873. "type": "object",
  14874. "properties": {
  14875. "messageID": {
  14876. "type": "string",
  14877. "pattern": "^msg"
  14878. },
  14879. "partID": {
  14880. "type": "string",
  14881. "pattern": "^prt"
  14882. },
  14883. "snapshot": {
  14884. "type": "string"
  14885. },
  14886. "diff": {
  14887. "type": "string"
  14888. }
  14889. },
  14890. "required": ["messageID"],
  14891. "additionalProperties": false
  14892. },
  14893. "project": {
  14894. "anyOf": [
  14895. {
  14896. "$ref": "#/components/schemas/ProjectSummary"
  14897. },
  14898. {
  14899. "type": "null"
  14900. }
  14901. ]
  14902. }
  14903. },
  14904. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14905. "additionalProperties": false
  14906. },
  14907. "McpResource": {
  14908. "type": "object",
  14909. "properties": {
  14910. "name": {
  14911. "type": "string"
  14912. },
  14913. "uri": {
  14914. "type": "string"
  14915. },
  14916. "description": {
  14917. "type": "string"
  14918. },
  14919. "mimeType": {
  14920. "type": "string"
  14921. },
  14922. "client": {
  14923. "type": "string"
  14924. }
  14925. },
  14926. "required": ["name", "uri", "client"],
  14927. "additionalProperties": false
  14928. },
  14929. "Symbol": {
  14930. "type": "object",
  14931. "properties": {
  14932. "name": {
  14933. "type": "string"
  14934. },
  14935. "kind": {
  14936. "type": "integer",
  14937. "minimum": 0
  14938. },
  14939. "location": {
  14940. "type": "object",
  14941. "properties": {
  14942. "uri": {
  14943. "type": "string"
  14944. },
  14945. "range": {
  14946. "$ref": "#/components/schemas/Range"
  14947. }
  14948. },
  14949. "required": ["uri", "range"],
  14950. "additionalProperties": false
  14951. }
  14952. },
  14953. "required": ["name", "kind", "location"],
  14954. "additionalProperties": false
  14955. },
  14956. "FileNode": {
  14957. "type": "object",
  14958. "properties": {
  14959. "name": {
  14960. "type": "string"
  14961. },
  14962. "path": {
  14963. "type": "string"
  14964. },
  14965. "absolute": {
  14966. "type": "string"
  14967. },
  14968. "type": {
  14969. "type": "string",
  14970. "enum": ["file", "directory"]
  14971. },
  14972. "ignored": {
  14973. "type": "boolean"
  14974. }
  14975. },
  14976. "required": ["name", "path", "absolute", "type", "ignored"],
  14977. "additionalProperties": false
  14978. },
  14979. "FileContent": {
  14980. "type": "object",
  14981. "properties": {
  14982. "type": {
  14983. "type": "string",
  14984. "enum": ["text", "binary"]
  14985. },
  14986. "content": {
  14987. "type": "string"
  14988. },
  14989. "diff": {
  14990. "type": "string"
  14991. },
  14992. "patch": {
  14993. "type": "object",
  14994. "properties": {
  14995. "oldFileName": {
  14996. "type": "string"
  14997. },
  14998. "newFileName": {
  14999. "type": "string"
  15000. },
  15001. "oldHeader": {
  15002. "type": "string"
  15003. },
  15004. "newHeader": {
  15005. "type": "string"
  15006. },
  15007. "hunks": {
  15008. "type": "array",
  15009. "items": {
  15010. "type": "object",
  15011. "properties": {
  15012. "oldStart": {
  15013. "type": "integer",
  15014. "minimum": 0
  15015. },
  15016. "oldLines": {
  15017. "type": "integer",
  15018. "minimum": 0
  15019. },
  15020. "newStart": {
  15021. "type": "integer",
  15022. "minimum": 0
  15023. },
  15024. "newLines": {
  15025. "type": "integer",
  15026. "minimum": 0
  15027. },
  15028. "lines": {
  15029. "type": "array",
  15030. "items": {
  15031. "type": "string"
  15032. }
  15033. }
  15034. },
  15035. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15036. "additionalProperties": false
  15037. }
  15038. },
  15039. "index": {
  15040. "type": "string"
  15041. }
  15042. },
  15043. "required": ["oldFileName", "newFileName", "hunks"],
  15044. "additionalProperties": false
  15045. },
  15046. "encoding": {
  15047. "type": "string",
  15048. "enum": ["base64"]
  15049. },
  15050. "mimeType": {
  15051. "type": "string"
  15052. }
  15053. },
  15054. "required": ["type", "content"],
  15055. "additionalProperties": false
  15056. },
  15057. "File": {
  15058. "type": "object",
  15059. "properties": {
  15060. "path": {
  15061. "type": "string"
  15062. },
  15063. "added": {
  15064. "type": "integer",
  15065. "minimum": 0
  15066. },
  15067. "removed": {
  15068. "type": "integer",
  15069. "minimum": 0
  15070. },
  15071. "status": {
  15072. "type": "string",
  15073. "enum": ["added", "deleted", "modified"]
  15074. }
  15075. },
  15076. "required": ["path", "added", "removed", "status"],
  15077. "additionalProperties": false
  15078. },
  15079. "Path": {
  15080. "type": "object",
  15081. "properties": {
  15082. "home": {
  15083. "type": "string"
  15084. },
  15085. "state": {
  15086. "type": "string"
  15087. },
  15088. "config": {
  15089. "type": "string"
  15090. },
  15091. "worktree": {
  15092. "type": "string"
  15093. },
  15094. "directory": {
  15095. "type": "string"
  15096. }
  15097. },
  15098. "required": ["home", "state", "config", "worktree", "directory"],
  15099. "additionalProperties": false
  15100. },
  15101. "VcsInfo": {
  15102. "type": "object",
  15103. "properties": {
  15104. "branch": {
  15105. "type": "string"
  15106. },
  15107. "default_branch": {
  15108. "type": "string"
  15109. }
  15110. },
  15111. "additionalProperties": false
  15112. },
  15113. "VcsFileStatus": {
  15114. "type": "object",
  15115. "properties": {
  15116. "file": {
  15117. "type": "string"
  15118. },
  15119. "additions": {
  15120. "type": "number"
  15121. },
  15122. "deletions": {
  15123. "type": "number"
  15124. },
  15125. "status": {
  15126. "type": "string",
  15127. "enum": ["added", "deleted", "modified"]
  15128. }
  15129. },
  15130. "required": ["file", "additions", "deletions", "status"],
  15131. "additionalProperties": false
  15132. },
  15133. "VcsFileDiff": {
  15134. "type": "object",
  15135. "properties": {
  15136. "file": {
  15137. "type": "string"
  15138. },
  15139. "patch": {
  15140. "type": "string"
  15141. },
  15142. "additions": {
  15143. "type": "number"
  15144. },
  15145. "deletions": {
  15146. "type": "number"
  15147. },
  15148. "status": {
  15149. "type": "string",
  15150. "enum": ["added", "deleted", "modified"]
  15151. }
  15152. },
  15153. "required": ["file", "additions", "deletions"],
  15154. "additionalProperties": false
  15155. },
  15156. "VcsApplyError": {
  15157. "type": "object",
  15158. "properties": {
  15159. "name": {
  15160. "type": "string",
  15161. "enum": ["VcsApplyError"]
  15162. },
  15163. "data": {
  15164. "type": "object",
  15165. "properties": {
  15166. "message": {
  15167. "type": "string"
  15168. },
  15169. "reason": {
  15170. "type": "string",
  15171. "enum": ["non-git", "not-clean"]
  15172. }
  15173. },
  15174. "required": ["message", "reason"],
  15175. "additionalProperties": false
  15176. }
  15177. },
  15178. "required": ["name", "data"],
  15179. "additionalProperties": false
  15180. },
  15181. "Command": {
  15182. "type": "object",
  15183. "properties": {
  15184. "name": {
  15185. "type": "string"
  15186. },
  15187. "description": {
  15188. "type": "string"
  15189. },
  15190. "agent": {
  15191. "type": "string"
  15192. },
  15193. "model": {
  15194. "type": "string"
  15195. },
  15196. "source": {
  15197. "type": "string",
  15198. "enum": ["command", "mcp", "skill"]
  15199. },
  15200. "template": {
  15201. "type": "string"
  15202. },
  15203. "subtask": {
  15204. "type": "boolean"
  15205. },
  15206. "hints": {
  15207. "type": "array",
  15208. "items": {
  15209. "type": "string"
  15210. }
  15211. }
  15212. },
  15213. "required": ["name", "template", "hints"],
  15214. "additionalProperties": false
  15215. },
  15216. "Agent": {
  15217. "type": "object",
  15218. "properties": {
  15219. "name": {
  15220. "type": "string"
  15221. },
  15222. "description": {
  15223. "type": "string"
  15224. },
  15225. "mode": {
  15226. "type": "string",
  15227. "enum": ["subagent", "primary", "all"]
  15228. },
  15229. "native": {
  15230. "type": "boolean"
  15231. },
  15232. "hidden": {
  15233. "type": "boolean"
  15234. },
  15235. "topP": {
  15236. "type": "number"
  15237. },
  15238. "temperature": {
  15239. "type": "number"
  15240. },
  15241. "color": {
  15242. "type": "string"
  15243. },
  15244. "permission": {
  15245. "$ref": "#/components/schemas/PermissionRuleset"
  15246. },
  15247. "model": {
  15248. "type": "object",
  15249. "properties": {
  15250. "modelID": {
  15251. "type": "string"
  15252. },
  15253. "providerID": {
  15254. "type": "string"
  15255. }
  15256. },
  15257. "required": ["modelID", "providerID"],
  15258. "additionalProperties": false
  15259. },
  15260. "variant": {
  15261. "type": "string"
  15262. },
  15263. "prompt": {
  15264. "type": "string"
  15265. },
  15266. "options": {
  15267. "type": "object"
  15268. },
  15269. "steps": {
  15270. "type": "number"
  15271. }
  15272. },
  15273. "required": ["name", "mode", "permission", "options"],
  15274. "additionalProperties": false
  15275. },
  15276. "LSPStatus": {
  15277. "type": "object",
  15278. "properties": {
  15279. "id": {
  15280. "type": "string"
  15281. },
  15282. "name": {
  15283. "type": "string"
  15284. },
  15285. "root": {
  15286. "type": "string"
  15287. },
  15288. "status": {
  15289. "type": "string",
  15290. "enum": ["connected", "error"]
  15291. }
  15292. },
  15293. "required": ["id", "name", "root", "status"],
  15294. "additionalProperties": false
  15295. },
  15296. "FormatterStatus": {
  15297. "type": "object",
  15298. "properties": {
  15299. "name": {
  15300. "type": "string"
  15301. },
  15302. "extensions": {
  15303. "type": "array",
  15304. "items": {
  15305. "type": "string"
  15306. }
  15307. },
  15308. "enabled": {
  15309. "type": "boolean"
  15310. }
  15311. },
  15312. "required": ["name", "extensions", "enabled"],
  15313. "additionalProperties": false
  15314. },
  15315. "MCPStatusConnected": {
  15316. "type": "object",
  15317. "properties": {
  15318. "status": {
  15319. "type": "string",
  15320. "enum": ["connected"]
  15321. }
  15322. },
  15323. "required": ["status"],
  15324. "additionalProperties": false
  15325. },
  15326. "MCPStatusDisabled": {
  15327. "type": "object",
  15328. "properties": {
  15329. "status": {
  15330. "type": "string",
  15331. "enum": ["disabled"]
  15332. }
  15333. },
  15334. "required": ["status"],
  15335. "additionalProperties": false
  15336. },
  15337. "MCPStatusFailed": {
  15338. "type": "object",
  15339. "properties": {
  15340. "status": {
  15341. "type": "string",
  15342. "enum": ["failed"]
  15343. },
  15344. "error": {
  15345. "type": "string"
  15346. }
  15347. },
  15348. "required": ["status", "error"],
  15349. "additionalProperties": false
  15350. },
  15351. "MCPStatusNeedsAuth": {
  15352. "type": "object",
  15353. "properties": {
  15354. "status": {
  15355. "type": "string",
  15356. "enum": ["needs_auth"]
  15357. }
  15358. },
  15359. "required": ["status"],
  15360. "additionalProperties": false
  15361. },
  15362. "MCPStatusNeedsClientRegistration": {
  15363. "type": "object",
  15364. "properties": {
  15365. "status": {
  15366. "type": "string",
  15367. "enum": ["needs_client_registration"]
  15368. },
  15369. "error": {
  15370. "type": "string"
  15371. }
  15372. },
  15373. "required": ["status", "error"],
  15374. "additionalProperties": false
  15375. },
  15376. "MCPStatus": {
  15377. "anyOf": [
  15378. {
  15379. "$ref": "#/components/schemas/MCPStatusConnected"
  15380. },
  15381. {
  15382. "$ref": "#/components/schemas/MCPStatusDisabled"
  15383. },
  15384. {
  15385. "$ref": "#/components/schemas/MCPStatusFailed"
  15386. },
  15387. {
  15388. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15389. },
  15390. {
  15391. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15392. }
  15393. ]
  15394. },
  15395. "McpUnsupportedOAuthError": {
  15396. "type": "object",
  15397. "properties": {
  15398. "error": {
  15399. "type": "string"
  15400. }
  15401. },
  15402. "required": ["error"],
  15403. "additionalProperties": false
  15404. },
  15405. "McpServerNotFoundError": {
  15406. "type": "object",
  15407. "properties": {
  15408. "_tag": {
  15409. "type": "string",
  15410. "enum": ["McpServerNotFoundError"]
  15411. },
  15412. "name": {
  15413. "type": "string"
  15414. },
  15415. "message": {
  15416. "type": "string"
  15417. }
  15418. },
  15419. "required": ["_tag", "name", "message"],
  15420. "additionalProperties": false
  15421. },
  15422. "NotFoundError": {
  15423. "type": "object",
  15424. "required": ["name", "data"],
  15425. "properties": {
  15426. "name": {
  15427. "type": "string",
  15428. "enum": ["NotFoundError"]
  15429. },
  15430. "data": {
  15431. "type": "object",
  15432. "required": ["message"],
  15433. "properties": {
  15434. "message": {
  15435. "type": "string"
  15436. }
  15437. }
  15438. }
  15439. }
  15440. },
  15441. "effect_HttpApiError_Forbidden": {
  15442. "type": "object",
  15443. "properties": {
  15444. "_tag": {
  15445. "type": "string",
  15446. "enum": ["Forbidden"]
  15447. }
  15448. },
  15449. "required": ["_tag"],
  15450. "additionalProperties": false
  15451. },
  15452. "QuestionNotFoundError": {
  15453. "type": "object",
  15454. "properties": {
  15455. "_tag": {
  15456. "type": "string",
  15457. "enum": ["QuestionNotFoundError"]
  15458. },
  15459. "requestID": {
  15460. "type": "string"
  15461. },
  15462. "message": {
  15463. "type": "string"
  15464. }
  15465. },
  15466. "required": ["_tag", "requestID", "message"],
  15467. "additionalProperties": false
  15468. },
  15469. "PermissionNotFoundError": {
  15470. "type": "object",
  15471. "properties": {
  15472. "_tag": {
  15473. "type": "string",
  15474. "enum": ["PermissionNotFoundError"]
  15475. },
  15476. "requestID": {
  15477. "type": "string"
  15478. },
  15479. "message": {
  15480. "type": "string"
  15481. }
  15482. },
  15483. "required": ["_tag", "requestID", "message"],
  15484. "additionalProperties": false
  15485. },
  15486. "ProviderAuthMethod": {
  15487. "type": "object",
  15488. "properties": {
  15489. "type": {
  15490. "type": "string",
  15491. "enum": ["oauth", "api"]
  15492. },
  15493. "label": {
  15494. "type": "string"
  15495. },
  15496. "prompts": {
  15497. "type": "array",
  15498. "items": {
  15499. "anyOf": [
  15500. {
  15501. "type": "object",
  15502. "properties": {
  15503. "type": {
  15504. "type": "string",
  15505. "enum": ["text"]
  15506. },
  15507. "key": {
  15508. "type": "string"
  15509. },
  15510. "message": {
  15511. "type": "string"
  15512. },
  15513. "placeholder": {
  15514. "type": "string"
  15515. },
  15516. "when": {
  15517. "type": "object",
  15518. "properties": {
  15519. "key": {
  15520. "type": "string"
  15521. },
  15522. "op": {
  15523. "type": "string",
  15524. "enum": ["eq", "neq"]
  15525. },
  15526. "value": {
  15527. "type": "string"
  15528. }
  15529. },
  15530. "required": ["key", "op", "value"],
  15531. "additionalProperties": false
  15532. }
  15533. },
  15534. "required": ["type", "key", "message"],
  15535. "additionalProperties": false
  15536. },
  15537. {
  15538. "type": "object",
  15539. "properties": {
  15540. "type": {
  15541. "type": "string",
  15542. "enum": ["select"]
  15543. },
  15544. "key": {
  15545. "type": "string"
  15546. },
  15547. "message": {
  15548. "type": "string"
  15549. },
  15550. "options": {
  15551. "type": "array",
  15552. "items": {
  15553. "type": "object",
  15554. "properties": {
  15555. "label": {
  15556. "type": "string"
  15557. },
  15558. "value": {
  15559. "type": "string"
  15560. },
  15561. "hint": {
  15562. "type": "string"
  15563. }
  15564. },
  15565. "required": ["label", "value"],
  15566. "additionalProperties": false
  15567. }
  15568. },
  15569. "when": {
  15570. "type": "object",
  15571. "properties": {
  15572. "key": {
  15573. "type": "string"
  15574. },
  15575. "op": {
  15576. "type": "string",
  15577. "enum": ["eq", "neq"]
  15578. },
  15579. "value": {
  15580. "type": "string"
  15581. }
  15582. },
  15583. "required": ["key", "op", "value"],
  15584. "additionalProperties": false
  15585. }
  15586. },
  15587. "required": ["type", "key", "message", "options"],
  15588. "additionalProperties": false
  15589. }
  15590. ]
  15591. }
  15592. }
  15593. },
  15594. "required": ["type", "label"],
  15595. "additionalProperties": false
  15596. },
  15597. "ProviderAuthAuthorization": {
  15598. "type": "object",
  15599. "properties": {
  15600. "url": {
  15601. "type": "string"
  15602. },
  15603. "method": {
  15604. "type": "string",
  15605. "enum": ["auto", "code"]
  15606. },
  15607. "instructions": {
  15608. "type": "string"
  15609. }
  15610. },
  15611. "required": ["url", "method", "instructions"],
  15612. "additionalProperties": false
  15613. },
  15614. "ProviderAuthError1": {
  15615. "type": "object",
  15616. "properties": {
  15617. "name": {
  15618. "type": "string",
  15619. "enum": [
  15620. "BadRequest",
  15621. "ProviderAuthOauthMissing",
  15622. "ProviderAuthOauthCodeMissing",
  15623. "ProviderAuthOauthCallbackFailed",
  15624. "ProviderAuthValidationFailed"
  15625. ]
  15626. },
  15627. "data": {
  15628. "type": "object",
  15629. "properties": {
  15630. "providerID": {
  15631. "type": "string"
  15632. },
  15633. "field": {
  15634. "type": "string"
  15635. },
  15636. "message": {
  15637. "type": "string"
  15638. },
  15639. "kind": {
  15640. "type": "string"
  15641. }
  15642. },
  15643. "additionalProperties": false
  15644. }
  15645. },
  15646. "required": ["name", "data"],
  15647. "additionalProperties": false
  15648. },
  15649. "TextPartInput": {
  15650. "type": "object",
  15651. "properties": {
  15652. "id": {
  15653. "type": "string",
  15654. "pattern": "^prt"
  15655. },
  15656. "type": {
  15657. "type": "string",
  15658. "enum": ["text"]
  15659. },
  15660. "text": {
  15661. "type": "string"
  15662. },
  15663. "synthetic": {
  15664. "type": "boolean"
  15665. },
  15666. "ignored": {
  15667. "type": "boolean"
  15668. },
  15669. "time": {
  15670. "type": "object",
  15671. "properties": {
  15672. "start": {
  15673. "type": "integer",
  15674. "minimum": 0
  15675. },
  15676. "end": {
  15677. "type": "integer",
  15678. "minimum": 0
  15679. }
  15680. },
  15681. "required": ["start"],
  15682. "additionalProperties": false
  15683. },
  15684. "metadata": {
  15685. "type": "object"
  15686. }
  15687. },
  15688. "required": ["type", "text"],
  15689. "additionalProperties": false
  15690. },
  15691. "FilePartInput": {
  15692. "type": "object",
  15693. "properties": {
  15694. "id": {
  15695. "type": "string",
  15696. "pattern": "^prt"
  15697. },
  15698. "type": {
  15699. "type": "string",
  15700. "enum": ["file"]
  15701. },
  15702. "mime": {
  15703. "type": "string"
  15704. },
  15705. "filename": {
  15706. "type": "string"
  15707. },
  15708. "url": {
  15709. "type": "string"
  15710. },
  15711. "source": {
  15712. "$ref": "#/components/schemas/FilePartSource"
  15713. }
  15714. },
  15715. "required": ["type", "mime", "url"],
  15716. "additionalProperties": false
  15717. },
  15718. "AgentPartInput": {
  15719. "type": "object",
  15720. "properties": {
  15721. "id": {
  15722. "type": "string",
  15723. "pattern": "^prt"
  15724. },
  15725. "type": {
  15726. "type": "string",
  15727. "enum": ["agent"]
  15728. },
  15729. "name": {
  15730. "type": "string"
  15731. },
  15732. "source": {
  15733. "type": "object",
  15734. "properties": {
  15735. "value": {
  15736. "type": "string"
  15737. },
  15738. "start": {
  15739. "type": "integer",
  15740. "minimum": 0
  15741. },
  15742. "end": {
  15743. "type": "integer",
  15744. "minimum": 0
  15745. }
  15746. },
  15747. "required": ["value", "start", "end"],
  15748. "additionalProperties": false
  15749. }
  15750. },
  15751. "required": ["type", "name"],
  15752. "additionalProperties": false
  15753. },
  15754. "SubtaskPartInput": {
  15755. "type": "object",
  15756. "properties": {
  15757. "id": {
  15758. "type": "string",
  15759. "pattern": "^prt"
  15760. },
  15761. "type": {
  15762. "type": "string",
  15763. "enum": ["subtask"]
  15764. },
  15765. "prompt": {
  15766. "type": "string"
  15767. },
  15768. "description": {
  15769. "type": "string"
  15770. },
  15771. "agent": {
  15772. "type": "string"
  15773. },
  15774. "model": {
  15775. "type": "object",
  15776. "properties": {
  15777. "providerID": {
  15778. "type": "string"
  15779. },
  15780. "modelID": {
  15781. "type": "string"
  15782. }
  15783. },
  15784. "required": ["providerID", "modelID"],
  15785. "additionalProperties": false
  15786. },
  15787. "command": {
  15788. "type": "string"
  15789. }
  15790. },
  15791. "required": ["type", "prompt", "description", "agent"],
  15792. "additionalProperties": false
  15793. },
  15794. "SessionBusyError": {
  15795. "type": "object",
  15796. "properties": {
  15797. "_tag": {
  15798. "type": "string",
  15799. "enum": ["SessionBusyError"]
  15800. },
  15801. "sessionID": {
  15802. "type": "string"
  15803. },
  15804. "message": {
  15805. "type": "string"
  15806. }
  15807. },
  15808. "required": ["_tag", "sessionID", "message"],
  15809. "additionalProperties": false
  15810. },
  15811. "V2SessionsResponse": {
  15812. "type": "object",
  15813. "properties": {
  15814. "items": {
  15815. "type": "array",
  15816. "items": {
  15817. "$ref": "#/components/schemas/SessionInfo"
  15818. }
  15819. },
  15820. "cursor": {
  15821. "type": "object",
  15822. "properties": {
  15823. "previous": {
  15824. "type": "string"
  15825. },
  15826. "next": {
  15827. "type": "string"
  15828. }
  15829. },
  15830. "additionalProperties": false
  15831. }
  15832. },
  15833. "required": ["items", "cursor"],
  15834. "additionalProperties": false
  15835. },
  15836. "InvalidCursorError": {
  15837. "type": "object",
  15838. "properties": {
  15839. "_tag": {
  15840. "type": "string",
  15841. "enum": ["InvalidCursorError"]
  15842. },
  15843. "message": {
  15844. "type": "string"
  15845. }
  15846. },
  15847. "required": ["_tag", "message"],
  15848. "additionalProperties": false
  15849. },
  15850. "UnauthorizedError": {
  15851. "type": "object",
  15852. "properties": {
  15853. "_tag": {
  15854. "type": "string",
  15855. "enum": ["UnauthorizedError"]
  15856. },
  15857. "message": {
  15858. "type": "string"
  15859. }
  15860. },
  15861. "required": ["_tag", "message"],
  15862. "additionalProperties": false
  15863. },
  15864. "SessionNotFoundError": {
  15865. "type": "object",
  15866. "properties": {
  15867. "_tag": {
  15868. "type": "string",
  15869. "enum": ["SessionNotFoundError"]
  15870. },
  15871. "sessionID": {
  15872. "type": "string"
  15873. },
  15874. "message": {
  15875. "type": "string"
  15876. }
  15877. },
  15878. "required": ["_tag", "sessionID", "message"],
  15879. "additionalProperties": false
  15880. },
  15881. "ServiceUnavailableError": {
  15882. "type": "object",
  15883. "properties": {
  15884. "_tag": {
  15885. "type": "string",
  15886. "enum": ["ServiceUnavailableError"]
  15887. },
  15888. "message": {
  15889. "type": "string"
  15890. },
  15891. "service": {
  15892. "type": "string"
  15893. }
  15894. },
  15895. "required": ["_tag", "message"],
  15896. "additionalProperties": false
  15897. },
  15898. "UnknownError1": {
  15899. "type": "object",
  15900. "properties": {
  15901. "_tag": {
  15902. "type": "string",
  15903. "enum": ["UnknownError"]
  15904. },
  15905. "message": {
  15906. "type": "string"
  15907. },
  15908. "ref": {
  15909. "type": "string"
  15910. }
  15911. },
  15912. "required": ["_tag", "message"],
  15913. "additionalProperties": false
  15914. },
  15915. "V2SessionMessagesResponse": {
  15916. "type": "object",
  15917. "properties": {
  15918. "items": {
  15919. "type": "array",
  15920. "items": {
  15921. "$ref": "#/components/schemas/SessionMessage"
  15922. }
  15923. },
  15924. "cursor": {
  15925. "type": "object",
  15926. "properties": {
  15927. "previous": {
  15928. "type": "string"
  15929. },
  15930. "next": {
  15931. "type": "string"
  15932. }
  15933. },
  15934. "additionalProperties": false
  15935. }
  15936. },
  15937. "required": ["items", "cursor"],
  15938. "additionalProperties": false
  15939. },
  15940. "ProviderNotFoundError": {
  15941. "type": "object",
  15942. "properties": {
  15943. "_tag": {
  15944. "type": "string",
  15945. "enum": ["ProviderNotFoundError"]
  15946. },
  15947. "providerID": {
  15948. "type": "string"
  15949. },
  15950. "message": {
  15951. "type": "string"
  15952. }
  15953. },
  15954. "required": ["_tag", "providerID", "message"],
  15955. "additionalProperties": false
  15956. },
  15957. "EventTuiPromptAppend": {
  15958. "type": "object",
  15959. "properties": {
  15960. "type": {
  15961. "type": "string",
  15962. "enum": ["tui.prompt.append"]
  15963. },
  15964. "properties": {
  15965. "type": "object",
  15966. "properties": {
  15967. "text": {
  15968. "type": "string"
  15969. }
  15970. },
  15971. "required": ["text"],
  15972. "additionalProperties": false
  15973. }
  15974. },
  15975. "required": ["type", "properties"],
  15976. "additionalProperties": false
  15977. },
  15978. "EventTuiCommandExecute": {
  15979. "type": "object",
  15980. "properties": {
  15981. "type": {
  15982. "type": "string",
  15983. "enum": ["tui.command.execute"]
  15984. },
  15985. "properties": {
  15986. "type": "object",
  15987. "properties": {
  15988. "command": {
  15989. "anyOf": [
  15990. {
  15991. "type": "string",
  15992. "enum": [
  15993. "session.list",
  15994. "session.new",
  15995. "session.share",
  15996. "session.interrupt",
  15997. "session.compact",
  15998. "session.page.up",
  15999. "session.page.down",
  16000. "session.line.up",
  16001. "session.line.down",
  16002. "session.half.page.up",
  16003. "session.half.page.down",
  16004. "session.first",
  16005. "session.last",
  16006. "prompt.clear",
  16007. "prompt.submit",
  16008. "agent.cycle"
  16009. ]
  16010. },
  16011. {
  16012. "type": "string"
  16013. }
  16014. ]
  16015. }
  16016. },
  16017. "required": ["command"],
  16018. "additionalProperties": false
  16019. }
  16020. },
  16021. "required": ["type", "properties"],
  16022. "additionalProperties": false
  16023. },
  16024. "EventTuiToastShow": {
  16025. "type": "object",
  16026. "properties": {
  16027. "type": {
  16028. "type": "string",
  16029. "enum": ["tui.toast.show"]
  16030. },
  16031. "properties": {
  16032. "type": "object",
  16033. "properties": {
  16034. "title": {
  16035. "type": "string"
  16036. },
  16037. "message": {
  16038. "type": "string"
  16039. },
  16040. "variant": {
  16041. "type": "string",
  16042. "enum": ["info", "success", "warning", "error"]
  16043. },
  16044. "duration": {
  16045. "type": "integer",
  16046. "exclusiveMinimum": 0
  16047. }
  16048. },
  16049. "required": ["message", "variant"],
  16050. "additionalProperties": false
  16051. }
  16052. },
  16053. "required": ["type", "properties"],
  16054. "additionalProperties": false
  16055. },
  16056. "EventTuiSessionSelect": {
  16057. "type": "object",
  16058. "properties": {
  16059. "type": {
  16060. "type": "string",
  16061. "enum": ["tui.session.select"]
  16062. },
  16063. "properties": {
  16064. "type": "object",
  16065. "properties": {
  16066. "sessionID": {
  16067. "type": "string",
  16068. "pattern": "^ses",
  16069. "description": "Session ID to navigate to"
  16070. }
  16071. },
  16072. "required": ["sessionID"],
  16073. "additionalProperties": false
  16074. }
  16075. },
  16076. "required": ["type", "properties"],
  16077. "additionalProperties": false
  16078. },
  16079. "Workspace": {
  16080. "type": "object",
  16081. "properties": {
  16082. "id": {
  16083. "type": "string",
  16084. "pattern": "^wrk"
  16085. },
  16086. "type": {
  16087. "type": "string"
  16088. },
  16089. "name": {
  16090. "type": "string"
  16091. },
  16092. "branch": {
  16093. "anyOf": [
  16094. {
  16095. "type": "string"
  16096. },
  16097. {
  16098. "type": "null"
  16099. }
  16100. ]
  16101. },
  16102. "directory": {
  16103. "anyOf": [
  16104. {
  16105. "type": "string"
  16106. },
  16107. {
  16108. "type": "null"
  16109. }
  16110. ]
  16111. },
  16112. "extra": {
  16113. "anyOf": [
  16114. {},
  16115. {
  16116. "type": "null"
  16117. }
  16118. ]
  16119. },
  16120. "projectID": {
  16121. "type": "string"
  16122. },
  16123. "timeUsed": {
  16124. "anyOf": [
  16125. {
  16126. "type": "number"
  16127. },
  16128. {
  16129. "type": "string",
  16130. "enum": ["NaN"]
  16131. },
  16132. {
  16133. "type": "string",
  16134. "enum": ["Infinity"]
  16135. },
  16136. {
  16137. "type": "string",
  16138. "enum": ["-Infinity"]
  16139. },
  16140. {
  16141. "type": "string",
  16142. "enum": ["Infinity", "-Infinity", "NaN"]
  16143. }
  16144. ]
  16145. }
  16146. },
  16147. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16148. "additionalProperties": false
  16149. },
  16150. "WorkspaceWarpError": {
  16151. "type": "object",
  16152. "properties": {
  16153. "name": {
  16154. "type": "string",
  16155. "enum": ["WorkspaceWarpError"]
  16156. },
  16157. "data": {
  16158. "type": "object",
  16159. "properties": {
  16160. "message": {
  16161. "type": "string"
  16162. }
  16163. },
  16164. "required": ["message"],
  16165. "additionalProperties": false
  16166. }
  16167. },
  16168. "required": ["name", "data"],
  16169. "additionalProperties": false
  16170. },
  16171. "SyncEventMessageUpdated": {
  16172. "type": "object",
  16173. "properties": {
  16174. "type": {
  16175. "type": "string",
  16176. "enum": ["sync"]
  16177. },
  16178. "name": {
  16179. "type": "string",
  16180. "enum": ["message.updated.1"]
  16181. },
  16182. "id": {
  16183. "type": "string"
  16184. },
  16185. "seq": {
  16186. "type": "number"
  16187. },
  16188. "aggregateID": {
  16189. "type": "string",
  16190. "enum": ["sessionID"]
  16191. },
  16192. "data": {
  16193. "type": "object",
  16194. "properties": {
  16195. "sessionID": {
  16196. "type": "string",
  16197. "pattern": "^ses"
  16198. },
  16199. "info": {
  16200. "$ref": "#/components/schemas/Message"
  16201. }
  16202. },
  16203. "required": ["sessionID", "info"],
  16204. "additionalProperties": false
  16205. }
  16206. },
  16207. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16208. "additionalProperties": false
  16209. },
  16210. "SyncEventMessageRemoved": {
  16211. "type": "object",
  16212. "properties": {
  16213. "type": {
  16214. "type": "string",
  16215. "enum": ["sync"]
  16216. },
  16217. "name": {
  16218. "type": "string",
  16219. "enum": ["message.removed.1"]
  16220. },
  16221. "id": {
  16222. "type": "string"
  16223. },
  16224. "seq": {
  16225. "type": "number"
  16226. },
  16227. "aggregateID": {
  16228. "type": "string",
  16229. "enum": ["sessionID"]
  16230. },
  16231. "data": {
  16232. "type": "object",
  16233. "properties": {
  16234. "sessionID": {
  16235. "type": "string",
  16236. "pattern": "^ses"
  16237. },
  16238. "messageID": {
  16239. "type": "string",
  16240. "pattern": "^msg"
  16241. }
  16242. },
  16243. "required": ["sessionID", "messageID"],
  16244. "additionalProperties": false
  16245. }
  16246. },
  16247. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16248. "additionalProperties": false
  16249. },
  16250. "SyncEventMessagePartUpdated": {
  16251. "type": "object",
  16252. "properties": {
  16253. "type": {
  16254. "type": "string",
  16255. "enum": ["sync"]
  16256. },
  16257. "name": {
  16258. "type": "string",
  16259. "enum": ["message.part.updated.1"]
  16260. },
  16261. "id": {
  16262. "type": "string"
  16263. },
  16264. "seq": {
  16265. "type": "number"
  16266. },
  16267. "aggregateID": {
  16268. "type": "string",
  16269. "enum": ["sessionID"]
  16270. },
  16271. "data": {
  16272. "type": "object",
  16273. "properties": {
  16274. "sessionID": {
  16275. "type": "string",
  16276. "pattern": "^ses"
  16277. },
  16278. "part": {
  16279. "$ref": "#/components/schemas/Part"
  16280. },
  16281. "time": {
  16282. "type": "integer",
  16283. "minimum": 0
  16284. }
  16285. },
  16286. "required": ["sessionID", "part", "time"],
  16287. "additionalProperties": false
  16288. }
  16289. },
  16290. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16291. "additionalProperties": false
  16292. },
  16293. "SyncEventMessagePartRemoved": {
  16294. "type": "object",
  16295. "properties": {
  16296. "type": {
  16297. "type": "string",
  16298. "enum": ["sync"]
  16299. },
  16300. "name": {
  16301. "type": "string",
  16302. "enum": ["message.part.removed.1"]
  16303. },
  16304. "id": {
  16305. "type": "string"
  16306. },
  16307. "seq": {
  16308. "type": "number"
  16309. },
  16310. "aggregateID": {
  16311. "type": "string",
  16312. "enum": ["sessionID"]
  16313. },
  16314. "data": {
  16315. "type": "object",
  16316. "properties": {
  16317. "sessionID": {
  16318. "type": "string",
  16319. "pattern": "^ses"
  16320. },
  16321. "messageID": {
  16322. "type": "string",
  16323. "pattern": "^msg"
  16324. },
  16325. "partID": {
  16326. "type": "string",
  16327. "pattern": "^prt"
  16328. }
  16329. },
  16330. "required": ["sessionID", "messageID", "partID"],
  16331. "additionalProperties": false
  16332. }
  16333. },
  16334. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16335. "additionalProperties": false
  16336. },
  16337. "SyncEventSessionCreated": {
  16338. "type": "object",
  16339. "properties": {
  16340. "type": {
  16341. "type": "string",
  16342. "enum": ["sync"]
  16343. },
  16344. "name": {
  16345. "type": "string",
  16346. "enum": ["session.created.1"]
  16347. },
  16348. "id": {
  16349. "type": "string"
  16350. },
  16351. "seq": {
  16352. "type": "number"
  16353. },
  16354. "aggregateID": {
  16355. "type": "string",
  16356. "enum": ["sessionID"]
  16357. },
  16358. "data": {
  16359. "type": "object",
  16360. "properties": {
  16361. "sessionID": {
  16362. "type": "string",
  16363. "pattern": "^ses"
  16364. },
  16365. "info": {
  16366. "$ref": "#/components/schemas/Session"
  16367. }
  16368. },
  16369. "required": ["sessionID", "info"],
  16370. "additionalProperties": false
  16371. }
  16372. },
  16373. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16374. "additionalProperties": false
  16375. },
  16376. "SyncEventSessionUpdated": {
  16377. "type": "object",
  16378. "properties": {
  16379. "type": {
  16380. "type": "string",
  16381. "enum": ["sync"]
  16382. },
  16383. "name": {
  16384. "type": "string",
  16385. "enum": ["session.updated.1"]
  16386. },
  16387. "id": {
  16388. "type": "string"
  16389. },
  16390. "seq": {
  16391. "type": "number"
  16392. },
  16393. "aggregateID": {
  16394. "type": "string",
  16395. "enum": ["sessionID"]
  16396. },
  16397. "data": {
  16398. "type": "object",
  16399. "properties": {
  16400. "sessionID": {
  16401. "type": "string",
  16402. "pattern": "^ses"
  16403. },
  16404. "info": {
  16405. "type": "object",
  16406. "properties": {
  16407. "id": {
  16408. "anyOf": [
  16409. {
  16410. "type": "string",
  16411. "pattern": "^ses"
  16412. },
  16413. {
  16414. "type": "null"
  16415. }
  16416. ]
  16417. },
  16418. "slug": {
  16419. "anyOf": [
  16420. {
  16421. "type": "string"
  16422. },
  16423. {
  16424. "type": "null"
  16425. }
  16426. ]
  16427. },
  16428. "projectID": {
  16429. "anyOf": [
  16430. {
  16431. "type": "string"
  16432. },
  16433. {
  16434. "type": "null"
  16435. }
  16436. ]
  16437. },
  16438. "workspaceID": {
  16439. "anyOf": [
  16440. {
  16441. "type": "string",
  16442. "pattern": "^wrk"
  16443. },
  16444. {
  16445. "type": "null"
  16446. }
  16447. ]
  16448. },
  16449. "directory": {
  16450. "anyOf": [
  16451. {
  16452. "type": "string"
  16453. },
  16454. {
  16455. "type": "null"
  16456. }
  16457. ]
  16458. },
  16459. "path": {
  16460. "anyOf": [
  16461. {
  16462. "type": "string"
  16463. },
  16464. {
  16465. "type": "null"
  16466. }
  16467. ]
  16468. },
  16469. "parentID": {
  16470. "anyOf": [
  16471. {
  16472. "type": "string",
  16473. "pattern": "^ses"
  16474. },
  16475. {
  16476. "type": "null"
  16477. }
  16478. ]
  16479. },
  16480. "summary": {
  16481. "anyOf": [
  16482. {
  16483. "type": "object",
  16484. "properties": {
  16485. "additions": {
  16486. "type": "number"
  16487. },
  16488. "deletions": {
  16489. "type": "number"
  16490. },
  16491. "files": {
  16492. "type": "number"
  16493. },
  16494. "diffs": {
  16495. "type": "array",
  16496. "items": {
  16497. "$ref": "#/components/schemas/SnapshotFileDiff"
  16498. }
  16499. }
  16500. },
  16501. "required": ["additions", "deletions", "files"],
  16502. "additionalProperties": false
  16503. },
  16504. {
  16505. "type": "null"
  16506. }
  16507. ]
  16508. },
  16509. "cost": {
  16510. "anyOf": [
  16511. {
  16512. "type": "number"
  16513. },
  16514. {
  16515. "type": "null"
  16516. }
  16517. ]
  16518. },
  16519. "tokens": {
  16520. "anyOf": [
  16521. {
  16522. "type": "object",
  16523. "properties": {
  16524. "input": {
  16525. "type": "number"
  16526. },
  16527. "output": {
  16528. "type": "number"
  16529. },
  16530. "reasoning": {
  16531. "type": "number"
  16532. },
  16533. "cache": {
  16534. "type": "object",
  16535. "properties": {
  16536. "read": {
  16537. "type": "number"
  16538. },
  16539. "write": {
  16540. "type": "number"
  16541. }
  16542. },
  16543. "required": ["read", "write"],
  16544. "additionalProperties": false
  16545. }
  16546. },
  16547. "required": ["input", "output", "reasoning", "cache"],
  16548. "additionalProperties": false
  16549. },
  16550. {
  16551. "type": "null"
  16552. }
  16553. ]
  16554. },
  16555. "share": {
  16556. "type": "object",
  16557. "properties": {
  16558. "url": {
  16559. "anyOf": [
  16560. {
  16561. "type": "string"
  16562. },
  16563. {
  16564. "type": "null"
  16565. }
  16566. ]
  16567. }
  16568. },
  16569. "additionalProperties": false
  16570. },
  16571. "title": {
  16572. "anyOf": [
  16573. {
  16574. "type": "string"
  16575. },
  16576. {
  16577. "type": "null"
  16578. }
  16579. ]
  16580. },
  16581. "agent": {
  16582. "anyOf": [
  16583. {
  16584. "type": "string"
  16585. },
  16586. {
  16587. "type": "null"
  16588. }
  16589. ]
  16590. },
  16591. "model": {
  16592. "anyOf": [
  16593. {
  16594. "type": "object",
  16595. "properties": {
  16596. "id": {
  16597. "type": "string"
  16598. },
  16599. "providerID": {
  16600. "type": "string"
  16601. },
  16602. "variant": {
  16603. "type": "string"
  16604. }
  16605. },
  16606. "required": ["id", "providerID"],
  16607. "additionalProperties": false
  16608. },
  16609. {
  16610. "type": "null"
  16611. }
  16612. ]
  16613. },
  16614. "version": {
  16615. "anyOf": [
  16616. {
  16617. "type": "string"
  16618. },
  16619. {
  16620. "type": "null"
  16621. }
  16622. ]
  16623. },
  16624. "time": {
  16625. "type": "object",
  16626. "properties": {
  16627. "created": {
  16628. "anyOf": [
  16629. {
  16630. "type": "integer",
  16631. "minimum": 0
  16632. },
  16633. {
  16634. "type": "null"
  16635. }
  16636. ]
  16637. },
  16638. "updated": {
  16639. "anyOf": [
  16640. {
  16641. "type": "integer",
  16642. "minimum": 0
  16643. },
  16644. {
  16645. "type": "null"
  16646. }
  16647. ]
  16648. },
  16649. "compacting": {
  16650. "anyOf": [
  16651. {
  16652. "type": "integer",
  16653. "minimum": 0
  16654. },
  16655. {
  16656. "type": "null"
  16657. }
  16658. ]
  16659. },
  16660. "archived": {
  16661. "anyOf": [
  16662. {
  16663. "type": "number"
  16664. },
  16665. {
  16666. "type": "null"
  16667. }
  16668. ]
  16669. }
  16670. },
  16671. "additionalProperties": false
  16672. },
  16673. "permission": {
  16674. "anyOf": [
  16675. {
  16676. "$ref": "#/components/schemas/PermissionRuleset"
  16677. },
  16678. {
  16679. "type": "null"
  16680. }
  16681. ]
  16682. },
  16683. "revert": {
  16684. "anyOf": [
  16685. {
  16686. "type": "object",
  16687. "properties": {
  16688. "messageID": {
  16689. "type": "string",
  16690. "pattern": "^msg"
  16691. },
  16692. "partID": {
  16693. "type": "string",
  16694. "pattern": "^prt"
  16695. },
  16696. "snapshot": {
  16697. "type": "string"
  16698. },
  16699. "diff": {
  16700. "type": "string"
  16701. }
  16702. },
  16703. "required": ["messageID"],
  16704. "additionalProperties": false
  16705. },
  16706. {
  16707. "type": "null"
  16708. }
  16709. ]
  16710. }
  16711. },
  16712. "additionalProperties": false
  16713. }
  16714. },
  16715. "required": ["sessionID", "info"],
  16716. "additionalProperties": false
  16717. }
  16718. },
  16719. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16720. "additionalProperties": false
  16721. },
  16722. "SyncEventSessionDeleted": {
  16723. "type": "object",
  16724. "properties": {
  16725. "type": {
  16726. "type": "string",
  16727. "enum": ["sync"]
  16728. },
  16729. "name": {
  16730. "type": "string",
  16731. "enum": ["session.deleted.1"]
  16732. },
  16733. "id": {
  16734. "type": "string"
  16735. },
  16736. "seq": {
  16737. "type": "number"
  16738. },
  16739. "aggregateID": {
  16740. "type": "string",
  16741. "enum": ["sessionID"]
  16742. },
  16743. "data": {
  16744. "type": "object",
  16745. "properties": {
  16746. "sessionID": {
  16747. "type": "string",
  16748. "pattern": "^ses"
  16749. },
  16750. "info": {
  16751. "$ref": "#/components/schemas/Session"
  16752. }
  16753. },
  16754. "required": ["sessionID", "info"],
  16755. "additionalProperties": false
  16756. }
  16757. },
  16758. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16759. "additionalProperties": false
  16760. },
  16761. "SyncEventSessionNextAgentSwitched": {
  16762. "type": "object",
  16763. "properties": {
  16764. "type": {
  16765. "type": "string",
  16766. "enum": ["sync"]
  16767. },
  16768. "name": {
  16769. "type": "string",
  16770. "enum": ["session.next.agent.switched.1"]
  16771. },
  16772. "id": {
  16773. "type": "string"
  16774. },
  16775. "seq": {
  16776. "type": "number"
  16777. },
  16778. "aggregateID": {
  16779. "type": "string",
  16780. "enum": ["sessionID"]
  16781. },
  16782. "data": {
  16783. "type": "object",
  16784. "properties": {
  16785. "timestamp": {
  16786. "type": "number"
  16787. },
  16788. "sessionID": {
  16789. "type": "string",
  16790. "pattern": "^ses"
  16791. },
  16792. "agent": {
  16793. "type": "string"
  16794. }
  16795. },
  16796. "required": ["timestamp", "sessionID", "agent"],
  16797. "additionalProperties": false
  16798. }
  16799. },
  16800. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16801. "additionalProperties": false
  16802. },
  16803. "SyncEventSessionNextModelSwitched": {
  16804. "type": "object",
  16805. "properties": {
  16806. "type": {
  16807. "type": "string",
  16808. "enum": ["sync"]
  16809. },
  16810. "name": {
  16811. "type": "string",
  16812. "enum": ["session.next.model.switched.1"]
  16813. },
  16814. "id": {
  16815. "type": "string"
  16816. },
  16817. "seq": {
  16818. "type": "number"
  16819. },
  16820. "aggregateID": {
  16821. "type": "string",
  16822. "enum": ["sessionID"]
  16823. },
  16824. "data": {
  16825. "type": "object",
  16826. "properties": {
  16827. "timestamp": {
  16828. "type": "number"
  16829. },
  16830. "sessionID": {
  16831. "type": "string",
  16832. "pattern": "^ses"
  16833. },
  16834. "model": {
  16835. "type": "object",
  16836. "properties": {
  16837. "id": {
  16838. "type": "string"
  16839. },
  16840. "providerID": {
  16841. "type": "string"
  16842. },
  16843. "variant": {
  16844. "type": "string"
  16845. }
  16846. },
  16847. "required": ["id", "providerID", "variant"],
  16848. "additionalProperties": false
  16849. }
  16850. },
  16851. "required": ["timestamp", "sessionID", "model"],
  16852. "additionalProperties": false
  16853. }
  16854. },
  16855. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16856. "additionalProperties": false
  16857. },
  16858. "SyncEventSessionNextPrompted": {
  16859. "type": "object",
  16860. "properties": {
  16861. "type": {
  16862. "type": "string",
  16863. "enum": ["sync"]
  16864. },
  16865. "name": {
  16866. "type": "string",
  16867. "enum": ["session.next.prompted.1"]
  16868. },
  16869. "id": {
  16870. "type": "string"
  16871. },
  16872. "seq": {
  16873. "type": "number"
  16874. },
  16875. "aggregateID": {
  16876. "type": "string",
  16877. "enum": ["sessionID"]
  16878. },
  16879. "data": {
  16880. "type": "object",
  16881. "properties": {
  16882. "timestamp": {
  16883. "type": "number"
  16884. },
  16885. "sessionID": {
  16886. "type": "string",
  16887. "pattern": "^ses"
  16888. },
  16889. "prompt": {
  16890. "$ref": "#/components/schemas/Prompt"
  16891. }
  16892. },
  16893. "required": ["timestamp", "sessionID", "prompt"],
  16894. "additionalProperties": false
  16895. }
  16896. },
  16897. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16898. "additionalProperties": false
  16899. },
  16900. "SyncEventSessionNextSynthetic": {
  16901. "type": "object",
  16902. "properties": {
  16903. "type": {
  16904. "type": "string",
  16905. "enum": ["sync"]
  16906. },
  16907. "name": {
  16908. "type": "string",
  16909. "enum": ["session.next.synthetic.1"]
  16910. },
  16911. "id": {
  16912. "type": "string"
  16913. },
  16914. "seq": {
  16915. "type": "number"
  16916. },
  16917. "aggregateID": {
  16918. "type": "string",
  16919. "enum": ["sessionID"]
  16920. },
  16921. "data": {
  16922. "type": "object",
  16923. "properties": {
  16924. "timestamp": {
  16925. "type": "number"
  16926. },
  16927. "sessionID": {
  16928. "type": "string",
  16929. "pattern": "^ses"
  16930. },
  16931. "text": {
  16932. "type": "string"
  16933. }
  16934. },
  16935. "required": ["timestamp", "sessionID", "text"],
  16936. "additionalProperties": false
  16937. }
  16938. },
  16939. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16940. "additionalProperties": false
  16941. },
  16942. "SyncEventSessionNextShellStarted": {
  16943. "type": "object",
  16944. "properties": {
  16945. "type": {
  16946. "type": "string",
  16947. "enum": ["sync"]
  16948. },
  16949. "name": {
  16950. "type": "string",
  16951. "enum": ["session.next.shell.started.1"]
  16952. },
  16953. "id": {
  16954. "type": "string"
  16955. },
  16956. "seq": {
  16957. "type": "number"
  16958. },
  16959. "aggregateID": {
  16960. "type": "string",
  16961. "enum": ["sessionID"]
  16962. },
  16963. "data": {
  16964. "type": "object",
  16965. "properties": {
  16966. "timestamp": {
  16967. "type": "number"
  16968. },
  16969. "sessionID": {
  16970. "type": "string",
  16971. "pattern": "^ses"
  16972. },
  16973. "callID": {
  16974. "type": "string"
  16975. },
  16976. "command": {
  16977. "type": "string"
  16978. }
  16979. },
  16980. "required": ["timestamp", "sessionID", "callID", "command"],
  16981. "additionalProperties": false
  16982. }
  16983. },
  16984. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16985. "additionalProperties": false
  16986. },
  16987. "SyncEventSessionNextShellEnded": {
  16988. "type": "object",
  16989. "properties": {
  16990. "type": {
  16991. "type": "string",
  16992. "enum": ["sync"]
  16993. },
  16994. "name": {
  16995. "type": "string",
  16996. "enum": ["session.next.shell.ended.1"]
  16997. },
  16998. "id": {
  16999. "type": "string"
  17000. },
  17001. "seq": {
  17002. "type": "number"
  17003. },
  17004. "aggregateID": {
  17005. "type": "string",
  17006. "enum": ["sessionID"]
  17007. },
  17008. "data": {
  17009. "type": "object",
  17010. "properties": {
  17011. "timestamp": {
  17012. "type": "number"
  17013. },
  17014. "sessionID": {
  17015. "type": "string",
  17016. "pattern": "^ses"
  17017. },
  17018. "callID": {
  17019. "type": "string"
  17020. },
  17021. "output": {
  17022. "type": "string"
  17023. }
  17024. },
  17025. "required": ["timestamp", "sessionID", "callID", "output"],
  17026. "additionalProperties": false
  17027. }
  17028. },
  17029. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17030. "additionalProperties": false
  17031. },
  17032. "SyncEventSessionNextStepStarted": {
  17033. "type": "object",
  17034. "properties": {
  17035. "type": {
  17036. "type": "string",
  17037. "enum": ["sync"]
  17038. },
  17039. "name": {
  17040. "type": "string",
  17041. "enum": ["session.next.step.started.1"]
  17042. },
  17043. "id": {
  17044. "type": "string"
  17045. },
  17046. "seq": {
  17047. "type": "number"
  17048. },
  17049. "aggregateID": {
  17050. "type": "string",
  17051. "enum": ["sessionID"]
  17052. },
  17053. "data": {
  17054. "type": "object",
  17055. "properties": {
  17056. "timestamp": {
  17057. "type": "number"
  17058. },
  17059. "sessionID": {
  17060. "type": "string",
  17061. "pattern": "^ses"
  17062. },
  17063. "agent": {
  17064. "type": "string"
  17065. },
  17066. "model": {
  17067. "type": "object",
  17068. "properties": {
  17069. "id": {
  17070. "type": "string"
  17071. },
  17072. "providerID": {
  17073. "type": "string"
  17074. },
  17075. "variant": {
  17076. "type": "string"
  17077. }
  17078. },
  17079. "required": ["id", "providerID", "variant"],
  17080. "additionalProperties": false
  17081. },
  17082. "snapshot": {
  17083. "type": "string"
  17084. }
  17085. },
  17086. "required": ["timestamp", "sessionID", "agent", "model"],
  17087. "additionalProperties": false
  17088. }
  17089. },
  17090. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17091. "additionalProperties": false
  17092. },
  17093. "SyncEventSessionNextStepEnded": {
  17094. "type": "object",
  17095. "properties": {
  17096. "type": {
  17097. "type": "string",
  17098. "enum": ["sync"]
  17099. },
  17100. "name": {
  17101. "type": "string",
  17102. "enum": ["session.next.step.ended.1"]
  17103. },
  17104. "id": {
  17105. "type": "string"
  17106. },
  17107. "seq": {
  17108. "type": "number"
  17109. },
  17110. "aggregateID": {
  17111. "type": "string",
  17112. "enum": ["sessionID"]
  17113. },
  17114. "data": {
  17115. "type": "object",
  17116. "properties": {
  17117. "timestamp": {
  17118. "type": "number"
  17119. },
  17120. "sessionID": {
  17121. "type": "string",
  17122. "pattern": "^ses"
  17123. },
  17124. "finish": {
  17125. "type": "string"
  17126. },
  17127. "cost": {
  17128. "type": "number"
  17129. },
  17130. "tokens": {
  17131. "type": "object",
  17132. "properties": {
  17133. "input": {
  17134. "type": "number"
  17135. },
  17136. "output": {
  17137. "type": "number"
  17138. },
  17139. "reasoning": {
  17140. "type": "number"
  17141. },
  17142. "cache": {
  17143. "type": "object",
  17144. "properties": {
  17145. "read": {
  17146. "type": "number"
  17147. },
  17148. "write": {
  17149. "type": "number"
  17150. }
  17151. },
  17152. "required": ["read", "write"],
  17153. "additionalProperties": false
  17154. }
  17155. },
  17156. "required": ["input", "output", "reasoning", "cache"],
  17157. "additionalProperties": false
  17158. },
  17159. "snapshot": {
  17160. "type": "string"
  17161. }
  17162. },
  17163. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17164. "additionalProperties": false
  17165. }
  17166. },
  17167. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17168. "additionalProperties": false
  17169. },
  17170. "SyncEventSessionNextStepFailed": {
  17171. "type": "object",
  17172. "properties": {
  17173. "type": {
  17174. "type": "string",
  17175. "enum": ["sync"]
  17176. },
  17177. "name": {
  17178. "type": "string",
  17179. "enum": ["session.next.step.failed.1"]
  17180. },
  17181. "id": {
  17182. "type": "string"
  17183. },
  17184. "seq": {
  17185. "type": "number"
  17186. },
  17187. "aggregateID": {
  17188. "type": "string",
  17189. "enum": ["sessionID"]
  17190. },
  17191. "data": {
  17192. "type": "object",
  17193. "properties": {
  17194. "timestamp": {
  17195. "type": "number"
  17196. },
  17197. "sessionID": {
  17198. "type": "string",
  17199. "pattern": "^ses"
  17200. },
  17201. "error": {
  17202. "$ref": "#/components/schemas/SessionErrorUnknown"
  17203. }
  17204. },
  17205. "required": ["timestamp", "sessionID", "error"],
  17206. "additionalProperties": false
  17207. }
  17208. },
  17209. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17210. "additionalProperties": false
  17211. },
  17212. "SyncEventSessionNextTextStarted": {
  17213. "type": "object",
  17214. "properties": {
  17215. "type": {
  17216. "type": "string",
  17217. "enum": ["sync"]
  17218. },
  17219. "name": {
  17220. "type": "string",
  17221. "enum": ["session.next.text.started.1"]
  17222. },
  17223. "id": {
  17224. "type": "string"
  17225. },
  17226. "seq": {
  17227. "type": "number"
  17228. },
  17229. "aggregateID": {
  17230. "type": "string",
  17231. "enum": ["sessionID"]
  17232. },
  17233. "data": {
  17234. "type": "object",
  17235. "properties": {
  17236. "timestamp": {
  17237. "type": "number"
  17238. },
  17239. "sessionID": {
  17240. "type": "string",
  17241. "pattern": "^ses"
  17242. }
  17243. },
  17244. "required": ["timestamp", "sessionID"],
  17245. "additionalProperties": false
  17246. }
  17247. },
  17248. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17249. "additionalProperties": false
  17250. },
  17251. "SyncEventSessionNextTextDelta": {
  17252. "type": "object",
  17253. "properties": {
  17254. "type": {
  17255. "type": "string",
  17256. "enum": ["sync"]
  17257. },
  17258. "name": {
  17259. "type": "string",
  17260. "enum": ["session.next.text.delta.1"]
  17261. },
  17262. "id": {
  17263. "type": "string"
  17264. },
  17265. "seq": {
  17266. "type": "number"
  17267. },
  17268. "aggregateID": {
  17269. "type": "string",
  17270. "enum": ["sessionID"]
  17271. },
  17272. "data": {
  17273. "type": "object",
  17274. "properties": {
  17275. "timestamp": {
  17276. "type": "number"
  17277. },
  17278. "sessionID": {
  17279. "type": "string",
  17280. "pattern": "^ses"
  17281. },
  17282. "delta": {
  17283. "type": "string"
  17284. }
  17285. },
  17286. "required": ["timestamp", "sessionID", "delta"],
  17287. "additionalProperties": false
  17288. }
  17289. },
  17290. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17291. "additionalProperties": false
  17292. },
  17293. "SyncEventSessionNextTextEnded": {
  17294. "type": "object",
  17295. "properties": {
  17296. "type": {
  17297. "type": "string",
  17298. "enum": ["sync"]
  17299. },
  17300. "name": {
  17301. "type": "string",
  17302. "enum": ["session.next.text.ended.1"]
  17303. },
  17304. "id": {
  17305. "type": "string"
  17306. },
  17307. "seq": {
  17308. "type": "number"
  17309. },
  17310. "aggregateID": {
  17311. "type": "string",
  17312. "enum": ["sessionID"]
  17313. },
  17314. "data": {
  17315. "type": "object",
  17316. "properties": {
  17317. "timestamp": {
  17318. "type": "number"
  17319. },
  17320. "sessionID": {
  17321. "type": "string",
  17322. "pattern": "^ses"
  17323. },
  17324. "text": {
  17325. "type": "string"
  17326. }
  17327. },
  17328. "required": ["timestamp", "sessionID", "text"],
  17329. "additionalProperties": false
  17330. }
  17331. },
  17332. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17333. "additionalProperties": false
  17334. },
  17335. "SyncEventSessionNextReasoningStarted": {
  17336. "type": "object",
  17337. "properties": {
  17338. "type": {
  17339. "type": "string",
  17340. "enum": ["sync"]
  17341. },
  17342. "name": {
  17343. "type": "string",
  17344. "enum": ["session.next.reasoning.started.1"]
  17345. },
  17346. "id": {
  17347. "type": "string"
  17348. },
  17349. "seq": {
  17350. "type": "number"
  17351. },
  17352. "aggregateID": {
  17353. "type": "string",
  17354. "enum": ["sessionID"]
  17355. },
  17356. "data": {
  17357. "type": "object",
  17358. "properties": {
  17359. "timestamp": {
  17360. "type": "number"
  17361. },
  17362. "sessionID": {
  17363. "type": "string",
  17364. "pattern": "^ses"
  17365. },
  17366. "reasoningID": {
  17367. "type": "string"
  17368. }
  17369. },
  17370. "required": ["timestamp", "sessionID", "reasoningID"],
  17371. "additionalProperties": false
  17372. }
  17373. },
  17374. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17375. "additionalProperties": false
  17376. },
  17377. "SyncEventSessionNextReasoningDelta": {
  17378. "type": "object",
  17379. "properties": {
  17380. "type": {
  17381. "type": "string",
  17382. "enum": ["sync"]
  17383. },
  17384. "name": {
  17385. "type": "string",
  17386. "enum": ["session.next.reasoning.delta.1"]
  17387. },
  17388. "id": {
  17389. "type": "string"
  17390. },
  17391. "seq": {
  17392. "type": "number"
  17393. },
  17394. "aggregateID": {
  17395. "type": "string",
  17396. "enum": ["sessionID"]
  17397. },
  17398. "data": {
  17399. "type": "object",
  17400. "properties": {
  17401. "timestamp": {
  17402. "type": "number"
  17403. },
  17404. "sessionID": {
  17405. "type": "string",
  17406. "pattern": "^ses"
  17407. },
  17408. "reasoningID": {
  17409. "type": "string"
  17410. },
  17411. "delta": {
  17412. "type": "string"
  17413. }
  17414. },
  17415. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17416. "additionalProperties": false
  17417. }
  17418. },
  17419. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17420. "additionalProperties": false
  17421. },
  17422. "SyncEventSessionNextReasoningEnded": {
  17423. "type": "object",
  17424. "properties": {
  17425. "type": {
  17426. "type": "string",
  17427. "enum": ["sync"]
  17428. },
  17429. "name": {
  17430. "type": "string",
  17431. "enum": ["session.next.reasoning.ended.1"]
  17432. },
  17433. "id": {
  17434. "type": "string"
  17435. },
  17436. "seq": {
  17437. "type": "number"
  17438. },
  17439. "aggregateID": {
  17440. "type": "string",
  17441. "enum": ["sessionID"]
  17442. },
  17443. "data": {
  17444. "type": "object",
  17445. "properties": {
  17446. "timestamp": {
  17447. "type": "number"
  17448. },
  17449. "sessionID": {
  17450. "type": "string",
  17451. "pattern": "^ses"
  17452. },
  17453. "reasoningID": {
  17454. "type": "string"
  17455. },
  17456. "text": {
  17457. "type": "string"
  17458. }
  17459. },
  17460. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17461. "additionalProperties": false
  17462. }
  17463. },
  17464. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17465. "additionalProperties": false
  17466. },
  17467. "SyncEventSessionNextToolInputStarted": {
  17468. "type": "object",
  17469. "properties": {
  17470. "type": {
  17471. "type": "string",
  17472. "enum": ["sync"]
  17473. },
  17474. "name": {
  17475. "type": "string",
  17476. "enum": ["session.next.tool.input.started.1"]
  17477. },
  17478. "id": {
  17479. "type": "string"
  17480. },
  17481. "seq": {
  17482. "type": "number"
  17483. },
  17484. "aggregateID": {
  17485. "type": "string",
  17486. "enum": ["sessionID"]
  17487. },
  17488. "data": {
  17489. "type": "object",
  17490. "properties": {
  17491. "timestamp": {
  17492. "type": "number"
  17493. },
  17494. "sessionID": {
  17495. "type": "string",
  17496. "pattern": "^ses"
  17497. },
  17498. "callID": {
  17499. "type": "string"
  17500. },
  17501. "name": {
  17502. "type": "string"
  17503. }
  17504. },
  17505. "required": ["timestamp", "sessionID", "callID", "name"],
  17506. "additionalProperties": false
  17507. }
  17508. },
  17509. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17510. "additionalProperties": false
  17511. },
  17512. "SyncEventSessionNextToolInputDelta": {
  17513. "type": "object",
  17514. "properties": {
  17515. "type": {
  17516. "type": "string",
  17517. "enum": ["sync"]
  17518. },
  17519. "name": {
  17520. "type": "string",
  17521. "enum": ["session.next.tool.input.delta.1"]
  17522. },
  17523. "id": {
  17524. "type": "string"
  17525. },
  17526. "seq": {
  17527. "type": "number"
  17528. },
  17529. "aggregateID": {
  17530. "type": "string",
  17531. "enum": ["sessionID"]
  17532. },
  17533. "data": {
  17534. "type": "object",
  17535. "properties": {
  17536. "timestamp": {
  17537. "type": "number"
  17538. },
  17539. "sessionID": {
  17540. "type": "string",
  17541. "pattern": "^ses"
  17542. },
  17543. "callID": {
  17544. "type": "string"
  17545. },
  17546. "delta": {
  17547. "type": "string"
  17548. }
  17549. },
  17550. "required": ["timestamp", "sessionID", "callID", "delta"],
  17551. "additionalProperties": false
  17552. }
  17553. },
  17554. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17555. "additionalProperties": false
  17556. },
  17557. "SyncEventSessionNextToolInputEnded": {
  17558. "type": "object",
  17559. "properties": {
  17560. "type": {
  17561. "type": "string",
  17562. "enum": ["sync"]
  17563. },
  17564. "name": {
  17565. "type": "string",
  17566. "enum": ["session.next.tool.input.ended.1"]
  17567. },
  17568. "id": {
  17569. "type": "string"
  17570. },
  17571. "seq": {
  17572. "type": "number"
  17573. },
  17574. "aggregateID": {
  17575. "type": "string",
  17576. "enum": ["sessionID"]
  17577. },
  17578. "data": {
  17579. "type": "object",
  17580. "properties": {
  17581. "timestamp": {
  17582. "type": "number"
  17583. },
  17584. "sessionID": {
  17585. "type": "string",
  17586. "pattern": "^ses"
  17587. },
  17588. "callID": {
  17589. "type": "string"
  17590. },
  17591. "text": {
  17592. "type": "string"
  17593. }
  17594. },
  17595. "required": ["timestamp", "sessionID", "callID", "text"],
  17596. "additionalProperties": false
  17597. }
  17598. },
  17599. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17600. "additionalProperties": false
  17601. },
  17602. "SyncEventSessionNextToolCalled": {
  17603. "type": "object",
  17604. "properties": {
  17605. "type": {
  17606. "type": "string",
  17607. "enum": ["sync"]
  17608. },
  17609. "name": {
  17610. "type": "string",
  17611. "enum": ["session.next.tool.called.1"]
  17612. },
  17613. "id": {
  17614. "type": "string"
  17615. },
  17616. "seq": {
  17617. "type": "number"
  17618. },
  17619. "aggregateID": {
  17620. "type": "string",
  17621. "enum": ["sessionID"]
  17622. },
  17623. "data": {
  17624. "type": "object",
  17625. "properties": {
  17626. "timestamp": {
  17627. "type": "number"
  17628. },
  17629. "sessionID": {
  17630. "type": "string",
  17631. "pattern": "^ses"
  17632. },
  17633. "callID": {
  17634. "type": "string"
  17635. },
  17636. "tool": {
  17637. "type": "string"
  17638. },
  17639. "input": {
  17640. "type": "object"
  17641. },
  17642. "provider": {
  17643. "type": "object",
  17644. "properties": {
  17645. "executed": {
  17646. "type": "boolean"
  17647. },
  17648. "metadata": {
  17649. "type": "object"
  17650. }
  17651. },
  17652. "required": ["executed"],
  17653. "additionalProperties": false
  17654. }
  17655. },
  17656. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17657. "additionalProperties": false
  17658. }
  17659. },
  17660. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17661. "additionalProperties": false
  17662. },
  17663. "SyncEventSessionNextToolProgress": {
  17664. "type": "object",
  17665. "properties": {
  17666. "type": {
  17667. "type": "string",
  17668. "enum": ["sync"]
  17669. },
  17670. "name": {
  17671. "type": "string",
  17672. "enum": ["session.next.tool.progress.1"]
  17673. },
  17674. "id": {
  17675. "type": "string"
  17676. },
  17677. "seq": {
  17678. "type": "number"
  17679. },
  17680. "aggregateID": {
  17681. "type": "string",
  17682. "enum": ["sessionID"]
  17683. },
  17684. "data": {
  17685. "type": "object",
  17686. "properties": {
  17687. "timestamp": {
  17688. "type": "number"
  17689. },
  17690. "sessionID": {
  17691. "type": "string",
  17692. "pattern": "^ses"
  17693. },
  17694. "callID": {
  17695. "type": "string"
  17696. },
  17697. "structured": {
  17698. "type": "object"
  17699. },
  17700. "content": {
  17701. "type": "array",
  17702. "items": {
  17703. "anyOf": [
  17704. {
  17705. "$ref": "#/components/schemas/ToolTextContent"
  17706. },
  17707. {
  17708. "$ref": "#/components/schemas/ToolFileContent"
  17709. }
  17710. ]
  17711. }
  17712. }
  17713. },
  17714. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17715. "additionalProperties": false
  17716. }
  17717. },
  17718. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17719. "additionalProperties": false
  17720. },
  17721. "SyncEventSessionNextToolSuccess": {
  17722. "type": "object",
  17723. "properties": {
  17724. "type": {
  17725. "type": "string",
  17726. "enum": ["sync"]
  17727. },
  17728. "name": {
  17729. "type": "string",
  17730. "enum": ["session.next.tool.success.1"]
  17731. },
  17732. "id": {
  17733. "type": "string"
  17734. },
  17735. "seq": {
  17736. "type": "number"
  17737. },
  17738. "aggregateID": {
  17739. "type": "string",
  17740. "enum": ["sessionID"]
  17741. },
  17742. "data": {
  17743. "type": "object",
  17744. "properties": {
  17745. "timestamp": {
  17746. "type": "number"
  17747. },
  17748. "sessionID": {
  17749. "type": "string",
  17750. "pattern": "^ses"
  17751. },
  17752. "callID": {
  17753. "type": "string"
  17754. },
  17755. "structured": {
  17756. "type": "object"
  17757. },
  17758. "content": {
  17759. "type": "array",
  17760. "items": {
  17761. "anyOf": [
  17762. {
  17763. "$ref": "#/components/schemas/ToolTextContent"
  17764. },
  17765. {
  17766. "$ref": "#/components/schemas/ToolFileContent"
  17767. }
  17768. ]
  17769. }
  17770. },
  17771. "provider": {
  17772. "type": "object",
  17773. "properties": {
  17774. "executed": {
  17775. "type": "boolean"
  17776. },
  17777. "metadata": {
  17778. "type": "object"
  17779. }
  17780. },
  17781. "required": ["executed"],
  17782. "additionalProperties": false
  17783. }
  17784. },
  17785. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17786. "additionalProperties": false
  17787. }
  17788. },
  17789. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17790. "additionalProperties": false
  17791. },
  17792. "SyncEventSessionNextToolFailed": {
  17793. "type": "object",
  17794. "properties": {
  17795. "type": {
  17796. "type": "string",
  17797. "enum": ["sync"]
  17798. },
  17799. "name": {
  17800. "type": "string",
  17801. "enum": ["session.next.tool.failed.1"]
  17802. },
  17803. "id": {
  17804. "type": "string"
  17805. },
  17806. "seq": {
  17807. "type": "number"
  17808. },
  17809. "aggregateID": {
  17810. "type": "string",
  17811. "enum": ["sessionID"]
  17812. },
  17813. "data": {
  17814. "type": "object",
  17815. "properties": {
  17816. "timestamp": {
  17817. "type": "number"
  17818. },
  17819. "sessionID": {
  17820. "type": "string",
  17821. "pattern": "^ses"
  17822. },
  17823. "callID": {
  17824. "type": "string"
  17825. },
  17826. "error": {
  17827. "$ref": "#/components/schemas/SessionErrorUnknown"
  17828. },
  17829. "provider": {
  17830. "type": "object",
  17831. "properties": {
  17832. "executed": {
  17833. "type": "boolean"
  17834. },
  17835. "metadata": {
  17836. "type": "object"
  17837. }
  17838. },
  17839. "required": ["executed"],
  17840. "additionalProperties": false
  17841. }
  17842. },
  17843. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17844. "additionalProperties": false
  17845. }
  17846. },
  17847. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17848. "additionalProperties": false
  17849. },
  17850. "SyncEventSessionNextRetried": {
  17851. "type": "object",
  17852. "properties": {
  17853. "type": {
  17854. "type": "string",
  17855. "enum": ["sync"]
  17856. },
  17857. "name": {
  17858. "type": "string",
  17859. "enum": ["session.next.retried.1"]
  17860. },
  17861. "id": {
  17862. "type": "string"
  17863. },
  17864. "seq": {
  17865. "type": "number"
  17866. },
  17867. "aggregateID": {
  17868. "type": "string",
  17869. "enum": ["sessionID"]
  17870. },
  17871. "data": {
  17872. "type": "object",
  17873. "properties": {
  17874. "timestamp": {
  17875. "type": "number"
  17876. },
  17877. "sessionID": {
  17878. "type": "string",
  17879. "pattern": "^ses"
  17880. },
  17881. "attempt": {
  17882. "type": "number"
  17883. },
  17884. "error": {
  17885. "$ref": "#/components/schemas/SessionNextRetry_error"
  17886. }
  17887. },
  17888. "required": ["timestamp", "sessionID", "attempt", "error"],
  17889. "additionalProperties": false
  17890. }
  17891. },
  17892. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17893. "additionalProperties": false
  17894. },
  17895. "SyncEventSessionNextCompactionStarted": {
  17896. "type": "object",
  17897. "properties": {
  17898. "type": {
  17899. "type": "string",
  17900. "enum": ["sync"]
  17901. },
  17902. "name": {
  17903. "type": "string",
  17904. "enum": ["session.next.compaction.started.1"]
  17905. },
  17906. "id": {
  17907. "type": "string"
  17908. },
  17909. "seq": {
  17910. "type": "number"
  17911. },
  17912. "aggregateID": {
  17913. "type": "string",
  17914. "enum": ["sessionID"]
  17915. },
  17916. "data": {
  17917. "type": "object",
  17918. "properties": {
  17919. "timestamp": {
  17920. "type": "number"
  17921. },
  17922. "sessionID": {
  17923. "type": "string",
  17924. "pattern": "^ses"
  17925. },
  17926. "reason": {
  17927. "type": "string",
  17928. "enum": ["auto", "manual"]
  17929. }
  17930. },
  17931. "required": ["timestamp", "sessionID", "reason"],
  17932. "additionalProperties": false
  17933. }
  17934. },
  17935. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17936. "additionalProperties": false
  17937. },
  17938. "SyncEventSessionNextCompactionDelta": {
  17939. "type": "object",
  17940. "properties": {
  17941. "type": {
  17942. "type": "string",
  17943. "enum": ["sync"]
  17944. },
  17945. "name": {
  17946. "type": "string",
  17947. "enum": ["session.next.compaction.delta.1"]
  17948. },
  17949. "id": {
  17950. "type": "string"
  17951. },
  17952. "seq": {
  17953. "type": "number"
  17954. },
  17955. "aggregateID": {
  17956. "type": "string",
  17957. "enum": ["sessionID"]
  17958. },
  17959. "data": {
  17960. "type": "object",
  17961. "properties": {
  17962. "timestamp": {
  17963. "type": "number"
  17964. },
  17965. "sessionID": {
  17966. "type": "string",
  17967. "pattern": "^ses"
  17968. },
  17969. "text": {
  17970. "type": "string"
  17971. }
  17972. },
  17973. "required": ["timestamp", "sessionID", "text"],
  17974. "additionalProperties": false
  17975. }
  17976. },
  17977. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17978. "additionalProperties": false
  17979. },
  17980. "SyncEventSessionNextCompactionEnded": {
  17981. "type": "object",
  17982. "properties": {
  17983. "type": {
  17984. "type": "string",
  17985. "enum": ["sync"]
  17986. },
  17987. "name": {
  17988. "type": "string",
  17989. "enum": ["session.next.compaction.ended.1"]
  17990. },
  17991. "id": {
  17992. "type": "string"
  17993. },
  17994. "seq": {
  17995. "type": "number"
  17996. },
  17997. "aggregateID": {
  17998. "type": "string",
  17999. "enum": ["sessionID"]
  18000. },
  18001. "data": {
  18002. "type": "object",
  18003. "properties": {
  18004. "timestamp": {
  18005. "type": "number"
  18006. },
  18007. "sessionID": {
  18008. "type": "string",
  18009. "pattern": "^ses"
  18010. },
  18011. "text": {
  18012. "type": "string"
  18013. },
  18014. "include": {
  18015. "type": "string"
  18016. }
  18017. },
  18018. "required": ["timestamp", "sessionID", "text"],
  18019. "additionalProperties": false
  18020. }
  18021. },
  18022. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18023. "additionalProperties": false
  18024. },
  18025. "EventServerConnected": {
  18026. "type": "object",
  18027. "properties": {
  18028. "id": {
  18029. "type": "string"
  18030. },
  18031. "type": {
  18032. "type": "string",
  18033. "enum": ["server.connected"]
  18034. },
  18035. "properties": {
  18036. "type": "object",
  18037. "properties": {}
  18038. }
  18039. },
  18040. "required": ["id", "type", "properties"],
  18041. "additionalProperties": false
  18042. },
  18043. "EventGlobalDisposed": {
  18044. "type": "object",
  18045. "properties": {
  18046. "id": {
  18047. "type": "string"
  18048. },
  18049. "type": {
  18050. "type": "string",
  18051. "enum": ["global.disposed"]
  18052. },
  18053. "properties": {
  18054. "type": "object",
  18055. "properties": {}
  18056. }
  18057. },
  18058. "required": ["id", "type", "properties"],
  18059. "additionalProperties": false
  18060. },
  18061. "EventServerInstanceDisposed": {
  18062. "type": "object",
  18063. "properties": {
  18064. "id": {
  18065. "type": "string"
  18066. },
  18067. "type": {
  18068. "type": "string",
  18069. "enum": ["server.instance.disposed"]
  18070. },
  18071. "properties": {
  18072. "type": "object",
  18073. "properties": {
  18074. "directory": {
  18075. "type": "string"
  18076. }
  18077. },
  18078. "required": ["directory"],
  18079. "additionalProperties": false
  18080. }
  18081. },
  18082. "required": ["id", "type", "properties"],
  18083. "additionalProperties": false
  18084. },
  18085. "EventFileEdited": {
  18086. "type": "object",
  18087. "properties": {
  18088. "id": {
  18089. "type": "string"
  18090. },
  18091. "type": {
  18092. "type": "string",
  18093. "enum": ["file.edited"]
  18094. },
  18095. "properties": {
  18096. "type": "object",
  18097. "properties": {
  18098. "file": {
  18099. "type": "string"
  18100. }
  18101. },
  18102. "required": ["file"],
  18103. "additionalProperties": false
  18104. }
  18105. },
  18106. "required": ["id", "type", "properties"],
  18107. "additionalProperties": false
  18108. },
  18109. "EventFileWatcherUpdated": {
  18110. "type": "object",
  18111. "properties": {
  18112. "id": {
  18113. "type": "string"
  18114. },
  18115. "type": {
  18116. "type": "string",
  18117. "enum": ["file.watcher.updated"]
  18118. },
  18119. "properties": {
  18120. "type": "object",
  18121. "properties": {
  18122. "file": {
  18123. "type": "string"
  18124. },
  18125. "event": {
  18126. "type": "string",
  18127. "enum": ["add", "change", "unlink"]
  18128. }
  18129. },
  18130. "required": ["file", "event"],
  18131. "additionalProperties": false
  18132. }
  18133. },
  18134. "required": ["id", "type", "properties"],
  18135. "additionalProperties": false
  18136. },
  18137. "EventLspClientDiagnostics": {
  18138. "type": "object",
  18139. "properties": {
  18140. "id": {
  18141. "type": "string"
  18142. },
  18143. "type": {
  18144. "type": "string",
  18145. "enum": ["lsp.client.diagnostics"]
  18146. },
  18147. "properties": {
  18148. "type": "object",
  18149. "properties": {
  18150. "serverID": {
  18151. "type": "string"
  18152. },
  18153. "path": {
  18154. "type": "string"
  18155. }
  18156. },
  18157. "required": ["serverID", "path"],
  18158. "additionalProperties": false
  18159. }
  18160. },
  18161. "required": ["id", "type", "properties"],
  18162. "additionalProperties": false
  18163. },
  18164. "EventLspUpdated": {
  18165. "type": "object",
  18166. "properties": {
  18167. "id": {
  18168. "type": "string"
  18169. },
  18170. "type": {
  18171. "type": "string",
  18172. "enum": ["lsp.updated"]
  18173. },
  18174. "properties": {
  18175. "type": "object",
  18176. "properties": {}
  18177. }
  18178. },
  18179. "required": ["id", "type", "properties"],
  18180. "additionalProperties": false
  18181. },
  18182. "EventMessagePartDelta": {
  18183. "type": "object",
  18184. "properties": {
  18185. "id": {
  18186. "type": "string"
  18187. },
  18188. "type": {
  18189. "type": "string",
  18190. "enum": ["message.part.delta"]
  18191. },
  18192. "properties": {
  18193. "type": "object",
  18194. "properties": {
  18195. "sessionID": {
  18196. "type": "string",
  18197. "pattern": "^ses"
  18198. },
  18199. "messageID": {
  18200. "type": "string",
  18201. "pattern": "^msg"
  18202. },
  18203. "partID": {
  18204. "type": "string",
  18205. "pattern": "^prt"
  18206. },
  18207. "field": {
  18208. "type": "string"
  18209. },
  18210. "delta": {
  18211. "type": "string"
  18212. }
  18213. },
  18214. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18215. "additionalProperties": false
  18216. }
  18217. },
  18218. "required": ["id", "type", "properties"],
  18219. "additionalProperties": false
  18220. },
  18221. "EventPermissionAsked": {
  18222. "type": "object",
  18223. "properties": {
  18224. "id": {
  18225. "type": "string"
  18226. },
  18227. "type": {
  18228. "type": "string",
  18229. "enum": ["permission.asked"]
  18230. },
  18231. "properties": {
  18232. "$ref": "#/components/schemas/PermissionRequest"
  18233. }
  18234. },
  18235. "required": ["id", "type", "properties"],
  18236. "additionalProperties": false
  18237. },
  18238. "EventPermissionReplied": {
  18239. "type": "object",
  18240. "properties": {
  18241. "id": {
  18242. "type": "string"
  18243. },
  18244. "type": {
  18245. "type": "string",
  18246. "enum": ["permission.replied"]
  18247. },
  18248. "properties": {
  18249. "type": "object",
  18250. "properties": {
  18251. "sessionID": {
  18252. "type": "string",
  18253. "pattern": "^ses"
  18254. },
  18255. "requestID": {
  18256. "type": "string",
  18257. "pattern": "^per"
  18258. },
  18259. "reply": {
  18260. "type": "string",
  18261. "enum": ["once", "always", "reject"]
  18262. }
  18263. },
  18264. "required": ["sessionID", "requestID", "reply"],
  18265. "additionalProperties": false
  18266. }
  18267. },
  18268. "required": ["id", "type", "properties"],
  18269. "additionalProperties": false
  18270. },
  18271. "EventSessionDiff": {
  18272. "type": "object",
  18273. "properties": {
  18274. "id": {
  18275. "type": "string"
  18276. },
  18277. "type": {
  18278. "type": "string",
  18279. "enum": ["session.diff"]
  18280. },
  18281. "properties": {
  18282. "type": "object",
  18283. "properties": {
  18284. "sessionID": {
  18285. "type": "string",
  18286. "pattern": "^ses"
  18287. },
  18288. "diff": {
  18289. "type": "array",
  18290. "items": {
  18291. "$ref": "#/components/schemas/SnapshotFileDiff"
  18292. }
  18293. }
  18294. },
  18295. "required": ["sessionID", "diff"],
  18296. "additionalProperties": false
  18297. }
  18298. },
  18299. "required": ["id", "type", "properties"],
  18300. "additionalProperties": false
  18301. },
  18302. "EventSessionError": {
  18303. "type": "object",
  18304. "properties": {
  18305. "id": {
  18306. "type": "string"
  18307. },
  18308. "type": {
  18309. "type": "string",
  18310. "enum": ["session.error"]
  18311. },
  18312. "properties": {
  18313. "type": "object",
  18314. "properties": {
  18315. "sessionID": {
  18316. "type": "string",
  18317. "pattern": "^ses"
  18318. },
  18319. "error": {
  18320. "anyOf": [
  18321. {
  18322. "$ref": "#/components/schemas/ProviderAuthError"
  18323. },
  18324. {
  18325. "$ref": "#/components/schemas/UnknownError"
  18326. },
  18327. {
  18328. "$ref": "#/components/schemas/MessageOutputLengthError"
  18329. },
  18330. {
  18331. "$ref": "#/components/schemas/MessageAbortedError"
  18332. },
  18333. {
  18334. "$ref": "#/components/schemas/StructuredOutputError"
  18335. },
  18336. {
  18337. "$ref": "#/components/schemas/ContextOverflowError"
  18338. },
  18339. {
  18340. "$ref": "#/components/schemas/APIError"
  18341. }
  18342. ]
  18343. }
  18344. },
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. "EventQuestionAsked": {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string"
  18356. },
  18357. "type": {
  18358. "type": "string",
  18359. "enum": ["question.asked"]
  18360. },
  18361. "properties": {
  18362. "$ref": "#/components/schemas/QuestionRequest"
  18363. }
  18364. },
  18365. "required": ["id", "type", "properties"],
  18366. "additionalProperties": false
  18367. },
  18368. "EventQuestionReplied": {
  18369. "type": "object",
  18370. "properties": {
  18371. "id": {
  18372. "type": "string"
  18373. },
  18374. "type": {
  18375. "type": "string",
  18376. "enum": ["question.replied"]
  18377. },
  18378. "properties": {
  18379. "$ref": "#/components/schemas/QuestionReplied"
  18380. }
  18381. },
  18382. "required": ["id", "type", "properties"],
  18383. "additionalProperties": false
  18384. },
  18385. "EventQuestionRejected": {
  18386. "type": "object",
  18387. "properties": {
  18388. "id": {
  18389. "type": "string"
  18390. },
  18391. "type": {
  18392. "type": "string",
  18393. "enum": ["question.rejected"]
  18394. },
  18395. "properties": {
  18396. "$ref": "#/components/schemas/QuestionRejected"
  18397. }
  18398. },
  18399. "required": ["id", "type", "properties"],
  18400. "additionalProperties": false
  18401. },
  18402. "EventTodoUpdated": {
  18403. "type": "object",
  18404. "properties": {
  18405. "id": {
  18406. "type": "string"
  18407. },
  18408. "type": {
  18409. "type": "string",
  18410. "enum": ["todo.updated"]
  18411. },
  18412. "properties": {
  18413. "type": "object",
  18414. "properties": {
  18415. "sessionID": {
  18416. "type": "string",
  18417. "pattern": "^ses"
  18418. },
  18419. "todos": {
  18420. "type": "array",
  18421. "items": {
  18422. "$ref": "#/components/schemas/Todo"
  18423. }
  18424. }
  18425. },
  18426. "required": ["sessionID", "todos"],
  18427. "additionalProperties": false
  18428. }
  18429. },
  18430. "required": ["id", "type", "properties"],
  18431. "additionalProperties": false
  18432. },
  18433. "EventSessionStatus": {
  18434. "type": "object",
  18435. "properties": {
  18436. "id": {
  18437. "type": "string"
  18438. },
  18439. "type": {
  18440. "type": "string",
  18441. "enum": ["session.status"]
  18442. },
  18443. "properties": {
  18444. "type": "object",
  18445. "properties": {
  18446. "sessionID": {
  18447. "type": "string",
  18448. "pattern": "^ses"
  18449. },
  18450. "status": {
  18451. "$ref": "#/components/schemas/SessionStatus"
  18452. }
  18453. },
  18454. "required": ["sessionID", "status"],
  18455. "additionalProperties": false
  18456. }
  18457. },
  18458. "required": ["id", "type", "properties"],
  18459. "additionalProperties": false
  18460. },
  18461. "EventSessionIdle": {
  18462. "type": "object",
  18463. "properties": {
  18464. "id": {
  18465. "type": "string"
  18466. },
  18467. "type": {
  18468. "type": "string",
  18469. "enum": ["session.idle"]
  18470. },
  18471. "properties": {
  18472. "type": "object",
  18473. "properties": {
  18474. "sessionID": {
  18475. "type": "string",
  18476. "pattern": "^ses"
  18477. }
  18478. },
  18479. "required": ["sessionID"],
  18480. "additionalProperties": false
  18481. }
  18482. },
  18483. "required": ["id", "type", "properties"],
  18484. "additionalProperties": false
  18485. },
  18486. "EventMcpToolsChanged": {
  18487. "type": "object",
  18488. "properties": {
  18489. "id": {
  18490. "type": "string"
  18491. },
  18492. "type": {
  18493. "type": "string",
  18494. "enum": ["mcp.tools.changed"]
  18495. },
  18496. "properties": {
  18497. "type": "object",
  18498. "properties": {
  18499. "server": {
  18500. "type": "string"
  18501. }
  18502. },
  18503. "required": ["server"],
  18504. "additionalProperties": false
  18505. }
  18506. },
  18507. "required": ["id", "type", "properties"],
  18508. "additionalProperties": false
  18509. },
  18510. "EventMcpBrowserOpenFailed": {
  18511. "type": "object",
  18512. "properties": {
  18513. "id": {
  18514. "type": "string"
  18515. },
  18516. "type": {
  18517. "type": "string",
  18518. "enum": ["mcp.browser.open.failed"]
  18519. },
  18520. "properties": {
  18521. "type": "object",
  18522. "properties": {
  18523. "mcpName": {
  18524. "type": "string"
  18525. },
  18526. "url": {
  18527. "type": "string"
  18528. }
  18529. },
  18530. "required": ["mcpName", "url"],
  18531. "additionalProperties": false
  18532. }
  18533. },
  18534. "required": ["id", "type", "properties"],
  18535. "additionalProperties": false
  18536. },
  18537. "EventCommandExecuted": {
  18538. "type": "object",
  18539. "properties": {
  18540. "id": {
  18541. "type": "string"
  18542. },
  18543. "type": {
  18544. "type": "string",
  18545. "enum": ["command.executed"]
  18546. },
  18547. "properties": {
  18548. "type": "object",
  18549. "properties": {
  18550. "name": {
  18551. "type": "string"
  18552. },
  18553. "sessionID": {
  18554. "type": "string",
  18555. "pattern": "^ses"
  18556. },
  18557. "arguments": {
  18558. "type": "string"
  18559. },
  18560. "messageID": {
  18561. "type": "string",
  18562. "pattern": "^msg"
  18563. }
  18564. },
  18565. "required": ["name", "sessionID", "arguments", "messageID"],
  18566. "additionalProperties": false
  18567. }
  18568. },
  18569. "required": ["id", "type", "properties"],
  18570. "additionalProperties": false
  18571. },
  18572. "EventProjectUpdated": {
  18573. "type": "object",
  18574. "properties": {
  18575. "id": {
  18576. "type": "string"
  18577. },
  18578. "type": {
  18579. "type": "string",
  18580. "enum": ["project.updated"]
  18581. },
  18582. "properties": {
  18583. "$ref": "#/components/schemas/Project"
  18584. }
  18585. },
  18586. "required": ["id", "type", "properties"],
  18587. "additionalProperties": false
  18588. },
  18589. "EventSessionCompacted": {
  18590. "type": "object",
  18591. "properties": {
  18592. "id": {
  18593. "type": "string"
  18594. },
  18595. "type": {
  18596. "type": "string",
  18597. "enum": ["session.compacted"]
  18598. },
  18599. "properties": {
  18600. "type": "object",
  18601. "properties": {
  18602. "sessionID": {
  18603. "type": "string",
  18604. "pattern": "^ses"
  18605. }
  18606. },
  18607. "required": ["sessionID"],
  18608. "additionalProperties": false
  18609. }
  18610. },
  18611. "required": ["id", "type", "properties"],
  18612. "additionalProperties": false
  18613. },
  18614. "EventVcsBranchUpdated": {
  18615. "type": "object",
  18616. "properties": {
  18617. "id": {
  18618. "type": "string"
  18619. },
  18620. "type": {
  18621. "type": "string",
  18622. "enum": ["vcs.branch.updated"]
  18623. },
  18624. "properties": {
  18625. "type": "object",
  18626. "properties": {
  18627. "branch": {
  18628. "type": "string"
  18629. }
  18630. },
  18631. "additionalProperties": false
  18632. }
  18633. },
  18634. "required": ["id", "type", "properties"],
  18635. "additionalProperties": false
  18636. },
  18637. "EventWorkspaceReady": {
  18638. "type": "object",
  18639. "properties": {
  18640. "id": {
  18641. "type": "string"
  18642. },
  18643. "type": {
  18644. "type": "string",
  18645. "enum": ["workspace.ready"]
  18646. },
  18647. "properties": {
  18648. "type": "object",
  18649. "properties": {
  18650. "name": {
  18651. "type": "string"
  18652. }
  18653. },
  18654. "required": ["name"],
  18655. "additionalProperties": false
  18656. }
  18657. },
  18658. "required": ["id", "type", "properties"],
  18659. "additionalProperties": false
  18660. },
  18661. "EventWorkspaceFailed": {
  18662. "type": "object",
  18663. "properties": {
  18664. "id": {
  18665. "type": "string"
  18666. },
  18667. "type": {
  18668. "type": "string",
  18669. "enum": ["workspace.failed"]
  18670. },
  18671. "properties": {
  18672. "type": "object",
  18673. "properties": {
  18674. "message": {
  18675. "type": "string"
  18676. }
  18677. },
  18678. "required": ["message"],
  18679. "additionalProperties": false
  18680. }
  18681. },
  18682. "required": ["id", "type", "properties"],
  18683. "additionalProperties": false
  18684. },
  18685. "EventWorkspaceStatus": {
  18686. "type": "object",
  18687. "properties": {
  18688. "id": {
  18689. "type": "string"
  18690. },
  18691. "type": {
  18692. "type": "string",
  18693. "enum": ["workspace.status"]
  18694. },
  18695. "properties": {
  18696. "type": "object",
  18697. "properties": {
  18698. "workspaceID": {
  18699. "type": "string",
  18700. "pattern": "^wrk"
  18701. },
  18702. "status": {
  18703. "type": "string",
  18704. "enum": ["connected", "connecting", "disconnected", "error"]
  18705. }
  18706. },
  18707. "required": ["workspaceID", "status"],
  18708. "additionalProperties": false
  18709. }
  18710. },
  18711. "required": ["id", "type", "properties"],
  18712. "additionalProperties": false
  18713. },
  18714. "EventWorktreeReady": {
  18715. "type": "object",
  18716. "properties": {
  18717. "id": {
  18718. "type": "string"
  18719. },
  18720. "type": {
  18721. "type": "string",
  18722. "enum": ["worktree.ready"]
  18723. },
  18724. "properties": {
  18725. "type": "object",
  18726. "properties": {
  18727. "name": {
  18728. "type": "string"
  18729. },
  18730. "branch": {
  18731. "type": "string"
  18732. }
  18733. },
  18734. "required": ["name"],
  18735. "additionalProperties": false
  18736. }
  18737. },
  18738. "required": ["id", "type", "properties"],
  18739. "additionalProperties": false
  18740. },
  18741. "EventWorktreeFailed": {
  18742. "type": "object",
  18743. "properties": {
  18744. "id": {
  18745. "type": "string"
  18746. },
  18747. "type": {
  18748. "type": "string",
  18749. "enum": ["worktree.failed"]
  18750. },
  18751. "properties": {
  18752. "type": "object",
  18753. "properties": {
  18754. "message": {
  18755. "type": "string"
  18756. }
  18757. },
  18758. "required": ["message"],
  18759. "additionalProperties": false
  18760. }
  18761. },
  18762. "required": ["id", "type", "properties"],
  18763. "additionalProperties": false
  18764. },
  18765. "EventPtyCreated": {
  18766. "type": "object",
  18767. "properties": {
  18768. "id": {
  18769. "type": "string"
  18770. },
  18771. "type": {
  18772. "type": "string",
  18773. "enum": ["pty.created"]
  18774. },
  18775. "properties": {
  18776. "type": "object",
  18777. "properties": {
  18778. "info": {
  18779. "$ref": "#/components/schemas/Pty"
  18780. }
  18781. },
  18782. "required": ["info"],
  18783. "additionalProperties": false
  18784. }
  18785. },
  18786. "required": ["id", "type", "properties"],
  18787. "additionalProperties": false
  18788. },
  18789. "EventPtyUpdated": {
  18790. "type": "object",
  18791. "properties": {
  18792. "id": {
  18793. "type": "string"
  18794. },
  18795. "type": {
  18796. "type": "string",
  18797. "enum": ["pty.updated"]
  18798. },
  18799. "properties": {
  18800. "type": "object",
  18801. "properties": {
  18802. "info": {
  18803. "$ref": "#/components/schemas/Pty"
  18804. }
  18805. },
  18806. "required": ["info"],
  18807. "additionalProperties": false
  18808. }
  18809. },
  18810. "required": ["id", "type", "properties"],
  18811. "additionalProperties": false
  18812. },
  18813. "EventPtyExited": {
  18814. "type": "object",
  18815. "properties": {
  18816. "id": {
  18817. "type": "string"
  18818. },
  18819. "type": {
  18820. "type": "string",
  18821. "enum": ["pty.exited"]
  18822. },
  18823. "properties": {
  18824. "type": "object",
  18825. "properties": {
  18826. "id": {
  18827. "type": "string",
  18828. "pattern": "^pty"
  18829. },
  18830. "exitCode": {
  18831. "type": "integer",
  18832. "minimum": 0
  18833. }
  18834. },
  18835. "required": ["id", "exitCode"],
  18836. "additionalProperties": false
  18837. }
  18838. },
  18839. "required": ["id", "type", "properties"],
  18840. "additionalProperties": false
  18841. },
  18842. "EventPtyDeleted": {
  18843. "type": "object",
  18844. "properties": {
  18845. "id": {
  18846. "type": "string"
  18847. },
  18848. "type": {
  18849. "type": "string",
  18850. "enum": ["pty.deleted"]
  18851. },
  18852. "properties": {
  18853. "type": "object",
  18854. "properties": {
  18855. "id": {
  18856. "type": "string",
  18857. "pattern": "^pty"
  18858. }
  18859. },
  18860. "required": ["id"],
  18861. "additionalProperties": false
  18862. }
  18863. },
  18864. "required": ["id", "type", "properties"],
  18865. "additionalProperties": false
  18866. },
  18867. "EventInstallationUpdated": {
  18868. "type": "object",
  18869. "properties": {
  18870. "id": {
  18871. "type": "string"
  18872. },
  18873. "type": {
  18874. "type": "string",
  18875. "enum": ["installation.updated"]
  18876. },
  18877. "properties": {
  18878. "type": "object",
  18879. "properties": {
  18880. "version": {
  18881. "type": "string"
  18882. }
  18883. },
  18884. "required": ["version"],
  18885. "additionalProperties": false
  18886. }
  18887. },
  18888. "required": ["id", "type", "properties"],
  18889. "additionalProperties": false
  18890. },
  18891. "EventInstallationUpdate-available": {
  18892. "type": "object",
  18893. "properties": {
  18894. "id": {
  18895. "type": "string"
  18896. },
  18897. "type": {
  18898. "type": "string",
  18899. "enum": ["installation.update-available"]
  18900. },
  18901. "properties": {
  18902. "type": "object",
  18903. "properties": {
  18904. "version": {
  18905. "type": "string"
  18906. }
  18907. },
  18908. "required": ["version"],
  18909. "additionalProperties": false
  18910. }
  18911. },
  18912. "required": ["id", "type", "properties"],
  18913. "additionalProperties": false
  18914. },
  18915. "EventMessageUpdated": {
  18916. "type": "object",
  18917. "properties": {
  18918. "id": {
  18919. "type": "string"
  18920. },
  18921. "type": {
  18922. "type": "string",
  18923. "enum": ["message.updated"]
  18924. },
  18925. "properties": {
  18926. "type": "object",
  18927. "properties": {
  18928. "sessionID": {
  18929. "type": "string",
  18930. "pattern": "^ses"
  18931. },
  18932. "info": {
  18933. "$ref": "#/components/schemas/Message"
  18934. }
  18935. },
  18936. "required": ["sessionID", "info"],
  18937. "additionalProperties": false
  18938. }
  18939. },
  18940. "required": ["id", "type", "properties"],
  18941. "additionalProperties": false
  18942. },
  18943. "EventMessageRemoved": {
  18944. "type": "object",
  18945. "properties": {
  18946. "id": {
  18947. "type": "string"
  18948. },
  18949. "type": {
  18950. "type": "string",
  18951. "enum": ["message.removed"]
  18952. },
  18953. "properties": {
  18954. "type": "object",
  18955. "properties": {
  18956. "sessionID": {
  18957. "type": "string",
  18958. "pattern": "^ses"
  18959. },
  18960. "messageID": {
  18961. "type": "string",
  18962. "pattern": "^msg"
  18963. }
  18964. },
  18965. "required": ["sessionID", "messageID"],
  18966. "additionalProperties": false
  18967. }
  18968. },
  18969. "required": ["id", "type", "properties"],
  18970. "additionalProperties": false
  18971. },
  18972. "EventMessagePartUpdated": {
  18973. "type": "object",
  18974. "properties": {
  18975. "id": {
  18976. "type": "string"
  18977. },
  18978. "type": {
  18979. "type": "string",
  18980. "enum": ["message.part.updated"]
  18981. },
  18982. "properties": {
  18983. "type": "object",
  18984. "properties": {
  18985. "sessionID": {
  18986. "type": "string",
  18987. "pattern": "^ses"
  18988. },
  18989. "part": {
  18990. "$ref": "#/components/schemas/Part"
  18991. },
  18992. "time": {
  18993. "type": "integer",
  18994. "minimum": 0
  18995. }
  18996. },
  18997. "required": ["sessionID", "part", "time"],
  18998. "additionalProperties": false
  18999. }
  19000. },
  19001. "required": ["id", "type", "properties"],
  19002. "additionalProperties": false
  19003. },
  19004. "EventMessagePartRemoved": {
  19005. "type": "object",
  19006. "properties": {
  19007. "id": {
  19008. "type": "string"
  19009. },
  19010. "type": {
  19011. "type": "string",
  19012. "enum": ["message.part.removed"]
  19013. },
  19014. "properties": {
  19015. "type": "object",
  19016. "properties": {
  19017. "sessionID": {
  19018. "type": "string",
  19019. "pattern": "^ses"
  19020. },
  19021. "messageID": {
  19022. "type": "string",
  19023. "pattern": "^msg"
  19024. },
  19025. "partID": {
  19026. "type": "string",
  19027. "pattern": "^prt"
  19028. }
  19029. },
  19030. "required": ["sessionID", "messageID", "partID"],
  19031. "additionalProperties": false
  19032. }
  19033. },
  19034. "required": ["id", "type", "properties"],
  19035. "additionalProperties": false
  19036. },
  19037. "EventSessionCreated": {
  19038. "type": "object",
  19039. "properties": {
  19040. "id": {
  19041. "type": "string"
  19042. },
  19043. "type": {
  19044. "type": "string",
  19045. "enum": ["session.created"]
  19046. },
  19047. "properties": {
  19048. "type": "object",
  19049. "properties": {
  19050. "sessionID": {
  19051. "type": "string",
  19052. "pattern": "^ses"
  19053. },
  19054. "info": {
  19055. "$ref": "#/components/schemas/Session"
  19056. }
  19057. },
  19058. "required": ["sessionID", "info"],
  19059. "additionalProperties": false
  19060. }
  19061. },
  19062. "required": ["id", "type", "properties"],
  19063. "additionalProperties": false
  19064. },
  19065. "EventSessionUpdated": {
  19066. "type": "object",
  19067. "properties": {
  19068. "id": {
  19069. "type": "string"
  19070. },
  19071. "type": {
  19072. "type": "string",
  19073. "enum": ["session.updated"]
  19074. },
  19075. "properties": {
  19076. "type": "object",
  19077. "properties": {
  19078. "sessionID": {
  19079. "type": "string",
  19080. "pattern": "^ses"
  19081. },
  19082. "info": {
  19083. "$ref": "#/components/schemas/Session"
  19084. }
  19085. },
  19086. "required": ["sessionID", "info"],
  19087. "additionalProperties": false
  19088. }
  19089. },
  19090. "required": ["id", "type", "properties"],
  19091. "additionalProperties": false
  19092. },
  19093. "EventSessionDeleted": {
  19094. "type": "object",
  19095. "properties": {
  19096. "id": {
  19097. "type": "string"
  19098. },
  19099. "type": {
  19100. "type": "string",
  19101. "enum": ["session.deleted"]
  19102. },
  19103. "properties": {
  19104. "type": "object",
  19105. "properties": {
  19106. "sessionID": {
  19107. "type": "string",
  19108. "pattern": "^ses"
  19109. },
  19110. "info": {
  19111. "$ref": "#/components/schemas/Session"
  19112. }
  19113. },
  19114. "required": ["sessionID", "info"],
  19115. "additionalProperties": false
  19116. }
  19117. },
  19118. "required": ["id", "type", "properties"],
  19119. "additionalProperties": false
  19120. },
  19121. "EventSessionNextAgentSwitched": {
  19122. "type": "object",
  19123. "properties": {
  19124. "id": {
  19125. "type": "string"
  19126. },
  19127. "type": {
  19128. "type": "string",
  19129. "enum": ["session.next.agent.switched"]
  19130. },
  19131. "properties": {
  19132. "type": "object",
  19133. "properties": {
  19134. "timestamp": {
  19135. "type": "number"
  19136. },
  19137. "sessionID": {
  19138. "type": "string",
  19139. "pattern": "^ses"
  19140. },
  19141. "agent": {
  19142. "type": "string"
  19143. }
  19144. },
  19145. "required": ["timestamp", "sessionID", "agent"],
  19146. "additionalProperties": false
  19147. }
  19148. },
  19149. "required": ["id", "type", "properties"],
  19150. "additionalProperties": false
  19151. },
  19152. "EventSessionNextModelSwitched": {
  19153. "type": "object",
  19154. "properties": {
  19155. "id": {
  19156. "type": "string"
  19157. },
  19158. "type": {
  19159. "type": "string",
  19160. "enum": ["session.next.model.switched"]
  19161. },
  19162. "properties": {
  19163. "type": "object",
  19164. "properties": {
  19165. "timestamp": {
  19166. "type": "number"
  19167. },
  19168. "sessionID": {
  19169. "type": "string",
  19170. "pattern": "^ses"
  19171. },
  19172. "model": {
  19173. "type": "object",
  19174. "properties": {
  19175. "id": {
  19176. "type": "string"
  19177. },
  19178. "providerID": {
  19179. "type": "string"
  19180. },
  19181. "variant": {
  19182. "type": "string"
  19183. }
  19184. },
  19185. "required": ["id", "providerID", "variant"],
  19186. "additionalProperties": false
  19187. }
  19188. },
  19189. "required": ["timestamp", "sessionID", "model"],
  19190. "additionalProperties": false
  19191. }
  19192. },
  19193. "required": ["id", "type", "properties"],
  19194. "additionalProperties": false
  19195. },
  19196. "PromptSource": {
  19197. "type": "object",
  19198. "properties": {
  19199. "start": {
  19200. "type": "number"
  19201. },
  19202. "end": {
  19203. "type": "number"
  19204. },
  19205. "text": {
  19206. "type": "string"
  19207. }
  19208. },
  19209. "required": ["start", "end", "text"],
  19210. "additionalProperties": false
  19211. },
  19212. "PromptFileAttachment": {
  19213. "type": "object",
  19214. "properties": {
  19215. "uri": {
  19216. "type": "string"
  19217. },
  19218. "mime": {
  19219. "type": "string"
  19220. },
  19221. "name": {
  19222. "type": "string"
  19223. },
  19224. "description": {
  19225. "type": "string"
  19226. },
  19227. "source": {
  19228. "$ref": "#/components/schemas/PromptSource"
  19229. }
  19230. },
  19231. "required": ["uri", "mime"],
  19232. "additionalProperties": false
  19233. },
  19234. "PromptAgentAttachment": {
  19235. "type": "object",
  19236. "properties": {
  19237. "name": {
  19238. "type": "string"
  19239. },
  19240. "source": {
  19241. "$ref": "#/components/schemas/PromptSource"
  19242. }
  19243. },
  19244. "required": ["name"],
  19245. "additionalProperties": false
  19246. },
  19247. "PromptReferenceAttachment": {
  19248. "type": "object",
  19249. "properties": {
  19250. "name": {
  19251. "type": "string"
  19252. },
  19253. "kind": {
  19254. "type": "string",
  19255. "enum": ["local", "git", "invalid"]
  19256. },
  19257. "uri": {
  19258. "type": "string"
  19259. },
  19260. "repository": {
  19261. "type": "string"
  19262. },
  19263. "branch": {
  19264. "type": "string"
  19265. },
  19266. "target": {
  19267. "type": "string"
  19268. },
  19269. "targetUri": {
  19270. "type": "string"
  19271. },
  19272. "problem": {
  19273. "type": "string"
  19274. },
  19275. "source": {
  19276. "$ref": "#/components/schemas/PromptSource"
  19277. }
  19278. },
  19279. "required": ["name", "kind"],
  19280. "additionalProperties": false
  19281. },
  19282. "EventSessionNextPrompted": {
  19283. "type": "object",
  19284. "properties": {
  19285. "id": {
  19286. "type": "string"
  19287. },
  19288. "type": {
  19289. "type": "string",
  19290. "enum": ["session.next.prompted"]
  19291. },
  19292. "properties": {
  19293. "type": "object",
  19294. "properties": {
  19295. "timestamp": {
  19296. "type": "number"
  19297. },
  19298. "sessionID": {
  19299. "type": "string",
  19300. "pattern": "^ses"
  19301. },
  19302. "prompt": {
  19303. "$ref": "#/components/schemas/Prompt"
  19304. }
  19305. },
  19306. "required": ["timestamp", "sessionID", "prompt"],
  19307. "additionalProperties": false
  19308. }
  19309. },
  19310. "required": ["id", "type", "properties"],
  19311. "additionalProperties": false
  19312. },
  19313. "EventSessionNextSynthetic": {
  19314. "type": "object",
  19315. "properties": {
  19316. "id": {
  19317. "type": "string"
  19318. },
  19319. "type": {
  19320. "type": "string",
  19321. "enum": ["session.next.synthetic"]
  19322. },
  19323. "properties": {
  19324. "type": "object",
  19325. "properties": {
  19326. "timestamp": {
  19327. "type": "number"
  19328. },
  19329. "sessionID": {
  19330. "type": "string",
  19331. "pattern": "^ses"
  19332. },
  19333. "text": {
  19334. "type": "string"
  19335. }
  19336. },
  19337. "required": ["timestamp", "sessionID", "text"],
  19338. "additionalProperties": false
  19339. }
  19340. },
  19341. "required": ["id", "type", "properties"],
  19342. "additionalProperties": false
  19343. },
  19344. "EventSessionNextShellStarted": {
  19345. "type": "object",
  19346. "properties": {
  19347. "id": {
  19348. "type": "string"
  19349. },
  19350. "type": {
  19351. "type": "string",
  19352. "enum": ["session.next.shell.started"]
  19353. },
  19354. "properties": {
  19355. "type": "object",
  19356. "properties": {
  19357. "timestamp": {
  19358. "type": "number"
  19359. },
  19360. "sessionID": {
  19361. "type": "string",
  19362. "pattern": "^ses"
  19363. },
  19364. "callID": {
  19365. "type": "string"
  19366. },
  19367. "command": {
  19368. "type": "string"
  19369. }
  19370. },
  19371. "required": ["timestamp", "sessionID", "callID", "command"],
  19372. "additionalProperties": false
  19373. }
  19374. },
  19375. "required": ["id", "type", "properties"],
  19376. "additionalProperties": false
  19377. },
  19378. "EventSessionNextShellEnded": {
  19379. "type": "object",
  19380. "properties": {
  19381. "id": {
  19382. "type": "string"
  19383. },
  19384. "type": {
  19385. "type": "string",
  19386. "enum": ["session.next.shell.ended"]
  19387. },
  19388. "properties": {
  19389. "type": "object",
  19390. "properties": {
  19391. "timestamp": {
  19392. "type": "number"
  19393. },
  19394. "sessionID": {
  19395. "type": "string",
  19396. "pattern": "^ses"
  19397. },
  19398. "callID": {
  19399. "type": "string"
  19400. },
  19401. "output": {
  19402. "type": "string"
  19403. }
  19404. },
  19405. "required": ["timestamp", "sessionID", "callID", "output"],
  19406. "additionalProperties": false
  19407. }
  19408. },
  19409. "required": ["id", "type", "properties"],
  19410. "additionalProperties": false
  19411. },
  19412. "EventSessionNextStepStarted": {
  19413. "type": "object",
  19414. "properties": {
  19415. "id": {
  19416. "type": "string"
  19417. },
  19418. "type": {
  19419. "type": "string",
  19420. "enum": ["session.next.step.started"]
  19421. },
  19422. "properties": {
  19423. "type": "object",
  19424. "properties": {
  19425. "timestamp": {
  19426. "type": "number"
  19427. },
  19428. "sessionID": {
  19429. "type": "string",
  19430. "pattern": "^ses"
  19431. },
  19432. "agent": {
  19433. "type": "string"
  19434. },
  19435. "model": {
  19436. "type": "object",
  19437. "properties": {
  19438. "id": {
  19439. "type": "string"
  19440. },
  19441. "providerID": {
  19442. "type": "string"
  19443. },
  19444. "variant": {
  19445. "type": "string"
  19446. }
  19447. },
  19448. "required": ["id", "providerID", "variant"],
  19449. "additionalProperties": false
  19450. },
  19451. "snapshot": {
  19452. "type": "string"
  19453. }
  19454. },
  19455. "required": ["timestamp", "sessionID", "agent", "model"],
  19456. "additionalProperties": false
  19457. }
  19458. },
  19459. "required": ["id", "type", "properties"],
  19460. "additionalProperties": false
  19461. },
  19462. "EventSessionNextStepEnded": {
  19463. "type": "object",
  19464. "properties": {
  19465. "id": {
  19466. "type": "string"
  19467. },
  19468. "type": {
  19469. "type": "string",
  19470. "enum": ["session.next.step.ended"]
  19471. },
  19472. "properties": {
  19473. "type": "object",
  19474. "properties": {
  19475. "timestamp": {
  19476. "type": "number"
  19477. },
  19478. "sessionID": {
  19479. "type": "string",
  19480. "pattern": "^ses"
  19481. },
  19482. "finish": {
  19483. "type": "string"
  19484. },
  19485. "cost": {
  19486. "type": "number"
  19487. },
  19488. "tokens": {
  19489. "type": "object",
  19490. "properties": {
  19491. "input": {
  19492. "type": "number"
  19493. },
  19494. "output": {
  19495. "type": "number"
  19496. },
  19497. "reasoning": {
  19498. "type": "number"
  19499. },
  19500. "cache": {
  19501. "type": "object",
  19502. "properties": {
  19503. "read": {
  19504. "type": "number"
  19505. },
  19506. "write": {
  19507. "type": "number"
  19508. }
  19509. },
  19510. "required": ["read", "write"],
  19511. "additionalProperties": false
  19512. }
  19513. },
  19514. "required": ["input", "output", "reasoning", "cache"],
  19515. "additionalProperties": false
  19516. },
  19517. "snapshot": {
  19518. "type": "string"
  19519. }
  19520. },
  19521. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19522. "additionalProperties": false
  19523. }
  19524. },
  19525. "required": ["id", "type", "properties"],
  19526. "additionalProperties": false
  19527. },
  19528. "SessionErrorUnknown": {
  19529. "type": "object",
  19530. "properties": {
  19531. "type": {
  19532. "type": "string",
  19533. "enum": ["unknown"]
  19534. },
  19535. "message": {
  19536. "type": "string"
  19537. }
  19538. },
  19539. "required": ["type", "message"],
  19540. "additionalProperties": false
  19541. },
  19542. "EventSessionNextStepFailed": {
  19543. "type": "object",
  19544. "properties": {
  19545. "id": {
  19546. "type": "string"
  19547. },
  19548. "type": {
  19549. "type": "string",
  19550. "enum": ["session.next.step.failed"]
  19551. },
  19552. "properties": {
  19553. "type": "object",
  19554. "properties": {
  19555. "timestamp": {
  19556. "type": "number"
  19557. },
  19558. "sessionID": {
  19559. "type": "string",
  19560. "pattern": "^ses"
  19561. },
  19562. "error": {
  19563. "$ref": "#/components/schemas/SessionErrorUnknown"
  19564. }
  19565. },
  19566. "required": ["timestamp", "sessionID", "error"],
  19567. "additionalProperties": false
  19568. }
  19569. },
  19570. "required": ["id", "type", "properties"],
  19571. "additionalProperties": false
  19572. },
  19573. "EventSessionNextTextStarted": {
  19574. "type": "object",
  19575. "properties": {
  19576. "id": {
  19577. "type": "string"
  19578. },
  19579. "type": {
  19580. "type": "string",
  19581. "enum": ["session.next.text.started"]
  19582. },
  19583. "properties": {
  19584. "type": "object",
  19585. "properties": {
  19586. "timestamp": {
  19587. "type": "number"
  19588. },
  19589. "sessionID": {
  19590. "type": "string",
  19591. "pattern": "^ses"
  19592. }
  19593. },
  19594. "required": ["timestamp", "sessionID"],
  19595. "additionalProperties": false
  19596. }
  19597. },
  19598. "required": ["id", "type", "properties"],
  19599. "additionalProperties": false
  19600. },
  19601. "EventSessionNextTextDelta": {
  19602. "type": "object",
  19603. "properties": {
  19604. "id": {
  19605. "type": "string"
  19606. },
  19607. "type": {
  19608. "type": "string",
  19609. "enum": ["session.next.text.delta"]
  19610. },
  19611. "properties": {
  19612. "type": "object",
  19613. "properties": {
  19614. "timestamp": {
  19615. "type": "number"
  19616. },
  19617. "sessionID": {
  19618. "type": "string",
  19619. "pattern": "^ses"
  19620. },
  19621. "delta": {
  19622. "type": "string"
  19623. }
  19624. },
  19625. "required": ["timestamp", "sessionID", "delta"],
  19626. "additionalProperties": false
  19627. }
  19628. },
  19629. "required": ["id", "type", "properties"],
  19630. "additionalProperties": false
  19631. },
  19632. "EventSessionNextTextEnded": {
  19633. "type": "object",
  19634. "properties": {
  19635. "id": {
  19636. "type": "string"
  19637. },
  19638. "type": {
  19639. "type": "string",
  19640. "enum": ["session.next.text.ended"]
  19641. },
  19642. "properties": {
  19643. "type": "object",
  19644. "properties": {
  19645. "timestamp": {
  19646. "type": "number"
  19647. },
  19648. "sessionID": {
  19649. "type": "string",
  19650. "pattern": "^ses"
  19651. },
  19652. "text": {
  19653. "type": "string"
  19654. }
  19655. },
  19656. "required": ["timestamp", "sessionID", "text"],
  19657. "additionalProperties": false
  19658. }
  19659. },
  19660. "required": ["id", "type", "properties"],
  19661. "additionalProperties": false
  19662. },
  19663. "EventSessionNextReasoningStarted": {
  19664. "type": "object",
  19665. "properties": {
  19666. "id": {
  19667. "type": "string"
  19668. },
  19669. "type": {
  19670. "type": "string",
  19671. "enum": ["session.next.reasoning.started"]
  19672. },
  19673. "properties": {
  19674. "type": "object",
  19675. "properties": {
  19676. "timestamp": {
  19677. "type": "number"
  19678. },
  19679. "sessionID": {
  19680. "type": "string",
  19681. "pattern": "^ses"
  19682. },
  19683. "reasoningID": {
  19684. "type": "string"
  19685. }
  19686. },
  19687. "required": ["timestamp", "sessionID", "reasoningID"],
  19688. "additionalProperties": false
  19689. }
  19690. },
  19691. "required": ["id", "type", "properties"],
  19692. "additionalProperties": false
  19693. },
  19694. "EventSessionNextReasoningDelta": {
  19695. "type": "object",
  19696. "properties": {
  19697. "id": {
  19698. "type": "string"
  19699. },
  19700. "type": {
  19701. "type": "string",
  19702. "enum": ["session.next.reasoning.delta"]
  19703. },
  19704. "properties": {
  19705. "type": "object",
  19706. "properties": {
  19707. "timestamp": {
  19708. "type": "number"
  19709. },
  19710. "sessionID": {
  19711. "type": "string",
  19712. "pattern": "^ses"
  19713. },
  19714. "reasoningID": {
  19715. "type": "string"
  19716. },
  19717. "delta": {
  19718. "type": "string"
  19719. }
  19720. },
  19721. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19722. "additionalProperties": false
  19723. }
  19724. },
  19725. "required": ["id", "type", "properties"],
  19726. "additionalProperties": false
  19727. },
  19728. "EventSessionNextReasoningEnded": {
  19729. "type": "object",
  19730. "properties": {
  19731. "id": {
  19732. "type": "string"
  19733. },
  19734. "type": {
  19735. "type": "string",
  19736. "enum": ["session.next.reasoning.ended"]
  19737. },
  19738. "properties": {
  19739. "type": "object",
  19740. "properties": {
  19741. "timestamp": {
  19742. "type": "number"
  19743. },
  19744. "sessionID": {
  19745. "type": "string",
  19746. "pattern": "^ses"
  19747. },
  19748. "reasoningID": {
  19749. "type": "string"
  19750. },
  19751. "text": {
  19752. "type": "string"
  19753. }
  19754. },
  19755. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19756. "additionalProperties": false
  19757. }
  19758. },
  19759. "required": ["id", "type", "properties"],
  19760. "additionalProperties": false
  19761. },
  19762. "EventSessionNextToolInputStarted": {
  19763. "type": "object",
  19764. "properties": {
  19765. "id": {
  19766. "type": "string"
  19767. },
  19768. "type": {
  19769. "type": "string",
  19770. "enum": ["session.next.tool.input.started"]
  19771. },
  19772. "properties": {
  19773. "type": "object",
  19774. "properties": {
  19775. "timestamp": {
  19776. "type": "number"
  19777. },
  19778. "sessionID": {
  19779. "type": "string",
  19780. "pattern": "^ses"
  19781. },
  19782. "callID": {
  19783. "type": "string"
  19784. },
  19785. "name": {
  19786. "type": "string"
  19787. }
  19788. },
  19789. "required": ["timestamp", "sessionID", "callID", "name"],
  19790. "additionalProperties": false
  19791. }
  19792. },
  19793. "required": ["id", "type", "properties"],
  19794. "additionalProperties": false
  19795. },
  19796. "EventSessionNextToolInputDelta": {
  19797. "type": "object",
  19798. "properties": {
  19799. "id": {
  19800. "type": "string"
  19801. },
  19802. "type": {
  19803. "type": "string",
  19804. "enum": ["session.next.tool.input.delta"]
  19805. },
  19806. "properties": {
  19807. "type": "object",
  19808. "properties": {
  19809. "timestamp": {
  19810. "type": "number"
  19811. },
  19812. "sessionID": {
  19813. "type": "string",
  19814. "pattern": "^ses"
  19815. },
  19816. "callID": {
  19817. "type": "string"
  19818. },
  19819. "delta": {
  19820. "type": "string"
  19821. }
  19822. },
  19823. "required": ["timestamp", "sessionID", "callID", "delta"],
  19824. "additionalProperties": false
  19825. }
  19826. },
  19827. "required": ["id", "type", "properties"],
  19828. "additionalProperties": false
  19829. },
  19830. "EventSessionNextToolInputEnded": {
  19831. "type": "object",
  19832. "properties": {
  19833. "id": {
  19834. "type": "string"
  19835. },
  19836. "type": {
  19837. "type": "string",
  19838. "enum": ["session.next.tool.input.ended"]
  19839. },
  19840. "properties": {
  19841. "type": "object",
  19842. "properties": {
  19843. "timestamp": {
  19844. "type": "number"
  19845. },
  19846. "sessionID": {
  19847. "type": "string",
  19848. "pattern": "^ses"
  19849. },
  19850. "callID": {
  19851. "type": "string"
  19852. },
  19853. "text": {
  19854. "type": "string"
  19855. }
  19856. },
  19857. "required": ["timestamp", "sessionID", "callID", "text"],
  19858. "additionalProperties": false
  19859. }
  19860. },
  19861. "required": ["id", "type", "properties"],
  19862. "additionalProperties": false
  19863. },
  19864. "EventSessionNextToolCalled": {
  19865. "type": "object",
  19866. "properties": {
  19867. "id": {
  19868. "type": "string"
  19869. },
  19870. "type": {
  19871. "type": "string",
  19872. "enum": ["session.next.tool.called"]
  19873. },
  19874. "properties": {
  19875. "type": "object",
  19876. "properties": {
  19877. "timestamp": {
  19878. "type": "number"
  19879. },
  19880. "sessionID": {
  19881. "type": "string",
  19882. "pattern": "^ses"
  19883. },
  19884. "callID": {
  19885. "type": "string"
  19886. },
  19887. "tool": {
  19888. "type": "string"
  19889. },
  19890. "input": {
  19891. "type": "object"
  19892. },
  19893. "provider": {
  19894. "type": "object",
  19895. "properties": {
  19896. "executed": {
  19897. "type": "boolean"
  19898. },
  19899. "metadata": {
  19900. "type": "object"
  19901. }
  19902. },
  19903. "required": ["executed"],
  19904. "additionalProperties": false
  19905. }
  19906. },
  19907. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19908. "additionalProperties": false
  19909. }
  19910. },
  19911. "required": ["id", "type", "properties"],
  19912. "additionalProperties": false
  19913. },
  19914. "ToolTextContent": {
  19915. "type": "object",
  19916. "properties": {
  19917. "type": {
  19918. "type": "string",
  19919. "enum": ["text"]
  19920. },
  19921. "text": {
  19922. "type": "string"
  19923. }
  19924. },
  19925. "required": ["type", "text"],
  19926. "additionalProperties": false
  19927. },
  19928. "ToolFileContent": {
  19929. "type": "object",
  19930. "properties": {
  19931. "type": {
  19932. "type": "string",
  19933. "enum": ["file"]
  19934. },
  19935. "uri": {
  19936. "type": "string"
  19937. },
  19938. "mime": {
  19939. "type": "string"
  19940. },
  19941. "name": {
  19942. "type": "string"
  19943. }
  19944. },
  19945. "required": ["type", "uri", "mime"],
  19946. "additionalProperties": false
  19947. },
  19948. "EventSessionNextToolProgress": {
  19949. "type": "object",
  19950. "properties": {
  19951. "id": {
  19952. "type": "string"
  19953. },
  19954. "type": {
  19955. "type": "string",
  19956. "enum": ["session.next.tool.progress"]
  19957. },
  19958. "properties": {
  19959. "type": "object",
  19960. "properties": {
  19961. "timestamp": {
  19962. "type": "number"
  19963. },
  19964. "sessionID": {
  19965. "type": "string",
  19966. "pattern": "^ses"
  19967. },
  19968. "callID": {
  19969. "type": "string"
  19970. },
  19971. "structured": {
  19972. "type": "object"
  19973. },
  19974. "content": {
  19975. "type": "array",
  19976. "items": {
  19977. "anyOf": [
  19978. {
  19979. "$ref": "#/components/schemas/ToolTextContent"
  19980. },
  19981. {
  19982. "$ref": "#/components/schemas/ToolFileContent"
  19983. }
  19984. ]
  19985. }
  19986. }
  19987. },
  19988. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19989. "additionalProperties": false
  19990. }
  19991. },
  19992. "required": ["id", "type", "properties"],
  19993. "additionalProperties": false
  19994. },
  19995. "EventSessionNextToolSuccess": {
  19996. "type": "object",
  19997. "properties": {
  19998. "id": {
  19999. "type": "string"
  20000. },
  20001. "type": {
  20002. "type": "string",
  20003. "enum": ["session.next.tool.success"]
  20004. },
  20005. "properties": {
  20006. "type": "object",
  20007. "properties": {
  20008. "timestamp": {
  20009. "type": "number"
  20010. },
  20011. "sessionID": {
  20012. "type": "string",
  20013. "pattern": "^ses"
  20014. },
  20015. "callID": {
  20016. "type": "string"
  20017. },
  20018. "structured": {
  20019. "type": "object"
  20020. },
  20021. "content": {
  20022. "type": "array",
  20023. "items": {
  20024. "anyOf": [
  20025. {
  20026. "$ref": "#/components/schemas/ToolTextContent"
  20027. },
  20028. {
  20029. "$ref": "#/components/schemas/ToolFileContent"
  20030. }
  20031. ]
  20032. }
  20033. },
  20034. "provider": {
  20035. "type": "object",
  20036. "properties": {
  20037. "executed": {
  20038. "type": "boolean"
  20039. },
  20040. "metadata": {
  20041. "type": "object"
  20042. }
  20043. },
  20044. "required": ["executed"],
  20045. "additionalProperties": false
  20046. }
  20047. },
  20048. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20049. "additionalProperties": false
  20050. }
  20051. },
  20052. "required": ["id", "type", "properties"],
  20053. "additionalProperties": false
  20054. },
  20055. "EventSessionNextToolFailed": {
  20056. "type": "object",
  20057. "properties": {
  20058. "id": {
  20059. "type": "string"
  20060. },
  20061. "type": {
  20062. "type": "string",
  20063. "enum": ["session.next.tool.failed"]
  20064. },
  20065. "properties": {
  20066. "type": "object",
  20067. "properties": {
  20068. "timestamp": {
  20069. "type": "number"
  20070. },
  20071. "sessionID": {
  20072. "type": "string",
  20073. "pattern": "^ses"
  20074. },
  20075. "callID": {
  20076. "type": "string"
  20077. },
  20078. "error": {
  20079. "$ref": "#/components/schemas/SessionErrorUnknown"
  20080. },
  20081. "provider": {
  20082. "type": "object",
  20083. "properties": {
  20084. "executed": {
  20085. "type": "boolean"
  20086. },
  20087. "metadata": {
  20088. "type": "object"
  20089. }
  20090. },
  20091. "required": ["executed"],
  20092. "additionalProperties": false
  20093. }
  20094. },
  20095. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20096. "additionalProperties": false
  20097. }
  20098. },
  20099. "required": ["id", "type", "properties"],
  20100. "additionalProperties": false
  20101. },
  20102. "SessionNextRetry_error": {
  20103. "type": "object",
  20104. "properties": {
  20105. "message": {
  20106. "type": "string"
  20107. },
  20108. "statusCode": {
  20109. "type": "number"
  20110. },
  20111. "isRetryable": {
  20112. "type": "boolean"
  20113. },
  20114. "responseHeaders": {
  20115. "type": "object",
  20116. "additionalProperties": {
  20117. "type": "string"
  20118. }
  20119. },
  20120. "responseBody": {
  20121. "type": "string"
  20122. },
  20123. "metadata": {
  20124. "type": "object",
  20125. "additionalProperties": {
  20126. "type": "string"
  20127. }
  20128. }
  20129. },
  20130. "required": ["message", "isRetryable"],
  20131. "additionalProperties": false
  20132. },
  20133. "EventSessionNextRetried": {
  20134. "type": "object",
  20135. "properties": {
  20136. "id": {
  20137. "type": "string"
  20138. },
  20139. "type": {
  20140. "type": "string",
  20141. "enum": ["session.next.retried"]
  20142. },
  20143. "properties": {
  20144. "type": "object",
  20145. "properties": {
  20146. "timestamp": {
  20147. "type": "number"
  20148. },
  20149. "sessionID": {
  20150. "type": "string",
  20151. "pattern": "^ses"
  20152. },
  20153. "attempt": {
  20154. "type": "number"
  20155. },
  20156. "error": {
  20157. "$ref": "#/components/schemas/SessionNextRetry_error"
  20158. }
  20159. },
  20160. "required": ["timestamp", "sessionID", "attempt", "error"],
  20161. "additionalProperties": false
  20162. }
  20163. },
  20164. "required": ["id", "type", "properties"],
  20165. "additionalProperties": false
  20166. },
  20167. "EventSessionNextCompactionStarted": {
  20168. "type": "object",
  20169. "properties": {
  20170. "id": {
  20171. "type": "string"
  20172. },
  20173. "type": {
  20174. "type": "string",
  20175. "enum": ["session.next.compaction.started"]
  20176. },
  20177. "properties": {
  20178. "type": "object",
  20179. "properties": {
  20180. "timestamp": {
  20181. "type": "number"
  20182. },
  20183. "sessionID": {
  20184. "type": "string",
  20185. "pattern": "^ses"
  20186. },
  20187. "reason": {
  20188. "type": "string",
  20189. "enum": ["auto", "manual"]
  20190. }
  20191. },
  20192. "required": ["timestamp", "sessionID", "reason"],
  20193. "additionalProperties": false
  20194. }
  20195. },
  20196. "required": ["id", "type", "properties"],
  20197. "additionalProperties": false
  20198. },
  20199. "EventSessionNextCompactionDelta": {
  20200. "type": "object",
  20201. "properties": {
  20202. "id": {
  20203. "type": "string"
  20204. },
  20205. "type": {
  20206. "type": "string",
  20207. "enum": ["session.next.compaction.delta"]
  20208. },
  20209. "properties": {
  20210. "type": "object",
  20211. "properties": {
  20212. "timestamp": {
  20213. "type": "number"
  20214. },
  20215. "sessionID": {
  20216. "type": "string",
  20217. "pattern": "^ses"
  20218. },
  20219. "text": {
  20220. "type": "string"
  20221. }
  20222. },
  20223. "required": ["timestamp", "sessionID", "text"],
  20224. "additionalProperties": false
  20225. }
  20226. },
  20227. "required": ["id", "type", "properties"],
  20228. "additionalProperties": false
  20229. },
  20230. "EventSessionNextCompactionEnded": {
  20231. "type": "object",
  20232. "properties": {
  20233. "id": {
  20234. "type": "string"
  20235. },
  20236. "type": {
  20237. "type": "string",
  20238. "enum": ["session.next.compaction.ended"]
  20239. },
  20240. "properties": {
  20241. "type": "object",
  20242. "properties": {
  20243. "timestamp": {
  20244. "type": "number"
  20245. },
  20246. "sessionID": {
  20247. "type": "string",
  20248. "pattern": "^ses"
  20249. },
  20250. "text": {
  20251. "type": "string"
  20252. },
  20253. "include": {
  20254. "type": "string"
  20255. }
  20256. },
  20257. "required": ["timestamp", "sessionID", "text"],
  20258. "additionalProperties": false
  20259. }
  20260. },
  20261. "required": ["id", "type", "properties"],
  20262. "additionalProperties": false
  20263. },
  20264. "ModelV2Info": {
  20265. "type": "object",
  20266. "properties": {
  20267. "id": {
  20268. "type": "string"
  20269. },
  20270. "apiID": {
  20271. "type": "string"
  20272. },
  20273. "providerID": {
  20274. "type": "string"
  20275. },
  20276. "family": {
  20277. "type": "string"
  20278. },
  20279. "name": {
  20280. "type": "string"
  20281. },
  20282. "endpoint": {
  20283. "anyOf": [
  20284. {
  20285. "type": "object",
  20286. "properties": {
  20287. "type": {
  20288. "type": "string",
  20289. "enum": ["unknown"]
  20290. }
  20291. },
  20292. "required": ["type"],
  20293. "additionalProperties": false
  20294. },
  20295. {
  20296. "type": "object",
  20297. "properties": {
  20298. "type": {
  20299. "type": "string",
  20300. "enum": ["openai/responses"]
  20301. },
  20302. "url": {
  20303. "type": "string"
  20304. },
  20305. "websocket": {
  20306. "type": "boolean"
  20307. }
  20308. },
  20309. "required": ["type", "url"],
  20310. "additionalProperties": false
  20311. },
  20312. {
  20313. "type": "object",
  20314. "properties": {
  20315. "type": {
  20316. "type": "string",
  20317. "enum": ["openai/completions"]
  20318. },
  20319. "url": {
  20320. "type": "string"
  20321. },
  20322. "reasoning": {
  20323. "anyOf": [
  20324. {
  20325. "type": "object",
  20326. "properties": {
  20327. "type": {
  20328. "type": "string",
  20329. "enum": ["reasoning_content"]
  20330. }
  20331. },
  20332. "required": ["type"],
  20333. "additionalProperties": false
  20334. },
  20335. {
  20336. "type": "object",
  20337. "properties": {
  20338. "type": {
  20339. "type": "string",
  20340. "enum": ["reasoning_details"]
  20341. }
  20342. },
  20343. "required": ["type"],
  20344. "additionalProperties": false
  20345. }
  20346. ]
  20347. }
  20348. },
  20349. "required": ["type", "url"],
  20350. "additionalProperties": false
  20351. },
  20352. {
  20353. "type": "object",
  20354. "properties": {
  20355. "type": {
  20356. "type": "string",
  20357. "enum": ["anthropic/messages"]
  20358. },
  20359. "url": {
  20360. "type": "string"
  20361. }
  20362. },
  20363. "required": ["type", "url"],
  20364. "additionalProperties": false
  20365. },
  20366. {
  20367. "type": "object",
  20368. "properties": {
  20369. "type": {
  20370. "type": "string",
  20371. "enum": ["aisdk"]
  20372. },
  20373. "package": {
  20374. "type": "string"
  20375. },
  20376. "url": {
  20377. "type": "string"
  20378. }
  20379. },
  20380. "required": ["type", "package"],
  20381. "additionalProperties": false
  20382. }
  20383. ]
  20384. },
  20385. "capabilities": {
  20386. "type": "object",
  20387. "properties": {
  20388. "tools": {
  20389. "type": "boolean"
  20390. },
  20391. "input": {
  20392. "type": "array",
  20393. "items": {
  20394. "type": "string"
  20395. }
  20396. },
  20397. "output": {
  20398. "type": "array",
  20399. "items": {
  20400. "type": "string"
  20401. }
  20402. }
  20403. },
  20404. "required": ["tools", "input", "output"],
  20405. "additionalProperties": false
  20406. },
  20407. "options": {
  20408. "type": "object",
  20409. "properties": {
  20410. "headers": {
  20411. "type": "object",
  20412. "additionalProperties": {
  20413. "type": "string"
  20414. }
  20415. },
  20416. "body": {
  20417. "type": "object"
  20418. },
  20419. "aisdk": {
  20420. "type": "object",
  20421. "properties": {
  20422. "provider": {
  20423. "type": "object"
  20424. },
  20425. "request": {
  20426. "type": "object"
  20427. }
  20428. },
  20429. "required": ["provider", "request"],
  20430. "additionalProperties": false
  20431. },
  20432. "variant": {
  20433. "type": "string"
  20434. }
  20435. },
  20436. "required": ["headers", "body", "aisdk"],
  20437. "additionalProperties": false
  20438. },
  20439. "variants": {
  20440. "type": "array",
  20441. "items": {
  20442. "type": "object",
  20443. "properties": {
  20444. "id": {
  20445. "type": "string"
  20446. },
  20447. "headers": {
  20448. "type": "object",
  20449. "additionalProperties": {
  20450. "type": "string"
  20451. }
  20452. },
  20453. "body": {
  20454. "type": "object"
  20455. },
  20456. "aisdk": {
  20457. "type": "object",
  20458. "properties": {
  20459. "provider": {
  20460. "type": "object"
  20461. },
  20462. "request": {
  20463. "type": "object"
  20464. }
  20465. },
  20466. "required": ["provider", "request"],
  20467. "additionalProperties": false
  20468. }
  20469. },
  20470. "required": ["id", "headers", "body", "aisdk"],
  20471. "additionalProperties": false
  20472. }
  20473. },
  20474. "time": {
  20475. "type": "object",
  20476. "properties": {
  20477. "released": {
  20478. "anyOf": [
  20479. {
  20480. "type": "number"
  20481. },
  20482. {
  20483. "type": "string",
  20484. "enum": ["NaN"]
  20485. },
  20486. {
  20487. "type": "string",
  20488. "enum": ["Infinity"]
  20489. },
  20490. {
  20491. "type": "string",
  20492. "enum": ["-Infinity"]
  20493. },
  20494. {
  20495. "type": "string",
  20496. "enum": ["Infinity", "-Infinity", "NaN"]
  20497. }
  20498. ]
  20499. }
  20500. },
  20501. "required": ["released"],
  20502. "additionalProperties": false
  20503. },
  20504. "cost": {
  20505. "type": "array",
  20506. "items": {
  20507. "type": "object",
  20508. "properties": {
  20509. "tier": {
  20510. "type": "object",
  20511. "properties": {
  20512. "type": {
  20513. "type": "string",
  20514. "enum": ["context"]
  20515. },
  20516. "size": {
  20517. "type": "integer"
  20518. }
  20519. },
  20520. "required": ["type", "size"],
  20521. "additionalProperties": false
  20522. },
  20523. "input": {
  20524. "type": "number"
  20525. },
  20526. "output": {
  20527. "type": "number"
  20528. },
  20529. "cache": {
  20530. "type": "object",
  20531. "properties": {
  20532. "read": {
  20533. "type": "number"
  20534. },
  20535. "write": {
  20536. "type": "number"
  20537. }
  20538. },
  20539. "required": ["read", "write"],
  20540. "additionalProperties": false
  20541. }
  20542. },
  20543. "required": ["input", "output", "cache"],
  20544. "additionalProperties": false
  20545. }
  20546. },
  20547. "status": {
  20548. "type": "string",
  20549. "enum": ["alpha", "beta", "deprecated", "active"]
  20550. },
  20551. "enabled": {
  20552. "type": "boolean"
  20553. },
  20554. "limit": {
  20555. "type": "object",
  20556. "properties": {
  20557. "context": {
  20558. "type": "integer"
  20559. },
  20560. "input": {
  20561. "type": "integer"
  20562. },
  20563. "output": {
  20564. "type": "integer"
  20565. }
  20566. },
  20567. "required": ["context", "output"],
  20568. "additionalProperties": false
  20569. }
  20570. },
  20571. "required": [
  20572. "id",
  20573. "apiID",
  20574. "providerID",
  20575. "name",
  20576. "endpoint",
  20577. "capabilities",
  20578. "options",
  20579. "variants",
  20580. "time",
  20581. "cost",
  20582. "status",
  20583. "enabled",
  20584. "limit"
  20585. ],
  20586. "additionalProperties": false
  20587. },
  20588. "EventCatalogModelUpdated": {
  20589. "type": "object",
  20590. "properties": {
  20591. "id": {
  20592. "type": "string"
  20593. },
  20594. "type": {
  20595. "type": "string",
  20596. "enum": ["catalog.model.updated"]
  20597. },
  20598. "properties": {
  20599. "type": "object",
  20600. "properties": {
  20601. "model": {
  20602. "$ref": "#/components/schemas/ModelV2Info"
  20603. }
  20604. },
  20605. "required": ["model"],
  20606. "additionalProperties": false
  20607. }
  20608. },
  20609. "required": ["id", "type", "properties"],
  20610. "additionalProperties": false
  20611. },
  20612. "EventModels-devRefreshed": {
  20613. "type": "object",
  20614. "properties": {
  20615. "id": {
  20616. "type": "string"
  20617. },
  20618. "type": {
  20619. "type": "string",
  20620. "enum": ["models-dev.refreshed"]
  20621. },
  20622. "properties": {
  20623. "type": "object",
  20624. "properties": {}
  20625. }
  20626. },
  20627. "required": ["id", "type", "properties"],
  20628. "additionalProperties": false
  20629. },
  20630. "AccountV2OAuthCredential": {
  20631. "type": "object",
  20632. "properties": {
  20633. "type": {
  20634. "type": "string",
  20635. "enum": ["oauth"]
  20636. },
  20637. "refresh": {
  20638. "type": "string"
  20639. },
  20640. "access": {
  20641. "type": "string"
  20642. },
  20643. "expires": {
  20644. "type": "integer",
  20645. "minimum": 0
  20646. }
  20647. },
  20648. "required": ["type", "refresh", "access", "expires"],
  20649. "additionalProperties": false
  20650. },
  20651. "AccountV2ApiKeyCredential": {
  20652. "type": "object",
  20653. "properties": {
  20654. "type": {
  20655. "type": "string",
  20656. "enum": ["api"]
  20657. },
  20658. "key": {
  20659. "type": "string"
  20660. },
  20661. "metadata": {
  20662. "type": "object",
  20663. "additionalProperties": {
  20664. "type": "string"
  20665. }
  20666. }
  20667. },
  20668. "required": ["type", "key"],
  20669. "additionalProperties": false
  20670. },
  20671. "AccountV2Credential": {
  20672. "anyOf": [
  20673. {
  20674. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20675. },
  20676. {
  20677. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20678. }
  20679. ]
  20680. },
  20681. "AccountV2Info": {
  20682. "type": "object",
  20683. "properties": {
  20684. "id": {
  20685. "type": "string"
  20686. },
  20687. "serviceID": {
  20688. "type": "string"
  20689. },
  20690. "description": {
  20691. "type": "string"
  20692. },
  20693. "credential": {
  20694. "$ref": "#/components/schemas/AccountV2Credential"
  20695. }
  20696. },
  20697. "required": ["id", "serviceID", "description", "credential"],
  20698. "additionalProperties": false
  20699. },
  20700. "EventAccountAdded": {
  20701. "type": "object",
  20702. "properties": {
  20703. "id": {
  20704. "type": "string"
  20705. },
  20706. "type": {
  20707. "type": "string",
  20708. "enum": ["account.added"]
  20709. },
  20710. "properties": {
  20711. "type": "object",
  20712. "properties": {
  20713. "account": {
  20714. "$ref": "#/components/schemas/AccountV2Info"
  20715. }
  20716. },
  20717. "required": ["account"],
  20718. "additionalProperties": false
  20719. }
  20720. },
  20721. "required": ["id", "type", "properties"],
  20722. "additionalProperties": false
  20723. },
  20724. "EventAccountRemoved": {
  20725. "type": "object",
  20726. "properties": {
  20727. "id": {
  20728. "type": "string"
  20729. },
  20730. "type": {
  20731. "type": "string",
  20732. "enum": ["account.removed"]
  20733. },
  20734. "properties": {
  20735. "type": "object",
  20736. "properties": {
  20737. "account": {
  20738. "$ref": "#/components/schemas/AccountV2Info"
  20739. }
  20740. },
  20741. "required": ["account"],
  20742. "additionalProperties": false
  20743. }
  20744. },
  20745. "required": ["id", "type", "properties"],
  20746. "additionalProperties": false
  20747. },
  20748. "EventAccountSwitched": {
  20749. "type": "object",
  20750. "properties": {
  20751. "id": {
  20752. "type": "string"
  20753. },
  20754. "type": {
  20755. "type": "string",
  20756. "enum": ["account.switched"]
  20757. },
  20758. "properties": {
  20759. "type": "object",
  20760. "properties": {
  20761. "serviceID": {
  20762. "type": "string"
  20763. },
  20764. "from": {
  20765. "type": "string"
  20766. },
  20767. "to": {
  20768. "type": "string"
  20769. }
  20770. },
  20771. "required": ["serviceID"],
  20772. "additionalProperties": false
  20773. }
  20774. },
  20775. "required": ["id", "type", "properties"],
  20776. "additionalProperties": false
  20777. },
  20778. "SessionInfo": {
  20779. "type": "object",
  20780. "properties": {
  20781. "id": {
  20782. "type": "string",
  20783. "pattern": "^ses"
  20784. },
  20785. "parentID": {
  20786. "type": "string",
  20787. "pattern": "^ses"
  20788. },
  20789. "projectID": {
  20790. "type": "string"
  20791. },
  20792. "workspaceID": {
  20793. "type": "string",
  20794. "pattern": "^wrk"
  20795. },
  20796. "path": {
  20797. "type": "string"
  20798. },
  20799. "agent": {
  20800. "type": "string"
  20801. },
  20802. "model": {
  20803. "type": "object",
  20804. "properties": {
  20805. "id": {
  20806. "type": "string"
  20807. },
  20808. "providerID": {
  20809. "type": "string"
  20810. },
  20811. "variant": {
  20812. "type": "string"
  20813. }
  20814. },
  20815. "required": ["id", "providerID", "variant"],
  20816. "additionalProperties": false
  20817. },
  20818. "cost": {
  20819. "type": "number"
  20820. },
  20821. "tokens": {
  20822. "type": "object",
  20823. "properties": {
  20824. "input": {
  20825. "type": "number"
  20826. },
  20827. "output": {
  20828. "type": "number"
  20829. },
  20830. "reasoning": {
  20831. "type": "number"
  20832. },
  20833. "cache": {
  20834. "type": "object",
  20835. "properties": {
  20836. "read": {
  20837. "type": "number"
  20838. },
  20839. "write": {
  20840. "type": "number"
  20841. }
  20842. },
  20843. "required": ["read", "write"],
  20844. "additionalProperties": false
  20845. }
  20846. },
  20847. "required": ["input", "output", "reasoning", "cache"],
  20848. "additionalProperties": false
  20849. },
  20850. "time": {
  20851. "type": "object",
  20852. "properties": {
  20853. "created": {
  20854. "type": "number"
  20855. },
  20856. "updated": {
  20857. "type": "number"
  20858. },
  20859. "archived": {
  20860. "type": "number"
  20861. }
  20862. },
  20863. "required": ["created", "updated"],
  20864. "additionalProperties": false
  20865. },
  20866. "title": {
  20867. "type": "string"
  20868. }
  20869. },
  20870. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20871. "additionalProperties": false
  20872. },
  20873. "SessionDelivery": {
  20874. "type": "string",
  20875. "enum": ["immediate", "deferred"]
  20876. },
  20877. "SessionMessageAgentSwitched": {
  20878. "type": "object",
  20879. "properties": {
  20880. "id": {
  20881. "type": "string"
  20882. },
  20883. "metadata": {
  20884. "type": "object"
  20885. },
  20886. "time": {
  20887. "type": "object",
  20888. "properties": {
  20889. "created": {
  20890. "type": "number"
  20891. }
  20892. },
  20893. "required": ["created"],
  20894. "additionalProperties": false
  20895. },
  20896. "type": {
  20897. "type": "string",
  20898. "enum": ["agent-switched"]
  20899. },
  20900. "agent": {
  20901. "type": "string"
  20902. }
  20903. },
  20904. "required": ["id", "time", "type", "agent"],
  20905. "additionalProperties": false
  20906. },
  20907. "SessionMessageModelSwitched": {
  20908. "type": "object",
  20909. "properties": {
  20910. "id": {
  20911. "type": "string"
  20912. },
  20913. "metadata": {
  20914. "type": "object"
  20915. },
  20916. "time": {
  20917. "type": "object",
  20918. "properties": {
  20919. "created": {
  20920. "type": "number"
  20921. }
  20922. },
  20923. "required": ["created"],
  20924. "additionalProperties": false
  20925. },
  20926. "type": {
  20927. "type": "string",
  20928. "enum": ["model-switched"]
  20929. },
  20930. "model": {
  20931. "type": "object",
  20932. "properties": {
  20933. "id": {
  20934. "type": "string"
  20935. },
  20936. "providerID": {
  20937. "type": "string"
  20938. },
  20939. "variant": {
  20940. "type": "string"
  20941. }
  20942. },
  20943. "required": ["id", "providerID", "variant"],
  20944. "additionalProperties": false
  20945. }
  20946. },
  20947. "required": ["id", "time", "type", "model"],
  20948. "additionalProperties": false
  20949. },
  20950. "SessionMessageUser": {
  20951. "type": "object",
  20952. "properties": {
  20953. "id": {
  20954. "type": "string"
  20955. },
  20956. "metadata": {
  20957. "type": "object"
  20958. },
  20959. "time": {
  20960. "type": "object",
  20961. "properties": {
  20962. "created": {
  20963. "type": "number"
  20964. }
  20965. },
  20966. "required": ["created"],
  20967. "additionalProperties": false
  20968. },
  20969. "text": {
  20970. "type": "string"
  20971. },
  20972. "files": {
  20973. "type": "array",
  20974. "items": {
  20975. "$ref": "#/components/schemas/PromptFileAttachment"
  20976. }
  20977. },
  20978. "agents": {
  20979. "type": "array",
  20980. "items": {
  20981. "$ref": "#/components/schemas/PromptAgentAttachment"
  20982. }
  20983. },
  20984. "references": {
  20985. "type": "array",
  20986. "items": {
  20987. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20988. }
  20989. },
  20990. "type": {
  20991. "type": "string",
  20992. "enum": ["user"]
  20993. }
  20994. },
  20995. "required": ["id", "time", "text", "type"],
  20996. "additionalProperties": false
  20997. },
  20998. "SessionMessageSynthetic": {
  20999. "type": "object",
  21000. "properties": {
  21001. "id": {
  21002. "type": "string"
  21003. },
  21004. "metadata": {
  21005. "type": "object"
  21006. },
  21007. "time": {
  21008. "type": "object",
  21009. "properties": {
  21010. "created": {
  21011. "type": "number"
  21012. }
  21013. },
  21014. "required": ["created"],
  21015. "additionalProperties": false
  21016. },
  21017. "sessionID": {
  21018. "type": "string",
  21019. "pattern": "^ses"
  21020. },
  21021. "text": {
  21022. "type": "string"
  21023. },
  21024. "type": {
  21025. "type": "string",
  21026. "enum": ["synthetic"]
  21027. }
  21028. },
  21029. "required": ["id", "time", "sessionID", "text", "type"],
  21030. "additionalProperties": false
  21031. },
  21032. "SessionMessageShell": {
  21033. "type": "object",
  21034. "properties": {
  21035. "id": {
  21036. "type": "string"
  21037. },
  21038. "metadata": {
  21039. "type": "object"
  21040. },
  21041. "time": {
  21042. "type": "object",
  21043. "properties": {
  21044. "created": {
  21045. "type": "number"
  21046. },
  21047. "completed": {
  21048. "type": "number"
  21049. }
  21050. },
  21051. "required": ["created"],
  21052. "additionalProperties": false
  21053. },
  21054. "type": {
  21055. "type": "string",
  21056. "enum": ["shell"]
  21057. },
  21058. "callID": {
  21059. "type": "string"
  21060. },
  21061. "command": {
  21062. "type": "string"
  21063. },
  21064. "output": {
  21065. "type": "string"
  21066. }
  21067. },
  21068. "required": ["id", "time", "type", "callID", "command", "output"],
  21069. "additionalProperties": false
  21070. },
  21071. "SessionMessageAssistantText": {
  21072. "type": "object",
  21073. "properties": {
  21074. "type": {
  21075. "type": "string",
  21076. "enum": ["text"]
  21077. },
  21078. "text": {
  21079. "type": "string"
  21080. }
  21081. },
  21082. "required": ["type", "text"],
  21083. "additionalProperties": false
  21084. },
  21085. "SessionMessageAssistantReasoning": {
  21086. "type": "object",
  21087. "properties": {
  21088. "type": {
  21089. "type": "string",
  21090. "enum": ["reasoning"]
  21091. },
  21092. "id": {
  21093. "type": "string"
  21094. },
  21095. "text": {
  21096. "type": "string"
  21097. }
  21098. },
  21099. "required": ["type", "id", "text"],
  21100. "additionalProperties": false
  21101. },
  21102. "SessionMessageToolStatePending": {
  21103. "type": "object",
  21104. "properties": {
  21105. "status": {
  21106. "type": "string",
  21107. "enum": ["pending"]
  21108. },
  21109. "input": {
  21110. "type": "string"
  21111. }
  21112. },
  21113. "required": ["status", "input"],
  21114. "additionalProperties": false
  21115. },
  21116. "SessionMessageToolStateRunning": {
  21117. "type": "object",
  21118. "properties": {
  21119. "status": {
  21120. "type": "string",
  21121. "enum": ["running"]
  21122. },
  21123. "input": {
  21124. "type": "object"
  21125. },
  21126. "structured": {
  21127. "type": "object"
  21128. },
  21129. "content": {
  21130. "type": "array",
  21131. "items": {
  21132. "anyOf": [
  21133. {
  21134. "$ref": "#/components/schemas/ToolTextContent"
  21135. },
  21136. {
  21137. "$ref": "#/components/schemas/ToolFileContent"
  21138. }
  21139. ]
  21140. }
  21141. }
  21142. },
  21143. "required": ["status", "input", "structured", "content"],
  21144. "additionalProperties": false
  21145. },
  21146. "SessionMessageToolStateCompleted": {
  21147. "type": "object",
  21148. "properties": {
  21149. "status": {
  21150. "type": "string",
  21151. "enum": ["completed"]
  21152. },
  21153. "input": {
  21154. "type": "object"
  21155. },
  21156. "attachments": {
  21157. "type": "array",
  21158. "items": {
  21159. "$ref": "#/components/schemas/PromptFileAttachment"
  21160. }
  21161. },
  21162. "content": {
  21163. "type": "array",
  21164. "items": {
  21165. "anyOf": [
  21166. {
  21167. "$ref": "#/components/schemas/ToolTextContent"
  21168. },
  21169. {
  21170. "$ref": "#/components/schemas/ToolFileContent"
  21171. }
  21172. ]
  21173. }
  21174. },
  21175. "structured": {
  21176. "type": "object"
  21177. }
  21178. },
  21179. "required": ["status", "input", "content", "structured"],
  21180. "additionalProperties": false
  21181. },
  21182. "SessionMessageToolStateError": {
  21183. "type": "object",
  21184. "properties": {
  21185. "status": {
  21186. "type": "string",
  21187. "enum": ["error"]
  21188. },
  21189. "input": {
  21190. "type": "object"
  21191. },
  21192. "content": {
  21193. "type": "array",
  21194. "items": {
  21195. "anyOf": [
  21196. {
  21197. "$ref": "#/components/schemas/ToolTextContent"
  21198. },
  21199. {
  21200. "$ref": "#/components/schemas/ToolFileContent"
  21201. }
  21202. ]
  21203. }
  21204. },
  21205. "structured": {
  21206. "type": "object"
  21207. },
  21208. "error": {
  21209. "$ref": "#/components/schemas/SessionErrorUnknown"
  21210. }
  21211. },
  21212. "required": ["status", "input", "content", "structured", "error"],
  21213. "additionalProperties": false
  21214. },
  21215. "SessionMessageAssistantTool": {
  21216. "type": "object",
  21217. "properties": {
  21218. "type": {
  21219. "type": "string",
  21220. "enum": ["tool"]
  21221. },
  21222. "id": {
  21223. "type": "string"
  21224. },
  21225. "name": {
  21226. "type": "string"
  21227. },
  21228. "provider": {
  21229. "type": "object",
  21230. "properties": {
  21231. "executed": {
  21232. "type": "boolean"
  21233. },
  21234. "metadata": {
  21235. "type": "object"
  21236. }
  21237. },
  21238. "required": ["executed"],
  21239. "additionalProperties": false
  21240. },
  21241. "state": {
  21242. "anyOf": [
  21243. {
  21244. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21245. },
  21246. {
  21247. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21248. },
  21249. {
  21250. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21251. },
  21252. {
  21253. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21254. }
  21255. ]
  21256. },
  21257. "time": {
  21258. "type": "object",
  21259. "properties": {
  21260. "created": {
  21261. "type": "number"
  21262. },
  21263. "ran": {
  21264. "type": "number"
  21265. },
  21266. "completed": {
  21267. "type": "number"
  21268. },
  21269. "pruned": {
  21270. "type": "number"
  21271. }
  21272. },
  21273. "required": ["created"],
  21274. "additionalProperties": false
  21275. }
  21276. },
  21277. "required": ["type", "id", "name", "state", "time"],
  21278. "additionalProperties": false
  21279. },
  21280. "SessionMessageAssistant": {
  21281. "type": "object",
  21282. "properties": {
  21283. "id": {
  21284. "type": "string"
  21285. },
  21286. "metadata": {
  21287. "type": "object"
  21288. },
  21289. "time": {
  21290. "type": "object",
  21291. "properties": {
  21292. "created": {
  21293. "type": "number"
  21294. },
  21295. "completed": {
  21296. "type": "number"
  21297. }
  21298. },
  21299. "required": ["created"],
  21300. "additionalProperties": false
  21301. },
  21302. "type": {
  21303. "type": "string",
  21304. "enum": ["assistant"]
  21305. },
  21306. "agent": {
  21307. "type": "string"
  21308. },
  21309. "model": {
  21310. "type": "object",
  21311. "properties": {
  21312. "id": {
  21313. "type": "string"
  21314. },
  21315. "providerID": {
  21316. "type": "string"
  21317. },
  21318. "variant": {
  21319. "type": "string"
  21320. }
  21321. },
  21322. "required": ["id", "providerID", "variant"],
  21323. "additionalProperties": false
  21324. },
  21325. "content": {
  21326. "type": "array",
  21327. "items": {
  21328. "anyOf": [
  21329. {
  21330. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21331. },
  21332. {
  21333. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21334. },
  21335. {
  21336. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21337. }
  21338. ]
  21339. }
  21340. },
  21341. "snapshot": {
  21342. "type": "object",
  21343. "properties": {
  21344. "start": {
  21345. "type": "string"
  21346. },
  21347. "end": {
  21348. "type": "string"
  21349. }
  21350. },
  21351. "additionalProperties": false
  21352. },
  21353. "finish": {
  21354. "type": "string"
  21355. },
  21356. "cost": {
  21357. "type": "number"
  21358. },
  21359. "tokens": {
  21360. "type": "object",
  21361. "properties": {
  21362. "input": {
  21363. "type": "number"
  21364. },
  21365. "output": {
  21366. "type": "number"
  21367. },
  21368. "reasoning": {
  21369. "type": "number"
  21370. },
  21371. "cache": {
  21372. "type": "object",
  21373. "properties": {
  21374. "read": {
  21375. "type": "number"
  21376. },
  21377. "write": {
  21378. "type": "number"
  21379. }
  21380. },
  21381. "required": ["read", "write"],
  21382. "additionalProperties": false
  21383. }
  21384. },
  21385. "required": ["input", "output", "reasoning", "cache"],
  21386. "additionalProperties": false
  21387. },
  21388. "error": {
  21389. "$ref": "#/components/schemas/SessionErrorUnknown"
  21390. }
  21391. },
  21392. "required": ["id", "time", "type", "agent", "model", "content"],
  21393. "additionalProperties": false
  21394. },
  21395. "SessionMessageCompaction": {
  21396. "type": "object",
  21397. "properties": {
  21398. "type": {
  21399. "type": "string",
  21400. "enum": ["compaction"]
  21401. },
  21402. "reason": {
  21403. "type": "string",
  21404. "enum": ["auto", "manual"]
  21405. },
  21406. "summary": {
  21407. "type": "string"
  21408. },
  21409. "include": {
  21410. "type": "string"
  21411. },
  21412. "id": {
  21413. "type": "string"
  21414. },
  21415. "metadata": {
  21416. "type": "object"
  21417. },
  21418. "time": {
  21419. "type": "object",
  21420. "properties": {
  21421. "created": {
  21422. "type": "number"
  21423. }
  21424. },
  21425. "required": ["created"],
  21426. "additionalProperties": false
  21427. }
  21428. },
  21429. "required": ["type", "reason", "summary", "id", "time"],
  21430. "additionalProperties": false
  21431. },
  21432. "SessionMessage": {
  21433. "anyOf": [
  21434. {
  21435. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21436. },
  21437. {
  21438. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21439. },
  21440. {
  21441. "$ref": "#/components/schemas/SessionMessageUser"
  21442. },
  21443. {
  21444. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21445. },
  21446. {
  21447. "$ref": "#/components/schemas/SessionMessageShell"
  21448. },
  21449. {
  21450. "$ref": "#/components/schemas/SessionMessageAssistant"
  21451. },
  21452. {
  21453. "$ref": "#/components/schemas/SessionMessageCompaction"
  21454. }
  21455. ]
  21456. },
  21457. "ProviderV2Info": {
  21458. "type": "object",
  21459. "properties": {
  21460. "id": {
  21461. "type": "string"
  21462. },
  21463. "name": {
  21464. "type": "string"
  21465. },
  21466. "enabled": {
  21467. "anyOf": [
  21468. {
  21469. "type": "boolean",
  21470. "enum": [false]
  21471. },
  21472. {
  21473. "type": "object",
  21474. "properties": {
  21475. "via": {
  21476. "type": "string",
  21477. "enum": ["env"]
  21478. },
  21479. "name": {
  21480. "type": "string"
  21481. }
  21482. },
  21483. "required": ["via", "name"],
  21484. "additionalProperties": false
  21485. },
  21486. {
  21487. "type": "object",
  21488. "properties": {
  21489. "via": {
  21490. "type": "string",
  21491. "enum": ["account"]
  21492. },
  21493. "service": {
  21494. "type": "string"
  21495. }
  21496. },
  21497. "required": ["via", "service"],
  21498. "additionalProperties": false
  21499. },
  21500. {
  21501. "type": "object",
  21502. "properties": {
  21503. "via": {
  21504. "type": "string",
  21505. "enum": ["custom"]
  21506. },
  21507. "data": {
  21508. "type": "object"
  21509. }
  21510. },
  21511. "required": ["via", "data"],
  21512. "additionalProperties": false
  21513. }
  21514. ]
  21515. },
  21516. "env": {
  21517. "type": "array",
  21518. "items": {
  21519. "type": "string"
  21520. }
  21521. },
  21522. "endpoint": {
  21523. "anyOf": [
  21524. {
  21525. "type": "object",
  21526. "properties": {
  21527. "type": {
  21528. "type": "string",
  21529. "enum": ["unknown"]
  21530. }
  21531. },
  21532. "required": ["type"],
  21533. "additionalProperties": false
  21534. },
  21535. {
  21536. "type": "object",
  21537. "properties": {
  21538. "type": {
  21539. "type": "string",
  21540. "enum": ["openai/responses"]
  21541. },
  21542. "url": {
  21543. "type": "string"
  21544. },
  21545. "websocket": {
  21546. "type": "boolean"
  21547. }
  21548. },
  21549. "required": ["type", "url"],
  21550. "additionalProperties": false
  21551. },
  21552. {
  21553. "type": "object",
  21554. "properties": {
  21555. "type": {
  21556. "type": "string",
  21557. "enum": ["openai/completions"]
  21558. },
  21559. "url": {
  21560. "type": "string"
  21561. },
  21562. "reasoning": {
  21563. "anyOf": [
  21564. {
  21565. "type": "object",
  21566. "properties": {
  21567. "type": {
  21568. "type": "string",
  21569. "enum": ["reasoning_content"]
  21570. }
  21571. },
  21572. "required": ["type"],
  21573. "additionalProperties": false
  21574. },
  21575. {
  21576. "type": "object",
  21577. "properties": {
  21578. "type": {
  21579. "type": "string",
  21580. "enum": ["reasoning_details"]
  21581. }
  21582. },
  21583. "required": ["type"],
  21584. "additionalProperties": false
  21585. }
  21586. ]
  21587. }
  21588. },
  21589. "required": ["type", "url"],
  21590. "additionalProperties": false
  21591. },
  21592. {
  21593. "type": "object",
  21594. "properties": {
  21595. "type": {
  21596. "type": "string",
  21597. "enum": ["anthropic/messages"]
  21598. },
  21599. "url": {
  21600. "type": "string"
  21601. }
  21602. },
  21603. "required": ["type", "url"],
  21604. "additionalProperties": false
  21605. },
  21606. {
  21607. "type": "object",
  21608. "properties": {
  21609. "type": {
  21610. "type": "string",
  21611. "enum": ["aisdk"]
  21612. },
  21613. "package": {
  21614. "type": "string"
  21615. },
  21616. "url": {
  21617. "type": "string"
  21618. }
  21619. },
  21620. "required": ["type", "package"],
  21621. "additionalProperties": false
  21622. }
  21623. ]
  21624. },
  21625. "options": {
  21626. "type": "object",
  21627. "properties": {
  21628. "headers": {
  21629. "type": "object",
  21630. "additionalProperties": {
  21631. "type": "string"
  21632. }
  21633. },
  21634. "body": {
  21635. "type": "object"
  21636. },
  21637. "aisdk": {
  21638. "type": "object",
  21639. "properties": {
  21640. "provider": {
  21641. "type": "object"
  21642. },
  21643. "request": {
  21644. "type": "object"
  21645. }
  21646. },
  21647. "required": ["provider", "request"],
  21648. "additionalProperties": false
  21649. }
  21650. },
  21651. "required": ["headers", "body", "aisdk"],
  21652. "additionalProperties": false
  21653. }
  21654. },
  21655. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21656. "additionalProperties": false
  21657. },
  21658. "EventTuiToastShow1": {
  21659. "type": "object",
  21660. "properties": {
  21661. "id": {
  21662. "type": "string"
  21663. },
  21664. "type": {
  21665. "type": "string",
  21666. "enum": ["tui.toast.show"]
  21667. },
  21668. "properties": {
  21669. "type": "object",
  21670. "properties": {
  21671. "title": {
  21672. "type": "string"
  21673. },
  21674. "message": {
  21675. "type": "string"
  21676. },
  21677. "variant": {
  21678. "type": "string",
  21679. "enum": ["info", "success", "warning", "error"]
  21680. },
  21681. "duration": {
  21682. "type": "integer",
  21683. "exclusiveMinimum": 0
  21684. }
  21685. },
  21686. "required": ["message", "variant"],
  21687. "additionalProperties": false
  21688. }
  21689. },
  21690. "required": ["id", "type", "properties"],
  21691. "additionalProperties": false
  21692. },
  21693. "ModelV2Info1": {
  21694. "type": "object",
  21695. "properties": {
  21696. "id": {
  21697. "type": "string"
  21698. },
  21699. "apiID": {
  21700. "type": "string"
  21701. },
  21702. "providerID": {
  21703. "type": "string"
  21704. },
  21705. "family": {
  21706. "type": "string"
  21707. },
  21708. "name": {
  21709. "type": "string"
  21710. },
  21711. "endpoint": {
  21712. "anyOf": [
  21713. {
  21714. "type": "object",
  21715. "properties": {
  21716. "type": {
  21717. "type": "string",
  21718. "enum": ["unknown"]
  21719. }
  21720. },
  21721. "required": ["type"],
  21722. "additionalProperties": false
  21723. },
  21724. {
  21725. "type": "object",
  21726. "properties": {
  21727. "type": {
  21728. "type": "string",
  21729. "enum": ["openai/responses"]
  21730. },
  21731. "url": {
  21732. "type": "string"
  21733. },
  21734. "websocket": {
  21735. "type": "boolean"
  21736. }
  21737. },
  21738. "required": ["type", "url"],
  21739. "additionalProperties": false
  21740. },
  21741. {
  21742. "type": "object",
  21743. "properties": {
  21744. "type": {
  21745. "type": "string",
  21746. "enum": ["openai/completions"]
  21747. },
  21748. "url": {
  21749. "type": "string"
  21750. },
  21751. "reasoning": {
  21752. "anyOf": [
  21753. {
  21754. "type": "object",
  21755. "properties": {
  21756. "type": {
  21757. "type": "string",
  21758. "enum": ["reasoning_content"]
  21759. }
  21760. },
  21761. "required": ["type"],
  21762. "additionalProperties": false
  21763. },
  21764. {
  21765. "type": "object",
  21766. "properties": {
  21767. "type": {
  21768. "type": "string",
  21769. "enum": ["reasoning_details"]
  21770. }
  21771. },
  21772. "required": ["type"],
  21773. "additionalProperties": false
  21774. }
  21775. ]
  21776. }
  21777. },
  21778. "required": ["type", "url"],
  21779. "additionalProperties": false
  21780. },
  21781. {
  21782. "type": "object",
  21783. "properties": {
  21784. "type": {
  21785. "type": "string",
  21786. "enum": ["anthropic/messages"]
  21787. },
  21788. "url": {
  21789. "type": "string"
  21790. }
  21791. },
  21792. "required": ["type", "url"],
  21793. "additionalProperties": false
  21794. },
  21795. {
  21796. "type": "object",
  21797. "properties": {
  21798. "type": {
  21799. "type": "string",
  21800. "enum": ["aisdk"]
  21801. },
  21802. "package": {
  21803. "type": "string"
  21804. },
  21805. "url": {
  21806. "type": "string"
  21807. }
  21808. },
  21809. "required": ["type", "package"],
  21810. "additionalProperties": false
  21811. }
  21812. ]
  21813. },
  21814. "capabilities": {
  21815. "type": "object",
  21816. "properties": {
  21817. "tools": {
  21818. "type": "boolean"
  21819. },
  21820. "input": {
  21821. "type": "array",
  21822. "items": {
  21823. "type": "string"
  21824. }
  21825. },
  21826. "output": {
  21827. "type": "array",
  21828. "items": {
  21829. "type": "string"
  21830. }
  21831. }
  21832. },
  21833. "required": ["tools", "input", "output"],
  21834. "additionalProperties": false
  21835. },
  21836. "options": {
  21837. "type": "object",
  21838. "properties": {
  21839. "headers": {
  21840. "type": "object",
  21841. "additionalProperties": {
  21842. "type": "string"
  21843. }
  21844. },
  21845. "body": {
  21846. "type": "object"
  21847. },
  21848. "aisdk": {
  21849. "type": "object",
  21850. "properties": {
  21851. "provider": {
  21852. "type": "object"
  21853. },
  21854. "request": {
  21855. "type": "object"
  21856. }
  21857. },
  21858. "required": ["provider", "request"],
  21859. "additionalProperties": false
  21860. },
  21861. "variant": {
  21862. "type": "string"
  21863. }
  21864. },
  21865. "required": ["headers", "body", "aisdk"],
  21866. "additionalProperties": false
  21867. },
  21868. "variants": {
  21869. "type": "array",
  21870. "items": {
  21871. "type": "object",
  21872. "properties": {
  21873. "id": {
  21874. "type": "string"
  21875. },
  21876. "headers": {
  21877. "type": "object",
  21878. "additionalProperties": {
  21879. "type": "string"
  21880. }
  21881. },
  21882. "body": {
  21883. "type": "object"
  21884. },
  21885. "aisdk": {
  21886. "type": "object",
  21887. "properties": {
  21888. "provider": {
  21889. "type": "object"
  21890. },
  21891. "request": {
  21892. "type": "object"
  21893. }
  21894. },
  21895. "required": ["provider", "request"],
  21896. "additionalProperties": false
  21897. }
  21898. },
  21899. "required": ["id", "headers", "body", "aisdk"],
  21900. "additionalProperties": false
  21901. }
  21902. },
  21903. "time": {
  21904. "type": "object",
  21905. "properties": {
  21906. "released": {
  21907. "anyOf": [
  21908. {
  21909. "type": "number"
  21910. },
  21911. {
  21912. "type": "string",
  21913. "enum": ["NaN"]
  21914. },
  21915. {
  21916. "type": "string",
  21917. "enum": ["Infinity"]
  21918. },
  21919. {
  21920. "type": "string",
  21921. "enum": ["-Infinity"]
  21922. }
  21923. ]
  21924. }
  21925. },
  21926. "required": ["released"],
  21927. "additionalProperties": false
  21928. },
  21929. "cost": {
  21930. "type": "array",
  21931. "items": {
  21932. "type": "object",
  21933. "properties": {
  21934. "tier": {
  21935. "type": "object",
  21936. "properties": {
  21937. "type": {
  21938. "type": "string",
  21939. "enum": ["context"]
  21940. },
  21941. "size": {
  21942. "type": "integer"
  21943. }
  21944. },
  21945. "required": ["type", "size"],
  21946. "additionalProperties": false
  21947. },
  21948. "input": {
  21949. "type": "number"
  21950. },
  21951. "output": {
  21952. "type": "number"
  21953. },
  21954. "cache": {
  21955. "type": "object",
  21956. "properties": {
  21957. "read": {
  21958. "type": "number"
  21959. },
  21960. "write": {
  21961. "type": "number"
  21962. }
  21963. },
  21964. "required": ["read", "write"],
  21965. "additionalProperties": false
  21966. }
  21967. },
  21968. "required": ["input", "output", "cache"],
  21969. "additionalProperties": false
  21970. }
  21971. },
  21972. "status": {
  21973. "type": "string",
  21974. "enum": ["alpha", "beta", "deprecated", "active"]
  21975. },
  21976. "enabled": {
  21977. "type": "boolean"
  21978. },
  21979. "limit": {
  21980. "type": "object",
  21981. "properties": {
  21982. "context": {
  21983. "type": "integer"
  21984. },
  21985. "input": {
  21986. "type": "integer"
  21987. },
  21988. "output": {
  21989. "type": "integer"
  21990. }
  21991. },
  21992. "required": ["context", "output"],
  21993. "additionalProperties": false
  21994. }
  21995. },
  21996. "required": [
  21997. "id",
  21998. "apiID",
  21999. "providerID",
  22000. "name",
  22001. "endpoint",
  22002. "capabilities",
  22003. "options",
  22004. "variants",
  22005. "time",
  22006. "cost",
  22007. "status",
  22008. "enabled",
  22009. "limit"
  22010. ],
  22011. "additionalProperties": false
  22012. },
  22013. "BadRequestError": {
  22014. "type": "object",
  22015. "required": ["name", "data"],
  22016. "properties": {
  22017. "name": {
  22018. "type": "string",
  22019. "enum": ["BadRequest"]
  22020. },
  22021. "data": {
  22022. "type": "object",
  22023. "required": ["message"],
  22024. "properties": {
  22025. "message": {
  22026. "type": "string"
  22027. },
  22028. "kind": {
  22029. "type": "string",
  22030. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22031. }
  22032. }
  22033. }
  22034. }
  22035. }
  22036. }
  22037. },
  22038. "security": [],
  22039. "tags": [
  22040. {
  22041. "name": "control",
  22042. "description": "Control plane routes."
  22043. },
  22044. {
  22045. "name": "global",
  22046. "description": "Global server routes."
  22047. },
  22048. {
  22049. "name": "event",
  22050. "description": "Instance event stream route."
  22051. },
  22052. {
  22053. "name": "config",
  22054. "description": "Experimental HttpApi config routes."
  22055. },
  22056. {
  22057. "name": "experimental",
  22058. "description": "Experimental HttpApi read-only routes."
  22059. },
  22060. {
  22061. "name": "file",
  22062. "description": "Experimental HttpApi file routes."
  22063. },
  22064. {
  22065. "name": "instance",
  22066. "description": "Experimental HttpApi instance read routes."
  22067. },
  22068. {
  22069. "name": "mcp",
  22070. "description": "Experimental HttpApi MCP routes."
  22071. },
  22072. {
  22073. "name": "project",
  22074. "description": "Experimental HttpApi project routes."
  22075. },
  22076. {
  22077. "name": "pty",
  22078. "description": "Experimental HttpApi PTY routes."
  22079. },
  22080. {
  22081. "name": "question",
  22082. "description": "Question routes."
  22083. },
  22084. {
  22085. "name": "permission",
  22086. "description": "Experimental HttpApi permission routes."
  22087. },
  22088. {
  22089. "name": "provider",
  22090. "description": "Experimental HttpApi provider routes."
  22091. },
  22092. {
  22093. "name": "session",
  22094. "description": "Experimental HttpApi session routes."
  22095. },
  22096. {
  22097. "name": "sync",
  22098. "description": "Experimental HttpApi sync routes."
  22099. },
  22100. {
  22101. "name": "v2",
  22102. "description": "Experimental v2 routes."
  22103. },
  22104. {
  22105. "name": "v2 messages",
  22106. "description": "Experimental v2 message routes."
  22107. },
  22108. {
  22109. "name": "v2 models",
  22110. "description": "Experimental v2 model routes."
  22111. },
  22112. {
  22113. "name": "v2 providers",
  22114. "description": "Experimental v2 provider routes."
  22115. },
  22116. {
  22117. "name": "tui",
  22118. "description": "Experimental HttpApi TUI routes."
  22119. },
  22120. {
  22121. "name": "workspace",
  22122. "description": "Experimental HttpApi workspace routes."
  22123. },
  22124. {
  22125. "name": "pty",
  22126. "description": "PTY websocket route."
  22127. }
  22128. ]
  22129. }