openapi.json 602 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949
  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": "Not found",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/NotFoundError"
  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": "Not found",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/NotFoundError"
  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": "Not found",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/NotFoundError"
  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": "Not found",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/NotFoundError"
  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. },
  3317. "description": "Connect an MCP server.",
  3318. "x-codeSamples": [
  3319. {
  3320. "lang": "js",
  3321. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3322. }
  3323. ]
  3324. }
  3325. },
  3326. "/mcp/{name}/disconnect": {
  3327. "post": {
  3328. "tags": ["mcp"],
  3329. "operationId": "mcp.disconnect",
  3330. "parameters": [
  3331. {
  3332. "name": "name",
  3333. "in": "path",
  3334. "schema": {
  3335. "type": "string"
  3336. },
  3337. "required": true
  3338. },
  3339. {
  3340. "name": "directory",
  3341. "in": "query",
  3342. "schema": {
  3343. "type": "string"
  3344. },
  3345. "required": false
  3346. },
  3347. {
  3348. "name": "workspace",
  3349. "in": "query",
  3350. "schema": {
  3351. "type": "string"
  3352. },
  3353. "required": false
  3354. }
  3355. ],
  3356. "responses": {
  3357. "200": {
  3358. "description": "MCP server disconnected successfully",
  3359. "content": {
  3360. "application/json": {
  3361. "schema": {
  3362. "type": "boolean",
  3363. "description": "MCP server disconnected successfully"
  3364. }
  3365. }
  3366. }
  3367. },
  3368. "400": {
  3369. "description": "Bad request",
  3370. "content": {
  3371. "application/json": {
  3372. "schema": {
  3373. "$ref": "#/components/schemas/BadRequestError"
  3374. }
  3375. }
  3376. }
  3377. }
  3378. },
  3379. "description": "Disconnect an MCP server.",
  3380. "x-codeSamples": [
  3381. {
  3382. "lang": "js",
  3383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3384. }
  3385. ]
  3386. }
  3387. },
  3388. "/project": {
  3389. "get": {
  3390. "tags": ["project"],
  3391. "operationId": "project.list",
  3392. "parameters": [
  3393. {
  3394. "name": "directory",
  3395. "in": "query",
  3396. "schema": {
  3397. "type": "string"
  3398. },
  3399. "required": false
  3400. },
  3401. {
  3402. "name": "workspace",
  3403. "in": "query",
  3404. "schema": {
  3405. "type": "string"
  3406. },
  3407. "required": false
  3408. }
  3409. ],
  3410. "responses": {
  3411. "200": {
  3412. "description": "List of projects",
  3413. "content": {
  3414. "application/json": {
  3415. "schema": {
  3416. "type": "array",
  3417. "items": {
  3418. "$ref": "#/components/schemas/Project"
  3419. },
  3420. "description": "List of projects"
  3421. }
  3422. }
  3423. }
  3424. },
  3425. "400": {
  3426. "description": "Bad request",
  3427. "content": {
  3428. "application/json": {
  3429. "schema": {
  3430. "$ref": "#/components/schemas/BadRequestError"
  3431. }
  3432. }
  3433. }
  3434. }
  3435. },
  3436. "description": "Get a list of projects that have been opened with OpenCode.",
  3437. "summary": "List all projects",
  3438. "x-codeSamples": [
  3439. {
  3440. "lang": "js",
  3441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3442. }
  3443. ]
  3444. }
  3445. },
  3446. "/project/current": {
  3447. "get": {
  3448. "tags": ["project"],
  3449. "operationId": "project.current",
  3450. "parameters": [
  3451. {
  3452. "name": "directory",
  3453. "in": "query",
  3454. "schema": {
  3455. "type": "string"
  3456. },
  3457. "required": false
  3458. },
  3459. {
  3460. "name": "workspace",
  3461. "in": "query",
  3462. "schema": {
  3463. "type": "string"
  3464. },
  3465. "required": false
  3466. }
  3467. ],
  3468. "responses": {
  3469. "200": {
  3470. "description": "Current project information",
  3471. "content": {
  3472. "application/json": {
  3473. "schema": {
  3474. "$ref": "#/components/schemas/Project"
  3475. }
  3476. }
  3477. }
  3478. },
  3479. "400": {
  3480. "description": "Bad request",
  3481. "content": {
  3482. "application/json": {
  3483. "schema": {
  3484. "$ref": "#/components/schemas/BadRequestError"
  3485. }
  3486. }
  3487. }
  3488. }
  3489. },
  3490. "description": "Retrieve the currently active project that OpenCode is working with.",
  3491. "summary": "Get current project",
  3492. "x-codeSamples": [
  3493. {
  3494. "lang": "js",
  3495. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3496. }
  3497. ]
  3498. }
  3499. },
  3500. "/project/git/init": {
  3501. "post": {
  3502. "tags": ["project"],
  3503. "operationId": "project.initGit",
  3504. "parameters": [
  3505. {
  3506. "name": "directory",
  3507. "in": "query",
  3508. "schema": {
  3509. "type": "string"
  3510. },
  3511. "required": false
  3512. },
  3513. {
  3514. "name": "workspace",
  3515. "in": "query",
  3516. "schema": {
  3517. "type": "string"
  3518. },
  3519. "required": false
  3520. }
  3521. ],
  3522. "responses": {
  3523. "200": {
  3524. "description": "Project information after git initialization",
  3525. "content": {
  3526. "application/json": {
  3527. "schema": {
  3528. "$ref": "#/components/schemas/Project"
  3529. }
  3530. }
  3531. }
  3532. },
  3533. "400": {
  3534. "description": "Bad request",
  3535. "content": {
  3536. "application/json": {
  3537. "schema": {
  3538. "$ref": "#/components/schemas/BadRequestError"
  3539. }
  3540. }
  3541. }
  3542. }
  3543. },
  3544. "description": "Create a git repository for the current project and return the refreshed project info.",
  3545. "summary": "Initialize git repository",
  3546. "x-codeSamples": [
  3547. {
  3548. "lang": "js",
  3549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3550. }
  3551. ]
  3552. }
  3553. },
  3554. "/project/{projectID}": {
  3555. "patch": {
  3556. "tags": ["project"],
  3557. "operationId": "project.update",
  3558. "parameters": [
  3559. {
  3560. "name": "projectID",
  3561. "in": "path",
  3562. "schema": {
  3563. "type": "string"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Updated project information",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/Project"
  3591. }
  3592. }
  3593. }
  3594. },
  3595. "400": {
  3596. "description": "BadRequest | InvalidRequestError",
  3597. "content": {
  3598. "application/json": {
  3599. "schema": {
  3600. "anyOf": [
  3601. {
  3602. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3603. },
  3604. {
  3605. "$ref": "#/components/schemas/InvalidRequestError"
  3606. }
  3607. ]
  3608. }
  3609. }
  3610. }
  3611. },
  3612. "404": {
  3613. "description": "Not found",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/NotFoundError"
  3618. }
  3619. }
  3620. }
  3621. }
  3622. },
  3623. "description": "Update project properties such as name, icon, and commands.",
  3624. "summary": "Update project",
  3625. "requestBody": {
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "type": "object",
  3630. "properties": {
  3631. "name": {
  3632. "type": "string"
  3633. },
  3634. "icon": {
  3635. "type": "object",
  3636. "properties": {
  3637. "url": {
  3638. "type": "string"
  3639. },
  3640. "override": {
  3641. "type": "string"
  3642. },
  3643. "color": {
  3644. "type": "string"
  3645. }
  3646. },
  3647. "additionalProperties": false
  3648. },
  3649. "commands": {
  3650. "type": "object",
  3651. "properties": {
  3652. "start": {
  3653. "type": "string",
  3654. "description": "Startup script to run when creating a new workspace (worktree)"
  3655. }
  3656. },
  3657. "additionalProperties": false
  3658. }
  3659. },
  3660. "additionalProperties": false
  3661. }
  3662. }
  3663. }
  3664. },
  3665. "x-codeSamples": [
  3666. {
  3667. "lang": "js",
  3668. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3669. }
  3670. ]
  3671. }
  3672. },
  3673. "/pty/shells": {
  3674. "get": {
  3675. "tags": ["pty"],
  3676. "operationId": "pty.shells",
  3677. "parameters": [
  3678. {
  3679. "name": "directory",
  3680. "in": "query",
  3681. "schema": {
  3682. "type": "string"
  3683. },
  3684. "required": false
  3685. },
  3686. {
  3687. "name": "workspace",
  3688. "in": "query",
  3689. "schema": {
  3690. "type": "string"
  3691. },
  3692. "required": false
  3693. }
  3694. ],
  3695. "responses": {
  3696. "200": {
  3697. "description": "List of shells",
  3698. "content": {
  3699. "application/json": {
  3700. "schema": {
  3701. "type": "array",
  3702. "items": {
  3703. "type": "object",
  3704. "properties": {
  3705. "path": {
  3706. "type": "string"
  3707. },
  3708. "name": {
  3709. "type": "string"
  3710. },
  3711. "acceptable": {
  3712. "type": "boolean"
  3713. }
  3714. },
  3715. "required": ["path", "name", "acceptable"],
  3716. "additionalProperties": false
  3717. },
  3718. "description": "List of shells"
  3719. }
  3720. }
  3721. }
  3722. },
  3723. "400": {
  3724. "description": "Bad request",
  3725. "content": {
  3726. "application/json": {
  3727. "schema": {
  3728. "$ref": "#/components/schemas/BadRequestError"
  3729. }
  3730. }
  3731. }
  3732. }
  3733. },
  3734. "description": "Get a list of available shells on the system.",
  3735. "summary": "List available shells",
  3736. "x-codeSamples": [
  3737. {
  3738. "lang": "js",
  3739. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3740. }
  3741. ]
  3742. }
  3743. },
  3744. "/pty": {
  3745. "get": {
  3746. "tags": ["pty"],
  3747. "operationId": "pty.list",
  3748. "parameters": [
  3749. {
  3750. "name": "directory",
  3751. "in": "query",
  3752. "schema": {
  3753. "type": "string"
  3754. },
  3755. "required": false
  3756. },
  3757. {
  3758. "name": "workspace",
  3759. "in": "query",
  3760. "schema": {
  3761. "type": "string"
  3762. },
  3763. "required": false
  3764. }
  3765. ],
  3766. "responses": {
  3767. "200": {
  3768. "description": "List of sessions",
  3769. "content": {
  3770. "application/json": {
  3771. "schema": {
  3772. "type": "array",
  3773. "items": {
  3774. "$ref": "#/components/schemas/Pty"
  3775. },
  3776. "description": "List of sessions"
  3777. }
  3778. }
  3779. }
  3780. },
  3781. "400": {
  3782. "description": "Bad request",
  3783. "content": {
  3784. "application/json": {
  3785. "schema": {
  3786. "$ref": "#/components/schemas/BadRequestError"
  3787. }
  3788. }
  3789. }
  3790. }
  3791. },
  3792. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3793. "summary": "List PTY sessions",
  3794. "x-codeSamples": [
  3795. {
  3796. "lang": "js",
  3797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3798. }
  3799. ]
  3800. },
  3801. "post": {
  3802. "tags": ["pty"],
  3803. "operationId": "pty.create",
  3804. "parameters": [
  3805. {
  3806. "name": "directory",
  3807. "in": "query",
  3808. "schema": {
  3809. "type": "string"
  3810. },
  3811. "required": false
  3812. },
  3813. {
  3814. "name": "workspace",
  3815. "in": "query",
  3816. "schema": {
  3817. "type": "string"
  3818. },
  3819. "required": false
  3820. }
  3821. ],
  3822. "responses": {
  3823. "200": {
  3824. "description": "Created session",
  3825. "content": {
  3826. "application/json": {
  3827. "schema": {
  3828. "$ref": "#/components/schemas/Pty"
  3829. }
  3830. }
  3831. }
  3832. },
  3833. "400": {
  3834. "description": "BadRequest | InvalidRequestError",
  3835. "content": {
  3836. "application/json": {
  3837. "schema": {
  3838. "anyOf": [
  3839. {
  3840. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3841. },
  3842. {
  3843. "$ref": "#/components/schemas/InvalidRequestError"
  3844. }
  3845. ]
  3846. }
  3847. }
  3848. }
  3849. }
  3850. },
  3851. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3852. "summary": "Create PTY session",
  3853. "requestBody": {
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "type": "object",
  3858. "properties": {
  3859. "command": {
  3860. "type": "string"
  3861. },
  3862. "args": {
  3863. "type": "array",
  3864. "items": {
  3865. "type": "string"
  3866. }
  3867. },
  3868. "cwd": {
  3869. "type": "string"
  3870. },
  3871. "title": {
  3872. "type": "string"
  3873. },
  3874. "env": {
  3875. "type": "object",
  3876. "additionalProperties": {
  3877. "type": "string"
  3878. }
  3879. }
  3880. },
  3881. "additionalProperties": false
  3882. }
  3883. }
  3884. }
  3885. },
  3886. "x-codeSamples": [
  3887. {
  3888. "lang": "js",
  3889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3890. }
  3891. ]
  3892. }
  3893. },
  3894. "/pty/{ptyID}": {
  3895. "get": {
  3896. "tags": ["pty"],
  3897. "operationId": "pty.get",
  3898. "parameters": [
  3899. {
  3900. "name": "ptyID",
  3901. "in": "path",
  3902. "schema": {
  3903. "type": "string",
  3904. "pattern": "^pty"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "directory",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. },
  3916. {
  3917. "name": "workspace",
  3918. "in": "query",
  3919. "schema": {
  3920. "type": "string"
  3921. },
  3922. "required": false
  3923. }
  3924. ],
  3925. "responses": {
  3926. "200": {
  3927. "description": "Session info",
  3928. "content": {
  3929. "application/json": {
  3930. "schema": {
  3931. "$ref": "#/components/schemas/Pty"
  3932. }
  3933. }
  3934. }
  3935. },
  3936. "400": {
  3937. "description": "Bad request",
  3938. "content": {
  3939. "application/json": {
  3940. "schema": {
  3941. "$ref": "#/components/schemas/BadRequestError"
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "404": {
  3947. "description": "NotFoundError",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/NotFoundError"
  3952. }
  3953. }
  3954. }
  3955. }
  3956. },
  3957. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3958. "summary": "Get PTY session",
  3959. "x-codeSamples": [
  3960. {
  3961. "lang": "js",
  3962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3963. }
  3964. ]
  3965. },
  3966. "put": {
  3967. "tags": ["pty"],
  3968. "operationId": "pty.update",
  3969. "parameters": [
  3970. {
  3971. "name": "ptyID",
  3972. "in": "path",
  3973. "schema": {
  3974. "type": "string",
  3975. "pattern": "^pty"
  3976. },
  3977. "required": true
  3978. },
  3979. {
  3980. "name": "directory",
  3981. "in": "query",
  3982. "schema": {
  3983. "type": "string"
  3984. },
  3985. "required": false
  3986. },
  3987. {
  3988. "name": "workspace",
  3989. "in": "query",
  3990. "schema": {
  3991. "type": "string"
  3992. },
  3993. "required": false
  3994. }
  3995. ],
  3996. "responses": {
  3997. "200": {
  3998. "description": "Updated session",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/Pty"
  4003. }
  4004. }
  4005. }
  4006. },
  4007. "400": {
  4008. "description": "BadRequest | InvalidRequestError",
  4009. "content": {
  4010. "application/json": {
  4011. "schema": {
  4012. "anyOf": [
  4013. {
  4014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4015. },
  4016. {
  4017. "$ref": "#/components/schemas/InvalidRequestError"
  4018. }
  4019. ]
  4020. }
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4026. "summary": "Update PTY session",
  4027. "requestBody": {
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "type": "object",
  4032. "properties": {
  4033. "title": {
  4034. "type": "string"
  4035. },
  4036. "size": {
  4037. "type": "object",
  4038. "properties": {
  4039. "rows": {
  4040. "type": "integer",
  4041. "exclusiveMinimum": 0
  4042. },
  4043. "cols": {
  4044. "type": "integer",
  4045. "exclusiveMinimum": 0
  4046. }
  4047. },
  4048. "required": ["rows", "cols"],
  4049. "additionalProperties": false
  4050. }
  4051. },
  4052. "additionalProperties": false
  4053. }
  4054. }
  4055. }
  4056. },
  4057. "x-codeSamples": [
  4058. {
  4059. "lang": "js",
  4060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4061. }
  4062. ]
  4063. },
  4064. "delete": {
  4065. "tags": ["pty"],
  4066. "operationId": "pty.remove",
  4067. "parameters": [
  4068. {
  4069. "name": "ptyID",
  4070. "in": "path",
  4071. "schema": {
  4072. "type": "string",
  4073. "pattern": "^pty"
  4074. },
  4075. "required": true
  4076. },
  4077. {
  4078. "name": "directory",
  4079. "in": "query",
  4080. "schema": {
  4081. "type": "string"
  4082. },
  4083. "required": false
  4084. },
  4085. {
  4086. "name": "workspace",
  4087. "in": "query",
  4088. "schema": {
  4089. "type": "string"
  4090. },
  4091. "required": false
  4092. }
  4093. ],
  4094. "responses": {
  4095. "200": {
  4096. "description": "Session removed",
  4097. "content": {
  4098. "application/json": {
  4099. "schema": {
  4100. "type": "boolean",
  4101. "description": "Session removed"
  4102. }
  4103. }
  4104. }
  4105. },
  4106. "400": {
  4107. "description": "Bad request",
  4108. "content": {
  4109. "application/json": {
  4110. "schema": {
  4111. "$ref": "#/components/schemas/BadRequestError"
  4112. }
  4113. }
  4114. }
  4115. },
  4116. "404": {
  4117. "description": "NotFoundError",
  4118. "content": {
  4119. "application/json": {
  4120. "schema": {
  4121. "$ref": "#/components/schemas/NotFoundError"
  4122. }
  4123. }
  4124. }
  4125. }
  4126. },
  4127. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4128. "summary": "Remove PTY session",
  4129. "x-codeSamples": [
  4130. {
  4131. "lang": "js",
  4132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4133. }
  4134. ]
  4135. }
  4136. },
  4137. "/pty/{ptyID}/connect-token": {
  4138. "post": {
  4139. "tags": ["pty"],
  4140. "operationId": "pty.connectToken",
  4141. "parameters": [
  4142. {
  4143. "name": "ptyID",
  4144. "in": "path",
  4145. "schema": {
  4146. "type": "string",
  4147. "pattern": "^pty"
  4148. },
  4149. "required": true
  4150. },
  4151. {
  4152. "name": "directory",
  4153. "in": "query",
  4154. "schema": {
  4155. "type": "string"
  4156. },
  4157. "required": false
  4158. },
  4159. {
  4160. "name": "workspace",
  4161. "in": "query",
  4162. "schema": {
  4163. "type": "string"
  4164. },
  4165. "required": false
  4166. }
  4167. ],
  4168. "responses": {
  4169. "200": {
  4170. "description": "WebSocket connect token",
  4171. "content": {
  4172. "application/json": {
  4173. "schema": {
  4174. "type": "object",
  4175. "properties": {
  4176. "ticket": {
  4177. "type": "string"
  4178. },
  4179. "expires_in": {
  4180. "type": "integer",
  4181. "exclusiveMinimum": 0
  4182. }
  4183. },
  4184. "required": ["ticket", "expires_in"],
  4185. "additionalProperties": false,
  4186. "description": "WebSocket connect token"
  4187. }
  4188. }
  4189. }
  4190. },
  4191. "400": {
  4192. "description": "Bad request",
  4193. "content": {
  4194. "application/json": {
  4195. "schema": {
  4196. "$ref": "#/components/schemas/BadRequestError"
  4197. }
  4198. }
  4199. }
  4200. },
  4201. "403": {
  4202. "description": "Forbidden",
  4203. "content": {
  4204. "application/json": {
  4205. "schema": {
  4206. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "404": {
  4212. "description": "NotFoundError",
  4213. "content": {
  4214. "application/json": {
  4215. "schema": {
  4216. "$ref": "#/components/schemas/NotFoundError"
  4217. }
  4218. }
  4219. }
  4220. }
  4221. },
  4222. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4223. "summary": "Create PTY WebSocket token",
  4224. "x-codeSamples": [
  4225. {
  4226. "lang": "js",
  4227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4228. }
  4229. ]
  4230. }
  4231. },
  4232. "/question": {
  4233. "get": {
  4234. "tags": ["question"],
  4235. "operationId": "question.list",
  4236. "parameters": [
  4237. {
  4238. "name": "directory",
  4239. "in": "query",
  4240. "schema": {
  4241. "type": "string"
  4242. },
  4243. "required": false
  4244. },
  4245. {
  4246. "name": "workspace",
  4247. "in": "query",
  4248. "schema": {
  4249. "type": "string"
  4250. },
  4251. "required": false
  4252. }
  4253. ],
  4254. "responses": {
  4255. "200": {
  4256. "description": "List of pending questions",
  4257. "content": {
  4258. "application/json": {
  4259. "schema": {
  4260. "type": "array",
  4261. "items": {
  4262. "$ref": "#/components/schemas/QuestionRequest"
  4263. },
  4264. "description": "List of pending questions"
  4265. }
  4266. }
  4267. }
  4268. },
  4269. "400": {
  4270. "description": "Bad request",
  4271. "content": {
  4272. "application/json": {
  4273. "schema": {
  4274. "$ref": "#/components/schemas/BadRequestError"
  4275. }
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "description": "Get all pending question requests across all sessions.",
  4281. "summary": "List pending questions",
  4282. "x-codeSamples": [
  4283. {
  4284. "lang": "js",
  4285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4286. }
  4287. ]
  4288. }
  4289. },
  4290. "/question/{requestID}/reply": {
  4291. "post": {
  4292. "tags": ["question"],
  4293. "operationId": "question.reply",
  4294. "parameters": [
  4295. {
  4296. "name": "requestID",
  4297. "in": "path",
  4298. "schema": {
  4299. "type": "string",
  4300. "pattern": "^que"
  4301. },
  4302. "required": true
  4303. },
  4304. {
  4305. "name": "directory",
  4306. "in": "query",
  4307. "schema": {
  4308. "type": "string"
  4309. },
  4310. "required": false
  4311. },
  4312. {
  4313. "name": "workspace",
  4314. "in": "query",
  4315. "schema": {
  4316. "type": "string"
  4317. },
  4318. "required": false
  4319. }
  4320. ],
  4321. "responses": {
  4322. "200": {
  4323. "description": "Question answered successfully",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "type": "boolean",
  4328. "description": "Question answered successfully"
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "400": {
  4334. "description": "BadRequest | InvalidRequestError",
  4335. "content": {
  4336. "application/json": {
  4337. "schema": {
  4338. "anyOf": [
  4339. {
  4340. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4341. },
  4342. {
  4343. "$ref": "#/components/schemas/InvalidRequestError"
  4344. }
  4345. ]
  4346. }
  4347. }
  4348. }
  4349. },
  4350. "404": {
  4351. "description": "Not found",
  4352. "content": {
  4353. "application/json": {
  4354. "schema": {
  4355. "$ref": "#/components/schemas/NotFoundError"
  4356. }
  4357. }
  4358. }
  4359. }
  4360. },
  4361. "description": "Provide answers to a question request from the AI assistant.",
  4362. "summary": "Reply to question request",
  4363. "requestBody": {
  4364. "content": {
  4365. "application/json": {
  4366. "schema": {
  4367. "type": "object",
  4368. "properties": {
  4369. "answers": {
  4370. "type": "array",
  4371. "items": {
  4372. "$ref": "#/components/schemas/QuestionAnswer"
  4373. },
  4374. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4375. }
  4376. },
  4377. "required": ["answers"],
  4378. "additionalProperties": false
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "x-codeSamples": [
  4384. {
  4385. "lang": "js",
  4386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4387. }
  4388. ]
  4389. }
  4390. },
  4391. "/question/{requestID}/reject": {
  4392. "post": {
  4393. "tags": ["question"],
  4394. "operationId": "question.reject",
  4395. "parameters": [
  4396. {
  4397. "name": "requestID",
  4398. "in": "path",
  4399. "schema": {
  4400. "type": "string",
  4401. "pattern": "^que"
  4402. },
  4403. "required": true
  4404. },
  4405. {
  4406. "name": "directory",
  4407. "in": "query",
  4408. "schema": {
  4409. "type": "string"
  4410. },
  4411. "required": false
  4412. },
  4413. {
  4414. "name": "workspace",
  4415. "in": "query",
  4416. "schema": {
  4417. "type": "string"
  4418. },
  4419. "required": false
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "description": "Question rejected successfully",
  4425. "content": {
  4426. "application/json": {
  4427. "schema": {
  4428. "type": "boolean",
  4429. "description": "Question rejected successfully"
  4430. }
  4431. }
  4432. }
  4433. },
  4434. "400": {
  4435. "description": "BadRequest | InvalidRequestError",
  4436. "content": {
  4437. "application/json": {
  4438. "schema": {
  4439. "anyOf": [
  4440. {
  4441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4442. },
  4443. {
  4444. "$ref": "#/components/schemas/InvalidRequestError"
  4445. }
  4446. ]
  4447. }
  4448. }
  4449. }
  4450. },
  4451. "404": {
  4452. "description": "Not found",
  4453. "content": {
  4454. "application/json": {
  4455. "schema": {
  4456. "$ref": "#/components/schemas/NotFoundError"
  4457. }
  4458. }
  4459. }
  4460. }
  4461. },
  4462. "description": "Reject a question request from the AI assistant.",
  4463. "summary": "Reject question request",
  4464. "x-codeSamples": [
  4465. {
  4466. "lang": "js",
  4467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4468. }
  4469. ]
  4470. }
  4471. },
  4472. "/permission": {
  4473. "get": {
  4474. "tags": ["permission"],
  4475. "operationId": "permission.list",
  4476. "parameters": [
  4477. {
  4478. "name": "directory",
  4479. "in": "query",
  4480. "schema": {
  4481. "type": "string"
  4482. },
  4483. "required": false
  4484. },
  4485. {
  4486. "name": "workspace",
  4487. "in": "query",
  4488. "schema": {
  4489. "type": "string"
  4490. },
  4491. "required": false
  4492. }
  4493. ],
  4494. "responses": {
  4495. "200": {
  4496. "description": "List of pending permissions",
  4497. "content": {
  4498. "application/json": {
  4499. "schema": {
  4500. "type": "array",
  4501. "items": {
  4502. "$ref": "#/components/schemas/PermissionRequest"
  4503. },
  4504. "description": "List of pending permissions"
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "400": {
  4510. "description": "Bad request",
  4511. "content": {
  4512. "application/json": {
  4513. "schema": {
  4514. "$ref": "#/components/schemas/BadRequestError"
  4515. }
  4516. }
  4517. }
  4518. }
  4519. },
  4520. "description": "Get all pending permission requests across all sessions.",
  4521. "summary": "List pending permissions",
  4522. "x-codeSamples": [
  4523. {
  4524. "lang": "js",
  4525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4526. }
  4527. ]
  4528. }
  4529. },
  4530. "/permission/{requestID}/reply": {
  4531. "post": {
  4532. "tags": ["permission"],
  4533. "operationId": "permission.reply",
  4534. "parameters": [
  4535. {
  4536. "name": "requestID",
  4537. "in": "path",
  4538. "schema": {
  4539. "type": "string",
  4540. "pattern": "^per"
  4541. },
  4542. "required": true
  4543. },
  4544. {
  4545. "name": "directory",
  4546. "in": "query",
  4547. "schema": {
  4548. "type": "string"
  4549. },
  4550. "required": false
  4551. },
  4552. {
  4553. "name": "workspace",
  4554. "in": "query",
  4555. "schema": {
  4556. "type": "string"
  4557. },
  4558. "required": false
  4559. }
  4560. ],
  4561. "responses": {
  4562. "200": {
  4563. "description": "Permission processed successfully",
  4564. "content": {
  4565. "application/json": {
  4566. "schema": {
  4567. "type": "boolean",
  4568. "description": "Permission processed successfully"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "400": {
  4574. "description": "BadRequest | InvalidRequestError",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "anyOf": [
  4579. {
  4580. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4581. },
  4582. {
  4583. "$ref": "#/components/schemas/InvalidRequestError"
  4584. }
  4585. ]
  4586. }
  4587. }
  4588. }
  4589. },
  4590. "404": {
  4591. "description": "Not found",
  4592. "content": {
  4593. "application/json": {
  4594. "schema": {
  4595. "$ref": "#/components/schemas/NotFoundError"
  4596. }
  4597. }
  4598. }
  4599. }
  4600. },
  4601. "description": "Approve or deny a permission request from the AI assistant.",
  4602. "summary": "Respond to permission request",
  4603. "requestBody": {
  4604. "content": {
  4605. "application/json": {
  4606. "schema": {
  4607. "type": "object",
  4608. "properties": {
  4609. "reply": {
  4610. "type": "string",
  4611. "enum": ["once", "always", "reject"]
  4612. },
  4613. "message": {
  4614. "type": "string"
  4615. }
  4616. },
  4617. "required": ["reply"],
  4618. "additionalProperties": false
  4619. }
  4620. }
  4621. }
  4622. },
  4623. "x-codeSamples": [
  4624. {
  4625. "lang": "js",
  4626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4627. }
  4628. ]
  4629. }
  4630. },
  4631. "/provider": {
  4632. "get": {
  4633. "tags": ["provider"],
  4634. "operationId": "provider.list",
  4635. "parameters": [
  4636. {
  4637. "name": "directory",
  4638. "in": "query",
  4639. "schema": {
  4640. "type": "string"
  4641. },
  4642. "required": false
  4643. },
  4644. {
  4645. "name": "workspace",
  4646. "in": "query",
  4647. "schema": {
  4648. "type": "string"
  4649. },
  4650. "required": false
  4651. }
  4652. ],
  4653. "responses": {
  4654. "200": {
  4655. "description": "List of providers",
  4656. "content": {
  4657. "application/json": {
  4658. "schema": {
  4659. "type": "object",
  4660. "properties": {
  4661. "all": {
  4662. "type": "array",
  4663. "items": {
  4664. "$ref": "#/components/schemas/Provider"
  4665. }
  4666. },
  4667. "default": {
  4668. "type": "object",
  4669. "additionalProperties": {
  4670. "type": "string"
  4671. }
  4672. },
  4673. "connected": {
  4674. "type": "array",
  4675. "items": {
  4676. "type": "string"
  4677. }
  4678. }
  4679. },
  4680. "required": ["all", "default", "connected"],
  4681. "additionalProperties": false,
  4682. "description": "List of providers"
  4683. }
  4684. }
  4685. }
  4686. },
  4687. "400": {
  4688. "description": "Bad request",
  4689. "content": {
  4690. "application/json": {
  4691. "schema": {
  4692. "$ref": "#/components/schemas/BadRequestError"
  4693. }
  4694. }
  4695. }
  4696. }
  4697. },
  4698. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4699. "summary": "List providers",
  4700. "x-codeSamples": [
  4701. {
  4702. "lang": "js",
  4703. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4704. }
  4705. ]
  4706. }
  4707. },
  4708. "/provider/auth": {
  4709. "get": {
  4710. "tags": ["provider"],
  4711. "operationId": "provider.auth",
  4712. "parameters": [
  4713. {
  4714. "name": "directory",
  4715. "in": "query",
  4716. "schema": {
  4717. "type": "string"
  4718. },
  4719. "required": false
  4720. },
  4721. {
  4722. "name": "workspace",
  4723. "in": "query",
  4724. "schema": {
  4725. "type": "string"
  4726. },
  4727. "required": false
  4728. }
  4729. ],
  4730. "responses": {
  4731. "200": {
  4732. "description": "Provider auth methods",
  4733. "content": {
  4734. "application/json": {
  4735. "schema": {
  4736. "type": "object",
  4737. "additionalProperties": {
  4738. "type": "array",
  4739. "items": {
  4740. "$ref": "#/components/schemas/ProviderAuthMethod"
  4741. }
  4742. },
  4743. "description": "Provider auth methods"
  4744. }
  4745. }
  4746. }
  4747. },
  4748. "400": {
  4749. "description": "Bad request",
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "$ref": "#/components/schemas/BadRequestError"
  4754. }
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "description": "Retrieve available authentication methods for all AI providers.",
  4760. "summary": "Get provider auth methods",
  4761. "x-codeSamples": [
  4762. {
  4763. "lang": "js",
  4764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4765. }
  4766. ]
  4767. }
  4768. },
  4769. "/provider/{providerID}/oauth/authorize": {
  4770. "post": {
  4771. "tags": ["provider"],
  4772. "operationId": "provider.oauth.authorize",
  4773. "parameters": [
  4774. {
  4775. "name": "providerID",
  4776. "in": "path",
  4777. "schema": {
  4778. "type": "string"
  4779. },
  4780. "required": true
  4781. },
  4782. {
  4783. "name": "directory",
  4784. "in": "query",
  4785. "schema": {
  4786. "type": "string"
  4787. },
  4788. "required": false
  4789. },
  4790. {
  4791. "name": "workspace",
  4792. "in": "query",
  4793. "schema": {
  4794. "type": "string"
  4795. },
  4796. "required": false
  4797. }
  4798. ],
  4799. "responses": {
  4800. "200": {
  4801. "description": "Authorization URL and method",
  4802. "content": {
  4803. "application/json": {
  4804. "schema": {
  4805. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4806. }
  4807. }
  4808. }
  4809. },
  4810. "400": {
  4811. "description": "ProviderAuthError | InvalidRequestError",
  4812. "content": {
  4813. "application/json": {
  4814. "schema": {
  4815. "anyOf": [
  4816. {
  4817. "$ref": "#/components/schemas/ProviderAuthError1"
  4818. },
  4819. {
  4820. "$ref": "#/components/schemas/InvalidRequestError"
  4821. }
  4822. ]
  4823. }
  4824. }
  4825. }
  4826. }
  4827. },
  4828. "description": "Start the OAuth authorization flow for a provider.",
  4829. "summary": "Start OAuth authorization",
  4830. "requestBody": {
  4831. "content": {
  4832. "application/json": {
  4833. "schema": {
  4834. "type": "object",
  4835. "properties": {
  4836. "method": {
  4837. "type": "number",
  4838. "description": "Auth method index"
  4839. },
  4840. "inputs": {
  4841. "type": "object",
  4842. "additionalProperties": {
  4843. "type": "string"
  4844. }
  4845. }
  4846. },
  4847. "required": ["method"],
  4848. "additionalProperties": false
  4849. }
  4850. }
  4851. }
  4852. },
  4853. "x-codeSamples": [
  4854. {
  4855. "lang": "js",
  4856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4857. }
  4858. ]
  4859. }
  4860. },
  4861. "/provider/{providerID}/oauth/callback": {
  4862. "post": {
  4863. "tags": ["provider"],
  4864. "operationId": "provider.oauth.callback",
  4865. "parameters": [
  4866. {
  4867. "name": "providerID",
  4868. "in": "path",
  4869. "schema": {
  4870. "type": "string"
  4871. },
  4872. "required": true
  4873. },
  4874. {
  4875. "name": "directory",
  4876. "in": "query",
  4877. "schema": {
  4878. "type": "string"
  4879. },
  4880. "required": false
  4881. },
  4882. {
  4883. "name": "workspace",
  4884. "in": "query",
  4885. "schema": {
  4886. "type": "string"
  4887. },
  4888. "required": false
  4889. }
  4890. ],
  4891. "responses": {
  4892. "200": {
  4893. "description": "OAuth callback processed successfully",
  4894. "content": {
  4895. "application/json": {
  4896. "schema": {
  4897. "type": "boolean",
  4898. "description": "OAuth callback processed successfully"
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "400": {
  4904. "description": "ProviderAuthError | InvalidRequestError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "anyOf": [
  4909. {
  4910. "$ref": "#/components/schemas/ProviderAuthError1"
  4911. },
  4912. {
  4913. "$ref": "#/components/schemas/InvalidRequestError"
  4914. }
  4915. ]
  4916. }
  4917. }
  4918. }
  4919. }
  4920. },
  4921. "description": "Handle the OAuth callback from a provider after user authorization.",
  4922. "summary": "Handle OAuth callback",
  4923. "requestBody": {
  4924. "content": {
  4925. "application/json": {
  4926. "schema": {
  4927. "type": "object",
  4928. "properties": {
  4929. "method": {
  4930. "type": "number",
  4931. "description": "Auth method index"
  4932. },
  4933. "code": {
  4934. "type": "string"
  4935. }
  4936. },
  4937. "required": ["method"],
  4938. "additionalProperties": false
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "x-codeSamples": [
  4944. {
  4945. "lang": "js",
  4946. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4947. }
  4948. ]
  4949. }
  4950. },
  4951. "/session": {
  4952. "get": {
  4953. "tags": ["session"],
  4954. "operationId": "session.list",
  4955. "parameters": [
  4956. {
  4957. "name": "directory",
  4958. "in": "query",
  4959. "schema": {
  4960. "type": "string"
  4961. },
  4962. "required": false
  4963. },
  4964. {
  4965. "name": "workspace",
  4966. "in": "query",
  4967. "schema": {
  4968. "type": "string"
  4969. },
  4970. "required": false
  4971. },
  4972. {
  4973. "name": "scope",
  4974. "in": "query",
  4975. "schema": {
  4976. "type": "string",
  4977. "enum": ["project"]
  4978. },
  4979. "required": false
  4980. },
  4981. {
  4982. "name": "path",
  4983. "in": "query",
  4984. "schema": {
  4985. "type": "string"
  4986. },
  4987. "required": false
  4988. },
  4989. {
  4990. "name": "roots",
  4991. "in": "query",
  4992. "schema": {
  4993. "anyOf": [
  4994. {
  4995. "type": "boolean"
  4996. },
  4997. {
  4998. "type": "string",
  4999. "enum": ["true", "false"]
  5000. }
  5001. ]
  5002. },
  5003. "required": false
  5004. },
  5005. {
  5006. "name": "start",
  5007. "in": "query",
  5008. "schema": {
  5009. "type": "number"
  5010. },
  5011. "required": false
  5012. },
  5013. {
  5014. "name": "search",
  5015. "in": "query",
  5016. "schema": {
  5017. "type": "string"
  5018. },
  5019. "required": false
  5020. },
  5021. {
  5022. "name": "limit",
  5023. "in": "query",
  5024. "schema": {
  5025. "type": "number"
  5026. },
  5027. "required": false
  5028. }
  5029. ],
  5030. "responses": {
  5031. "200": {
  5032. "description": "List of sessions",
  5033. "content": {
  5034. "application/json": {
  5035. "schema": {
  5036. "type": "array",
  5037. "items": {
  5038. "$ref": "#/components/schemas/Session"
  5039. },
  5040. "description": "List of sessions"
  5041. }
  5042. }
  5043. }
  5044. },
  5045. "400": {
  5046. "description": "Bad request",
  5047. "content": {
  5048. "application/json": {
  5049. "schema": {
  5050. "$ref": "#/components/schemas/BadRequestError"
  5051. }
  5052. }
  5053. }
  5054. }
  5055. },
  5056. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5057. "summary": "List sessions",
  5058. "x-codeSamples": [
  5059. {
  5060. "lang": "js",
  5061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5062. }
  5063. ]
  5064. },
  5065. "post": {
  5066. "tags": ["session"],
  5067. "operationId": "session.create",
  5068. "parameters": [
  5069. {
  5070. "name": "directory",
  5071. "in": "query",
  5072. "schema": {
  5073. "type": "string"
  5074. },
  5075. "required": false
  5076. },
  5077. {
  5078. "name": "workspace",
  5079. "in": "query",
  5080. "schema": {
  5081. "type": "string"
  5082. },
  5083. "required": false
  5084. }
  5085. ],
  5086. "responses": {
  5087. "200": {
  5088. "description": "Successfully created session",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/Session"
  5093. }
  5094. }
  5095. }
  5096. },
  5097. "400": {
  5098. "description": "BadRequest | InvalidRequestError",
  5099. "content": {
  5100. "application/json": {
  5101. "schema": {
  5102. "anyOf": [
  5103. {
  5104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5105. },
  5106. {
  5107. "$ref": "#/components/schemas/InvalidRequestError"
  5108. }
  5109. ]
  5110. }
  5111. }
  5112. }
  5113. }
  5114. },
  5115. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5116. "summary": "Create session",
  5117. "requestBody": {
  5118. "content": {
  5119. "application/json": {
  5120. "schema": {
  5121. "type": "object",
  5122. "properties": {
  5123. "parentID": {
  5124. "type": "string",
  5125. "pattern": "^ses"
  5126. },
  5127. "title": {
  5128. "type": "string"
  5129. },
  5130. "agent": {
  5131. "type": "string"
  5132. },
  5133. "model": {
  5134. "type": "object",
  5135. "properties": {
  5136. "id": {
  5137. "type": "string"
  5138. },
  5139. "providerID": {
  5140. "type": "string"
  5141. },
  5142. "variant": {
  5143. "type": "string"
  5144. }
  5145. },
  5146. "required": ["id", "providerID"],
  5147. "additionalProperties": false
  5148. },
  5149. "permission": {
  5150. "$ref": "#/components/schemas/PermissionRuleset"
  5151. },
  5152. "workspaceID": {
  5153. "type": "string",
  5154. "pattern": "^wrk"
  5155. }
  5156. },
  5157. "additionalProperties": false
  5158. }
  5159. }
  5160. }
  5161. },
  5162. "x-codeSamples": [
  5163. {
  5164. "lang": "js",
  5165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5166. }
  5167. ]
  5168. }
  5169. },
  5170. "/session/status": {
  5171. "get": {
  5172. "tags": ["session"],
  5173. "operationId": "session.status",
  5174. "parameters": [
  5175. {
  5176. "name": "directory",
  5177. "in": "query",
  5178. "schema": {
  5179. "type": "string"
  5180. },
  5181. "required": false
  5182. },
  5183. {
  5184. "name": "workspace",
  5185. "in": "query",
  5186. "schema": {
  5187. "type": "string"
  5188. },
  5189. "required": false
  5190. }
  5191. ],
  5192. "responses": {
  5193. "200": {
  5194. "description": "Get session status",
  5195. "content": {
  5196. "application/json": {
  5197. "schema": {
  5198. "type": "object",
  5199. "additionalProperties": {
  5200. "$ref": "#/components/schemas/SessionStatus"
  5201. },
  5202. "description": "Get session status"
  5203. }
  5204. }
  5205. }
  5206. },
  5207. "400": {
  5208. "description": "BadRequest | InvalidRequestError",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "anyOf": [
  5213. {
  5214. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5215. },
  5216. {
  5217. "$ref": "#/components/schemas/InvalidRequestError"
  5218. }
  5219. ]
  5220. }
  5221. }
  5222. }
  5223. }
  5224. },
  5225. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5226. "summary": "Get session status",
  5227. "x-codeSamples": [
  5228. {
  5229. "lang": "js",
  5230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5231. }
  5232. ]
  5233. }
  5234. },
  5235. "/session/{sessionID}": {
  5236. "get": {
  5237. "tags": ["session"],
  5238. "operationId": "session.get",
  5239. "parameters": [
  5240. {
  5241. "name": "sessionID",
  5242. "in": "path",
  5243. "schema": {
  5244. "type": "string",
  5245. "pattern": "^ses"
  5246. },
  5247. "required": true
  5248. },
  5249. {
  5250. "name": "directory",
  5251. "in": "query",
  5252. "schema": {
  5253. "type": "string"
  5254. },
  5255. "required": false
  5256. },
  5257. {
  5258. "name": "workspace",
  5259. "in": "query",
  5260. "schema": {
  5261. "type": "string"
  5262. },
  5263. "required": false
  5264. }
  5265. ],
  5266. "responses": {
  5267. "200": {
  5268. "description": "Get session",
  5269. "content": {
  5270. "application/json": {
  5271. "schema": {
  5272. "$ref": "#/components/schemas/Session"
  5273. }
  5274. }
  5275. }
  5276. },
  5277. "400": {
  5278. "description": "BadRequest | InvalidRequestError",
  5279. "content": {
  5280. "application/json": {
  5281. "schema": {
  5282. "anyOf": [
  5283. {
  5284. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5285. },
  5286. {
  5287. "$ref": "#/components/schemas/InvalidRequestError"
  5288. }
  5289. ]
  5290. }
  5291. }
  5292. }
  5293. },
  5294. "404": {
  5295. "description": "NotFoundError",
  5296. "content": {
  5297. "application/json": {
  5298. "schema": {
  5299. "$ref": "#/components/schemas/NotFoundError"
  5300. }
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "description": "Retrieve detailed information about a specific OpenCode session.",
  5306. "summary": "Get session",
  5307. "x-codeSamples": [
  5308. {
  5309. "lang": "js",
  5310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5311. }
  5312. ]
  5313. },
  5314. "delete": {
  5315. "tags": ["session"],
  5316. "operationId": "session.delete",
  5317. "parameters": [
  5318. {
  5319. "name": "sessionID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string",
  5323. "pattern": "^ses"
  5324. },
  5325. "required": true
  5326. },
  5327. {
  5328. "name": "directory",
  5329. "in": "query",
  5330. "schema": {
  5331. "type": "string"
  5332. },
  5333. "required": false
  5334. },
  5335. {
  5336. "name": "workspace",
  5337. "in": "query",
  5338. "schema": {
  5339. "type": "string"
  5340. },
  5341. "required": false
  5342. }
  5343. ],
  5344. "responses": {
  5345. "200": {
  5346. "description": "Successfully deleted session",
  5347. "content": {
  5348. "application/json": {
  5349. "schema": {
  5350. "type": "boolean",
  5351. "description": "Successfully deleted session"
  5352. }
  5353. }
  5354. }
  5355. },
  5356. "400": {
  5357. "description": "BadRequest | InvalidRequestError",
  5358. "content": {
  5359. "application/json": {
  5360. "schema": {
  5361. "anyOf": [
  5362. {
  5363. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5364. },
  5365. {
  5366. "$ref": "#/components/schemas/InvalidRequestError"
  5367. }
  5368. ]
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "404": {
  5374. "description": "NotFoundError",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "$ref": "#/components/schemas/NotFoundError"
  5379. }
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5385. "summary": "Delete session",
  5386. "x-codeSamples": [
  5387. {
  5388. "lang": "js",
  5389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5390. }
  5391. ]
  5392. },
  5393. "patch": {
  5394. "tags": ["session"],
  5395. "operationId": "session.update",
  5396. "parameters": [
  5397. {
  5398. "name": "sessionID",
  5399. "in": "path",
  5400. "schema": {
  5401. "type": "string",
  5402. "pattern": "^ses"
  5403. },
  5404. "required": true
  5405. },
  5406. {
  5407. "name": "directory",
  5408. "in": "query",
  5409. "schema": {
  5410. "type": "string"
  5411. },
  5412. "required": false
  5413. },
  5414. {
  5415. "name": "workspace",
  5416. "in": "query",
  5417. "schema": {
  5418. "type": "string"
  5419. },
  5420. "required": false
  5421. }
  5422. ],
  5423. "responses": {
  5424. "200": {
  5425. "description": "Successfully updated session",
  5426. "content": {
  5427. "application/json": {
  5428. "schema": {
  5429. "$ref": "#/components/schemas/Session"
  5430. }
  5431. }
  5432. }
  5433. },
  5434. "400": {
  5435. "description": "BadRequest | InvalidRequestError",
  5436. "content": {
  5437. "application/json": {
  5438. "schema": {
  5439. "anyOf": [
  5440. {
  5441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5442. },
  5443. {
  5444. "$ref": "#/components/schemas/InvalidRequestError"
  5445. }
  5446. ]
  5447. }
  5448. }
  5449. }
  5450. },
  5451. "404": {
  5452. "description": "NotFoundError",
  5453. "content": {
  5454. "application/json": {
  5455. "schema": {
  5456. "$ref": "#/components/schemas/NotFoundError"
  5457. }
  5458. }
  5459. }
  5460. }
  5461. },
  5462. "description": "Update properties of an existing session, such as title or other metadata.",
  5463. "summary": "Update session",
  5464. "requestBody": {
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "type": "object",
  5469. "properties": {
  5470. "title": {
  5471. "type": "string"
  5472. },
  5473. "permission": {
  5474. "$ref": "#/components/schemas/PermissionRuleset"
  5475. },
  5476. "time": {
  5477. "type": "object",
  5478. "properties": {
  5479. "archived": {
  5480. "type": "number"
  5481. }
  5482. },
  5483. "additionalProperties": false
  5484. }
  5485. },
  5486. "additionalProperties": false
  5487. }
  5488. }
  5489. }
  5490. },
  5491. "x-codeSamples": [
  5492. {
  5493. "lang": "js",
  5494. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5495. }
  5496. ]
  5497. }
  5498. },
  5499. "/session/{sessionID}/children": {
  5500. "get": {
  5501. "tags": ["session"],
  5502. "operationId": "session.children",
  5503. "parameters": [
  5504. {
  5505. "name": "sessionID",
  5506. "in": "path",
  5507. "schema": {
  5508. "type": "string",
  5509. "pattern": "^ses"
  5510. },
  5511. "required": true
  5512. },
  5513. {
  5514. "name": "directory",
  5515. "in": "query",
  5516. "schema": {
  5517. "type": "string"
  5518. },
  5519. "required": false
  5520. },
  5521. {
  5522. "name": "workspace",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. }
  5529. ],
  5530. "responses": {
  5531. "200": {
  5532. "description": "List of children",
  5533. "content": {
  5534. "application/json": {
  5535. "schema": {
  5536. "type": "array",
  5537. "items": {
  5538. "$ref": "#/components/schemas/Session"
  5539. },
  5540. "description": "List of children"
  5541. }
  5542. }
  5543. }
  5544. },
  5545. "400": {
  5546. "description": "BadRequest | InvalidRequestError",
  5547. "content": {
  5548. "application/json": {
  5549. "schema": {
  5550. "anyOf": [
  5551. {
  5552. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5553. },
  5554. {
  5555. "$ref": "#/components/schemas/InvalidRequestError"
  5556. }
  5557. ]
  5558. }
  5559. }
  5560. }
  5561. },
  5562. "404": {
  5563. "description": "NotFoundError",
  5564. "content": {
  5565. "application/json": {
  5566. "schema": {
  5567. "$ref": "#/components/schemas/NotFoundError"
  5568. }
  5569. }
  5570. }
  5571. }
  5572. },
  5573. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5574. "summary": "Get session children",
  5575. "x-codeSamples": [
  5576. {
  5577. "lang": "js",
  5578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5579. }
  5580. ]
  5581. }
  5582. },
  5583. "/session/{sessionID}/todo": {
  5584. "get": {
  5585. "tags": ["session"],
  5586. "operationId": "session.todo",
  5587. "parameters": [
  5588. {
  5589. "name": "sessionID",
  5590. "in": "path",
  5591. "schema": {
  5592. "type": "string",
  5593. "pattern": "^ses"
  5594. },
  5595. "required": true
  5596. },
  5597. {
  5598. "name": "directory",
  5599. "in": "query",
  5600. "schema": {
  5601. "type": "string"
  5602. },
  5603. "required": false
  5604. },
  5605. {
  5606. "name": "workspace",
  5607. "in": "query",
  5608. "schema": {
  5609. "type": "string"
  5610. },
  5611. "required": false
  5612. }
  5613. ],
  5614. "responses": {
  5615. "200": {
  5616. "description": "Todo list",
  5617. "content": {
  5618. "application/json": {
  5619. "schema": {
  5620. "type": "array",
  5621. "items": {
  5622. "$ref": "#/components/schemas/Todo"
  5623. },
  5624. "description": "Todo list"
  5625. }
  5626. }
  5627. }
  5628. },
  5629. "400": {
  5630. "description": "BadRequest | InvalidRequestError",
  5631. "content": {
  5632. "application/json": {
  5633. "schema": {
  5634. "anyOf": [
  5635. {
  5636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5637. },
  5638. {
  5639. "$ref": "#/components/schemas/InvalidRequestError"
  5640. }
  5641. ]
  5642. }
  5643. }
  5644. }
  5645. },
  5646. "404": {
  5647. "description": "NotFoundError",
  5648. "content": {
  5649. "application/json": {
  5650. "schema": {
  5651. "$ref": "#/components/schemas/NotFoundError"
  5652. }
  5653. }
  5654. }
  5655. }
  5656. },
  5657. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5658. "summary": "Get session todos",
  5659. "x-codeSamples": [
  5660. {
  5661. "lang": "js",
  5662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5663. }
  5664. ]
  5665. }
  5666. },
  5667. "/session/{sessionID}/diff": {
  5668. "get": {
  5669. "tags": ["session"],
  5670. "operationId": "session.diff",
  5671. "parameters": [
  5672. {
  5673. "name": "sessionID",
  5674. "in": "path",
  5675. "schema": {
  5676. "type": "string",
  5677. "pattern": "^ses"
  5678. },
  5679. "required": true
  5680. },
  5681. {
  5682. "name": "directory",
  5683. "in": "query",
  5684. "schema": {
  5685. "type": "string"
  5686. },
  5687. "required": false
  5688. },
  5689. {
  5690. "name": "workspace",
  5691. "in": "query",
  5692. "schema": {
  5693. "type": "string"
  5694. },
  5695. "required": false
  5696. },
  5697. {
  5698. "name": "messageID",
  5699. "in": "query",
  5700. "schema": {
  5701. "type": "string",
  5702. "pattern": "^msg"
  5703. },
  5704. "required": false
  5705. }
  5706. ],
  5707. "responses": {
  5708. "200": {
  5709. "description": "Successfully retrieved diff",
  5710. "content": {
  5711. "application/json": {
  5712. "schema": {
  5713. "type": "array",
  5714. "items": {
  5715. "$ref": "#/components/schemas/SnapshotFileDiff"
  5716. },
  5717. "description": "Successfully retrieved diff"
  5718. }
  5719. }
  5720. }
  5721. },
  5722. "400": {
  5723. "description": "Bad request",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/BadRequestError"
  5728. }
  5729. }
  5730. }
  5731. }
  5732. },
  5733. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5734. "summary": "Get message diff",
  5735. "x-codeSamples": [
  5736. {
  5737. "lang": "js",
  5738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5739. }
  5740. ]
  5741. }
  5742. },
  5743. "/session/{sessionID}/message": {
  5744. "get": {
  5745. "tags": ["session"],
  5746. "operationId": "session.messages",
  5747. "parameters": [
  5748. {
  5749. "name": "sessionID",
  5750. "in": "path",
  5751. "schema": {
  5752. "type": "string",
  5753. "pattern": "^ses"
  5754. },
  5755. "required": true
  5756. },
  5757. {
  5758. "name": "directory",
  5759. "in": "query",
  5760. "schema": {
  5761. "type": "string"
  5762. },
  5763. "required": false
  5764. },
  5765. {
  5766. "name": "workspace",
  5767. "in": "query",
  5768. "schema": {
  5769. "type": "string"
  5770. },
  5771. "required": false
  5772. },
  5773. {
  5774. "name": "limit",
  5775. "in": "query",
  5776. "schema": {
  5777. "type": "integer",
  5778. "minimum": 0,
  5779. "maximum": 9007199254740991
  5780. },
  5781. "required": false
  5782. },
  5783. {
  5784. "name": "before",
  5785. "in": "query",
  5786. "schema": {
  5787. "type": "string"
  5788. },
  5789. "required": false
  5790. }
  5791. ],
  5792. "responses": {
  5793. "200": {
  5794. "description": "List of messages",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "type": "array",
  5799. "items": {
  5800. "type": "object",
  5801. "properties": {
  5802. "info": {
  5803. "$ref": "#/components/schemas/Message"
  5804. },
  5805. "parts": {
  5806. "type": "array",
  5807. "items": {
  5808. "$ref": "#/components/schemas/Part"
  5809. }
  5810. }
  5811. },
  5812. "required": ["info", "parts"],
  5813. "additionalProperties": false
  5814. },
  5815. "description": "List of messages"
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "400": {
  5821. "description": "BadRequest | InvalidRequestError",
  5822. "content": {
  5823. "application/json": {
  5824. "schema": {
  5825. "anyOf": [
  5826. {
  5827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5828. },
  5829. {
  5830. "$ref": "#/components/schemas/InvalidRequestError"
  5831. }
  5832. ]
  5833. }
  5834. }
  5835. }
  5836. },
  5837. "404": {
  5838. "description": "NotFoundError",
  5839. "content": {
  5840. "application/json": {
  5841. "schema": {
  5842. "$ref": "#/components/schemas/NotFoundError"
  5843. }
  5844. }
  5845. }
  5846. }
  5847. },
  5848. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5849. "summary": "Get session messages",
  5850. "x-codeSamples": [
  5851. {
  5852. "lang": "js",
  5853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5854. }
  5855. ]
  5856. },
  5857. "post": {
  5858. "tags": ["session"],
  5859. "operationId": "session.prompt",
  5860. "parameters": [
  5861. {
  5862. "name": "sessionID",
  5863. "in": "path",
  5864. "schema": {
  5865. "type": "string",
  5866. "pattern": "^ses"
  5867. },
  5868. "required": true
  5869. },
  5870. {
  5871. "name": "directory",
  5872. "in": "query",
  5873. "schema": {
  5874. "type": "string"
  5875. },
  5876. "required": false
  5877. },
  5878. {
  5879. "name": "workspace",
  5880. "in": "query",
  5881. "schema": {
  5882. "type": "string"
  5883. },
  5884. "required": false
  5885. }
  5886. ],
  5887. "responses": {
  5888. "200": {
  5889. "description": "Created message",
  5890. "content": {
  5891. "application/json": {
  5892. "schema": {
  5893. "type": "object",
  5894. "required": ["info", "parts"],
  5895. "properties": {
  5896. "info": {
  5897. "$ref": "#/components/schemas/AssistantMessage"
  5898. },
  5899. "parts": {
  5900. "type": "array",
  5901. "items": {
  5902. "$ref": "#/components/schemas/Part"
  5903. }
  5904. }
  5905. }
  5906. }
  5907. }
  5908. }
  5909. },
  5910. "400": {
  5911. "description": "BadRequest | InvalidRequestError",
  5912. "content": {
  5913. "application/json": {
  5914. "schema": {
  5915. "anyOf": [
  5916. {
  5917. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5918. },
  5919. {
  5920. "$ref": "#/components/schemas/InvalidRequestError"
  5921. }
  5922. ]
  5923. }
  5924. }
  5925. }
  5926. },
  5927. "404": {
  5928. "description": "NotFoundError",
  5929. "content": {
  5930. "application/json": {
  5931. "schema": {
  5932. "$ref": "#/components/schemas/NotFoundError"
  5933. }
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "description": "Create and send a new message to a session, streaming the AI response.",
  5939. "summary": "Send message",
  5940. "requestBody": {
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "type": "object",
  5945. "properties": {
  5946. "messageID": {
  5947. "type": "string",
  5948. "pattern": "^msg"
  5949. },
  5950. "model": {
  5951. "type": "object",
  5952. "properties": {
  5953. "providerID": {
  5954. "type": "string"
  5955. },
  5956. "modelID": {
  5957. "type": "string"
  5958. }
  5959. },
  5960. "required": ["providerID", "modelID"],
  5961. "additionalProperties": false
  5962. },
  5963. "agent": {
  5964. "type": "string"
  5965. },
  5966. "noReply": {
  5967. "type": "boolean"
  5968. },
  5969. "tools": {
  5970. "type": "object",
  5971. "additionalProperties": {
  5972. "type": "boolean"
  5973. }
  5974. },
  5975. "format": {
  5976. "$ref": "#/components/schemas/OutputFormat"
  5977. },
  5978. "system": {
  5979. "type": "string"
  5980. },
  5981. "variant": {
  5982. "type": "string"
  5983. },
  5984. "parts": {
  5985. "type": "array",
  5986. "items": {
  5987. "anyOf": [
  5988. {
  5989. "$ref": "#/components/schemas/TextPartInput"
  5990. },
  5991. {
  5992. "$ref": "#/components/schemas/FilePartInput"
  5993. },
  5994. {
  5995. "$ref": "#/components/schemas/AgentPartInput"
  5996. },
  5997. {
  5998. "$ref": "#/components/schemas/SubtaskPartInput"
  5999. }
  6000. ]
  6001. }
  6002. }
  6003. },
  6004. "required": ["parts"],
  6005. "additionalProperties": false
  6006. }
  6007. }
  6008. }
  6009. },
  6010. "x-codeSamples": [
  6011. {
  6012. "lang": "js",
  6013. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6014. }
  6015. ]
  6016. }
  6017. },
  6018. "/session/{sessionID}/message/{messageID}": {
  6019. "get": {
  6020. "tags": ["session"],
  6021. "operationId": "session.message",
  6022. "parameters": [
  6023. {
  6024. "name": "sessionID",
  6025. "in": "path",
  6026. "schema": {
  6027. "type": "string",
  6028. "pattern": "^ses"
  6029. },
  6030. "required": true
  6031. },
  6032. {
  6033. "name": "messageID",
  6034. "in": "path",
  6035. "schema": {
  6036. "type": "string",
  6037. "pattern": "^msg"
  6038. },
  6039. "required": true
  6040. },
  6041. {
  6042. "name": "directory",
  6043. "in": "query",
  6044. "schema": {
  6045. "type": "string"
  6046. },
  6047. "required": false
  6048. },
  6049. {
  6050. "name": "workspace",
  6051. "in": "query",
  6052. "schema": {
  6053. "type": "string"
  6054. },
  6055. "required": false
  6056. }
  6057. ],
  6058. "responses": {
  6059. "200": {
  6060. "description": "Message",
  6061. "content": {
  6062. "application/json": {
  6063. "schema": {
  6064. "type": "object",
  6065. "properties": {
  6066. "info": {
  6067. "$ref": "#/components/schemas/Message"
  6068. },
  6069. "parts": {
  6070. "type": "array",
  6071. "items": {
  6072. "$ref": "#/components/schemas/Part"
  6073. }
  6074. }
  6075. },
  6076. "required": ["info", "parts"],
  6077. "additionalProperties": false,
  6078. "description": "Message"
  6079. }
  6080. }
  6081. }
  6082. },
  6083. "400": {
  6084. "description": "BadRequest | InvalidRequestError",
  6085. "content": {
  6086. "application/json": {
  6087. "schema": {
  6088. "anyOf": [
  6089. {
  6090. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6091. },
  6092. {
  6093. "$ref": "#/components/schemas/InvalidRequestError"
  6094. }
  6095. ]
  6096. }
  6097. }
  6098. }
  6099. },
  6100. "404": {
  6101. "description": "NotFoundError",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "$ref": "#/components/schemas/NotFoundError"
  6106. }
  6107. }
  6108. }
  6109. }
  6110. },
  6111. "description": "Retrieve a specific message from a session by its message ID.",
  6112. "summary": "Get message",
  6113. "x-codeSamples": [
  6114. {
  6115. "lang": "js",
  6116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6117. }
  6118. ]
  6119. },
  6120. "delete": {
  6121. "tags": ["session"],
  6122. "operationId": "session.deleteMessage",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "messageID",
  6135. "in": "path",
  6136. "schema": {
  6137. "type": "string",
  6138. "pattern": "^msg"
  6139. },
  6140. "required": true
  6141. },
  6142. {
  6143. "name": "directory",
  6144. "in": "query",
  6145. "schema": {
  6146. "type": "string"
  6147. },
  6148. "required": false
  6149. },
  6150. {
  6151. "name": "workspace",
  6152. "in": "query",
  6153. "schema": {
  6154. "type": "string"
  6155. },
  6156. "required": false
  6157. }
  6158. ],
  6159. "responses": {
  6160. "200": {
  6161. "description": "Successfully deleted message",
  6162. "content": {
  6163. "application/json": {
  6164. "schema": {
  6165. "type": "boolean",
  6166. "description": "Successfully deleted message"
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "BadRequest | InvalidRequestError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "anyOf": [
  6177. {
  6178. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6179. },
  6180. {
  6181. "$ref": "#/components/schemas/InvalidRequestError"
  6182. }
  6183. ]
  6184. }
  6185. }
  6186. }
  6187. },
  6188. "404": {
  6189. "description": "NotFoundError",
  6190. "content": {
  6191. "application/json": {
  6192. "schema": {
  6193. "$ref": "#/components/schemas/NotFoundError"
  6194. }
  6195. }
  6196. }
  6197. }
  6198. },
  6199. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6200. "summary": "Delete message",
  6201. "x-codeSamples": [
  6202. {
  6203. "lang": "js",
  6204. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6205. }
  6206. ]
  6207. }
  6208. },
  6209. "/session/{sessionID}/fork": {
  6210. "post": {
  6211. "tags": ["session"],
  6212. "operationId": "session.fork",
  6213. "parameters": [
  6214. {
  6215. "name": "sessionID",
  6216. "in": "path",
  6217. "schema": {
  6218. "type": "string",
  6219. "pattern": "^ses"
  6220. },
  6221. "required": true
  6222. },
  6223. {
  6224. "name": "directory",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "workspace",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "string"
  6236. },
  6237. "required": false
  6238. }
  6239. ],
  6240. "responses": {
  6241. "200": {
  6242. "description": "200",
  6243. "content": {
  6244. "application/json": {
  6245. "schema": {
  6246. "$ref": "#/components/schemas/Session"
  6247. }
  6248. }
  6249. }
  6250. },
  6251. "400": {
  6252. "description": "BadRequest | InvalidRequestError",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "anyOf": [
  6257. {
  6258. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6259. },
  6260. {
  6261. "$ref": "#/components/schemas/InvalidRequestError"
  6262. }
  6263. ]
  6264. }
  6265. }
  6266. }
  6267. },
  6268. "404": {
  6269. "description": "NotFoundError",
  6270. "content": {
  6271. "application/json": {
  6272. "schema": {
  6273. "$ref": "#/components/schemas/NotFoundError"
  6274. }
  6275. }
  6276. }
  6277. }
  6278. },
  6279. "description": "Create a new session by forking an existing session at a specific message point.",
  6280. "summary": "Fork session",
  6281. "requestBody": {
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "properties": {
  6287. "messageID": {
  6288. "type": "string",
  6289. "pattern": "^msg"
  6290. }
  6291. },
  6292. "additionalProperties": false
  6293. }
  6294. }
  6295. }
  6296. },
  6297. "x-codeSamples": [
  6298. {
  6299. "lang": "js",
  6300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6301. }
  6302. ]
  6303. }
  6304. },
  6305. "/session/{sessionID}/abort": {
  6306. "post": {
  6307. "tags": ["session"],
  6308. "operationId": "session.abort",
  6309. "parameters": [
  6310. {
  6311. "name": "sessionID",
  6312. "in": "path",
  6313. "schema": {
  6314. "type": "string",
  6315. "pattern": "^ses"
  6316. },
  6317. "required": true
  6318. },
  6319. {
  6320. "name": "directory",
  6321. "in": "query",
  6322. "schema": {
  6323. "type": "string"
  6324. },
  6325. "required": false
  6326. },
  6327. {
  6328. "name": "workspace",
  6329. "in": "query",
  6330. "schema": {
  6331. "type": "string"
  6332. },
  6333. "required": false
  6334. }
  6335. ],
  6336. "responses": {
  6337. "200": {
  6338. "description": "Aborted session",
  6339. "content": {
  6340. "application/json": {
  6341. "schema": {
  6342. "type": "boolean",
  6343. "description": "Aborted session"
  6344. }
  6345. }
  6346. }
  6347. },
  6348. "400": {
  6349. "description": "BadRequest | InvalidRequestError",
  6350. "content": {
  6351. "application/json": {
  6352. "schema": {
  6353. "anyOf": [
  6354. {
  6355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6356. },
  6357. {
  6358. "$ref": "#/components/schemas/InvalidRequestError"
  6359. }
  6360. ]
  6361. }
  6362. }
  6363. }
  6364. }
  6365. },
  6366. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6367. "summary": "Abort session",
  6368. "x-codeSamples": [
  6369. {
  6370. "lang": "js",
  6371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6372. }
  6373. ]
  6374. }
  6375. },
  6376. "/session/{sessionID}/init": {
  6377. "post": {
  6378. "tags": ["session"],
  6379. "operationId": "session.init",
  6380. "parameters": [
  6381. {
  6382. "name": "sessionID",
  6383. "in": "path",
  6384. "schema": {
  6385. "type": "string",
  6386. "pattern": "^ses"
  6387. },
  6388. "required": true
  6389. },
  6390. {
  6391. "name": "directory",
  6392. "in": "query",
  6393. "schema": {
  6394. "type": "string"
  6395. },
  6396. "required": false
  6397. },
  6398. {
  6399. "name": "workspace",
  6400. "in": "query",
  6401. "schema": {
  6402. "type": "string"
  6403. },
  6404. "required": false
  6405. }
  6406. ],
  6407. "responses": {
  6408. "200": {
  6409. "description": "200",
  6410. "content": {
  6411. "application/json": {
  6412. "schema": {
  6413. "type": "boolean",
  6414. "description": "200"
  6415. }
  6416. }
  6417. }
  6418. },
  6419. "400": {
  6420. "description": "BadRequest | InvalidRequestError",
  6421. "content": {
  6422. "application/json": {
  6423. "schema": {
  6424. "anyOf": [
  6425. {
  6426. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6427. },
  6428. {
  6429. "$ref": "#/components/schemas/InvalidRequestError"
  6430. }
  6431. ]
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "404": {
  6437. "description": "NotFoundError",
  6438. "content": {
  6439. "application/json": {
  6440. "schema": {
  6441. "$ref": "#/components/schemas/NotFoundError"
  6442. }
  6443. }
  6444. }
  6445. }
  6446. },
  6447. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6448. "summary": "Initialize session",
  6449. "requestBody": {
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "object",
  6454. "properties": {
  6455. "modelID": {
  6456. "type": "string"
  6457. },
  6458. "providerID": {
  6459. "type": "string"
  6460. },
  6461. "messageID": {
  6462. "type": "string",
  6463. "pattern": "^msg"
  6464. }
  6465. },
  6466. "required": ["modelID", "providerID", "messageID"],
  6467. "additionalProperties": false
  6468. }
  6469. }
  6470. }
  6471. },
  6472. "x-codeSamples": [
  6473. {
  6474. "lang": "js",
  6475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6476. }
  6477. ]
  6478. }
  6479. },
  6480. "/session/{sessionID}/share": {
  6481. "post": {
  6482. "tags": ["session"],
  6483. "operationId": "session.share",
  6484. "parameters": [
  6485. {
  6486. "name": "sessionID",
  6487. "in": "path",
  6488. "schema": {
  6489. "type": "string",
  6490. "pattern": "^ses"
  6491. },
  6492. "required": true
  6493. },
  6494. {
  6495. "name": "directory",
  6496. "in": "query",
  6497. "schema": {
  6498. "type": "string"
  6499. },
  6500. "required": false
  6501. },
  6502. {
  6503. "name": "workspace",
  6504. "in": "query",
  6505. "schema": {
  6506. "type": "string"
  6507. },
  6508. "required": false
  6509. }
  6510. ],
  6511. "responses": {
  6512. "200": {
  6513. "description": "Successfully shared session",
  6514. "content": {
  6515. "application/json": {
  6516. "schema": {
  6517. "$ref": "#/components/schemas/Session"
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "400": {
  6523. "description": "Bad request",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/BadRequestError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "404": {
  6533. "description": "NotFoundError",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/NotFoundError"
  6538. }
  6539. }
  6540. }
  6541. },
  6542. "500": {
  6543. "description": "InternalServerError",
  6544. "content": {
  6545. "application/json": {
  6546. "schema": {
  6547. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6548. }
  6549. }
  6550. }
  6551. }
  6552. },
  6553. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6554. "summary": "Share session",
  6555. "x-codeSamples": [
  6556. {
  6557. "lang": "js",
  6558. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6559. }
  6560. ]
  6561. },
  6562. "delete": {
  6563. "tags": ["session"],
  6564. "operationId": "session.unshare",
  6565. "parameters": [
  6566. {
  6567. "name": "sessionID",
  6568. "in": "path",
  6569. "schema": {
  6570. "type": "string",
  6571. "pattern": "^ses"
  6572. },
  6573. "required": true
  6574. },
  6575. {
  6576. "name": "directory",
  6577. "in": "query",
  6578. "schema": {
  6579. "type": "string"
  6580. },
  6581. "required": false
  6582. },
  6583. {
  6584. "name": "workspace",
  6585. "in": "query",
  6586. "schema": {
  6587. "type": "string"
  6588. },
  6589. "required": false
  6590. }
  6591. ],
  6592. "responses": {
  6593. "200": {
  6594. "description": "Successfully unshared session",
  6595. "content": {
  6596. "application/json": {
  6597. "schema": {
  6598. "$ref": "#/components/schemas/Session"
  6599. }
  6600. }
  6601. }
  6602. },
  6603. "400": {
  6604. "description": "Bad request",
  6605. "content": {
  6606. "application/json": {
  6607. "schema": {
  6608. "$ref": "#/components/schemas/BadRequestError"
  6609. }
  6610. }
  6611. }
  6612. },
  6613. "404": {
  6614. "description": "NotFoundError",
  6615. "content": {
  6616. "application/json": {
  6617. "schema": {
  6618. "$ref": "#/components/schemas/NotFoundError"
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "500": {
  6624. "description": "InternalServerError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Remove the shareable link for a session, making it private again.",
  6635. "summary": "Unshare session",
  6636. "x-codeSamples": [
  6637. {
  6638. "lang": "js",
  6639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6640. }
  6641. ]
  6642. }
  6643. },
  6644. "/session/{sessionID}/summarize": {
  6645. "post": {
  6646. "tags": ["session"],
  6647. "operationId": "session.summarize",
  6648. "parameters": [
  6649. {
  6650. "name": "sessionID",
  6651. "in": "path",
  6652. "schema": {
  6653. "type": "string",
  6654. "pattern": "^ses"
  6655. },
  6656. "required": true
  6657. },
  6658. {
  6659. "name": "directory",
  6660. "in": "query",
  6661. "schema": {
  6662. "type": "string"
  6663. },
  6664. "required": false
  6665. },
  6666. {
  6667. "name": "workspace",
  6668. "in": "query",
  6669. "schema": {
  6670. "type": "string"
  6671. },
  6672. "required": false
  6673. }
  6674. ],
  6675. "responses": {
  6676. "200": {
  6677. "description": "Summarized session",
  6678. "content": {
  6679. "application/json": {
  6680. "schema": {
  6681. "type": "boolean",
  6682. "description": "Summarized session"
  6683. }
  6684. }
  6685. }
  6686. },
  6687. "400": {
  6688. "description": "BadRequest | InvalidRequestError",
  6689. "content": {
  6690. "application/json": {
  6691. "schema": {
  6692. "anyOf": [
  6693. {
  6694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6695. },
  6696. {
  6697. "$ref": "#/components/schemas/InvalidRequestError"
  6698. }
  6699. ]
  6700. }
  6701. }
  6702. }
  6703. },
  6704. "404": {
  6705. "description": "NotFoundError",
  6706. "content": {
  6707. "application/json": {
  6708. "schema": {
  6709. "$ref": "#/components/schemas/NotFoundError"
  6710. }
  6711. }
  6712. }
  6713. }
  6714. },
  6715. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6716. "summary": "Summarize session",
  6717. "requestBody": {
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "object",
  6722. "properties": {
  6723. "providerID": {
  6724. "type": "string"
  6725. },
  6726. "modelID": {
  6727. "type": "string"
  6728. },
  6729. "auto": {
  6730. "type": "boolean"
  6731. }
  6732. },
  6733. "required": ["providerID", "modelID"],
  6734. "additionalProperties": false
  6735. }
  6736. }
  6737. }
  6738. },
  6739. "x-codeSamples": [
  6740. {
  6741. "lang": "js",
  6742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6743. }
  6744. ]
  6745. }
  6746. },
  6747. "/session/{sessionID}/prompt_async": {
  6748. "post": {
  6749. "tags": ["session"],
  6750. "operationId": "session.prompt_async",
  6751. "parameters": [
  6752. {
  6753. "name": "sessionID",
  6754. "in": "path",
  6755. "schema": {
  6756. "type": "string",
  6757. "pattern": "^ses"
  6758. },
  6759. "required": true
  6760. },
  6761. {
  6762. "name": "directory",
  6763. "in": "query",
  6764. "schema": {
  6765. "type": "string"
  6766. },
  6767. "required": false
  6768. },
  6769. {
  6770. "name": "workspace",
  6771. "in": "query",
  6772. "schema": {
  6773. "type": "string"
  6774. },
  6775. "required": false
  6776. }
  6777. ],
  6778. "responses": {
  6779. "204": {
  6780. "description": "Prompt accepted"
  6781. },
  6782. "400": {
  6783. "description": "BadRequest | InvalidRequestError",
  6784. "content": {
  6785. "application/json": {
  6786. "schema": {
  6787. "anyOf": [
  6788. {
  6789. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6790. },
  6791. {
  6792. "$ref": "#/components/schemas/InvalidRequestError"
  6793. }
  6794. ]
  6795. }
  6796. }
  6797. }
  6798. },
  6799. "404": {
  6800. "description": "NotFoundError",
  6801. "content": {
  6802. "application/json": {
  6803. "schema": {
  6804. "$ref": "#/components/schemas/NotFoundError"
  6805. }
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6811. "summary": "Send async message",
  6812. "requestBody": {
  6813. "content": {
  6814. "application/json": {
  6815. "schema": {
  6816. "type": "object",
  6817. "properties": {
  6818. "messageID": {
  6819. "type": "string",
  6820. "pattern": "^msg"
  6821. },
  6822. "model": {
  6823. "type": "object",
  6824. "properties": {
  6825. "providerID": {
  6826. "type": "string"
  6827. },
  6828. "modelID": {
  6829. "type": "string"
  6830. }
  6831. },
  6832. "required": ["providerID", "modelID"],
  6833. "additionalProperties": false
  6834. },
  6835. "agent": {
  6836. "type": "string"
  6837. },
  6838. "noReply": {
  6839. "type": "boolean"
  6840. },
  6841. "tools": {
  6842. "type": "object",
  6843. "additionalProperties": {
  6844. "type": "boolean"
  6845. }
  6846. },
  6847. "format": {
  6848. "$ref": "#/components/schemas/OutputFormat"
  6849. },
  6850. "system": {
  6851. "type": "string"
  6852. },
  6853. "variant": {
  6854. "type": "string"
  6855. },
  6856. "parts": {
  6857. "type": "array",
  6858. "items": {
  6859. "anyOf": [
  6860. {
  6861. "$ref": "#/components/schemas/TextPartInput"
  6862. },
  6863. {
  6864. "$ref": "#/components/schemas/FilePartInput"
  6865. },
  6866. {
  6867. "$ref": "#/components/schemas/AgentPartInput"
  6868. },
  6869. {
  6870. "$ref": "#/components/schemas/SubtaskPartInput"
  6871. }
  6872. ]
  6873. }
  6874. }
  6875. },
  6876. "required": ["parts"],
  6877. "additionalProperties": false
  6878. }
  6879. }
  6880. }
  6881. },
  6882. "x-codeSamples": [
  6883. {
  6884. "lang": "js",
  6885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6886. }
  6887. ]
  6888. }
  6889. },
  6890. "/session/{sessionID}/command": {
  6891. "post": {
  6892. "tags": ["session"],
  6893. "operationId": "session.command",
  6894. "parameters": [
  6895. {
  6896. "name": "sessionID",
  6897. "in": "path",
  6898. "schema": {
  6899. "type": "string",
  6900. "pattern": "^ses"
  6901. },
  6902. "required": true
  6903. },
  6904. {
  6905. "name": "directory",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. },
  6912. {
  6913. "name": "workspace",
  6914. "in": "query",
  6915. "schema": {
  6916. "type": "string"
  6917. },
  6918. "required": false
  6919. }
  6920. ],
  6921. "responses": {
  6922. "200": {
  6923. "description": "Created message",
  6924. "content": {
  6925. "application/json": {
  6926. "schema": {
  6927. "type": "object",
  6928. "required": ["info", "parts"],
  6929. "properties": {
  6930. "info": {
  6931. "$ref": "#/components/schemas/AssistantMessage"
  6932. },
  6933. "parts": {
  6934. "type": "array",
  6935. "items": {
  6936. "$ref": "#/components/schemas/Part"
  6937. }
  6938. }
  6939. }
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "400": {
  6945. "description": "BadRequest | InvalidRequestError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "anyOf": [
  6950. {
  6951. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6952. },
  6953. {
  6954. "$ref": "#/components/schemas/InvalidRequestError"
  6955. }
  6956. ]
  6957. }
  6958. }
  6959. }
  6960. },
  6961. "404": {
  6962. "description": "NotFoundError",
  6963. "content": {
  6964. "application/json": {
  6965. "schema": {
  6966. "$ref": "#/components/schemas/NotFoundError"
  6967. }
  6968. }
  6969. }
  6970. }
  6971. },
  6972. "description": "Send a new command to a session for execution by the AI assistant.",
  6973. "summary": "Send command",
  6974. "requestBody": {
  6975. "content": {
  6976. "application/json": {
  6977. "schema": {
  6978. "type": "object",
  6979. "properties": {
  6980. "messageID": {
  6981. "type": "string",
  6982. "pattern": "^msg"
  6983. },
  6984. "agent": {
  6985. "type": "string"
  6986. },
  6987. "model": {
  6988. "type": "string"
  6989. },
  6990. "arguments": {
  6991. "type": "string"
  6992. },
  6993. "command": {
  6994. "type": "string"
  6995. },
  6996. "variant": {
  6997. "type": "string"
  6998. },
  6999. "parts": {
  7000. "type": "array",
  7001. "items": {
  7002. "type": "object",
  7003. "properties": {
  7004. "id": {
  7005. "type": "string",
  7006. "pattern": "^prt"
  7007. },
  7008. "type": {
  7009. "type": "string",
  7010. "enum": ["file"]
  7011. },
  7012. "mime": {
  7013. "type": "string"
  7014. },
  7015. "filename": {
  7016. "type": "string"
  7017. },
  7018. "url": {
  7019. "type": "string"
  7020. },
  7021. "source": {
  7022. "$ref": "#/components/schemas/FilePartSource"
  7023. }
  7024. },
  7025. "required": ["type", "mime", "url"],
  7026. "additionalProperties": false
  7027. }
  7028. }
  7029. },
  7030. "required": ["arguments", "command"],
  7031. "additionalProperties": false
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "x-codeSamples": [
  7037. {
  7038. "lang": "js",
  7039. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7040. }
  7041. ]
  7042. }
  7043. },
  7044. "/session/{sessionID}/shell": {
  7045. "post": {
  7046. "tags": ["session"],
  7047. "operationId": "session.shell",
  7048. "parameters": [
  7049. {
  7050. "name": "sessionID",
  7051. "in": "path",
  7052. "schema": {
  7053. "type": "string",
  7054. "pattern": "^ses"
  7055. },
  7056. "required": true
  7057. },
  7058. {
  7059. "name": "directory",
  7060. "in": "query",
  7061. "schema": {
  7062. "type": "string"
  7063. },
  7064. "required": false
  7065. },
  7066. {
  7067. "name": "workspace",
  7068. "in": "query",
  7069. "schema": {
  7070. "type": "string"
  7071. },
  7072. "required": false
  7073. }
  7074. ],
  7075. "responses": {
  7076. "200": {
  7077. "description": "Created message",
  7078. "content": {
  7079. "application/json": {
  7080. "schema": {
  7081. "type": "object",
  7082. "properties": {
  7083. "info": {
  7084. "$ref": "#/components/schemas/Message"
  7085. },
  7086. "parts": {
  7087. "type": "array",
  7088. "items": {
  7089. "$ref": "#/components/schemas/Part"
  7090. }
  7091. }
  7092. },
  7093. "required": ["info", "parts"],
  7094. "additionalProperties": false,
  7095. "description": "Created message"
  7096. }
  7097. }
  7098. }
  7099. },
  7100. "400": {
  7101. "description": "BadRequest | InvalidRequestError",
  7102. "content": {
  7103. "application/json": {
  7104. "schema": {
  7105. "anyOf": [
  7106. {
  7107. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7108. },
  7109. {
  7110. "$ref": "#/components/schemas/InvalidRequestError"
  7111. }
  7112. ]
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "404": {
  7118. "description": "NotFoundError",
  7119. "content": {
  7120. "application/json": {
  7121. "schema": {
  7122. "$ref": "#/components/schemas/NotFoundError"
  7123. }
  7124. }
  7125. }
  7126. }
  7127. },
  7128. "description": "Execute a shell command within the session context and return the AI's response.",
  7129. "summary": "Run shell command",
  7130. "requestBody": {
  7131. "content": {
  7132. "application/json": {
  7133. "schema": {
  7134. "type": "object",
  7135. "properties": {
  7136. "messageID": {
  7137. "type": "string",
  7138. "pattern": "^msg"
  7139. },
  7140. "agent": {
  7141. "type": "string"
  7142. },
  7143. "model": {
  7144. "type": "object",
  7145. "properties": {
  7146. "providerID": {
  7147. "type": "string"
  7148. },
  7149. "modelID": {
  7150. "type": "string"
  7151. }
  7152. },
  7153. "required": ["providerID", "modelID"],
  7154. "additionalProperties": false
  7155. },
  7156. "command": {
  7157. "type": "string"
  7158. }
  7159. },
  7160. "required": ["agent", "command"],
  7161. "additionalProperties": false
  7162. }
  7163. }
  7164. }
  7165. },
  7166. "x-codeSamples": [
  7167. {
  7168. "lang": "js",
  7169. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7170. }
  7171. ]
  7172. }
  7173. },
  7174. "/session/{sessionID}/revert": {
  7175. "post": {
  7176. "tags": ["session"],
  7177. "operationId": "session.revert",
  7178. "parameters": [
  7179. {
  7180. "name": "sessionID",
  7181. "in": "path",
  7182. "schema": {
  7183. "type": "string",
  7184. "pattern": "^ses"
  7185. },
  7186. "required": true
  7187. },
  7188. {
  7189. "name": "directory",
  7190. "in": "query",
  7191. "schema": {
  7192. "type": "string"
  7193. },
  7194. "required": false
  7195. },
  7196. {
  7197. "name": "workspace",
  7198. "in": "query",
  7199. "schema": {
  7200. "type": "string"
  7201. },
  7202. "required": false
  7203. }
  7204. ],
  7205. "responses": {
  7206. "200": {
  7207. "description": "Updated session",
  7208. "content": {
  7209. "application/json": {
  7210. "schema": {
  7211. "$ref": "#/components/schemas/Session"
  7212. }
  7213. }
  7214. }
  7215. },
  7216. "400": {
  7217. "description": "BadRequest | InvalidRequestError",
  7218. "content": {
  7219. "application/json": {
  7220. "schema": {
  7221. "anyOf": [
  7222. {
  7223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7224. },
  7225. {
  7226. "$ref": "#/components/schemas/InvalidRequestError"
  7227. }
  7228. ]
  7229. }
  7230. }
  7231. }
  7232. },
  7233. "404": {
  7234. "description": "NotFoundError",
  7235. "content": {
  7236. "application/json": {
  7237. "schema": {
  7238. "$ref": "#/components/schemas/NotFoundError"
  7239. }
  7240. }
  7241. }
  7242. }
  7243. },
  7244. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7245. "summary": "Revert message",
  7246. "requestBody": {
  7247. "content": {
  7248. "application/json": {
  7249. "schema": {
  7250. "type": "object",
  7251. "properties": {
  7252. "messageID": {
  7253. "type": "string",
  7254. "pattern": "^msg"
  7255. },
  7256. "partID": {
  7257. "type": "string",
  7258. "pattern": "^prt"
  7259. }
  7260. },
  7261. "required": ["messageID"],
  7262. "additionalProperties": false
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "x-codeSamples": [
  7268. {
  7269. "lang": "js",
  7270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7271. }
  7272. ]
  7273. }
  7274. },
  7275. "/session/{sessionID}/unrevert": {
  7276. "post": {
  7277. "tags": ["session"],
  7278. "operationId": "session.unrevert",
  7279. "parameters": [
  7280. {
  7281. "name": "sessionID",
  7282. "in": "path",
  7283. "schema": {
  7284. "type": "string",
  7285. "pattern": "^ses"
  7286. },
  7287. "required": true
  7288. },
  7289. {
  7290. "name": "directory",
  7291. "in": "query",
  7292. "schema": {
  7293. "type": "string"
  7294. },
  7295. "required": false
  7296. },
  7297. {
  7298. "name": "workspace",
  7299. "in": "query",
  7300. "schema": {
  7301. "type": "string"
  7302. },
  7303. "required": false
  7304. }
  7305. ],
  7306. "responses": {
  7307. "200": {
  7308. "description": "Updated session",
  7309. "content": {
  7310. "application/json": {
  7311. "schema": {
  7312. "$ref": "#/components/schemas/Session"
  7313. }
  7314. }
  7315. }
  7316. },
  7317. "400": {
  7318. "description": "BadRequest | InvalidRequestError",
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "anyOf": [
  7323. {
  7324. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7325. },
  7326. {
  7327. "$ref": "#/components/schemas/InvalidRequestError"
  7328. }
  7329. ]
  7330. }
  7331. }
  7332. }
  7333. },
  7334. "404": {
  7335. "description": "NotFoundError",
  7336. "content": {
  7337. "application/json": {
  7338. "schema": {
  7339. "$ref": "#/components/schemas/NotFoundError"
  7340. }
  7341. }
  7342. }
  7343. }
  7344. },
  7345. "description": "Restore all previously reverted messages in a session.",
  7346. "summary": "Restore reverted messages",
  7347. "x-codeSamples": [
  7348. {
  7349. "lang": "js",
  7350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7351. }
  7352. ]
  7353. }
  7354. },
  7355. "/session/{sessionID}/permissions/{permissionID}": {
  7356. "post": {
  7357. "tags": ["session"],
  7358. "operationId": "permission.respond",
  7359. "parameters": [
  7360. {
  7361. "name": "sessionID",
  7362. "in": "path",
  7363. "schema": {
  7364. "type": "string",
  7365. "pattern": "^ses"
  7366. },
  7367. "required": true
  7368. },
  7369. {
  7370. "name": "permissionID",
  7371. "in": "path",
  7372. "schema": {
  7373. "type": "string",
  7374. "pattern": "^per"
  7375. },
  7376. "required": true
  7377. },
  7378. {
  7379. "name": "directory",
  7380. "in": "query",
  7381. "schema": {
  7382. "type": "string"
  7383. },
  7384. "required": false
  7385. },
  7386. {
  7387. "name": "workspace",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. }
  7394. ],
  7395. "responses": {
  7396. "200": {
  7397. "description": "Permission processed successfully",
  7398. "content": {
  7399. "application/json": {
  7400. "schema": {
  7401. "type": "boolean",
  7402. "description": "Permission processed successfully"
  7403. }
  7404. }
  7405. }
  7406. },
  7407. "400": {
  7408. "description": "BadRequest | InvalidRequestError",
  7409. "content": {
  7410. "application/json": {
  7411. "schema": {
  7412. "anyOf": [
  7413. {
  7414. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7415. },
  7416. {
  7417. "$ref": "#/components/schemas/InvalidRequestError"
  7418. }
  7419. ]
  7420. }
  7421. }
  7422. }
  7423. },
  7424. "404": {
  7425. "description": "NotFoundError",
  7426. "content": {
  7427. "application/json": {
  7428. "schema": {
  7429. "$ref": "#/components/schemas/NotFoundError"
  7430. }
  7431. }
  7432. }
  7433. }
  7434. },
  7435. "description": "Approve or deny a permission request from the AI assistant.",
  7436. "summary": "Respond to permission",
  7437. "deprecated": true,
  7438. "requestBody": {
  7439. "content": {
  7440. "application/json": {
  7441. "schema": {
  7442. "type": "object",
  7443. "properties": {
  7444. "response": {
  7445. "type": "string",
  7446. "enum": ["once", "always", "reject"]
  7447. }
  7448. },
  7449. "required": ["response"],
  7450. "additionalProperties": false
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "x-codeSamples": [
  7456. {
  7457. "lang": "js",
  7458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7459. }
  7460. ]
  7461. }
  7462. },
  7463. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7464. "delete": {
  7465. "tags": ["session"],
  7466. "operationId": "part.delete",
  7467. "parameters": [
  7468. {
  7469. "name": "sessionID",
  7470. "in": "path",
  7471. "schema": {
  7472. "type": "string",
  7473. "pattern": "^ses"
  7474. },
  7475. "required": true
  7476. },
  7477. {
  7478. "name": "messageID",
  7479. "in": "path",
  7480. "schema": {
  7481. "type": "string",
  7482. "pattern": "^msg"
  7483. },
  7484. "required": true
  7485. },
  7486. {
  7487. "name": "partID",
  7488. "in": "path",
  7489. "schema": {
  7490. "type": "string",
  7491. "pattern": "^prt"
  7492. },
  7493. "required": true
  7494. },
  7495. {
  7496. "name": "directory",
  7497. "in": "query",
  7498. "schema": {
  7499. "type": "string"
  7500. },
  7501. "required": false
  7502. },
  7503. {
  7504. "name": "workspace",
  7505. "in": "query",
  7506. "schema": {
  7507. "type": "string"
  7508. },
  7509. "required": false
  7510. }
  7511. ],
  7512. "responses": {
  7513. "200": {
  7514. "description": "Successfully deleted part",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "type": "boolean",
  7519. "description": "Successfully deleted part"
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "400": {
  7525. "description": "BadRequest | InvalidRequestError",
  7526. "content": {
  7527. "application/json": {
  7528. "schema": {
  7529. "anyOf": [
  7530. {
  7531. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7532. },
  7533. {
  7534. "$ref": "#/components/schemas/InvalidRequestError"
  7535. }
  7536. ]
  7537. }
  7538. }
  7539. }
  7540. },
  7541. "404": {
  7542. "description": "NotFoundError",
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "$ref": "#/components/schemas/NotFoundError"
  7547. }
  7548. }
  7549. }
  7550. }
  7551. },
  7552. "description": "Delete a part from a message.",
  7553. "x-codeSamples": [
  7554. {
  7555. "lang": "js",
  7556. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7557. }
  7558. ]
  7559. },
  7560. "patch": {
  7561. "tags": ["session"],
  7562. "operationId": "part.update",
  7563. "parameters": [
  7564. {
  7565. "name": "sessionID",
  7566. "in": "path",
  7567. "schema": {
  7568. "type": "string",
  7569. "pattern": "^ses"
  7570. },
  7571. "required": true
  7572. },
  7573. {
  7574. "name": "messageID",
  7575. "in": "path",
  7576. "schema": {
  7577. "type": "string",
  7578. "pattern": "^msg"
  7579. },
  7580. "required": true
  7581. },
  7582. {
  7583. "name": "partID",
  7584. "in": "path",
  7585. "schema": {
  7586. "type": "string",
  7587. "pattern": "^prt"
  7588. },
  7589. "required": true
  7590. },
  7591. {
  7592. "name": "directory",
  7593. "in": "query",
  7594. "schema": {
  7595. "type": "string"
  7596. },
  7597. "required": false
  7598. },
  7599. {
  7600. "name": "workspace",
  7601. "in": "query",
  7602. "schema": {
  7603. "type": "string"
  7604. },
  7605. "required": false
  7606. }
  7607. ],
  7608. "responses": {
  7609. "200": {
  7610. "description": "Successfully updated part",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "$ref": "#/components/schemas/Part"
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "400": {
  7620. "description": "BadRequest | InvalidRequestError",
  7621. "content": {
  7622. "application/json": {
  7623. "schema": {
  7624. "anyOf": [
  7625. {
  7626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7627. },
  7628. {
  7629. "$ref": "#/components/schemas/InvalidRequestError"
  7630. }
  7631. ]
  7632. }
  7633. }
  7634. }
  7635. },
  7636. "404": {
  7637. "description": "NotFoundError",
  7638. "content": {
  7639. "application/json": {
  7640. "schema": {
  7641. "$ref": "#/components/schemas/NotFoundError"
  7642. }
  7643. }
  7644. }
  7645. }
  7646. },
  7647. "description": "Update a part in a message.",
  7648. "requestBody": {
  7649. "content": {
  7650. "application/json": {
  7651. "schema": {
  7652. "$ref": "#/components/schemas/Part"
  7653. }
  7654. }
  7655. }
  7656. },
  7657. "x-codeSamples": [
  7658. {
  7659. "lang": "js",
  7660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7661. }
  7662. ]
  7663. }
  7664. },
  7665. "/sync/start": {
  7666. "post": {
  7667. "tags": ["sync"],
  7668. "operationId": "sync.start",
  7669. "parameters": [
  7670. {
  7671. "name": "directory",
  7672. "in": "query",
  7673. "schema": {
  7674. "type": "string"
  7675. },
  7676. "required": false
  7677. },
  7678. {
  7679. "name": "workspace",
  7680. "in": "query",
  7681. "schema": {
  7682. "type": "string"
  7683. },
  7684. "required": false
  7685. }
  7686. ],
  7687. "responses": {
  7688. "200": {
  7689. "description": "Workspace sync started",
  7690. "content": {
  7691. "application/json": {
  7692. "schema": {
  7693. "type": "boolean",
  7694. "description": "Workspace sync started"
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "400": {
  7700. "description": "Bad request",
  7701. "content": {
  7702. "application/json": {
  7703. "schema": {
  7704. "$ref": "#/components/schemas/BadRequestError"
  7705. }
  7706. }
  7707. }
  7708. }
  7709. },
  7710. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7711. "summary": "Start workspace sync",
  7712. "x-codeSamples": [
  7713. {
  7714. "lang": "js",
  7715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7716. }
  7717. ]
  7718. }
  7719. },
  7720. "/sync/replay": {
  7721. "post": {
  7722. "tags": ["sync"],
  7723. "operationId": "sync.replay",
  7724. "parameters": [
  7725. {
  7726. "name": "directory",
  7727. "in": "query",
  7728. "schema": {
  7729. "type": "string"
  7730. },
  7731. "required": false
  7732. },
  7733. {
  7734. "name": "workspace",
  7735. "in": "query",
  7736. "schema": {
  7737. "type": "string"
  7738. },
  7739. "required": false
  7740. }
  7741. ],
  7742. "responses": {
  7743. "200": {
  7744. "description": "Replayed sync events",
  7745. "content": {
  7746. "application/json": {
  7747. "schema": {
  7748. "type": "object",
  7749. "properties": {
  7750. "sessionID": {
  7751. "type": "string"
  7752. }
  7753. },
  7754. "required": ["sessionID"],
  7755. "additionalProperties": false,
  7756. "description": "Replayed sync events"
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "400": {
  7762. "description": "BadRequest | InvalidRequestError",
  7763. "content": {
  7764. "application/json": {
  7765. "schema": {
  7766. "anyOf": [
  7767. {
  7768. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7769. },
  7770. {
  7771. "$ref": "#/components/schemas/InvalidRequestError"
  7772. }
  7773. ]
  7774. }
  7775. }
  7776. }
  7777. }
  7778. },
  7779. "description": "Validate and replay a complete sync event history.",
  7780. "summary": "Replay sync events",
  7781. "requestBody": {
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "object",
  7786. "properties": {
  7787. "directory": {
  7788. "type": "string"
  7789. },
  7790. "events": {
  7791. "type": "array",
  7792. "minItems": 1,
  7793. "items": {
  7794. "type": "object",
  7795. "properties": {
  7796. "id": {
  7797. "type": "string"
  7798. },
  7799. "aggregateID": {
  7800. "type": "string"
  7801. },
  7802. "seq": {
  7803. "type": "integer",
  7804. "minimum": 0
  7805. },
  7806. "type": {
  7807. "type": "string"
  7808. },
  7809. "data": {
  7810. "type": "object"
  7811. }
  7812. },
  7813. "required": ["id", "aggregateID", "seq", "type", "data"],
  7814. "additionalProperties": false
  7815. }
  7816. }
  7817. },
  7818. "required": ["directory", "events"],
  7819. "additionalProperties": false
  7820. }
  7821. }
  7822. }
  7823. },
  7824. "x-codeSamples": [
  7825. {
  7826. "lang": "js",
  7827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7828. }
  7829. ]
  7830. }
  7831. },
  7832. "/sync/steal": {
  7833. "post": {
  7834. "tags": ["sync"],
  7835. "operationId": "sync.steal",
  7836. "parameters": [
  7837. {
  7838. "name": "directory",
  7839. "in": "query",
  7840. "schema": {
  7841. "type": "string"
  7842. },
  7843. "required": false
  7844. },
  7845. {
  7846. "name": "workspace",
  7847. "in": "query",
  7848. "schema": {
  7849. "type": "string"
  7850. },
  7851. "required": false
  7852. }
  7853. ],
  7854. "responses": {
  7855. "200": {
  7856. "description": "Session stolen into workspace",
  7857. "content": {
  7858. "application/json": {
  7859. "schema": {
  7860. "type": "object",
  7861. "properties": {
  7862. "sessionID": {
  7863. "type": "string",
  7864. "pattern": "^ses"
  7865. }
  7866. },
  7867. "required": ["sessionID"],
  7868. "additionalProperties": false,
  7869. "description": "Session stolen into workspace"
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "400": {
  7875. "description": "BadRequest | InvalidRequestError",
  7876. "content": {
  7877. "application/json": {
  7878. "schema": {
  7879. "anyOf": [
  7880. {
  7881. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7882. },
  7883. {
  7884. "$ref": "#/components/schemas/InvalidRequestError"
  7885. }
  7886. ]
  7887. }
  7888. }
  7889. }
  7890. }
  7891. },
  7892. "description": "Update a session to belong to the current workspace through the sync event system.",
  7893. "summary": "Steal session into workspace",
  7894. "requestBody": {
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "type": "object",
  7899. "properties": {
  7900. "sessionID": {
  7901. "type": "string",
  7902. "pattern": "^ses"
  7903. }
  7904. },
  7905. "required": ["sessionID"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. }
  7910. },
  7911. "x-codeSamples": [
  7912. {
  7913. "lang": "js",
  7914. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7915. }
  7916. ]
  7917. }
  7918. },
  7919. "/sync/history": {
  7920. "post": {
  7921. "tags": ["sync"],
  7922. "operationId": "sync.history.list",
  7923. "parameters": [
  7924. {
  7925. "name": "directory",
  7926. "in": "query",
  7927. "schema": {
  7928. "type": "string"
  7929. },
  7930. "required": false
  7931. },
  7932. {
  7933. "name": "workspace",
  7934. "in": "query",
  7935. "schema": {
  7936. "type": "string"
  7937. },
  7938. "required": false
  7939. }
  7940. ],
  7941. "responses": {
  7942. "200": {
  7943. "description": "Sync events",
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "array",
  7948. "items": {
  7949. "type": "object",
  7950. "properties": {
  7951. "id": {
  7952. "type": "string"
  7953. },
  7954. "aggregate_id": {
  7955. "type": "string"
  7956. },
  7957. "seq": {
  7958. "type": "integer",
  7959. "minimum": 0
  7960. },
  7961. "type": {
  7962. "type": "string"
  7963. },
  7964. "data": {
  7965. "type": "object"
  7966. }
  7967. },
  7968. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7969. "additionalProperties": false
  7970. },
  7971. "description": "Sync events"
  7972. }
  7973. }
  7974. }
  7975. },
  7976. "400": {
  7977. "description": "BadRequest | InvalidRequestError",
  7978. "content": {
  7979. "application/json": {
  7980. "schema": {
  7981. "anyOf": [
  7982. {
  7983. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7984. },
  7985. {
  7986. "$ref": "#/components/schemas/InvalidRequestError"
  7987. }
  7988. ]
  7989. }
  7990. }
  7991. }
  7992. }
  7993. },
  7994. "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.",
  7995. "summary": "List sync events",
  7996. "requestBody": {
  7997. "content": {
  7998. "application/json": {
  7999. "schema": {
  8000. "type": "object",
  8001. "additionalProperties": {
  8002. "type": "integer",
  8003. "minimum": 0
  8004. }
  8005. }
  8006. }
  8007. }
  8008. },
  8009. "x-codeSamples": [
  8010. {
  8011. "lang": "js",
  8012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8013. }
  8014. ]
  8015. }
  8016. },
  8017. "/api/session": {
  8018. "get": {
  8019. "tags": ["v2"],
  8020. "operationId": "v2.session.list",
  8021. "parameters": [
  8022. {
  8023. "name": "directory",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. },
  8030. {
  8031. "name": "workspace",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "limit",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "number"
  8043. },
  8044. "required": false
  8045. },
  8046. {
  8047. "name": "order",
  8048. "in": "query",
  8049. "schema": {
  8050. "type": "string",
  8051. "enum": ["asc", "desc"]
  8052. },
  8053. "required": false
  8054. },
  8055. {
  8056. "name": "path",
  8057. "in": "query",
  8058. "schema": {
  8059. "type": "string"
  8060. },
  8061. "required": false
  8062. },
  8063. {
  8064. "name": "roots",
  8065. "in": "query",
  8066. "schema": {
  8067. "anyOf": [
  8068. {
  8069. "type": "boolean"
  8070. },
  8071. {
  8072. "type": "string",
  8073. "enum": ["true", "false"]
  8074. }
  8075. ]
  8076. },
  8077. "required": false
  8078. },
  8079. {
  8080. "name": "start",
  8081. "in": "query",
  8082. "schema": {
  8083. "type": "number"
  8084. },
  8085. "required": false
  8086. },
  8087. {
  8088. "name": "search",
  8089. "in": "query",
  8090. "schema": {
  8091. "type": "string"
  8092. },
  8093. "required": false
  8094. },
  8095. {
  8096. "name": "cursor",
  8097. "in": "query",
  8098. "schema": {
  8099. "type": "string",
  8100. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8101. },
  8102. "required": false
  8103. }
  8104. ],
  8105. "security": [],
  8106. "responses": {
  8107. "200": {
  8108. "description": "V2SessionsResponse",
  8109. "content": {
  8110. "application/json": {
  8111. "schema": {
  8112. "$ref": "#/components/schemas/V2SessionsResponse"
  8113. }
  8114. }
  8115. }
  8116. },
  8117. "400": {
  8118. "description": "InvalidCursorError | InvalidRequestError",
  8119. "content": {
  8120. "application/json": {
  8121. "schema": {
  8122. "anyOf": [
  8123. {
  8124. "$ref": "#/components/schemas/InvalidCursorError"
  8125. },
  8126. {
  8127. "$ref": "#/components/schemas/InvalidRequestError"
  8128. },
  8129. {
  8130. "$ref": "#/components/schemas/InvalidRequestError"
  8131. }
  8132. ]
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "401": {
  8138. "description": "UnauthorizedError",
  8139. "content": {
  8140. "application/json": {
  8141. "schema": {
  8142. "$ref": "#/components/schemas/UnauthorizedError"
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "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.",
  8149. "summary": "List v2 sessions",
  8150. "x-codeSamples": [
  8151. {
  8152. "lang": "js",
  8153. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8154. }
  8155. ]
  8156. }
  8157. },
  8158. "/api/session/{sessionID}/prompt": {
  8159. "post": {
  8160. "tags": ["v2"],
  8161. "operationId": "v2.session.prompt",
  8162. "parameters": [
  8163. {
  8164. "name": "sessionID",
  8165. "in": "path",
  8166. "schema": {
  8167. "type": "string",
  8168. "pattern": "^ses"
  8169. },
  8170. "required": true
  8171. },
  8172. {
  8173. "name": "directory",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. },
  8180. {
  8181. "name": "workspace",
  8182. "in": "query",
  8183. "schema": {
  8184. "type": "string"
  8185. },
  8186. "required": false
  8187. }
  8188. ],
  8189. "security": [],
  8190. "responses": {
  8191. "200": {
  8192. "description": "Session.Message",
  8193. "content": {
  8194. "application/json": {
  8195. "schema": {
  8196. "$ref": "#/components/schemas/SessionMessage"
  8197. }
  8198. }
  8199. }
  8200. },
  8201. "400": {
  8202. "description": "InvalidRequestError",
  8203. "content": {
  8204. "application/json": {
  8205. "schema": {
  8206. "$ref": "#/components/schemas/InvalidRequestError"
  8207. }
  8208. }
  8209. }
  8210. },
  8211. "401": {
  8212. "description": "UnauthorizedError",
  8213. "content": {
  8214. "application/json": {
  8215. "schema": {
  8216. "$ref": "#/components/schemas/UnauthorizedError"
  8217. }
  8218. }
  8219. }
  8220. },
  8221. "404": {
  8222. "description": "SessionNotFoundError",
  8223. "content": {
  8224. "application/json": {
  8225. "schema": {
  8226. "$ref": "#/components/schemas/SessionNotFoundError"
  8227. }
  8228. }
  8229. }
  8230. },
  8231. "503": {
  8232. "description": "ServiceUnavailableError",
  8233. "content": {
  8234. "application/json": {
  8235. "schema": {
  8236. "$ref": "#/components/schemas/ServiceUnavailableError"
  8237. }
  8238. }
  8239. }
  8240. }
  8241. },
  8242. "description": "Create a v2 session message and queue it for the agent loop.",
  8243. "summary": "Send v2 message",
  8244. "requestBody": {
  8245. "content": {
  8246. "application/json": {
  8247. "schema": {
  8248. "type": "object",
  8249. "properties": {
  8250. "prompt": {
  8251. "$ref": "#/components/schemas/Prompt"
  8252. },
  8253. "delivery": {
  8254. "$ref": "#/components/schemas/SessionDelivery"
  8255. }
  8256. },
  8257. "required": ["prompt"],
  8258. "additionalProperties": false
  8259. }
  8260. }
  8261. }
  8262. },
  8263. "x-codeSamples": [
  8264. {
  8265. "lang": "js",
  8266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8267. }
  8268. ]
  8269. }
  8270. },
  8271. "/api/session/{sessionID}/compact": {
  8272. "post": {
  8273. "tags": ["v2"],
  8274. "operationId": "v2.session.compact",
  8275. "parameters": [
  8276. {
  8277. "name": "sessionID",
  8278. "in": "path",
  8279. "schema": {
  8280. "type": "string",
  8281. "pattern": "^ses"
  8282. },
  8283. "required": true
  8284. },
  8285. {
  8286. "name": "directory",
  8287. "in": "query",
  8288. "schema": {
  8289. "type": "string"
  8290. },
  8291. "required": false
  8292. },
  8293. {
  8294. "name": "workspace",
  8295. "in": "query",
  8296. "schema": {
  8297. "type": "string"
  8298. },
  8299. "required": false
  8300. }
  8301. ],
  8302. "security": [],
  8303. "responses": {
  8304. "204": {
  8305. "description": "<No Content>"
  8306. },
  8307. "400": {
  8308. "description": "InvalidRequestError",
  8309. "content": {
  8310. "application/json": {
  8311. "schema": {
  8312. "$ref": "#/components/schemas/InvalidRequestError"
  8313. }
  8314. }
  8315. }
  8316. },
  8317. "401": {
  8318. "description": "UnauthorizedError",
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "$ref": "#/components/schemas/UnauthorizedError"
  8323. }
  8324. }
  8325. }
  8326. },
  8327. "404": {
  8328. "description": "SessionNotFoundError",
  8329. "content": {
  8330. "application/json": {
  8331. "schema": {
  8332. "$ref": "#/components/schemas/SessionNotFoundError"
  8333. }
  8334. }
  8335. }
  8336. },
  8337. "503": {
  8338. "description": "ServiceUnavailableError",
  8339. "content": {
  8340. "application/json": {
  8341. "schema": {
  8342. "$ref": "#/components/schemas/ServiceUnavailableError"
  8343. }
  8344. }
  8345. }
  8346. }
  8347. },
  8348. "description": "Compact a v2 session conversation.",
  8349. "summary": "Compact v2 session",
  8350. "x-codeSamples": [
  8351. {
  8352. "lang": "js",
  8353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8354. }
  8355. ]
  8356. }
  8357. },
  8358. "/api/session/{sessionID}/wait": {
  8359. "post": {
  8360. "tags": ["v2"],
  8361. "operationId": "v2.session.wait",
  8362. "parameters": [
  8363. {
  8364. "name": "sessionID",
  8365. "in": "path",
  8366. "schema": {
  8367. "type": "string",
  8368. "pattern": "^ses"
  8369. },
  8370. "required": true
  8371. },
  8372. {
  8373. "name": "directory",
  8374. "in": "query",
  8375. "schema": {
  8376. "type": "string"
  8377. },
  8378. "required": false
  8379. },
  8380. {
  8381. "name": "workspace",
  8382. "in": "query",
  8383. "schema": {
  8384. "type": "string"
  8385. },
  8386. "required": false
  8387. }
  8388. ],
  8389. "security": [],
  8390. "responses": {
  8391. "204": {
  8392. "description": "<No Content>"
  8393. },
  8394. "400": {
  8395. "description": "InvalidRequestError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/InvalidRequestError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "401": {
  8405. "description": "UnauthorizedError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/UnauthorizedError"
  8410. }
  8411. }
  8412. }
  8413. },
  8414. "404": {
  8415. "description": "SessionNotFoundError",
  8416. "content": {
  8417. "application/json": {
  8418. "schema": {
  8419. "$ref": "#/components/schemas/SessionNotFoundError"
  8420. }
  8421. }
  8422. }
  8423. },
  8424. "503": {
  8425. "description": "ServiceUnavailableError",
  8426. "content": {
  8427. "application/json": {
  8428. "schema": {
  8429. "$ref": "#/components/schemas/ServiceUnavailableError"
  8430. }
  8431. }
  8432. }
  8433. }
  8434. },
  8435. "description": "Wait for a v2 session agent loop to become idle.",
  8436. "summary": "Wait for v2 session",
  8437. "x-codeSamples": [
  8438. {
  8439. "lang": "js",
  8440. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8441. }
  8442. ]
  8443. }
  8444. },
  8445. "/api/session/{sessionID}/context": {
  8446. "get": {
  8447. "tags": ["v2"],
  8448. "operationId": "v2.session.context",
  8449. "parameters": [
  8450. {
  8451. "name": "sessionID",
  8452. "in": "path",
  8453. "schema": {
  8454. "type": "string",
  8455. "pattern": "^ses"
  8456. },
  8457. "required": true
  8458. },
  8459. {
  8460. "name": "directory",
  8461. "in": "query",
  8462. "schema": {
  8463. "type": "string"
  8464. },
  8465. "required": false
  8466. },
  8467. {
  8468. "name": "workspace",
  8469. "in": "query",
  8470. "schema": {
  8471. "type": "string"
  8472. },
  8473. "required": false
  8474. }
  8475. ],
  8476. "security": [],
  8477. "responses": {
  8478. "200": {
  8479. "description": "Success",
  8480. "content": {
  8481. "application/json": {
  8482. "schema": {
  8483. "type": "array",
  8484. "items": {
  8485. "$ref": "#/components/schemas/SessionMessage"
  8486. }
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "400": {
  8492. "description": "InvalidRequestError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/InvalidRequestError"
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "401": {
  8502. "description": "UnauthorizedError",
  8503. "content": {
  8504. "application/json": {
  8505. "schema": {
  8506. "$ref": "#/components/schemas/UnauthorizedError"
  8507. }
  8508. }
  8509. }
  8510. },
  8511. "404": {
  8512. "description": "SessionNotFoundError",
  8513. "content": {
  8514. "application/json": {
  8515. "schema": {
  8516. "$ref": "#/components/schemas/SessionNotFoundError"
  8517. }
  8518. }
  8519. }
  8520. }
  8521. },
  8522. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8523. "summary": "Get v2 session context",
  8524. "x-codeSamples": [
  8525. {
  8526. "lang": "js",
  8527. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8528. }
  8529. ]
  8530. }
  8531. },
  8532. "/api/session/{sessionID}/message": {
  8533. "get": {
  8534. "tags": ["v2 messages"],
  8535. "operationId": "v2.session.messages",
  8536. "parameters": [
  8537. {
  8538. "name": "sessionID",
  8539. "in": "path",
  8540. "schema": {
  8541. "type": "string",
  8542. "pattern": "^ses"
  8543. },
  8544. "required": true
  8545. },
  8546. {
  8547. "name": "directory",
  8548. "in": "query",
  8549. "schema": {
  8550. "type": "string"
  8551. },
  8552. "required": false
  8553. },
  8554. {
  8555. "name": "workspace",
  8556. "in": "query",
  8557. "schema": {
  8558. "type": "string"
  8559. },
  8560. "required": false
  8561. },
  8562. {
  8563. "name": "limit",
  8564. "in": "query",
  8565. "schema": {
  8566. "type": "number"
  8567. },
  8568. "required": false
  8569. },
  8570. {
  8571. "name": "order",
  8572. "in": "query",
  8573. "schema": {
  8574. "type": "string",
  8575. "enum": ["asc", "desc"]
  8576. },
  8577. "required": false
  8578. },
  8579. {
  8580. "name": "cursor",
  8581. "in": "query",
  8582. "schema": {
  8583. "type": "string",
  8584. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8585. },
  8586. "required": false
  8587. }
  8588. ],
  8589. "security": [],
  8590. "responses": {
  8591. "200": {
  8592. "description": "V2SessionMessagesResponse",
  8593. "content": {
  8594. "application/json": {
  8595. "schema": {
  8596. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8597. }
  8598. }
  8599. }
  8600. },
  8601. "400": {
  8602. "description": "InvalidCursorError | InvalidRequestError",
  8603. "content": {
  8604. "application/json": {
  8605. "schema": {
  8606. "anyOf": [
  8607. {
  8608. "$ref": "#/components/schemas/InvalidCursorError"
  8609. },
  8610. {
  8611. "$ref": "#/components/schemas/InvalidRequestError"
  8612. }
  8613. ]
  8614. }
  8615. }
  8616. }
  8617. },
  8618. "401": {
  8619. "description": "UnauthorizedError",
  8620. "content": {
  8621. "application/json": {
  8622. "schema": {
  8623. "$ref": "#/components/schemas/UnauthorizedError"
  8624. }
  8625. }
  8626. }
  8627. },
  8628. "404": {
  8629. "description": "SessionNotFoundError",
  8630. "content": {
  8631. "application/json": {
  8632. "schema": {
  8633. "$ref": "#/components/schemas/SessionNotFoundError"
  8634. }
  8635. }
  8636. }
  8637. }
  8638. },
  8639. "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.",
  8640. "summary": "Get v2 session messages",
  8641. "x-codeSamples": [
  8642. {
  8643. "lang": "js",
  8644. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8645. }
  8646. ]
  8647. }
  8648. },
  8649. "/api/model": {
  8650. "get": {
  8651. "tags": ["v2 models"],
  8652. "operationId": "v2.model.list",
  8653. "parameters": [
  8654. {
  8655. "name": "location",
  8656. "in": "query",
  8657. "schema": {
  8658. "type": "object",
  8659. "properties": {
  8660. "directory": {
  8661. "type": "string"
  8662. },
  8663. "workspace": {
  8664. "type": "string"
  8665. }
  8666. },
  8667. "additionalProperties": false
  8668. },
  8669. "required": false,
  8670. "style": "deepObject",
  8671. "explode": true
  8672. }
  8673. ],
  8674. "security": [],
  8675. "responses": {
  8676. "200": {
  8677. "description": "Success",
  8678. "content": {
  8679. "application/json": {
  8680. "schema": {
  8681. "type": "array",
  8682. "items": {
  8683. "$ref": "#/components/schemas/ModelV2Info"
  8684. }
  8685. }
  8686. }
  8687. }
  8688. },
  8689. "400": {
  8690. "description": "InvalidRequestError",
  8691. "content": {
  8692. "application/json": {
  8693. "schema": {
  8694. "$ref": "#/components/schemas/InvalidRequestError"
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "401": {
  8700. "description": "UnauthorizedError",
  8701. "content": {
  8702. "application/json": {
  8703. "schema": {
  8704. "$ref": "#/components/schemas/UnauthorizedError"
  8705. }
  8706. }
  8707. }
  8708. },
  8709. "503": {
  8710. "description": "ServiceUnavailableError",
  8711. "content": {
  8712. "application/json": {
  8713. "schema": {
  8714. "$ref": "#/components/schemas/ServiceUnavailableError"
  8715. }
  8716. }
  8717. }
  8718. }
  8719. },
  8720. "description": "Retrieve available v2 models ordered by release date.",
  8721. "summary": "List v2 models",
  8722. "x-codeSamples": [
  8723. {
  8724. "lang": "js",
  8725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8726. }
  8727. ]
  8728. }
  8729. },
  8730. "/api/provider": {
  8731. "get": {
  8732. "tags": ["v2 providers"],
  8733. "operationId": "v2.provider.list",
  8734. "parameters": [
  8735. {
  8736. "name": "location",
  8737. "in": "query",
  8738. "schema": {
  8739. "type": "object",
  8740. "properties": {
  8741. "directory": {
  8742. "type": "string"
  8743. },
  8744. "workspace": {
  8745. "type": "string"
  8746. }
  8747. },
  8748. "additionalProperties": false
  8749. },
  8750. "required": false,
  8751. "style": "deepObject",
  8752. "explode": true
  8753. }
  8754. ],
  8755. "security": [],
  8756. "responses": {
  8757. "200": {
  8758. "description": "Success",
  8759. "content": {
  8760. "application/json": {
  8761. "schema": {
  8762. "type": "array",
  8763. "items": {
  8764. "$ref": "#/components/schemas/ProviderV2Info"
  8765. }
  8766. }
  8767. }
  8768. }
  8769. },
  8770. "400": {
  8771. "description": "InvalidRequestError",
  8772. "content": {
  8773. "application/json": {
  8774. "schema": {
  8775. "$ref": "#/components/schemas/InvalidRequestError"
  8776. }
  8777. }
  8778. }
  8779. },
  8780. "401": {
  8781. "description": "UnauthorizedError",
  8782. "content": {
  8783. "application/json": {
  8784. "schema": {
  8785. "$ref": "#/components/schemas/UnauthorizedError"
  8786. }
  8787. }
  8788. }
  8789. },
  8790. "503": {
  8791. "description": "ServiceUnavailableError",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "$ref": "#/components/schemas/ServiceUnavailableError"
  8796. }
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8802. "summary": "List v2 providers",
  8803. "x-codeSamples": [
  8804. {
  8805. "lang": "js",
  8806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8807. }
  8808. ]
  8809. }
  8810. },
  8811. "/api/provider/{providerID}": {
  8812. "get": {
  8813. "tags": ["v2 providers"],
  8814. "operationId": "v2.provider.get",
  8815. "parameters": [
  8816. {
  8817. "name": "providerID",
  8818. "in": "path",
  8819. "schema": {
  8820. "type": "string"
  8821. },
  8822. "required": true
  8823. },
  8824. {
  8825. "name": "location",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "object",
  8829. "properties": {
  8830. "directory": {
  8831. "type": "string"
  8832. },
  8833. "workspace": {
  8834. "type": "string"
  8835. }
  8836. },
  8837. "additionalProperties": false
  8838. },
  8839. "required": false,
  8840. "style": "deepObject",
  8841. "explode": true
  8842. }
  8843. ],
  8844. "security": [],
  8845. "responses": {
  8846. "200": {
  8847. "description": "ProviderV2.Info",
  8848. "content": {
  8849. "application/json": {
  8850. "schema": {
  8851. "$ref": "#/components/schemas/ProviderV2Info"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "InvalidRequestError",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/InvalidRequestError"
  8862. }
  8863. }
  8864. }
  8865. },
  8866. "401": {
  8867. "description": "UnauthorizedError",
  8868. "content": {
  8869. "application/json": {
  8870. "schema": {
  8871. "$ref": "#/components/schemas/UnauthorizedError"
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "404": {
  8877. "description": "ProviderNotFoundError",
  8878. "content": {
  8879. "application/json": {
  8880. "schema": {
  8881. "$ref": "#/components/schemas/ProviderNotFoundError"
  8882. }
  8883. }
  8884. }
  8885. },
  8886. "503": {
  8887. "description": "ServiceUnavailableError",
  8888. "content": {
  8889. "application/json": {
  8890. "schema": {
  8891. "$ref": "#/components/schemas/ServiceUnavailableError"
  8892. }
  8893. }
  8894. }
  8895. }
  8896. },
  8897. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8898. "summary": "Get v2 provider",
  8899. "x-codeSamples": [
  8900. {
  8901. "lang": "js",
  8902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  8903. }
  8904. ]
  8905. }
  8906. },
  8907. "/tui/append-prompt": {
  8908. "post": {
  8909. "tags": ["tui"],
  8910. "operationId": "tui.appendPrompt",
  8911. "parameters": [
  8912. {
  8913. "name": "directory",
  8914. "in": "query",
  8915. "schema": {
  8916. "type": "string"
  8917. },
  8918. "required": false
  8919. },
  8920. {
  8921. "name": "workspace",
  8922. "in": "query",
  8923. "schema": {
  8924. "type": "string"
  8925. },
  8926. "required": false
  8927. }
  8928. ],
  8929. "responses": {
  8930. "200": {
  8931. "description": "Prompt processed successfully",
  8932. "content": {
  8933. "application/json": {
  8934. "schema": {
  8935. "type": "boolean",
  8936. "description": "Prompt processed successfully"
  8937. }
  8938. }
  8939. }
  8940. },
  8941. "400": {
  8942. "description": "BadRequest | InvalidRequestError",
  8943. "content": {
  8944. "application/json": {
  8945. "schema": {
  8946. "anyOf": [
  8947. {
  8948. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8949. },
  8950. {
  8951. "$ref": "#/components/schemas/InvalidRequestError"
  8952. }
  8953. ]
  8954. }
  8955. }
  8956. }
  8957. }
  8958. },
  8959. "description": "Append prompt to the TUI.",
  8960. "summary": "Append TUI prompt",
  8961. "requestBody": {
  8962. "content": {
  8963. "application/json": {
  8964. "schema": {
  8965. "type": "object",
  8966. "properties": {
  8967. "text": {
  8968. "type": "string"
  8969. }
  8970. },
  8971. "required": ["text"],
  8972. "additionalProperties": false
  8973. }
  8974. }
  8975. }
  8976. },
  8977. "x-codeSamples": [
  8978. {
  8979. "lang": "js",
  8980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8981. }
  8982. ]
  8983. }
  8984. },
  8985. "/tui/open-help": {
  8986. "post": {
  8987. "tags": ["tui"],
  8988. "operationId": "tui.openHelp",
  8989. "parameters": [
  8990. {
  8991. "name": "directory",
  8992. "in": "query",
  8993. "schema": {
  8994. "type": "string"
  8995. },
  8996. "required": false
  8997. },
  8998. {
  8999. "name": "workspace",
  9000. "in": "query",
  9001. "schema": {
  9002. "type": "string"
  9003. },
  9004. "required": false
  9005. }
  9006. ],
  9007. "responses": {
  9008. "200": {
  9009. "description": "Help dialog opened successfully",
  9010. "content": {
  9011. "application/json": {
  9012. "schema": {
  9013. "type": "boolean",
  9014. "description": "Help dialog opened successfully"
  9015. }
  9016. }
  9017. }
  9018. },
  9019. "400": {
  9020. "description": "Bad request",
  9021. "content": {
  9022. "application/json": {
  9023. "schema": {
  9024. "$ref": "#/components/schemas/BadRequestError"
  9025. }
  9026. }
  9027. }
  9028. }
  9029. },
  9030. "description": "Open the help dialog in the TUI to display user assistance information.",
  9031. "summary": "Open help dialog",
  9032. "x-codeSamples": [
  9033. {
  9034. "lang": "js",
  9035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9036. }
  9037. ]
  9038. }
  9039. },
  9040. "/tui/open-sessions": {
  9041. "post": {
  9042. "tags": ["tui"],
  9043. "operationId": "tui.openSessions",
  9044. "parameters": [
  9045. {
  9046. "name": "directory",
  9047. "in": "query",
  9048. "schema": {
  9049. "type": "string"
  9050. },
  9051. "required": false
  9052. },
  9053. {
  9054. "name": "workspace",
  9055. "in": "query",
  9056. "schema": {
  9057. "type": "string"
  9058. },
  9059. "required": false
  9060. }
  9061. ],
  9062. "responses": {
  9063. "200": {
  9064. "description": "Session dialog opened successfully",
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "type": "boolean",
  9069. "description": "Session dialog opened successfully"
  9070. }
  9071. }
  9072. }
  9073. },
  9074. "400": {
  9075. "description": "Bad request",
  9076. "content": {
  9077. "application/json": {
  9078. "schema": {
  9079. "$ref": "#/components/schemas/BadRequestError"
  9080. }
  9081. }
  9082. }
  9083. }
  9084. },
  9085. "description": "Open the session dialog.",
  9086. "summary": "Open sessions dialog",
  9087. "x-codeSamples": [
  9088. {
  9089. "lang": "js",
  9090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9091. }
  9092. ]
  9093. }
  9094. },
  9095. "/tui/open-themes": {
  9096. "post": {
  9097. "tags": ["tui"],
  9098. "operationId": "tui.openThemes",
  9099. "parameters": [
  9100. {
  9101. "name": "directory",
  9102. "in": "query",
  9103. "schema": {
  9104. "type": "string"
  9105. },
  9106. "required": false
  9107. },
  9108. {
  9109. "name": "workspace",
  9110. "in": "query",
  9111. "schema": {
  9112. "type": "string"
  9113. },
  9114. "required": false
  9115. }
  9116. ],
  9117. "responses": {
  9118. "200": {
  9119. "description": "Theme dialog opened successfully",
  9120. "content": {
  9121. "application/json": {
  9122. "schema": {
  9123. "type": "boolean",
  9124. "description": "Theme dialog opened successfully"
  9125. }
  9126. }
  9127. }
  9128. },
  9129. "400": {
  9130. "description": "Bad request",
  9131. "content": {
  9132. "application/json": {
  9133. "schema": {
  9134. "$ref": "#/components/schemas/BadRequestError"
  9135. }
  9136. }
  9137. }
  9138. }
  9139. },
  9140. "description": "Open the theme dialog.",
  9141. "summary": "Open themes dialog",
  9142. "x-codeSamples": [
  9143. {
  9144. "lang": "js",
  9145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9146. }
  9147. ]
  9148. }
  9149. },
  9150. "/tui/open-models": {
  9151. "post": {
  9152. "tags": ["tui"],
  9153. "operationId": "tui.openModels",
  9154. "parameters": [
  9155. {
  9156. "name": "directory",
  9157. "in": "query",
  9158. "schema": {
  9159. "type": "string"
  9160. },
  9161. "required": false
  9162. },
  9163. {
  9164. "name": "workspace",
  9165. "in": "query",
  9166. "schema": {
  9167. "type": "string"
  9168. },
  9169. "required": false
  9170. }
  9171. ],
  9172. "responses": {
  9173. "200": {
  9174. "description": "Model dialog opened successfully",
  9175. "content": {
  9176. "application/json": {
  9177. "schema": {
  9178. "type": "boolean",
  9179. "description": "Model dialog opened successfully"
  9180. }
  9181. }
  9182. }
  9183. },
  9184. "400": {
  9185. "description": "Bad request",
  9186. "content": {
  9187. "application/json": {
  9188. "schema": {
  9189. "$ref": "#/components/schemas/BadRequestError"
  9190. }
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "description": "Open the model dialog.",
  9196. "summary": "Open models dialog",
  9197. "x-codeSamples": [
  9198. {
  9199. "lang": "js",
  9200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9201. }
  9202. ]
  9203. }
  9204. },
  9205. "/tui/submit-prompt": {
  9206. "post": {
  9207. "tags": ["tui"],
  9208. "operationId": "tui.submitPrompt",
  9209. "parameters": [
  9210. {
  9211. "name": "directory",
  9212. "in": "query",
  9213. "schema": {
  9214. "type": "string"
  9215. },
  9216. "required": false
  9217. },
  9218. {
  9219. "name": "workspace",
  9220. "in": "query",
  9221. "schema": {
  9222. "type": "string"
  9223. },
  9224. "required": false
  9225. }
  9226. ],
  9227. "responses": {
  9228. "200": {
  9229. "description": "Prompt submitted successfully",
  9230. "content": {
  9231. "application/json": {
  9232. "schema": {
  9233. "type": "boolean",
  9234. "description": "Prompt submitted successfully"
  9235. }
  9236. }
  9237. }
  9238. },
  9239. "400": {
  9240. "description": "Bad request",
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "$ref": "#/components/schemas/BadRequestError"
  9245. }
  9246. }
  9247. }
  9248. }
  9249. },
  9250. "description": "Submit the prompt.",
  9251. "summary": "Submit TUI prompt",
  9252. "x-codeSamples": [
  9253. {
  9254. "lang": "js",
  9255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9256. }
  9257. ]
  9258. }
  9259. },
  9260. "/tui/clear-prompt": {
  9261. "post": {
  9262. "tags": ["tui"],
  9263. "operationId": "tui.clearPrompt",
  9264. "parameters": [
  9265. {
  9266. "name": "directory",
  9267. "in": "query",
  9268. "schema": {
  9269. "type": "string"
  9270. },
  9271. "required": false
  9272. },
  9273. {
  9274. "name": "workspace",
  9275. "in": "query",
  9276. "schema": {
  9277. "type": "string"
  9278. },
  9279. "required": false
  9280. }
  9281. ],
  9282. "responses": {
  9283. "200": {
  9284. "description": "Prompt cleared successfully",
  9285. "content": {
  9286. "application/json": {
  9287. "schema": {
  9288. "type": "boolean",
  9289. "description": "Prompt cleared successfully"
  9290. }
  9291. }
  9292. }
  9293. },
  9294. "400": {
  9295. "description": "Bad request",
  9296. "content": {
  9297. "application/json": {
  9298. "schema": {
  9299. "$ref": "#/components/schemas/BadRequestError"
  9300. }
  9301. }
  9302. }
  9303. }
  9304. },
  9305. "description": "Clear the prompt.",
  9306. "summary": "Clear TUI prompt",
  9307. "x-codeSamples": [
  9308. {
  9309. "lang": "js",
  9310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9311. }
  9312. ]
  9313. }
  9314. },
  9315. "/tui/execute-command": {
  9316. "post": {
  9317. "tags": ["tui"],
  9318. "operationId": "tui.executeCommand",
  9319. "parameters": [
  9320. {
  9321. "name": "directory",
  9322. "in": "query",
  9323. "schema": {
  9324. "type": "string"
  9325. },
  9326. "required": false
  9327. },
  9328. {
  9329. "name": "workspace",
  9330. "in": "query",
  9331. "schema": {
  9332. "type": "string"
  9333. },
  9334. "required": false
  9335. }
  9336. ],
  9337. "responses": {
  9338. "200": {
  9339. "description": "Command executed successfully",
  9340. "content": {
  9341. "application/json": {
  9342. "schema": {
  9343. "type": "boolean",
  9344. "description": "Command executed successfully"
  9345. }
  9346. }
  9347. }
  9348. },
  9349. "400": {
  9350. "description": "BadRequest | InvalidRequestError",
  9351. "content": {
  9352. "application/json": {
  9353. "schema": {
  9354. "anyOf": [
  9355. {
  9356. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9357. },
  9358. {
  9359. "$ref": "#/components/schemas/InvalidRequestError"
  9360. }
  9361. ]
  9362. }
  9363. }
  9364. }
  9365. }
  9366. },
  9367. "description": "Execute a TUI command.",
  9368. "summary": "Execute TUI command",
  9369. "requestBody": {
  9370. "content": {
  9371. "application/json": {
  9372. "schema": {
  9373. "type": "object",
  9374. "properties": {
  9375. "command": {
  9376. "type": "string"
  9377. }
  9378. },
  9379. "required": ["command"],
  9380. "additionalProperties": false
  9381. }
  9382. }
  9383. }
  9384. },
  9385. "x-codeSamples": [
  9386. {
  9387. "lang": "js",
  9388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9389. }
  9390. ]
  9391. }
  9392. },
  9393. "/tui/show-toast": {
  9394. "post": {
  9395. "tags": ["tui"],
  9396. "operationId": "tui.showToast",
  9397. "parameters": [
  9398. {
  9399. "name": "directory",
  9400. "in": "query",
  9401. "schema": {
  9402. "type": "string"
  9403. },
  9404. "required": false
  9405. },
  9406. {
  9407. "name": "workspace",
  9408. "in": "query",
  9409. "schema": {
  9410. "type": "string"
  9411. },
  9412. "required": false
  9413. }
  9414. ],
  9415. "responses": {
  9416. "200": {
  9417. "description": "Toast notification shown successfully",
  9418. "content": {
  9419. "application/json": {
  9420. "schema": {
  9421. "type": "boolean",
  9422. "description": "Toast notification shown successfully"
  9423. }
  9424. }
  9425. }
  9426. },
  9427. "400": {
  9428. "description": "Bad request",
  9429. "content": {
  9430. "application/json": {
  9431. "schema": {
  9432. "$ref": "#/components/schemas/BadRequestError"
  9433. }
  9434. }
  9435. }
  9436. }
  9437. },
  9438. "description": "Show a toast notification in the TUI.",
  9439. "summary": "Show TUI toast",
  9440. "requestBody": {
  9441. "content": {
  9442. "application/json": {
  9443. "schema": {
  9444. "type": "object",
  9445. "properties": {
  9446. "title": {
  9447. "type": "string"
  9448. },
  9449. "message": {
  9450. "type": "string"
  9451. },
  9452. "variant": {
  9453. "type": "string",
  9454. "enum": ["info", "success", "warning", "error"]
  9455. },
  9456. "duration": {
  9457. "type": "integer",
  9458. "exclusiveMinimum": 0
  9459. }
  9460. },
  9461. "required": ["message", "variant"],
  9462. "additionalProperties": false
  9463. }
  9464. }
  9465. }
  9466. },
  9467. "x-codeSamples": [
  9468. {
  9469. "lang": "js",
  9470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9471. }
  9472. ]
  9473. }
  9474. },
  9475. "/tui/publish": {
  9476. "post": {
  9477. "tags": ["tui"],
  9478. "operationId": "tui.publish",
  9479. "parameters": [
  9480. {
  9481. "name": "directory",
  9482. "in": "query",
  9483. "schema": {
  9484. "type": "string"
  9485. },
  9486. "required": false
  9487. },
  9488. {
  9489. "name": "workspace",
  9490. "in": "query",
  9491. "schema": {
  9492. "type": "string"
  9493. },
  9494. "required": false
  9495. }
  9496. ],
  9497. "responses": {
  9498. "200": {
  9499. "description": "Event published successfully",
  9500. "content": {
  9501. "application/json": {
  9502. "schema": {
  9503. "type": "boolean",
  9504. "description": "Event published successfully"
  9505. }
  9506. }
  9507. }
  9508. },
  9509. "400": {
  9510. "description": "BadRequest | InvalidRequestError",
  9511. "content": {
  9512. "application/json": {
  9513. "schema": {
  9514. "anyOf": [
  9515. {
  9516. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9517. },
  9518. {
  9519. "$ref": "#/components/schemas/InvalidRequestError"
  9520. }
  9521. ]
  9522. }
  9523. }
  9524. }
  9525. }
  9526. },
  9527. "description": "Publish a TUI event.",
  9528. "summary": "Publish TUI event",
  9529. "requestBody": {
  9530. "content": {
  9531. "application/json": {
  9532. "schema": {
  9533. "anyOf": [
  9534. {
  9535. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9536. },
  9537. {
  9538. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9539. },
  9540. {
  9541. "$ref": "#/components/schemas/EventTuiToastShow"
  9542. },
  9543. {
  9544. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9545. }
  9546. ]
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "x-codeSamples": [
  9552. {
  9553. "lang": "js",
  9554. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9555. }
  9556. ]
  9557. }
  9558. },
  9559. "/tui/select-session": {
  9560. "post": {
  9561. "tags": ["tui"],
  9562. "operationId": "tui.selectSession",
  9563. "parameters": [
  9564. {
  9565. "name": "directory",
  9566. "in": "query",
  9567. "schema": {
  9568. "type": "string"
  9569. },
  9570. "required": false
  9571. },
  9572. {
  9573. "name": "workspace",
  9574. "in": "query",
  9575. "schema": {
  9576. "type": "string"
  9577. },
  9578. "required": false
  9579. }
  9580. ],
  9581. "responses": {
  9582. "200": {
  9583. "description": "Session selected successfully",
  9584. "content": {
  9585. "application/json": {
  9586. "schema": {
  9587. "type": "boolean",
  9588. "description": "Session selected successfully"
  9589. }
  9590. }
  9591. }
  9592. },
  9593. "400": {
  9594. "description": "BadRequest | InvalidRequestError",
  9595. "content": {
  9596. "application/json": {
  9597. "schema": {
  9598. "anyOf": [
  9599. {
  9600. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9601. },
  9602. {
  9603. "$ref": "#/components/schemas/InvalidRequestError"
  9604. }
  9605. ]
  9606. }
  9607. }
  9608. }
  9609. },
  9610. "404": {
  9611. "description": "NotFoundError",
  9612. "content": {
  9613. "application/json": {
  9614. "schema": {
  9615. "$ref": "#/components/schemas/NotFoundError"
  9616. }
  9617. }
  9618. }
  9619. }
  9620. },
  9621. "description": "Navigate the TUI to display the specified session.",
  9622. "summary": "Select session",
  9623. "requestBody": {
  9624. "content": {
  9625. "application/json": {
  9626. "schema": {
  9627. "type": "object",
  9628. "properties": {
  9629. "sessionID": {
  9630. "type": "string",
  9631. "pattern": "^ses",
  9632. "description": "Session ID to navigate to"
  9633. }
  9634. },
  9635. "required": ["sessionID"],
  9636. "additionalProperties": false
  9637. }
  9638. }
  9639. }
  9640. },
  9641. "x-codeSamples": [
  9642. {
  9643. "lang": "js",
  9644. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9645. }
  9646. ]
  9647. }
  9648. },
  9649. "/tui/control/next": {
  9650. "get": {
  9651. "tags": ["tui"],
  9652. "operationId": "tui.control.next",
  9653. "parameters": [
  9654. {
  9655. "name": "directory",
  9656. "in": "query",
  9657. "schema": {
  9658. "type": "string"
  9659. },
  9660. "required": false
  9661. },
  9662. {
  9663. "name": "workspace",
  9664. "in": "query",
  9665. "schema": {
  9666. "type": "string"
  9667. },
  9668. "required": false
  9669. }
  9670. ],
  9671. "responses": {
  9672. "200": {
  9673. "description": "Next TUI request",
  9674. "content": {
  9675. "application/json": {
  9676. "schema": {
  9677. "type": "object",
  9678. "properties": {
  9679. "path": {
  9680. "type": "string"
  9681. },
  9682. "body": {}
  9683. },
  9684. "required": ["path", "body"],
  9685. "additionalProperties": false,
  9686. "description": "Next TUI request"
  9687. }
  9688. }
  9689. }
  9690. },
  9691. "400": {
  9692. "description": "Bad request",
  9693. "content": {
  9694. "application/json": {
  9695. "schema": {
  9696. "$ref": "#/components/schemas/BadRequestError"
  9697. }
  9698. }
  9699. }
  9700. }
  9701. },
  9702. "description": "Retrieve the next TUI request from the queue for processing.",
  9703. "summary": "Get next TUI request",
  9704. "x-codeSamples": [
  9705. {
  9706. "lang": "js",
  9707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9708. }
  9709. ]
  9710. }
  9711. },
  9712. "/tui/control/response": {
  9713. "post": {
  9714. "tags": ["tui"],
  9715. "operationId": "tui.control.response",
  9716. "parameters": [
  9717. {
  9718. "name": "directory",
  9719. "in": "query",
  9720. "schema": {
  9721. "type": "string"
  9722. },
  9723. "required": false
  9724. },
  9725. {
  9726. "name": "workspace",
  9727. "in": "query",
  9728. "schema": {
  9729. "type": "string"
  9730. },
  9731. "required": false
  9732. }
  9733. ],
  9734. "responses": {
  9735. "200": {
  9736. "description": "Response submitted successfully",
  9737. "content": {
  9738. "application/json": {
  9739. "schema": {
  9740. "type": "boolean",
  9741. "description": "Response submitted successfully"
  9742. }
  9743. }
  9744. }
  9745. },
  9746. "400": {
  9747. "description": "Bad request",
  9748. "content": {
  9749. "application/json": {
  9750. "schema": {
  9751. "$ref": "#/components/schemas/BadRequestError"
  9752. }
  9753. }
  9754. }
  9755. }
  9756. },
  9757. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9758. "summary": "Submit TUI response",
  9759. "requestBody": {
  9760. "content": {
  9761. "application/json": {
  9762. "schema": {}
  9763. }
  9764. }
  9765. },
  9766. "x-codeSamples": [
  9767. {
  9768. "lang": "js",
  9769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9770. }
  9771. ]
  9772. }
  9773. },
  9774. "/experimental/workspace/adapter": {
  9775. "get": {
  9776. "tags": ["workspace"],
  9777. "operationId": "experimental.workspace.adapter.list",
  9778. "parameters": [
  9779. {
  9780. "name": "directory",
  9781. "in": "query",
  9782. "schema": {
  9783. "type": "string"
  9784. },
  9785. "required": false
  9786. },
  9787. {
  9788. "name": "workspace",
  9789. "in": "query",
  9790. "schema": {
  9791. "type": "string"
  9792. },
  9793. "required": false
  9794. }
  9795. ],
  9796. "responses": {
  9797. "200": {
  9798. "description": "Workspace adapters",
  9799. "content": {
  9800. "application/json": {
  9801. "schema": {
  9802. "type": "array",
  9803. "items": {
  9804. "type": "object",
  9805. "properties": {
  9806. "type": {
  9807. "type": "string"
  9808. },
  9809. "name": {
  9810. "type": "string"
  9811. },
  9812. "description": {
  9813. "type": "string"
  9814. }
  9815. },
  9816. "required": ["type", "name", "description"],
  9817. "additionalProperties": false
  9818. },
  9819. "description": "Workspace adapters"
  9820. }
  9821. }
  9822. }
  9823. },
  9824. "400": {
  9825. "description": "Bad request",
  9826. "content": {
  9827. "application/json": {
  9828. "schema": {
  9829. "$ref": "#/components/schemas/BadRequestError"
  9830. }
  9831. }
  9832. }
  9833. }
  9834. },
  9835. "description": "List all available workspace adapters for the current project.",
  9836. "summary": "List workspace adapters",
  9837. "x-codeSamples": [
  9838. {
  9839. "lang": "js",
  9840. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9841. }
  9842. ]
  9843. }
  9844. },
  9845. "/experimental/workspace": {
  9846. "get": {
  9847. "tags": ["workspace"],
  9848. "operationId": "experimental.workspace.list",
  9849. "parameters": [
  9850. {
  9851. "name": "directory",
  9852. "in": "query",
  9853. "schema": {
  9854. "type": "string"
  9855. },
  9856. "required": false
  9857. },
  9858. {
  9859. "name": "workspace",
  9860. "in": "query",
  9861. "schema": {
  9862. "type": "string"
  9863. },
  9864. "required": false
  9865. }
  9866. ],
  9867. "responses": {
  9868. "200": {
  9869. "description": "Workspaces",
  9870. "content": {
  9871. "application/json": {
  9872. "schema": {
  9873. "type": "array",
  9874. "items": {
  9875. "$ref": "#/components/schemas/Workspace"
  9876. },
  9877. "description": "Workspaces"
  9878. }
  9879. }
  9880. }
  9881. },
  9882. "400": {
  9883. "description": "Bad request",
  9884. "content": {
  9885. "application/json": {
  9886. "schema": {
  9887. "$ref": "#/components/schemas/BadRequestError"
  9888. }
  9889. }
  9890. }
  9891. }
  9892. },
  9893. "description": "List all workspaces.",
  9894. "summary": "List workspaces",
  9895. "x-codeSamples": [
  9896. {
  9897. "lang": "js",
  9898. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9899. }
  9900. ]
  9901. },
  9902. "post": {
  9903. "tags": ["workspace"],
  9904. "operationId": "experimental.workspace.create",
  9905. "parameters": [
  9906. {
  9907. "name": "directory",
  9908. "in": "query",
  9909. "schema": {
  9910. "type": "string"
  9911. },
  9912. "required": false
  9913. },
  9914. {
  9915. "name": "workspace",
  9916. "in": "query",
  9917. "schema": {
  9918. "type": "string"
  9919. },
  9920. "required": false
  9921. }
  9922. ],
  9923. "responses": {
  9924. "200": {
  9925. "description": "Workspace created",
  9926. "content": {
  9927. "application/json": {
  9928. "schema": {
  9929. "$ref": "#/components/schemas/Workspace"
  9930. }
  9931. }
  9932. }
  9933. },
  9934. "400": {
  9935. "description": "BadRequest | InvalidRequestError",
  9936. "content": {
  9937. "application/json": {
  9938. "schema": {
  9939. "anyOf": [
  9940. {
  9941. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9942. },
  9943. {
  9944. "$ref": "#/components/schemas/InvalidRequestError"
  9945. }
  9946. ]
  9947. }
  9948. }
  9949. }
  9950. }
  9951. },
  9952. "description": "Create a workspace for the current project.",
  9953. "summary": "Create workspace",
  9954. "requestBody": {
  9955. "content": {
  9956. "application/json": {
  9957. "schema": {
  9958. "type": "object",
  9959. "properties": {
  9960. "id": {
  9961. "type": "string",
  9962. "pattern": "^wrk"
  9963. },
  9964. "type": {
  9965. "type": "string"
  9966. },
  9967. "branch": {
  9968. "anyOf": [
  9969. {
  9970. "type": "string"
  9971. },
  9972. {
  9973. "type": "null"
  9974. }
  9975. ]
  9976. },
  9977. "extra": {
  9978. "anyOf": [
  9979. {},
  9980. {
  9981. "type": "null"
  9982. }
  9983. ]
  9984. }
  9985. },
  9986. "required": ["type"],
  9987. "additionalProperties": false
  9988. }
  9989. }
  9990. }
  9991. },
  9992. "x-codeSamples": [
  9993. {
  9994. "lang": "js",
  9995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9996. }
  9997. ]
  9998. }
  9999. },
  10000. "/experimental/workspace/sync-list": {
  10001. "post": {
  10002. "tags": ["workspace"],
  10003. "operationId": "experimental.workspace.syncList",
  10004. "parameters": [
  10005. {
  10006. "name": "directory",
  10007. "in": "query",
  10008. "schema": {
  10009. "type": "string"
  10010. },
  10011. "required": false
  10012. },
  10013. {
  10014. "name": "workspace",
  10015. "in": "query",
  10016. "schema": {
  10017. "type": "string"
  10018. },
  10019. "required": false
  10020. }
  10021. ],
  10022. "responses": {
  10023. "204": {
  10024. "description": "Workspace list synced"
  10025. },
  10026. "400": {
  10027. "description": "Bad request",
  10028. "content": {
  10029. "application/json": {
  10030. "schema": {
  10031. "$ref": "#/components/schemas/BadRequestError"
  10032. }
  10033. }
  10034. }
  10035. }
  10036. },
  10037. "description": "Register missing workspaces returned by workspace adapters.",
  10038. "summary": "Sync workspace list",
  10039. "x-codeSamples": [
  10040. {
  10041. "lang": "js",
  10042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10043. }
  10044. ]
  10045. }
  10046. },
  10047. "/experimental/workspace/status": {
  10048. "get": {
  10049. "tags": ["workspace"],
  10050. "operationId": "experimental.workspace.status",
  10051. "parameters": [
  10052. {
  10053. "name": "directory",
  10054. "in": "query",
  10055. "schema": {
  10056. "type": "string"
  10057. },
  10058. "required": false
  10059. },
  10060. {
  10061. "name": "workspace",
  10062. "in": "query",
  10063. "schema": {
  10064. "type": "string"
  10065. },
  10066. "required": false
  10067. }
  10068. ],
  10069. "responses": {
  10070. "200": {
  10071. "description": "Workspace status",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "type": "array",
  10076. "items": {
  10077. "type": "object",
  10078. "properties": {
  10079. "workspaceID": {
  10080. "type": "string",
  10081. "pattern": "^wrk"
  10082. },
  10083. "status": {
  10084. "type": "string",
  10085. "enum": ["connected", "connecting", "disconnected", "error"]
  10086. }
  10087. },
  10088. "required": ["workspaceID", "status"],
  10089. "additionalProperties": false
  10090. },
  10091. "description": "Workspace status"
  10092. }
  10093. }
  10094. }
  10095. },
  10096. "400": {
  10097. "description": "Bad request",
  10098. "content": {
  10099. "application/json": {
  10100. "schema": {
  10101. "$ref": "#/components/schemas/BadRequestError"
  10102. }
  10103. }
  10104. }
  10105. }
  10106. },
  10107. "description": "Get connection status for workspaces in the current project.",
  10108. "summary": "Workspace status",
  10109. "x-codeSamples": [
  10110. {
  10111. "lang": "js",
  10112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10113. }
  10114. ]
  10115. }
  10116. },
  10117. "/experimental/workspace/{id}": {
  10118. "delete": {
  10119. "tags": ["workspace"],
  10120. "operationId": "experimental.workspace.remove",
  10121. "parameters": [
  10122. {
  10123. "name": "id",
  10124. "in": "path",
  10125. "schema": {
  10126. "type": "string",
  10127. "pattern": "^wrk"
  10128. },
  10129. "required": true
  10130. },
  10131. {
  10132. "name": "directory",
  10133. "in": "query",
  10134. "schema": {
  10135. "type": "string"
  10136. },
  10137. "required": false
  10138. },
  10139. {
  10140. "name": "workspace",
  10141. "in": "query",
  10142. "schema": {
  10143. "type": "string"
  10144. },
  10145. "required": false
  10146. }
  10147. ],
  10148. "responses": {
  10149. "200": {
  10150. "description": "Workspace removed",
  10151. "content": {
  10152. "application/json": {
  10153. "schema": {
  10154. "$ref": "#/components/schemas/Workspace"
  10155. }
  10156. }
  10157. }
  10158. },
  10159. "400": {
  10160. "description": "BadRequest | InvalidRequestError",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "anyOf": [
  10165. {
  10166. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10167. },
  10168. {
  10169. "$ref": "#/components/schemas/InvalidRequestError"
  10170. }
  10171. ]
  10172. }
  10173. }
  10174. }
  10175. }
  10176. },
  10177. "description": "Remove an existing workspace.",
  10178. "summary": "Remove workspace",
  10179. "x-codeSamples": [
  10180. {
  10181. "lang": "js",
  10182. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10183. }
  10184. ]
  10185. }
  10186. },
  10187. "/experimental/workspace/warp": {
  10188. "post": {
  10189. "tags": ["workspace"],
  10190. "operationId": "experimental.workspace.warp",
  10191. "parameters": [
  10192. {
  10193. "name": "directory",
  10194. "in": "query",
  10195. "schema": {
  10196. "type": "string"
  10197. },
  10198. "required": false
  10199. },
  10200. {
  10201. "name": "workspace",
  10202. "in": "query",
  10203. "schema": {
  10204. "type": "string"
  10205. },
  10206. "required": false
  10207. }
  10208. ],
  10209. "responses": {
  10210. "204": {
  10211. "description": "Session warped"
  10212. },
  10213. "400": {
  10214. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10215. "content": {
  10216. "application/json": {
  10217. "schema": {
  10218. "anyOf": [
  10219. {
  10220. "$ref": "#/components/schemas/WorkspaceWarpError"
  10221. },
  10222. {
  10223. "$ref": "#/components/schemas/VcsApplyError"
  10224. },
  10225. {
  10226. "$ref": "#/components/schemas/InvalidRequestError"
  10227. }
  10228. ]
  10229. }
  10230. }
  10231. }
  10232. }
  10233. },
  10234. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10235. "summary": "Warp session into workspace",
  10236. "requestBody": {
  10237. "content": {
  10238. "application/json": {
  10239. "schema": {
  10240. "type": "object",
  10241. "properties": {
  10242. "id": {
  10243. "anyOf": [
  10244. {
  10245. "type": "string",
  10246. "pattern": "^wrk"
  10247. },
  10248. {
  10249. "type": "null"
  10250. }
  10251. ]
  10252. },
  10253. "sessionID": {
  10254. "type": "string",
  10255. "pattern": "^ses"
  10256. },
  10257. "copyChanges": {
  10258. "type": "boolean"
  10259. }
  10260. },
  10261. "required": ["id", "sessionID"],
  10262. "additionalProperties": false
  10263. }
  10264. }
  10265. }
  10266. },
  10267. "x-codeSamples": [
  10268. {
  10269. "lang": "js",
  10270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10271. }
  10272. ]
  10273. }
  10274. },
  10275. "/pty/{ptyID}/connect": {
  10276. "get": {
  10277. "tags": ["pty"],
  10278. "operationId": "pty.connect",
  10279. "parameters": [
  10280. {
  10281. "name": "ptyID",
  10282. "in": "path",
  10283. "schema": {
  10284. "type": "string",
  10285. "pattern": "^pty"
  10286. },
  10287. "required": true
  10288. },
  10289. {
  10290. "name": "directory",
  10291. "in": "query",
  10292. "schema": {
  10293. "type": "string"
  10294. },
  10295. "required": false
  10296. },
  10297. {
  10298. "name": "workspace",
  10299. "in": "query",
  10300. "schema": {
  10301. "type": "string"
  10302. },
  10303. "required": false
  10304. }
  10305. ],
  10306. "responses": {
  10307. "200": {
  10308. "description": "Connected session",
  10309. "content": {
  10310. "application/json": {
  10311. "schema": {
  10312. "type": "boolean",
  10313. "description": "Connected session"
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "403": {
  10319. "description": "Forbidden",
  10320. "content": {
  10321. "application/json": {
  10322. "schema": {
  10323. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10324. }
  10325. }
  10326. }
  10327. },
  10328. "404": {
  10329. "description": "Not found",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "$ref": "#/components/schemas/NotFoundError"
  10334. }
  10335. }
  10336. }
  10337. }
  10338. },
  10339. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10340. "summary": "Connect to PTY session",
  10341. "x-codeSamples": [
  10342. {
  10343. "lang": "js",
  10344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10345. }
  10346. ]
  10347. }
  10348. }
  10349. },
  10350. "components": {
  10351. "schemas": {
  10352. "Event": {
  10353. "anyOf": [
  10354. {
  10355. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10356. },
  10357. {
  10358. "$ref": "#/components/schemas/Event.tui.command.execute"
  10359. },
  10360. {
  10361. "$ref": "#/components/schemas/EventTuiToastShow1"
  10362. },
  10363. {
  10364. "$ref": "#/components/schemas/Event.tui.session.select"
  10365. },
  10366. {
  10367. "$ref": "#/components/schemas/EventServerConnected"
  10368. },
  10369. {
  10370. "$ref": "#/components/schemas/EventGlobalDisposed"
  10371. },
  10372. {
  10373. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10374. },
  10375. {
  10376. "$ref": "#/components/schemas/EventFileEdited"
  10377. },
  10378. {
  10379. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10380. },
  10381. {
  10382. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10383. },
  10384. {
  10385. "$ref": "#/components/schemas/EventLspUpdated"
  10386. },
  10387. {
  10388. "$ref": "#/components/schemas/EventMessagePartDelta"
  10389. },
  10390. {
  10391. "$ref": "#/components/schemas/EventPermissionAsked"
  10392. },
  10393. {
  10394. "$ref": "#/components/schemas/EventPermissionReplied"
  10395. },
  10396. {
  10397. "$ref": "#/components/schemas/EventSessionDiff"
  10398. },
  10399. {
  10400. "$ref": "#/components/schemas/EventSessionError"
  10401. },
  10402. {
  10403. "$ref": "#/components/schemas/EventQuestionAsked"
  10404. },
  10405. {
  10406. "$ref": "#/components/schemas/EventQuestionReplied"
  10407. },
  10408. {
  10409. "$ref": "#/components/schemas/EventQuestionRejected"
  10410. },
  10411. {
  10412. "$ref": "#/components/schemas/EventTodoUpdated"
  10413. },
  10414. {
  10415. "$ref": "#/components/schemas/EventSessionStatus"
  10416. },
  10417. {
  10418. "$ref": "#/components/schemas/EventSessionIdle"
  10419. },
  10420. {
  10421. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10422. },
  10423. {
  10424. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10425. },
  10426. {
  10427. "$ref": "#/components/schemas/EventCommandExecuted"
  10428. },
  10429. {
  10430. "$ref": "#/components/schemas/EventProjectUpdated"
  10431. },
  10432. {
  10433. "$ref": "#/components/schemas/EventSessionCompacted"
  10434. },
  10435. {
  10436. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10437. },
  10438. {
  10439. "$ref": "#/components/schemas/EventWorkspaceReady"
  10440. },
  10441. {
  10442. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10443. },
  10444. {
  10445. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10446. },
  10447. {
  10448. "$ref": "#/components/schemas/EventWorktreeReady"
  10449. },
  10450. {
  10451. "$ref": "#/components/schemas/EventWorktreeFailed"
  10452. },
  10453. {
  10454. "$ref": "#/components/schemas/EventPtyCreated"
  10455. },
  10456. {
  10457. "$ref": "#/components/schemas/EventPtyUpdated"
  10458. },
  10459. {
  10460. "$ref": "#/components/schemas/EventPtyExited"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/EventPtyDeleted"
  10464. },
  10465. {
  10466. "$ref": "#/components/schemas/EventInstallationUpdated"
  10467. },
  10468. {
  10469. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10470. },
  10471. {
  10472. "$ref": "#/components/schemas/EventMessageUpdated"
  10473. },
  10474. {
  10475. "$ref": "#/components/schemas/EventMessageRemoved"
  10476. },
  10477. {
  10478. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10479. },
  10480. {
  10481. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10482. },
  10483. {
  10484. "$ref": "#/components/schemas/EventSessionCreated"
  10485. },
  10486. {
  10487. "$ref": "#/components/schemas/EventSessionUpdated"
  10488. },
  10489. {
  10490. "$ref": "#/components/schemas/EventSessionDeleted"
  10491. },
  10492. {
  10493. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10494. },
  10495. {
  10496. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10497. },
  10498. {
  10499. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10500. },
  10501. {
  10502. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10503. },
  10504. {
  10505. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10506. },
  10507. {
  10508. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10509. },
  10510. {
  10511. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10512. },
  10513. {
  10514. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10515. },
  10516. {
  10517. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10518. },
  10519. {
  10520. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10521. },
  10522. {
  10523. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10524. },
  10525. {
  10526. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10527. },
  10528. {
  10529. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10530. },
  10531. {
  10532. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10533. },
  10534. {
  10535. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10536. },
  10537. {
  10538. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10539. },
  10540. {
  10541. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10542. },
  10543. {
  10544. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10545. },
  10546. {
  10547. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10548. },
  10549. {
  10550. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10551. },
  10552. {
  10553. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10554. },
  10555. {
  10556. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10557. },
  10558. {
  10559. "$ref": "#/components/schemas/EventSessionNextRetried"
  10560. },
  10561. {
  10562. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10563. },
  10564. {
  10565. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10566. },
  10567. {
  10568. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10569. },
  10570. {
  10571. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10572. },
  10573. {
  10574. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10575. },
  10576. {
  10577. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10578. },
  10579. {
  10580. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10581. },
  10582. {
  10583. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10584. },
  10585. {
  10586. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10587. },
  10588. {
  10589. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10590. },
  10591. {
  10592. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10593. },
  10594. {
  10595. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10596. },
  10597. {
  10598. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10599. },
  10600. {
  10601. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10602. },
  10603. {
  10604. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10605. },
  10606. {
  10607. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10608. },
  10609. {
  10610. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10611. },
  10612. {
  10613. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10614. },
  10615. {
  10616. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10617. },
  10618. {
  10619. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10620. },
  10621. {
  10622. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10623. },
  10624. {
  10625. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10626. },
  10627. {
  10628. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10629. },
  10630. {
  10631. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10632. },
  10633. {
  10634. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10635. },
  10636. {
  10637. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10638. },
  10639. {
  10640. "$ref": "#/components/schemas/EventSessionNextRetried"
  10641. },
  10642. {
  10643. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10644. },
  10645. {
  10646. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10647. },
  10648. {
  10649. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10650. },
  10651. {
  10652. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10653. },
  10654. {
  10655. "$ref": "#/components/schemas/EventAccountAdded"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/EventAccountRemoved"
  10659. },
  10660. {
  10661. "$ref": "#/components/schemas/EventAccountSwitched"
  10662. }
  10663. ]
  10664. },
  10665. "OAuth": {
  10666. "type": "object",
  10667. "properties": {
  10668. "type": {
  10669. "type": "string",
  10670. "enum": ["oauth"]
  10671. },
  10672. "refresh": {
  10673. "type": "string"
  10674. },
  10675. "access": {
  10676. "type": "string"
  10677. },
  10678. "expires": {
  10679. "type": "integer",
  10680. "minimum": 0
  10681. },
  10682. "accountId": {
  10683. "type": "string"
  10684. },
  10685. "enterpriseUrl": {
  10686. "type": "string"
  10687. }
  10688. },
  10689. "required": ["type", "refresh", "access", "expires"],
  10690. "additionalProperties": false
  10691. },
  10692. "ApiAuth": {
  10693. "type": "object",
  10694. "properties": {
  10695. "type": {
  10696. "type": "string",
  10697. "enum": ["api"]
  10698. },
  10699. "key": {
  10700. "type": "string"
  10701. },
  10702. "metadata": {
  10703. "type": "object",
  10704. "additionalProperties": {
  10705. "type": "string"
  10706. }
  10707. }
  10708. },
  10709. "required": ["type", "key"],
  10710. "additionalProperties": false
  10711. },
  10712. "WellKnownAuth": {
  10713. "type": "object",
  10714. "properties": {
  10715. "type": {
  10716. "type": "string",
  10717. "enum": ["wellknown"]
  10718. },
  10719. "key": {
  10720. "type": "string"
  10721. },
  10722. "token": {
  10723. "type": "string"
  10724. }
  10725. },
  10726. "required": ["type", "key", "token"],
  10727. "additionalProperties": false
  10728. },
  10729. "Auth": {
  10730. "anyOf": [
  10731. {
  10732. "$ref": "#/components/schemas/OAuth"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/ApiAuth"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/WellKnownAuth"
  10739. }
  10740. ]
  10741. },
  10742. "effect_HttpApiError_BadRequest": {
  10743. "type": "object",
  10744. "properties": {
  10745. "_tag": {
  10746. "type": "string",
  10747. "enum": ["BadRequest"]
  10748. }
  10749. },
  10750. "required": ["_tag"],
  10751. "additionalProperties": false
  10752. },
  10753. "InvalidRequestError": {
  10754. "type": "object",
  10755. "properties": {
  10756. "_tag": {
  10757. "type": "string",
  10758. "enum": ["InvalidRequestError"]
  10759. },
  10760. "message": {
  10761. "type": "string"
  10762. },
  10763. "kind": {
  10764. "type": "string"
  10765. },
  10766. "field": {
  10767. "type": "string"
  10768. }
  10769. },
  10770. "required": ["_tag", "message"],
  10771. "additionalProperties": false
  10772. },
  10773. "Event.tui.prompt.append": {
  10774. "type": "object",
  10775. "properties": {
  10776. "id": {
  10777. "type": "string"
  10778. },
  10779. "type": {
  10780. "type": "string",
  10781. "enum": ["tui.prompt.append"]
  10782. },
  10783. "properties": {
  10784. "type": "object",
  10785. "properties": {
  10786. "text": {
  10787. "type": "string"
  10788. }
  10789. },
  10790. "required": ["text"],
  10791. "additionalProperties": false
  10792. }
  10793. },
  10794. "required": ["id", "type", "properties"],
  10795. "additionalProperties": false
  10796. },
  10797. "Event.tui.command.execute": {
  10798. "type": "object",
  10799. "properties": {
  10800. "id": {
  10801. "type": "string"
  10802. },
  10803. "type": {
  10804. "type": "string",
  10805. "enum": ["tui.command.execute"]
  10806. },
  10807. "properties": {
  10808. "type": "object",
  10809. "properties": {
  10810. "command": {
  10811. "anyOf": [
  10812. {
  10813. "type": "string",
  10814. "enum": [
  10815. "session.list",
  10816. "session.new",
  10817. "session.share",
  10818. "session.interrupt",
  10819. "session.compact",
  10820. "session.page.up",
  10821. "session.page.down",
  10822. "session.line.up",
  10823. "session.line.down",
  10824. "session.half.page.up",
  10825. "session.half.page.down",
  10826. "session.first",
  10827. "session.last",
  10828. "prompt.clear",
  10829. "prompt.submit",
  10830. "agent.cycle"
  10831. ]
  10832. },
  10833. {
  10834. "type": "string"
  10835. }
  10836. ]
  10837. }
  10838. },
  10839. "required": ["command"],
  10840. "additionalProperties": false
  10841. }
  10842. },
  10843. "required": ["id", "type", "properties"],
  10844. "additionalProperties": false
  10845. },
  10846. "Event.tui.toast.show": {
  10847. "type": "object",
  10848. "properties": {
  10849. "id": {
  10850. "type": "string"
  10851. },
  10852. "type": {
  10853. "type": "string",
  10854. "enum": ["tui.toast.show"]
  10855. },
  10856. "properties": {
  10857. "type": "object",
  10858. "properties": {
  10859. "title": {
  10860. "type": "string"
  10861. },
  10862. "message": {
  10863. "type": "string"
  10864. },
  10865. "variant": {
  10866. "type": "string",
  10867. "enum": ["info", "success", "warning", "error"]
  10868. },
  10869. "duration": {
  10870. "type": "integer",
  10871. "exclusiveMinimum": 0
  10872. }
  10873. },
  10874. "required": ["message", "variant"],
  10875. "additionalProperties": false
  10876. }
  10877. },
  10878. "required": ["id", "type", "properties"],
  10879. "additionalProperties": false
  10880. },
  10881. "Event.tui.session.select": {
  10882. "type": "object",
  10883. "properties": {
  10884. "id": {
  10885. "type": "string"
  10886. },
  10887. "type": {
  10888. "type": "string",
  10889. "enum": ["tui.session.select"]
  10890. },
  10891. "properties": {
  10892. "type": "object",
  10893. "properties": {
  10894. "sessionID": {
  10895. "type": "string",
  10896. "pattern": "^ses",
  10897. "description": "Session ID to navigate to"
  10898. }
  10899. },
  10900. "required": ["sessionID"],
  10901. "additionalProperties": false
  10902. }
  10903. },
  10904. "required": ["id", "type", "properties"],
  10905. "additionalProperties": false
  10906. },
  10907. "PermissionRequest": {
  10908. "type": "object",
  10909. "properties": {
  10910. "id": {
  10911. "type": "string",
  10912. "pattern": "^per"
  10913. },
  10914. "sessionID": {
  10915. "type": "string",
  10916. "pattern": "^ses"
  10917. },
  10918. "permission": {
  10919. "type": "string"
  10920. },
  10921. "patterns": {
  10922. "type": "array",
  10923. "items": {
  10924. "type": "string"
  10925. }
  10926. },
  10927. "metadata": {
  10928. "type": "object"
  10929. },
  10930. "always": {
  10931. "type": "array",
  10932. "items": {
  10933. "type": "string"
  10934. }
  10935. },
  10936. "tool": {
  10937. "type": "object",
  10938. "properties": {
  10939. "messageID": {
  10940. "type": "string",
  10941. "pattern": "^msg"
  10942. },
  10943. "callID": {
  10944. "type": "string"
  10945. }
  10946. },
  10947. "required": ["messageID", "callID"],
  10948. "additionalProperties": false
  10949. }
  10950. },
  10951. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  10952. "additionalProperties": false
  10953. },
  10954. "SnapshotFileDiff": {
  10955. "type": "object",
  10956. "properties": {
  10957. "file": {
  10958. "type": "string"
  10959. },
  10960. "patch": {
  10961. "type": "string"
  10962. },
  10963. "additions": {
  10964. "type": "number"
  10965. },
  10966. "deletions": {
  10967. "type": "number"
  10968. },
  10969. "status": {
  10970. "type": "string",
  10971. "enum": ["added", "deleted", "modified"]
  10972. }
  10973. },
  10974. "required": ["additions", "deletions"],
  10975. "additionalProperties": false
  10976. },
  10977. "ProviderAuthError": {
  10978. "type": "object",
  10979. "properties": {
  10980. "name": {
  10981. "type": "string",
  10982. "enum": ["ProviderAuthError"]
  10983. },
  10984. "data": {
  10985. "type": "object",
  10986. "properties": {
  10987. "providerID": {
  10988. "type": "string"
  10989. },
  10990. "message": {
  10991. "type": "string"
  10992. }
  10993. },
  10994. "required": ["providerID", "message"],
  10995. "additionalProperties": false
  10996. }
  10997. },
  10998. "required": ["name", "data"],
  10999. "additionalProperties": false
  11000. },
  11001. "UnknownError": {
  11002. "type": "object",
  11003. "properties": {
  11004. "name": {
  11005. "type": "string",
  11006. "enum": ["UnknownError"]
  11007. },
  11008. "data": {
  11009. "type": "object",
  11010. "properties": {
  11011. "message": {
  11012. "type": "string"
  11013. }
  11014. },
  11015. "required": ["message"],
  11016. "additionalProperties": false
  11017. }
  11018. },
  11019. "required": ["name", "data"],
  11020. "additionalProperties": false
  11021. },
  11022. "MessageOutputLengthError": {
  11023. "type": "object",
  11024. "properties": {
  11025. "name": {
  11026. "type": "string",
  11027. "enum": ["MessageOutputLengthError"]
  11028. },
  11029. "data": {
  11030. "type": "object",
  11031. "properties": {}
  11032. }
  11033. },
  11034. "required": ["name", "data"],
  11035. "additionalProperties": false
  11036. },
  11037. "MessageAbortedError": {
  11038. "type": "object",
  11039. "properties": {
  11040. "name": {
  11041. "type": "string",
  11042. "enum": ["MessageAbortedError"]
  11043. },
  11044. "data": {
  11045. "type": "object",
  11046. "properties": {
  11047. "message": {
  11048. "type": "string"
  11049. }
  11050. },
  11051. "required": ["message"],
  11052. "additionalProperties": false
  11053. }
  11054. },
  11055. "required": ["name", "data"],
  11056. "additionalProperties": false
  11057. },
  11058. "StructuredOutputError": {
  11059. "type": "object",
  11060. "properties": {
  11061. "name": {
  11062. "type": "string",
  11063. "enum": ["StructuredOutputError"]
  11064. },
  11065. "data": {
  11066. "type": "object",
  11067. "properties": {
  11068. "message": {
  11069. "type": "string"
  11070. },
  11071. "retries": {
  11072. "type": "integer",
  11073. "minimum": 0
  11074. }
  11075. },
  11076. "required": ["message", "retries"],
  11077. "additionalProperties": false
  11078. }
  11079. },
  11080. "required": ["name", "data"],
  11081. "additionalProperties": false
  11082. },
  11083. "ContextOverflowError": {
  11084. "type": "object",
  11085. "properties": {
  11086. "name": {
  11087. "type": "string",
  11088. "enum": ["ContextOverflowError"]
  11089. },
  11090. "data": {
  11091. "type": "object",
  11092. "properties": {
  11093. "message": {
  11094. "type": "string"
  11095. },
  11096. "responseBody": {
  11097. "type": "string"
  11098. }
  11099. },
  11100. "required": ["message"],
  11101. "additionalProperties": false
  11102. }
  11103. },
  11104. "required": ["name", "data"],
  11105. "additionalProperties": false
  11106. },
  11107. "APIError": {
  11108. "type": "object",
  11109. "properties": {
  11110. "name": {
  11111. "type": "string",
  11112. "enum": ["APIError"]
  11113. },
  11114. "data": {
  11115. "type": "object",
  11116. "properties": {
  11117. "message": {
  11118. "type": "string"
  11119. },
  11120. "statusCode": {
  11121. "type": "integer",
  11122. "minimum": 0
  11123. },
  11124. "isRetryable": {
  11125. "type": "boolean"
  11126. },
  11127. "responseHeaders": {
  11128. "type": "object",
  11129. "additionalProperties": {
  11130. "type": "string"
  11131. }
  11132. },
  11133. "responseBody": {
  11134. "type": "string"
  11135. },
  11136. "metadata": {
  11137. "type": "object",
  11138. "additionalProperties": {
  11139. "type": "string"
  11140. }
  11141. }
  11142. },
  11143. "required": ["message", "isRetryable"],
  11144. "additionalProperties": false
  11145. }
  11146. },
  11147. "required": ["name", "data"],
  11148. "additionalProperties": false
  11149. },
  11150. "QuestionOption": {
  11151. "type": "object",
  11152. "properties": {
  11153. "label": {
  11154. "type": "string",
  11155. "description": "Display text (1-5 words, concise)"
  11156. },
  11157. "description": {
  11158. "type": "string",
  11159. "description": "Explanation of choice"
  11160. }
  11161. },
  11162. "required": ["label", "description"],
  11163. "additionalProperties": false
  11164. },
  11165. "QuestionInfo": {
  11166. "type": "object",
  11167. "properties": {
  11168. "question": {
  11169. "type": "string",
  11170. "description": "Complete question"
  11171. },
  11172. "header": {
  11173. "type": "string",
  11174. "description": "Very short label (max 30 chars)"
  11175. },
  11176. "options": {
  11177. "type": "array",
  11178. "items": {
  11179. "$ref": "#/components/schemas/QuestionOption"
  11180. },
  11181. "description": "Available choices"
  11182. },
  11183. "multiple": {
  11184. "type": "boolean"
  11185. },
  11186. "custom": {
  11187. "type": "boolean"
  11188. }
  11189. },
  11190. "required": ["question", "header", "options"],
  11191. "additionalProperties": false
  11192. },
  11193. "QuestionTool": {
  11194. "type": "object",
  11195. "properties": {
  11196. "messageID": {
  11197. "type": "string",
  11198. "pattern": "^msg"
  11199. },
  11200. "callID": {
  11201. "type": "string"
  11202. }
  11203. },
  11204. "required": ["messageID", "callID"],
  11205. "additionalProperties": false
  11206. },
  11207. "QuestionRequest": {
  11208. "type": "object",
  11209. "properties": {
  11210. "id": {
  11211. "type": "string",
  11212. "pattern": "^que"
  11213. },
  11214. "sessionID": {
  11215. "type": "string",
  11216. "pattern": "^ses"
  11217. },
  11218. "questions": {
  11219. "type": "array",
  11220. "items": {
  11221. "$ref": "#/components/schemas/QuestionInfo"
  11222. },
  11223. "description": "Questions to ask"
  11224. },
  11225. "tool": {
  11226. "$ref": "#/components/schemas/QuestionTool"
  11227. }
  11228. },
  11229. "required": ["id", "sessionID", "questions"],
  11230. "additionalProperties": false
  11231. },
  11232. "QuestionAnswer": {
  11233. "type": "array",
  11234. "items": {
  11235. "type": "string"
  11236. }
  11237. },
  11238. "QuestionReplied": {
  11239. "type": "object",
  11240. "properties": {
  11241. "sessionID": {
  11242. "type": "string",
  11243. "pattern": "^ses"
  11244. },
  11245. "requestID": {
  11246. "type": "string",
  11247. "pattern": "^que"
  11248. },
  11249. "answers": {
  11250. "type": "array",
  11251. "items": {
  11252. "$ref": "#/components/schemas/QuestionAnswer"
  11253. }
  11254. }
  11255. },
  11256. "required": ["sessionID", "requestID", "answers"],
  11257. "additionalProperties": false
  11258. },
  11259. "QuestionRejected": {
  11260. "type": "object",
  11261. "properties": {
  11262. "sessionID": {
  11263. "type": "string",
  11264. "pattern": "^ses"
  11265. },
  11266. "requestID": {
  11267. "type": "string",
  11268. "pattern": "^que"
  11269. }
  11270. },
  11271. "required": ["sessionID", "requestID"],
  11272. "additionalProperties": false
  11273. },
  11274. "Todo": {
  11275. "type": "object",
  11276. "properties": {
  11277. "content": {
  11278. "type": "string",
  11279. "description": "Brief description of the task"
  11280. },
  11281. "status": {
  11282. "type": "string",
  11283. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11284. },
  11285. "priority": {
  11286. "type": "string",
  11287. "description": "Priority level of the task: high, medium, low"
  11288. }
  11289. },
  11290. "required": ["content", "status", "priority"],
  11291. "additionalProperties": false
  11292. },
  11293. "SessionStatus": {
  11294. "anyOf": [
  11295. {
  11296. "type": "object",
  11297. "properties": {
  11298. "type": {
  11299. "type": "string",
  11300. "enum": ["idle"]
  11301. }
  11302. },
  11303. "required": ["type"],
  11304. "additionalProperties": false
  11305. },
  11306. {
  11307. "type": "object",
  11308. "properties": {
  11309. "type": {
  11310. "type": "string",
  11311. "enum": ["retry"]
  11312. },
  11313. "attempt": {
  11314. "type": "integer",
  11315. "minimum": 0
  11316. },
  11317. "message": {
  11318. "type": "string"
  11319. },
  11320. "action": {
  11321. "type": "object",
  11322. "properties": {
  11323. "reason": {
  11324. "type": "string"
  11325. },
  11326. "provider": {
  11327. "type": "string"
  11328. },
  11329. "title": {
  11330. "type": "string"
  11331. },
  11332. "message": {
  11333. "type": "string"
  11334. },
  11335. "label": {
  11336. "type": "string"
  11337. },
  11338. "link": {
  11339. "type": "string"
  11340. }
  11341. },
  11342. "required": ["reason", "provider", "title", "message", "label"],
  11343. "additionalProperties": false
  11344. },
  11345. "next": {
  11346. "type": "integer",
  11347. "minimum": 0
  11348. }
  11349. },
  11350. "required": ["type", "attempt", "message", "next"],
  11351. "additionalProperties": false
  11352. },
  11353. {
  11354. "type": "object",
  11355. "properties": {
  11356. "type": {
  11357. "type": "string",
  11358. "enum": ["busy"]
  11359. }
  11360. },
  11361. "required": ["type"],
  11362. "additionalProperties": false
  11363. }
  11364. ]
  11365. },
  11366. "Project": {
  11367. "type": "object",
  11368. "properties": {
  11369. "id": {
  11370. "type": "string"
  11371. },
  11372. "worktree": {
  11373. "type": "string"
  11374. },
  11375. "vcs": {
  11376. "type": "string",
  11377. "enum": ["git"]
  11378. },
  11379. "name": {
  11380. "type": "string"
  11381. },
  11382. "icon": {
  11383. "type": "object",
  11384. "properties": {
  11385. "url": {
  11386. "type": "string"
  11387. },
  11388. "override": {
  11389. "type": "string"
  11390. },
  11391. "color": {
  11392. "type": "string"
  11393. }
  11394. },
  11395. "additionalProperties": false
  11396. },
  11397. "commands": {
  11398. "type": "object",
  11399. "properties": {
  11400. "start": {
  11401. "type": "string",
  11402. "description": "Startup script to run when creating a new workspace (worktree)"
  11403. }
  11404. },
  11405. "additionalProperties": false
  11406. },
  11407. "time": {
  11408. "type": "object",
  11409. "properties": {
  11410. "created": {
  11411. "type": "integer",
  11412. "minimum": 0
  11413. },
  11414. "updated": {
  11415. "type": "integer",
  11416. "minimum": 0
  11417. },
  11418. "initialized": {
  11419. "type": "integer",
  11420. "minimum": 0
  11421. }
  11422. },
  11423. "required": ["created", "updated"],
  11424. "additionalProperties": false
  11425. },
  11426. "sandboxes": {
  11427. "type": "array",
  11428. "items": {
  11429. "type": "string"
  11430. }
  11431. }
  11432. },
  11433. "required": ["id", "worktree", "time", "sandboxes"],
  11434. "additionalProperties": false
  11435. },
  11436. "Pty": {
  11437. "type": "object",
  11438. "properties": {
  11439. "id": {
  11440. "type": "string",
  11441. "pattern": "^pty"
  11442. },
  11443. "title": {
  11444. "type": "string"
  11445. },
  11446. "command": {
  11447. "type": "string"
  11448. },
  11449. "args": {
  11450. "type": "array",
  11451. "items": {
  11452. "type": "string"
  11453. }
  11454. },
  11455. "cwd": {
  11456. "type": "string"
  11457. },
  11458. "status": {
  11459. "type": "string",
  11460. "enum": ["running", "exited"]
  11461. },
  11462. "pid": {
  11463. "type": "integer",
  11464. "exclusiveMinimum": 0
  11465. }
  11466. },
  11467. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11468. "additionalProperties": false
  11469. },
  11470. "OutputFormatText": {
  11471. "type": "object",
  11472. "properties": {
  11473. "type": {
  11474. "type": "string",
  11475. "enum": ["text"]
  11476. }
  11477. },
  11478. "required": ["type"],
  11479. "additionalProperties": false
  11480. },
  11481. "JSONSchema": {
  11482. "type": "object"
  11483. },
  11484. "OutputFormatJsonSchema": {
  11485. "type": "object",
  11486. "properties": {
  11487. "type": {
  11488. "type": "string",
  11489. "enum": ["json_schema"]
  11490. },
  11491. "schema": {
  11492. "$ref": "#/components/schemas/JSONSchema"
  11493. },
  11494. "retryCount": {
  11495. "type": "integer",
  11496. "minimum": 0
  11497. }
  11498. },
  11499. "required": ["type", "schema"],
  11500. "additionalProperties": false
  11501. },
  11502. "OutputFormat": {
  11503. "anyOf": [
  11504. {
  11505. "$ref": "#/components/schemas/OutputFormatText"
  11506. },
  11507. {
  11508. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11509. }
  11510. ]
  11511. },
  11512. "UserMessage": {
  11513. "type": "object",
  11514. "properties": {
  11515. "id": {
  11516. "type": "string",
  11517. "pattern": "^msg"
  11518. },
  11519. "sessionID": {
  11520. "type": "string",
  11521. "pattern": "^ses"
  11522. },
  11523. "role": {
  11524. "type": "string",
  11525. "enum": ["user"]
  11526. },
  11527. "time": {
  11528. "type": "object",
  11529. "properties": {
  11530. "created": {
  11531. "type": "integer",
  11532. "minimum": 0
  11533. }
  11534. },
  11535. "required": ["created"],
  11536. "additionalProperties": false
  11537. },
  11538. "format": {
  11539. "$ref": "#/components/schemas/OutputFormat"
  11540. },
  11541. "summary": {
  11542. "type": "object",
  11543. "properties": {
  11544. "title": {
  11545. "type": "string"
  11546. },
  11547. "body": {
  11548. "type": "string"
  11549. },
  11550. "diffs": {
  11551. "type": "array",
  11552. "items": {
  11553. "$ref": "#/components/schemas/SnapshotFileDiff"
  11554. }
  11555. }
  11556. },
  11557. "required": ["diffs"],
  11558. "additionalProperties": false
  11559. },
  11560. "agent": {
  11561. "type": "string"
  11562. },
  11563. "model": {
  11564. "type": "object",
  11565. "properties": {
  11566. "providerID": {
  11567. "type": "string"
  11568. },
  11569. "modelID": {
  11570. "type": "string"
  11571. },
  11572. "variant": {
  11573. "type": "string"
  11574. }
  11575. },
  11576. "required": ["providerID", "modelID"],
  11577. "additionalProperties": false
  11578. },
  11579. "system": {
  11580. "type": "string"
  11581. },
  11582. "tools": {
  11583. "type": "object",
  11584. "additionalProperties": {
  11585. "type": "boolean"
  11586. }
  11587. }
  11588. },
  11589. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11590. "additionalProperties": false
  11591. },
  11592. "AssistantMessage": {
  11593. "type": "object",
  11594. "properties": {
  11595. "id": {
  11596. "type": "string",
  11597. "pattern": "^msg"
  11598. },
  11599. "sessionID": {
  11600. "type": "string",
  11601. "pattern": "^ses"
  11602. },
  11603. "role": {
  11604. "type": "string",
  11605. "enum": ["assistant"]
  11606. },
  11607. "time": {
  11608. "type": "object",
  11609. "properties": {
  11610. "created": {
  11611. "type": "integer",
  11612. "minimum": 0
  11613. },
  11614. "completed": {
  11615. "type": "integer",
  11616. "minimum": 0
  11617. }
  11618. },
  11619. "required": ["created"],
  11620. "additionalProperties": false
  11621. },
  11622. "error": {
  11623. "anyOf": [
  11624. {
  11625. "$ref": "#/components/schemas/ProviderAuthError"
  11626. },
  11627. {
  11628. "$ref": "#/components/schemas/UnknownError"
  11629. },
  11630. {
  11631. "$ref": "#/components/schemas/MessageOutputLengthError"
  11632. },
  11633. {
  11634. "$ref": "#/components/schemas/MessageAbortedError"
  11635. },
  11636. {
  11637. "$ref": "#/components/schemas/StructuredOutputError"
  11638. },
  11639. {
  11640. "$ref": "#/components/schemas/ContextOverflowError"
  11641. },
  11642. {
  11643. "$ref": "#/components/schemas/APIError"
  11644. }
  11645. ]
  11646. },
  11647. "parentID": {
  11648. "type": "string",
  11649. "pattern": "^msg"
  11650. },
  11651. "modelID": {
  11652. "type": "string"
  11653. },
  11654. "providerID": {
  11655. "type": "string"
  11656. },
  11657. "mode": {
  11658. "type": "string"
  11659. },
  11660. "agent": {
  11661. "type": "string"
  11662. },
  11663. "path": {
  11664. "type": "object",
  11665. "properties": {
  11666. "cwd": {
  11667. "type": "string"
  11668. },
  11669. "root": {
  11670. "type": "string"
  11671. }
  11672. },
  11673. "required": ["cwd", "root"],
  11674. "additionalProperties": false
  11675. },
  11676. "summary": {
  11677. "type": "boolean"
  11678. },
  11679. "cost": {
  11680. "type": "number"
  11681. },
  11682. "tokens": {
  11683. "type": "object",
  11684. "properties": {
  11685. "total": {
  11686. "type": "number"
  11687. },
  11688. "input": {
  11689. "type": "number"
  11690. },
  11691. "output": {
  11692. "type": "number"
  11693. },
  11694. "reasoning": {
  11695. "type": "number"
  11696. },
  11697. "cache": {
  11698. "type": "object",
  11699. "properties": {
  11700. "read": {
  11701. "type": "number"
  11702. },
  11703. "write": {
  11704. "type": "number"
  11705. }
  11706. },
  11707. "required": ["read", "write"],
  11708. "additionalProperties": false
  11709. }
  11710. },
  11711. "required": ["input", "output", "reasoning", "cache"],
  11712. "additionalProperties": false
  11713. },
  11714. "structured": {},
  11715. "variant": {
  11716. "type": "string"
  11717. },
  11718. "finish": {
  11719. "type": "string"
  11720. }
  11721. },
  11722. "required": [
  11723. "id",
  11724. "sessionID",
  11725. "role",
  11726. "time",
  11727. "parentID",
  11728. "modelID",
  11729. "providerID",
  11730. "mode",
  11731. "agent",
  11732. "path",
  11733. "cost",
  11734. "tokens"
  11735. ],
  11736. "additionalProperties": false
  11737. },
  11738. "Message": {
  11739. "anyOf": [
  11740. {
  11741. "$ref": "#/components/schemas/UserMessage"
  11742. },
  11743. {
  11744. "$ref": "#/components/schemas/AssistantMessage"
  11745. }
  11746. ]
  11747. },
  11748. "TextPart": {
  11749. "type": "object",
  11750. "properties": {
  11751. "id": {
  11752. "type": "string",
  11753. "pattern": "^prt"
  11754. },
  11755. "sessionID": {
  11756. "type": "string",
  11757. "pattern": "^ses"
  11758. },
  11759. "messageID": {
  11760. "type": "string",
  11761. "pattern": "^msg"
  11762. },
  11763. "type": {
  11764. "type": "string",
  11765. "enum": ["text"]
  11766. },
  11767. "text": {
  11768. "type": "string"
  11769. },
  11770. "synthetic": {
  11771. "type": "boolean"
  11772. },
  11773. "ignored": {
  11774. "type": "boolean"
  11775. },
  11776. "time": {
  11777. "type": "object",
  11778. "properties": {
  11779. "start": {
  11780. "type": "integer",
  11781. "minimum": 0
  11782. },
  11783. "end": {
  11784. "type": "integer",
  11785. "minimum": 0
  11786. }
  11787. },
  11788. "required": ["start"],
  11789. "additionalProperties": false
  11790. },
  11791. "metadata": {
  11792. "type": "object"
  11793. }
  11794. },
  11795. "required": ["id", "sessionID", "messageID", "type", "text"],
  11796. "additionalProperties": false
  11797. },
  11798. "SubtaskPart": {
  11799. "type": "object",
  11800. "properties": {
  11801. "id": {
  11802. "type": "string",
  11803. "pattern": "^prt"
  11804. },
  11805. "sessionID": {
  11806. "type": "string",
  11807. "pattern": "^ses"
  11808. },
  11809. "messageID": {
  11810. "type": "string",
  11811. "pattern": "^msg"
  11812. },
  11813. "type": {
  11814. "type": "string",
  11815. "enum": ["subtask"]
  11816. },
  11817. "prompt": {
  11818. "type": "string"
  11819. },
  11820. "description": {
  11821. "type": "string"
  11822. },
  11823. "agent": {
  11824. "type": "string"
  11825. },
  11826. "model": {
  11827. "type": "object",
  11828. "properties": {
  11829. "providerID": {
  11830. "type": "string"
  11831. },
  11832. "modelID": {
  11833. "type": "string"
  11834. }
  11835. },
  11836. "required": ["providerID", "modelID"],
  11837. "additionalProperties": false
  11838. },
  11839. "command": {
  11840. "type": "string"
  11841. }
  11842. },
  11843. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11844. "additionalProperties": false
  11845. },
  11846. "ReasoningPart": {
  11847. "type": "object",
  11848. "properties": {
  11849. "id": {
  11850. "type": "string",
  11851. "pattern": "^prt"
  11852. },
  11853. "sessionID": {
  11854. "type": "string",
  11855. "pattern": "^ses"
  11856. },
  11857. "messageID": {
  11858. "type": "string",
  11859. "pattern": "^msg"
  11860. },
  11861. "type": {
  11862. "type": "string",
  11863. "enum": ["reasoning"]
  11864. },
  11865. "text": {
  11866. "type": "string"
  11867. },
  11868. "metadata": {
  11869. "type": "object"
  11870. },
  11871. "time": {
  11872. "type": "object",
  11873. "properties": {
  11874. "start": {
  11875. "type": "integer",
  11876. "minimum": 0
  11877. },
  11878. "end": {
  11879. "type": "integer",
  11880. "minimum": 0
  11881. }
  11882. },
  11883. "required": ["start"],
  11884. "additionalProperties": false
  11885. }
  11886. },
  11887. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11888. "additionalProperties": false
  11889. },
  11890. "FilePartSourceText": {
  11891. "type": "object",
  11892. "properties": {
  11893. "value": {
  11894. "type": "string"
  11895. },
  11896. "start": {
  11897. "type": "number"
  11898. },
  11899. "end": {
  11900. "type": "number"
  11901. }
  11902. },
  11903. "required": ["value", "start", "end"],
  11904. "additionalProperties": false
  11905. },
  11906. "FileSource": {
  11907. "type": "object",
  11908. "properties": {
  11909. "text": {
  11910. "$ref": "#/components/schemas/FilePartSourceText"
  11911. },
  11912. "type": {
  11913. "type": "string",
  11914. "enum": ["file"]
  11915. },
  11916. "path": {
  11917. "type": "string"
  11918. }
  11919. },
  11920. "required": ["text", "type", "path"],
  11921. "additionalProperties": false
  11922. },
  11923. "Range": {
  11924. "type": "object",
  11925. "properties": {
  11926. "start": {
  11927. "type": "object",
  11928. "properties": {
  11929. "line": {
  11930. "type": "integer",
  11931. "minimum": 0
  11932. },
  11933. "character": {
  11934. "type": "integer",
  11935. "minimum": 0
  11936. }
  11937. },
  11938. "required": ["line", "character"],
  11939. "additionalProperties": false
  11940. },
  11941. "end": {
  11942. "type": "object",
  11943. "properties": {
  11944. "line": {
  11945. "type": "integer",
  11946. "minimum": 0
  11947. },
  11948. "character": {
  11949. "type": "integer",
  11950. "minimum": 0
  11951. }
  11952. },
  11953. "required": ["line", "character"],
  11954. "additionalProperties": false
  11955. }
  11956. },
  11957. "required": ["start", "end"],
  11958. "additionalProperties": false
  11959. },
  11960. "SymbolSource": {
  11961. "type": "object",
  11962. "properties": {
  11963. "text": {
  11964. "$ref": "#/components/schemas/FilePartSourceText"
  11965. },
  11966. "type": {
  11967. "type": "string",
  11968. "enum": ["symbol"]
  11969. },
  11970. "path": {
  11971. "type": "string"
  11972. },
  11973. "range": {
  11974. "$ref": "#/components/schemas/Range"
  11975. },
  11976. "name": {
  11977. "type": "string"
  11978. },
  11979. "kind": {
  11980. "type": "integer",
  11981. "minimum": 0
  11982. }
  11983. },
  11984. "required": ["text", "type", "path", "range", "name", "kind"],
  11985. "additionalProperties": false
  11986. },
  11987. "ResourceSource": {
  11988. "type": "object",
  11989. "properties": {
  11990. "text": {
  11991. "$ref": "#/components/schemas/FilePartSourceText"
  11992. },
  11993. "type": {
  11994. "type": "string",
  11995. "enum": ["resource"]
  11996. },
  11997. "clientName": {
  11998. "type": "string"
  11999. },
  12000. "uri": {
  12001. "type": "string"
  12002. }
  12003. },
  12004. "required": ["text", "type", "clientName", "uri"],
  12005. "additionalProperties": false
  12006. },
  12007. "FilePartSource": {
  12008. "anyOf": [
  12009. {
  12010. "$ref": "#/components/schemas/FileSource"
  12011. },
  12012. {
  12013. "$ref": "#/components/schemas/SymbolSource"
  12014. },
  12015. {
  12016. "$ref": "#/components/schemas/ResourceSource"
  12017. }
  12018. ]
  12019. },
  12020. "FilePart": {
  12021. "type": "object",
  12022. "properties": {
  12023. "id": {
  12024. "type": "string",
  12025. "pattern": "^prt"
  12026. },
  12027. "sessionID": {
  12028. "type": "string",
  12029. "pattern": "^ses"
  12030. },
  12031. "messageID": {
  12032. "type": "string",
  12033. "pattern": "^msg"
  12034. },
  12035. "type": {
  12036. "type": "string",
  12037. "enum": ["file"]
  12038. },
  12039. "mime": {
  12040. "type": "string"
  12041. },
  12042. "filename": {
  12043. "type": "string"
  12044. },
  12045. "url": {
  12046. "type": "string"
  12047. },
  12048. "source": {
  12049. "$ref": "#/components/schemas/FilePartSource"
  12050. }
  12051. },
  12052. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12053. "additionalProperties": false
  12054. },
  12055. "ToolStatePending": {
  12056. "type": "object",
  12057. "properties": {
  12058. "status": {
  12059. "type": "string",
  12060. "enum": ["pending"]
  12061. },
  12062. "input": {
  12063. "type": "object"
  12064. },
  12065. "raw": {
  12066. "type": "string"
  12067. }
  12068. },
  12069. "required": ["status", "input", "raw"],
  12070. "additionalProperties": false
  12071. },
  12072. "ToolStateRunning": {
  12073. "type": "object",
  12074. "properties": {
  12075. "status": {
  12076. "type": "string",
  12077. "enum": ["running"]
  12078. },
  12079. "input": {
  12080. "type": "object"
  12081. },
  12082. "title": {
  12083. "type": "string"
  12084. },
  12085. "metadata": {
  12086. "type": "object"
  12087. },
  12088. "time": {
  12089. "type": "object",
  12090. "properties": {
  12091. "start": {
  12092. "type": "integer",
  12093. "minimum": 0
  12094. }
  12095. },
  12096. "required": ["start"],
  12097. "additionalProperties": false
  12098. }
  12099. },
  12100. "required": ["status", "input", "time"],
  12101. "additionalProperties": false
  12102. },
  12103. "ToolStateCompleted": {
  12104. "type": "object",
  12105. "properties": {
  12106. "status": {
  12107. "type": "string",
  12108. "enum": ["completed"]
  12109. },
  12110. "input": {
  12111. "type": "object"
  12112. },
  12113. "output": {
  12114. "type": "string"
  12115. },
  12116. "title": {
  12117. "type": "string"
  12118. },
  12119. "metadata": {
  12120. "type": "object"
  12121. },
  12122. "time": {
  12123. "type": "object",
  12124. "properties": {
  12125. "start": {
  12126. "type": "integer",
  12127. "minimum": 0
  12128. },
  12129. "end": {
  12130. "type": "integer",
  12131. "minimum": 0
  12132. },
  12133. "compacted": {
  12134. "type": "integer",
  12135. "minimum": 0
  12136. }
  12137. },
  12138. "required": ["start", "end"],
  12139. "additionalProperties": false
  12140. },
  12141. "attachments": {
  12142. "type": "array",
  12143. "items": {
  12144. "$ref": "#/components/schemas/FilePart"
  12145. }
  12146. }
  12147. },
  12148. "required": ["status", "input", "output", "title", "metadata", "time"],
  12149. "additionalProperties": false
  12150. },
  12151. "ToolStateError": {
  12152. "type": "object",
  12153. "properties": {
  12154. "status": {
  12155. "type": "string",
  12156. "enum": ["error"]
  12157. },
  12158. "input": {
  12159. "type": "object"
  12160. },
  12161. "error": {
  12162. "type": "string"
  12163. },
  12164. "metadata": {
  12165. "type": "object"
  12166. },
  12167. "time": {
  12168. "type": "object",
  12169. "properties": {
  12170. "start": {
  12171. "type": "integer",
  12172. "minimum": 0
  12173. },
  12174. "end": {
  12175. "type": "integer",
  12176. "minimum": 0
  12177. }
  12178. },
  12179. "required": ["start", "end"],
  12180. "additionalProperties": false
  12181. }
  12182. },
  12183. "required": ["status", "input", "error", "time"],
  12184. "additionalProperties": false
  12185. },
  12186. "ToolState": {
  12187. "anyOf": [
  12188. {
  12189. "$ref": "#/components/schemas/ToolStatePending"
  12190. },
  12191. {
  12192. "$ref": "#/components/schemas/ToolStateRunning"
  12193. },
  12194. {
  12195. "$ref": "#/components/schemas/ToolStateCompleted"
  12196. },
  12197. {
  12198. "$ref": "#/components/schemas/ToolStateError"
  12199. }
  12200. ]
  12201. },
  12202. "ToolPart": {
  12203. "type": "object",
  12204. "properties": {
  12205. "id": {
  12206. "type": "string",
  12207. "pattern": "^prt"
  12208. },
  12209. "sessionID": {
  12210. "type": "string",
  12211. "pattern": "^ses"
  12212. },
  12213. "messageID": {
  12214. "type": "string",
  12215. "pattern": "^msg"
  12216. },
  12217. "type": {
  12218. "type": "string",
  12219. "enum": ["tool"]
  12220. },
  12221. "callID": {
  12222. "type": "string"
  12223. },
  12224. "tool": {
  12225. "type": "string"
  12226. },
  12227. "state": {
  12228. "$ref": "#/components/schemas/ToolState"
  12229. },
  12230. "metadata": {
  12231. "type": "object"
  12232. }
  12233. },
  12234. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12235. "additionalProperties": false
  12236. },
  12237. "StepStartPart": {
  12238. "type": "object",
  12239. "properties": {
  12240. "id": {
  12241. "type": "string",
  12242. "pattern": "^prt"
  12243. },
  12244. "sessionID": {
  12245. "type": "string",
  12246. "pattern": "^ses"
  12247. },
  12248. "messageID": {
  12249. "type": "string",
  12250. "pattern": "^msg"
  12251. },
  12252. "type": {
  12253. "type": "string",
  12254. "enum": ["step-start"]
  12255. },
  12256. "snapshot": {
  12257. "type": "string"
  12258. }
  12259. },
  12260. "required": ["id", "sessionID", "messageID", "type"],
  12261. "additionalProperties": false
  12262. },
  12263. "StepFinishPart": {
  12264. "type": "object",
  12265. "properties": {
  12266. "id": {
  12267. "type": "string",
  12268. "pattern": "^prt"
  12269. },
  12270. "sessionID": {
  12271. "type": "string",
  12272. "pattern": "^ses"
  12273. },
  12274. "messageID": {
  12275. "type": "string",
  12276. "pattern": "^msg"
  12277. },
  12278. "type": {
  12279. "type": "string",
  12280. "enum": ["step-finish"]
  12281. },
  12282. "reason": {
  12283. "type": "string"
  12284. },
  12285. "snapshot": {
  12286. "type": "string"
  12287. },
  12288. "cost": {
  12289. "type": "number"
  12290. },
  12291. "tokens": {
  12292. "type": "object",
  12293. "properties": {
  12294. "total": {
  12295. "type": "number"
  12296. },
  12297. "input": {
  12298. "type": "number"
  12299. },
  12300. "output": {
  12301. "type": "number"
  12302. },
  12303. "reasoning": {
  12304. "type": "number"
  12305. },
  12306. "cache": {
  12307. "type": "object",
  12308. "properties": {
  12309. "read": {
  12310. "type": "number"
  12311. },
  12312. "write": {
  12313. "type": "number"
  12314. }
  12315. },
  12316. "required": ["read", "write"],
  12317. "additionalProperties": false
  12318. }
  12319. },
  12320. "required": ["input", "output", "reasoning", "cache"],
  12321. "additionalProperties": false
  12322. }
  12323. },
  12324. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12325. "additionalProperties": false
  12326. },
  12327. "SnapshotPart": {
  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": ["snapshot"]
  12345. },
  12346. "snapshot": {
  12347. "type": "string"
  12348. }
  12349. },
  12350. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12351. "additionalProperties": false
  12352. },
  12353. "PatchPart": {
  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": ["patch"]
  12371. },
  12372. "hash": {
  12373. "type": "string"
  12374. },
  12375. "files": {
  12376. "type": "array",
  12377. "items": {
  12378. "type": "string"
  12379. }
  12380. }
  12381. },
  12382. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12383. "additionalProperties": false
  12384. },
  12385. "AgentPart": {
  12386. "type": "object",
  12387. "properties": {
  12388. "id": {
  12389. "type": "string",
  12390. "pattern": "^prt"
  12391. },
  12392. "sessionID": {
  12393. "type": "string",
  12394. "pattern": "^ses"
  12395. },
  12396. "messageID": {
  12397. "type": "string",
  12398. "pattern": "^msg"
  12399. },
  12400. "type": {
  12401. "type": "string",
  12402. "enum": ["agent"]
  12403. },
  12404. "name": {
  12405. "type": "string"
  12406. },
  12407. "source": {
  12408. "type": "object",
  12409. "properties": {
  12410. "value": {
  12411. "type": "string"
  12412. },
  12413. "start": {
  12414. "type": "integer",
  12415. "minimum": 0
  12416. },
  12417. "end": {
  12418. "type": "integer",
  12419. "minimum": 0
  12420. }
  12421. },
  12422. "required": ["value", "start", "end"],
  12423. "additionalProperties": false
  12424. }
  12425. },
  12426. "required": ["id", "sessionID", "messageID", "type", "name"],
  12427. "additionalProperties": false
  12428. },
  12429. "RetryPart": {
  12430. "type": "object",
  12431. "properties": {
  12432. "id": {
  12433. "type": "string",
  12434. "pattern": "^prt"
  12435. },
  12436. "sessionID": {
  12437. "type": "string",
  12438. "pattern": "^ses"
  12439. },
  12440. "messageID": {
  12441. "type": "string",
  12442. "pattern": "^msg"
  12443. },
  12444. "type": {
  12445. "type": "string",
  12446. "enum": ["retry"]
  12447. },
  12448. "attempt": {
  12449. "type": "integer",
  12450. "minimum": 0
  12451. },
  12452. "error": {
  12453. "$ref": "#/components/schemas/APIError"
  12454. },
  12455. "time": {
  12456. "type": "object",
  12457. "properties": {
  12458. "created": {
  12459. "type": "integer",
  12460. "minimum": 0
  12461. }
  12462. },
  12463. "required": ["created"],
  12464. "additionalProperties": false
  12465. }
  12466. },
  12467. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12468. "additionalProperties": false
  12469. },
  12470. "CompactionPart": {
  12471. "type": "object",
  12472. "properties": {
  12473. "id": {
  12474. "type": "string",
  12475. "pattern": "^prt"
  12476. },
  12477. "sessionID": {
  12478. "type": "string",
  12479. "pattern": "^ses"
  12480. },
  12481. "messageID": {
  12482. "type": "string",
  12483. "pattern": "^msg"
  12484. },
  12485. "type": {
  12486. "type": "string",
  12487. "enum": ["compaction"]
  12488. },
  12489. "auto": {
  12490. "type": "boolean"
  12491. },
  12492. "overflow": {
  12493. "type": "boolean"
  12494. },
  12495. "tail_start_id": {
  12496. "type": "string",
  12497. "pattern": "^msg"
  12498. }
  12499. },
  12500. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12501. "additionalProperties": false
  12502. },
  12503. "Part": {
  12504. "anyOf": [
  12505. {
  12506. "$ref": "#/components/schemas/TextPart"
  12507. },
  12508. {
  12509. "$ref": "#/components/schemas/SubtaskPart"
  12510. },
  12511. {
  12512. "$ref": "#/components/schemas/ReasoningPart"
  12513. },
  12514. {
  12515. "$ref": "#/components/schemas/FilePart"
  12516. },
  12517. {
  12518. "$ref": "#/components/schemas/ToolPart"
  12519. },
  12520. {
  12521. "$ref": "#/components/schemas/StepStartPart"
  12522. },
  12523. {
  12524. "$ref": "#/components/schemas/StepFinishPart"
  12525. },
  12526. {
  12527. "$ref": "#/components/schemas/SnapshotPart"
  12528. },
  12529. {
  12530. "$ref": "#/components/schemas/PatchPart"
  12531. },
  12532. {
  12533. "$ref": "#/components/schemas/AgentPart"
  12534. },
  12535. {
  12536. "$ref": "#/components/schemas/RetryPart"
  12537. },
  12538. {
  12539. "$ref": "#/components/schemas/CompactionPart"
  12540. }
  12541. ]
  12542. },
  12543. "PermissionAction": {
  12544. "type": "string",
  12545. "enum": ["allow", "deny", "ask"]
  12546. },
  12547. "PermissionRule": {
  12548. "type": "object",
  12549. "properties": {
  12550. "permission": {
  12551. "type": "string"
  12552. },
  12553. "pattern": {
  12554. "type": "string"
  12555. },
  12556. "action": {
  12557. "$ref": "#/components/schemas/PermissionAction"
  12558. }
  12559. },
  12560. "required": ["permission", "pattern", "action"],
  12561. "additionalProperties": false
  12562. },
  12563. "PermissionRuleset": {
  12564. "type": "array",
  12565. "items": {
  12566. "$ref": "#/components/schemas/PermissionRule"
  12567. }
  12568. },
  12569. "Session": {
  12570. "type": "object",
  12571. "properties": {
  12572. "id": {
  12573. "type": "string",
  12574. "pattern": "^ses"
  12575. },
  12576. "slug": {
  12577. "type": "string"
  12578. },
  12579. "projectID": {
  12580. "type": "string"
  12581. },
  12582. "workspaceID": {
  12583. "type": "string",
  12584. "pattern": "^wrk"
  12585. },
  12586. "directory": {
  12587. "type": "string"
  12588. },
  12589. "path": {
  12590. "type": "string"
  12591. },
  12592. "parentID": {
  12593. "type": "string",
  12594. "pattern": "^ses"
  12595. },
  12596. "summary": {
  12597. "type": "object",
  12598. "properties": {
  12599. "additions": {
  12600. "type": "number"
  12601. },
  12602. "deletions": {
  12603. "type": "number"
  12604. },
  12605. "files": {
  12606. "type": "number"
  12607. },
  12608. "diffs": {
  12609. "type": "array",
  12610. "items": {
  12611. "$ref": "#/components/schemas/SnapshotFileDiff"
  12612. }
  12613. }
  12614. },
  12615. "required": ["additions", "deletions", "files"],
  12616. "additionalProperties": false
  12617. },
  12618. "cost": {
  12619. "type": "number"
  12620. },
  12621. "tokens": {
  12622. "type": "object",
  12623. "properties": {
  12624. "input": {
  12625. "type": "number"
  12626. },
  12627. "output": {
  12628. "type": "number"
  12629. },
  12630. "reasoning": {
  12631. "type": "number"
  12632. },
  12633. "cache": {
  12634. "type": "object",
  12635. "properties": {
  12636. "read": {
  12637. "type": "number"
  12638. },
  12639. "write": {
  12640. "type": "number"
  12641. }
  12642. },
  12643. "required": ["read", "write"],
  12644. "additionalProperties": false
  12645. }
  12646. },
  12647. "required": ["input", "output", "reasoning", "cache"],
  12648. "additionalProperties": false
  12649. },
  12650. "share": {
  12651. "type": "object",
  12652. "properties": {
  12653. "url": {
  12654. "type": "string"
  12655. }
  12656. },
  12657. "required": ["url"],
  12658. "additionalProperties": false
  12659. },
  12660. "title": {
  12661. "type": "string"
  12662. },
  12663. "agent": {
  12664. "type": "string"
  12665. },
  12666. "model": {
  12667. "type": "object",
  12668. "properties": {
  12669. "id": {
  12670. "type": "string"
  12671. },
  12672. "providerID": {
  12673. "type": "string"
  12674. },
  12675. "variant": {
  12676. "type": "string"
  12677. }
  12678. },
  12679. "required": ["id", "providerID"],
  12680. "additionalProperties": false
  12681. },
  12682. "version": {
  12683. "type": "string"
  12684. },
  12685. "time": {
  12686. "type": "object",
  12687. "properties": {
  12688. "created": {
  12689. "type": "integer",
  12690. "minimum": 0
  12691. },
  12692. "updated": {
  12693. "type": "integer",
  12694. "minimum": 0
  12695. },
  12696. "compacting": {
  12697. "type": "integer",
  12698. "minimum": 0
  12699. },
  12700. "archived": {
  12701. "type": "number"
  12702. }
  12703. },
  12704. "required": ["created", "updated"],
  12705. "additionalProperties": false
  12706. },
  12707. "permission": {
  12708. "$ref": "#/components/schemas/PermissionRuleset"
  12709. },
  12710. "revert": {
  12711. "type": "object",
  12712. "properties": {
  12713. "messageID": {
  12714. "type": "string",
  12715. "pattern": "^msg"
  12716. },
  12717. "partID": {
  12718. "type": "string",
  12719. "pattern": "^prt"
  12720. },
  12721. "snapshot": {
  12722. "type": "string"
  12723. },
  12724. "diff": {
  12725. "type": "string"
  12726. }
  12727. },
  12728. "required": ["messageID"],
  12729. "additionalProperties": false
  12730. }
  12731. },
  12732. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12733. "additionalProperties": false
  12734. },
  12735. "Prompt": {
  12736. "type": "object",
  12737. "properties": {
  12738. "text": {
  12739. "type": "string"
  12740. },
  12741. "files": {
  12742. "type": "array",
  12743. "items": {
  12744. "$ref": "#/components/schemas/PromptFileAttachment"
  12745. }
  12746. },
  12747. "agents": {
  12748. "type": "array",
  12749. "items": {
  12750. "$ref": "#/components/schemas/PromptAgentAttachment"
  12751. }
  12752. },
  12753. "references": {
  12754. "type": "array",
  12755. "items": {
  12756. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12757. }
  12758. }
  12759. },
  12760. "required": ["text"],
  12761. "additionalProperties": false
  12762. },
  12763. "GlobalEvent": {
  12764. "type": "object",
  12765. "properties": {
  12766. "directory": {
  12767. "type": "string"
  12768. },
  12769. "project": {
  12770. "type": "string"
  12771. },
  12772. "workspace": {
  12773. "type": "string"
  12774. },
  12775. "payload": {
  12776. "anyOf": [
  12777. {
  12778. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12779. },
  12780. {
  12781. "$ref": "#/components/schemas/Event.tui.command.execute"
  12782. },
  12783. {
  12784. "$ref": "#/components/schemas/Event.tui.toast.show"
  12785. },
  12786. {
  12787. "$ref": "#/components/schemas/Event.tui.session.select"
  12788. },
  12789. {
  12790. "$ref": "#/components/schemas/EventServerConnected"
  12791. },
  12792. {
  12793. "$ref": "#/components/schemas/EventGlobalDisposed"
  12794. },
  12795. {
  12796. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12797. },
  12798. {
  12799. "$ref": "#/components/schemas/EventFileEdited"
  12800. },
  12801. {
  12802. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12803. },
  12804. {
  12805. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12806. },
  12807. {
  12808. "$ref": "#/components/schemas/EventLspUpdated"
  12809. },
  12810. {
  12811. "$ref": "#/components/schemas/EventMessagePartDelta"
  12812. },
  12813. {
  12814. "$ref": "#/components/schemas/EventPermissionAsked"
  12815. },
  12816. {
  12817. "$ref": "#/components/schemas/EventPermissionReplied"
  12818. },
  12819. {
  12820. "$ref": "#/components/schemas/EventSessionDiff"
  12821. },
  12822. {
  12823. "$ref": "#/components/schemas/EventSessionError"
  12824. },
  12825. {
  12826. "$ref": "#/components/schemas/EventQuestionAsked"
  12827. },
  12828. {
  12829. "$ref": "#/components/schemas/EventQuestionReplied"
  12830. },
  12831. {
  12832. "$ref": "#/components/schemas/EventQuestionRejected"
  12833. },
  12834. {
  12835. "$ref": "#/components/schemas/EventTodoUpdated"
  12836. },
  12837. {
  12838. "$ref": "#/components/schemas/EventSessionStatus"
  12839. },
  12840. {
  12841. "$ref": "#/components/schemas/EventSessionIdle"
  12842. },
  12843. {
  12844. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12845. },
  12846. {
  12847. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12848. },
  12849. {
  12850. "$ref": "#/components/schemas/EventCommandExecuted"
  12851. },
  12852. {
  12853. "$ref": "#/components/schemas/EventProjectUpdated"
  12854. },
  12855. {
  12856. "$ref": "#/components/schemas/EventSessionCompacted"
  12857. },
  12858. {
  12859. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12860. },
  12861. {
  12862. "$ref": "#/components/schemas/EventWorkspaceReady"
  12863. },
  12864. {
  12865. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12866. },
  12867. {
  12868. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12869. },
  12870. {
  12871. "$ref": "#/components/schemas/EventWorktreeReady"
  12872. },
  12873. {
  12874. "$ref": "#/components/schemas/EventWorktreeFailed"
  12875. },
  12876. {
  12877. "$ref": "#/components/schemas/EventPtyCreated"
  12878. },
  12879. {
  12880. "$ref": "#/components/schemas/EventPtyUpdated"
  12881. },
  12882. {
  12883. "$ref": "#/components/schemas/EventPtyExited"
  12884. },
  12885. {
  12886. "$ref": "#/components/schemas/EventPtyDeleted"
  12887. },
  12888. {
  12889. "$ref": "#/components/schemas/EventInstallationUpdated"
  12890. },
  12891. {
  12892. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12893. },
  12894. {
  12895. "$ref": "#/components/schemas/EventMessageUpdated"
  12896. },
  12897. {
  12898. "$ref": "#/components/schemas/EventMessageRemoved"
  12899. },
  12900. {
  12901. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12902. },
  12903. {
  12904. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12905. },
  12906. {
  12907. "$ref": "#/components/schemas/EventSessionCreated"
  12908. },
  12909. {
  12910. "$ref": "#/components/schemas/EventSessionUpdated"
  12911. },
  12912. {
  12913. "$ref": "#/components/schemas/EventSessionDeleted"
  12914. },
  12915. {
  12916. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12917. },
  12918. {
  12919. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12920. },
  12921. {
  12922. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12923. },
  12924. {
  12925. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12926. },
  12927. {
  12928. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12929. },
  12930. {
  12931. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12932. },
  12933. {
  12934. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12935. },
  12936. {
  12937. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12938. },
  12939. {
  12940. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12941. },
  12942. {
  12943. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12944. },
  12945. {
  12946. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12947. },
  12948. {
  12949. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12950. },
  12951. {
  12952. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12953. },
  12954. {
  12955. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12956. },
  12957. {
  12958. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12959. },
  12960. {
  12961. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12962. },
  12963. {
  12964. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12965. },
  12966. {
  12967. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12968. },
  12969. {
  12970. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12971. },
  12972. {
  12973. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12974. },
  12975. {
  12976. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12977. },
  12978. {
  12979. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12980. },
  12981. {
  12982. "$ref": "#/components/schemas/EventSessionNextRetried"
  12983. },
  12984. {
  12985. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12986. },
  12987. {
  12988. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12989. },
  12990. {
  12991. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12992. },
  12993. {
  12994. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12995. },
  12996. {
  12997. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12998. },
  12999. {
  13000. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13001. },
  13002. {
  13003. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13004. },
  13005. {
  13006. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13007. },
  13008. {
  13009. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13010. },
  13011. {
  13012. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13013. },
  13014. {
  13015. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13016. },
  13017. {
  13018. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13019. },
  13020. {
  13021. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13022. },
  13023. {
  13024. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13025. },
  13026. {
  13027. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13028. },
  13029. {
  13030. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13031. },
  13032. {
  13033. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13034. },
  13035. {
  13036. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13037. },
  13038. {
  13039. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13040. },
  13041. {
  13042. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13043. },
  13044. {
  13045. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13046. },
  13047. {
  13048. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13049. },
  13050. {
  13051. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13052. },
  13053. {
  13054. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13055. },
  13056. {
  13057. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13058. },
  13059. {
  13060. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13061. },
  13062. {
  13063. "$ref": "#/components/schemas/EventSessionNextRetried"
  13064. },
  13065. {
  13066. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13067. },
  13068. {
  13069. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13070. },
  13071. {
  13072. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13073. },
  13074. {
  13075. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13076. },
  13077. {
  13078. "$ref": "#/components/schemas/EventAccountAdded"
  13079. },
  13080. {
  13081. "$ref": "#/components/schemas/EventAccountRemoved"
  13082. },
  13083. {
  13084. "$ref": "#/components/schemas/EventAccountSwitched"
  13085. },
  13086. {
  13087. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13088. },
  13089. {
  13090. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13091. },
  13092. {
  13093. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13094. },
  13095. {
  13096. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13097. },
  13098. {
  13099. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13100. },
  13101. {
  13102. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13103. },
  13104. {
  13105. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13106. },
  13107. {
  13108. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13109. },
  13110. {
  13111. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13112. },
  13113. {
  13114. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13115. },
  13116. {
  13117. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13118. },
  13119. {
  13120. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13121. },
  13122. {
  13123. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13124. },
  13125. {
  13126. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13127. },
  13128. {
  13129. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13130. },
  13131. {
  13132. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13133. },
  13134. {
  13135. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13136. },
  13137. {
  13138. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13139. },
  13140. {
  13141. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13142. },
  13143. {
  13144. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13145. },
  13146. {
  13147. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13148. },
  13149. {
  13150. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13151. },
  13152. {
  13153. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13154. },
  13155. {
  13156. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13157. },
  13158. {
  13159. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13160. },
  13161. {
  13162. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13163. },
  13164. {
  13165. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13166. },
  13167. {
  13168. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13169. },
  13170. {
  13171. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13172. },
  13173. {
  13174. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13175. },
  13176. {
  13177. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13178. },
  13179. {
  13180. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13181. },
  13182. {
  13183. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13184. }
  13185. ]
  13186. }
  13187. },
  13188. "required": ["directory", "payload"],
  13189. "additionalProperties": false
  13190. },
  13191. "LogLevel": {
  13192. "type": "string",
  13193. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13194. "description": "Log level"
  13195. },
  13196. "ServerConfig": {
  13197. "type": "object",
  13198. "properties": {
  13199. "port": {
  13200. "type": "integer",
  13201. "exclusiveMinimum": 0
  13202. },
  13203. "hostname": {
  13204. "type": "string"
  13205. },
  13206. "mdns": {
  13207. "type": "boolean"
  13208. },
  13209. "mdnsDomain": {
  13210. "type": "string"
  13211. },
  13212. "cors": {
  13213. "type": "array",
  13214. "items": {
  13215. "type": "string"
  13216. }
  13217. }
  13218. },
  13219. "additionalProperties": false,
  13220. "description": "Server configuration for opencode serve and web commands"
  13221. },
  13222. "ReferenceConfigEntry": {
  13223. "anyOf": [
  13224. {
  13225. "type": "string"
  13226. },
  13227. {
  13228. "type": "object",
  13229. "properties": {
  13230. "repository": {
  13231. "type": "string",
  13232. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13233. },
  13234. "branch": {
  13235. "type": "string"
  13236. }
  13237. },
  13238. "required": ["repository"],
  13239. "additionalProperties": false
  13240. },
  13241. {
  13242. "type": "object",
  13243. "properties": {
  13244. "path": {
  13245. "type": "string",
  13246. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13247. }
  13248. },
  13249. "required": ["path"],
  13250. "additionalProperties": false
  13251. }
  13252. ]
  13253. },
  13254. "ReferenceConfig": {
  13255. "type": "object",
  13256. "additionalProperties": {
  13257. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13258. }
  13259. },
  13260. "PermissionActionConfig": {
  13261. "type": "string",
  13262. "enum": ["ask", "allow", "deny"]
  13263. },
  13264. "PermissionObjectConfig": {
  13265. "type": "object",
  13266. "additionalProperties": {
  13267. "$ref": "#/components/schemas/PermissionActionConfig"
  13268. }
  13269. },
  13270. "PermissionRuleConfig": {
  13271. "anyOf": [
  13272. {
  13273. "$ref": "#/components/schemas/PermissionActionConfig"
  13274. },
  13275. {
  13276. "$ref": "#/components/schemas/PermissionObjectConfig"
  13277. }
  13278. ]
  13279. },
  13280. "PermissionConfig": {
  13281. "anyOf": [
  13282. {
  13283. "$ref": "#/components/schemas/PermissionActionConfig"
  13284. },
  13285. {
  13286. "type": "object",
  13287. "properties": {
  13288. "read": {
  13289. "$ref": "#/components/schemas/PermissionRuleConfig"
  13290. },
  13291. "edit": {
  13292. "$ref": "#/components/schemas/PermissionRuleConfig"
  13293. },
  13294. "glob": {
  13295. "$ref": "#/components/schemas/PermissionRuleConfig"
  13296. },
  13297. "grep": {
  13298. "$ref": "#/components/schemas/PermissionRuleConfig"
  13299. },
  13300. "list": {
  13301. "$ref": "#/components/schemas/PermissionRuleConfig"
  13302. },
  13303. "bash": {
  13304. "$ref": "#/components/schemas/PermissionRuleConfig"
  13305. },
  13306. "task": {
  13307. "$ref": "#/components/schemas/PermissionRuleConfig"
  13308. },
  13309. "external_directory": {
  13310. "$ref": "#/components/schemas/PermissionRuleConfig"
  13311. },
  13312. "todowrite": {
  13313. "$ref": "#/components/schemas/PermissionActionConfig"
  13314. },
  13315. "question": {
  13316. "$ref": "#/components/schemas/PermissionActionConfig"
  13317. },
  13318. "webfetch": {
  13319. "$ref": "#/components/schemas/PermissionActionConfig"
  13320. },
  13321. "websearch": {
  13322. "$ref": "#/components/schemas/PermissionActionConfig"
  13323. },
  13324. "repo_clone": {
  13325. "$ref": "#/components/schemas/PermissionRuleConfig"
  13326. },
  13327. "repo_overview": {
  13328. "$ref": "#/components/schemas/PermissionRuleConfig"
  13329. },
  13330. "lsp": {
  13331. "$ref": "#/components/schemas/PermissionRuleConfig"
  13332. },
  13333. "doom_loop": {
  13334. "$ref": "#/components/schemas/PermissionActionConfig"
  13335. },
  13336. "skill": {
  13337. "$ref": "#/components/schemas/PermissionRuleConfig"
  13338. }
  13339. },
  13340. "additionalProperties": {
  13341. "$ref": "#/components/schemas/PermissionRuleConfig"
  13342. }
  13343. }
  13344. ]
  13345. },
  13346. "AgentConfig": {
  13347. "type": "object",
  13348. "properties": {
  13349. "model": {
  13350. "type": "string"
  13351. },
  13352. "variant": {
  13353. "type": "string"
  13354. },
  13355. "temperature": {
  13356. "type": "number"
  13357. },
  13358. "top_p": {
  13359. "type": "number"
  13360. },
  13361. "prompt": {
  13362. "type": "string"
  13363. },
  13364. "tools": {
  13365. "type": "object",
  13366. "additionalProperties": {
  13367. "type": "boolean"
  13368. }
  13369. },
  13370. "disable": {
  13371. "type": "boolean"
  13372. },
  13373. "description": {
  13374. "type": "string"
  13375. },
  13376. "mode": {
  13377. "type": "string",
  13378. "enum": ["subagent", "primary", "all"]
  13379. },
  13380. "hidden": {
  13381. "type": "boolean"
  13382. },
  13383. "options": {
  13384. "type": "object"
  13385. },
  13386. "color": {
  13387. "anyOf": [
  13388. {
  13389. "type": "string",
  13390. "pattern": "^#[0-9a-fA-F]{6}$"
  13391. },
  13392. {
  13393. "type": "string",
  13394. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13395. }
  13396. ],
  13397. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13398. },
  13399. "steps": {
  13400. "type": "integer",
  13401. "exclusiveMinimum": 0
  13402. },
  13403. "maxSteps": {
  13404. "type": "integer",
  13405. "exclusiveMinimum": 0
  13406. },
  13407. "permission": {
  13408. "$ref": "#/components/schemas/PermissionConfig"
  13409. }
  13410. },
  13411. "additionalProperties": {}
  13412. },
  13413. "ProviderConfig": {
  13414. "type": "object",
  13415. "properties": {
  13416. "api": {
  13417. "type": "string"
  13418. },
  13419. "name": {
  13420. "type": "string"
  13421. },
  13422. "env": {
  13423. "type": "array",
  13424. "items": {
  13425. "type": "string"
  13426. }
  13427. },
  13428. "id": {
  13429. "type": "string"
  13430. },
  13431. "npm": {
  13432. "type": "string"
  13433. },
  13434. "whitelist": {
  13435. "type": "array",
  13436. "items": {
  13437. "type": "string"
  13438. }
  13439. },
  13440. "blacklist": {
  13441. "type": "array",
  13442. "items": {
  13443. "type": "string"
  13444. }
  13445. },
  13446. "options": {
  13447. "type": "object",
  13448. "properties": {
  13449. "apiKey": {
  13450. "type": "string"
  13451. },
  13452. "baseURL": {
  13453. "type": "string"
  13454. },
  13455. "enterpriseUrl": {
  13456. "type": "string"
  13457. },
  13458. "setCacheKey": {
  13459. "type": "boolean"
  13460. },
  13461. "timeout": {
  13462. "anyOf": [
  13463. {
  13464. "type": "integer",
  13465. "exclusiveMinimum": 0
  13466. },
  13467. {
  13468. "type": "boolean",
  13469. "enum": [false]
  13470. }
  13471. ],
  13472. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13473. },
  13474. "chunkTimeout": {
  13475. "type": "integer",
  13476. "exclusiveMinimum": 0
  13477. }
  13478. },
  13479. "additionalProperties": {}
  13480. },
  13481. "models": {
  13482. "type": "object",
  13483. "additionalProperties": {
  13484. "type": "object",
  13485. "properties": {
  13486. "id": {
  13487. "type": "string"
  13488. },
  13489. "name": {
  13490. "type": "string"
  13491. },
  13492. "family": {
  13493. "type": "string"
  13494. },
  13495. "release_date": {
  13496. "type": "string"
  13497. },
  13498. "attachment": {
  13499. "type": "boolean"
  13500. },
  13501. "reasoning": {
  13502. "type": "boolean"
  13503. },
  13504. "temperature": {
  13505. "type": "boolean"
  13506. },
  13507. "tool_call": {
  13508. "type": "boolean"
  13509. },
  13510. "interleaved": {
  13511. "anyOf": [
  13512. {
  13513. "type": "boolean",
  13514. "enum": [true]
  13515. },
  13516. {
  13517. "type": "object",
  13518. "properties": {
  13519. "field": {
  13520. "type": "string",
  13521. "enum": ["reasoning_content", "reasoning_details"]
  13522. }
  13523. },
  13524. "required": ["field"],
  13525. "additionalProperties": false
  13526. }
  13527. ]
  13528. },
  13529. "cost": {
  13530. "type": "object",
  13531. "properties": {
  13532. "input": {
  13533. "type": "number"
  13534. },
  13535. "output": {
  13536. "type": "number"
  13537. },
  13538. "cache_read": {
  13539. "type": "number"
  13540. },
  13541. "cache_write": {
  13542. "type": "number"
  13543. },
  13544. "context_over_200k": {
  13545. "type": "object",
  13546. "properties": {
  13547. "input": {
  13548. "type": "number"
  13549. },
  13550. "output": {
  13551. "type": "number"
  13552. },
  13553. "cache_read": {
  13554. "type": "number"
  13555. },
  13556. "cache_write": {
  13557. "type": "number"
  13558. }
  13559. },
  13560. "required": ["input", "output"],
  13561. "additionalProperties": false
  13562. }
  13563. },
  13564. "required": ["input", "output"],
  13565. "additionalProperties": false
  13566. },
  13567. "limit": {
  13568. "type": "object",
  13569. "properties": {
  13570. "context": {
  13571. "type": "number"
  13572. },
  13573. "input": {
  13574. "type": "number"
  13575. },
  13576. "output": {
  13577. "type": "number"
  13578. }
  13579. },
  13580. "required": ["context", "output"],
  13581. "additionalProperties": false
  13582. },
  13583. "modalities": {
  13584. "type": "object",
  13585. "properties": {
  13586. "input": {
  13587. "type": "array",
  13588. "items": {
  13589. "type": "string",
  13590. "enum": ["text", "audio", "image", "video", "pdf"]
  13591. }
  13592. },
  13593. "output": {
  13594. "type": "array",
  13595. "items": {
  13596. "type": "string",
  13597. "enum": ["text", "audio", "image", "video", "pdf"]
  13598. }
  13599. }
  13600. },
  13601. "required": ["input", "output"],
  13602. "additionalProperties": false
  13603. },
  13604. "experimental": {
  13605. "type": "boolean"
  13606. },
  13607. "status": {
  13608. "type": "string",
  13609. "enum": ["alpha", "beta", "deprecated", "active"]
  13610. },
  13611. "provider": {
  13612. "type": "object",
  13613. "properties": {
  13614. "npm": {
  13615. "type": "string"
  13616. },
  13617. "api": {
  13618. "type": "string"
  13619. }
  13620. },
  13621. "additionalProperties": false
  13622. },
  13623. "options": {
  13624. "type": "object"
  13625. },
  13626. "headers": {
  13627. "type": "object",
  13628. "additionalProperties": {
  13629. "type": "string"
  13630. }
  13631. },
  13632. "variants": {
  13633. "type": "object",
  13634. "additionalProperties": {
  13635. "type": "object",
  13636. "properties": {
  13637. "disabled": {
  13638. "type": "boolean"
  13639. }
  13640. },
  13641. "additionalProperties": {}
  13642. },
  13643. "description": "Variant-specific configuration"
  13644. }
  13645. },
  13646. "additionalProperties": false
  13647. }
  13648. }
  13649. },
  13650. "additionalProperties": false
  13651. },
  13652. "McpLocalConfig": {
  13653. "type": "object",
  13654. "properties": {
  13655. "type": {
  13656. "type": "string",
  13657. "enum": ["local"],
  13658. "description": "Type of MCP server connection"
  13659. },
  13660. "command": {
  13661. "type": "array",
  13662. "items": {
  13663. "type": "string"
  13664. },
  13665. "description": "Command and arguments to run the MCP server"
  13666. },
  13667. "environment": {
  13668. "type": "object",
  13669. "additionalProperties": {
  13670. "type": "string"
  13671. }
  13672. },
  13673. "enabled": {
  13674. "type": "boolean"
  13675. },
  13676. "timeout": {
  13677. "type": "integer",
  13678. "exclusiveMinimum": 0
  13679. }
  13680. },
  13681. "required": ["type", "command"],
  13682. "additionalProperties": false
  13683. },
  13684. "McpOAuthConfig": {
  13685. "type": "object",
  13686. "properties": {
  13687. "clientId": {
  13688. "type": "string"
  13689. },
  13690. "clientSecret": {
  13691. "type": "string"
  13692. },
  13693. "scope": {
  13694. "type": "string"
  13695. },
  13696. "redirectUri": {
  13697. "type": "string"
  13698. }
  13699. },
  13700. "additionalProperties": false
  13701. },
  13702. "McpRemoteConfig": {
  13703. "type": "object",
  13704. "properties": {
  13705. "type": {
  13706. "type": "string",
  13707. "enum": ["remote"],
  13708. "description": "Type of MCP server connection"
  13709. },
  13710. "url": {
  13711. "type": "string",
  13712. "description": "URL of the remote MCP server"
  13713. },
  13714. "enabled": {
  13715. "type": "boolean"
  13716. },
  13717. "headers": {
  13718. "type": "object",
  13719. "additionalProperties": {
  13720. "type": "string"
  13721. }
  13722. },
  13723. "oauth": {
  13724. "anyOf": [
  13725. {
  13726. "$ref": "#/components/schemas/McpOAuthConfig"
  13727. },
  13728. {
  13729. "type": "boolean",
  13730. "enum": [false]
  13731. }
  13732. ],
  13733. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13734. },
  13735. "timeout": {
  13736. "type": "integer",
  13737. "exclusiveMinimum": 0
  13738. }
  13739. },
  13740. "required": ["type", "url"],
  13741. "additionalProperties": false
  13742. },
  13743. "LayoutConfig": {
  13744. "type": "string",
  13745. "enum": ["auto", "stretch"],
  13746. "description": "@deprecated Always uses stretch layout."
  13747. },
  13748. "ImageAttachmentConfig": {
  13749. "type": "object",
  13750. "properties": {
  13751. "auto_resize": {
  13752. "type": "boolean"
  13753. },
  13754. "max_width": {
  13755. "type": "integer",
  13756. "exclusiveMinimum": 0
  13757. },
  13758. "max_height": {
  13759. "type": "integer",
  13760. "exclusiveMinimum": 0
  13761. },
  13762. "max_base64_bytes": {
  13763. "type": "integer",
  13764. "exclusiveMinimum": 0
  13765. }
  13766. },
  13767. "additionalProperties": false
  13768. },
  13769. "AttachmentConfig": {
  13770. "type": "object",
  13771. "properties": {
  13772. "image": {
  13773. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13774. }
  13775. },
  13776. "additionalProperties": false
  13777. },
  13778. "Config": {
  13779. "type": "object",
  13780. "properties": {
  13781. "$schema": {
  13782. "type": "string"
  13783. },
  13784. "shell": {
  13785. "type": "string"
  13786. },
  13787. "logLevel": {
  13788. "$ref": "#/components/schemas/LogLevel"
  13789. },
  13790. "server": {
  13791. "$ref": "#/components/schemas/ServerConfig"
  13792. },
  13793. "command": {
  13794. "type": "object",
  13795. "additionalProperties": {
  13796. "type": "object",
  13797. "properties": {
  13798. "template": {
  13799. "type": "string"
  13800. },
  13801. "description": {
  13802. "type": "string"
  13803. },
  13804. "agent": {
  13805. "type": "string"
  13806. },
  13807. "model": {
  13808. "type": "string"
  13809. },
  13810. "subtask": {
  13811. "type": "boolean"
  13812. }
  13813. },
  13814. "required": ["template"],
  13815. "additionalProperties": false
  13816. }
  13817. },
  13818. "skills": {
  13819. "type": "object",
  13820. "properties": {
  13821. "paths": {
  13822. "type": "array",
  13823. "items": {
  13824. "type": "string"
  13825. }
  13826. },
  13827. "urls": {
  13828. "type": "array",
  13829. "items": {
  13830. "type": "string"
  13831. }
  13832. }
  13833. },
  13834. "additionalProperties": false
  13835. },
  13836. "reference": {
  13837. "$ref": "#/components/schemas/ReferenceConfig"
  13838. },
  13839. "watcher": {
  13840. "type": "object",
  13841. "properties": {
  13842. "ignore": {
  13843. "type": "array",
  13844. "items": {
  13845. "type": "string"
  13846. }
  13847. }
  13848. },
  13849. "additionalProperties": false
  13850. },
  13851. "snapshot": {
  13852. "type": "boolean"
  13853. },
  13854. "plugin": {
  13855. "type": "array",
  13856. "items": {
  13857. "anyOf": [
  13858. {
  13859. "type": "string"
  13860. },
  13861. {
  13862. "type": "array",
  13863. "prefixItems": [
  13864. {
  13865. "type": "string"
  13866. },
  13867. {
  13868. "type": "object"
  13869. }
  13870. ],
  13871. "maxItems": 2,
  13872. "minItems": 2
  13873. }
  13874. ]
  13875. }
  13876. },
  13877. "share": {
  13878. "type": "string",
  13879. "enum": ["manual", "auto", "disabled"]
  13880. },
  13881. "autoshare": {
  13882. "type": "boolean"
  13883. },
  13884. "autoupdate": {
  13885. "anyOf": [
  13886. {
  13887. "type": "boolean"
  13888. },
  13889. {
  13890. "type": "string",
  13891. "enum": ["notify"]
  13892. }
  13893. ],
  13894. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13895. },
  13896. "disabled_providers": {
  13897. "type": "array",
  13898. "items": {
  13899. "type": "string"
  13900. }
  13901. },
  13902. "enabled_providers": {
  13903. "type": "array",
  13904. "items": {
  13905. "type": "string"
  13906. }
  13907. },
  13908. "model": {
  13909. "type": "string"
  13910. },
  13911. "small_model": {
  13912. "type": "string"
  13913. },
  13914. "default_agent": {
  13915. "type": "string"
  13916. },
  13917. "username": {
  13918. "type": "string"
  13919. },
  13920. "mode": {
  13921. "type": "object",
  13922. "properties": {
  13923. "build": {
  13924. "$ref": "#/components/schemas/AgentConfig"
  13925. },
  13926. "plan": {
  13927. "$ref": "#/components/schemas/AgentConfig"
  13928. }
  13929. },
  13930. "additionalProperties": {
  13931. "$ref": "#/components/schemas/AgentConfig"
  13932. }
  13933. },
  13934. "agent": {
  13935. "type": "object",
  13936. "properties": {
  13937. "plan": {
  13938. "$ref": "#/components/schemas/AgentConfig"
  13939. },
  13940. "build": {
  13941. "$ref": "#/components/schemas/AgentConfig"
  13942. },
  13943. "general": {
  13944. "$ref": "#/components/schemas/AgentConfig"
  13945. },
  13946. "explore": {
  13947. "$ref": "#/components/schemas/AgentConfig"
  13948. },
  13949. "scout": {
  13950. "$ref": "#/components/schemas/AgentConfig"
  13951. },
  13952. "title": {
  13953. "$ref": "#/components/schemas/AgentConfig"
  13954. },
  13955. "summary": {
  13956. "$ref": "#/components/schemas/AgentConfig"
  13957. },
  13958. "compaction": {
  13959. "$ref": "#/components/schemas/AgentConfig"
  13960. }
  13961. },
  13962. "additionalProperties": {
  13963. "$ref": "#/components/schemas/AgentConfig"
  13964. }
  13965. },
  13966. "provider": {
  13967. "type": "object",
  13968. "additionalProperties": {
  13969. "$ref": "#/components/schemas/ProviderConfig"
  13970. }
  13971. },
  13972. "mcp": {
  13973. "type": "object",
  13974. "additionalProperties": {
  13975. "anyOf": [
  13976. {
  13977. "$ref": "#/components/schemas/McpLocalConfig"
  13978. },
  13979. {
  13980. "$ref": "#/components/schemas/McpRemoteConfig"
  13981. },
  13982. {
  13983. "type": "object",
  13984. "properties": {
  13985. "enabled": {
  13986. "type": "boolean"
  13987. }
  13988. },
  13989. "required": ["enabled"],
  13990. "additionalProperties": false
  13991. }
  13992. ]
  13993. }
  13994. },
  13995. "formatter": {
  13996. "anyOf": [
  13997. {
  13998. "type": "boolean"
  13999. },
  14000. {
  14001. "type": "object",
  14002. "additionalProperties": {
  14003. "type": "object",
  14004. "properties": {
  14005. "disabled": {
  14006. "type": "boolean"
  14007. },
  14008. "command": {
  14009. "type": "array",
  14010. "items": {
  14011. "type": "string"
  14012. }
  14013. },
  14014. "environment": {
  14015. "type": "object",
  14016. "additionalProperties": {
  14017. "type": "string"
  14018. }
  14019. },
  14020. "extensions": {
  14021. "type": "array",
  14022. "items": {
  14023. "type": "string"
  14024. }
  14025. }
  14026. },
  14027. "additionalProperties": false
  14028. }
  14029. }
  14030. ],
  14031. "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."
  14032. },
  14033. "lsp": {
  14034. "anyOf": [
  14035. {
  14036. "type": "boolean"
  14037. },
  14038. {
  14039. "type": "object",
  14040. "additionalProperties": {
  14041. "anyOf": [
  14042. {
  14043. "type": "object",
  14044. "properties": {
  14045. "disabled": {
  14046. "type": "boolean",
  14047. "enum": [true]
  14048. }
  14049. },
  14050. "required": ["disabled"],
  14051. "additionalProperties": false
  14052. },
  14053. {
  14054. "type": "object",
  14055. "properties": {
  14056. "command": {
  14057. "type": "array",
  14058. "items": {
  14059. "type": "string"
  14060. }
  14061. },
  14062. "extensions": {
  14063. "type": "array",
  14064. "items": {
  14065. "type": "string"
  14066. }
  14067. },
  14068. "disabled": {
  14069. "type": "boolean"
  14070. },
  14071. "env": {
  14072. "type": "object",
  14073. "additionalProperties": {
  14074. "type": "string"
  14075. }
  14076. },
  14077. "initialization": {
  14078. "type": "object"
  14079. }
  14080. },
  14081. "required": ["command"],
  14082. "additionalProperties": false
  14083. }
  14084. ]
  14085. }
  14086. }
  14087. ],
  14088. "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."
  14089. },
  14090. "instructions": {
  14091. "type": "array",
  14092. "items": {
  14093. "type": "string"
  14094. }
  14095. },
  14096. "layout": {
  14097. "$ref": "#/components/schemas/LayoutConfig"
  14098. },
  14099. "permission": {
  14100. "$ref": "#/components/schemas/PermissionConfig"
  14101. },
  14102. "tools": {
  14103. "type": "object",
  14104. "additionalProperties": {
  14105. "type": "boolean"
  14106. }
  14107. },
  14108. "attachment": {
  14109. "$ref": "#/components/schemas/AttachmentConfig"
  14110. },
  14111. "enterprise": {
  14112. "type": "object",
  14113. "properties": {
  14114. "url": {
  14115. "type": "string"
  14116. }
  14117. },
  14118. "additionalProperties": false
  14119. },
  14120. "tool_output": {
  14121. "type": "object",
  14122. "properties": {
  14123. "max_lines": {
  14124. "type": "integer",
  14125. "exclusiveMinimum": 0
  14126. },
  14127. "max_bytes": {
  14128. "type": "integer",
  14129. "exclusiveMinimum": 0
  14130. }
  14131. },
  14132. "additionalProperties": false
  14133. },
  14134. "compaction": {
  14135. "type": "object",
  14136. "properties": {
  14137. "auto": {
  14138. "type": "boolean"
  14139. },
  14140. "prune": {
  14141. "type": "boolean"
  14142. },
  14143. "tail_turns": {
  14144. "type": "integer",
  14145. "minimum": 0
  14146. },
  14147. "preserve_recent_tokens": {
  14148. "type": "integer",
  14149. "minimum": 0
  14150. },
  14151. "reserved": {
  14152. "type": "integer",
  14153. "minimum": 0
  14154. }
  14155. },
  14156. "additionalProperties": false
  14157. },
  14158. "experimental": {
  14159. "type": "object",
  14160. "properties": {
  14161. "disable_paste_summary": {
  14162. "type": "boolean"
  14163. },
  14164. "batch_tool": {
  14165. "type": "boolean"
  14166. },
  14167. "openTelemetry": {
  14168. "type": "boolean"
  14169. },
  14170. "primary_tools": {
  14171. "type": "array",
  14172. "items": {
  14173. "type": "string"
  14174. }
  14175. },
  14176. "continue_loop_on_deny": {
  14177. "type": "boolean"
  14178. },
  14179. "mcp_timeout": {
  14180. "type": "integer",
  14181. "exclusiveMinimum": 0
  14182. }
  14183. },
  14184. "additionalProperties": false
  14185. }
  14186. },
  14187. "additionalProperties": false
  14188. },
  14189. "Model": {
  14190. "type": "object",
  14191. "properties": {
  14192. "id": {
  14193. "type": "string"
  14194. },
  14195. "providerID": {
  14196. "type": "string"
  14197. },
  14198. "api": {
  14199. "type": "object",
  14200. "properties": {
  14201. "id": {
  14202. "type": "string"
  14203. },
  14204. "url": {
  14205. "type": "string"
  14206. },
  14207. "npm": {
  14208. "type": "string"
  14209. }
  14210. },
  14211. "required": ["id", "url", "npm"],
  14212. "additionalProperties": false
  14213. },
  14214. "name": {
  14215. "type": "string"
  14216. },
  14217. "family": {
  14218. "type": "string"
  14219. },
  14220. "capabilities": {
  14221. "type": "object",
  14222. "properties": {
  14223. "temperature": {
  14224. "type": "boolean"
  14225. },
  14226. "reasoning": {
  14227. "type": "boolean"
  14228. },
  14229. "attachment": {
  14230. "type": "boolean"
  14231. },
  14232. "toolcall": {
  14233. "type": "boolean"
  14234. },
  14235. "input": {
  14236. "type": "object",
  14237. "properties": {
  14238. "text": {
  14239. "type": "boolean"
  14240. },
  14241. "audio": {
  14242. "type": "boolean"
  14243. },
  14244. "image": {
  14245. "type": "boolean"
  14246. },
  14247. "video": {
  14248. "type": "boolean"
  14249. },
  14250. "pdf": {
  14251. "type": "boolean"
  14252. }
  14253. },
  14254. "required": ["text", "audio", "image", "video", "pdf"],
  14255. "additionalProperties": false
  14256. },
  14257. "output": {
  14258. "type": "object",
  14259. "properties": {
  14260. "text": {
  14261. "type": "boolean"
  14262. },
  14263. "audio": {
  14264. "type": "boolean"
  14265. },
  14266. "image": {
  14267. "type": "boolean"
  14268. },
  14269. "video": {
  14270. "type": "boolean"
  14271. },
  14272. "pdf": {
  14273. "type": "boolean"
  14274. }
  14275. },
  14276. "required": ["text", "audio", "image", "video", "pdf"],
  14277. "additionalProperties": false
  14278. },
  14279. "interleaved": {
  14280. "anyOf": [
  14281. {
  14282. "type": "boolean"
  14283. },
  14284. {
  14285. "type": "object",
  14286. "properties": {
  14287. "field": {
  14288. "type": "string",
  14289. "enum": ["reasoning_content", "reasoning_details"]
  14290. }
  14291. },
  14292. "required": ["field"],
  14293. "additionalProperties": false
  14294. }
  14295. ]
  14296. }
  14297. },
  14298. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14299. "additionalProperties": false
  14300. },
  14301. "cost": {
  14302. "type": "object",
  14303. "properties": {
  14304. "input": {
  14305. "type": "number"
  14306. },
  14307. "output": {
  14308. "type": "number"
  14309. },
  14310. "cache": {
  14311. "type": "object",
  14312. "properties": {
  14313. "read": {
  14314. "type": "number"
  14315. },
  14316. "write": {
  14317. "type": "number"
  14318. }
  14319. },
  14320. "required": ["read", "write"],
  14321. "additionalProperties": false
  14322. },
  14323. "tiers": {
  14324. "type": "array",
  14325. "items": {
  14326. "type": "object",
  14327. "properties": {
  14328. "input": {
  14329. "type": "number"
  14330. },
  14331. "output": {
  14332. "type": "number"
  14333. },
  14334. "cache": {
  14335. "type": "object",
  14336. "properties": {
  14337. "read": {
  14338. "type": "number"
  14339. },
  14340. "write": {
  14341. "type": "number"
  14342. }
  14343. },
  14344. "required": ["read", "write"],
  14345. "additionalProperties": false
  14346. },
  14347. "tier": {
  14348. "type": "object",
  14349. "properties": {
  14350. "type": {
  14351. "type": "string",
  14352. "enum": ["context"]
  14353. },
  14354. "size": {
  14355. "type": "number"
  14356. }
  14357. },
  14358. "required": ["type", "size"],
  14359. "additionalProperties": false
  14360. }
  14361. },
  14362. "required": ["input", "output", "cache", "tier"],
  14363. "additionalProperties": false
  14364. }
  14365. },
  14366. "experimentalOver200K": {
  14367. "type": "object",
  14368. "properties": {
  14369. "input": {
  14370. "type": "number"
  14371. },
  14372. "output": {
  14373. "type": "number"
  14374. },
  14375. "cache": {
  14376. "type": "object",
  14377. "properties": {
  14378. "read": {
  14379. "type": "number"
  14380. },
  14381. "write": {
  14382. "type": "number"
  14383. }
  14384. },
  14385. "required": ["read", "write"],
  14386. "additionalProperties": false
  14387. }
  14388. },
  14389. "required": ["input", "output", "cache"],
  14390. "additionalProperties": false
  14391. }
  14392. },
  14393. "required": ["input", "output", "cache"],
  14394. "additionalProperties": false
  14395. },
  14396. "limit": {
  14397. "type": "object",
  14398. "properties": {
  14399. "context": {
  14400. "type": "number"
  14401. },
  14402. "input": {
  14403. "type": "number"
  14404. },
  14405. "output": {
  14406. "type": "number"
  14407. }
  14408. },
  14409. "required": ["context", "output"],
  14410. "additionalProperties": false
  14411. },
  14412. "status": {
  14413. "type": "string",
  14414. "enum": ["alpha", "beta", "deprecated", "active"]
  14415. },
  14416. "options": {
  14417. "type": "object"
  14418. },
  14419. "headers": {
  14420. "type": "object",
  14421. "additionalProperties": {
  14422. "type": "string"
  14423. }
  14424. },
  14425. "release_date": {
  14426. "type": "string"
  14427. },
  14428. "variants": {
  14429. "type": "object",
  14430. "additionalProperties": {
  14431. "type": "object"
  14432. }
  14433. }
  14434. },
  14435. "required": [
  14436. "id",
  14437. "providerID",
  14438. "api",
  14439. "name",
  14440. "capabilities",
  14441. "cost",
  14442. "limit",
  14443. "status",
  14444. "options",
  14445. "headers",
  14446. "release_date"
  14447. ],
  14448. "additionalProperties": false
  14449. },
  14450. "Provider": {
  14451. "type": "object",
  14452. "properties": {
  14453. "id": {
  14454. "type": "string"
  14455. },
  14456. "name": {
  14457. "type": "string"
  14458. },
  14459. "source": {
  14460. "type": "string",
  14461. "enum": ["env", "config", "custom", "api"]
  14462. },
  14463. "env": {
  14464. "type": "array",
  14465. "items": {
  14466. "type": "string"
  14467. }
  14468. },
  14469. "key": {
  14470. "type": "string"
  14471. },
  14472. "options": {
  14473. "type": "object"
  14474. },
  14475. "models": {
  14476. "type": "object",
  14477. "additionalProperties": {
  14478. "$ref": "#/components/schemas/Model"
  14479. }
  14480. }
  14481. },
  14482. "required": ["id", "name", "source", "env", "options", "models"],
  14483. "additionalProperties": false
  14484. },
  14485. "ConsoleState": {
  14486. "type": "object",
  14487. "properties": {
  14488. "consoleManagedProviders": {
  14489. "type": "array",
  14490. "items": {
  14491. "type": "string"
  14492. }
  14493. },
  14494. "activeOrgName": {
  14495. "type": "string"
  14496. },
  14497. "switchableOrgCount": {
  14498. "type": "integer",
  14499. "minimum": 0
  14500. }
  14501. },
  14502. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14503. "additionalProperties": false
  14504. },
  14505. "effect_HttpApiError_InternalServerError": {
  14506. "type": "object",
  14507. "properties": {
  14508. "_tag": {
  14509. "type": "string",
  14510. "enum": ["InternalServerError"]
  14511. }
  14512. },
  14513. "required": ["_tag"],
  14514. "additionalProperties": false
  14515. },
  14516. "ToolListItem": {
  14517. "type": "object",
  14518. "properties": {
  14519. "id": {
  14520. "type": "string"
  14521. },
  14522. "description": {
  14523. "type": "string"
  14524. },
  14525. "parameters": {}
  14526. },
  14527. "required": ["id", "description", "parameters"],
  14528. "additionalProperties": false
  14529. },
  14530. "ToolList": {
  14531. "type": "array",
  14532. "items": {
  14533. "$ref": "#/components/schemas/ToolListItem"
  14534. }
  14535. },
  14536. "ToolIDs": {
  14537. "type": "array",
  14538. "items": {
  14539. "type": "string"
  14540. }
  14541. },
  14542. "WorktreeError": {
  14543. "type": "object",
  14544. "properties": {
  14545. "name": {
  14546. "type": "string",
  14547. "enum": [
  14548. "WorktreeNotGitError",
  14549. "WorktreeNameGenerationFailedError",
  14550. "WorktreeCreateFailedError",
  14551. "WorktreeStartCommandFailedError",
  14552. "WorktreeRemoveFailedError",
  14553. "WorktreeResetFailedError",
  14554. "WorktreeListFailedError"
  14555. ]
  14556. },
  14557. "data": {
  14558. "type": "object",
  14559. "properties": {
  14560. "message": {
  14561. "type": "string"
  14562. }
  14563. },
  14564. "required": ["message"],
  14565. "additionalProperties": false
  14566. }
  14567. },
  14568. "required": ["name", "data"],
  14569. "additionalProperties": false
  14570. },
  14571. "WorktreeCreateInput": {
  14572. "type": "object",
  14573. "properties": {
  14574. "name": {
  14575. "type": "string"
  14576. },
  14577. "startCommand": {
  14578. "type": "string",
  14579. "description": "Additional startup script to run after the project's start command"
  14580. }
  14581. },
  14582. "additionalProperties": false
  14583. },
  14584. "Worktree": {
  14585. "type": "object",
  14586. "properties": {
  14587. "name": {
  14588. "type": "string"
  14589. },
  14590. "branch": {
  14591. "type": "string"
  14592. },
  14593. "directory": {
  14594. "type": "string"
  14595. }
  14596. },
  14597. "required": ["name", "directory"],
  14598. "additionalProperties": false
  14599. },
  14600. "WorktreeRemoveInput": {
  14601. "type": "object",
  14602. "properties": {
  14603. "directory": {
  14604. "type": "string"
  14605. }
  14606. },
  14607. "required": ["directory"],
  14608. "additionalProperties": false
  14609. },
  14610. "WorktreeResetInput": {
  14611. "type": "object",
  14612. "properties": {
  14613. "directory": {
  14614. "type": "string"
  14615. }
  14616. },
  14617. "required": ["directory"],
  14618. "additionalProperties": false
  14619. },
  14620. "ProjectSummary": {
  14621. "type": "object",
  14622. "properties": {
  14623. "id": {
  14624. "type": "string"
  14625. },
  14626. "name": {
  14627. "type": "string"
  14628. },
  14629. "worktree": {
  14630. "type": "string"
  14631. }
  14632. },
  14633. "required": ["id", "worktree"],
  14634. "additionalProperties": false
  14635. },
  14636. "GlobalSession": {
  14637. "type": "object",
  14638. "properties": {
  14639. "id": {
  14640. "type": "string",
  14641. "pattern": "^ses"
  14642. },
  14643. "slug": {
  14644. "type": "string"
  14645. },
  14646. "projectID": {
  14647. "type": "string"
  14648. },
  14649. "workspaceID": {
  14650. "type": "string",
  14651. "pattern": "^wrk"
  14652. },
  14653. "directory": {
  14654. "type": "string"
  14655. },
  14656. "path": {
  14657. "type": "string"
  14658. },
  14659. "parentID": {
  14660. "type": "string",
  14661. "pattern": "^ses"
  14662. },
  14663. "summary": {
  14664. "type": "object",
  14665. "properties": {
  14666. "additions": {
  14667. "type": "number"
  14668. },
  14669. "deletions": {
  14670. "type": "number"
  14671. },
  14672. "files": {
  14673. "type": "number"
  14674. },
  14675. "diffs": {
  14676. "type": "array",
  14677. "items": {
  14678. "$ref": "#/components/schemas/SnapshotFileDiff"
  14679. }
  14680. }
  14681. },
  14682. "required": ["additions", "deletions", "files"],
  14683. "additionalProperties": false
  14684. },
  14685. "cost": {
  14686. "type": "number"
  14687. },
  14688. "tokens": {
  14689. "type": "object",
  14690. "properties": {
  14691. "input": {
  14692. "type": "number"
  14693. },
  14694. "output": {
  14695. "type": "number"
  14696. },
  14697. "reasoning": {
  14698. "type": "number"
  14699. },
  14700. "cache": {
  14701. "type": "object",
  14702. "properties": {
  14703. "read": {
  14704. "type": "number"
  14705. },
  14706. "write": {
  14707. "type": "number"
  14708. }
  14709. },
  14710. "required": ["read", "write"],
  14711. "additionalProperties": false
  14712. }
  14713. },
  14714. "required": ["input", "output", "reasoning", "cache"],
  14715. "additionalProperties": false
  14716. },
  14717. "share": {
  14718. "type": "object",
  14719. "properties": {
  14720. "url": {
  14721. "type": "string"
  14722. }
  14723. },
  14724. "required": ["url"],
  14725. "additionalProperties": false
  14726. },
  14727. "title": {
  14728. "type": "string"
  14729. },
  14730. "agent": {
  14731. "type": "string"
  14732. },
  14733. "model": {
  14734. "type": "object",
  14735. "properties": {
  14736. "id": {
  14737. "type": "string"
  14738. },
  14739. "providerID": {
  14740. "type": "string"
  14741. },
  14742. "variant": {
  14743. "type": "string"
  14744. }
  14745. },
  14746. "required": ["id", "providerID"],
  14747. "additionalProperties": false
  14748. },
  14749. "version": {
  14750. "type": "string"
  14751. },
  14752. "time": {
  14753. "type": "object",
  14754. "properties": {
  14755. "created": {
  14756. "type": "integer",
  14757. "minimum": 0
  14758. },
  14759. "updated": {
  14760. "type": "integer",
  14761. "minimum": 0
  14762. },
  14763. "compacting": {
  14764. "type": "integer",
  14765. "minimum": 0
  14766. },
  14767. "archived": {
  14768. "type": "number"
  14769. }
  14770. },
  14771. "required": ["created", "updated"],
  14772. "additionalProperties": false
  14773. },
  14774. "permission": {
  14775. "$ref": "#/components/schemas/PermissionRuleset"
  14776. },
  14777. "revert": {
  14778. "type": "object",
  14779. "properties": {
  14780. "messageID": {
  14781. "type": "string",
  14782. "pattern": "^msg"
  14783. },
  14784. "partID": {
  14785. "type": "string",
  14786. "pattern": "^prt"
  14787. },
  14788. "snapshot": {
  14789. "type": "string"
  14790. },
  14791. "diff": {
  14792. "type": "string"
  14793. }
  14794. },
  14795. "required": ["messageID"],
  14796. "additionalProperties": false
  14797. },
  14798. "project": {
  14799. "anyOf": [
  14800. {
  14801. "$ref": "#/components/schemas/ProjectSummary"
  14802. },
  14803. {
  14804. "type": "null"
  14805. }
  14806. ]
  14807. }
  14808. },
  14809. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14810. "additionalProperties": false
  14811. },
  14812. "McpResource": {
  14813. "type": "object",
  14814. "properties": {
  14815. "name": {
  14816. "type": "string"
  14817. },
  14818. "uri": {
  14819. "type": "string"
  14820. },
  14821. "description": {
  14822. "type": "string"
  14823. },
  14824. "mimeType": {
  14825. "type": "string"
  14826. },
  14827. "client": {
  14828. "type": "string"
  14829. }
  14830. },
  14831. "required": ["name", "uri", "client"],
  14832. "additionalProperties": false
  14833. },
  14834. "Symbol": {
  14835. "type": "object",
  14836. "properties": {
  14837. "name": {
  14838. "type": "string"
  14839. },
  14840. "kind": {
  14841. "type": "integer",
  14842. "minimum": 0
  14843. },
  14844. "location": {
  14845. "type": "object",
  14846. "properties": {
  14847. "uri": {
  14848. "type": "string"
  14849. },
  14850. "range": {
  14851. "$ref": "#/components/schemas/Range"
  14852. }
  14853. },
  14854. "required": ["uri", "range"],
  14855. "additionalProperties": false
  14856. }
  14857. },
  14858. "required": ["name", "kind", "location"],
  14859. "additionalProperties": false
  14860. },
  14861. "FileNode": {
  14862. "type": "object",
  14863. "properties": {
  14864. "name": {
  14865. "type": "string"
  14866. },
  14867. "path": {
  14868. "type": "string"
  14869. },
  14870. "absolute": {
  14871. "type": "string"
  14872. },
  14873. "type": {
  14874. "type": "string",
  14875. "enum": ["file", "directory"]
  14876. },
  14877. "ignored": {
  14878. "type": "boolean"
  14879. }
  14880. },
  14881. "required": ["name", "path", "absolute", "type", "ignored"],
  14882. "additionalProperties": false
  14883. },
  14884. "FileContent": {
  14885. "type": "object",
  14886. "properties": {
  14887. "type": {
  14888. "type": "string",
  14889. "enum": ["text", "binary"]
  14890. },
  14891. "content": {
  14892. "type": "string"
  14893. },
  14894. "diff": {
  14895. "type": "string"
  14896. },
  14897. "patch": {
  14898. "type": "object",
  14899. "properties": {
  14900. "oldFileName": {
  14901. "type": "string"
  14902. },
  14903. "newFileName": {
  14904. "type": "string"
  14905. },
  14906. "oldHeader": {
  14907. "type": "string"
  14908. },
  14909. "newHeader": {
  14910. "type": "string"
  14911. },
  14912. "hunks": {
  14913. "type": "array",
  14914. "items": {
  14915. "type": "object",
  14916. "properties": {
  14917. "oldStart": {
  14918. "type": "integer",
  14919. "minimum": 0
  14920. },
  14921. "oldLines": {
  14922. "type": "integer",
  14923. "minimum": 0
  14924. },
  14925. "newStart": {
  14926. "type": "integer",
  14927. "minimum": 0
  14928. },
  14929. "newLines": {
  14930. "type": "integer",
  14931. "minimum": 0
  14932. },
  14933. "lines": {
  14934. "type": "array",
  14935. "items": {
  14936. "type": "string"
  14937. }
  14938. }
  14939. },
  14940. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  14941. "additionalProperties": false
  14942. }
  14943. },
  14944. "index": {
  14945. "type": "string"
  14946. }
  14947. },
  14948. "required": ["oldFileName", "newFileName", "hunks"],
  14949. "additionalProperties": false
  14950. },
  14951. "encoding": {
  14952. "type": "string",
  14953. "enum": ["base64"]
  14954. },
  14955. "mimeType": {
  14956. "type": "string"
  14957. }
  14958. },
  14959. "required": ["type", "content"],
  14960. "additionalProperties": false
  14961. },
  14962. "File": {
  14963. "type": "object",
  14964. "properties": {
  14965. "path": {
  14966. "type": "string"
  14967. },
  14968. "added": {
  14969. "type": "integer",
  14970. "minimum": 0
  14971. },
  14972. "removed": {
  14973. "type": "integer",
  14974. "minimum": 0
  14975. },
  14976. "status": {
  14977. "type": "string",
  14978. "enum": ["added", "deleted", "modified"]
  14979. }
  14980. },
  14981. "required": ["path", "added", "removed", "status"],
  14982. "additionalProperties": false
  14983. },
  14984. "Path": {
  14985. "type": "object",
  14986. "properties": {
  14987. "home": {
  14988. "type": "string"
  14989. },
  14990. "state": {
  14991. "type": "string"
  14992. },
  14993. "config": {
  14994. "type": "string"
  14995. },
  14996. "worktree": {
  14997. "type": "string"
  14998. },
  14999. "directory": {
  15000. "type": "string"
  15001. }
  15002. },
  15003. "required": ["home", "state", "config", "worktree", "directory"],
  15004. "additionalProperties": false
  15005. },
  15006. "VcsInfo": {
  15007. "type": "object",
  15008. "properties": {
  15009. "branch": {
  15010. "type": "string"
  15011. },
  15012. "default_branch": {
  15013. "type": "string"
  15014. }
  15015. },
  15016. "additionalProperties": false
  15017. },
  15018. "VcsFileStatus": {
  15019. "type": "object",
  15020. "properties": {
  15021. "file": {
  15022. "type": "string"
  15023. },
  15024. "additions": {
  15025. "type": "number"
  15026. },
  15027. "deletions": {
  15028. "type": "number"
  15029. },
  15030. "status": {
  15031. "type": "string",
  15032. "enum": ["added", "deleted", "modified"]
  15033. }
  15034. },
  15035. "required": ["file", "additions", "deletions", "status"],
  15036. "additionalProperties": false
  15037. },
  15038. "VcsFileDiff": {
  15039. "type": "object",
  15040. "properties": {
  15041. "file": {
  15042. "type": "string"
  15043. },
  15044. "patch": {
  15045. "type": "string"
  15046. },
  15047. "additions": {
  15048. "type": "number"
  15049. },
  15050. "deletions": {
  15051. "type": "number"
  15052. },
  15053. "status": {
  15054. "type": "string",
  15055. "enum": ["added", "deleted", "modified"]
  15056. }
  15057. },
  15058. "required": ["file", "additions", "deletions"],
  15059. "additionalProperties": false
  15060. },
  15061. "VcsApplyError": {
  15062. "type": "object",
  15063. "properties": {
  15064. "name": {
  15065. "type": "string",
  15066. "enum": ["VcsApplyError"]
  15067. },
  15068. "data": {
  15069. "type": "object",
  15070. "properties": {
  15071. "message": {
  15072. "type": "string"
  15073. },
  15074. "reason": {
  15075. "type": "string",
  15076. "enum": ["non-git", "not-clean"]
  15077. }
  15078. },
  15079. "required": ["message", "reason"],
  15080. "additionalProperties": false
  15081. }
  15082. },
  15083. "required": ["name", "data"],
  15084. "additionalProperties": false
  15085. },
  15086. "Command": {
  15087. "type": "object",
  15088. "properties": {
  15089. "name": {
  15090. "type": "string"
  15091. },
  15092. "description": {
  15093. "type": "string"
  15094. },
  15095. "agent": {
  15096. "type": "string"
  15097. },
  15098. "model": {
  15099. "type": "string"
  15100. },
  15101. "source": {
  15102. "type": "string",
  15103. "enum": ["command", "mcp", "skill"]
  15104. },
  15105. "template": {
  15106. "type": "string"
  15107. },
  15108. "subtask": {
  15109. "type": "boolean"
  15110. },
  15111. "hints": {
  15112. "type": "array",
  15113. "items": {
  15114. "type": "string"
  15115. }
  15116. }
  15117. },
  15118. "required": ["name", "template", "hints"],
  15119. "additionalProperties": false
  15120. },
  15121. "Agent": {
  15122. "type": "object",
  15123. "properties": {
  15124. "name": {
  15125. "type": "string"
  15126. },
  15127. "description": {
  15128. "type": "string"
  15129. },
  15130. "mode": {
  15131. "type": "string",
  15132. "enum": ["subagent", "primary", "all"]
  15133. },
  15134. "native": {
  15135. "type": "boolean"
  15136. },
  15137. "hidden": {
  15138. "type": "boolean"
  15139. },
  15140. "topP": {
  15141. "type": "number"
  15142. },
  15143. "temperature": {
  15144. "type": "number"
  15145. },
  15146. "color": {
  15147. "type": "string"
  15148. },
  15149. "permission": {
  15150. "$ref": "#/components/schemas/PermissionRuleset"
  15151. },
  15152. "model": {
  15153. "type": "object",
  15154. "properties": {
  15155. "modelID": {
  15156. "type": "string"
  15157. },
  15158. "providerID": {
  15159. "type": "string"
  15160. }
  15161. },
  15162. "required": ["modelID", "providerID"],
  15163. "additionalProperties": false
  15164. },
  15165. "variant": {
  15166. "type": "string"
  15167. },
  15168. "prompt": {
  15169. "type": "string"
  15170. },
  15171. "options": {
  15172. "type": "object"
  15173. },
  15174. "steps": {
  15175. "type": "number"
  15176. }
  15177. },
  15178. "required": ["name", "mode", "permission", "options"],
  15179. "additionalProperties": false
  15180. },
  15181. "LSPStatus": {
  15182. "type": "object",
  15183. "properties": {
  15184. "id": {
  15185. "type": "string"
  15186. },
  15187. "name": {
  15188. "type": "string"
  15189. },
  15190. "root": {
  15191. "type": "string"
  15192. },
  15193. "status": {
  15194. "type": "string",
  15195. "enum": ["connected", "error"]
  15196. }
  15197. },
  15198. "required": ["id", "name", "root", "status"],
  15199. "additionalProperties": false
  15200. },
  15201. "FormatterStatus": {
  15202. "type": "object",
  15203. "properties": {
  15204. "name": {
  15205. "type": "string"
  15206. },
  15207. "extensions": {
  15208. "type": "array",
  15209. "items": {
  15210. "type": "string"
  15211. }
  15212. },
  15213. "enabled": {
  15214. "type": "boolean"
  15215. }
  15216. },
  15217. "required": ["name", "extensions", "enabled"],
  15218. "additionalProperties": false
  15219. },
  15220. "MCPStatusConnected": {
  15221. "type": "object",
  15222. "properties": {
  15223. "status": {
  15224. "type": "string",
  15225. "enum": ["connected"]
  15226. }
  15227. },
  15228. "required": ["status"],
  15229. "additionalProperties": false
  15230. },
  15231. "MCPStatusDisabled": {
  15232. "type": "object",
  15233. "properties": {
  15234. "status": {
  15235. "type": "string",
  15236. "enum": ["disabled"]
  15237. }
  15238. },
  15239. "required": ["status"],
  15240. "additionalProperties": false
  15241. },
  15242. "MCPStatusFailed": {
  15243. "type": "object",
  15244. "properties": {
  15245. "status": {
  15246. "type": "string",
  15247. "enum": ["failed"]
  15248. },
  15249. "error": {
  15250. "type": "string"
  15251. }
  15252. },
  15253. "required": ["status", "error"],
  15254. "additionalProperties": false
  15255. },
  15256. "MCPStatusNeedsAuth": {
  15257. "type": "object",
  15258. "properties": {
  15259. "status": {
  15260. "type": "string",
  15261. "enum": ["needs_auth"]
  15262. }
  15263. },
  15264. "required": ["status"],
  15265. "additionalProperties": false
  15266. },
  15267. "MCPStatusNeedsClientRegistration": {
  15268. "type": "object",
  15269. "properties": {
  15270. "status": {
  15271. "type": "string",
  15272. "enum": ["needs_client_registration"]
  15273. },
  15274. "error": {
  15275. "type": "string"
  15276. }
  15277. },
  15278. "required": ["status", "error"],
  15279. "additionalProperties": false
  15280. },
  15281. "MCPStatus": {
  15282. "anyOf": [
  15283. {
  15284. "$ref": "#/components/schemas/MCPStatusConnected"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/MCPStatusDisabled"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/MCPStatusFailed"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15297. }
  15298. ]
  15299. },
  15300. "McpUnsupportedOAuthError": {
  15301. "type": "object",
  15302. "properties": {
  15303. "error": {
  15304. "type": "string"
  15305. }
  15306. },
  15307. "required": ["error"],
  15308. "additionalProperties": false
  15309. },
  15310. "NotFoundError": {
  15311. "type": "object",
  15312. "required": ["name", "data"],
  15313. "properties": {
  15314. "name": {
  15315. "type": "string",
  15316. "enum": ["NotFoundError"]
  15317. },
  15318. "data": {
  15319. "type": "object",
  15320. "required": ["message"],
  15321. "properties": {
  15322. "message": {
  15323. "type": "string"
  15324. }
  15325. }
  15326. }
  15327. }
  15328. },
  15329. "effect_HttpApiError_Forbidden": {
  15330. "type": "object",
  15331. "properties": {
  15332. "_tag": {
  15333. "type": "string",
  15334. "enum": ["Forbidden"]
  15335. }
  15336. },
  15337. "required": ["_tag"],
  15338. "additionalProperties": false
  15339. },
  15340. "ProviderAuthMethod": {
  15341. "type": "object",
  15342. "properties": {
  15343. "type": {
  15344. "type": "string",
  15345. "enum": ["oauth", "api"]
  15346. },
  15347. "label": {
  15348. "type": "string"
  15349. },
  15350. "prompts": {
  15351. "type": "array",
  15352. "items": {
  15353. "anyOf": [
  15354. {
  15355. "type": "object",
  15356. "properties": {
  15357. "type": {
  15358. "type": "string",
  15359. "enum": ["text"]
  15360. },
  15361. "key": {
  15362. "type": "string"
  15363. },
  15364. "message": {
  15365. "type": "string"
  15366. },
  15367. "placeholder": {
  15368. "type": "string"
  15369. },
  15370. "when": {
  15371. "type": "object",
  15372. "properties": {
  15373. "key": {
  15374. "type": "string"
  15375. },
  15376. "op": {
  15377. "type": "string",
  15378. "enum": ["eq", "neq"]
  15379. },
  15380. "value": {
  15381. "type": "string"
  15382. }
  15383. },
  15384. "required": ["key", "op", "value"],
  15385. "additionalProperties": false
  15386. }
  15387. },
  15388. "required": ["type", "key", "message"],
  15389. "additionalProperties": false
  15390. },
  15391. {
  15392. "type": "object",
  15393. "properties": {
  15394. "type": {
  15395. "type": "string",
  15396. "enum": ["select"]
  15397. },
  15398. "key": {
  15399. "type": "string"
  15400. },
  15401. "message": {
  15402. "type": "string"
  15403. },
  15404. "options": {
  15405. "type": "array",
  15406. "items": {
  15407. "type": "object",
  15408. "properties": {
  15409. "label": {
  15410. "type": "string"
  15411. },
  15412. "value": {
  15413. "type": "string"
  15414. },
  15415. "hint": {
  15416. "type": "string"
  15417. }
  15418. },
  15419. "required": ["label", "value"],
  15420. "additionalProperties": false
  15421. }
  15422. },
  15423. "when": {
  15424. "type": "object",
  15425. "properties": {
  15426. "key": {
  15427. "type": "string"
  15428. },
  15429. "op": {
  15430. "type": "string",
  15431. "enum": ["eq", "neq"]
  15432. },
  15433. "value": {
  15434. "type": "string"
  15435. }
  15436. },
  15437. "required": ["key", "op", "value"],
  15438. "additionalProperties": false
  15439. }
  15440. },
  15441. "required": ["type", "key", "message", "options"],
  15442. "additionalProperties": false
  15443. }
  15444. ]
  15445. }
  15446. }
  15447. },
  15448. "required": ["type", "label"],
  15449. "additionalProperties": false
  15450. },
  15451. "ProviderAuthAuthorization": {
  15452. "type": "object",
  15453. "properties": {
  15454. "url": {
  15455. "type": "string"
  15456. },
  15457. "method": {
  15458. "type": "string",
  15459. "enum": ["auto", "code"]
  15460. },
  15461. "instructions": {
  15462. "type": "string"
  15463. }
  15464. },
  15465. "required": ["url", "method", "instructions"],
  15466. "additionalProperties": false
  15467. },
  15468. "ProviderAuthError1": {
  15469. "type": "object",
  15470. "properties": {
  15471. "name": {
  15472. "type": "string",
  15473. "enum": [
  15474. "BadRequest",
  15475. "ProviderAuthOauthMissing",
  15476. "ProviderAuthOauthCodeMissing",
  15477. "ProviderAuthOauthCallbackFailed",
  15478. "ProviderAuthValidationFailed"
  15479. ]
  15480. },
  15481. "data": {
  15482. "type": "object",
  15483. "properties": {
  15484. "providerID": {
  15485. "type": "string"
  15486. },
  15487. "field": {
  15488. "type": "string"
  15489. },
  15490. "message": {
  15491. "type": "string"
  15492. },
  15493. "kind": {
  15494. "type": "string"
  15495. }
  15496. },
  15497. "additionalProperties": false
  15498. }
  15499. },
  15500. "required": ["name", "data"],
  15501. "additionalProperties": false
  15502. },
  15503. "TextPartInput": {
  15504. "type": "object",
  15505. "properties": {
  15506. "id": {
  15507. "type": "string",
  15508. "pattern": "^prt"
  15509. },
  15510. "type": {
  15511. "type": "string",
  15512. "enum": ["text"]
  15513. },
  15514. "text": {
  15515. "type": "string"
  15516. },
  15517. "synthetic": {
  15518. "type": "boolean"
  15519. },
  15520. "ignored": {
  15521. "type": "boolean"
  15522. },
  15523. "time": {
  15524. "type": "object",
  15525. "properties": {
  15526. "start": {
  15527. "type": "integer",
  15528. "minimum": 0
  15529. },
  15530. "end": {
  15531. "type": "integer",
  15532. "minimum": 0
  15533. }
  15534. },
  15535. "required": ["start"],
  15536. "additionalProperties": false
  15537. },
  15538. "metadata": {
  15539. "type": "object"
  15540. }
  15541. },
  15542. "required": ["type", "text"],
  15543. "additionalProperties": false
  15544. },
  15545. "FilePartInput": {
  15546. "type": "object",
  15547. "properties": {
  15548. "id": {
  15549. "type": "string",
  15550. "pattern": "^prt"
  15551. },
  15552. "type": {
  15553. "type": "string",
  15554. "enum": ["file"]
  15555. },
  15556. "mime": {
  15557. "type": "string"
  15558. },
  15559. "filename": {
  15560. "type": "string"
  15561. },
  15562. "url": {
  15563. "type": "string"
  15564. },
  15565. "source": {
  15566. "$ref": "#/components/schemas/FilePartSource"
  15567. }
  15568. },
  15569. "required": ["type", "mime", "url"],
  15570. "additionalProperties": false
  15571. },
  15572. "AgentPartInput": {
  15573. "type": "object",
  15574. "properties": {
  15575. "id": {
  15576. "type": "string",
  15577. "pattern": "^prt"
  15578. },
  15579. "type": {
  15580. "type": "string",
  15581. "enum": ["agent"]
  15582. },
  15583. "name": {
  15584. "type": "string"
  15585. },
  15586. "source": {
  15587. "type": "object",
  15588. "properties": {
  15589. "value": {
  15590. "type": "string"
  15591. },
  15592. "start": {
  15593. "type": "integer",
  15594. "minimum": 0
  15595. },
  15596. "end": {
  15597. "type": "integer",
  15598. "minimum": 0
  15599. }
  15600. },
  15601. "required": ["value", "start", "end"],
  15602. "additionalProperties": false
  15603. }
  15604. },
  15605. "required": ["type", "name"],
  15606. "additionalProperties": false
  15607. },
  15608. "SubtaskPartInput": {
  15609. "type": "object",
  15610. "properties": {
  15611. "id": {
  15612. "type": "string",
  15613. "pattern": "^prt"
  15614. },
  15615. "type": {
  15616. "type": "string",
  15617. "enum": ["subtask"]
  15618. },
  15619. "prompt": {
  15620. "type": "string"
  15621. },
  15622. "description": {
  15623. "type": "string"
  15624. },
  15625. "agent": {
  15626. "type": "string"
  15627. },
  15628. "model": {
  15629. "type": "object",
  15630. "properties": {
  15631. "providerID": {
  15632. "type": "string"
  15633. },
  15634. "modelID": {
  15635. "type": "string"
  15636. }
  15637. },
  15638. "required": ["providerID", "modelID"],
  15639. "additionalProperties": false
  15640. },
  15641. "command": {
  15642. "type": "string"
  15643. }
  15644. },
  15645. "required": ["type", "prompt", "description", "agent"],
  15646. "additionalProperties": false
  15647. },
  15648. "V2SessionsResponse": {
  15649. "type": "object",
  15650. "properties": {
  15651. "items": {
  15652. "type": "array",
  15653. "items": {
  15654. "$ref": "#/components/schemas/SessionInfo"
  15655. }
  15656. },
  15657. "cursor": {
  15658. "type": "object",
  15659. "properties": {
  15660. "previous": {
  15661. "type": "string"
  15662. },
  15663. "next": {
  15664. "type": "string"
  15665. }
  15666. },
  15667. "additionalProperties": false
  15668. }
  15669. },
  15670. "required": ["items", "cursor"],
  15671. "additionalProperties": false
  15672. },
  15673. "InvalidCursorError": {
  15674. "type": "object",
  15675. "properties": {
  15676. "_tag": {
  15677. "type": "string",
  15678. "enum": ["InvalidCursorError"]
  15679. },
  15680. "message": {
  15681. "type": "string"
  15682. }
  15683. },
  15684. "required": ["_tag", "message"],
  15685. "additionalProperties": false
  15686. },
  15687. "UnauthorizedError": {
  15688. "type": "object",
  15689. "properties": {
  15690. "_tag": {
  15691. "type": "string",
  15692. "enum": ["UnauthorizedError"]
  15693. },
  15694. "message": {
  15695. "type": "string"
  15696. }
  15697. },
  15698. "required": ["_tag", "message"],
  15699. "additionalProperties": false
  15700. },
  15701. "SessionNotFoundError": {
  15702. "type": "object",
  15703. "properties": {
  15704. "_tag": {
  15705. "type": "string",
  15706. "enum": ["SessionNotFoundError"]
  15707. },
  15708. "sessionID": {
  15709. "type": "string"
  15710. },
  15711. "message": {
  15712. "type": "string"
  15713. }
  15714. },
  15715. "required": ["_tag", "sessionID", "message"],
  15716. "additionalProperties": false
  15717. },
  15718. "ServiceUnavailableError": {
  15719. "type": "object",
  15720. "properties": {
  15721. "_tag": {
  15722. "type": "string",
  15723. "enum": ["ServiceUnavailableError"]
  15724. },
  15725. "message": {
  15726. "type": "string"
  15727. },
  15728. "service": {
  15729. "type": "string"
  15730. }
  15731. },
  15732. "required": ["_tag", "message"],
  15733. "additionalProperties": false
  15734. },
  15735. "V2SessionMessagesResponse": {
  15736. "type": "object",
  15737. "properties": {
  15738. "items": {
  15739. "type": "array",
  15740. "items": {
  15741. "$ref": "#/components/schemas/SessionMessage"
  15742. }
  15743. },
  15744. "cursor": {
  15745. "type": "object",
  15746. "properties": {
  15747. "previous": {
  15748. "type": "string"
  15749. },
  15750. "next": {
  15751. "type": "string"
  15752. }
  15753. },
  15754. "additionalProperties": false
  15755. }
  15756. },
  15757. "required": ["items", "cursor"],
  15758. "additionalProperties": false
  15759. },
  15760. "ProviderNotFoundError": {
  15761. "type": "object",
  15762. "properties": {
  15763. "_tag": {
  15764. "type": "string",
  15765. "enum": ["ProviderNotFoundError"]
  15766. },
  15767. "providerID": {
  15768. "type": "string"
  15769. },
  15770. "message": {
  15771. "type": "string"
  15772. }
  15773. },
  15774. "required": ["_tag", "providerID", "message"],
  15775. "additionalProperties": false
  15776. },
  15777. "EventTuiPromptAppend": {
  15778. "type": "object",
  15779. "properties": {
  15780. "type": {
  15781. "type": "string",
  15782. "enum": ["tui.prompt.append"]
  15783. },
  15784. "properties": {
  15785. "type": "object",
  15786. "properties": {
  15787. "text": {
  15788. "type": "string"
  15789. }
  15790. },
  15791. "required": ["text"],
  15792. "additionalProperties": false
  15793. }
  15794. },
  15795. "required": ["type", "properties"],
  15796. "additionalProperties": false
  15797. },
  15798. "EventTuiCommandExecute": {
  15799. "type": "object",
  15800. "properties": {
  15801. "type": {
  15802. "type": "string",
  15803. "enum": ["tui.command.execute"]
  15804. },
  15805. "properties": {
  15806. "type": "object",
  15807. "properties": {
  15808. "command": {
  15809. "anyOf": [
  15810. {
  15811. "type": "string",
  15812. "enum": [
  15813. "session.list",
  15814. "session.new",
  15815. "session.share",
  15816. "session.interrupt",
  15817. "session.compact",
  15818. "session.page.up",
  15819. "session.page.down",
  15820. "session.line.up",
  15821. "session.line.down",
  15822. "session.half.page.up",
  15823. "session.half.page.down",
  15824. "session.first",
  15825. "session.last",
  15826. "prompt.clear",
  15827. "prompt.submit",
  15828. "agent.cycle"
  15829. ]
  15830. },
  15831. {
  15832. "type": "string"
  15833. }
  15834. ]
  15835. }
  15836. },
  15837. "required": ["command"],
  15838. "additionalProperties": false
  15839. }
  15840. },
  15841. "required": ["type", "properties"],
  15842. "additionalProperties": false
  15843. },
  15844. "EventTuiToastShow": {
  15845. "type": "object",
  15846. "properties": {
  15847. "type": {
  15848. "type": "string",
  15849. "enum": ["tui.toast.show"]
  15850. },
  15851. "properties": {
  15852. "type": "object",
  15853. "properties": {
  15854. "title": {
  15855. "type": "string"
  15856. },
  15857. "message": {
  15858. "type": "string"
  15859. },
  15860. "variant": {
  15861. "type": "string",
  15862. "enum": ["info", "success", "warning", "error"]
  15863. },
  15864. "duration": {
  15865. "type": "integer",
  15866. "exclusiveMinimum": 0
  15867. }
  15868. },
  15869. "required": ["message", "variant"],
  15870. "additionalProperties": false
  15871. }
  15872. },
  15873. "required": ["type", "properties"],
  15874. "additionalProperties": false
  15875. },
  15876. "EventTuiSessionSelect": {
  15877. "type": "object",
  15878. "properties": {
  15879. "type": {
  15880. "type": "string",
  15881. "enum": ["tui.session.select"]
  15882. },
  15883. "properties": {
  15884. "type": "object",
  15885. "properties": {
  15886. "sessionID": {
  15887. "type": "string",
  15888. "pattern": "^ses",
  15889. "description": "Session ID to navigate to"
  15890. }
  15891. },
  15892. "required": ["sessionID"],
  15893. "additionalProperties": false
  15894. }
  15895. },
  15896. "required": ["type", "properties"],
  15897. "additionalProperties": false
  15898. },
  15899. "Workspace": {
  15900. "type": "object",
  15901. "properties": {
  15902. "id": {
  15903. "type": "string",
  15904. "pattern": "^wrk"
  15905. },
  15906. "type": {
  15907. "type": "string"
  15908. },
  15909. "name": {
  15910. "type": "string"
  15911. },
  15912. "branch": {
  15913. "anyOf": [
  15914. {
  15915. "type": "string"
  15916. },
  15917. {
  15918. "type": "null"
  15919. }
  15920. ]
  15921. },
  15922. "directory": {
  15923. "anyOf": [
  15924. {
  15925. "type": "string"
  15926. },
  15927. {
  15928. "type": "null"
  15929. }
  15930. ]
  15931. },
  15932. "extra": {
  15933. "anyOf": [
  15934. {},
  15935. {
  15936. "type": "null"
  15937. }
  15938. ]
  15939. },
  15940. "projectID": {
  15941. "type": "string"
  15942. },
  15943. "timeUsed": {
  15944. "anyOf": [
  15945. {
  15946. "type": "number"
  15947. },
  15948. {
  15949. "type": "string",
  15950. "enum": ["NaN"]
  15951. },
  15952. {
  15953. "type": "string",
  15954. "enum": ["Infinity"]
  15955. },
  15956. {
  15957. "type": "string",
  15958. "enum": ["-Infinity"]
  15959. },
  15960. {
  15961. "type": "string",
  15962. "enum": ["Infinity", "-Infinity", "NaN"]
  15963. }
  15964. ]
  15965. }
  15966. },
  15967. "required": ["id", "type", "name", "projectID", "timeUsed"],
  15968. "additionalProperties": false
  15969. },
  15970. "WorkspaceWarpError": {
  15971. "type": "object",
  15972. "properties": {
  15973. "name": {
  15974. "type": "string",
  15975. "enum": ["WorkspaceWarpError"]
  15976. },
  15977. "data": {
  15978. "type": "object",
  15979. "properties": {
  15980. "message": {
  15981. "type": "string"
  15982. }
  15983. },
  15984. "required": ["message"],
  15985. "additionalProperties": false
  15986. }
  15987. },
  15988. "required": ["name", "data"],
  15989. "additionalProperties": false
  15990. },
  15991. "SyncEventMessageUpdated": {
  15992. "type": "object",
  15993. "properties": {
  15994. "type": {
  15995. "type": "string",
  15996. "enum": ["sync"]
  15997. },
  15998. "name": {
  15999. "type": "string",
  16000. "enum": ["message.updated.1"]
  16001. },
  16002. "id": {
  16003. "type": "string"
  16004. },
  16005. "seq": {
  16006. "type": "number"
  16007. },
  16008. "aggregateID": {
  16009. "type": "string",
  16010. "enum": ["sessionID"]
  16011. },
  16012. "data": {
  16013. "type": "object",
  16014. "properties": {
  16015. "sessionID": {
  16016. "type": "string",
  16017. "pattern": "^ses"
  16018. },
  16019. "info": {
  16020. "$ref": "#/components/schemas/Message"
  16021. }
  16022. },
  16023. "required": ["sessionID", "info"],
  16024. "additionalProperties": false
  16025. }
  16026. },
  16027. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16028. "additionalProperties": false
  16029. },
  16030. "SyncEventMessageRemoved": {
  16031. "type": "object",
  16032. "properties": {
  16033. "type": {
  16034. "type": "string",
  16035. "enum": ["sync"]
  16036. },
  16037. "name": {
  16038. "type": "string",
  16039. "enum": ["message.removed.1"]
  16040. },
  16041. "id": {
  16042. "type": "string"
  16043. },
  16044. "seq": {
  16045. "type": "number"
  16046. },
  16047. "aggregateID": {
  16048. "type": "string",
  16049. "enum": ["sessionID"]
  16050. },
  16051. "data": {
  16052. "type": "object",
  16053. "properties": {
  16054. "sessionID": {
  16055. "type": "string",
  16056. "pattern": "^ses"
  16057. },
  16058. "messageID": {
  16059. "type": "string",
  16060. "pattern": "^msg"
  16061. }
  16062. },
  16063. "required": ["sessionID", "messageID"],
  16064. "additionalProperties": false
  16065. }
  16066. },
  16067. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16068. "additionalProperties": false
  16069. },
  16070. "SyncEventMessagePartUpdated": {
  16071. "type": "object",
  16072. "properties": {
  16073. "type": {
  16074. "type": "string",
  16075. "enum": ["sync"]
  16076. },
  16077. "name": {
  16078. "type": "string",
  16079. "enum": ["message.part.updated.1"]
  16080. },
  16081. "id": {
  16082. "type": "string"
  16083. },
  16084. "seq": {
  16085. "type": "number"
  16086. },
  16087. "aggregateID": {
  16088. "type": "string",
  16089. "enum": ["sessionID"]
  16090. },
  16091. "data": {
  16092. "type": "object",
  16093. "properties": {
  16094. "sessionID": {
  16095. "type": "string",
  16096. "pattern": "^ses"
  16097. },
  16098. "part": {
  16099. "$ref": "#/components/schemas/Part"
  16100. },
  16101. "time": {
  16102. "type": "integer",
  16103. "minimum": 0
  16104. }
  16105. },
  16106. "required": ["sessionID", "part", "time"],
  16107. "additionalProperties": false
  16108. }
  16109. },
  16110. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16111. "additionalProperties": false
  16112. },
  16113. "SyncEventMessagePartRemoved": {
  16114. "type": "object",
  16115. "properties": {
  16116. "type": {
  16117. "type": "string",
  16118. "enum": ["sync"]
  16119. },
  16120. "name": {
  16121. "type": "string",
  16122. "enum": ["message.part.removed.1"]
  16123. },
  16124. "id": {
  16125. "type": "string"
  16126. },
  16127. "seq": {
  16128. "type": "number"
  16129. },
  16130. "aggregateID": {
  16131. "type": "string",
  16132. "enum": ["sessionID"]
  16133. },
  16134. "data": {
  16135. "type": "object",
  16136. "properties": {
  16137. "sessionID": {
  16138. "type": "string",
  16139. "pattern": "^ses"
  16140. },
  16141. "messageID": {
  16142. "type": "string",
  16143. "pattern": "^msg"
  16144. },
  16145. "partID": {
  16146. "type": "string",
  16147. "pattern": "^prt"
  16148. }
  16149. },
  16150. "required": ["sessionID", "messageID", "partID"],
  16151. "additionalProperties": false
  16152. }
  16153. },
  16154. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16155. "additionalProperties": false
  16156. },
  16157. "SyncEventSessionCreated": {
  16158. "type": "object",
  16159. "properties": {
  16160. "type": {
  16161. "type": "string",
  16162. "enum": ["sync"]
  16163. },
  16164. "name": {
  16165. "type": "string",
  16166. "enum": ["session.created.1"]
  16167. },
  16168. "id": {
  16169. "type": "string"
  16170. },
  16171. "seq": {
  16172. "type": "number"
  16173. },
  16174. "aggregateID": {
  16175. "type": "string",
  16176. "enum": ["sessionID"]
  16177. },
  16178. "data": {
  16179. "type": "object",
  16180. "properties": {
  16181. "sessionID": {
  16182. "type": "string",
  16183. "pattern": "^ses"
  16184. },
  16185. "info": {
  16186. "$ref": "#/components/schemas/Session"
  16187. }
  16188. },
  16189. "required": ["sessionID", "info"],
  16190. "additionalProperties": false
  16191. }
  16192. },
  16193. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16194. "additionalProperties": false
  16195. },
  16196. "SyncEventSessionUpdated": {
  16197. "type": "object",
  16198. "properties": {
  16199. "type": {
  16200. "type": "string",
  16201. "enum": ["sync"]
  16202. },
  16203. "name": {
  16204. "type": "string",
  16205. "enum": ["session.updated.1"]
  16206. },
  16207. "id": {
  16208. "type": "string"
  16209. },
  16210. "seq": {
  16211. "type": "number"
  16212. },
  16213. "aggregateID": {
  16214. "type": "string",
  16215. "enum": ["sessionID"]
  16216. },
  16217. "data": {
  16218. "type": "object",
  16219. "properties": {
  16220. "sessionID": {
  16221. "type": "string",
  16222. "pattern": "^ses"
  16223. },
  16224. "info": {
  16225. "type": "object",
  16226. "properties": {
  16227. "id": {
  16228. "anyOf": [
  16229. {
  16230. "type": "string",
  16231. "pattern": "^ses"
  16232. },
  16233. {
  16234. "type": "null"
  16235. }
  16236. ]
  16237. },
  16238. "slug": {
  16239. "anyOf": [
  16240. {
  16241. "type": "string"
  16242. },
  16243. {
  16244. "type": "null"
  16245. }
  16246. ]
  16247. },
  16248. "projectID": {
  16249. "anyOf": [
  16250. {
  16251. "type": "string"
  16252. },
  16253. {
  16254. "type": "null"
  16255. }
  16256. ]
  16257. },
  16258. "workspaceID": {
  16259. "anyOf": [
  16260. {
  16261. "type": "string",
  16262. "pattern": "^wrk"
  16263. },
  16264. {
  16265. "type": "null"
  16266. }
  16267. ]
  16268. },
  16269. "directory": {
  16270. "anyOf": [
  16271. {
  16272. "type": "string"
  16273. },
  16274. {
  16275. "type": "null"
  16276. }
  16277. ]
  16278. },
  16279. "path": {
  16280. "anyOf": [
  16281. {
  16282. "type": "string"
  16283. },
  16284. {
  16285. "type": "null"
  16286. }
  16287. ]
  16288. },
  16289. "parentID": {
  16290. "anyOf": [
  16291. {
  16292. "type": "string",
  16293. "pattern": "^ses"
  16294. },
  16295. {
  16296. "type": "null"
  16297. }
  16298. ]
  16299. },
  16300. "summary": {
  16301. "anyOf": [
  16302. {
  16303. "type": "object",
  16304. "properties": {
  16305. "additions": {
  16306. "type": "number"
  16307. },
  16308. "deletions": {
  16309. "type": "number"
  16310. },
  16311. "files": {
  16312. "type": "number"
  16313. },
  16314. "diffs": {
  16315. "type": "array",
  16316. "items": {
  16317. "$ref": "#/components/schemas/SnapshotFileDiff"
  16318. }
  16319. }
  16320. },
  16321. "required": ["additions", "deletions", "files"],
  16322. "additionalProperties": false
  16323. },
  16324. {
  16325. "type": "null"
  16326. }
  16327. ]
  16328. },
  16329. "cost": {
  16330. "anyOf": [
  16331. {
  16332. "type": "number"
  16333. },
  16334. {
  16335. "type": "null"
  16336. }
  16337. ]
  16338. },
  16339. "tokens": {
  16340. "anyOf": [
  16341. {
  16342. "type": "object",
  16343. "properties": {
  16344. "input": {
  16345. "type": "number"
  16346. },
  16347. "output": {
  16348. "type": "number"
  16349. },
  16350. "reasoning": {
  16351. "type": "number"
  16352. },
  16353. "cache": {
  16354. "type": "object",
  16355. "properties": {
  16356. "read": {
  16357. "type": "number"
  16358. },
  16359. "write": {
  16360. "type": "number"
  16361. }
  16362. },
  16363. "required": ["read", "write"],
  16364. "additionalProperties": false
  16365. }
  16366. },
  16367. "required": ["input", "output", "reasoning", "cache"],
  16368. "additionalProperties": false
  16369. },
  16370. {
  16371. "type": "null"
  16372. }
  16373. ]
  16374. },
  16375. "share": {
  16376. "type": "object",
  16377. "properties": {
  16378. "url": {
  16379. "anyOf": [
  16380. {
  16381. "type": "string"
  16382. },
  16383. {
  16384. "type": "null"
  16385. }
  16386. ]
  16387. }
  16388. },
  16389. "additionalProperties": false
  16390. },
  16391. "title": {
  16392. "anyOf": [
  16393. {
  16394. "type": "string"
  16395. },
  16396. {
  16397. "type": "null"
  16398. }
  16399. ]
  16400. },
  16401. "agent": {
  16402. "anyOf": [
  16403. {
  16404. "type": "string"
  16405. },
  16406. {
  16407. "type": "null"
  16408. }
  16409. ]
  16410. },
  16411. "model": {
  16412. "anyOf": [
  16413. {
  16414. "type": "object",
  16415. "properties": {
  16416. "id": {
  16417. "type": "string"
  16418. },
  16419. "providerID": {
  16420. "type": "string"
  16421. },
  16422. "variant": {
  16423. "type": "string"
  16424. }
  16425. },
  16426. "required": ["id", "providerID"],
  16427. "additionalProperties": false
  16428. },
  16429. {
  16430. "type": "null"
  16431. }
  16432. ]
  16433. },
  16434. "version": {
  16435. "anyOf": [
  16436. {
  16437. "type": "string"
  16438. },
  16439. {
  16440. "type": "null"
  16441. }
  16442. ]
  16443. },
  16444. "time": {
  16445. "type": "object",
  16446. "properties": {
  16447. "created": {
  16448. "anyOf": [
  16449. {
  16450. "type": "integer",
  16451. "minimum": 0
  16452. },
  16453. {
  16454. "type": "null"
  16455. }
  16456. ]
  16457. },
  16458. "updated": {
  16459. "anyOf": [
  16460. {
  16461. "type": "integer",
  16462. "minimum": 0
  16463. },
  16464. {
  16465. "type": "null"
  16466. }
  16467. ]
  16468. },
  16469. "compacting": {
  16470. "anyOf": [
  16471. {
  16472. "type": "integer",
  16473. "minimum": 0
  16474. },
  16475. {
  16476. "type": "null"
  16477. }
  16478. ]
  16479. },
  16480. "archived": {
  16481. "anyOf": [
  16482. {
  16483. "type": "number"
  16484. },
  16485. {
  16486. "type": "null"
  16487. }
  16488. ]
  16489. }
  16490. },
  16491. "additionalProperties": false
  16492. },
  16493. "permission": {
  16494. "anyOf": [
  16495. {
  16496. "$ref": "#/components/schemas/PermissionRuleset"
  16497. },
  16498. {
  16499. "type": "null"
  16500. }
  16501. ]
  16502. },
  16503. "revert": {
  16504. "anyOf": [
  16505. {
  16506. "type": "object",
  16507. "properties": {
  16508. "messageID": {
  16509. "type": "string",
  16510. "pattern": "^msg"
  16511. },
  16512. "partID": {
  16513. "type": "string",
  16514. "pattern": "^prt"
  16515. },
  16516. "snapshot": {
  16517. "type": "string"
  16518. },
  16519. "diff": {
  16520. "type": "string"
  16521. }
  16522. },
  16523. "required": ["messageID"],
  16524. "additionalProperties": false
  16525. },
  16526. {
  16527. "type": "null"
  16528. }
  16529. ]
  16530. }
  16531. },
  16532. "additionalProperties": false
  16533. }
  16534. },
  16535. "required": ["sessionID", "info"],
  16536. "additionalProperties": false
  16537. }
  16538. },
  16539. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16540. "additionalProperties": false
  16541. },
  16542. "SyncEventSessionDeleted": {
  16543. "type": "object",
  16544. "properties": {
  16545. "type": {
  16546. "type": "string",
  16547. "enum": ["sync"]
  16548. },
  16549. "name": {
  16550. "type": "string",
  16551. "enum": ["session.deleted.1"]
  16552. },
  16553. "id": {
  16554. "type": "string"
  16555. },
  16556. "seq": {
  16557. "type": "number"
  16558. },
  16559. "aggregateID": {
  16560. "type": "string",
  16561. "enum": ["sessionID"]
  16562. },
  16563. "data": {
  16564. "type": "object",
  16565. "properties": {
  16566. "sessionID": {
  16567. "type": "string",
  16568. "pattern": "^ses"
  16569. },
  16570. "info": {
  16571. "$ref": "#/components/schemas/Session"
  16572. }
  16573. },
  16574. "required": ["sessionID", "info"],
  16575. "additionalProperties": false
  16576. }
  16577. },
  16578. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16579. "additionalProperties": false
  16580. },
  16581. "SyncEventSessionNextAgentSwitched": {
  16582. "type": "object",
  16583. "properties": {
  16584. "type": {
  16585. "type": "string",
  16586. "enum": ["sync"]
  16587. },
  16588. "name": {
  16589. "type": "string",
  16590. "enum": ["session.next.agent.switched.1"]
  16591. },
  16592. "id": {
  16593. "type": "string"
  16594. },
  16595. "seq": {
  16596. "type": "number"
  16597. },
  16598. "aggregateID": {
  16599. "type": "string",
  16600. "enum": ["sessionID"]
  16601. },
  16602. "data": {
  16603. "type": "object",
  16604. "properties": {
  16605. "timestamp": {
  16606. "type": "number"
  16607. },
  16608. "sessionID": {
  16609. "type": "string",
  16610. "pattern": "^ses"
  16611. },
  16612. "agent": {
  16613. "type": "string"
  16614. }
  16615. },
  16616. "required": ["timestamp", "sessionID", "agent"],
  16617. "additionalProperties": false
  16618. }
  16619. },
  16620. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16621. "additionalProperties": false
  16622. },
  16623. "SyncEventSessionNextModelSwitched": {
  16624. "type": "object",
  16625. "properties": {
  16626. "type": {
  16627. "type": "string",
  16628. "enum": ["sync"]
  16629. },
  16630. "name": {
  16631. "type": "string",
  16632. "enum": ["session.next.model.switched.1"]
  16633. },
  16634. "id": {
  16635. "type": "string"
  16636. },
  16637. "seq": {
  16638. "type": "number"
  16639. },
  16640. "aggregateID": {
  16641. "type": "string",
  16642. "enum": ["sessionID"]
  16643. },
  16644. "data": {
  16645. "type": "object",
  16646. "properties": {
  16647. "timestamp": {
  16648. "type": "number"
  16649. },
  16650. "sessionID": {
  16651. "type": "string",
  16652. "pattern": "^ses"
  16653. },
  16654. "model": {
  16655. "type": "object",
  16656. "properties": {
  16657. "id": {
  16658. "type": "string"
  16659. },
  16660. "providerID": {
  16661. "type": "string"
  16662. },
  16663. "variant": {
  16664. "type": "string"
  16665. }
  16666. },
  16667. "required": ["id", "providerID", "variant"],
  16668. "additionalProperties": false
  16669. }
  16670. },
  16671. "required": ["timestamp", "sessionID", "model"],
  16672. "additionalProperties": false
  16673. }
  16674. },
  16675. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16676. "additionalProperties": false
  16677. },
  16678. "SyncEventSessionNextPrompted": {
  16679. "type": "object",
  16680. "properties": {
  16681. "type": {
  16682. "type": "string",
  16683. "enum": ["sync"]
  16684. },
  16685. "name": {
  16686. "type": "string",
  16687. "enum": ["session.next.prompted.1"]
  16688. },
  16689. "id": {
  16690. "type": "string"
  16691. },
  16692. "seq": {
  16693. "type": "number"
  16694. },
  16695. "aggregateID": {
  16696. "type": "string",
  16697. "enum": ["sessionID"]
  16698. },
  16699. "data": {
  16700. "type": "object",
  16701. "properties": {
  16702. "timestamp": {
  16703. "type": "number"
  16704. },
  16705. "sessionID": {
  16706. "type": "string",
  16707. "pattern": "^ses"
  16708. },
  16709. "prompt": {
  16710. "$ref": "#/components/schemas/Prompt"
  16711. }
  16712. },
  16713. "required": ["timestamp", "sessionID", "prompt"],
  16714. "additionalProperties": false
  16715. }
  16716. },
  16717. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16718. "additionalProperties": false
  16719. },
  16720. "SyncEventSessionNextSynthetic": {
  16721. "type": "object",
  16722. "properties": {
  16723. "type": {
  16724. "type": "string",
  16725. "enum": ["sync"]
  16726. },
  16727. "name": {
  16728. "type": "string",
  16729. "enum": ["session.next.synthetic.1"]
  16730. },
  16731. "id": {
  16732. "type": "string"
  16733. },
  16734. "seq": {
  16735. "type": "number"
  16736. },
  16737. "aggregateID": {
  16738. "type": "string",
  16739. "enum": ["sessionID"]
  16740. },
  16741. "data": {
  16742. "type": "object",
  16743. "properties": {
  16744. "timestamp": {
  16745. "type": "number"
  16746. },
  16747. "sessionID": {
  16748. "type": "string",
  16749. "pattern": "^ses"
  16750. },
  16751. "text": {
  16752. "type": "string"
  16753. }
  16754. },
  16755. "required": ["timestamp", "sessionID", "text"],
  16756. "additionalProperties": false
  16757. }
  16758. },
  16759. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16760. "additionalProperties": false
  16761. },
  16762. "SyncEventSessionNextShellStarted": {
  16763. "type": "object",
  16764. "properties": {
  16765. "type": {
  16766. "type": "string",
  16767. "enum": ["sync"]
  16768. },
  16769. "name": {
  16770. "type": "string",
  16771. "enum": ["session.next.shell.started.1"]
  16772. },
  16773. "id": {
  16774. "type": "string"
  16775. },
  16776. "seq": {
  16777. "type": "number"
  16778. },
  16779. "aggregateID": {
  16780. "type": "string",
  16781. "enum": ["sessionID"]
  16782. },
  16783. "data": {
  16784. "type": "object",
  16785. "properties": {
  16786. "timestamp": {
  16787. "type": "number"
  16788. },
  16789. "sessionID": {
  16790. "type": "string",
  16791. "pattern": "^ses"
  16792. },
  16793. "callID": {
  16794. "type": "string"
  16795. },
  16796. "command": {
  16797. "type": "string"
  16798. }
  16799. },
  16800. "required": ["timestamp", "sessionID", "callID", "command"],
  16801. "additionalProperties": false
  16802. }
  16803. },
  16804. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16805. "additionalProperties": false
  16806. },
  16807. "SyncEventSessionNextShellEnded": {
  16808. "type": "object",
  16809. "properties": {
  16810. "type": {
  16811. "type": "string",
  16812. "enum": ["sync"]
  16813. },
  16814. "name": {
  16815. "type": "string",
  16816. "enum": ["session.next.shell.ended.1"]
  16817. },
  16818. "id": {
  16819. "type": "string"
  16820. },
  16821. "seq": {
  16822. "type": "number"
  16823. },
  16824. "aggregateID": {
  16825. "type": "string",
  16826. "enum": ["sessionID"]
  16827. },
  16828. "data": {
  16829. "type": "object",
  16830. "properties": {
  16831. "timestamp": {
  16832. "type": "number"
  16833. },
  16834. "sessionID": {
  16835. "type": "string",
  16836. "pattern": "^ses"
  16837. },
  16838. "callID": {
  16839. "type": "string"
  16840. },
  16841. "output": {
  16842. "type": "string"
  16843. }
  16844. },
  16845. "required": ["timestamp", "sessionID", "callID", "output"],
  16846. "additionalProperties": false
  16847. }
  16848. },
  16849. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16850. "additionalProperties": false
  16851. },
  16852. "SyncEventSessionNextStepStarted": {
  16853. "type": "object",
  16854. "properties": {
  16855. "type": {
  16856. "type": "string",
  16857. "enum": ["sync"]
  16858. },
  16859. "name": {
  16860. "type": "string",
  16861. "enum": ["session.next.step.started.1"]
  16862. },
  16863. "id": {
  16864. "type": "string"
  16865. },
  16866. "seq": {
  16867. "type": "number"
  16868. },
  16869. "aggregateID": {
  16870. "type": "string",
  16871. "enum": ["sessionID"]
  16872. },
  16873. "data": {
  16874. "type": "object",
  16875. "properties": {
  16876. "timestamp": {
  16877. "type": "number"
  16878. },
  16879. "sessionID": {
  16880. "type": "string",
  16881. "pattern": "^ses"
  16882. },
  16883. "agent": {
  16884. "type": "string"
  16885. },
  16886. "model": {
  16887. "type": "object",
  16888. "properties": {
  16889. "id": {
  16890. "type": "string"
  16891. },
  16892. "providerID": {
  16893. "type": "string"
  16894. },
  16895. "variant": {
  16896. "type": "string"
  16897. }
  16898. },
  16899. "required": ["id", "providerID", "variant"],
  16900. "additionalProperties": false
  16901. },
  16902. "snapshot": {
  16903. "type": "string"
  16904. }
  16905. },
  16906. "required": ["timestamp", "sessionID", "agent", "model"],
  16907. "additionalProperties": false
  16908. }
  16909. },
  16910. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16911. "additionalProperties": false
  16912. },
  16913. "SyncEventSessionNextStepEnded": {
  16914. "type": "object",
  16915. "properties": {
  16916. "type": {
  16917. "type": "string",
  16918. "enum": ["sync"]
  16919. },
  16920. "name": {
  16921. "type": "string",
  16922. "enum": ["session.next.step.ended.1"]
  16923. },
  16924. "id": {
  16925. "type": "string"
  16926. },
  16927. "seq": {
  16928. "type": "number"
  16929. },
  16930. "aggregateID": {
  16931. "type": "string",
  16932. "enum": ["sessionID"]
  16933. },
  16934. "data": {
  16935. "type": "object",
  16936. "properties": {
  16937. "timestamp": {
  16938. "type": "number"
  16939. },
  16940. "sessionID": {
  16941. "type": "string",
  16942. "pattern": "^ses"
  16943. },
  16944. "finish": {
  16945. "type": "string"
  16946. },
  16947. "cost": {
  16948. "type": "number"
  16949. },
  16950. "tokens": {
  16951. "type": "object",
  16952. "properties": {
  16953. "input": {
  16954. "type": "number"
  16955. },
  16956. "output": {
  16957. "type": "number"
  16958. },
  16959. "reasoning": {
  16960. "type": "number"
  16961. },
  16962. "cache": {
  16963. "type": "object",
  16964. "properties": {
  16965. "read": {
  16966. "type": "number"
  16967. },
  16968. "write": {
  16969. "type": "number"
  16970. }
  16971. },
  16972. "required": ["read", "write"],
  16973. "additionalProperties": false
  16974. }
  16975. },
  16976. "required": ["input", "output", "reasoning", "cache"],
  16977. "additionalProperties": false
  16978. },
  16979. "snapshot": {
  16980. "type": "string"
  16981. }
  16982. },
  16983. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  16984. "additionalProperties": false
  16985. }
  16986. },
  16987. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16988. "additionalProperties": false
  16989. },
  16990. "SyncEventSessionNextStepFailed": {
  16991. "type": "object",
  16992. "properties": {
  16993. "type": {
  16994. "type": "string",
  16995. "enum": ["sync"]
  16996. },
  16997. "name": {
  16998. "type": "string",
  16999. "enum": ["session.next.step.failed.1"]
  17000. },
  17001. "id": {
  17002. "type": "string"
  17003. },
  17004. "seq": {
  17005. "type": "number"
  17006. },
  17007. "aggregateID": {
  17008. "type": "string",
  17009. "enum": ["sessionID"]
  17010. },
  17011. "data": {
  17012. "type": "object",
  17013. "properties": {
  17014. "timestamp": {
  17015. "type": "number"
  17016. },
  17017. "sessionID": {
  17018. "type": "string",
  17019. "pattern": "^ses"
  17020. },
  17021. "error": {
  17022. "$ref": "#/components/schemas/SessionErrorUnknown"
  17023. }
  17024. },
  17025. "required": ["timestamp", "sessionID", "error"],
  17026. "additionalProperties": false
  17027. }
  17028. },
  17029. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17030. "additionalProperties": false
  17031. },
  17032. "SyncEventSessionNextTextStarted": {
  17033. "type": "object",
  17034. "properties": {
  17035. "type": {
  17036. "type": "string",
  17037. "enum": ["sync"]
  17038. },
  17039. "name": {
  17040. "type": "string",
  17041. "enum": ["session.next.text.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. },
  17064. "required": ["timestamp", "sessionID"],
  17065. "additionalProperties": false
  17066. }
  17067. },
  17068. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17069. "additionalProperties": false
  17070. },
  17071. "SyncEventSessionNextTextDelta": {
  17072. "type": "object",
  17073. "properties": {
  17074. "type": {
  17075. "type": "string",
  17076. "enum": ["sync"]
  17077. },
  17078. "name": {
  17079. "type": "string",
  17080. "enum": ["session.next.text.delta.1"]
  17081. },
  17082. "id": {
  17083. "type": "string"
  17084. },
  17085. "seq": {
  17086. "type": "number"
  17087. },
  17088. "aggregateID": {
  17089. "type": "string",
  17090. "enum": ["sessionID"]
  17091. },
  17092. "data": {
  17093. "type": "object",
  17094. "properties": {
  17095. "timestamp": {
  17096. "type": "number"
  17097. },
  17098. "sessionID": {
  17099. "type": "string",
  17100. "pattern": "^ses"
  17101. },
  17102. "delta": {
  17103. "type": "string"
  17104. }
  17105. },
  17106. "required": ["timestamp", "sessionID", "delta"],
  17107. "additionalProperties": false
  17108. }
  17109. },
  17110. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17111. "additionalProperties": false
  17112. },
  17113. "SyncEventSessionNextTextEnded": {
  17114. "type": "object",
  17115. "properties": {
  17116. "type": {
  17117. "type": "string",
  17118. "enum": ["sync"]
  17119. },
  17120. "name": {
  17121. "type": "string",
  17122. "enum": ["session.next.text.ended.1"]
  17123. },
  17124. "id": {
  17125. "type": "string"
  17126. },
  17127. "seq": {
  17128. "type": "number"
  17129. },
  17130. "aggregateID": {
  17131. "type": "string",
  17132. "enum": ["sessionID"]
  17133. },
  17134. "data": {
  17135. "type": "object",
  17136. "properties": {
  17137. "timestamp": {
  17138. "type": "number"
  17139. },
  17140. "sessionID": {
  17141. "type": "string",
  17142. "pattern": "^ses"
  17143. },
  17144. "text": {
  17145. "type": "string"
  17146. }
  17147. },
  17148. "required": ["timestamp", "sessionID", "text"],
  17149. "additionalProperties": false
  17150. }
  17151. },
  17152. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17153. "additionalProperties": false
  17154. },
  17155. "SyncEventSessionNextReasoningStarted": {
  17156. "type": "object",
  17157. "properties": {
  17158. "type": {
  17159. "type": "string",
  17160. "enum": ["sync"]
  17161. },
  17162. "name": {
  17163. "type": "string",
  17164. "enum": ["session.next.reasoning.started.1"]
  17165. },
  17166. "id": {
  17167. "type": "string"
  17168. },
  17169. "seq": {
  17170. "type": "number"
  17171. },
  17172. "aggregateID": {
  17173. "type": "string",
  17174. "enum": ["sessionID"]
  17175. },
  17176. "data": {
  17177. "type": "object",
  17178. "properties": {
  17179. "timestamp": {
  17180. "type": "number"
  17181. },
  17182. "sessionID": {
  17183. "type": "string",
  17184. "pattern": "^ses"
  17185. },
  17186. "reasoningID": {
  17187. "type": "string"
  17188. }
  17189. },
  17190. "required": ["timestamp", "sessionID", "reasoningID"],
  17191. "additionalProperties": false
  17192. }
  17193. },
  17194. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17195. "additionalProperties": false
  17196. },
  17197. "SyncEventSessionNextReasoningDelta": {
  17198. "type": "object",
  17199. "properties": {
  17200. "type": {
  17201. "type": "string",
  17202. "enum": ["sync"]
  17203. },
  17204. "name": {
  17205. "type": "string",
  17206. "enum": ["session.next.reasoning.delta.1"]
  17207. },
  17208. "id": {
  17209. "type": "string"
  17210. },
  17211. "seq": {
  17212. "type": "number"
  17213. },
  17214. "aggregateID": {
  17215. "type": "string",
  17216. "enum": ["sessionID"]
  17217. },
  17218. "data": {
  17219. "type": "object",
  17220. "properties": {
  17221. "timestamp": {
  17222. "type": "number"
  17223. },
  17224. "sessionID": {
  17225. "type": "string",
  17226. "pattern": "^ses"
  17227. },
  17228. "reasoningID": {
  17229. "type": "string"
  17230. },
  17231. "delta": {
  17232. "type": "string"
  17233. }
  17234. },
  17235. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17236. "additionalProperties": false
  17237. }
  17238. },
  17239. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17240. "additionalProperties": false
  17241. },
  17242. "SyncEventSessionNextReasoningEnded": {
  17243. "type": "object",
  17244. "properties": {
  17245. "type": {
  17246. "type": "string",
  17247. "enum": ["sync"]
  17248. },
  17249. "name": {
  17250. "type": "string",
  17251. "enum": ["session.next.reasoning.ended.1"]
  17252. },
  17253. "id": {
  17254. "type": "string"
  17255. },
  17256. "seq": {
  17257. "type": "number"
  17258. },
  17259. "aggregateID": {
  17260. "type": "string",
  17261. "enum": ["sessionID"]
  17262. },
  17263. "data": {
  17264. "type": "object",
  17265. "properties": {
  17266. "timestamp": {
  17267. "type": "number"
  17268. },
  17269. "sessionID": {
  17270. "type": "string",
  17271. "pattern": "^ses"
  17272. },
  17273. "reasoningID": {
  17274. "type": "string"
  17275. },
  17276. "text": {
  17277. "type": "string"
  17278. }
  17279. },
  17280. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17281. "additionalProperties": false
  17282. }
  17283. },
  17284. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17285. "additionalProperties": false
  17286. },
  17287. "SyncEventSessionNextToolInputStarted": {
  17288. "type": "object",
  17289. "properties": {
  17290. "type": {
  17291. "type": "string",
  17292. "enum": ["sync"]
  17293. },
  17294. "name": {
  17295. "type": "string",
  17296. "enum": ["session.next.tool.input.started.1"]
  17297. },
  17298. "id": {
  17299. "type": "string"
  17300. },
  17301. "seq": {
  17302. "type": "number"
  17303. },
  17304. "aggregateID": {
  17305. "type": "string",
  17306. "enum": ["sessionID"]
  17307. },
  17308. "data": {
  17309. "type": "object",
  17310. "properties": {
  17311. "timestamp": {
  17312. "type": "number"
  17313. },
  17314. "sessionID": {
  17315. "type": "string",
  17316. "pattern": "^ses"
  17317. },
  17318. "callID": {
  17319. "type": "string"
  17320. },
  17321. "name": {
  17322. "type": "string"
  17323. }
  17324. },
  17325. "required": ["timestamp", "sessionID", "callID", "name"],
  17326. "additionalProperties": false
  17327. }
  17328. },
  17329. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17330. "additionalProperties": false
  17331. },
  17332. "SyncEventSessionNextToolInputDelta": {
  17333. "type": "object",
  17334. "properties": {
  17335. "type": {
  17336. "type": "string",
  17337. "enum": ["sync"]
  17338. },
  17339. "name": {
  17340. "type": "string",
  17341. "enum": ["session.next.tool.input.delta.1"]
  17342. },
  17343. "id": {
  17344. "type": "string"
  17345. },
  17346. "seq": {
  17347. "type": "number"
  17348. },
  17349. "aggregateID": {
  17350. "type": "string",
  17351. "enum": ["sessionID"]
  17352. },
  17353. "data": {
  17354. "type": "object",
  17355. "properties": {
  17356. "timestamp": {
  17357. "type": "number"
  17358. },
  17359. "sessionID": {
  17360. "type": "string",
  17361. "pattern": "^ses"
  17362. },
  17363. "callID": {
  17364. "type": "string"
  17365. },
  17366. "delta": {
  17367. "type": "string"
  17368. }
  17369. },
  17370. "required": ["timestamp", "sessionID", "callID", "delta"],
  17371. "additionalProperties": false
  17372. }
  17373. },
  17374. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17375. "additionalProperties": false
  17376. },
  17377. "SyncEventSessionNextToolInputEnded": {
  17378. "type": "object",
  17379. "properties": {
  17380. "type": {
  17381. "type": "string",
  17382. "enum": ["sync"]
  17383. },
  17384. "name": {
  17385. "type": "string",
  17386. "enum": ["session.next.tool.input.ended.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. "callID": {
  17409. "type": "string"
  17410. },
  17411. "text": {
  17412. "type": "string"
  17413. }
  17414. },
  17415. "required": ["timestamp", "sessionID", "callID", "text"],
  17416. "additionalProperties": false
  17417. }
  17418. },
  17419. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17420. "additionalProperties": false
  17421. },
  17422. "SyncEventSessionNextToolCalled": {
  17423. "type": "object",
  17424. "properties": {
  17425. "type": {
  17426. "type": "string",
  17427. "enum": ["sync"]
  17428. },
  17429. "name": {
  17430. "type": "string",
  17431. "enum": ["session.next.tool.called.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. "callID": {
  17454. "type": "string"
  17455. },
  17456. "tool": {
  17457. "type": "string"
  17458. },
  17459. "input": {
  17460. "type": "object"
  17461. },
  17462. "provider": {
  17463. "type": "object",
  17464. "properties": {
  17465. "executed": {
  17466. "type": "boolean"
  17467. },
  17468. "metadata": {
  17469. "type": "object"
  17470. }
  17471. },
  17472. "required": ["executed"],
  17473. "additionalProperties": false
  17474. }
  17475. },
  17476. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17477. "additionalProperties": false
  17478. }
  17479. },
  17480. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17481. "additionalProperties": false
  17482. },
  17483. "SyncEventSessionNextToolProgress": {
  17484. "type": "object",
  17485. "properties": {
  17486. "type": {
  17487. "type": "string",
  17488. "enum": ["sync"]
  17489. },
  17490. "name": {
  17491. "type": "string",
  17492. "enum": ["session.next.tool.progress.1"]
  17493. },
  17494. "id": {
  17495. "type": "string"
  17496. },
  17497. "seq": {
  17498. "type": "number"
  17499. },
  17500. "aggregateID": {
  17501. "type": "string",
  17502. "enum": ["sessionID"]
  17503. },
  17504. "data": {
  17505. "type": "object",
  17506. "properties": {
  17507. "timestamp": {
  17508. "type": "number"
  17509. },
  17510. "sessionID": {
  17511. "type": "string",
  17512. "pattern": "^ses"
  17513. },
  17514. "callID": {
  17515. "type": "string"
  17516. },
  17517. "structured": {
  17518. "type": "object"
  17519. },
  17520. "content": {
  17521. "type": "array",
  17522. "items": {
  17523. "anyOf": [
  17524. {
  17525. "$ref": "#/components/schemas/ToolTextContent"
  17526. },
  17527. {
  17528. "$ref": "#/components/schemas/ToolFileContent"
  17529. }
  17530. ]
  17531. }
  17532. }
  17533. },
  17534. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17535. "additionalProperties": false
  17536. }
  17537. },
  17538. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17539. "additionalProperties": false
  17540. },
  17541. "SyncEventSessionNextToolSuccess": {
  17542. "type": "object",
  17543. "properties": {
  17544. "type": {
  17545. "type": "string",
  17546. "enum": ["sync"]
  17547. },
  17548. "name": {
  17549. "type": "string",
  17550. "enum": ["session.next.tool.success.1"]
  17551. },
  17552. "id": {
  17553. "type": "string"
  17554. },
  17555. "seq": {
  17556. "type": "number"
  17557. },
  17558. "aggregateID": {
  17559. "type": "string",
  17560. "enum": ["sessionID"]
  17561. },
  17562. "data": {
  17563. "type": "object",
  17564. "properties": {
  17565. "timestamp": {
  17566. "type": "number"
  17567. },
  17568. "sessionID": {
  17569. "type": "string",
  17570. "pattern": "^ses"
  17571. },
  17572. "callID": {
  17573. "type": "string"
  17574. },
  17575. "structured": {
  17576. "type": "object"
  17577. },
  17578. "content": {
  17579. "type": "array",
  17580. "items": {
  17581. "anyOf": [
  17582. {
  17583. "$ref": "#/components/schemas/ToolTextContent"
  17584. },
  17585. {
  17586. "$ref": "#/components/schemas/ToolFileContent"
  17587. }
  17588. ]
  17589. }
  17590. },
  17591. "provider": {
  17592. "type": "object",
  17593. "properties": {
  17594. "executed": {
  17595. "type": "boolean"
  17596. },
  17597. "metadata": {
  17598. "type": "object"
  17599. }
  17600. },
  17601. "required": ["executed"],
  17602. "additionalProperties": false
  17603. }
  17604. },
  17605. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17606. "additionalProperties": false
  17607. }
  17608. },
  17609. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17610. "additionalProperties": false
  17611. },
  17612. "SyncEventSessionNextToolFailed": {
  17613. "type": "object",
  17614. "properties": {
  17615. "type": {
  17616. "type": "string",
  17617. "enum": ["sync"]
  17618. },
  17619. "name": {
  17620. "type": "string",
  17621. "enum": ["session.next.tool.failed.1"]
  17622. },
  17623. "id": {
  17624. "type": "string"
  17625. },
  17626. "seq": {
  17627. "type": "number"
  17628. },
  17629. "aggregateID": {
  17630. "type": "string",
  17631. "enum": ["sessionID"]
  17632. },
  17633. "data": {
  17634. "type": "object",
  17635. "properties": {
  17636. "timestamp": {
  17637. "type": "number"
  17638. },
  17639. "sessionID": {
  17640. "type": "string",
  17641. "pattern": "^ses"
  17642. },
  17643. "callID": {
  17644. "type": "string"
  17645. },
  17646. "error": {
  17647. "$ref": "#/components/schemas/SessionErrorUnknown"
  17648. },
  17649. "provider": {
  17650. "type": "object",
  17651. "properties": {
  17652. "executed": {
  17653. "type": "boolean"
  17654. },
  17655. "metadata": {
  17656. "type": "object"
  17657. }
  17658. },
  17659. "required": ["executed"],
  17660. "additionalProperties": false
  17661. }
  17662. },
  17663. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17664. "additionalProperties": false
  17665. }
  17666. },
  17667. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17668. "additionalProperties": false
  17669. },
  17670. "SyncEventSessionNextRetried": {
  17671. "type": "object",
  17672. "properties": {
  17673. "type": {
  17674. "type": "string",
  17675. "enum": ["sync"]
  17676. },
  17677. "name": {
  17678. "type": "string",
  17679. "enum": ["session.next.retried.1"]
  17680. },
  17681. "id": {
  17682. "type": "string"
  17683. },
  17684. "seq": {
  17685. "type": "number"
  17686. },
  17687. "aggregateID": {
  17688. "type": "string",
  17689. "enum": ["sessionID"]
  17690. },
  17691. "data": {
  17692. "type": "object",
  17693. "properties": {
  17694. "timestamp": {
  17695. "type": "number"
  17696. },
  17697. "sessionID": {
  17698. "type": "string",
  17699. "pattern": "^ses"
  17700. },
  17701. "attempt": {
  17702. "type": "number"
  17703. },
  17704. "error": {
  17705. "$ref": "#/components/schemas/SessionNextRetry_error"
  17706. }
  17707. },
  17708. "required": ["timestamp", "sessionID", "attempt", "error"],
  17709. "additionalProperties": false
  17710. }
  17711. },
  17712. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17713. "additionalProperties": false
  17714. },
  17715. "SyncEventSessionNextCompactionStarted": {
  17716. "type": "object",
  17717. "properties": {
  17718. "type": {
  17719. "type": "string",
  17720. "enum": ["sync"]
  17721. },
  17722. "name": {
  17723. "type": "string",
  17724. "enum": ["session.next.compaction.started.1"]
  17725. },
  17726. "id": {
  17727. "type": "string"
  17728. },
  17729. "seq": {
  17730. "type": "number"
  17731. },
  17732. "aggregateID": {
  17733. "type": "string",
  17734. "enum": ["sessionID"]
  17735. },
  17736. "data": {
  17737. "type": "object",
  17738. "properties": {
  17739. "timestamp": {
  17740. "type": "number"
  17741. },
  17742. "sessionID": {
  17743. "type": "string",
  17744. "pattern": "^ses"
  17745. },
  17746. "reason": {
  17747. "type": "string",
  17748. "enum": ["auto", "manual"]
  17749. }
  17750. },
  17751. "required": ["timestamp", "sessionID", "reason"],
  17752. "additionalProperties": false
  17753. }
  17754. },
  17755. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17756. "additionalProperties": false
  17757. },
  17758. "SyncEventSessionNextCompactionDelta": {
  17759. "type": "object",
  17760. "properties": {
  17761. "type": {
  17762. "type": "string",
  17763. "enum": ["sync"]
  17764. },
  17765. "name": {
  17766. "type": "string",
  17767. "enum": ["session.next.compaction.delta.1"]
  17768. },
  17769. "id": {
  17770. "type": "string"
  17771. },
  17772. "seq": {
  17773. "type": "number"
  17774. },
  17775. "aggregateID": {
  17776. "type": "string",
  17777. "enum": ["sessionID"]
  17778. },
  17779. "data": {
  17780. "type": "object",
  17781. "properties": {
  17782. "timestamp": {
  17783. "type": "number"
  17784. },
  17785. "sessionID": {
  17786. "type": "string",
  17787. "pattern": "^ses"
  17788. },
  17789. "text": {
  17790. "type": "string"
  17791. }
  17792. },
  17793. "required": ["timestamp", "sessionID", "text"],
  17794. "additionalProperties": false
  17795. }
  17796. },
  17797. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17798. "additionalProperties": false
  17799. },
  17800. "SyncEventSessionNextCompactionEnded": {
  17801. "type": "object",
  17802. "properties": {
  17803. "type": {
  17804. "type": "string",
  17805. "enum": ["sync"]
  17806. },
  17807. "name": {
  17808. "type": "string",
  17809. "enum": ["session.next.compaction.ended.1"]
  17810. },
  17811. "id": {
  17812. "type": "string"
  17813. },
  17814. "seq": {
  17815. "type": "number"
  17816. },
  17817. "aggregateID": {
  17818. "type": "string",
  17819. "enum": ["sessionID"]
  17820. },
  17821. "data": {
  17822. "type": "object",
  17823. "properties": {
  17824. "timestamp": {
  17825. "type": "number"
  17826. },
  17827. "sessionID": {
  17828. "type": "string",
  17829. "pattern": "^ses"
  17830. },
  17831. "text": {
  17832. "type": "string"
  17833. },
  17834. "include": {
  17835. "type": "string"
  17836. }
  17837. },
  17838. "required": ["timestamp", "sessionID", "text"],
  17839. "additionalProperties": false
  17840. }
  17841. },
  17842. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17843. "additionalProperties": false
  17844. },
  17845. "EventServerConnected": {
  17846. "type": "object",
  17847. "properties": {
  17848. "id": {
  17849. "type": "string"
  17850. },
  17851. "type": {
  17852. "type": "string",
  17853. "enum": ["server.connected"]
  17854. },
  17855. "properties": {
  17856. "type": "object",
  17857. "properties": {}
  17858. }
  17859. },
  17860. "required": ["id", "type", "properties"],
  17861. "additionalProperties": false
  17862. },
  17863. "EventGlobalDisposed": {
  17864. "type": "object",
  17865. "properties": {
  17866. "id": {
  17867. "type": "string"
  17868. },
  17869. "type": {
  17870. "type": "string",
  17871. "enum": ["global.disposed"]
  17872. },
  17873. "properties": {
  17874. "type": "object",
  17875. "properties": {}
  17876. }
  17877. },
  17878. "required": ["id", "type", "properties"],
  17879. "additionalProperties": false
  17880. },
  17881. "EventServerInstanceDisposed": {
  17882. "type": "object",
  17883. "properties": {
  17884. "id": {
  17885. "type": "string"
  17886. },
  17887. "type": {
  17888. "type": "string",
  17889. "enum": ["server.instance.disposed"]
  17890. },
  17891. "properties": {
  17892. "type": "object",
  17893. "properties": {
  17894. "directory": {
  17895. "type": "string"
  17896. }
  17897. },
  17898. "required": ["directory"],
  17899. "additionalProperties": false
  17900. }
  17901. },
  17902. "required": ["id", "type", "properties"],
  17903. "additionalProperties": false
  17904. },
  17905. "EventFileEdited": {
  17906. "type": "object",
  17907. "properties": {
  17908. "id": {
  17909. "type": "string"
  17910. },
  17911. "type": {
  17912. "type": "string",
  17913. "enum": ["file.edited"]
  17914. },
  17915. "properties": {
  17916. "type": "object",
  17917. "properties": {
  17918. "file": {
  17919. "type": "string"
  17920. }
  17921. },
  17922. "required": ["file"],
  17923. "additionalProperties": false
  17924. }
  17925. },
  17926. "required": ["id", "type", "properties"],
  17927. "additionalProperties": false
  17928. },
  17929. "EventFileWatcherUpdated": {
  17930. "type": "object",
  17931. "properties": {
  17932. "id": {
  17933. "type": "string"
  17934. },
  17935. "type": {
  17936. "type": "string",
  17937. "enum": ["file.watcher.updated"]
  17938. },
  17939. "properties": {
  17940. "type": "object",
  17941. "properties": {
  17942. "file": {
  17943. "type": "string"
  17944. },
  17945. "event": {
  17946. "type": "string",
  17947. "enum": ["add", "change", "unlink"]
  17948. }
  17949. },
  17950. "required": ["file", "event"],
  17951. "additionalProperties": false
  17952. }
  17953. },
  17954. "required": ["id", "type", "properties"],
  17955. "additionalProperties": false
  17956. },
  17957. "EventLspClientDiagnostics": {
  17958. "type": "object",
  17959. "properties": {
  17960. "id": {
  17961. "type": "string"
  17962. },
  17963. "type": {
  17964. "type": "string",
  17965. "enum": ["lsp.client.diagnostics"]
  17966. },
  17967. "properties": {
  17968. "type": "object",
  17969. "properties": {
  17970. "serverID": {
  17971. "type": "string"
  17972. },
  17973. "path": {
  17974. "type": "string"
  17975. }
  17976. },
  17977. "required": ["serverID", "path"],
  17978. "additionalProperties": false
  17979. }
  17980. },
  17981. "required": ["id", "type", "properties"],
  17982. "additionalProperties": false
  17983. },
  17984. "EventLspUpdated": {
  17985. "type": "object",
  17986. "properties": {
  17987. "id": {
  17988. "type": "string"
  17989. },
  17990. "type": {
  17991. "type": "string",
  17992. "enum": ["lsp.updated"]
  17993. },
  17994. "properties": {
  17995. "type": "object",
  17996. "properties": {}
  17997. }
  17998. },
  17999. "required": ["id", "type", "properties"],
  18000. "additionalProperties": false
  18001. },
  18002. "EventMessagePartDelta": {
  18003. "type": "object",
  18004. "properties": {
  18005. "id": {
  18006. "type": "string"
  18007. },
  18008. "type": {
  18009. "type": "string",
  18010. "enum": ["message.part.delta"]
  18011. },
  18012. "properties": {
  18013. "type": "object",
  18014. "properties": {
  18015. "sessionID": {
  18016. "type": "string",
  18017. "pattern": "^ses"
  18018. },
  18019. "messageID": {
  18020. "type": "string",
  18021. "pattern": "^msg"
  18022. },
  18023. "partID": {
  18024. "type": "string",
  18025. "pattern": "^prt"
  18026. },
  18027. "field": {
  18028. "type": "string"
  18029. },
  18030. "delta": {
  18031. "type": "string"
  18032. }
  18033. },
  18034. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18035. "additionalProperties": false
  18036. }
  18037. },
  18038. "required": ["id", "type", "properties"],
  18039. "additionalProperties": false
  18040. },
  18041. "EventPermissionAsked": {
  18042. "type": "object",
  18043. "properties": {
  18044. "id": {
  18045. "type": "string"
  18046. },
  18047. "type": {
  18048. "type": "string",
  18049. "enum": ["permission.asked"]
  18050. },
  18051. "properties": {
  18052. "$ref": "#/components/schemas/PermissionRequest"
  18053. }
  18054. },
  18055. "required": ["id", "type", "properties"],
  18056. "additionalProperties": false
  18057. },
  18058. "EventPermissionReplied": {
  18059. "type": "object",
  18060. "properties": {
  18061. "id": {
  18062. "type": "string"
  18063. },
  18064. "type": {
  18065. "type": "string",
  18066. "enum": ["permission.replied"]
  18067. },
  18068. "properties": {
  18069. "type": "object",
  18070. "properties": {
  18071. "sessionID": {
  18072. "type": "string",
  18073. "pattern": "^ses"
  18074. },
  18075. "requestID": {
  18076. "type": "string",
  18077. "pattern": "^per"
  18078. },
  18079. "reply": {
  18080. "type": "string",
  18081. "enum": ["once", "always", "reject"]
  18082. }
  18083. },
  18084. "required": ["sessionID", "requestID", "reply"],
  18085. "additionalProperties": false
  18086. }
  18087. },
  18088. "required": ["id", "type", "properties"],
  18089. "additionalProperties": false
  18090. },
  18091. "EventSessionDiff": {
  18092. "type": "object",
  18093. "properties": {
  18094. "id": {
  18095. "type": "string"
  18096. },
  18097. "type": {
  18098. "type": "string",
  18099. "enum": ["session.diff"]
  18100. },
  18101. "properties": {
  18102. "type": "object",
  18103. "properties": {
  18104. "sessionID": {
  18105. "type": "string",
  18106. "pattern": "^ses"
  18107. },
  18108. "diff": {
  18109. "type": "array",
  18110. "items": {
  18111. "$ref": "#/components/schemas/SnapshotFileDiff"
  18112. }
  18113. }
  18114. },
  18115. "required": ["sessionID", "diff"],
  18116. "additionalProperties": false
  18117. }
  18118. },
  18119. "required": ["id", "type", "properties"],
  18120. "additionalProperties": false
  18121. },
  18122. "EventSessionError": {
  18123. "type": "object",
  18124. "properties": {
  18125. "id": {
  18126. "type": "string"
  18127. },
  18128. "type": {
  18129. "type": "string",
  18130. "enum": ["session.error"]
  18131. },
  18132. "properties": {
  18133. "type": "object",
  18134. "properties": {
  18135. "sessionID": {
  18136. "type": "string",
  18137. "pattern": "^ses"
  18138. },
  18139. "error": {
  18140. "anyOf": [
  18141. {
  18142. "$ref": "#/components/schemas/ProviderAuthError"
  18143. },
  18144. {
  18145. "$ref": "#/components/schemas/UnknownError"
  18146. },
  18147. {
  18148. "$ref": "#/components/schemas/MessageOutputLengthError"
  18149. },
  18150. {
  18151. "$ref": "#/components/schemas/MessageAbortedError"
  18152. },
  18153. {
  18154. "$ref": "#/components/schemas/StructuredOutputError"
  18155. },
  18156. {
  18157. "$ref": "#/components/schemas/ContextOverflowError"
  18158. },
  18159. {
  18160. "$ref": "#/components/schemas/APIError"
  18161. }
  18162. ]
  18163. }
  18164. },
  18165. "additionalProperties": false
  18166. }
  18167. },
  18168. "required": ["id", "type", "properties"],
  18169. "additionalProperties": false
  18170. },
  18171. "EventQuestionAsked": {
  18172. "type": "object",
  18173. "properties": {
  18174. "id": {
  18175. "type": "string"
  18176. },
  18177. "type": {
  18178. "type": "string",
  18179. "enum": ["question.asked"]
  18180. },
  18181. "properties": {
  18182. "$ref": "#/components/schemas/QuestionRequest"
  18183. }
  18184. },
  18185. "required": ["id", "type", "properties"],
  18186. "additionalProperties": false
  18187. },
  18188. "EventQuestionReplied": {
  18189. "type": "object",
  18190. "properties": {
  18191. "id": {
  18192. "type": "string"
  18193. },
  18194. "type": {
  18195. "type": "string",
  18196. "enum": ["question.replied"]
  18197. },
  18198. "properties": {
  18199. "$ref": "#/components/schemas/QuestionReplied"
  18200. }
  18201. },
  18202. "required": ["id", "type", "properties"],
  18203. "additionalProperties": false
  18204. },
  18205. "EventQuestionRejected": {
  18206. "type": "object",
  18207. "properties": {
  18208. "id": {
  18209. "type": "string"
  18210. },
  18211. "type": {
  18212. "type": "string",
  18213. "enum": ["question.rejected"]
  18214. },
  18215. "properties": {
  18216. "$ref": "#/components/schemas/QuestionRejected"
  18217. }
  18218. },
  18219. "required": ["id", "type", "properties"],
  18220. "additionalProperties": false
  18221. },
  18222. "EventTodoUpdated": {
  18223. "type": "object",
  18224. "properties": {
  18225. "id": {
  18226. "type": "string"
  18227. },
  18228. "type": {
  18229. "type": "string",
  18230. "enum": ["todo.updated"]
  18231. },
  18232. "properties": {
  18233. "type": "object",
  18234. "properties": {
  18235. "sessionID": {
  18236. "type": "string",
  18237. "pattern": "^ses"
  18238. },
  18239. "todos": {
  18240. "type": "array",
  18241. "items": {
  18242. "$ref": "#/components/schemas/Todo"
  18243. }
  18244. }
  18245. },
  18246. "required": ["sessionID", "todos"],
  18247. "additionalProperties": false
  18248. }
  18249. },
  18250. "required": ["id", "type", "properties"],
  18251. "additionalProperties": false
  18252. },
  18253. "EventSessionStatus": {
  18254. "type": "object",
  18255. "properties": {
  18256. "id": {
  18257. "type": "string"
  18258. },
  18259. "type": {
  18260. "type": "string",
  18261. "enum": ["session.status"]
  18262. },
  18263. "properties": {
  18264. "type": "object",
  18265. "properties": {
  18266. "sessionID": {
  18267. "type": "string",
  18268. "pattern": "^ses"
  18269. },
  18270. "status": {
  18271. "$ref": "#/components/schemas/SessionStatus"
  18272. }
  18273. },
  18274. "required": ["sessionID", "status"],
  18275. "additionalProperties": false
  18276. }
  18277. },
  18278. "required": ["id", "type", "properties"],
  18279. "additionalProperties": false
  18280. },
  18281. "EventSessionIdle": {
  18282. "type": "object",
  18283. "properties": {
  18284. "id": {
  18285. "type": "string"
  18286. },
  18287. "type": {
  18288. "type": "string",
  18289. "enum": ["session.idle"]
  18290. },
  18291. "properties": {
  18292. "type": "object",
  18293. "properties": {
  18294. "sessionID": {
  18295. "type": "string",
  18296. "pattern": "^ses"
  18297. }
  18298. },
  18299. "required": ["sessionID"],
  18300. "additionalProperties": false
  18301. }
  18302. },
  18303. "required": ["id", "type", "properties"],
  18304. "additionalProperties": false
  18305. },
  18306. "EventMcpToolsChanged": {
  18307. "type": "object",
  18308. "properties": {
  18309. "id": {
  18310. "type": "string"
  18311. },
  18312. "type": {
  18313. "type": "string",
  18314. "enum": ["mcp.tools.changed"]
  18315. },
  18316. "properties": {
  18317. "type": "object",
  18318. "properties": {
  18319. "server": {
  18320. "type": "string"
  18321. }
  18322. },
  18323. "required": ["server"],
  18324. "additionalProperties": false
  18325. }
  18326. },
  18327. "required": ["id", "type", "properties"],
  18328. "additionalProperties": false
  18329. },
  18330. "EventMcpBrowserOpenFailed": {
  18331. "type": "object",
  18332. "properties": {
  18333. "id": {
  18334. "type": "string"
  18335. },
  18336. "type": {
  18337. "type": "string",
  18338. "enum": ["mcp.browser.open.failed"]
  18339. },
  18340. "properties": {
  18341. "type": "object",
  18342. "properties": {
  18343. "mcpName": {
  18344. "type": "string"
  18345. },
  18346. "url": {
  18347. "type": "string"
  18348. }
  18349. },
  18350. "required": ["mcpName", "url"],
  18351. "additionalProperties": false
  18352. }
  18353. },
  18354. "required": ["id", "type", "properties"],
  18355. "additionalProperties": false
  18356. },
  18357. "EventCommandExecuted": {
  18358. "type": "object",
  18359. "properties": {
  18360. "id": {
  18361. "type": "string"
  18362. },
  18363. "type": {
  18364. "type": "string",
  18365. "enum": ["command.executed"]
  18366. },
  18367. "properties": {
  18368. "type": "object",
  18369. "properties": {
  18370. "name": {
  18371. "type": "string"
  18372. },
  18373. "sessionID": {
  18374. "type": "string",
  18375. "pattern": "^ses"
  18376. },
  18377. "arguments": {
  18378. "type": "string"
  18379. },
  18380. "messageID": {
  18381. "type": "string",
  18382. "pattern": "^msg"
  18383. }
  18384. },
  18385. "required": ["name", "sessionID", "arguments", "messageID"],
  18386. "additionalProperties": false
  18387. }
  18388. },
  18389. "required": ["id", "type", "properties"],
  18390. "additionalProperties": false
  18391. },
  18392. "EventProjectUpdated": {
  18393. "type": "object",
  18394. "properties": {
  18395. "id": {
  18396. "type": "string"
  18397. },
  18398. "type": {
  18399. "type": "string",
  18400. "enum": ["project.updated"]
  18401. },
  18402. "properties": {
  18403. "$ref": "#/components/schemas/Project"
  18404. }
  18405. },
  18406. "required": ["id", "type", "properties"],
  18407. "additionalProperties": false
  18408. },
  18409. "EventSessionCompacted": {
  18410. "type": "object",
  18411. "properties": {
  18412. "id": {
  18413. "type": "string"
  18414. },
  18415. "type": {
  18416. "type": "string",
  18417. "enum": ["session.compacted"]
  18418. },
  18419. "properties": {
  18420. "type": "object",
  18421. "properties": {
  18422. "sessionID": {
  18423. "type": "string",
  18424. "pattern": "^ses"
  18425. }
  18426. },
  18427. "required": ["sessionID"],
  18428. "additionalProperties": false
  18429. }
  18430. },
  18431. "required": ["id", "type", "properties"],
  18432. "additionalProperties": false
  18433. },
  18434. "EventVcsBranchUpdated": {
  18435. "type": "object",
  18436. "properties": {
  18437. "id": {
  18438. "type": "string"
  18439. },
  18440. "type": {
  18441. "type": "string",
  18442. "enum": ["vcs.branch.updated"]
  18443. },
  18444. "properties": {
  18445. "type": "object",
  18446. "properties": {
  18447. "branch": {
  18448. "type": "string"
  18449. }
  18450. },
  18451. "additionalProperties": false
  18452. }
  18453. },
  18454. "required": ["id", "type", "properties"],
  18455. "additionalProperties": false
  18456. },
  18457. "EventWorkspaceReady": {
  18458. "type": "object",
  18459. "properties": {
  18460. "id": {
  18461. "type": "string"
  18462. },
  18463. "type": {
  18464. "type": "string",
  18465. "enum": ["workspace.ready"]
  18466. },
  18467. "properties": {
  18468. "type": "object",
  18469. "properties": {
  18470. "name": {
  18471. "type": "string"
  18472. }
  18473. },
  18474. "required": ["name"],
  18475. "additionalProperties": false
  18476. }
  18477. },
  18478. "required": ["id", "type", "properties"],
  18479. "additionalProperties": false
  18480. },
  18481. "EventWorkspaceFailed": {
  18482. "type": "object",
  18483. "properties": {
  18484. "id": {
  18485. "type": "string"
  18486. },
  18487. "type": {
  18488. "type": "string",
  18489. "enum": ["workspace.failed"]
  18490. },
  18491. "properties": {
  18492. "type": "object",
  18493. "properties": {
  18494. "message": {
  18495. "type": "string"
  18496. }
  18497. },
  18498. "required": ["message"],
  18499. "additionalProperties": false
  18500. }
  18501. },
  18502. "required": ["id", "type", "properties"],
  18503. "additionalProperties": false
  18504. },
  18505. "EventWorkspaceStatus": {
  18506. "type": "object",
  18507. "properties": {
  18508. "id": {
  18509. "type": "string"
  18510. },
  18511. "type": {
  18512. "type": "string",
  18513. "enum": ["workspace.status"]
  18514. },
  18515. "properties": {
  18516. "type": "object",
  18517. "properties": {
  18518. "workspaceID": {
  18519. "type": "string",
  18520. "pattern": "^wrk"
  18521. },
  18522. "status": {
  18523. "type": "string",
  18524. "enum": ["connected", "connecting", "disconnected", "error"]
  18525. }
  18526. },
  18527. "required": ["workspaceID", "status"],
  18528. "additionalProperties": false
  18529. }
  18530. },
  18531. "required": ["id", "type", "properties"],
  18532. "additionalProperties": false
  18533. },
  18534. "EventWorktreeReady": {
  18535. "type": "object",
  18536. "properties": {
  18537. "id": {
  18538. "type": "string"
  18539. },
  18540. "type": {
  18541. "type": "string",
  18542. "enum": ["worktree.ready"]
  18543. },
  18544. "properties": {
  18545. "type": "object",
  18546. "properties": {
  18547. "name": {
  18548. "type": "string"
  18549. },
  18550. "branch": {
  18551. "type": "string"
  18552. }
  18553. },
  18554. "required": ["name"],
  18555. "additionalProperties": false
  18556. }
  18557. },
  18558. "required": ["id", "type", "properties"],
  18559. "additionalProperties": false
  18560. },
  18561. "EventWorktreeFailed": {
  18562. "type": "object",
  18563. "properties": {
  18564. "id": {
  18565. "type": "string"
  18566. },
  18567. "type": {
  18568. "type": "string",
  18569. "enum": ["worktree.failed"]
  18570. },
  18571. "properties": {
  18572. "type": "object",
  18573. "properties": {
  18574. "message": {
  18575. "type": "string"
  18576. }
  18577. },
  18578. "required": ["message"],
  18579. "additionalProperties": false
  18580. }
  18581. },
  18582. "required": ["id", "type", "properties"],
  18583. "additionalProperties": false
  18584. },
  18585. "EventPtyCreated": {
  18586. "type": "object",
  18587. "properties": {
  18588. "id": {
  18589. "type": "string"
  18590. },
  18591. "type": {
  18592. "type": "string",
  18593. "enum": ["pty.created"]
  18594. },
  18595. "properties": {
  18596. "type": "object",
  18597. "properties": {
  18598. "info": {
  18599. "$ref": "#/components/schemas/Pty"
  18600. }
  18601. },
  18602. "required": ["info"],
  18603. "additionalProperties": false
  18604. }
  18605. },
  18606. "required": ["id", "type", "properties"],
  18607. "additionalProperties": false
  18608. },
  18609. "EventPtyUpdated": {
  18610. "type": "object",
  18611. "properties": {
  18612. "id": {
  18613. "type": "string"
  18614. },
  18615. "type": {
  18616. "type": "string",
  18617. "enum": ["pty.updated"]
  18618. },
  18619. "properties": {
  18620. "type": "object",
  18621. "properties": {
  18622. "info": {
  18623. "$ref": "#/components/schemas/Pty"
  18624. }
  18625. },
  18626. "required": ["info"],
  18627. "additionalProperties": false
  18628. }
  18629. },
  18630. "required": ["id", "type", "properties"],
  18631. "additionalProperties": false
  18632. },
  18633. "EventPtyExited": {
  18634. "type": "object",
  18635. "properties": {
  18636. "id": {
  18637. "type": "string"
  18638. },
  18639. "type": {
  18640. "type": "string",
  18641. "enum": ["pty.exited"]
  18642. },
  18643. "properties": {
  18644. "type": "object",
  18645. "properties": {
  18646. "id": {
  18647. "type": "string",
  18648. "pattern": "^pty"
  18649. },
  18650. "exitCode": {
  18651. "type": "integer",
  18652. "minimum": 0
  18653. }
  18654. },
  18655. "required": ["id", "exitCode"],
  18656. "additionalProperties": false
  18657. }
  18658. },
  18659. "required": ["id", "type", "properties"],
  18660. "additionalProperties": false
  18661. },
  18662. "EventPtyDeleted": {
  18663. "type": "object",
  18664. "properties": {
  18665. "id": {
  18666. "type": "string"
  18667. },
  18668. "type": {
  18669. "type": "string",
  18670. "enum": ["pty.deleted"]
  18671. },
  18672. "properties": {
  18673. "type": "object",
  18674. "properties": {
  18675. "id": {
  18676. "type": "string",
  18677. "pattern": "^pty"
  18678. }
  18679. },
  18680. "required": ["id"],
  18681. "additionalProperties": false
  18682. }
  18683. },
  18684. "required": ["id", "type", "properties"],
  18685. "additionalProperties": false
  18686. },
  18687. "EventInstallationUpdated": {
  18688. "type": "object",
  18689. "properties": {
  18690. "id": {
  18691. "type": "string"
  18692. },
  18693. "type": {
  18694. "type": "string",
  18695. "enum": ["installation.updated"]
  18696. },
  18697. "properties": {
  18698. "type": "object",
  18699. "properties": {
  18700. "version": {
  18701. "type": "string"
  18702. }
  18703. },
  18704. "required": ["version"],
  18705. "additionalProperties": false
  18706. }
  18707. },
  18708. "required": ["id", "type", "properties"],
  18709. "additionalProperties": false
  18710. },
  18711. "EventInstallationUpdate-available": {
  18712. "type": "object",
  18713. "properties": {
  18714. "id": {
  18715. "type": "string"
  18716. },
  18717. "type": {
  18718. "type": "string",
  18719. "enum": ["installation.update-available"]
  18720. },
  18721. "properties": {
  18722. "type": "object",
  18723. "properties": {
  18724. "version": {
  18725. "type": "string"
  18726. }
  18727. },
  18728. "required": ["version"],
  18729. "additionalProperties": false
  18730. }
  18731. },
  18732. "required": ["id", "type", "properties"],
  18733. "additionalProperties": false
  18734. },
  18735. "EventMessageUpdated": {
  18736. "type": "object",
  18737. "properties": {
  18738. "id": {
  18739. "type": "string"
  18740. },
  18741. "type": {
  18742. "type": "string",
  18743. "enum": ["message.updated"]
  18744. },
  18745. "properties": {
  18746. "type": "object",
  18747. "properties": {
  18748. "sessionID": {
  18749. "type": "string",
  18750. "pattern": "^ses"
  18751. },
  18752. "info": {
  18753. "$ref": "#/components/schemas/Message"
  18754. }
  18755. },
  18756. "required": ["sessionID", "info"],
  18757. "additionalProperties": false
  18758. }
  18759. },
  18760. "required": ["id", "type", "properties"],
  18761. "additionalProperties": false
  18762. },
  18763. "EventMessageRemoved": {
  18764. "type": "object",
  18765. "properties": {
  18766. "id": {
  18767. "type": "string"
  18768. },
  18769. "type": {
  18770. "type": "string",
  18771. "enum": ["message.removed"]
  18772. },
  18773. "properties": {
  18774. "type": "object",
  18775. "properties": {
  18776. "sessionID": {
  18777. "type": "string",
  18778. "pattern": "^ses"
  18779. },
  18780. "messageID": {
  18781. "type": "string",
  18782. "pattern": "^msg"
  18783. }
  18784. },
  18785. "required": ["sessionID", "messageID"],
  18786. "additionalProperties": false
  18787. }
  18788. },
  18789. "required": ["id", "type", "properties"],
  18790. "additionalProperties": false
  18791. },
  18792. "EventMessagePartUpdated": {
  18793. "type": "object",
  18794. "properties": {
  18795. "id": {
  18796. "type": "string"
  18797. },
  18798. "type": {
  18799. "type": "string",
  18800. "enum": ["message.part.updated"]
  18801. },
  18802. "properties": {
  18803. "type": "object",
  18804. "properties": {
  18805. "sessionID": {
  18806. "type": "string",
  18807. "pattern": "^ses"
  18808. },
  18809. "part": {
  18810. "$ref": "#/components/schemas/Part"
  18811. },
  18812. "time": {
  18813. "type": "integer",
  18814. "minimum": 0
  18815. }
  18816. },
  18817. "required": ["sessionID", "part", "time"],
  18818. "additionalProperties": false
  18819. }
  18820. },
  18821. "required": ["id", "type", "properties"],
  18822. "additionalProperties": false
  18823. },
  18824. "EventMessagePartRemoved": {
  18825. "type": "object",
  18826. "properties": {
  18827. "id": {
  18828. "type": "string"
  18829. },
  18830. "type": {
  18831. "type": "string",
  18832. "enum": ["message.part.removed"]
  18833. },
  18834. "properties": {
  18835. "type": "object",
  18836. "properties": {
  18837. "sessionID": {
  18838. "type": "string",
  18839. "pattern": "^ses"
  18840. },
  18841. "messageID": {
  18842. "type": "string",
  18843. "pattern": "^msg"
  18844. },
  18845. "partID": {
  18846. "type": "string",
  18847. "pattern": "^prt"
  18848. }
  18849. },
  18850. "required": ["sessionID", "messageID", "partID"],
  18851. "additionalProperties": false
  18852. }
  18853. },
  18854. "required": ["id", "type", "properties"],
  18855. "additionalProperties": false
  18856. },
  18857. "EventSessionCreated": {
  18858. "type": "object",
  18859. "properties": {
  18860. "id": {
  18861. "type": "string"
  18862. },
  18863. "type": {
  18864. "type": "string",
  18865. "enum": ["session.created"]
  18866. },
  18867. "properties": {
  18868. "type": "object",
  18869. "properties": {
  18870. "sessionID": {
  18871. "type": "string",
  18872. "pattern": "^ses"
  18873. },
  18874. "info": {
  18875. "$ref": "#/components/schemas/Session"
  18876. }
  18877. },
  18878. "required": ["sessionID", "info"],
  18879. "additionalProperties": false
  18880. }
  18881. },
  18882. "required": ["id", "type", "properties"],
  18883. "additionalProperties": false
  18884. },
  18885. "EventSessionUpdated": {
  18886. "type": "object",
  18887. "properties": {
  18888. "id": {
  18889. "type": "string"
  18890. },
  18891. "type": {
  18892. "type": "string",
  18893. "enum": ["session.updated"]
  18894. },
  18895. "properties": {
  18896. "type": "object",
  18897. "properties": {
  18898. "sessionID": {
  18899. "type": "string",
  18900. "pattern": "^ses"
  18901. },
  18902. "info": {
  18903. "$ref": "#/components/schemas/Session"
  18904. }
  18905. },
  18906. "required": ["sessionID", "info"],
  18907. "additionalProperties": false
  18908. }
  18909. },
  18910. "required": ["id", "type", "properties"],
  18911. "additionalProperties": false
  18912. },
  18913. "EventSessionDeleted": {
  18914. "type": "object",
  18915. "properties": {
  18916. "id": {
  18917. "type": "string"
  18918. },
  18919. "type": {
  18920. "type": "string",
  18921. "enum": ["session.deleted"]
  18922. },
  18923. "properties": {
  18924. "type": "object",
  18925. "properties": {
  18926. "sessionID": {
  18927. "type": "string",
  18928. "pattern": "^ses"
  18929. },
  18930. "info": {
  18931. "$ref": "#/components/schemas/Session"
  18932. }
  18933. },
  18934. "required": ["sessionID", "info"],
  18935. "additionalProperties": false
  18936. }
  18937. },
  18938. "required": ["id", "type", "properties"],
  18939. "additionalProperties": false
  18940. },
  18941. "EventSessionNextAgentSwitched": {
  18942. "type": "object",
  18943. "properties": {
  18944. "id": {
  18945. "type": "string"
  18946. },
  18947. "type": {
  18948. "type": "string",
  18949. "enum": ["session.next.agent.switched"]
  18950. },
  18951. "properties": {
  18952. "type": "object",
  18953. "properties": {
  18954. "timestamp": {
  18955. "type": "number"
  18956. },
  18957. "sessionID": {
  18958. "type": "string",
  18959. "pattern": "^ses"
  18960. },
  18961. "agent": {
  18962. "type": "string"
  18963. }
  18964. },
  18965. "required": ["timestamp", "sessionID", "agent"],
  18966. "additionalProperties": false
  18967. }
  18968. },
  18969. "required": ["id", "type", "properties"],
  18970. "additionalProperties": false
  18971. },
  18972. "EventSessionNextModelSwitched": {
  18973. "type": "object",
  18974. "properties": {
  18975. "id": {
  18976. "type": "string"
  18977. },
  18978. "type": {
  18979. "type": "string",
  18980. "enum": ["session.next.model.switched"]
  18981. },
  18982. "properties": {
  18983. "type": "object",
  18984. "properties": {
  18985. "timestamp": {
  18986. "type": "number"
  18987. },
  18988. "sessionID": {
  18989. "type": "string",
  18990. "pattern": "^ses"
  18991. },
  18992. "model": {
  18993. "type": "object",
  18994. "properties": {
  18995. "id": {
  18996. "type": "string"
  18997. },
  18998. "providerID": {
  18999. "type": "string"
  19000. },
  19001. "variant": {
  19002. "type": "string"
  19003. }
  19004. },
  19005. "required": ["id", "providerID", "variant"],
  19006. "additionalProperties": false
  19007. }
  19008. },
  19009. "required": ["timestamp", "sessionID", "model"],
  19010. "additionalProperties": false
  19011. }
  19012. },
  19013. "required": ["id", "type", "properties"],
  19014. "additionalProperties": false
  19015. },
  19016. "PromptSource": {
  19017. "type": "object",
  19018. "properties": {
  19019. "start": {
  19020. "type": "number"
  19021. },
  19022. "end": {
  19023. "type": "number"
  19024. },
  19025. "text": {
  19026. "type": "string"
  19027. }
  19028. },
  19029. "required": ["start", "end", "text"],
  19030. "additionalProperties": false
  19031. },
  19032. "PromptFileAttachment": {
  19033. "type": "object",
  19034. "properties": {
  19035. "uri": {
  19036. "type": "string"
  19037. },
  19038. "mime": {
  19039. "type": "string"
  19040. },
  19041. "name": {
  19042. "type": "string"
  19043. },
  19044. "description": {
  19045. "type": "string"
  19046. },
  19047. "source": {
  19048. "$ref": "#/components/schemas/PromptSource"
  19049. }
  19050. },
  19051. "required": ["uri", "mime"],
  19052. "additionalProperties": false
  19053. },
  19054. "PromptAgentAttachment": {
  19055. "type": "object",
  19056. "properties": {
  19057. "name": {
  19058. "type": "string"
  19059. },
  19060. "source": {
  19061. "$ref": "#/components/schemas/PromptSource"
  19062. }
  19063. },
  19064. "required": ["name"],
  19065. "additionalProperties": false
  19066. },
  19067. "PromptReferenceAttachment": {
  19068. "type": "object",
  19069. "properties": {
  19070. "name": {
  19071. "type": "string"
  19072. },
  19073. "kind": {
  19074. "type": "string",
  19075. "enum": ["local", "git", "invalid"]
  19076. },
  19077. "uri": {
  19078. "type": "string"
  19079. },
  19080. "repository": {
  19081. "type": "string"
  19082. },
  19083. "branch": {
  19084. "type": "string"
  19085. },
  19086. "target": {
  19087. "type": "string"
  19088. },
  19089. "targetUri": {
  19090. "type": "string"
  19091. },
  19092. "problem": {
  19093. "type": "string"
  19094. },
  19095. "source": {
  19096. "$ref": "#/components/schemas/PromptSource"
  19097. }
  19098. },
  19099. "required": ["name", "kind"],
  19100. "additionalProperties": false
  19101. },
  19102. "EventSessionNextPrompted": {
  19103. "type": "object",
  19104. "properties": {
  19105. "id": {
  19106. "type": "string"
  19107. },
  19108. "type": {
  19109. "type": "string",
  19110. "enum": ["session.next.prompted"]
  19111. },
  19112. "properties": {
  19113. "type": "object",
  19114. "properties": {
  19115. "timestamp": {
  19116. "type": "number"
  19117. },
  19118. "sessionID": {
  19119. "type": "string",
  19120. "pattern": "^ses"
  19121. },
  19122. "prompt": {
  19123. "$ref": "#/components/schemas/Prompt"
  19124. }
  19125. },
  19126. "required": ["timestamp", "sessionID", "prompt"],
  19127. "additionalProperties": false
  19128. }
  19129. },
  19130. "required": ["id", "type", "properties"],
  19131. "additionalProperties": false
  19132. },
  19133. "EventSessionNextSynthetic": {
  19134. "type": "object",
  19135. "properties": {
  19136. "id": {
  19137. "type": "string"
  19138. },
  19139. "type": {
  19140. "type": "string",
  19141. "enum": ["session.next.synthetic"]
  19142. },
  19143. "properties": {
  19144. "type": "object",
  19145. "properties": {
  19146. "timestamp": {
  19147. "type": "number"
  19148. },
  19149. "sessionID": {
  19150. "type": "string",
  19151. "pattern": "^ses"
  19152. },
  19153. "text": {
  19154. "type": "string"
  19155. }
  19156. },
  19157. "required": ["timestamp", "sessionID", "text"],
  19158. "additionalProperties": false
  19159. }
  19160. },
  19161. "required": ["id", "type", "properties"],
  19162. "additionalProperties": false
  19163. },
  19164. "EventSessionNextShellStarted": {
  19165. "type": "object",
  19166. "properties": {
  19167. "id": {
  19168. "type": "string"
  19169. },
  19170. "type": {
  19171. "type": "string",
  19172. "enum": ["session.next.shell.started"]
  19173. },
  19174. "properties": {
  19175. "type": "object",
  19176. "properties": {
  19177. "timestamp": {
  19178. "type": "number"
  19179. },
  19180. "sessionID": {
  19181. "type": "string",
  19182. "pattern": "^ses"
  19183. },
  19184. "callID": {
  19185. "type": "string"
  19186. },
  19187. "command": {
  19188. "type": "string"
  19189. }
  19190. },
  19191. "required": ["timestamp", "sessionID", "callID", "command"],
  19192. "additionalProperties": false
  19193. }
  19194. },
  19195. "required": ["id", "type", "properties"],
  19196. "additionalProperties": false
  19197. },
  19198. "EventSessionNextShellEnded": {
  19199. "type": "object",
  19200. "properties": {
  19201. "id": {
  19202. "type": "string"
  19203. },
  19204. "type": {
  19205. "type": "string",
  19206. "enum": ["session.next.shell.ended"]
  19207. },
  19208. "properties": {
  19209. "type": "object",
  19210. "properties": {
  19211. "timestamp": {
  19212. "type": "number"
  19213. },
  19214. "sessionID": {
  19215. "type": "string",
  19216. "pattern": "^ses"
  19217. },
  19218. "callID": {
  19219. "type": "string"
  19220. },
  19221. "output": {
  19222. "type": "string"
  19223. }
  19224. },
  19225. "required": ["timestamp", "sessionID", "callID", "output"],
  19226. "additionalProperties": false
  19227. }
  19228. },
  19229. "required": ["id", "type", "properties"],
  19230. "additionalProperties": false
  19231. },
  19232. "EventSessionNextStepStarted": {
  19233. "type": "object",
  19234. "properties": {
  19235. "id": {
  19236. "type": "string"
  19237. },
  19238. "type": {
  19239. "type": "string",
  19240. "enum": ["session.next.step.started"]
  19241. },
  19242. "properties": {
  19243. "type": "object",
  19244. "properties": {
  19245. "timestamp": {
  19246. "type": "number"
  19247. },
  19248. "sessionID": {
  19249. "type": "string",
  19250. "pattern": "^ses"
  19251. },
  19252. "agent": {
  19253. "type": "string"
  19254. },
  19255. "model": {
  19256. "type": "object",
  19257. "properties": {
  19258. "id": {
  19259. "type": "string"
  19260. },
  19261. "providerID": {
  19262. "type": "string"
  19263. },
  19264. "variant": {
  19265. "type": "string"
  19266. }
  19267. },
  19268. "required": ["id", "providerID", "variant"],
  19269. "additionalProperties": false
  19270. },
  19271. "snapshot": {
  19272. "type": "string"
  19273. }
  19274. },
  19275. "required": ["timestamp", "sessionID", "agent", "model"],
  19276. "additionalProperties": false
  19277. }
  19278. },
  19279. "required": ["id", "type", "properties"],
  19280. "additionalProperties": false
  19281. },
  19282. "EventSessionNextStepEnded": {
  19283. "type": "object",
  19284. "properties": {
  19285. "id": {
  19286. "type": "string"
  19287. },
  19288. "type": {
  19289. "type": "string",
  19290. "enum": ["session.next.step.ended"]
  19291. },
  19292. "properties": {
  19293. "type": "object",
  19294. "properties": {
  19295. "timestamp": {
  19296. "type": "number"
  19297. },
  19298. "sessionID": {
  19299. "type": "string",
  19300. "pattern": "^ses"
  19301. },
  19302. "finish": {
  19303. "type": "string"
  19304. },
  19305. "cost": {
  19306. "type": "number"
  19307. },
  19308. "tokens": {
  19309. "type": "object",
  19310. "properties": {
  19311. "input": {
  19312. "type": "number"
  19313. },
  19314. "output": {
  19315. "type": "number"
  19316. },
  19317. "reasoning": {
  19318. "type": "number"
  19319. },
  19320. "cache": {
  19321. "type": "object",
  19322. "properties": {
  19323. "read": {
  19324. "type": "number"
  19325. },
  19326. "write": {
  19327. "type": "number"
  19328. }
  19329. },
  19330. "required": ["read", "write"],
  19331. "additionalProperties": false
  19332. }
  19333. },
  19334. "required": ["input", "output", "reasoning", "cache"],
  19335. "additionalProperties": false
  19336. },
  19337. "snapshot": {
  19338. "type": "string"
  19339. }
  19340. },
  19341. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19342. "additionalProperties": false
  19343. }
  19344. },
  19345. "required": ["id", "type", "properties"],
  19346. "additionalProperties": false
  19347. },
  19348. "SessionErrorUnknown": {
  19349. "type": "object",
  19350. "properties": {
  19351. "type": {
  19352. "type": "string",
  19353. "enum": ["unknown"]
  19354. },
  19355. "message": {
  19356. "type": "string"
  19357. }
  19358. },
  19359. "required": ["type", "message"],
  19360. "additionalProperties": false
  19361. },
  19362. "EventSessionNextStepFailed": {
  19363. "type": "object",
  19364. "properties": {
  19365. "id": {
  19366. "type": "string"
  19367. },
  19368. "type": {
  19369. "type": "string",
  19370. "enum": ["session.next.step.failed"]
  19371. },
  19372. "properties": {
  19373. "type": "object",
  19374. "properties": {
  19375. "timestamp": {
  19376. "type": "number"
  19377. },
  19378. "sessionID": {
  19379. "type": "string",
  19380. "pattern": "^ses"
  19381. },
  19382. "error": {
  19383. "$ref": "#/components/schemas/SessionErrorUnknown"
  19384. }
  19385. },
  19386. "required": ["timestamp", "sessionID", "error"],
  19387. "additionalProperties": false
  19388. }
  19389. },
  19390. "required": ["id", "type", "properties"],
  19391. "additionalProperties": false
  19392. },
  19393. "EventSessionNextTextStarted": {
  19394. "type": "object",
  19395. "properties": {
  19396. "id": {
  19397. "type": "string"
  19398. },
  19399. "type": {
  19400. "type": "string",
  19401. "enum": ["session.next.text.started"]
  19402. },
  19403. "properties": {
  19404. "type": "object",
  19405. "properties": {
  19406. "timestamp": {
  19407. "type": "number"
  19408. },
  19409. "sessionID": {
  19410. "type": "string",
  19411. "pattern": "^ses"
  19412. }
  19413. },
  19414. "required": ["timestamp", "sessionID"],
  19415. "additionalProperties": false
  19416. }
  19417. },
  19418. "required": ["id", "type", "properties"],
  19419. "additionalProperties": false
  19420. },
  19421. "EventSessionNextTextDelta": {
  19422. "type": "object",
  19423. "properties": {
  19424. "id": {
  19425. "type": "string"
  19426. },
  19427. "type": {
  19428. "type": "string",
  19429. "enum": ["session.next.text.delta"]
  19430. },
  19431. "properties": {
  19432. "type": "object",
  19433. "properties": {
  19434. "timestamp": {
  19435. "type": "number"
  19436. },
  19437. "sessionID": {
  19438. "type": "string",
  19439. "pattern": "^ses"
  19440. },
  19441. "delta": {
  19442. "type": "string"
  19443. }
  19444. },
  19445. "required": ["timestamp", "sessionID", "delta"],
  19446. "additionalProperties": false
  19447. }
  19448. },
  19449. "required": ["id", "type", "properties"],
  19450. "additionalProperties": false
  19451. },
  19452. "EventSessionNextTextEnded": {
  19453. "type": "object",
  19454. "properties": {
  19455. "id": {
  19456. "type": "string"
  19457. },
  19458. "type": {
  19459. "type": "string",
  19460. "enum": ["session.next.text.ended"]
  19461. },
  19462. "properties": {
  19463. "type": "object",
  19464. "properties": {
  19465. "timestamp": {
  19466. "type": "number"
  19467. },
  19468. "sessionID": {
  19469. "type": "string",
  19470. "pattern": "^ses"
  19471. },
  19472. "text": {
  19473. "type": "string"
  19474. }
  19475. },
  19476. "required": ["timestamp", "sessionID", "text"],
  19477. "additionalProperties": false
  19478. }
  19479. },
  19480. "required": ["id", "type", "properties"],
  19481. "additionalProperties": false
  19482. },
  19483. "EventSessionNextReasoningStarted": {
  19484. "type": "object",
  19485. "properties": {
  19486. "id": {
  19487. "type": "string"
  19488. },
  19489. "type": {
  19490. "type": "string",
  19491. "enum": ["session.next.reasoning.started"]
  19492. },
  19493. "properties": {
  19494. "type": "object",
  19495. "properties": {
  19496. "timestamp": {
  19497. "type": "number"
  19498. },
  19499. "sessionID": {
  19500. "type": "string",
  19501. "pattern": "^ses"
  19502. },
  19503. "reasoningID": {
  19504. "type": "string"
  19505. }
  19506. },
  19507. "required": ["timestamp", "sessionID", "reasoningID"],
  19508. "additionalProperties": false
  19509. }
  19510. },
  19511. "required": ["id", "type", "properties"],
  19512. "additionalProperties": false
  19513. },
  19514. "EventSessionNextReasoningDelta": {
  19515. "type": "object",
  19516. "properties": {
  19517. "id": {
  19518. "type": "string"
  19519. },
  19520. "type": {
  19521. "type": "string",
  19522. "enum": ["session.next.reasoning.delta"]
  19523. },
  19524. "properties": {
  19525. "type": "object",
  19526. "properties": {
  19527. "timestamp": {
  19528. "type": "number"
  19529. },
  19530. "sessionID": {
  19531. "type": "string",
  19532. "pattern": "^ses"
  19533. },
  19534. "reasoningID": {
  19535. "type": "string"
  19536. },
  19537. "delta": {
  19538. "type": "string"
  19539. }
  19540. },
  19541. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19542. "additionalProperties": false
  19543. }
  19544. },
  19545. "required": ["id", "type", "properties"],
  19546. "additionalProperties": false
  19547. },
  19548. "EventSessionNextReasoningEnded": {
  19549. "type": "object",
  19550. "properties": {
  19551. "id": {
  19552. "type": "string"
  19553. },
  19554. "type": {
  19555. "type": "string",
  19556. "enum": ["session.next.reasoning.ended"]
  19557. },
  19558. "properties": {
  19559. "type": "object",
  19560. "properties": {
  19561. "timestamp": {
  19562. "type": "number"
  19563. },
  19564. "sessionID": {
  19565. "type": "string",
  19566. "pattern": "^ses"
  19567. },
  19568. "reasoningID": {
  19569. "type": "string"
  19570. },
  19571. "text": {
  19572. "type": "string"
  19573. }
  19574. },
  19575. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19576. "additionalProperties": false
  19577. }
  19578. },
  19579. "required": ["id", "type", "properties"],
  19580. "additionalProperties": false
  19581. },
  19582. "EventSessionNextToolInputStarted": {
  19583. "type": "object",
  19584. "properties": {
  19585. "id": {
  19586. "type": "string"
  19587. },
  19588. "type": {
  19589. "type": "string",
  19590. "enum": ["session.next.tool.input.started"]
  19591. },
  19592. "properties": {
  19593. "type": "object",
  19594. "properties": {
  19595. "timestamp": {
  19596. "type": "number"
  19597. },
  19598. "sessionID": {
  19599. "type": "string",
  19600. "pattern": "^ses"
  19601. },
  19602. "callID": {
  19603. "type": "string"
  19604. },
  19605. "name": {
  19606. "type": "string"
  19607. }
  19608. },
  19609. "required": ["timestamp", "sessionID", "callID", "name"],
  19610. "additionalProperties": false
  19611. }
  19612. },
  19613. "required": ["id", "type", "properties"],
  19614. "additionalProperties": false
  19615. },
  19616. "EventSessionNextToolInputDelta": {
  19617. "type": "object",
  19618. "properties": {
  19619. "id": {
  19620. "type": "string"
  19621. },
  19622. "type": {
  19623. "type": "string",
  19624. "enum": ["session.next.tool.input.delta"]
  19625. },
  19626. "properties": {
  19627. "type": "object",
  19628. "properties": {
  19629. "timestamp": {
  19630. "type": "number"
  19631. },
  19632. "sessionID": {
  19633. "type": "string",
  19634. "pattern": "^ses"
  19635. },
  19636. "callID": {
  19637. "type": "string"
  19638. },
  19639. "delta": {
  19640. "type": "string"
  19641. }
  19642. },
  19643. "required": ["timestamp", "sessionID", "callID", "delta"],
  19644. "additionalProperties": false
  19645. }
  19646. },
  19647. "required": ["id", "type", "properties"],
  19648. "additionalProperties": false
  19649. },
  19650. "EventSessionNextToolInputEnded": {
  19651. "type": "object",
  19652. "properties": {
  19653. "id": {
  19654. "type": "string"
  19655. },
  19656. "type": {
  19657. "type": "string",
  19658. "enum": ["session.next.tool.input.ended"]
  19659. },
  19660. "properties": {
  19661. "type": "object",
  19662. "properties": {
  19663. "timestamp": {
  19664. "type": "number"
  19665. },
  19666. "sessionID": {
  19667. "type": "string",
  19668. "pattern": "^ses"
  19669. },
  19670. "callID": {
  19671. "type": "string"
  19672. },
  19673. "text": {
  19674. "type": "string"
  19675. }
  19676. },
  19677. "required": ["timestamp", "sessionID", "callID", "text"],
  19678. "additionalProperties": false
  19679. }
  19680. },
  19681. "required": ["id", "type", "properties"],
  19682. "additionalProperties": false
  19683. },
  19684. "EventSessionNextToolCalled": {
  19685. "type": "object",
  19686. "properties": {
  19687. "id": {
  19688. "type": "string"
  19689. },
  19690. "type": {
  19691. "type": "string",
  19692. "enum": ["session.next.tool.called"]
  19693. },
  19694. "properties": {
  19695. "type": "object",
  19696. "properties": {
  19697. "timestamp": {
  19698. "type": "number"
  19699. },
  19700. "sessionID": {
  19701. "type": "string",
  19702. "pattern": "^ses"
  19703. },
  19704. "callID": {
  19705. "type": "string"
  19706. },
  19707. "tool": {
  19708. "type": "string"
  19709. },
  19710. "input": {
  19711. "type": "object"
  19712. },
  19713. "provider": {
  19714. "type": "object",
  19715. "properties": {
  19716. "executed": {
  19717. "type": "boolean"
  19718. },
  19719. "metadata": {
  19720. "type": "object"
  19721. }
  19722. },
  19723. "required": ["executed"],
  19724. "additionalProperties": false
  19725. }
  19726. },
  19727. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19728. "additionalProperties": false
  19729. }
  19730. },
  19731. "required": ["id", "type", "properties"],
  19732. "additionalProperties": false
  19733. },
  19734. "ToolTextContent": {
  19735. "type": "object",
  19736. "properties": {
  19737. "type": {
  19738. "type": "string",
  19739. "enum": ["text"]
  19740. },
  19741. "text": {
  19742. "type": "string"
  19743. }
  19744. },
  19745. "required": ["type", "text"],
  19746. "additionalProperties": false
  19747. },
  19748. "ToolFileContent": {
  19749. "type": "object",
  19750. "properties": {
  19751. "type": {
  19752. "type": "string",
  19753. "enum": ["file"]
  19754. },
  19755. "uri": {
  19756. "type": "string"
  19757. },
  19758. "mime": {
  19759. "type": "string"
  19760. },
  19761. "name": {
  19762. "type": "string"
  19763. }
  19764. },
  19765. "required": ["type", "uri", "mime"],
  19766. "additionalProperties": false
  19767. },
  19768. "EventSessionNextToolProgress": {
  19769. "type": "object",
  19770. "properties": {
  19771. "id": {
  19772. "type": "string"
  19773. },
  19774. "type": {
  19775. "type": "string",
  19776. "enum": ["session.next.tool.progress"]
  19777. },
  19778. "properties": {
  19779. "type": "object",
  19780. "properties": {
  19781. "timestamp": {
  19782. "type": "number"
  19783. },
  19784. "sessionID": {
  19785. "type": "string",
  19786. "pattern": "^ses"
  19787. },
  19788. "callID": {
  19789. "type": "string"
  19790. },
  19791. "structured": {
  19792. "type": "object"
  19793. },
  19794. "content": {
  19795. "type": "array",
  19796. "items": {
  19797. "anyOf": [
  19798. {
  19799. "$ref": "#/components/schemas/ToolTextContent"
  19800. },
  19801. {
  19802. "$ref": "#/components/schemas/ToolFileContent"
  19803. }
  19804. ]
  19805. }
  19806. }
  19807. },
  19808. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19809. "additionalProperties": false
  19810. }
  19811. },
  19812. "required": ["id", "type", "properties"],
  19813. "additionalProperties": false
  19814. },
  19815. "EventSessionNextToolSuccess": {
  19816. "type": "object",
  19817. "properties": {
  19818. "id": {
  19819. "type": "string"
  19820. },
  19821. "type": {
  19822. "type": "string",
  19823. "enum": ["session.next.tool.success"]
  19824. },
  19825. "properties": {
  19826. "type": "object",
  19827. "properties": {
  19828. "timestamp": {
  19829. "type": "number"
  19830. },
  19831. "sessionID": {
  19832. "type": "string",
  19833. "pattern": "^ses"
  19834. },
  19835. "callID": {
  19836. "type": "string"
  19837. },
  19838. "structured": {
  19839. "type": "object"
  19840. },
  19841. "content": {
  19842. "type": "array",
  19843. "items": {
  19844. "anyOf": [
  19845. {
  19846. "$ref": "#/components/schemas/ToolTextContent"
  19847. },
  19848. {
  19849. "$ref": "#/components/schemas/ToolFileContent"
  19850. }
  19851. ]
  19852. }
  19853. },
  19854. "provider": {
  19855. "type": "object",
  19856. "properties": {
  19857. "executed": {
  19858. "type": "boolean"
  19859. },
  19860. "metadata": {
  19861. "type": "object"
  19862. }
  19863. },
  19864. "required": ["executed"],
  19865. "additionalProperties": false
  19866. }
  19867. },
  19868. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  19869. "additionalProperties": false
  19870. }
  19871. },
  19872. "required": ["id", "type", "properties"],
  19873. "additionalProperties": false
  19874. },
  19875. "EventSessionNextToolFailed": {
  19876. "type": "object",
  19877. "properties": {
  19878. "id": {
  19879. "type": "string"
  19880. },
  19881. "type": {
  19882. "type": "string",
  19883. "enum": ["session.next.tool.failed"]
  19884. },
  19885. "properties": {
  19886. "type": "object",
  19887. "properties": {
  19888. "timestamp": {
  19889. "type": "number"
  19890. },
  19891. "sessionID": {
  19892. "type": "string",
  19893. "pattern": "^ses"
  19894. },
  19895. "callID": {
  19896. "type": "string"
  19897. },
  19898. "error": {
  19899. "$ref": "#/components/schemas/SessionErrorUnknown"
  19900. },
  19901. "provider": {
  19902. "type": "object",
  19903. "properties": {
  19904. "executed": {
  19905. "type": "boolean"
  19906. },
  19907. "metadata": {
  19908. "type": "object"
  19909. }
  19910. },
  19911. "required": ["executed"],
  19912. "additionalProperties": false
  19913. }
  19914. },
  19915. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  19916. "additionalProperties": false
  19917. }
  19918. },
  19919. "required": ["id", "type", "properties"],
  19920. "additionalProperties": false
  19921. },
  19922. "SessionNextRetry_error": {
  19923. "type": "object",
  19924. "properties": {
  19925. "message": {
  19926. "type": "string"
  19927. },
  19928. "statusCode": {
  19929. "type": "number"
  19930. },
  19931. "isRetryable": {
  19932. "type": "boolean"
  19933. },
  19934. "responseHeaders": {
  19935. "type": "object",
  19936. "additionalProperties": {
  19937. "type": "string"
  19938. }
  19939. },
  19940. "responseBody": {
  19941. "type": "string"
  19942. },
  19943. "metadata": {
  19944. "type": "object",
  19945. "additionalProperties": {
  19946. "type": "string"
  19947. }
  19948. }
  19949. },
  19950. "required": ["message", "isRetryable"],
  19951. "additionalProperties": false
  19952. },
  19953. "EventSessionNextRetried": {
  19954. "type": "object",
  19955. "properties": {
  19956. "id": {
  19957. "type": "string"
  19958. },
  19959. "type": {
  19960. "type": "string",
  19961. "enum": ["session.next.retried"]
  19962. },
  19963. "properties": {
  19964. "type": "object",
  19965. "properties": {
  19966. "timestamp": {
  19967. "type": "number"
  19968. },
  19969. "sessionID": {
  19970. "type": "string",
  19971. "pattern": "^ses"
  19972. },
  19973. "attempt": {
  19974. "type": "number"
  19975. },
  19976. "error": {
  19977. "$ref": "#/components/schemas/SessionNextRetry_error"
  19978. }
  19979. },
  19980. "required": ["timestamp", "sessionID", "attempt", "error"],
  19981. "additionalProperties": false
  19982. }
  19983. },
  19984. "required": ["id", "type", "properties"],
  19985. "additionalProperties": false
  19986. },
  19987. "EventSessionNextCompactionStarted": {
  19988. "type": "object",
  19989. "properties": {
  19990. "id": {
  19991. "type": "string"
  19992. },
  19993. "type": {
  19994. "type": "string",
  19995. "enum": ["session.next.compaction.started"]
  19996. },
  19997. "properties": {
  19998. "type": "object",
  19999. "properties": {
  20000. "timestamp": {
  20001. "type": "number"
  20002. },
  20003. "sessionID": {
  20004. "type": "string",
  20005. "pattern": "^ses"
  20006. },
  20007. "reason": {
  20008. "type": "string",
  20009. "enum": ["auto", "manual"]
  20010. }
  20011. },
  20012. "required": ["timestamp", "sessionID", "reason"],
  20013. "additionalProperties": false
  20014. }
  20015. },
  20016. "required": ["id", "type", "properties"],
  20017. "additionalProperties": false
  20018. },
  20019. "EventSessionNextCompactionDelta": {
  20020. "type": "object",
  20021. "properties": {
  20022. "id": {
  20023. "type": "string"
  20024. },
  20025. "type": {
  20026. "type": "string",
  20027. "enum": ["session.next.compaction.delta"]
  20028. },
  20029. "properties": {
  20030. "type": "object",
  20031. "properties": {
  20032. "timestamp": {
  20033. "type": "number"
  20034. },
  20035. "sessionID": {
  20036. "type": "string",
  20037. "pattern": "^ses"
  20038. },
  20039. "text": {
  20040. "type": "string"
  20041. }
  20042. },
  20043. "required": ["timestamp", "sessionID", "text"],
  20044. "additionalProperties": false
  20045. }
  20046. },
  20047. "required": ["id", "type", "properties"],
  20048. "additionalProperties": false
  20049. },
  20050. "EventSessionNextCompactionEnded": {
  20051. "type": "object",
  20052. "properties": {
  20053. "id": {
  20054. "type": "string"
  20055. },
  20056. "type": {
  20057. "type": "string",
  20058. "enum": ["session.next.compaction.ended"]
  20059. },
  20060. "properties": {
  20061. "type": "object",
  20062. "properties": {
  20063. "timestamp": {
  20064. "type": "number"
  20065. },
  20066. "sessionID": {
  20067. "type": "string",
  20068. "pattern": "^ses"
  20069. },
  20070. "text": {
  20071. "type": "string"
  20072. },
  20073. "include": {
  20074. "type": "string"
  20075. }
  20076. },
  20077. "required": ["timestamp", "sessionID", "text"],
  20078. "additionalProperties": false
  20079. }
  20080. },
  20081. "required": ["id", "type", "properties"],
  20082. "additionalProperties": false
  20083. },
  20084. "ModelV2Info": {
  20085. "type": "object",
  20086. "properties": {
  20087. "id": {
  20088. "type": "string"
  20089. },
  20090. "apiID": {
  20091. "type": "string"
  20092. },
  20093. "providerID": {
  20094. "type": "string"
  20095. },
  20096. "family": {
  20097. "type": "string"
  20098. },
  20099. "name": {
  20100. "type": "string"
  20101. },
  20102. "endpoint": {
  20103. "anyOf": [
  20104. {
  20105. "type": "object",
  20106. "properties": {
  20107. "type": {
  20108. "type": "string",
  20109. "enum": ["unknown"]
  20110. }
  20111. },
  20112. "required": ["type"],
  20113. "additionalProperties": false
  20114. },
  20115. {
  20116. "type": "object",
  20117. "properties": {
  20118. "type": {
  20119. "type": "string",
  20120. "enum": ["openai/responses"]
  20121. },
  20122. "url": {
  20123. "type": "string"
  20124. },
  20125. "websocket": {
  20126. "type": "boolean"
  20127. }
  20128. },
  20129. "required": ["type", "url"],
  20130. "additionalProperties": false
  20131. },
  20132. {
  20133. "type": "object",
  20134. "properties": {
  20135. "type": {
  20136. "type": "string",
  20137. "enum": ["openai/completions"]
  20138. },
  20139. "url": {
  20140. "type": "string"
  20141. },
  20142. "reasoning": {
  20143. "anyOf": [
  20144. {
  20145. "type": "object",
  20146. "properties": {
  20147. "type": {
  20148. "type": "string",
  20149. "enum": ["reasoning_content"]
  20150. }
  20151. },
  20152. "required": ["type"],
  20153. "additionalProperties": false
  20154. },
  20155. {
  20156. "type": "object",
  20157. "properties": {
  20158. "type": {
  20159. "type": "string",
  20160. "enum": ["reasoning_details"]
  20161. }
  20162. },
  20163. "required": ["type"],
  20164. "additionalProperties": false
  20165. }
  20166. ]
  20167. }
  20168. },
  20169. "required": ["type", "url"],
  20170. "additionalProperties": false
  20171. },
  20172. {
  20173. "type": "object",
  20174. "properties": {
  20175. "type": {
  20176. "type": "string",
  20177. "enum": ["anthropic/messages"]
  20178. },
  20179. "url": {
  20180. "type": "string"
  20181. }
  20182. },
  20183. "required": ["type", "url"],
  20184. "additionalProperties": false
  20185. },
  20186. {
  20187. "type": "object",
  20188. "properties": {
  20189. "type": {
  20190. "type": "string",
  20191. "enum": ["aisdk"]
  20192. },
  20193. "package": {
  20194. "type": "string"
  20195. },
  20196. "url": {
  20197. "type": "string"
  20198. }
  20199. },
  20200. "required": ["type", "package"],
  20201. "additionalProperties": false
  20202. }
  20203. ]
  20204. },
  20205. "capabilities": {
  20206. "type": "object",
  20207. "properties": {
  20208. "tools": {
  20209. "type": "boolean"
  20210. },
  20211. "input": {
  20212. "type": "array",
  20213. "items": {
  20214. "type": "string"
  20215. }
  20216. },
  20217. "output": {
  20218. "type": "array",
  20219. "items": {
  20220. "type": "string"
  20221. }
  20222. }
  20223. },
  20224. "required": ["tools", "input", "output"],
  20225. "additionalProperties": false
  20226. },
  20227. "options": {
  20228. "type": "object",
  20229. "properties": {
  20230. "headers": {
  20231. "type": "object",
  20232. "additionalProperties": {
  20233. "type": "string"
  20234. }
  20235. },
  20236. "body": {
  20237. "type": "object"
  20238. },
  20239. "aisdk": {
  20240. "type": "object",
  20241. "properties": {
  20242. "provider": {
  20243. "type": "object"
  20244. },
  20245. "request": {
  20246. "type": "object"
  20247. }
  20248. },
  20249. "required": ["provider", "request"],
  20250. "additionalProperties": false
  20251. },
  20252. "variant": {
  20253. "type": "string"
  20254. }
  20255. },
  20256. "required": ["headers", "body", "aisdk"],
  20257. "additionalProperties": false
  20258. },
  20259. "variants": {
  20260. "type": "array",
  20261. "items": {
  20262. "type": "object",
  20263. "properties": {
  20264. "id": {
  20265. "type": "string"
  20266. },
  20267. "headers": {
  20268. "type": "object",
  20269. "additionalProperties": {
  20270. "type": "string"
  20271. }
  20272. },
  20273. "body": {
  20274. "type": "object"
  20275. },
  20276. "aisdk": {
  20277. "type": "object",
  20278. "properties": {
  20279. "provider": {
  20280. "type": "object"
  20281. },
  20282. "request": {
  20283. "type": "object"
  20284. }
  20285. },
  20286. "required": ["provider", "request"],
  20287. "additionalProperties": false
  20288. }
  20289. },
  20290. "required": ["id", "headers", "body", "aisdk"],
  20291. "additionalProperties": false
  20292. }
  20293. },
  20294. "time": {
  20295. "type": "object",
  20296. "properties": {
  20297. "released": {
  20298. "anyOf": [
  20299. {
  20300. "type": "number"
  20301. },
  20302. {
  20303. "type": "string",
  20304. "enum": ["NaN"]
  20305. },
  20306. {
  20307. "type": "string",
  20308. "enum": ["Infinity"]
  20309. },
  20310. {
  20311. "type": "string",
  20312. "enum": ["-Infinity"]
  20313. },
  20314. {
  20315. "type": "string",
  20316. "enum": ["Infinity", "-Infinity", "NaN"]
  20317. }
  20318. ]
  20319. }
  20320. },
  20321. "required": ["released"],
  20322. "additionalProperties": false
  20323. },
  20324. "cost": {
  20325. "type": "array",
  20326. "items": {
  20327. "type": "object",
  20328. "properties": {
  20329. "tier": {
  20330. "type": "object",
  20331. "properties": {
  20332. "type": {
  20333. "type": "string",
  20334. "enum": ["context"]
  20335. },
  20336. "size": {
  20337. "type": "integer"
  20338. }
  20339. },
  20340. "required": ["type", "size"],
  20341. "additionalProperties": false
  20342. },
  20343. "input": {
  20344. "type": "number"
  20345. },
  20346. "output": {
  20347. "type": "number"
  20348. },
  20349. "cache": {
  20350. "type": "object",
  20351. "properties": {
  20352. "read": {
  20353. "type": "number"
  20354. },
  20355. "write": {
  20356. "type": "number"
  20357. }
  20358. },
  20359. "required": ["read", "write"],
  20360. "additionalProperties": false
  20361. }
  20362. },
  20363. "required": ["input", "output", "cache"],
  20364. "additionalProperties": false
  20365. }
  20366. },
  20367. "status": {
  20368. "type": "string",
  20369. "enum": ["alpha", "beta", "deprecated", "active"]
  20370. },
  20371. "enabled": {
  20372. "type": "boolean"
  20373. },
  20374. "limit": {
  20375. "type": "object",
  20376. "properties": {
  20377. "context": {
  20378. "type": "integer"
  20379. },
  20380. "input": {
  20381. "type": "integer"
  20382. },
  20383. "output": {
  20384. "type": "integer"
  20385. }
  20386. },
  20387. "required": ["context", "output"],
  20388. "additionalProperties": false
  20389. }
  20390. },
  20391. "required": [
  20392. "id",
  20393. "apiID",
  20394. "providerID",
  20395. "name",
  20396. "endpoint",
  20397. "capabilities",
  20398. "options",
  20399. "variants",
  20400. "time",
  20401. "cost",
  20402. "status",
  20403. "enabled",
  20404. "limit"
  20405. ],
  20406. "additionalProperties": false
  20407. },
  20408. "EventCatalogModelUpdated": {
  20409. "type": "object",
  20410. "properties": {
  20411. "id": {
  20412. "type": "string"
  20413. },
  20414. "type": {
  20415. "type": "string",
  20416. "enum": ["catalog.model.updated"]
  20417. },
  20418. "properties": {
  20419. "type": "object",
  20420. "properties": {
  20421. "model": {
  20422. "$ref": "#/components/schemas/ModelV2Info"
  20423. }
  20424. },
  20425. "required": ["model"],
  20426. "additionalProperties": false
  20427. }
  20428. },
  20429. "required": ["id", "type", "properties"],
  20430. "additionalProperties": false
  20431. },
  20432. "EventModels-devRefreshed": {
  20433. "type": "object",
  20434. "properties": {
  20435. "id": {
  20436. "type": "string"
  20437. },
  20438. "type": {
  20439. "type": "string",
  20440. "enum": ["models-dev.refreshed"]
  20441. },
  20442. "properties": {
  20443. "type": "object",
  20444. "properties": {}
  20445. }
  20446. },
  20447. "required": ["id", "type", "properties"],
  20448. "additionalProperties": false
  20449. },
  20450. "AccountV2OAuthCredential": {
  20451. "type": "object",
  20452. "properties": {
  20453. "type": {
  20454. "type": "string",
  20455. "enum": ["oauth"]
  20456. },
  20457. "refresh": {
  20458. "type": "string"
  20459. },
  20460. "access": {
  20461. "type": "string"
  20462. },
  20463. "expires": {
  20464. "type": "integer",
  20465. "minimum": 0
  20466. }
  20467. },
  20468. "required": ["type", "refresh", "access", "expires"],
  20469. "additionalProperties": false
  20470. },
  20471. "AccountV2ApiKeyCredential": {
  20472. "type": "object",
  20473. "properties": {
  20474. "type": {
  20475. "type": "string",
  20476. "enum": ["api"]
  20477. },
  20478. "key": {
  20479. "type": "string"
  20480. },
  20481. "metadata": {
  20482. "type": "object",
  20483. "additionalProperties": {
  20484. "type": "string"
  20485. }
  20486. }
  20487. },
  20488. "required": ["type", "key"],
  20489. "additionalProperties": false
  20490. },
  20491. "AccountV2Credential": {
  20492. "anyOf": [
  20493. {
  20494. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20495. },
  20496. {
  20497. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20498. }
  20499. ]
  20500. },
  20501. "AccountV2Info": {
  20502. "type": "object",
  20503. "properties": {
  20504. "id": {
  20505. "type": "string"
  20506. },
  20507. "serviceID": {
  20508. "type": "string"
  20509. },
  20510. "description": {
  20511. "type": "string"
  20512. },
  20513. "credential": {
  20514. "$ref": "#/components/schemas/AccountV2Credential"
  20515. }
  20516. },
  20517. "required": ["id", "serviceID", "description", "credential"],
  20518. "additionalProperties": false
  20519. },
  20520. "EventAccountAdded": {
  20521. "type": "object",
  20522. "properties": {
  20523. "id": {
  20524. "type": "string"
  20525. },
  20526. "type": {
  20527. "type": "string",
  20528. "enum": ["account.added"]
  20529. },
  20530. "properties": {
  20531. "type": "object",
  20532. "properties": {
  20533. "account": {
  20534. "$ref": "#/components/schemas/AccountV2Info"
  20535. }
  20536. },
  20537. "required": ["account"],
  20538. "additionalProperties": false
  20539. }
  20540. },
  20541. "required": ["id", "type", "properties"],
  20542. "additionalProperties": false
  20543. },
  20544. "EventAccountRemoved": {
  20545. "type": "object",
  20546. "properties": {
  20547. "id": {
  20548. "type": "string"
  20549. },
  20550. "type": {
  20551. "type": "string",
  20552. "enum": ["account.removed"]
  20553. },
  20554. "properties": {
  20555. "type": "object",
  20556. "properties": {
  20557. "account": {
  20558. "$ref": "#/components/schemas/AccountV2Info"
  20559. }
  20560. },
  20561. "required": ["account"],
  20562. "additionalProperties": false
  20563. }
  20564. },
  20565. "required": ["id", "type", "properties"],
  20566. "additionalProperties": false
  20567. },
  20568. "EventAccountSwitched": {
  20569. "type": "object",
  20570. "properties": {
  20571. "id": {
  20572. "type": "string"
  20573. },
  20574. "type": {
  20575. "type": "string",
  20576. "enum": ["account.switched"]
  20577. },
  20578. "properties": {
  20579. "type": "object",
  20580. "properties": {
  20581. "serviceID": {
  20582. "type": "string"
  20583. },
  20584. "from": {
  20585. "type": "string"
  20586. },
  20587. "to": {
  20588. "type": "string"
  20589. }
  20590. },
  20591. "required": ["serviceID"],
  20592. "additionalProperties": false
  20593. }
  20594. },
  20595. "required": ["id", "type", "properties"],
  20596. "additionalProperties": false
  20597. },
  20598. "SessionInfo": {
  20599. "type": "object",
  20600. "properties": {
  20601. "id": {
  20602. "type": "string",
  20603. "pattern": "^ses"
  20604. },
  20605. "parentID": {
  20606. "type": "string",
  20607. "pattern": "^ses"
  20608. },
  20609. "projectID": {
  20610. "type": "string"
  20611. },
  20612. "workspaceID": {
  20613. "type": "string",
  20614. "pattern": "^wrk"
  20615. },
  20616. "path": {
  20617. "type": "string"
  20618. },
  20619. "agent": {
  20620. "type": "string"
  20621. },
  20622. "model": {
  20623. "type": "object",
  20624. "properties": {
  20625. "id": {
  20626. "type": "string"
  20627. },
  20628. "providerID": {
  20629. "type": "string"
  20630. },
  20631. "variant": {
  20632. "type": "string"
  20633. }
  20634. },
  20635. "required": ["id", "providerID", "variant"],
  20636. "additionalProperties": false
  20637. },
  20638. "cost": {
  20639. "type": "number"
  20640. },
  20641. "tokens": {
  20642. "type": "object",
  20643. "properties": {
  20644. "input": {
  20645. "type": "number"
  20646. },
  20647. "output": {
  20648. "type": "number"
  20649. },
  20650. "reasoning": {
  20651. "type": "number"
  20652. },
  20653. "cache": {
  20654. "type": "object",
  20655. "properties": {
  20656. "read": {
  20657. "type": "number"
  20658. },
  20659. "write": {
  20660. "type": "number"
  20661. }
  20662. },
  20663. "required": ["read", "write"],
  20664. "additionalProperties": false
  20665. }
  20666. },
  20667. "required": ["input", "output", "reasoning", "cache"],
  20668. "additionalProperties": false
  20669. },
  20670. "time": {
  20671. "type": "object",
  20672. "properties": {
  20673. "created": {
  20674. "type": "number"
  20675. },
  20676. "updated": {
  20677. "type": "number"
  20678. },
  20679. "archived": {
  20680. "type": "number"
  20681. }
  20682. },
  20683. "required": ["created", "updated"],
  20684. "additionalProperties": false
  20685. },
  20686. "title": {
  20687. "type": "string"
  20688. }
  20689. },
  20690. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20691. "additionalProperties": false
  20692. },
  20693. "SessionDelivery": {
  20694. "type": "string",
  20695. "enum": ["immediate", "deferred"]
  20696. },
  20697. "SessionMessageAgentSwitched": {
  20698. "type": "object",
  20699. "properties": {
  20700. "id": {
  20701. "type": "string"
  20702. },
  20703. "metadata": {
  20704. "type": "object"
  20705. },
  20706. "time": {
  20707. "type": "object",
  20708. "properties": {
  20709. "created": {
  20710. "type": "number"
  20711. }
  20712. },
  20713. "required": ["created"],
  20714. "additionalProperties": false
  20715. },
  20716. "type": {
  20717. "type": "string",
  20718. "enum": ["agent-switched"]
  20719. },
  20720. "agent": {
  20721. "type": "string"
  20722. }
  20723. },
  20724. "required": ["id", "time", "type", "agent"],
  20725. "additionalProperties": false
  20726. },
  20727. "SessionMessageModelSwitched": {
  20728. "type": "object",
  20729. "properties": {
  20730. "id": {
  20731. "type": "string"
  20732. },
  20733. "metadata": {
  20734. "type": "object"
  20735. },
  20736. "time": {
  20737. "type": "object",
  20738. "properties": {
  20739. "created": {
  20740. "type": "number"
  20741. }
  20742. },
  20743. "required": ["created"],
  20744. "additionalProperties": false
  20745. },
  20746. "type": {
  20747. "type": "string",
  20748. "enum": ["model-switched"]
  20749. },
  20750. "model": {
  20751. "type": "object",
  20752. "properties": {
  20753. "id": {
  20754. "type": "string"
  20755. },
  20756. "providerID": {
  20757. "type": "string"
  20758. },
  20759. "variant": {
  20760. "type": "string"
  20761. }
  20762. },
  20763. "required": ["id", "providerID", "variant"],
  20764. "additionalProperties": false
  20765. }
  20766. },
  20767. "required": ["id", "time", "type", "model"],
  20768. "additionalProperties": false
  20769. },
  20770. "SessionMessageUser": {
  20771. "type": "object",
  20772. "properties": {
  20773. "id": {
  20774. "type": "string"
  20775. },
  20776. "metadata": {
  20777. "type": "object"
  20778. },
  20779. "time": {
  20780. "type": "object",
  20781. "properties": {
  20782. "created": {
  20783. "type": "number"
  20784. }
  20785. },
  20786. "required": ["created"],
  20787. "additionalProperties": false
  20788. },
  20789. "text": {
  20790. "type": "string"
  20791. },
  20792. "files": {
  20793. "type": "array",
  20794. "items": {
  20795. "$ref": "#/components/schemas/PromptFileAttachment"
  20796. }
  20797. },
  20798. "agents": {
  20799. "type": "array",
  20800. "items": {
  20801. "$ref": "#/components/schemas/PromptAgentAttachment"
  20802. }
  20803. },
  20804. "references": {
  20805. "type": "array",
  20806. "items": {
  20807. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20808. }
  20809. },
  20810. "type": {
  20811. "type": "string",
  20812. "enum": ["user"]
  20813. }
  20814. },
  20815. "required": ["id", "time", "text", "type"],
  20816. "additionalProperties": false
  20817. },
  20818. "SessionMessageSynthetic": {
  20819. "type": "object",
  20820. "properties": {
  20821. "id": {
  20822. "type": "string"
  20823. },
  20824. "metadata": {
  20825. "type": "object"
  20826. },
  20827. "time": {
  20828. "type": "object",
  20829. "properties": {
  20830. "created": {
  20831. "type": "number"
  20832. }
  20833. },
  20834. "required": ["created"],
  20835. "additionalProperties": false
  20836. },
  20837. "sessionID": {
  20838. "type": "string",
  20839. "pattern": "^ses"
  20840. },
  20841. "text": {
  20842. "type": "string"
  20843. },
  20844. "type": {
  20845. "type": "string",
  20846. "enum": ["synthetic"]
  20847. }
  20848. },
  20849. "required": ["id", "time", "sessionID", "text", "type"],
  20850. "additionalProperties": false
  20851. },
  20852. "SessionMessageShell": {
  20853. "type": "object",
  20854. "properties": {
  20855. "id": {
  20856. "type": "string"
  20857. },
  20858. "metadata": {
  20859. "type": "object"
  20860. },
  20861. "time": {
  20862. "type": "object",
  20863. "properties": {
  20864. "created": {
  20865. "type": "number"
  20866. },
  20867. "completed": {
  20868. "type": "number"
  20869. }
  20870. },
  20871. "required": ["created"],
  20872. "additionalProperties": false
  20873. },
  20874. "type": {
  20875. "type": "string",
  20876. "enum": ["shell"]
  20877. },
  20878. "callID": {
  20879. "type": "string"
  20880. },
  20881. "command": {
  20882. "type": "string"
  20883. },
  20884. "output": {
  20885. "type": "string"
  20886. }
  20887. },
  20888. "required": ["id", "time", "type", "callID", "command", "output"],
  20889. "additionalProperties": false
  20890. },
  20891. "SessionMessageAssistantText": {
  20892. "type": "object",
  20893. "properties": {
  20894. "type": {
  20895. "type": "string",
  20896. "enum": ["text"]
  20897. },
  20898. "text": {
  20899. "type": "string"
  20900. }
  20901. },
  20902. "required": ["type", "text"],
  20903. "additionalProperties": false
  20904. },
  20905. "SessionMessageAssistantReasoning": {
  20906. "type": "object",
  20907. "properties": {
  20908. "type": {
  20909. "type": "string",
  20910. "enum": ["reasoning"]
  20911. },
  20912. "id": {
  20913. "type": "string"
  20914. },
  20915. "text": {
  20916. "type": "string"
  20917. }
  20918. },
  20919. "required": ["type", "id", "text"],
  20920. "additionalProperties": false
  20921. },
  20922. "SessionMessageToolStatePending": {
  20923. "type": "object",
  20924. "properties": {
  20925. "status": {
  20926. "type": "string",
  20927. "enum": ["pending"]
  20928. },
  20929. "input": {
  20930. "type": "string"
  20931. }
  20932. },
  20933. "required": ["status", "input"],
  20934. "additionalProperties": false
  20935. },
  20936. "SessionMessageToolStateRunning": {
  20937. "type": "object",
  20938. "properties": {
  20939. "status": {
  20940. "type": "string",
  20941. "enum": ["running"]
  20942. },
  20943. "input": {
  20944. "type": "object"
  20945. },
  20946. "structured": {
  20947. "type": "object"
  20948. },
  20949. "content": {
  20950. "type": "array",
  20951. "items": {
  20952. "anyOf": [
  20953. {
  20954. "$ref": "#/components/schemas/ToolTextContent"
  20955. },
  20956. {
  20957. "$ref": "#/components/schemas/ToolFileContent"
  20958. }
  20959. ]
  20960. }
  20961. }
  20962. },
  20963. "required": ["status", "input", "structured", "content"],
  20964. "additionalProperties": false
  20965. },
  20966. "SessionMessageToolStateCompleted": {
  20967. "type": "object",
  20968. "properties": {
  20969. "status": {
  20970. "type": "string",
  20971. "enum": ["completed"]
  20972. },
  20973. "input": {
  20974. "type": "object"
  20975. },
  20976. "attachments": {
  20977. "type": "array",
  20978. "items": {
  20979. "$ref": "#/components/schemas/PromptFileAttachment"
  20980. }
  20981. },
  20982. "content": {
  20983. "type": "array",
  20984. "items": {
  20985. "anyOf": [
  20986. {
  20987. "$ref": "#/components/schemas/ToolTextContent"
  20988. },
  20989. {
  20990. "$ref": "#/components/schemas/ToolFileContent"
  20991. }
  20992. ]
  20993. }
  20994. },
  20995. "structured": {
  20996. "type": "object"
  20997. }
  20998. },
  20999. "required": ["status", "input", "content", "structured"],
  21000. "additionalProperties": false
  21001. },
  21002. "SessionMessageToolStateError": {
  21003. "type": "object",
  21004. "properties": {
  21005. "status": {
  21006. "type": "string",
  21007. "enum": ["error"]
  21008. },
  21009. "input": {
  21010. "type": "object"
  21011. },
  21012. "content": {
  21013. "type": "array",
  21014. "items": {
  21015. "anyOf": [
  21016. {
  21017. "$ref": "#/components/schemas/ToolTextContent"
  21018. },
  21019. {
  21020. "$ref": "#/components/schemas/ToolFileContent"
  21021. }
  21022. ]
  21023. }
  21024. },
  21025. "structured": {
  21026. "type": "object"
  21027. },
  21028. "error": {
  21029. "$ref": "#/components/schemas/SessionErrorUnknown"
  21030. }
  21031. },
  21032. "required": ["status", "input", "content", "structured", "error"],
  21033. "additionalProperties": false
  21034. },
  21035. "SessionMessageAssistantTool": {
  21036. "type": "object",
  21037. "properties": {
  21038. "type": {
  21039. "type": "string",
  21040. "enum": ["tool"]
  21041. },
  21042. "id": {
  21043. "type": "string"
  21044. },
  21045. "name": {
  21046. "type": "string"
  21047. },
  21048. "provider": {
  21049. "type": "object",
  21050. "properties": {
  21051. "executed": {
  21052. "type": "boolean"
  21053. },
  21054. "metadata": {
  21055. "type": "object"
  21056. }
  21057. },
  21058. "required": ["executed"],
  21059. "additionalProperties": false
  21060. },
  21061. "state": {
  21062. "anyOf": [
  21063. {
  21064. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21065. },
  21066. {
  21067. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21068. },
  21069. {
  21070. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21071. },
  21072. {
  21073. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21074. }
  21075. ]
  21076. },
  21077. "time": {
  21078. "type": "object",
  21079. "properties": {
  21080. "created": {
  21081. "type": "number"
  21082. },
  21083. "ran": {
  21084. "type": "number"
  21085. },
  21086. "completed": {
  21087. "type": "number"
  21088. },
  21089. "pruned": {
  21090. "type": "number"
  21091. }
  21092. },
  21093. "required": ["created"],
  21094. "additionalProperties": false
  21095. }
  21096. },
  21097. "required": ["type", "id", "name", "state", "time"],
  21098. "additionalProperties": false
  21099. },
  21100. "SessionMessageAssistant": {
  21101. "type": "object",
  21102. "properties": {
  21103. "id": {
  21104. "type": "string"
  21105. },
  21106. "metadata": {
  21107. "type": "object"
  21108. },
  21109. "time": {
  21110. "type": "object",
  21111. "properties": {
  21112. "created": {
  21113. "type": "number"
  21114. },
  21115. "completed": {
  21116. "type": "number"
  21117. }
  21118. },
  21119. "required": ["created"],
  21120. "additionalProperties": false
  21121. },
  21122. "type": {
  21123. "type": "string",
  21124. "enum": ["assistant"]
  21125. },
  21126. "agent": {
  21127. "type": "string"
  21128. },
  21129. "model": {
  21130. "type": "object",
  21131. "properties": {
  21132. "id": {
  21133. "type": "string"
  21134. },
  21135. "providerID": {
  21136. "type": "string"
  21137. },
  21138. "variant": {
  21139. "type": "string"
  21140. }
  21141. },
  21142. "required": ["id", "providerID", "variant"],
  21143. "additionalProperties": false
  21144. },
  21145. "content": {
  21146. "type": "array",
  21147. "items": {
  21148. "anyOf": [
  21149. {
  21150. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21151. },
  21152. {
  21153. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21154. },
  21155. {
  21156. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21157. }
  21158. ]
  21159. }
  21160. },
  21161. "snapshot": {
  21162. "type": "object",
  21163. "properties": {
  21164. "start": {
  21165. "type": "string"
  21166. },
  21167. "end": {
  21168. "type": "string"
  21169. }
  21170. },
  21171. "additionalProperties": false
  21172. },
  21173. "finish": {
  21174. "type": "string"
  21175. },
  21176. "cost": {
  21177. "type": "number"
  21178. },
  21179. "tokens": {
  21180. "type": "object",
  21181. "properties": {
  21182. "input": {
  21183. "type": "number"
  21184. },
  21185. "output": {
  21186. "type": "number"
  21187. },
  21188. "reasoning": {
  21189. "type": "number"
  21190. },
  21191. "cache": {
  21192. "type": "object",
  21193. "properties": {
  21194. "read": {
  21195. "type": "number"
  21196. },
  21197. "write": {
  21198. "type": "number"
  21199. }
  21200. },
  21201. "required": ["read", "write"],
  21202. "additionalProperties": false
  21203. }
  21204. },
  21205. "required": ["input", "output", "reasoning", "cache"],
  21206. "additionalProperties": false
  21207. },
  21208. "error": {
  21209. "$ref": "#/components/schemas/SessionErrorUnknown"
  21210. }
  21211. },
  21212. "required": ["id", "time", "type", "agent", "model", "content"],
  21213. "additionalProperties": false
  21214. },
  21215. "SessionMessageCompaction": {
  21216. "type": "object",
  21217. "properties": {
  21218. "type": {
  21219. "type": "string",
  21220. "enum": ["compaction"]
  21221. },
  21222. "reason": {
  21223. "type": "string",
  21224. "enum": ["auto", "manual"]
  21225. },
  21226. "summary": {
  21227. "type": "string"
  21228. },
  21229. "include": {
  21230. "type": "string"
  21231. },
  21232. "id": {
  21233. "type": "string"
  21234. },
  21235. "metadata": {
  21236. "type": "object"
  21237. },
  21238. "time": {
  21239. "type": "object",
  21240. "properties": {
  21241. "created": {
  21242. "type": "number"
  21243. }
  21244. },
  21245. "required": ["created"],
  21246. "additionalProperties": false
  21247. }
  21248. },
  21249. "required": ["type", "reason", "summary", "id", "time"],
  21250. "additionalProperties": false
  21251. },
  21252. "SessionMessage": {
  21253. "anyOf": [
  21254. {
  21255. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21256. },
  21257. {
  21258. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21259. },
  21260. {
  21261. "$ref": "#/components/schemas/SessionMessageUser"
  21262. },
  21263. {
  21264. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21265. },
  21266. {
  21267. "$ref": "#/components/schemas/SessionMessageShell"
  21268. },
  21269. {
  21270. "$ref": "#/components/schemas/SessionMessageAssistant"
  21271. },
  21272. {
  21273. "$ref": "#/components/schemas/SessionMessageCompaction"
  21274. }
  21275. ]
  21276. },
  21277. "ProviderV2Info": {
  21278. "type": "object",
  21279. "properties": {
  21280. "id": {
  21281. "type": "string"
  21282. },
  21283. "name": {
  21284. "type": "string"
  21285. },
  21286. "enabled": {
  21287. "anyOf": [
  21288. {
  21289. "type": "boolean",
  21290. "enum": [false]
  21291. },
  21292. {
  21293. "type": "object",
  21294. "properties": {
  21295. "via": {
  21296. "type": "string",
  21297. "enum": ["env"]
  21298. },
  21299. "name": {
  21300. "type": "string"
  21301. }
  21302. },
  21303. "required": ["via", "name"],
  21304. "additionalProperties": false
  21305. },
  21306. {
  21307. "type": "object",
  21308. "properties": {
  21309. "via": {
  21310. "type": "string",
  21311. "enum": ["account"]
  21312. },
  21313. "service": {
  21314. "type": "string"
  21315. }
  21316. },
  21317. "required": ["via", "service"],
  21318. "additionalProperties": false
  21319. },
  21320. {
  21321. "type": "object",
  21322. "properties": {
  21323. "via": {
  21324. "type": "string",
  21325. "enum": ["custom"]
  21326. },
  21327. "data": {
  21328. "type": "object"
  21329. }
  21330. },
  21331. "required": ["via", "data"],
  21332. "additionalProperties": false
  21333. }
  21334. ]
  21335. },
  21336. "env": {
  21337. "type": "array",
  21338. "items": {
  21339. "type": "string"
  21340. }
  21341. },
  21342. "endpoint": {
  21343. "anyOf": [
  21344. {
  21345. "type": "object",
  21346. "properties": {
  21347. "type": {
  21348. "type": "string",
  21349. "enum": ["unknown"]
  21350. }
  21351. },
  21352. "required": ["type"],
  21353. "additionalProperties": false
  21354. },
  21355. {
  21356. "type": "object",
  21357. "properties": {
  21358. "type": {
  21359. "type": "string",
  21360. "enum": ["openai/responses"]
  21361. },
  21362. "url": {
  21363. "type": "string"
  21364. },
  21365. "websocket": {
  21366. "type": "boolean"
  21367. }
  21368. },
  21369. "required": ["type", "url"],
  21370. "additionalProperties": false
  21371. },
  21372. {
  21373. "type": "object",
  21374. "properties": {
  21375. "type": {
  21376. "type": "string",
  21377. "enum": ["openai/completions"]
  21378. },
  21379. "url": {
  21380. "type": "string"
  21381. },
  21382. "reasoning": {
  21383. "anyOf": [
  21384. {
  21385. "type": "object",
  21386. "properties": {
  21387. "type": {
  21388. "type": "string",
  21389. "enum": ["reasoning_content"]
  21390. }
  21391. },
  21392. "required": ["type"],
  21393. "additionalProperties": false
  21394. },
  21395. {
  21396. "type": "object",
  21397. "properties": {
  21398. "type": {
  21399. "type": "string",
  21400. "enum": ["reasoning_details"]
  21401. }
  21402. },
  21403. "required": ["type"],
  21404. "additionalProperties": false
  21405. }
  21406. ]
  21407. }
  21408. },
  21409. "required": ["type", "url"],
  21410. "additionalProperties": false
  21411. },
  21412. {
  21413. "type": "object",
  21414. "properties": {
  21415. "type": {
  21416. "type": "string",
  21417. "enum": ["anthropic/messages"]
  21418. },
  21419. "url": {
  21420. "type": "string"
  21421. }
  21422. },
  21423. "required": ["type", "url"],
  21424. "additionalProperties": false
  21425. },
  21426. {
  21427. "type": "object",
  21428. "properties": {
  21429. "type": {
  21430. "type": "string",
  21431. "enum": ["aisdk"]
  21432. },
  21433. "package": {
  21434. "type": "string"
  21435. },
  21436. "url": {
  21437. "type": "string"
  21438. }
  21439. },
  21440. "required": ["type", "package"],
  21441. "additionalProperties": false
  21442. }
  21443. ]
  21444. },
  21445. "options": {
  21446. "type": "object",
  21447. "properties": {
  21448. "headers": {
  21449. "type": "object",
  21450. "additionalProperties": {
  21451. "type": "string"
  21452. }
  21453. },
  21454. "body": {
  21455. "type": "object"
  21456. },
  21457. "aisdk": {
  21458. "type": "object",
  21459. "properties": {
  21460. "provider": {
  21461. "type": "object"
  21462. },
  21463. "request": {
  21464. "type": "object"
  21465. }
  21466. },
  21467. "required": ["provider", "request"],
  21468. "additionalProperties": false
  21469. }
  21470. },
  21471. "required": ["headers", "body", "aisdk"],
  21472. "additionalProperties": false
  21473. }
  21474. },
  21475. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21476. "additionalProperties": false
  21477. },
  21478. "EventTuiToastShow1": {
  21479. "type": "object",
  21480. "properties": {
  21481. "id": {
  21482. "type": "string"
  21483. },
  21484. "type": {
  21485. "type": "string",
  21486. "enum": ["tui.toast.show"]
  21487. },
  21488. "properties": {
  21489. "type": "object",
  21490. "properties": {
  21491. "title": {
  21492. "type": "string"
  21493. },
  21494. "message": {
  21495. "type": "string"
  21496. },
  21497. "variant": {
  21498. "type": "string",
  21499. "enum": ["info", "success", "warning", "error"]
  21500. },
  21501. "duration": {
  21502. "type": "integer",
  21503. "exclusiveMinimum": 0
  21504. }
  21505. },
  21506. "required": ["message", "variant"],
  21507. "additionalProperties": false
  21508. }
  21509. },
  21510. "required": ["id", "type", "properties"],
  21511. "additionalProperties": false
  21512. },
  21513. "ModelV2Info1": {
  21514. "type": "object",
  21515. "properties": {
  21516. "id": {
  21517. "type": "string"
  21518. },
  21519. "apiID": {
  21520. "type": "string"
  21521. },
  21522. "providerID": {
  21523. "type": "string"
  21524. },
  21525. "family": {
  21526. "type": "string"
  21527. },
  21528. "name": {
  21529. "type": "string"
  21530. },
  21531. "endpoint": {
  21532. "anyOf": [
  21533. {
  21534. "type": "object",
  21535. "properties": {
  21536. "type": {
  21537. "type": "string",
  21538. "enum": ["unknown"]
  21539. }
  21540. },
  21541. "required": ["type"],
  21542. "additionalProperties": false
  21543. },
  21544. {
  21545. "type": "object",
  21546. "properties": {
  21547. "type": {
  21548. "type": "string",
  21549. "enum": ["openai/responses"]
  21550. },
  21551. "url": {
  21552. "type": "string"
  21553. },
  21554. "websocket": {
  21555. "type": "boolean"
  21556. }
  21557. },
  21558. "required": ["type", "url"],
  21559. "additionalProperties": false
  21560. },
  21561. {
  21562. "type": "object",
  21563. "properties": {
  21564. "type": {
  21565. "type": "string",
  21566. "enum": ["openai/completions"]
  21567. },
  21568. "url": {
  21569. "type": "string"
  21570. },
  21571. "reasoning": {
  21572. "anyOf": [
  21573. {
  21574. "type": "object",
  21575. "properties": {
  21576. "type": {
  21577. "type": "string",
  21578. "enum": ["reasoning_content"]
  21579. }
  21580. },
  21581. "required": ["type"],
  21582. "additionalProperties": false
  21583. },
  21584. {
  21585. "type": "object",
  21586. "properties": {
  21587. "type": {
  21588. "type": "string",
  21589. "enum": ["reasoning_details"]
  21590. }
  21591. },
  21592. "required": ["type"],
  21593. "additionalProperties": false
  21594. }
  21595. ]
  21596. }
  21597. },
  21598. "required": ["type", "url"],
  21599. "additionalProperties": false
  21600. },
  21601. {
  21602. "type": "object",
  21603. "properties": {
  21604. "type": {
  21605. "type": "string",
  21606. "enum": ["anthropic/messages"]
  21607. },
  21608. "url": {
  21609. "type": "string"
  21610. }
  21611. },
  21612. "required": ["type", "url"],
  21613. "additionalProperties": false
  21614. },
  21615. {
  21616. "type": "object",
  21617. "properties": {
  21618. "type": {
  21619. "type": "string",
  21620. "enum": ["aisdk"]
  21621. },
  21622. "package": {
  21623. "type": "string"
  21624. },
  21625. "url": {
  21626. "type": "string"
  21627. }
  21628. },
  21629. "required": ["type", "package"],
  21630. "additionalProperties": false
  21631. }
  21632. ]
  21633. },
  21634. "capabilities": {
  21635. "type": "object",
  21636. "properties": {
  21637. "tools": {
  21638. "type": "boolean"
  21639. },
  21640. "input": {
  21641. "type": "array",
  21642. "items": {
  21643. "type": "string"
  21644. }
  21645. },
  21646. "output": {
  21647. "type": "array",
  21648. "items": {
  21649. "type": "string"
  21650. }
  21651. }
  21652. },
  21653. "required": ["tools", "input", "output"],
  21654. "additionalProperties": false
  21655. },
  21656. "options": {
  21657. "type": "object",
  21658. "properties": {
  21659. "headers": {
  21660. "type": "object",
  21661. "additionalProperties": {
  21662. "type": "string"
  21663. }
  21664. },
  21665. "body": {
  21666. "type": "object"
  21667. },
  21668. "aisdk": {
  21669. "type": "object",
  21670. "properties": {
  21671. "provider": {
  21672. "type": "object"
  21673. },
  21674. "request": {
  21675. "type": "object"
  21676. }
  21677. },
  21678. "required": ["provider", "request"],
  21679. "additionalProperties": false
  21680. },
  21681. "variant": {
  21682. "type": "string"
  21683. }
  21684. },
  21685. "required": ["headers", "body", "aisdk"],
  21686. "additionalProperties": false
  21687. },
  21688. "variants": {
  21689. "type": "array",
  21690. "items": {
  21691. "type": "object",
  21692. "properties": {
  21693. "id": {
  21694. "type": "string"
  21695. },
  21696. "headers": {
  21697. "type": "object",
  21698. "additionalProperties": {
  21699. "type": "string"
  21700. }
  21701. },
  21702. "body": {
  21703. "type": "object"
  21704. },
  21705. "aisdk": {
  21706. "type": "object",
  21707. "properties": {
  21708. "provider": {
  21709. "type": "object"
  21710. },
  21711. "request": {
  21712. "type": "object"
  21713. }
  21714. },
  21715. "required": ["provider", "request"],
  21716. "additionalProperties": false
  21717. }
  21718. },
  21719. "required": ["id", "headers", "body", "aisdk"],
  21720. "additionalProperties": false
  21721. }
  21722. },
  21723. "time": {
  21724. "type": "object",
  21725. "properties": {
  21726. "released": {
  21727. "anyOf": [
  21728. {
  21729. "type": "number"
  21730. },
  21731. {
  21732. "type": "string",
  21733. "enum": ["NaN"]
  21734. },
  21735. {
  21736. "type": "string",
  21737. "enum": ["Infinity"]
  21738. },
  21739. {
  21740. "type": "string",
  21741. "enum": ["-Infinity"]
  21742. }
  21743. ]
  21744. }
  21745. },
  21746. "required": ["released"],
  21747. "additionalProperties": false
  21748. },
  21749. "cost": {
  21750. "type": "array",
  21751. "items": {
  21752. "type": "object",
  21753. "properties": {
  21754. "tier": {
  21755. "type": "object",
  21756. "properties": {
  21757. "type": {
  21758. "type": "string",
  21759. "enum": ["context"]
  21760. },
  21761. "size": {
  21762. "type": "integer"
  21763. }
  21764. },
  21765. "required": ["type", "size"],
  21766. "additionalProperties": false
  21767. },
  21768. "input": {
  21769. "type": "number"
  21770. },
  21771. "output": {
  21772. "type": "number"
  21773. },
  21774. "cache": {
  21775. "type": "object",
  21776. "properties": {
  21777. "read": {
  21778. "type": "number"
  21779. },
  21780. "write": {
  21781. "type": "number"
  21782. }
  21783. },
  21784. "required": ["read", "write"],
  21785. "additionalProperties": false
  21786. }
  21787. },
  21788. "required": ["input", "output", "cache"],
  21789. "additionalProperties": false
  21790. }
  21791. },
  21792. "status": {
  21793. "type": "string",
  21794. "enum": ["alpha", "beta", "deprecated", "active"]
  21795. },
  21796. "enabled": {
  21797. "type": "boolean"
  21798. },
  21799. "limit": {
  21800. "type": "object",
  21801. "properties": {
  21802. "context": {
  21803. "type": "integer"
  21804. },
  21805. "input": {
  21806. "type": "integer"
  21807. },
  21808. "output": {
  21809. "type": "integer"
  21810. }
  21811. },
  21812. "required": ["context", "output"],
  21813. "additionalProperties": false
  21814. }
  21815. },
  21816. "required": [
  21817. "id",
  21818. "apiID",
  21819. "providerID",
  21820. "name",
  21821. "endpoint",
  21822. "capabilities",
  21823. "options",
  21824. "variants",
  21825. "time",
  21826. "cost",
  21827. "status",
  21828. "enabled",
  21829. "limit"
  21830. ],
  21831. "additionalProperties": false
  21832. },
  21833. "BadRequestError": {
  21834. "type": "object",
  21835. "required": ["name", "data"],
  21836. "properties": {
  21837. "name": {
  21838. "type": "string",
  21839. "enum": ["BadRequest"]
  21840. },
  21841. "data": {
  21842. "type": "object",
  21843. "required": ["message"],
  21844. "properties": {
  21845. "message": {
  21846. "type": "string"
  21847. },
  21848. "kind": {
  21849. "type": "string",
  21850. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  21851. }
  21852. }
  21853. }
  21854. }
  21855. }
  21856. }
  21857. },
  21858. "security": [],
  21859. "tags": [
  21860. {
  21861. "name": "control",
  21862. "description": "Control plane routes."
  21863. },
  21864. {
  21865. "name": "global",
  21866. "description": "Global server routes."
  21867. },
  21868. {
  21869. "name": "event",
  21870. "description": "Instance event stream route."
  21871. },
  21872. {
  21873. "name": "config",
  21874. "description": "Experimental HttpApi config routes."
  21875. },
  21876. {
  21877. "name": "experimental",
  21878. "description": "Experimental HttpApi read-only routes."
  21879. },
  21880. {
  21881. "name": "file",
  21882. "description": "Experimental HttpApi file routes."
  21883. },
  21884. {
  21885. "name": "instance",
  21886. "description": "Experimental HttpApi instance read routes."
  21887. },
  21888. {
  21889. "name": "mcp",
  21890. "description": "Experimental HttpApi MCP routes."
  21891. },
  21892. {
  21893. "name": "project",
  21894. "description": "Experimental HttpApi project routes."
  21895. },
  21896. {
  21897. "name": "pty",
  21898. "description": "Experimental HttpApi PTY routes."
  21899. },
  21900. {
  21901. "name": "question",
  21902. "description": "Question routes."
  21903. },
  21904. {
  21905. "name": "permission",
  21906. "description": "Experimental HttpApi permission routes."
  21907. },
  21908. {
  21909. "name": "provider",
  21910. "description": "Experimental HttpApi provider routes."
  21911. },
  21912. {
  21913. "name": "session",
  21914. "description": "Experimental HttpApi session routes."
  21915. },
  21916. {
  21917. "name": "sync",
  21918. "description": "Experimental HttpApi sync routes."
  21919. },
  21920. {
  21921. "name": "v2",
  21922. "description": "Experimental v2 routes."
  21923. },
  21924. {
  21925. "name": "v2 messages",
  21926. "description": "Experimental v2 message routes."
  21927. },
  21928. {
  21929. "name": "v2 models",
  21930. "description": "Experimental v2 model routes."
  21931. },
  21932. {
  21933. "name": "v2 providers",
  21934. "description": "Experimental v2 provider routes."
  21935. },
  21936. {
  21937. "name": "tui",
  21938. "description": "Experimental HttpApi TUI routes."
  21939. },
  21940. {
  21941. "name": "workspace",
  21942. "description": "Experimental HttpApi workspace routes."
  21943. },
  21944. {
  21945. "name": "pty",
  21946. "description": "PTY websocket route."
  21947. }
  21948. ]
  21949. }