openapi.json 605 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046
  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. "409": {
  6199. "description": "SessionBusyError",
  6200. "content": {
  6201. "application/json": {
  6202. "schema": {
  6203. "$ref": "#/components/schemas/SessionBusyError"
  6204. }
  6205. }
  6206. }
  6207. }
  6208. },
  6209. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6210. "summary": "Delete message",
  6211. "x-codeSamples": [
  6212. {
  6213. "lang": "js",
  6214. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6215. }
  6216. ]
  6217. }
  6218. },
  6219. "/session/{sessionID}/fork": {
  6220. "post": {
  6221. "tags": ["session"],
  6222. "operationId": "session.fork",
  6223. "parameters": [
  6224. {
  6225. "name": "sessionID",
  6226. "in": "path",
  6227. "schema": {
  6228. "type": "string",
  6229. "pattern": "^ses"
  6230. },
  6231. "required": true
  6232. },
  6233. {
  6234. "name": "directory",
  6235. "in": "query",
  6236. "schema": {
  6237. "type": "string"
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "workspace",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "200",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "$ref": "#/components/schemas/Session"
  6257. }
  6258. }
  6259. }
  6260. },
  6261. "400": {
  6262. "description": "BadRequest | InvalidRequestError",
  6263. "content": {
  6264. "application/json": {
  6265. "schema": {
  6266. "anyOf": [
  6267. {
  6268. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6269. },
  6270. {
  6271. "$ref": "#/components/schemas/InvalidRequestError"
  6272. }
  6273. ]
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "404": {
  6279. "description": "NotFoundError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "$ref": "#/components/schemas/NotFoundError"
  6284. }
  6285. }
  6286. }
  6287. }
  6288. },
  6289. "description": "Create a new session by forking an existing session at a specific message point.",
  6290. "summary": "Fork session",
  6291. "requestBody": {
  6292. "content": {
  6293. "application/json": {
  6294. "schema": {
  6295. "type": "object",
  6296. "properties": {
  6297. "messageID": {
  6298. "type": "string",
  6299. "pattern": "^msg"
  6300. }
  6301. },
  6302. "additionalProperties": false
  6303. }
  6304. }
  6305. }
  6306. },
  6307. "x-codeSamples": [
  6308. {
  6309. "lang": "js",
  6310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6311. }
  6312. ]
  6313. }
  6314. },
  6315. "/session/{sessionID}/abort": {
  6316. "post": {
  6317. "tags": ["session"],
  6318. "operationId": "session.abort",
  6319. "parameters": [
  6320. {
  6321. "name": "sessionID",
  6322. "in": "path",
  6323. "schema": {
  6324. "type": "string",
  6325. "pattern": "^ses"
  6326. },
  6327. "required": true
  6328. },
  6329. {
  6330. "name": "directory",
  6331. "in": "query",
  6332. "schema": {
  6333. "type": "string"
  6334. },
  6335. "required": false
  6336. },
  6337. {
  6338. "name": "workspace",
  6339. "in": "query",
  6340. "schema": {
  6341. "type": "string"
  6342. },
  6343. "required": false
  6344. }
  6345. ],
  6346. "responses": {
  6347. "200": {
  6348. "description": "Aborted session",
  6349. "content": {
  6350. "application/json": {
  6351. "schema": {
  6352. "type": "boolean",
  6353. "description": "Aborted session"
  6354. }
  6355. }
  6356. }
  6357. },
  6358. "400": {
  6359. "description": "BadRequest | InvalidRequestError",
  6360. "content": {
  6361. "application/json": {
  6362. "schema": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/InvalidRequestError"
  6369. }
  6370. ]
  6371. }
  6372. }
  6373. }
  6374. }
  6375. },
  6376. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6377. "summary": "Abort session",
  6378. "x-codeSamples": [
  6379. {
  6380. "lang": "js",
  6381. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6382. }
  6383. ]
  6384. }
  6385. },
  6386. "/session/{sessionID}/init": {
  6387. "post": {
  6388. "tags": ["session"],
  6389. "operationId": "session.init",
  6390. "parameters": [
  6391. {
  6392. "name": "sessionID",
  6393. "in": "path",
  6394. "schema": {
  6395. "type": "string",
  6396. "pattern": "^ses"
  6397. },
  6398. "required": true
  6399. },
  6400. {
  6401. "name": "directory",
  6402. "in": "query",
  6403. "schema": {
  6404. "type": "string"
  6405. },
  6406. "required": false
  6407. },
  6408. {
  6409. "name": "workspace",
  6410. "in": "query",
  6411. "schema": {
  6412. "type": "string"
  6413. },
  6414. "required": false
  6415. }
  6416. ],
  6417. "responses": {
  6418. "200": {
  6419. "description": "200",
  6420. "content": {
  6421. "application/json": {
  6422. "schema": {
  6423. "type": "boolean",
  6424. "description": "200"
  6425. }
  6426. }
  6427. }
  6428. },
  6429. "400": {
  6430. "description": "BadRequest | InvalidRequestError",
  6431. "content": {
  6432. "application/json": {
  6433. "schema": {
  6434. "anyOf": [
  6435. {
  6436. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6437. },
  6438. {
  6439. "$ref": "#/components/schemas/InvalidRequestError"
  6440. }
  6441. ]
  6442. }
  6443. }
  6444. }
  6445. },
  6446. "404": {
  6447. "description": "NotFoundError",
  6448. "content": {
  6449. "application/json": {
  6450. "schema": {
  6451. "$ref": "#/components/schemas/NotFoundError"
  6452. }
  6453. }
  6454. }
  6455. }
  6456. },
  6457. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6458. "summary": "Initialize session",
  6459. "requestBody": {
  6460. "content": {
  6461. "application/json": {
  6462. "schema": {
  6463. "type": "object",
  6464. "properties": {
  6465. "modelID": {
  6466. "type": "string"
  6467. },
  6468. "providerID": {
  6469. "type": "string"
  6470. },
  6471. "messageID": {
  6472. "type": "string",
  6473. "pattern": "^msg"
  6474. }
  6475. },
  6476. "required": ["modelID", "providerID", "messageID"],
  6477. "additionalProperties": false
  6478. }
  6479. }
  6480. }
  6481. },
  6482. "x-codeSamples": [
  6483. {
  6484. "lang": "js",
  6485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6486. }
  6487. ]
  6488. }
  6489. },
  6490. "/session/{sessionID}/share": {
  6491. "post": {
  6492. "tags": ["session"],
  6493. "operationId": "session.share",
  6494. "parameters": [
  6495. {
  6496. "name": "sessionID",
  6497. "in": "path",
  6498. "schema": {
  6499. "type": "string",
  6500. "pattern": "^ses"
  6501. },
  6502. "required": true
  6503. },
  6504. {
  6505. "name": "directory",
  6506. "in": "query",
  6507. "schema": {
  6508. "type": "string"
  6509. },
  6510. "required": false
  6511. },
  6512. {
  6513. "name": "workspace",
  6514. "in": "query",
  6515. "schema": {
  6516. "type": "string"
  6517. },
  6518. "required": false
  6519. }
  6520. ],
  6521. "responses": {
  6522. "200": {
  6523. "description": "Successfully shared session",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/Session"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "400": {
  6533. "description": "Bad request",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/BadRequestError"
  6538. }
  6539. }
  6540. }
  6541. },
  6542. "404": {
  6543. "description": "NotFoundError",
  6544. "content": {
  6545. "application/json": {
  6546. "schema": {
  6547. "$ref": "#/components/schemas/NotFoundError"
  6548. }
  6549. }
  6550. }
  6551. },
  6552. "500": {
  6553. "description": "InternalServerError",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6558. }
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6564. "summary": "Share session",
  6565. "x-codeSamples": [
  6566. {
  6567. "lang": "js",
  6568. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6569. }
  6570. ]
  6571. },
  6572. "delete": {
  6573. "tags": ["session"],
  6574. "operationId": "session.unshare",
  6575. "parameters": [
  6576. {
  6577. "name": "sessionID",
  6578. "in": "path",
  6579. "schema": {
  6580. "type": "string",
  6581. "pattern": "^ses"
  6582. },
  6583. "required": true
  6584. },
  6585. {
  6586. "name": "directory",
  6587. "in": "query",
  6588. "schema": {
  6589. "type": "string"
  6590. },
  6591. "required": false
  6592. },
  6593. {
  6594. "name": "workspace",
  6595. "in": "query",
  6596. "schema": {
  6597. "type": "string"
  6598. },
  6599. "required": false
  6600. }
  6601. ],
  6602. "responses": {
  6603. "200": {
  6604. "description": "Successfully unshared session",
  6605. "content": {
  6606. "application/json": {
  6607. "schema": {
  6608. "$ref": "#/components/schemas/Session"
  6609. }
  6610. }
  6611. }
  6612. },
  6613. "400": {
  6614. "description": "Bad request",
  6615. "content": {
  6616. "application/json": {
  6617. "schema": {
  6618. "$ref": "#/components/schemas/BadRequestError"
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "404": {
  6624. "description": "NotFoundError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/NotFoundError"
  6629. }
  6630. }
  6631. }
  6632. },
  6633. "500": {
  6634. "description": "InternalServerError",
  6635. "content": {
  6636. "application/json": {
  6637. "schema": {
  6638. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6639. }
  6640. }
  6641. }
  6642. }
  6643. },
  6644. "description": "Remove the shareable link for a session, making it private again.",
  6645. "summary": "Unshare session",
  6646. "x-codeSamples": [
  6647. {
  6648. "lang": "js",
  6649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6650. }
  6651. ]
  6652. }
  6653. },
  6654. "/session/{sessionID}/summarize": {
  6655. "post": {
  6656. "tags": ["session"],
  6657. "operationId": "session.summarize",
  6658. "parameters": [
  6659. {
  6660. "name": "sessionID",
  6661. "in": "path",
  6662. "schema": {
  6663. "type": "string",
  6664. "pattern": "^ses"
  6665. },
  6666. "required": true
  6667. },
  6668. {
  6669. "name": "directory",
  6670. "in": "query",
  6671. "schema": {
  6672. "type": "string"
  6673. },
  6674. "required": false
  6675. },
  6676. {
  6677. "name": "workspace",
  6678. "in": "query",
  6679. "schema": {
  6680. "type": "string"
  6681. },
  6682. "required": false
  6683. }
  6684. ],
  6685. "responses": {
  6686. "200": {
  6687. "description": "Summarized session",
  6688. "content": {
  6689. "application/json": {
  6690. "schema": {
  6691. "type": "boolean",
  6692. "description": "Summarized session"
  6693. }
  6694. }
  6695. }
  6696. },
  6697. "400": {
  6698. "description": "BadRequest | InvalidRequestError",
  6699. "content": {
  6700. "application/json": {
  6701. "schema": {
  6702. "anyOf": [
  6703. {
  6704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6705. },
  6706. {
  6707. "$ref": "#/components/schemas/InvalidRequestError"
  6708. }
  6709. ]
  6710. }
  6711. }
  6712. }
  6713. },
  6714. "404": {
  6715. "description": "NotFoundError",
  6716. "content": {
  6717. "application/json": {
  6718. "schema": {
  6719. "$ref": "#/components/schemas/NotFoundError"
  6720. }
  6721. }
  6722. }
  6723. }
  6724. },
  6725. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6726. "summary": "Summarize session",
  6727. "requestBody": {
  6728. "content": {
  6729. "application/json": {
  6730. "schema": {
  6731. "type": "object",
  6732. "properties": {
  6733. "providerID": {
  6734. "type": "string"
  6735. },
  6736. "modelID": {
  6737. "type": "string"
  6738. },
  6739. "auto": {
  6740. "type": "boolean"
  6741. }
  6742. },
  6743. "required": ["providerID", "modelID"],
  6744. "additionalProperties": false
  6745. }
  6746. }
  6747. }
  6748. },
  6749. "x-codeSamples": [
  6750. {
  6751. "lang": "js",
  6752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6753. }
  6754. ]
  6755. }
  6756. },
  6757. "/session/{sessionID}/prompt_async": {
  6758. "post": {
  6759. "tags": ["session"],
  6760. "operationId": "session.prompt_async",
  6761. "parameters": [
  6762. {
  6763. "name": "sessionID",
  6764. "in": "path",
  6765. "schema": {
  6766. "type": "string",
  6767. "pattern": "^ses"
  6768. },
  6769. "required": true
  6770. },
  6771. {
  6772. "name": "directory",
  6773. "in": "query",
  6774. "schema": {
  6775. "type": "string"
  6776. },
  6777. "required": false
  6778. },
  6779. {
  6780. "name": "workspace",
  6781. "in": "query",
  6782. "schema": {
  6783. "type": "string"
  6784. },
  6785. "required": false
  6786. }
  6787. ],
  6788. "responses": {
  6789. "204": {
  6790. "description": "Prompt accepted"
  6791. },
  6792. "400": {
  6793. "description": "BadRequest | InvalidRequestError",
  6794. "content": {
  6795. "application/json": {
  6796. "schema": {
  6797. "anyOf": [
  6798. {
  6799. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6800. },
  6801. {
  6802. "$ref": "#/components/schemas/InvalidRequestError"
  6803. }
  6804. ]
  6805. }
  6806. }
  6807. }
  6808. },
  6809. "404": {
  6810. "description": "NotFoundError",
  6811. "content": {
  6812. "application/json": {
  6813. "schema": {
  6814. "$ref": "#/components/schemas/NotFoundError"
  6815. }
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6821. "summary": "Send async message",
  6822. "requestBody": {
  6823. "content": {
  6824. "application/json": {
  6825. "schema": {
  6826. "type": "object",
  6827. "properties": {
  6828. "messageID": {
  6829. "type": "string",
  6830. "pattern": "^msg"
  6831. },
  6832. "model": {
  6833. "type": "object",
  6834. "properties": {
  6835. "providerID": {
  6836. "type": "string"
  6837. },
  6838. "modelID": {
  6839. "type": "string"
  6840. }
  6841. },
  6842. "required": ["providerID", "modelID"],
  6843. "additionalProperties": false
  6844. },
  6845. "agent": {
  6846. "type": "string"
  6847. },
  6848. "noReply": {
  6849. "type": "boolean"
  6850. },
  6851. "tools": {
  6852. "type": "object",
  6853. "additionalProperties": {
  6854. "type": "boolean"
  6855. }
  6856. },
  6857. "format": {
  6858. "$ref": "#/components/schemas/OutputFormat"
  6859. },
  6860. "system": {
  6861. "type": "string"
  6862. },
  6863. "variant": {
  6864. "type": "string"
  6865. },
  6866. "parts": {
  6867. "type": "array",
  6868. "items": {
  6869. "anyOf": [
  6870. {
  6871. "$ref": "#/components/schemas/TextPartInput"
  6872. },
  6873. {
  6874. "$ref": "#/components/schemas/FilePartInput"
  6875. },
  6876. {
  6877. "$ref": "#/components/schemas/AgentPartInput"
  6878. },
  6879. {
  6880. "$ref": "#/components/schemas/SubtaskPartInput"
  6881. }
  6882. ]
  6883. }
  6884. }
  6885. },
  6886. "required": ["parts"],
  6887. "additionalProperties": false
  6888. }
  6889. }
  6890. }
  6891. },
  6892. "x-codeSamples": [
  6893. {
  6894. "lang": "js",
  6895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6896. }
  6897. ]
  6898. }
  6899. },
  6900. "/session/{sessionID}/command": {
  6901. "post": {
  6902. "tags": ["session"],
  6903. "operationId": "session.command",
  6904. "parameters": [
  6905. {
  6906. "name": "sessionID",
  6907. "in": "path",
  6908. "schema": {
  6909. "type": "string",
  6910. "pattern": "^ses"
  6911. },
  6912. "required": true
  6913. },
  6914. {
  6915. "name": "directory",
  6916. "in": "query",
  6917. "schema": {
  6918. "type": "string"
  6919. },
  6920. "required": false
  6921. },
  6922. {
  6923. "name": "workspace",
  6924. "in": "query",
  6925. "schema": {
  6926. "type": "string"
  6927. },
  6928. "required": false
  6929. }
  6930. ],
  6931. "responses": {
  6932. "200": {
  6933. "description": "Created message",
  6934. "content": {
  6935. "application/json": {
  6936. "schema": {
  6937. "type": "object",
  6938. "required": ["info", "parts"],
  6939. "properties": {
  6940. "info": {
  6941. "$ref": "#/components/schemas/AssistantMessage"
  6942. },
  6943. "parts": {
  6944. "type": "array",
  6945. "items": {
  6946. "$ref": "#/components/schemas/Part"
  6947. }
  6948. }
  6949. }
  6950. }
  6951. }
  6952. }
  6953. },
  6954. "400": {
  6955. "description": "BadRequest | InvalidRequestError",
  6956. "content": {
  6957. "application/json": {
  6958. "schema": {
  6959. "anyOf": [
  6960. {
  6961. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6962. },
  6963. {
  6964. "$ref": "#/components/schemas/InvalidRequestError"
  6965. }
  6966. ]
  6967. }
  6968. }
  6969. }
  6970. },
  6971. "404": {
  6972. "description": "NotFoundError",
  6973. "content": {
  6974. "application/json": {
  6975. "schema": {
  6976. "$ref": "#/components/schemas/NotFoundError"
  6977. }
  6978. }
  6979. }
  6980. }
  6981. },
  6982. "description": "Send a new command to a session for execution by the AI assistant.",
  6983. "summary": "Send command",
  6984. "requestBody": {
  6985. "content": {
  6986. "application/json": {
  6987. "schema": {
  6988. "type": "object",
  6989. "properties": {
  6990. "messageID": {
  6991. "type": "string",
  6992. "pattern": "^msg"
  6993. },
  6994. "agent": {
  6995. "type": "string"
  6996. },
  6997. "model": {
  6998. "type": "string"
  6999. },
  7000. "arguments": {
  7001. "type": "string"
  7002. },
  7003. "command": {
  7004. "type": "string"
  7005. },
  7006. "variant": {
  7007. "type": "string"
  7008. },
  7009. "parts": {
  7010. "type": "array",
  7011. "items": {
  7012. "type": "object",
  7013. "properties": {
  7014. "id": {
  7015. "type": "string",
  7016. "pattern": "^prt"
  7017. },
  7018. "type": {
  7019. "type": "string",
  7020. "enum": ["file"]
  7021. },
  7022. "mime": {
  7023. "type": "string"
  7024. },
  7025. "filename": {
  7026. "type": "string"
  7027. },
  7028. "url": {
  7029. "type": "string"
  7030. },
  7031. "source": {
  7032. "$ref": "#/components/schemas/FilePartSource"
  7033. }
  7034. },
  7035. "required": ["type", "mime", "url"],
  7036. "additionalProperties": false
  7037. }
  7038. }
  7039. },
  7040. "required": ["arguments", "command"],
  7041. "additionalProperties": false
  7042. }
  7043. }
  7044. }
  7045. },
  7046. "x-codeSamples": [
  7047. {
  7048. "lang": "js",
  7049. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7050. }
  7051. ]
  7052. }
  7053. },
  7054. "/session/{sessionID}/shell": {
  7055. "post": {
  7056. "tags": ["session"],
  7057. "operationId": "session.shell",
  7058. "parameters": [
  7059. {
  7060. "name": "sessionID",
  7061. "in": "path",
  7062. "schema": {
  7063. "type": "string",
  7064. "pattern": "^ses"
  7065. },
  7066. "required": true
  7067. },
  7068. {
  7069. "name": "directory",
  7070. "in": "query",
  7071. "schema": {
  7072. "type": "string"
  7073. },
  7074. "required": false
  7075. },
  7076. {
  7077. "name": "workspace",
  7078. "in": "query",
  7079. "schema": {
  7080. "type": "string"
  7081. },
  7082. "required": false
  7083. }
  7084. ],
  7085. "responses": {
  7086. "200": {
  7087. "description": "Created message",
  7088. "content": {
  7089. "application/json": {
  7090. "schema": {
  7091. "type": "object",
  7092. "properties": {
  7093. "info": {
  7094. "$ref": "#/components/schemas/Message"
  7095. },
  7096. "parts": {
  7097. "type": "array",
  7098. "items": {
  7099. "$ref": "#/components/schemas/Part"
  7100. }
  7101. }
  7102. },
  7103. "required": ["info", "parts"],
  7104. "additionalProperties": false,
  7105. "description": "Created message"
  7106. }
  7107. }
  7108. }
  7109. },
  7110. "400": {
  7111. "description": "BadRequest | InvalidRequestError",
  7112. "content": {
  7113. "application/json": {
  7114. "schema": {
  7115. "anyOf": [
  7116. {
  7117. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7118. },
  7119. {
  7120. "$ref": "#/components/schemas/InvalidRequestError"
  7121. }
  7122. ]
  7123. }
  7124. }
  7125. }
  7126. },
  7127. "404": {
  7128. "description": "NotFoundError",
  7129. "content": {
  7130. "application/json": {
  7131. "schema": {
  7132. "$ref": "#/components/schemas/NotFoundError"
  7133. }
  7134. }
  7135. }
  7136. },
  7137. "409": {
  7138. "description": "SessionBusyError",
  7139. "content": {
  7140. "application/json": {
  7141. "schema": {
  7142. "$ref": "#/components/schemas/SessionBusyError"
  7143. }
  7144. }
  7145. }
  7146. }
  7147. },
  7148. "description": "Execute a shell command within the session context and return the AI's response.",
  7149. "summary": "Run shell command",
  7150. "requestBody": {
  7151. "content": {
  7152. "application/json": {
  7153. "schema": {
  7154. "type": "object",
  7155. "properties": {
  7156. "messageID": {
  7157. "type": "string",
  7158. "pattern": "^msg"
  7159. },
  7160. "agent": {
  7161. "type": "string"
  7162. },
  7163. "model": {
  7164. "type": "object",
  7165. "properties": {
  7166. "providerID": {
  7167. "type": "string"
  7168. },
  7169. "modelID": {
  7170. "type": "string"
  7171. }
  7172. },
  7173. "required": ["providerID", "modelID"],
  7174. "additionalProperties": false
  7175. },
  7176. "command": {
  7177. "type": "string"
  7178. }
  7179. },
  7180. "required": ["agent", "command"],
  7181. "additionalProperties": false
  7182. }
  7183. }
  7184. }
  7185. },
  7186. "x-codeSamples": [
  7187. {
  7188. "lang": "js",
  7189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7190. }
  7191. ]
  7192. }
  7193. },
  7194. "/session/{sessionID}/revert": {
  7195. "post": {
  7196. "tags": ["session"],
  7197. "operationId": "session.revert",
  7198. "parameters": [
  7199. {
  7200. "name": "sessionID",
  7201. "in": "path",
  7202. "schema": {
  7203. "type": "string",
  7204. "pattern": "^ses"
  7205. },
  7206. "required": true
  7207. },
  7208. {
  7209. "name": "directory",
  7210. "in": "query",
  7211. "schema": {
  7212. "type": "string"
  7213. },
  7214. "required": false
  7215. },
  7216. {
  7217. "name": "workspace",
  7218. "in": "query",
  7219. "schema": {
  7220. "type": "string"
  7221. },
  7222. "required": false
  7223. }
  7224. ],
  7225. "responses": {
  7226. "200": {
  7227. "description": "Updated session",
  7228. "content": {
  7229. "application/json": {
  7230. "schema": {
  7231. "$ref": "#/components/schemas/Session"
  7232. }
  7233. }
  7234. }
  7235. },
  7236. "400": {
  7237. "description": "BadRequest | InvalidRequestError",
  7238. "content": {
  7239. "application/json": {
  7240. "schema": {
  7241. "anyOf": [
  7242. {
  7243. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7244. },
  7245. {
  7246. "$ref": "#/components/schemas/InvalidRequestError"
  7247. }
  7248. ]
  7249. }
  7250. }
  7251. }
  7252. },
  7253. "404": {
  7254. "description": "NotFoundError",
  7255. "content": {
  7256. "application/json": {
  7257. "schema": {
  7258. "$ref": "#/components/schemas/NotFoundError"
  7259. }
  7260. }
  7261. }
  7262. },
  7263. "409": {
  7264. "description": "SessionBusyError",
  7265. "content": {
  7266. "application/json": {
  7267. "schema": {
  7268. "$ref": "#/components/schemas/SessionBusyError"
  7269. }
  7270. }
  7271. }
  7272. }
  7273. },
  7274. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7275. "summary": "Revert message",
  7276. "requestBody": {
  7277. "content": {
  7278. "application/json": {
  7279. "schema": {
  7280. "type": "object",
  7281. "properties": {
  7282. "messageID": {
  7283. "type": "string",
  7284. "pattern": "^msg"
  7285. },
  7286. "partID": {
  7287. "type": "string",
  7288. "pattern": "^prt"
  7289. }
  7290. },
  7291. "required": ["messageID"],
  7292. "additionalProperties": false
  7293. }
  7294. }
  7295. }
  7296. },
  7297. "x-codeSamples": [
  7298. {
  7299. "lang": "js",
  7300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7301. }
  7302. ]
  7303. }
  7304. },
  7305. "/session/{sessionID}/unrevert": {
  7306. "post": {
  7307. "tags": ["session"],
  7308. "operationId": "session.unrevert",
  7309. "parameters": [
  7310. {
  7311. "name": "sessionID",
  7312. "in": "path",
  7313. "schema": {
  7314. "type": "string",
  7315. "pattern": "^ses"
  7316. },
  7317. "required": true
  7318. },
  7319. {
  7320. "name": "directory",
  7321. "in": "query",
  7322. "schema": {
  7323. "type": "string"
  7324. },
  7325. "required": false
  7326. },
  7327. {
  7328. "name": "workspace",
  7329. "in": "query",
  7330. "schema": {
  7331. "type": "string"
  7332. },
  7333. "required": false
  7334. }
  7335. ],
  7336. "responses": {
  7337. "200": {
  7338. "description": "Updated session",
  7339. "content": {
  7340. "application/json": {
  7341. "schema": {
  7342. "$ref": "#/components/schemas/Session"
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "400": {
  7348. "description": "BadRequest | InvalidRequestError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "anyOf": [
  7353. {
  7354. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7355. },
  7356. {
  7357. "$ref": "#/components/schemas/InvalidRequestError"
  7358. }
  7359. ]
  7360. }
  7361. }
  7362. }
  7363. },
  7364. "404": {
  7365. "description": "NotFoundError",
  7366. "content": {
  7367. "application/json": {
  7368. "schema": {
  7369. "$ref": "#/components/schemas/NotFoundError"
  7370. }
  7371. }
  7372. }
  7373. },
  7374. "409": {
  7375. "description": "SessionBusyError",
  7376. "content": {
  7377. "application/json": {
  7378. "schema": {
  7379. "$ref": "#/components/schemas/SessionBusyError"
  7380. }
  7381. }
  7382. }
  7383. }
  7384. },
  7385. "description": "Restore all previously reverted messages in a session.",
  7386. "summary": "Restore reverted messages",
  7387. "x-codeSamples": [
  7388. {
  7389. "lang": "js",
  7390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7391. }
  7392. ]
  7393. }
  7394. },
  7395. "/session/{sessionID}/permissions/{permissionID}": {
  7396. "post": {
  7397. "tags": ["session"],
  7398. "operationId": "permission.respond",
  7399. "parameters": [
  7400. {
  7401. "name": "sessionID",
  7402. "in": "path",
  7403. "schema": {
  7404. "type": "string",
  7405. "pattern": "^ses"
  7406. },
  7407. "required": true
  7408. },
  7409. {
  7410. "name": "permissionID",
  7411. "in": "path",
  7412. "schema": {
  7413. "type": "string",
  7414. "pattern": "^per"
  7415. },
  7416. "required": true
  7417. },
  7418. {
  7419. "name": "directory",
  7420. "in": "query",
  7421. "schema": {
  7422. "type": "string"
  7423. },
  7424. "required": false
  7425. },
  7426. {
  7427. "name": "workspace",
  7428. "in": "query",
  7429. "schema": {
  7430. "type": "string"
  7431. },
  7432. "required": false
  7433. }
  7434. ],
  7435. "responses": {
  7436. "200": {
  7437. "description": "Permission processed successfully",
  7438. "content": {
  7439. "application/json": {
  7440. "schema": {
  7441. "type": "boolean",
  7442. "description": "Permission processed successfully"
  7443. }
  7444. }
  7445. }
  7446. },
  7447. "400": {
  7448. "description": "BadRequest | InvalidRequestError",
  7449. "content": {
  7450. "application/json": {
  7451. "schema": {
  7452. "anyOf": [
  7453. {
  7454. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7455. },
  7456. {
  7457. "$ref": "#/components/schemas/InvalidRequestError"
  7458. }
  7459. ]
  7460. }
  7461. }
  7462. }
  7463. },
  7464. "404": {
  7465. "description": "NotFoundError",
  7466. "content": {
  7467. "application/json": {
  7468. "schema": {
  7469. "$ref": "#/components/schemas/NotFoundError"
  7470. }
  7471. }
  7472. }
  7473. }
  7474. },
  7475. "description": "Approve or deny a permission request from the AI assistant.",
  7476. "summary": "Respond to permission",
  7477. "deprecated": true,
  7478. "requestBody": {
  7479. "content": {
  7480. "application/json": {
  7481. "schema": {
  7482. "type": "object",
  7483. "properties": {
  7484. "response": {
  7485. "type": "string",
  7486. "enum": ["once", "always", "reject"]
  7487. }
  7488. },
  7489. "required": ["response"],
  7490. "additionalProperties": false
  7491. }
  7492. }
  7493. }
  7494. },
  7495. "x-codeSamples": [
  7496. {
  7497. "lang": "js",
  7498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7499. }
  7500. ]
  7501. }
  7502. },
  7503. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7504. "delete": {
  7505. "tags": ["session"],
  7506. "operationId": "part.delete",
  7507. "parameters": [
  7508. {
  7509. "name": "sessionID",
  7510. "in": "path",
  7511. "schema": {
  7512. "type": "string",
  7513. "pattern": "^ses"
  7514. },
  7515. "required": true
  7516. },
  7517. {
  7518. "name": "messageID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^msg"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "partID",
  7528. "in": "path",
  7529. "schema": {
  7530. "type": "string",
  7531. "pattern": "^prt"
  7532. },
  7533. "required": true
  7534. },
  7535. {
  7536. "name": "directory",
  7537. "in": "query",
  7538. "schema": {
  7539. "type": "string"
  7540. },
  7541. "required": false
  7542. },
  7543. {
  7544. "name": "workspace",
  7545. "in": "query",
  7546. "schema": {
  7547. "type": "string"
  7548. },
  7549. "required": false
  7550. }
  7551. ],
  7552. "responses": {
  7553. "200": {
  7554. "description": "Successfully deleted part",
  7555. "content": {
  7556. "application/json": {
  7557. "schema": {
  7558. "type": "boolean",
  7559. "description": "Successfully deleted part"
  7560. }
  7561. }
  7562. }
  7563. },
  7564. "400": {
  7565. "description": "BadRequest | InvalidRequestError",
  7566. "content": {
  7567. "application/json": {
  7568. "schema": {
  7569. "anyOf": [
  7570. {
  7571. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7572. },
  7573. {
  7574. "$ref": "#/components/schemas/InvalidRequestError"
  7575. }
  7576. ]
  7577. }
  7578. }
  7579. }
  7580. },
  7581. "404": {
  7582. "description": "NotFoundError",
  7583. "content": {
  7584. "application/json": {
  7585. "schema": {
  7586. "$ref": "#/components/schemas/NotFoundError"
  7587. }
  7588. }
  7589. }
  7590. }
  7591. },
  7592. "description": "Delete a part from a message.",
  7593. "x-codeSamples": [
  7594. {
  7595. "lang": "js",
  7596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7597. }
  7598. ]
  7599. },
  7600. "patch": {
  7601. "tags": ["session"],
  7602. "operationId": "part.update",
  7603. "parameters": [
  7604. {
  7605. "name": "sessionID",
  7606. "in": "path",
  7607. "schema": {
  7608. "type": "string",
  7609. "pattern": "^ses"
  7610. },
  7611. "required": true
  7612. },
  7613. {
  7614. "name": "messageID",
  7615. "in": "path",
  7616. "schema": {
  7617. "type": "string",
  7618. "pattern": "^msg"
  7619. },
  7620. "required": true
  7621. },
  7622. {
  7623. "name": "partID",
  7624. "in": "path",
  7625. "schema": {
  7626. "type": "string",
  7627. "pattern": "^prt"
  7628. },
  7629. "required": true
  7630. },
  7631. {
  7632. "name": "directory",
  7633. "in": "query",
  7634. "schema": {
  7635. "type": "string"
  7636. },
  7637. "required": false
  7638. },
  7639. {
  7640. "name": "workspace",
  7641. "in": "query",
  7642. "schema": {
  7643. "type": "string"
  7644. },
  7645. "required": false
  7646. }
  7647. ],
  7648. "responses": {
  7649. "200": {
  7650. "description": "Successfully updated part",
  7651. "content": {
  7652. "application/json": {
  7653. "schema": {
  7654. "$ref": "#/components/schemas/Part"
  7655. }
  7656. }
  7657. }
  7658. },
  7659. "400": {
  7660. "description": "BadRequest | InvalidRequestError",
  7661. "content": {
  7662. "application/json": {
  7663. "schema": {
  7664. "anyOf": [
  7665. {
  7666. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7667. },
  7668. {
  7669. "$ref": "#/components/schemas/InvalidRequestError"
  7670. }
  7671. ]
  7672. }
  7673. }
  7674. }
  7675. },
  7676. "404": {
  7677. "description": "NotFoundError",
  7678. "content": {
  7679. "application/json": {
  7680. "schema": {
  7681. "$ref": "#/components/schemas/NotFoundError"
  7682. }
  7683. }
  7684. }
  7685. }
  7686. },
  7687. "description": "Update a part in a message.",
  7688. "requestBody": {
  7689. "content": {
  7690. "application/json": {
  7691. "schema": {
  7692. "$ref": "#/components/schemas/Part"
  7693. }
  7694. }
  7695. }
  7696. },
  7697. "x-codeSamples": [
  7698. {
  7699. "lang": "js",
  7700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7701. }
  7702. ]
  7703. }
  7704. },
  7705. "/sync/start": {
  7706. "post": {
  7707. "tags": ["sync"],
  7708. "operationId": "sync.start",
  7709. "parameters": [
  7710. {
  7711. "name": "directory",
  7712. "in": "query",
  7713. "schema": {
  7714. "type": "string"
  7715. },
  7716. "required": false
  7717. },
  7718. {
  7719. "name": "workspace",
  7720. "in": "query",
  7721. "schema": {
  7722. "type": "string"
  7723. },
  7724. "required": false
  7725. }
  7726. ],
  7727. "responses": {
  7728. "200": {
  7729. "description": "Workspace sync started",
  7730. "content": {
  7731. "application/json": {
  7732. "schema": {
  7733. "type": "boolean",
  7734. "description": "Workspace sync started"
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "400": {
  7740. "description": "Bad request",
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "$ref": "#/components/schemas/BadRequestError"
  7745. }
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7751. "summary": "Start workspace sync",
  7752. "x-codeSamples": [
  7753. {
  7754. "lang": "js",
  7755. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7756. }
  7757. ]
  7758. }
  7759. },
  7760. "/sync/replay": {
  7761. "post": {
  7762. "tags": ["sync"],
  7763. "operationId": "sync.replay",
  7764. "parameters": [
  7765. {
  7766. "name": "directory",
  7767. "in": "query",
  7768. "schema": {
  7769. "type": "string"
  7770. },
  7771. "required": false
  7772. },
  7773. {
  7774. "name": "workspace",
  7775. "in": "query",
  7776. "schema": {
  7777. "type": "string"
  7778. },
  7779. "required": false
  7780. }
  7781. ],
  7782. "responses": {
  7783. "200": {
  7784. "description": "Replayed sync events",
  7785. "content": {
  7786. "application/json": {
  7787. "schema": {
  7788. "type": "object",
  7789. "properties": {
  7790. "sessionID": {
  7791. "type": "string"
  7792. }
  7793. },
  7794. "required": ["sessionID"],
  7795. "additionalProperties": false,
  7796. "description": "Replayed sync events"
  7797. }
  7798. }
  7799. }
  7800. },
  7801. "400": {
  7802. "description": "BadRequest | InvalidRequestError",
  7803. "content": {
  7804. "application/json": {
  7805. "schema": {
  7806. "anyOf": [
  7807. {
  7808. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7809. },
  7810. {
  7811. "$ref": "#/components/schemas/InvalidRequestError"
  7812. }
  7813. ]
  7814. }
  7815. }
  7816. }
  7817. }
  7818. },
  7819. "description": "Validate and replay a complete sync event history.",
  7820. "summary": "Replay sync events",
  7821. "requestBody": {
  7822. "content": {
  7823. "application/json": {
  7824. "schema": {
  7825. "type": "object",
  7826. "properties": {
  7827. "directory": {
  7828. "type": "string"
  7829. },
  7830. "events": {
  7831. "type": "array",
  7832. "minItems": 1,
  7833. "items": {
  7834. "type": "object",
  7835. "properties": {
  7836. "id": {
  7837. "type": "string"
  7838. },
  7839. "aggregateID": {
  7840. "type": "string"
  7841. },
  7842. "seq": {
  7843. "type": "integer",
  7844. "minimum": 0
  7845. },
  7846. "type": {
  7847. "type": "string"
  7848. },
  7849. "data": {
  7850. "type": "object"
  7851. }
  7852. },
  7853. "required": ["id", "aggregateID", "seq", "type", "data"],
  7854. "additionalProperties": false
  7855. }
  7856. }
  7857. },
  7858. "required": ["directory", "events"],
  7859. "additionalProperties": false
  7860. }
  7861. }
  7862. }
  7863. },
  7864. "x-codeSamples": [
  7865. {
  7866. "lang": "js",
  7867. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7868. }
  7869. ]
  7870. }
  7871. },
  7872. "/sync/steal": {
  7873. "post": {
  7874. "tags": ["sync"],
  7875. "operationId": "sync.steal",
  7876. "parameters": [
  7877. {
  7878. "name": "directory",
  7879. "in": "query",
  7880. "schema": {
  7881. "type": "string"
  7882. },
  7883. "required": false
  7884. },
  7885. {
  7886. "name": "workspace",
  7887. "in": "query",
  7888. "schema": {
  7889. "type": "string"
  7890. },
  7891. "required": false
  7892. }
  7893. ],
  7894. "responses": {
  7895. "200": {
  7896. "description": "Session stolen into workspace",
  7897. "content": {
  7898. "application/json": {
  7899. "schema": {
  7900. "type": "object",
  7901. "properties": {
  7902. "sessionID": {
  7903. "type": "string",
  7904. "pattern": "^ses"
  7905. }
  7906. },
  7907. "required": ["sessionID"],
  7908. "additionalProperties": false,
  7909. "description": "Session stolen into workspace"
  7910. }
  7911. }
  7912. }
  7913. },
  7914. "400": {
  7915. "description": "BadRequest | InvalidRequestError",
  7916. "content": {
  7917. "application/json": {
  7918. "schema": {
  7919. "anyOf": [
  7920. {
  7921. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7922. },
  7923. {
  7924. "$ref": "#/components/schemas/InvalidRequestError"
  7925. }
  7926. ]
  7927. }
  7928. }
  7929. }
  7930. }
  7931. },
  7932. "description": "Update a session to belong to the current workspace through the sync event system.",
  7933. "summary": "Steal session into workspace",
  7934. "requestBody": {
  7935. "content": {
  7936. "application/json": {
  7937. "schema": {
  7938. "type": "object",
  7939. "properties": {
  7940. "sessionID": {
  7941. "type": "string",
  7942. "pattern": "^ses"
  7943. }
  7944. },
  7945. "required": ["sessionID"],
  7946. "additionalProperties": false
  7947. }
  7948. }
  7949. }
  7950. },
  7951. "x-codeSamples": [
  7952. {
  7953. "lang": "js",
  7954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7955. }
  7956. ]
  7957. }
  7958. },
  7959. "/sync/history": {
  7960. "post": {
  7961. "tags": ["sync"],
  7962. "operationId": "sync.history.list",
  7963. "parameters": [
  7964. {
  7965. "name": "directory",
  7966. "in": "query",
  7967. "schema": {
  7968. "type": "string"
  7969. },
  7970. "required": false
  7971. },
  7972. {
  7973. "name": "workspace",
  7974. "in": "query",
  7975. "schema": {
  7976. "type": "string"
  7977. },
  7978. "required": false
  7979. }
  7980. ],
  7981. "responses": {
  7982. "200": {
  7983. "description": "Sync events",
  7984. "content": {
  7985. "application/json": {
  7986. "schema": {
  7987. "type": "array",
  7988. "items": {
  7989. "type": "object",
  7990. "properties": {
  7991. "id": {
  7992. "type": "string"
  7993. },
  7994. "aggregate_id": {
  7995. "type": "string"
  7996. },
  7997. "seq": {
  7998. "type": "integer",
  7999. "minimum": 0
  8000. },
  8001. "type": {
  8002. "type": "string"
  8003. },
  8004. "data": {
  8005. "type": "object"
  8006. }
  8007. },
  8008. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8009. "additionalProperties": false
  8010. },
  8011. "description": "Sync events"
  8012. }
  8013. }
  8014. }
  8015. },
  8016. "400": {
  8017. "description": "BadRequest | InvalidRequestError",
  8018. "content": {
  8019. "application/json": {
  8020. "schema": {
  8021. "anyOf": [
  8022. {
  8023. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8024. },
  8025. {
  8026. "$ref": "#/components/schemas/InvalidRequestError"
  8027. }
  8028. ]
  8029. }
  8030. }
  8031. }
  8032. }
  8033. },
  8034. "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.",
  8035. "summary": "List sync events",
  8036. "requestBody": {
  8037. "content": {
  8038. "application/json": {
  8039. "schema": {
  8040. "type": "object",
  8041. "additionalProperties": {
  8042. "type": "integer",
  8043. "minimum": 0
  8044. }
  8045. }
  8046. }
  8047. }
  8048. },
  8049. "x-codeSamples": [
  8050. {
  8051. "lang": "js",
  8052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8053. }
  8054. ]
  8055. }
  8056. },
  8057. "/api/session": {
  8058. "get": {
  8059. "tags": ["v2"],
  8060. "operationId": "v2.session.list",
  8061. "parameters": [
  8062. {
  8063. "name": "directory",
  8064. "in": "query",
  8065. "schema": {
  8066. "type": "string"
  8067. },
  8068. "required": false
  8069. },
  8070. {
  8071. "name": "workspace",
  8072. "in": "query",
  8073. "schema": {
  8074. "type": "string"
  8075. },
  8076. "required": false
  8077. },
  8078. {
  8079. "name": "limit",
  8080. "in": "query",
  8081. "schema": {
  8082. "type": "number"
  8083. },
  8084. "required": false
  8085. },
  8086. {
  8087. "name": "order",
  8088. "in": "query",
  8089. "schema": {
  8090. "type": "string",
  8091. "enum": ["asc", "desc"]
  8092. },
  8093. "required": false
  8094. },
  8095. {
  8096. "name": "path",
  8097. "in": "query",
  8098. "schema": {
  8099. "type": "string"
  8100. },
  8101. "required": false
  8102. },
  8103. {
  8104. "name": "roots",
  8105. "in": "query",
  8106. "schema": {
  8107. "anyOf": [
  8108. {
  8109. "type": "boolean"
  8110. },
  8111. {
  8112. "type": "string",
  8113. "enum": ["true", "false"]
  8114. }
  8115. ]
  8116. },
  8117. "required": false
  8118. },
  8119. {
  8120. "name": "start",
  8121. "in": "query",
  8122. "schema": {
  8123. "type": "number"
  8124. },
  8125. "required": false
  8126. },
  8127. {
  8128. "name": "search",
  8129. "in": "query",
  8130. "schema": {
  8131. "type": "string"
  8132. },
  8133. "required": false
  8134. },
  8135. {
  8136. "name": "cursor",
  8137. "in": "query",
  8138. "schema": {
  8139. "type": "string",
  8140. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8141. },
  8142. "required": false
  8143. }
  8144. ],
  8145. "security": [],
  8146. "responses": {
  8147. "200": {
  8148. "description": "V2SessionsResponse",
  8149. "content": {
  8150. "application/json": {
  8151. "schema": {
  8152. "$ref": "#/components/schemas/V2SessionsResponse"
  8153. }
  8154. }
  8155. }
  8156. },
  8157. "400": {
  8158. "description": "InvalidCursorError | InvalidRequestError",
  8159. "content": {
  8160. "application/json": {
  8161. "schema": {
  8162. "anyOf": [
  8163. {
  8164. "$ref": "#/components/schemas/InvalidCursorError"
  8165. },
  8166. {
  8167. "$ref": "#/components/schemas/InvalidRequestError"
  8168. },
  8169. {
  8170. "$ref": "#/components/schemas/InvalidRequestError"
  8171. }
  8172. ]
  8173. }
  8174. }
  8175. }
  8176. },
  8177. "401": {
  8178. "description": "UnauthorizedError",
  8179. "content": {
  8180. "application/json": {
  8181. "schema": {
  8182. "$ref": "#/components/schemas/UnauthorizedError"
  8183. }
  8184. }
  8185. }
  8186. }
  8187. },
  8188. "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.",
  8189. "summary": "List v2 sessions",
  8190. "x-codeSamples": [
  8191. {
  8192. "lang": "js",
  8193. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8194. }
  8195. ]
  8196. }
  8197. },
  8198. "/api/session/{sessionID}/prompt": {
  8199. "post": {
  8200. "tags": ["v2"],
  8201. "operationId": "v2.session.prompt",
  8202. "parameters": [
  8203. {
  8204. "name": "sessionID",
  8205. "in": "path",
  8206. "schema": {
  8207. "type": "string",
  8208. "pattern": "^ses"
  8209. },
  8210. "required": true
  8211. },
  8212. {
  8213. "name": "directory",
  8214. "in": "query",
  8215. "schema": {
  8216. "type": "string"
  8217. },
  8218. "required": false
  8219. },
  8220. {
  8221. "name": "workspace",
  8222. "in": "query",
  8223. "schema": {
  8224. "type": "string"
  8225. },
  8226. "required": false
  8227. }
  8228. ],
  8229. "security": [],
  8230. "responses": {
  8231. "200": {
  8232. "description": "Session.Message",
  8233. "content": {
  8234. "application/json": {
  8235. "schema": {
  8236. "$ref": "#/components/schemas/SessionMessage"
  8237. }
  8238. }
  8239. }
  8240. },
  8241. "400": {
  8242. "description": "InvalidRequestError",
  8243. "content": {
  8244. "application/json": {
  8245. "schema": {
  8246. "$ref": "#/components/schemas/InvalidRequestError"
  8247. }
  8248. }
  8249. }
  8250. },
  8251. "401": {
  8252. "description": "UnauthorizedError",
  8253. "content": {
  8254. "application/json": {
  8255. "schema": {
  8256. "$ref": "#/components/schemas/UnauthorizedError"
  8257. }
  8258. }
  8259. }
  8260. },
  8261. "404": {
  8262. "description": "SessionNotFoundError",
  8263. "content": {
  8264. "application/json": {
  8265. "schema": {
  8266. "$ref": "#/components/schemas/SessionNotFoundError"
  8267. }
  8268. }
  8269. }
  8270. },
  8271. "503": {
  8272. "description": "ServiceUnavailableError",
  8273. "content": {
  8274. "application/json": {
  8275. "schema": {
  8276. "$ref": "#/components/schemas/ServiceUnavailableError"
  8277. }
  8278. }
  8279. }
  8280. }
  8281. },
  8282. "description": "Create a v2 session message and queue it for the agent loop.",
  8283. "summary": "Send v2 message",
  8284. "requestBody": {
  8285. "content": {
  8286. "application/json": {
  8287. "schema": {
  8288. "type": "object",
  8289. "properties": {
  8290. "prompt": {
  8291. "$ref": "#/components/schemas/Prompt"
  8292. },
  8293. "delivery": {
  8294. "$ref": "#/components/schemas/SessionDelivery"
  8295. }
  8296. },
  8297. "required": ["prompt"],
  8298. "additionalProperties": false
  8299. }
  8300. }
  8301. }
  8302. },
  8303. "x-codeSamples": [
  8304. {
  8305. "lang": "js",
  8306. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8307. }
  8308. ]
  8309. }
  8310. },
  8311. "/api/session/{sessionID}/compact": {
  8312. "post": {
  8313. "tags": ["v2"],
  8314. "operationId": "v2.session.compact",
  8315. "parameters": [
  8316. {
  8317. "name": "sessionID",
  8318. "in": "path",
  8319. "schema": {
  8320. "type": "string",
  8321. "pattern": "^ses"
  8322. },
  8323. "required": true
  8324. },
  8325. {
  8326. "name": "directory",
  8327. "in": "query",
  8328. "schema": {
  8329. "type": "string"
  8330. },
  8331. "required": false
  8332. },
  8333. {
  8334. "name": "workspace",
  8335. "in": "query",
  8336. "schema": {
  8337. "type": "string"
  8338. },
  8339. "required": false
  8340. }
  8341. ],
  8342. "security": [],
  8343. "responses": {
  8344. "204": {
  8345. "description": "<No Content>"
  8346. },
  8347. "400": {
  8348. "description": "InvalidRequestError",
  8349. "content": {
  8350. "application/json": {
  8351. "schema": {
  8352. "$ref": "#/components/schemas/InvalidRequestError"
  8353. }
  8354. }
  8355. }
  8356. },
  8357. "401": {
  8358. "description": "UnauthorizedError",
  8359. "content": {
  8360. "application/json": {
  8361. "schema": {
  8362. "$ref": "#/components/schemas/UnauthorizedError"
  8363. }
  8364. }
  8365. }
  8366. },
  8367. "404": {
  8368. "description": "SessionNotFoundError",
  8369. "content": {
  8370. "application/json": {
  8371. "schema": {
  8372. "$ref": "#/components/schemas/SessionNotFoundError"
  8373. }
  8374. }
  8375. }
  8376. },
  8377. "503": {
  8378. "description": "ServiceUnavailableError",
  8379. "content": {
  8380. "application/json": {
  8381. "schema": {
  8382. "$ref": "#/components/schemas/ServiceUnavailableError"
  8383. }
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "description": "Compact a v2 session conversation.",
  8389. "summary": "Compact v2 session",
  8390. "x-codeSamples": [
  8391. {
  8392. "lang": "js",
  8393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8394. }
  8395. ]
  8396. }
  8397. },
  8398. "/api/session/{sessionID}/wait": {
  8399. "post": {
  8400. "tags": ["v2"],
  8401. "operationId": "v2.session.wait",
  8402. "parameters": [
  8403. {
  8404. "name": "sessionID",
  8405. "in": "path",
  8406. "schema": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. },
  8410. "required": true
  8411. },
  8412. {
  8413. "name": "directory",
  8414. "in": "query",
  8415. "schema": {
  8416. "type": "string"
  8417. },
  8418. "required": false
  8419. },
  8420. {
  8421. "name": "workspace",
  8422. "in": "query",
  8423. "schema": {
  8424. "type": "string"
  8425. },
  8426. "required": false
  8427. }
  8428. ],
  8429. "security": [],
  8430. "responses": {
  8431. "204": {
  8432. "description": "<No Content>"
  8433. },
  8434. "400": {
  8435. "description": "InvalidRequestError",
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "$ref": "#/components/schemas/InvalidRequestError"
  8440. }
  8441. }
  8442. }
  8443. },
  8444. "401": {
  8445. "description": "UnauthorizedError",
  8446. "content": {
  8447. "application/json": {
  8448. "schema": {
  8449. "$ref": "#/components/schemas/UnauthorizedError"
  8450. }
  8451. }
  8452. }
  8453. },
  8454. "404": {
  8455. "description": "SessionNotFoundError",
  8456. "content": {
  8457. "application/json": {
  8458. "schema": {
  8459. "$ref": "#/components/schemas/SessionNotFoundError"
  8460. }
  8461. }
  8462. }
  8463. },
  8464. "503": {
  8465. "description": "ServiceUnavailableError",
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "$ref": "#/components/schemas/ServiceUnavailableError"
  8470. }
  8471. }
  8472. }
  8473. }
  8474. },
  8475. "description": "Wait for a v2 session agent loop to become idle.",
  8476. "summary": "Wait for v2 session",
  8477. "x-codeSamples": [
  8478. {
  8479. "lang": "js",
  8480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8481. }
  8482. ]
  8483. }
  8484. },
  8485. "/api/session/{sessionID}/context": {
  8486. "get": {
  8487. "tags": ["v2"],
  8488. "operationId": "v2.session.context",
  8489. "parameters": [
  8490. {
  8491. "name": "sessionID",
  8492. "in": "path",
  8493. "schema": {
  8494. "type": "string",
  8495. "pattern": "^ses"
  8496. },
  8497. "required": true
  8498. },
  8499. {
  8500. "name": "directory",
  8501. "in": "query",
  8502. "schema": {
  8503. "type": "string"
  8504. },
  8505. "required": false
  8506. },
  8507. {
  8508. "name": "workspace",
  8509. "in": "query",
  8510. "schema": {
  8511. "type": "string"
  8512. },
  8513. "required": false
  8514. }
  8515. ],
  8516. "security": [],
  8517. "responses": {
  8518. "200": {
  8519. "description": "Success",
  8520. "content": {
  8521. "application/json": {
  8522. "schema": {
  8523. "type": "array",
  8524. "items": {
  8525. "$ref": "#/components/schemas/SessionMessage"
  8526. }
  8527. }
  8528. }
  8529. }
  8530. },
  8531. "400": {
  8532. "description": "InvalidRequestError",
  8533. "content": {
  8534. "application/json": {
  8535. "schema": {
  8536. "$ref": "#/components/schemas/InvalidRequestError"
  8537. }
  8538. }
  8539. }
  8540. },
  8541. "401": {
  8542. "description": "UnauthorizedError",
  8543. "content": {
  8544. "application/json": {
  8545. "schema": {
  8546. "$ref": "#/components/schemas/UnauthorizedError"
  8547. }
  8548. }
  8549. }
  8550. },
  8551. "404": {
  8552. "description": "SessionNotFoundError",
  8553. "content": {
  8554. "application/json": {
  8555. "schema": {
  8556. "$ref": "#/components/schemas/SessionNotFoundError"
  8557. }
  8558. }
  8559. }
  8560. },
  8561. "500": {
  8562. "description": "UnknownError",
  8563. "content": {
  8564. "application/json": {
  8565. "schema": {
  8566. "$ref": "#/components/schemas/UnknownError1"
  8567. }
  8568. }
  8569. }
  8570. }
  8571. },
  8572. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8573. "summary": "Get v2 session context",
  8574. "x-codeSamples": [
  8575. {
  8576. "lang": "js",
  8577. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8578. }
  8579. ]
  8580. }
  8581. },
  8582. "/api/session/{sessionID}/message": {
  8583. "get": {
  8584. "tags": ["v2 messages"],
  8585. "operationId": "v2.session.messages",
  8586. "parameters": [
  8587. {
  8588. "name": "sessionID",
  8589. "in": "path",
  8590. "schema": {
  8591. "type": "string",
  8592. "pattern": "^ses"
  8593. },
  8594. "required": true
  8595. },
  8596. {
  8597. "name": "directory",
  8598. "in": "query",
  8599. "schema": {
  8600. "type": "string"
  8601. },
  8602. "required": false
  8603. },
  8604. {
  8605. "name": "workspace",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. },
  8612. {
  8613. "name": "limit",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "number"
  8617. },
  8618. "required": false
  8619. },
  8620. {
  8621. "name": "order",
  8622. "in": "query",
  8623. "schema": {
  8624. "type": "string",
  8625. "enum": ["asc", "desc"]
  8626. },
  8627. "required": false
  8628. },
  8629. {
  8630. "name": "cursor",
  8631. "in": "query",
  8632. "schema": {
  8633. "type": "string",
  8634. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8635. },
  8636. "required": false
  8637. }
  8638. ],
  8639. "security": [],
  8640. "responses": {
  8641. "200": {
  8642. "description": "V2SessionMessagesResponse",
  8643. "content": {
  8644. "application/json": {
  8645. "schema": {
  8646. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8647. }
  8648. }
  8649. }
  8650. },
  8651. "400": {
  8652. "description": "InvalidCursorError | InvalidRequestError",
  8653. "content": {
  8654. "application/json": {
  8655. "schema": {
  8656. "anyOf": [
  8657. {
  8658. "$ref": "#/components/schemas/InvalidCursorError"
  8659. },
  8660. {
  8661. "$ref": "#/components/schemas/InvalidRequestError"
  8662. }
  8663. ]
  8664. }
  8665. }
  8666. }
  8667. },
  8668. "401": {
  8669. "description": "UnauthorizedError",
  8670. "content": {
  8671. "application/json": {
  8672. "schema": {
  8673. "$ref": "#/components/schemas/UnauthorizedError"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "404": {
  8679. "description": "SessionNotFoundError",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/SessionNotFoundError"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "500": {
  8689. "description": "UnknownError",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "$ref": "#/components/schemas/UnknownError1"
  8694. }
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "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.",
  8700. "summary": "Get v2 session messages",
  8701. "x-codeSamples": [
  8702. {
  8703. "lang": "js",
  8704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8705. }
  8706. ]
  8707. }
  8708. },
  8709. "/api/model": {
  8710. "get": {
  8711. "tags": ["v2 models"],
  8712. "operationId": "v2.model.list",
  8713. "parameters": [
  8714. {
  8715. "name": "location",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "object",
  8719. "properties": {
  8720. "directory": {
  8721. "type": "string"
  8722. },
  8723. "workspace": {
  8724. "type": "string"
  8725. }
  8726. },
  8727. "additionalProperties": false
  8728. },
  8729. "required": false,
  8730. "style": "deepObject",
  8731. "explode": true
  8732. }
  8733. ],
  8734. "security": [],
  8735. "responses": {
  8736. "200": {
  8737. "description": "Success",
  8738. "content": {
  8739. "application/json": {
  8740. "schema": {
  8741. "type": "array",
  8742. "items": {
  8743. "$ref": "#/components/schemas/ModelV2Info"
  8744. }
  8745. }
  8746. }
  8747. }
  8748. },
  8749. "400": {
  8750. "description": "InvalidRequestError",
  8751. "content": {
  8752. "application/json": {
  8753. "schema": {
  8754. "$ref": "#/components/schemas/InvalidRequestError"
  8755. }
  8756. }
  8757. }
  8758. },
  8759. "401": {
  8760. "description": "UnauthorizedError",
  8761. "content": {
  8762. "application/json": {
  8763. "schema": {
  8764. "$ref": "#/components/schemas/UnauthorizedError"
  8765. }
  8766. }
  8767. }
  8768. },
  8769. "503": {
  8770. "description": "ServiceUnavailableError",
  8771. "content": {
  8772. "application/json": {
  8773. "schema": {
  8774. "$ref": "#/components/schemas/ServiceUnavailableError"
  8775. }
  8776. }
  8777. }
  8778. }
  8779. },
  8780. "description": "Retrieve available v2 models ordered by release date.",
  8781. "summary": "List v2 models",
  8782. "x-codeSamples": [
  8783. {
  8784. "lang": "js",
  8785. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8786. }
  8787. ]
  8788. }
  8789. },
  8790. "/api/provider": {
  8791. "get": {
  8792. "tags": ["v2 providers"],
  8793. "operationId": "v2.provider.list",
  8794. "parameters": [
  8795. {
  8796. "name": "location",
  8797. "in": "query",
  8798. "schema": {
  8799. "type": "object",
  8800. "properties": {
  8801. "directory": {
  8802. "type": "string"
  8803. },
  8804. "workspace": {
  8805. "type": "string"
  8806. }
  8807. },
  8808. "additionalProperties": false
  8809. },
  8810. "required": false,
  8811. "style": "deepObject",
  8812. "explode": true
  8813. }
  8814. ],
  8815. "security": [],
  8816. "responses": {
  8817. "200": {
  8818. "description": "Success",
  8819. "content": {
  8820. "application/json": {
  8821. "schema": {
  8822. "type": "array",
  8823. "items": {
  8824. "$ref": "#/components/schemas/ProviderV2Info"
  8825. }
  8826. }
  8827. }
  8828. }
  8829. },
  8830. "400": {
  8831. "description": "InvalidRequestError",
  8832. "content": {
  8833. "application/json": {
  8834. "schema": {
  8835. "$ref": "#/components/schemas/InvalidRequestError"
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "401": {
  8841. "description": "UnauthorizedError",
  8842. "content": {
  8843. "application/json": {
  8844. "schema": {
  8845. "$ref": "#/components/schemas/UnauthorizedError"
  8846. }
  8847. }
  8848. }
  8849. },
  8850. "503": {
  8851. "description": "ServiceUnavailableError",
  8852. "content": {
  8853. "application/json": {
  8854. "schema": {
  8855. "$ref": "#/components/schemas/ServiceUnavailableError"
  8856. }
  8857. }
  8858. }
  8859. }
  8860. },
  8861. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8862. "summary": "List v2 providers",
  8863. "x-codeSamples": [
  8864. {
  8865. "lang": "js",
  8866. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8867. }
  8868. ]
  8869. }
  8870. },
  8871. "/api/provider/{providerID}": {
  8872. "get": {
  8873. "tags": ["v2 providers"],
  8874. "operationId": "v2.provider.get",
  8875. "parameters": [
  8876. {
  8877. "name": "providerID",
  8878. "in": "path",
  8879. "schema": {
  8880. "type": "string"
  8881. },
  8882. "required": true
  8883. },
  8884. {
  8885. "name": "location",
  8886. "in": "query",
  8887. "schema": {
  8888. "type": "object",
  8889. "properties": {
  8890. "directory": {
  8891. "type": "string"
  8892. },
  8893. "workspace": {
  8894. "type": "string"
  8895. }
  8896. },
  8897. "additionalProperties": false
  8898. },
  8899. "required": false,
  8900. "style": "deepObject",
  8901. "explode": true
  8902. }
  8903. ],
  8904. "security": [],
  8905. "responses": {
  8906. "200": {
  8907. "description": "ProviderV2.Info",
  8908. "content": {
  8909. "application/json": {
  8910. "schema": {
  8911. "$ref": "#/components/schemas/ProviderV2Info"
  8912. }
  8913. }
  8914. }
  8915. },
  8916. "400": {
  8917. "description": "InvalidRequestError",
  8918. "content": {
  8919. "application/json": {
  8920. "schema": {
  8921. "$ref": "#/components/schemas/InvalidRequestError"
  8922. }
  8923. }
  8924. }
  8925. },
  8926. "401": {
  8927. "description": "UnauthorizedError",
  8928. "content": {
  8929. "application/json": {
  8930. "schema": {
  8931. "$ref": "#/components/schemas/UnauthorizedError"
  8932. }
  8933. }
  8934. }
  8935. },
  8936. "404": {
  8937. "description": "ProviderNotFoundError",
  8938. "content": {
  8939. "application/json": {
  8940. "schema": {
  8941. "$ref": "#/components/schemas/ProviderNotFoundError"
  8942. }
  8943. }
  8944. }
  8945. },
  8946. "503": {
  8947. "description": "ServiceUnavailableError",
  8948. "content": {
  8949. "application/json": {
  8950. "schema": {
  8951. "$ref": "#/components/schemas/ServiceUnavailableError"
  8952. }
  8953. }
  8954. }
  8955. }
  8956. },
  8957. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8958. "summary": "Get v2 provider",
  8959. "x-codeSamples": [
  8960. {
  8961. "lang": "js",
  8962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  8963. }
  8964. ]
  8965. }
  8966. },
  8967. "/tui/append-prompt": {
  8968. "post": {
  8969. "tags": ["tui"],
  8970. "operationId": "tui.appendPrompt",
  8971. "parameters": [
  8972. {
  8973. "name": "directory",
  8974. "in": "query",
  8975. "schema": {
  8976. "type": "string"
  8977. },
  8978. "required": false
  8979. },
  8980. {
  8981. "name": "workspace",
  8982. "in": "query",
  8983. "schema": {
  8984. "type": "string"
  8985. },
  8986. "required": false
  8987. }
  8988. ],
  8989. "responses": {
  8990. "200": {
  8991. "description": "Prompt processed successfully",
  8992. "content": {
  8993. "application/json": {
  8994. "schema": {
  8995. "type": "boolean",
  8996. "description": "Prompt processed successfully"
  8997. }
  8998. }
  8999. }
  9000. },
  9001. "400": {
  9002. "description": "BadRequest | InvalidRequestError",
  9003. "content": {
  9004. "application/json": {
  9005. "schema": {
  9006. "anyOf": [
  9007. {
  9008. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9009. },
  9010. {
  9011. "$ref": "#/components/schemas/InvalidRequestError"
  9012. }
  9013. ]
  9014. }
  9015. }
  9016. }
  9017. }
  9018. },
  9019. "description": "Append prompt to the TUI.",
  9020. "summary": "Append TUI prompt",
  9021. "requestBody": {
  9022. "content": {
  9023. "application/json": {
  9024. "schema": {
  9025. "type": "object",
  9026. "properties": {
  9027. "text": {
  9028. "type": "string"
  9029. }
  9030. },
  9031. "required": ["text"],
  9032. "additionalProperties": false
  9033. }
  9034. }
  9035. }
  9036. },
  9037. "x-codeSamples": [
  9038. {
  9039. "lang": "js",
  9040. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9041. }
  9042. ]
  9043. }
  9044. },
  9045. "/tui/open-help": {
  9046. "post": {
  9047. "tags": ["tui"],
  9048. "operationId": "tui.openHelp",
  9049. "parameters": [
  9050. {
  9051. "name": "directory",
  9052. "in": "query",
  9053. "schema": {
  9054. "type": "string"
  9055. },
  9056. "required": false
  9057. },
  9058. {
  9059. "name": "workspace",
  9060. "in": "query",
  9061. "schema": {
  9062. "type": "string"
  9063. },
  9064. "required": false
  9065. }
  9066. ],
  9067. "responses": {
  9068. "200": {
  9069. "description": "Help dialog opened successfully",
  9070. "content": {
  9071. "application/json": {
  9072. "schema": {
  9073. "type": "boolean",
  9074. "description": "Help dialog opened successfully"
  9075. }
  9076. }
  9077. }
  9078. },
  9079. "400": {
  9080. "description": "Bad request",
  9081. "content": {
  9082. "application/json": {
  9083. "schema": {
  9084. "$ref": "#/components/schemas/BadRequestError"
  9085. }
  9086. }
  9087. }
  9088. }
  9089. },
  9090. "description": "Open the help dialog in the TUI to display user assistance information.",
  9091. "summary": "Open help dialog",
  9092. "x-codeSamples": [
  9093. {
  9094. "lang": "js",
  9095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9096. }
  9097. ]
  9098. }
  9099. },
  9100. "/tui/open-sessions": {
  9101. "post": {
  9102. "tags": ["tui"],
  9103. "operationId": "tui.openSessions",
  9104. "parameters": [
  9105. {
  9106. "name": "directory",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. },
  9113. {
  9114. "name": "workspace",
  9115. "in": "query",
  9116. "schema": {
  9117. "type": "string"
  9118. },
  9119. "required": false
  9120. }
  9121. ],
  9122. "responses": {
  9123. "200": {
  9124. "description": "Session dialog opened successfully",
  9125. "content": {
  9126. "application/json": {
  9127. "schema": {
  9128. "type": "boolean",
  9129. "description": "Session dialog opened successfully"
  9130. }
  9131. }
  9132. }
  9133. },
  9134. "400": {
  9135. "description": "Bad request",
  9136. "content": {
  9137. "application/json": {
  9138. "schema": {
  9139. "$ref": "#/components/schemas/BadRequestError"
  9140. }
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "description": "Open the session dialog.",
  9146. "summary": "Open sessions dialog",
  9147. "x-codeSamples": [
  9148. {
  9149. "lang": "js",
  9150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9151. }
  9152. ]
  9153. }
  9154. },
  9155. "/tui/open-themes": {
  9156. "post": {
  9157. "tags": ["tui"],
  9158. "operationId": "tui.openThemes",
  9159. "parameters": [
  9160. {
  9161. "name": "directory",
  9162. "in": "query",
  9163. "schema": {
  9164. "type": "string"
  9165. },
  9166. "required": false
  9167. },
  9168. {
  9169. "name": "workspace",
  9170. "in": "query",
  9171. "schema": {
  9172. "type": "string"
  9173. },
  9174. "required": false
  9175. }
  9176. ],
  9177. "responses": {
  9178. "200": {
  9179. "description": "Theme dialog opened successfully",
  9180. "content": {
  9181. "application/json": {
  9182. "schema": {
  9183. "type": "boolean",
  9184. "description": "Theme dialog opened successfully"
  9185. }
  9186. }
  9187. }
  9188. },
  9189. "400": {
  9190. "description": "Bad request",
  9191. "content": {
  9192. "application/json": {
  9193. "schema": {
  9194. "$ref": "#/components/schemas/BadRequestError"
  9195. }
  9196. }
  9197. }
  9198. }
  9199. },
  9200. "description": "Open the theme dialog.",
  9201. "summary": "Open themes dialog",
  9202. "x-codeSamples": [
  9203. {
  9204. "lang": "js",
  9205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9206. }
  9207. ]
  9208. }
  9209. },
  9210. "/tui/open-models": {
  9211. "post": {
  9212. "tags": ["tui"],
  9213. "operationId": "tui.openModels",
  9214. "parameters": [
  9215. {
  9216. "name": "directory",
  9217. "in": "query",
  9218. "schema": {
  9219. "type": "string"
  9220. },
  9221. "required": false
  9222. },
  9223. {
  9224. "name": "workspace",
  9225. "in": "query",
  9226. "schema": {
  9227. "type": "string"
  9228. },
  9229. "required": false
  9230. }
  9231. ],
  9232. "responses": {
  9233. "200": {
  9234. "description": "Model dialog opened successfully",
  9235. "content": {
  9236. "application/json": {
  9237. "schema": {
  9238. "type": "boolean",
  9239. "description": "Model dialog opened successfully"
  9240. }
  9241. }
  9242. }
  9243. },
  9244. "400": {
  9245. "description": "Bad request",
  9246. "content": {
  9247. "application/json": {
  9248. "schema": {
  9249. "$ref": "#/components/schemas/BadRequestError"
  9250. }
  9251. }
  9252. }
  9253. }
  9254. },
  9255. "description": "Open the model dialog.",
  9256. "summary": "Open models dialog",
  9257. "x-codeSamples": [
  9258. {
  9259. "lang": "js",
  9260. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9261. }
  9262. ]
  9263. }
  9264. },
  9265. "/tui/submit-prompt": {
  9266. "post": {
  9267. "tags": ["tui"],
  9268. "operationId": "tui.submitPrompt",
  9269. "parameters": [
  9270. {
  9271. "name": "directory",
  9272. "in": "query",
  9273. "schema": {
  9274. "type": "string"
  9275. },
  9276. "required": false
  9277. },
  9278. {
  9279. "name": "workspace",
  9280. "in": "query",
  9281. "schema": {
  9282. "type": "string"
  9283. },
  9284. "required": false
  9285. }
  9286. ],
  9287. "responses": {
  9288. "200": {
  9289. "description": "Prompt submitted successfully",
  9290. "content": {
  9291. "application/json": {
  9292. "schema": {
  9293. "type": "boolean",
  9294. "description": "Prompt submitted successfully"
  9295. }
  9296. }
  9297. }
  9298. },
  9299. "400": {
  9300. "description": "Bad request",
  9301. "content": {
  9302. "application/json": {
  9303. "schema": {
  9304. "$ref": "#/components/schemas/BadRequestError"
  9305. }
  9306. }
  9307. }
  9308. }
  9309. },
  9310. "description": "Submit the prompt.",
  9311. "summary": "Submit TUI prompt",
  9312. "x-codeSamples": [
  9313. {
  9314. "lang": "js",
  9315. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9316. }
  9317. ]
  9318. }
  9319. },
  9320. "/tui/clear-prompt": {
  9321. "post": {
  9322. "tags": ["tui"],
  9323. "operationId": "tui.clearPrompt",
  9324. "parameters": [
  9325. {
  9326. "name": "directory",
  9327. "in": "query",
  9328. "schema": {
  9329. "type": "string"
  9330. },
  9331. "required": false
  9332. },
  9333. {
  9334. "name": "workspace",
  9335. "in": "query",
  9336. "schema": {
  9337. "type": "string"
  9338. },
  9339. "required": false
  9340. }
  9341. ],
  9342. "responses": {
  9343. "200": {
  9344. "description": "Prompt cleared successfully",
  9345. "content": {
  9346. "application/json": {
  9347. "schema": {
  9348. "type": "boolean",
  9349. "description": "Prompt cleared successfully"
  9350. }
  9351. }
  9352. }
  9353. },
  9354. "400": {
  9355. "description": "Bad request",
  9356. "content": {
  9357. "application/json": {
  9358. "schema": {
  9359. "$ref": "#/components/schemas/BadRequestError"
  9360. }
  9361. }
  9362. }
  9363. }
  9364. },
  9365. "description": "Clear the prompt.",
  9366. "summary": "Clear TUI prompt",
  9367. "x-codeSamples": [
  9368. {
  9369. "lang": "js",
  9370. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9371. }
  9372. ]
  9373. }
  9374. },
  9375. "/tui/execute-command": {
  9376. "post": {
  9377. "tags": ["tui"],
  9378. "operationId": "tui.executeCommand",
  9379. "parameters": [
  9380. {
  9381. "name": "directory",
  9382. "in": "query",
  9383. "schema": {
  9384. "type": "string"
  9385. },
  9386. "required": false
  9387. },
  9388. {
  9389. "name": "workspace",
  9390. "in": "query",
  9391. "schema": {
  9392. "type": "string"
  9393. },
  9394. "required": false
  9395. }
  9396. ],
  9397. "responses": {
  9398. "200": {
  9399. "description": "Command executed successfully",
  9400. "content": {
  9401. "application/json": {
  9402. "schema": {
  9403. "type": "boolean",
  9404. "description": "Command executed successfully"
  9405. }
  9406. }
  9407. }
  9408. },
  9409. "400": {
  9410. "description": "BadRequest | InvalidRequestError",
  9411. "content": {
  9412. "application/json": {
  9413. "schema": {
  9414. "anyOf": [
  9415. {
  9416. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9417. },
  9418. {
  9419. "$ref": "#/components/schemas/InvalidRequestError"
  9420. }
  9421. ]
  9422. }
  9423. }
  9424. }
  9425. }
  9426. },
  9427. "description": "Execute a TUI command.",
  9428. "summary": "Execute TUI command",
  9429. "requestBody": {
  9430. "content": {
  9431. "application/json": {
  9432. "schema": {
  9433. "type": "object",
  9434. "properties": {
  9435. "command": {
  9436. "type": "string"
  9437. }
  9438. },
  9439. "required": ["command"],
  9440. "additionalProperties": false
  9441. }
  9442. }
  9443. }
  9444. },
  9445. "x-codeSamples": [
  9446. {
  9447. "lang": "js",
  9448. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9449. }
  9450. ]
  9451. }
  9452. },
  9453. "/tui/show-toast": {
  9454. "post": {
  9455. "tags": ["tui"],
  9456. "operationId": "tui.showToast",
  9457. "parameters": [
  9458. {
  9459. "name": "directory",
  9460. "in": "query",
  9461. "schema": {
  9462. "type": "string"
  9463. },
  9464. "required": false
  9465. },
  9466. {
  9467. "name": "workspace",
  9468. "in": "query",
  9469. "schema": {
  9470. "type": "string"
  9471. },
  9472. "required": false
  9473. }
  9474. ],
  9475. "responses": {
  9476. "200": {
  9477. "description": "Toast notification shown successfully",
  9478. "content": {
  9479. "application/json": {
  9480. "schema": {
  9481. "type": "boolean",
  9482. "description": "Toast notification shown successfully"
  9483. }
  9484. }
  9485. }
  9486. },
  9487. "400": {
  9488. "description": "Bad request",
  9489. "content": {
  9490. "application/json": {
  9491. "schema": {
  9492. "$ref": "#/components/schemas/BadRequestError"
  9493. }
  9494. }
  9495. }
  9496. }
  9497. },
  9498. "description": "Show a toast notification in the TUI.",
  9499. "summary": "Show TUI toast",
  9500. "requestBody": {
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "type": "object",
  9505. "properties": {
  9506. "title": {
  9507. "type": "string"
  9508. },
  9509. "message": {
  9510. "type": "string"
  9511. },
  9512. "variant": {
  9513. "type": "string",
  9514. "enum": ["info", "success", "warning", "error"]
  9515. },
  9516. "duration": {
  9517. "type": "integer",
  9518. "exclusiveMinimum": 0
  9519. }
  9520. },
  9521. "required": ["message", "variant"],
  9522. "additionalProperties": false
  9523. }
  9524. }
  9525. }
  9526. },
  9527. "x-codeSamples": [
  9528. {
  9529. "lang": "js",
  9530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9531. }
  9532. ]
  9533. }
  9534. },
  9535. "/tui/publish": {
  9536. "post": {
  9537. "tags": ["tui"],
  9538. "operationId": "tui.publish",
  9539. "parameters": [
  9540. {
  9541. "name": "directory",
  9542. "in": "query",
  9543. "schema": {
  9544. "type": "string"
  9545. },
  9546. "required": false
  9547. },
  9548. {
  9549. "name": "workspace",
  9550. "in": "query",
  9551. "schema": {
  9552. "type": "string"
  9553. },
  9554. "required": false
  9555. }
  9556. ],
  9557. "responses": {
  9558. "200": {
  9559. "description": "Event published successfully",
  9560. "content": {
  9561. "application/json": {
  9562. "schema": {
  9563. "type": "boolean",
  9564. "description": "Event published successfully"
  9565. }
  9566. }
  9567. }
  9568. },
  9569. "400": {
  9570. "description": "BadRequest | InvalidRequestError",
  9571. "content": {
  9572. "application/json": {
  9573. "schema": {
  9574. "anyOf": [
  9575. {
  9576. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9577. },
  9578. {
  9579. "$ref": "#/components/schemas/InvalidRequestError"
  9580. }
  9581. ]
  9582. }
  9583. }
  9584. }
  9585. }
  9586. },
  9587. "description": "Publish a TUI event.",
  9588. "summary": "Publish TUI event",
  9589. "requestBody": {
  9590. "content": {
  9591. "application/json": {
  9592. "schema": {
  9593. "anyOf": [
  9594. {
  9595. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9596. },
  9597. {
  9598. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9599. },
  9600. {
  9601. "$ref": "#/components/schemas/EventTuiToastShow"
  9602. },
  9603. {
  9604. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9605. }
  9606. ]
  9607. }
  9608. }
  9609. }
  9610. },
  9611. "x-codeSamples": [
  9612. {
  9613. "lang": "js",
  9614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9615. }
  9616. ]
  9617. }
  9618. },
  9619. "/tui/select-session": {
  9620. "post": {
  9621. "tags": ["tui"],
  9622. "operationId": "tui.selectSession",
  9623. "parameters": [
  9624. {
  9625. "name": "directory",
  9626. "in": "query",
  9627. "schema": {
  9628. "type": "string"
  9629. },
  9630. "required": false
  9631. },
  9632. {
  9633. "name": "workspace",
  9634. "in": "query",
  9635. "schema": {
  9636. "type": "string"
  9637. },
  9638. "required": false
  9639. }
  9640. ],
  9641. "responses": {
  9642. "200": {
  9643. "description": "Session selected successfully",
  9644. "content": {
  9645. "application/json": {
  9646. "schema": {
  9647. "type": "boolean",
  9648. "description": "Session selected successfully"
  9649. }
  9650. }
  9651. }
  9652. },
  9653. "400": {
  9654. "description": "BadRequest | InvalidRequestError",
  9655. "content": {
  9656. "application/json": {
  9657. "schema": {
  9658. "anyOf": [
  9659. {
  9660. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9661. },
  9662. {
  9663. "$ref": "#/components/schemas/InvalidRequestError"
  9664. }
  9665. ]
  9666. }
  9667. }
  9668. }
  9669. },
  9670. "404": {
  9671. "description": "NotFoundError",
  9672. "content": {
  9673. "application/json": {
  9674. "schema": {
  9675. "$ref": "#/components/schemas/NotFoundError"
  9676. }
  9677. }
  9678. }
  9679. }
  9680. },
  9681. "description": "Navigate the TUI to display the specified session.",
  9682. "summary": "Select session",
  9683. "requestBody": {
  9684. "content": {
  9685. "application/json": {
  9686. "schema": {
  9687. "type": "object",
  9688. "properties": {
  9689. "sessionID": {
  9690. "type": "string",
  9691. "pattern": "^ses",
  9692. "description": "Session ID to navigate to"
  9693. }
  9694. },
  9695. "required": ["sessionID"],
  9696. "additionalProperties": false
  9697. }
  9698. }
  9699. }
  9700. },
  9701. "x-codeSamples": [
  9702. {
  9703. "lang": "js",
  9704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9705. }
  9706. ]
  9707. }
  9708. },
  9709. "/tui/control/next": {
  9710. "get": {
  9711. "tags": ["tui"],
  9712. "operationId": "tui.control.next",
  9713. "parameters": [
  9714. {
  9715. "name": "directory",
  9716. "in": "query",
  9717. "schema": {
  9718. "type": "string"
  9719. },
  9720. "required": false
  9721. },
  9722. {
  9723. "name": "workspace",
  9724. "in": "query",
  9725. "schema": {
  9726. "type": "string"
  9727. },
  9728. "required": false
  9729. }
  9730. ],
  9731. "responses": {
  9732. "200": {
  9733. "description": "Next TUI request",
  9734. "content": {
  9735. "application/json": {
  9736. "schema": {
  9737. "type": "object",
  9738. "properties": {
  9739. "path": {
  9740. "type": "string"
  9741. },
  9742. "body": {}
  9743. },
  9744. "required": ["path", "body"],
  9745. "additionalProperties": false,
  9746. "description": "Next TUI request"
  9747. }
  9748. }
  9749. }
  9750. },
  9751. "400": {
  9752. "description": "Bad request",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "$ref": "#/components/schemas/BadRequestError"
  9757. }
  9758. }
  9759. }
  9760. }
  9761. },
  9762. "description": "Retrieve the next TUI request from the queue for processing.",
  9763. "summary": "Get next TUI request",
  9764. "x-codeSamples": [
  9765. {
  9766. "lang": "js",
  9767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9768. }
  9769. ]
  9770. }
  9771. },
  9772. "/tui/control/response": {
  9773. "post": {
  9774. "tags": ["tui"],
  9775. "operationId": "tui.control.response",
  9776. "parameters": [
  9777. {
  9778. "name": "directory",
  9779. "in": "query",
  9780. "schema": {
  9781. "type": "string"
  9782. },
  9783. "required": false
  9784. },
  9785. {
  9786. "name": "workspace",
  9787. "in": "query",
  9788. "schema": {
  9789. "type": "string"
  9790. },
  9791. "required": false
  9792. }
  9793. ],
  9794. "responses": {
  9795. "200": {
  9796. "description": "Response submitted successfully",
  9797. "content": {
  9798. "application/json": {
  9799. "schema": {
  9800. "type": "boolean",
  9801. "description": "Response submitted successfully"
  9802. }
  9803. }
  9804. }
  9805. },
  9806. "400": {
  9807. "description": "Bad request",
  9808. "content": {
  9809. "application/json": {
  9810. "schema": {
  9811. "$ref": "#/components/schemas/BadRequestError"
  9812. }
  9813. }
  9814. }
  9815. }
  9816. },
  9817. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9818. "summary": "Submit TUI response",
  9819. "requestBody": {
  9820. "content": {
  9821. "application/json": {
  9822. "schema": {}
  9823. }
  9824. }
  9825. },
  9826. "x-codeSamples": [
  9827. {
  9828. "lang": "js",
  9829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9830. }
  9831. ]
  9832. }
  9833. },
  9834. "/experimental/workspace/adapter": {
  9835. "get": {
  9836. "tags": ["workspace"],
  9837. "operationId": "experimental.workspace.adapter.list",
  9838. "parameters": [
  9839. {
  9840. "name": "directory",
  9841. "in": "query",
  9842. "schema": {
  9843. "type": "string"
  9844. },
  9845. "required": false
  9846. },
  9847. {
  9848. "name": "workspace",
  9849. "in": "query",
  9850. "schema": {
  9851. "type": "string"
  9852. },
  9853. "required": false
  9854. }
  9855. ],
  9856. "responses": {
  9857. "200": {
  9858. "description": "Workspace adapters",
  9859. "content": {
  9860. "application/json": {
  9861. "schema": {
  9862. "type": "array",
  9863. "items": {
  9864. "type": "object",
  9865. "properties": {
  9866. "type": {
  9867. "type": "string"
  9868. },
  9869. "name": {
  9870. "type": "string"
  9871. },
  9872. "description": {
  9873. "type": "string"
  9874. }
  9875. },
  9876. "required": ["type", "name", "description"],
  9877. "additionalProperties": false
  9878. },
  9879. "description": "Workspace adapters"
  9880. }
  9881. }
  9882. }
  9883. },
  9884. "400": {
  9885. "description": "Bad request",
  9886. "content": {
  9887. "application/json": {
  9888. "schema": {
  9889. "$ref": "#/components/schemas/BadRequestError"
  9890. }
  9891. }
  9892. }
  9893. }
  9894. },
  9895. "description": "List all available workspace adapters for the current project.",
  9896. "summary": "List workspace adapters",
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/experimental/workspace": {
  9906. "get": {
  9907. "tags": ["workspace"],
  9908. "operationId": "experimental.workspace.list",
  9909. "parameters": [
  9910. {
  9911. "name": "directory",
  9912. "in": "query",
  9913. "schema": {
  9914. "type": "string"
  9915. },
  9916. "required": false
  9917. },
  9918. {
  9919. "name": "workspace",
  9920. "in": "query",
  9921. "schema": {
  9922. "type": "string"
  9923. },
  9924. "required": false
  9925. }
  9926. ],
  9927. "responses": {
  9928. "200": {
  9929. "description": "Workspaces",
  9930. "content": {
  9931. "application/json": {
  9932. "schema": {
  9933. "type": "array",
  9934. "items": {
  9935. "$ref": "#/components/schemas/Workspace"
  9936. },
  9937. "description": "Workspaces"
  9938. }
  9939. }
  9940. }
  9941. },
  9942. "400": {
  9943. "description": "Bad request",
  9944. "content": {
  9945. "application/json": {
  9946. "schema": {
  9947. "$ref": "#/components/schemas/BadRequestError"
  9948. }
  9949. }
  9950. }
  9951. }
  9952. },
  9953. "description": "List all workspaces.",
  9954. "summary": "List workspaces",
  9955. "x-codeSamples": [
  9956. {
  9957. "lang": "js",
  9958. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9959. }
  9960. ]
  9961. },
  9962. "post": {
  9963. "tags": ["workspace"],
  9964. "operationId": "experimental.workspace.create",
  9965. "parameters": [
  9966. {
  9967. "name": "directory",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "string"
  9971. },
  9972. "required": false
  9973. },
  9974. {
  9975. "name": "workspace",
  9976. "in": "query",
  9977. "schema": {
  9978. "type": "string"
  9979. },
  9980. "required": false
  9981. }
  9982. ],
  9983. "responses": {
  9984. "200": {
  9985. "description": "Workspace created",
  9986. "content": {
  9987. "application/json": {
  9988. "schema": {
  9989. "$ref": "#/components/schemas/Workspace"
  9990. }
  9991. }
  9992. }
  9993. },
  9994. "400": {
  9995. "description": "BadRequest | InvalidRequestError",
  9996. "content": {
  9997. "application/json": {
  9998. "schema": {
  9999. "anyOf": [
  10000. {
  10001. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10002. },
  10003. {
  10004. "$ref": "#/components/schemas/InvalidRequestError"
  10005. }
  10006. ]
  10007. }
  10008. }
  10009. }
  10010. }
  10011. },
  10012. "description": "Create a workspace for the current project.",
  10013. "summary": "Create workspace",
  10014. "requestBody": {
  10015. "content": {
  10016. "application/json": {
  10017. "schema": {
  10018. "type": "object",
  10019. "properties": {
  10020. "id": {
  10021. "type": "string",
  10022. "pattern": "^wrk"
  10023. },
  10024. "type": {
  10025. "type": "string"
  10026. },
  10027. "branch": {
  10028. "anyOf": [
  10029. {
  10030. "type": "string"
  10031. },
  10032. {
  10033. "type": "null"
  10034. }
  10035. ]
  10036. },
  10037. "extra": {
  10038. "anyOf": [
  10039. {},
  10040. {
  10041. "type": "null"
  10042. }
  10043. ]
  10044. }
  10045. },
  10046. "required": ["type"],
  10047. "additionalProperties": false
  10048. }
  10049. }
  10050. }
  10051. },
  10052. "x-codeSamples": [
  10053. {
  10054. "lang": "js",
  10055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10056. }
  10057. ]
  10058. }
  10059. },
  10060. "/experimental/workspace/sync-list": {
  10061. "post": {
  10062. "tags": ["workspace"],
  10063. "operationId": "experimental.workspace.syncList",
  10064. "parameters": [
  10065. {
  10066. "name": "directory",
  10067. "in": "query",
  10068. "schema": {
  10069. "type": "string"
  10070. },
  10071. "required": false
  10072. },
  10073. {
  10074. "name": "workspace",
  10075. "in": "query",
  10076. "schema": {
  10077. "type": "string"
  10078. },
  10079. "required": false
  10080. }
  10081. ],
  10082. "responses": {
  10083. "204": {
  10084. "description": "Workspace list synced"
  10085. },
  10086. "400": {
  10087. "description": "Bad request",
  10088. "content": {
  10089. "application/json": {
  10090. "schema": {
  10091. "$ref": "#/components/schemas/BadRequestError"
  10092. }
  10093. }
  10094. }
  10095. }
  10096. },
  10097. "description": "Register missing workspaces returned by workspace adapters.",
  10098. "summary": "Sync workspace list",
  10099. "x-codeSamples": [
  10100. {
  10101. "lang": "js",
  10102. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10103. }
  10104. ]
  10105. }
  10106. },
  10107. "/experimental/workspace/status": {
  10108. "get": {
  10109. "tags": ["workspace"],
  10110. "operationId": "experimental.workspace.status",
  10111. "parameters": [
  10112. {
  10113. "name": "directory",
  10114. "in": "query",
  10115. "schema": {
  10116. "type": "string"
  10117. },
  10118. "required": false
  10119. },
  10120. {
  10121. "name": "workspace",
  10122. "in": "query",
  10123. "schema": {
  10124. "type": "string"
  10125. },
  10126. "required": false
  10127. }
  10128. ],
  10129. "responses": {
  10130. "200": {
  10131. "description": "Workspace status",
  10132. "content": {
  10133. "application/json": {
  10134. "schema": {
  10135. "type": "array",
  10136. "items": {
  10137. "type": "object",
  10138. "properties": {
  10139. "workspaceID": {
  10140. "type": "string",
  10141. "pattern": "^wrk"
  10142. },
  10143. "status": {
  10144. "type": "string",
  10145. "enum": ["connected", "connecting", "disconnected", "error"]
  10146. }
  10147. },
  10148. "required": ["workspaceID", "status"],
  10149. "additionalProperties": false
  10150. },
  10151. "description": "Workspace status"
  10152. }
  10153. }
  10154. }
  10155. },
  10156. "400": {
  10157. "description": "Bad request",
  10158. "content": {
  10159. "application/json": {
  10160. "schema": {
  10161. "$ref": "#/components/schemas/BadRequestError"
  10162. }
  10163. }
  10164. }
  10165. }
  10166. },
  10167. "description": "Get connection status for workspaces in the current project.",
  10168. "summary": "Workspace status",
  10169. "x-codeSamples": [
  10170. {
  10171. "lang": "js",
  10172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10173. }
  10174. ]
  10175. }
  10176. },
  10177. "/experimental/workspace/{id}": {
  10178. "delete": {
  10179. "tags": ["workspace"],
  10180. "operationId": "experimental.workspace.remove",
  10181. "parameters": [
  10182. {
  10183. "name": "id",
  10184. "in": "path",
  10185. "schema": {
  10186. "type": "string",
  10187. "pattern": "^wrk"
  10188. },
  10189. "required": true
  10190. },
  10191. {
  10192. "name": "directory",
  10193. "in": "query",
  10194. "schema": {
  10195. "type": "string"
  10196. },
  10197. "required": false
  10198. },
  10199. {
  10200. "name": "workspace",
  10201. "in": "query",
  10202. "schema": {
  10203. "type": "string"
  10204. },
  10205. "required": false
  10206. }
  10207. ],
  10208. "responses": {
  10209. "200": {
  10210. "description": "Workspace removed",
  10211. "content": {
  10212. "application/json": {
  10213. "schema": {
  10214. "$ref": "#/components/schemas/Workspace"
  10215. }
  10216. }
  10217. }
  10218. },
  10219. "400": {
  10220. "description": "BadRequest | InvalidRequestError",
  10221. "content": {
  10222. "application/json": {
  10223. "schema": {
  10224. "anyOf": [
  10225. {
  10226. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10227. },
  10228. {
  10229. "$ref": "#/components/schemas/InvalidRequestError"
  10230. }
  10231. ]
  10232. }
  10233. }
  10234. }
  10235. }
  10236. },
  10237. "description": "Remove an existing workspace.",
  10238. "summary": "Remove workspace",
  10239. "x-codeSamples": [
  10240. {
  10241. "lang": "js",
  10242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10243. }
  10244. ]
  10245. }
  10246. },
  10247. "/experimental/workspace/warp": {
  10248. "post": {
  10249. "tags": ["workspace"],
  10250. "operationId": "experimental.workspace.warp",
  10251. "parameters": [
  10252. {
  10253. "name": "directory",
  10254. "in": "query",
  10255. "schema": {
  10256. "type": "string"
  10257. },
  10258. "required": false
  10259. },
  10260. {
  10261. "name": "workspace",
  10262. "in": "query",
  10263. "schema": {
  10264. "type": "string"
  10265. },
  10266. "required": false
  10267. }
  10268. ],
  10269. "responses": {
  10270. "204": {
  10271. "description": "Session warped"
  10272. },
  10273. "400": {
  10274. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10275. "content": {
  10276. "application/json": {
  10277. "schema": {
  10278. "anyOf": [
  10279. {
  10280. "$ref": "#/components/schemas/WorkspaceWarpError"
  10281. },
  10282. {
  10283. "$ref": "#/components/schemas/VcsApplyError"
  10284. },
  10285. {
  10286. "$ref": "#/components/schemas/InvalidRequestError"
  10287. }
  10288. ]
  10289. }
  10290. }
  10291. }
  10292. }
  10293. },
  10294. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10295. "summary": "Warp session into workspace",
  10296. "requestBody": {
  10297. "content": {
  10298. "application/json": {
  10299. "schema": {
  10300. "type": "object",
  10301. "properties": {
  10302. "id": {
  10303. "anyOf": [
  10304. {
  10305. "type": "string",
  10306. "pattern": "^wrk"
  10307. },
  10308. {
  10309. "type": "null"
  10310. }
  10311. ]
  10312. },
  10313. "sessionID": {
  10314. "type": "string",
  10315. "pattern": "^ses"
  10316. },
  10317. "copyChanges": {
  10318. "type": "boolean"
  10319. }
  10320. },
  10321. "required": ["id", "sessionID"],
  10322. "additionalProperties": false
  10323. }
  10324. }
  10325. }
  10326. },
  10327. "x-codeSamples": [
  10328. {
  10329. "lang": "js",
  10330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10331. }
  10332. ]
  10333. }
  10334. },
  10335. "/pty/{ptyID}/connect": {
  10336. "get": {
  10337. "tags": ["pty"],
  10338. "operationId": "pty.connect",
  10339. "parameters": [
  10340. {
  10341. "name": "ptyID",
  10342. "in": "path",
  10343. "schema": {
  10344. "type": "string",
  10345. "pattern": "^pty"
  10346. },
  10347. "required": true
  10348. },
  10349. {
  10350. "name": "directory",
  10351. "in": "query",
  10352. "schema": {
  10353. "type": "string"
  10354. },
  10355. "required": false
  10356. },
  10357. {
  10358. "name": "workspace",
  10359. "in": "query",
  10360. "schema": {
  10361. "type": "string"
  10362. },
  10363. "required": false
  10364. }
  10365. ],
  10366. "responses": {
  10367. "200": {
  10368. "description": "Connected session",
  10369. "content": {
  10370. "application/json": {
  10371. "schema": {
  10372. "type": "boolean",
  10373. "description": "Connected session"
  10374. }
  10375. }
  10376. }
  10377. },
  10378. "403": {
  10379. "description": "Forbidden",
  10380. "content": {
  10381. "application/json": {
  10382. "schema": {
  10383. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10384. }
  10385. }
  10386. }
  10387. },
  10388. "404": {
  10389. "description": "Not found",
  10390. "content": {
  10391. "application/json": {
  10392. "schema": {
  10393. "$ref": "#/components/schemas/NotFoundError"
  10394. }
  10395. }
  10396. }
  10397. }
  10398. },
  10399. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10400. "summary": "Connect to PTY session",
  10401. "x-codeSamples": [
  10402. {
  10403. "lang": "js",
  10404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10405. }
  10406. ]
  10407. }
  10408. }
  10409. },
  10410. "components": {
  10411. "schemas": {
  10412. "Event": {
  10413. "anyOf": [
  10414. {
  10415. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10416. },
  10417. {
  10418. "$ref": "#/components/schemas/Event.tui.command.execute"
  10419. },
  10420. {
  10421. "$ref": "#/components/schemas/EventTuiToastShow1"
  10422. },
  10423. {
  10424. "$ref": "#/components/schemas/Event.tui.session.select"
  10425. },
  10426. {
  10427. "$ref": "#/components/schemas/EventServerConnected"
  10428. },
  10429. {
  10430. "$ref": "#/components/schemas/EventGlobalDisposed"
  10431. },
  10432. {
  10433. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10434. },
  10435. {
  10436. "$ref": "#/components/schemas/EventFileEdited"
  10437. },
  10438. {
  10439. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10440. },
  10441. {
  10442. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10443. },
  10444. {
  10445. "$ref": "#/components/schemas/EventLspUpdated"
  10446. },
  10447. {
  10448. "$ref": "#/components/schemas/EventMessagePartDelta"
  10449. },
  10450. {
  10451. "$ref": "#/components/schemas/EventPermissionAsked"
  10452. },
  10453. {
  10454. "$ref": "#/components/schemas/EventPermissionReplied"
  10455. },
  10456. {
  10457. "$ref": "#/components/schemas/EventSessionDiff"
  10458. },
  10459. {
  10460. "$ref": "#/components/schemas/EventSessionError"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/EventQuestionAsked"
  10464. },
  10465. {
  10466. "$ref": "#/components/schemas/EventQuestionReplied"
  10467. },
  10468. {
  10469. "$ref": "#/components/schemas/EventQuestionRejected"
  10470. },
  10471. {
  10472. "$ref": "#/components/schemas/EventTodoUpdated"
  10473. },
  10474. {
  10475. "$ref": "#/components/schemas/EventSessionStatus"
  10476. },
  10477. {
  10478. "$ref": "#/components/schemas/EventSessionIdle"
  10479. },
  10480. {
  10481. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10482. },
  10483. {
  10484. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10485. },
  10486. {
  10487. "$ref": "#/components/schemas/EventCommandExecuted"
  10488. },
  10489. {
  10490. "$ref": "#/components/schemas/EventProjectUpdated"
  10491. },
  10492. {
  10493. "$ref": "#/components/schemas/EventSessionCompacted"
  10494. },
  10495. {
  10496. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10497. },
  10498. {
  10499. "$ref": "#/components/schemas/EventWorkspaceReady"
  10500. },
  10501. {
  10502. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10503. },
  10504. {
  10505. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10506. },
  10507. {
  10508. "$ref": "#/components/schemas/EventWorktreeReady"
  10509. },
  10510. {
  10511. "$ref": "#/components/schemas/EventWorktreeFailed"
  10512. },
  10513. {
  10514. "$ref": "#/components/schemas/EventPtyCreated"
  10515. },
  10516. {
  10517. "$ref": "#/components/schemas/EventPtyUpdated"
  10518. },
  10519. {
  10520. "$ref": "#/components/schemas/EventPtyExited"
  10521. },
  10522. {
  10523. "$ref": "#/components/schemas/EventPtyDeleted"
  10524. },
  10525. {
  10526. "$ref": "#/components/schemas/EventInstallationUpdated"
  10527. },
  10528. {
  10529. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10530. },
  10531. {
  10532. "$ref": "#/components/schemas/EventMessageUpdated"
  10533. },
  10534. {
  10535. "$ref": "#/components/schemas/EventMessageRemoved"
  10536. },
  10537. {
  10538. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10539. },
  10540. {
  10541. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10542. },
  10543. {
  10544. "$ref": "#/components/schemas/EventSessionCreated"
  10545. },
  10546. {
  10547. "$ref": "#/components/schemas/EventSessionUpdated"
  10548. },
  10549. {
  10550. "$ref": "#/components/schemas/EventSessionDeleted"
  10551. },
  10552. {
  10553. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10554. },
  10555. {
  10556. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10557. },
  10558. {
  10559. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10560. },
  10561. {
  10562. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10563. },
  10564. {
  10565. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10566. },
  10567. {
  10568. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10569. },
  10570. {
  10571. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10572. },
  10573. {
  10574. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10575. },
  10576. {
  10577. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10578. },
  10579. {
  10580. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10581. },
  10582. {
  10583. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10584. },
  10585. {
  10586. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10587. },
  10588. {
  10589. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10590. },
  10591. {
  10592. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10593. },
  10594. {
  10595. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10596. },
  10597. {
  10598. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10599. },
  10600. {
  10601. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10602. },
  10603. {
  10604. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10605. },
  10606. {
  10607. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10608. },
  10609. {
  10610. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10611. },
  10612. {
  10613. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10614. },
  10615. {
  10616. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10617. },
  10618. {
  10619. "$ref": "#/components/schemas/EventSessionNextRetried"
  10620. },
  10621. {
  10622. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10623. },
  10624. {
  10625. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10626. },
  10627. {
  10628. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10629. },
  10630. {
  10631. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10632. },
  10633. {
  10634. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10635. },
  10636. {
  10637. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10638. },
  10639. {
  10640. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10641. },
  10642. {
  10643. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10644. },
  10645. {
  10646. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10647. },
  10648. {
  10649. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10650. },
  10651. {
  10652. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10653. },
  10654. {
  10655. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10659. },
  10660. {
  10661. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10662. },
  10663. {
  10664. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10665. },
  10666. {
  10667. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10668. },
  10669. {
  10670. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10671. },
  10672. {
  10673. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10674. },
  10675. {
  10676. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10677. },
  10678. {
  10679. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10680. },
  10681. {
  10682. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10683. },
  10684. {
  10685. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10686. },
  10687. {
  10688. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10689. },
  10690. {
  10691. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10692. },
  10693. {
  10694. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10695. },
  10696. {
  10697. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10698. },
  10699. {
  10700. "$ref": "#/components/schemas/EventSessionNextRetried"
  10701. },
  10702. {
  10703. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10704. },
  10705. {
  10706. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10707. },
  10708. {
  10709. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10710. },
  10711. {
  10712. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10713. },
  10714. {
  10715. "$ref": "#/components/schemas/EventAccountAdded"
  10716. },
  10717. {
  10718. "$ref": "#/components/schemas/EventAccountRemoved"
  10719. },
  10720. {
  10721. "$ref": "#/components/schemas/EventAccountSwitched"
  10722. }
  10723. ]
  10724. },
  10725. "OAuth": {
  10726. "type": "object",
  10727. "properties": {
  10728. "type": {
  10729. "type": "string",
  10730. "enum": ["oauth"]
  10731. },
  10732. "refresh": {
  10733. "type": "string"
  10734. },
  10735. "access": {
  10736. "type": "string"
  10737. },
  10738. "expires": {
  10739. "type": "integer",
  10740. "minimum": 0
  10741. },
  10742. "accountId": {
  10743. "type": "string"
  10744. },
  10745. "enterpriseUrl": {
  10746. "type": "string"
  10747. }
  10748. },
  10749. "required": ["type", "refresh", "access", "expires"],
  10750. "additionalProperties": false
  10751. },
  10752. "ApiAuth": {
  10753. "type": "object",
  10754. "properties": {
  10755. "type": {
  10756. "type": "string",
  10757. "enum": ["api"]
  10758. },
  10759. "key": {
  10760. "type": "string"
  10761. },
  10762. "metadata": {
  10763. "type": "object",
  10764. "additionalProperties": {
  10765. "type": "string"
  10766. }
  10767. }
  10768. },
  10769. "required": ["type", "key"],
  10770. "additionalProperties": false
  10771. },
  10772. "WellKnownAuth": {
  10773. "type": "object",
  10774. "properties": {
  10775. "type": {
  10776. "type": "string",
  10777. "enum": ["wellknown"]
  10778. },
  10779. "key": {
  10780. "type": "string"
  10781. },
  10782. "token": {
  10783. "type": "string"
  10784. }
  10785. },
  10786. "required": ["type", "key", "token"],
  10787. "additionalProperties": false
  10788. },
  10789. "Auth": {
  10790. "anyOf": [
  10791. {
  10792. "$ref": "#/components/schemas/OAuth"
  10793. },
  10794. {
  10795. "$ref": "#/components/schemas/ApiAuth"
  10796. },
  10797. {
  10798. "$ref": "#/components/schemas/WellKnownAuth"
  10799. }
  10800. ]
  10801. },
  10802. "effect_HttpApiError_BadRequest": {
  10803. "type": "object",
  10804. "properties": {
  10805. "_tag": {
  10806. "type": "string",
  10807. "enum": ["BadRequest"]
  10808. }
  10809. },
  10810. "required": ["_tag"],
  10811. "additionalProperties": false
  10812. },
  10813. "InvalidRequestError": {
  10814. "type": "object",
  10815. "properties": {
  10816. "_tag": {
  10817. "type": "string",
  10818. "enum": ["InvalidRequestError"]
  10819. },
  10820. "message": {
  10821. "type": "string"
  10822. },
  10823. "kind": {
  10824. "type": "string"
  10825. },
  10826. "field": {
  10827. "type": "string"
  10828. }
  10829. },
  10830. "required": ["_tag", "message"],
  10831. "additionalProperties": false
  10832. },
  10833. "Event.tui.prompt.append": {
  10834. "type": "object",
  10835. "properties": {
  10836. "id": {
  10837. "type": "string"
  10838. },
  10839. "type": {
  10840. "type": "string",
  10841. "enum": ["tui.prompt.append"]
  10842. },
  10843. "properties": {
  10844. "type": "object",
  10845. "properties": {
  10846. "text": {
  10847. "type": "string"
  10848. }
  10849. },
  10850. "required": ["text"],
  10851. "additionalProperties": false
  10852. }
  10853. },
  10854. "required": ["id", "type", "properties"],
  10855. "additionalProperties": false
  10856. },
  10857. "Event.tui.command.execute": {
  10858. "type": "object",
  10859. "properties": {
  10860. "id": {
  10861. "type": "string"
  10862. },
  10863. "type": {
  10864. "type": "string",
  10865. "enum": ["tui.command.execute"]
  10866. },
  10867. "properties": {
  10868. "type": "object",
  10869. "properties": {
  10870. "command": {
  10871. "anyOf": [
  10872. {
  10873. "type": "string",
  10874. "enum": [
  10875. "session.list",
  10876. "session.new",
  10877. "session.share",
  10878. "session.interrupt",
  10879. "session.compact",
  10880. "session.page.up",
  10881. "session.page.down",
  10882. "session.line.up",
  10883. "session.line.down",
  10884. "session.half.page.up",
  10885. "session.half.page.down",
  10886. "session.first",
  10887. "session.last",
  10888. "prompt.clear",
  10889. "prompt.submit",
  10890. "agent.cycle"
  10891. ]
  10892. },
  10893. {
  10894. "type": "string"
  10895. }
  10896. ]
  10897. }
  10898. },
  10899. "required": ["command"],
  10900. "additionalProperties": false
  10901. }
  10902. },
  10903. "required": ["id", "type", "properties"],
  10904. "additionalProperties": false
  10905. },
  10906. "Event.tui.toast.show": {
  10907. "type": "object",
  10908. "properties": {
  10909. "id": {
  10910. "type": "string"
  10911. },
  10912. "type": {
  10913. "type": "string",
  10914. "enum": ["tui.toast.show"]
  10915. },
  10916. "properties": {
  10917. "type": "object",
  10918. "properties": {
  10919. "title": {
  10920. "type": "string"
  10921. },
  10922. "message": {
  10923. "type": "string"
  10924. },
  10925. "variant": {
  10926. "type": "string",
  10927. "enum": ["info", "success", "warning", "error"]
  10928. },
  10929. "duration": {
  10930. "type": "integer",
  10931. "exclusiveMinimum": 0
  10932. }
  10933. },
  10934. "required": ["message", "variant"],
  10935. "additionalProperties": false
  10936. }
  10937. },
  10938. "required": ["id", "type", "properties"],
  10939. "additionalProperties": false
  10940. },
  10941. "Event.tui.session.select": {
  10942. "type": "object",
  10943. "properties": {
  10944. "id": {
  10945. "type": "string"
  10946. },
  10947. "type": {
  10948. "type": "string",
  10949. "enum": ["tui.session.select"]
  10950. },
  10951. "properties": {
  10952. "type": "object",
  10953. "properties": {
  10954. "sessionID": {
  10955. "type": "string",
  10956. "pattern": "^ses",
  10957. "description": "Session ID to navigate to"
  10958. }
  10959. },
  10960. "required": ["sessionID"],
  10961. "additionalProperties": false
  10962. }
  10963. },
  10964. "required": ["id", "type", "properties"],
  10965. "additionalProperties": false
  10966. },
  10967. "PermissionRequest": {
  10968. "type": "object",
  10969. "properties": {
  10970. "id": {
  10971. "type": "string",
  10972. "pattern": "^per"
  10973. },
  10974. "sessionID": {
  10975. "type": "string",
  10976. "pattern": "^ses"
  10977. },
  10978. "permission": {
  10979. "type": "string"
  10980. },
  10981. "patterns": {
  10982. "type": "array",
  10983. "items": {
  10984. "type": "string"
  10985. }
  10986. },
  10987. "metadata": {
  10988. "type": "object"
  10989. },
  10990. "always": {
  10991. "type": "array",
  10992. "items": {
  10993. "type": "string"
  10994. }
  10995. },
  10996. "tool": {
  10997. "type": "object",
  10998. "properties": {
  10999. "messageID": {
  11000. "type": "string",
  11001. "pattern": "^msg"
  11002. },
  11003. "callID": {
  11004. "type": "string"
  11005. }
  11006. },
  11007. "required": ["messageID", "callID"],
  11008. "additionalProperties": false
  11009. }
  11010. },
  11011. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11012. "additionalProperties": false
  11013. },
  11014. "SnapshotFileDiff": {
  11015. "type": "object",
  11016. "properties": {
  11017. "file": {
  11018. "type": "string"
  11019. },
  11020. "patch": {
  11021. "type": "string"
  11022. },
  11023. "additions": {
  11024. "type": "number"
  11025. },
  11026. "deletions": {
  11027. "type": "number"
  11028. },
  11029. "status": {
  11030. "type": "string",
  11031. "enum": ["added", "deleted", "modified"]
  11032. }
  11033. },
  11034. "required": ["additions", "deletions"],
  11035. "additionalProperties": false
  11036. },
  11037. "ProviderAuthError": {
  11038. "type": "object",
  11039. "properties": {
  11040. "name": {
  11041. "type": "string",
  11042. "enum": ["ProviderAuthError"]
  11043. },
  11044. "data": {
  11045. "type": "object",
  11046. "properties": {
  11047. "providerID": {
  11048. "type": "string"
  11049. },
  11050. "message": {
  11051. "type": "string"
  11052. }
  11053. },
  11054. "required": ["providerID", "message"],
  11055. "additionalProperties": false
  11056. }
  11057. },
  11058. "required": ["name", "data"],
  11059. "additionalProperties": false
  11060. },
  11061. "UnknownError": {
  11062. "type": "object",
  11063. "properties": {
  11064. "name": {
  11065. "type": "string",
  11066. "enum": ["UnknownError"]
  11067. },
  11068. "data": {
  11069. "type": "object",
  11070. "properties": {
  11071. "message": {
  11072. "type": "string"
  11073. },
  11074. "ref": {
  11075. "type": "string"
  11076. }
  11077. },
  11078. "required": ["message"],
  11079. "additionalProperties": false
  11080. }
  11081. },
  11082. "required": ["name", "data"],
  11083. "additionalProperties": false
  11084. },
  11085. "MessageOutputLengthError": {
  11086. "type": "object",
  11087. "properties": {
  11088. "name": {
  11089. "type": "string",
  11090. "enum": ["MessageOutputLengthError"]
  11091. },
  11092. "data": {
  11093. "type": "object",
  11094. "properties": {}
  11095. }
  11096. },
  11097. "required": ["name", "data"],
  11098. "additionalProperties": false
  11099. },
  11100. "MessageAbortedError": {
  11101. "type": "object",
  11102. "properties": {
  11103. "name": {
  11104. "type": "string",
  11105. "enum": ["MessageAbortedError"]
  11106. },
  11107. "data": {
  11108. "type": "object",
  11109. "properties": {
  11110. "message": {
  11111. "type": "string"
  11112. }
  11113. },
  11114. "required": ["message"],
  11115. "additionalProperties": false
  11116. }
  11117. },
  11118. "required": ["name", "data"],
  11119. "additionalProperties": false
  11120. },
  11121. "StructuredOutputError": {
  11122. "type": "object",
  11123. "properties": {
  11124. "name": {
  11125. "type": "string",
  11126. "enum": ["StructuredOutputError"]
  11127. },
  11128. "data": {
  11129. "type": "object",
  11130. "properties": {
  11131. "message": {
  11132. "type": "string"
  11133. },
  11134. "retries": {
  11135. "type": "integer",
  11136. "minimum": 0
  11137. }
  11138. },
  11139. "required": ["message", "retries"],
  11140. "additionalProperties": false
  11141. }
  11142. },
  11143. "required": ["name", "data"],
  11144. "additionalProperties": false
  11145. },
  11146. "ContextOverflowError": {
  11147. "type": "object",
  11148. "properties": {
  11149. "name": {
  11150. "type": "string",
  11151. "enum": ["ContextOverflowError"]
  11152. },
  11153. "data": {
  11154. "type": "object",
  11155. "properties": {
  11156. "message": {
  11157. "type": "string"
  11158. },
  11159. "responseBody": {
  11160. "type": "string"
  11161. }
  11162. },
  11163. "required": ["message"],
  11164. "additionalProperties": false
  11165. }
  11166. },
  11167. "required": ["name", "data"],
  11168. "additionalProperties": false
  11169. },
  11170. "APIError": {
  11171. "type": "object",
  11172. "properties": {
  11173. "name": {
  11174. "type": "string",
  11175. "enum": ["APIError"]
  11176. },
  11177. "data": {
  11178. "type": "object",
  11179. "properties": {
  11180. "message": {
  11181. "type": "string"
  11182. },
  11183. "statusCode": {
  11184. "type": "integer",
  11185. "minimum": 0
  11186. },
  11187. "isRetryable": {
  11188. "type": "boolean"
  11189. },
  11190. "responseHeaders": {
  11191. "type": "object",
  11192. "additionalProperties": {
  11193. "type": "string"
  11194. }
  11195. },
  11196. "responseBody": {
  11197. "type": "string"
  11198. },
  11199. "metadata": {
  11200. "type": "object",
  11201. "additionalProperties": {
  11202. "type": "string"
  11203. }
  11204. }
  11205. },
  11206. "required": ["message", "isRetryable"],
  11207. "additionalProperties": false
  11208. }
  11209. },
  11210. "required": ["name", "data"],
  11211. "additionalProperties": false
  11212. },
  11213. "QuestionOption": {
  11214. "type": "object",
  11215. "properties": {
  11216. "label": {
  11217. "type": "string",
  11218. "description": "Display text (1-5 words, concise)"
  11219. },
  11220. "description": {
  11221. "type": "string",
  11222. "description": "Explanation of choice"
  11223. }
  11224. },
  11225. "required": ["label", "description"],
  11226. "additionalProperties": false
  11227. },
  11228. "QuestionInfo": {
  11229. "type": "object",
  11230. "properties": {
  11231. "question": {
  11232. "type": "string",
  11233. "description": "Complete question"
  11234. },
  11235. "header": {
  11236. "type": "string",
  11237. "description": "Very short label (max 30 chars)"
  11238. },
  11239. "options": {
  11240. "type": "array",
  11241. "items": {
  11242. "$ref": "#/components/schemas/QuestionOption"
  11243. },
  11244. "description": "Available choices"
  11245. },
  11246. "multiple": {
  11247. "type": "boolean"
  11248. },
  11249. "custom": {
  11250. "type": "boolean"
  11251. }
  11252. },
  11253. "required": ["question", "header", "options"],
  11254. "additionalProperties": false
  11255. },
  11256. "QuestionTool": {
  11257. "type": "object",
  11258. "properties": {
  11259. "messageID": {
  11260. "type": "string",
  11261. "pattern": "^msg"
  11262. },
  11263. "callID": {
  11264. "type": "string"
  11265. }
  11266. },
  11267. "required": ["messageID", "callID"],
  11268. "additionalProperties": false
  11269. },
  11270. "QuestionRequest": {
  11271. "type": "object",
  11272. "properties": {
  11273. "id": {
  11274. "type": "string",
  11275. "pattern": "^que"
  11276. },
  11277. "sessionID": {
  11278. "type": "string",
  11279. "pattern": "^ses"
  11280. },
  11281. "questions": {
  11282. "type": "array",
  11283. "items": {
  11284. "$ref": "#/components/schemas/QuestionInfo"
  11285. },
  11286. "description": "Questions to ask"
  11287. },
  11288. "tool": {
  11289. "$ref": "#/components/schemas/QuestionTool"
  11290. }
  11291. },
  11292. "required": ["id", "sessionID", "questions"],
  11293. "additionalProperties": false
  11294. },
  11295. "QuestionAnswer": {
  11296. "type": "array",
  11297. "items": {
  11298. "type": "string"
  11299. }
  11300. },
  11301. "QuestionReplied": {
  11302. "type": "object",
  11303. "properties": {
  11304. "sessionID": {
  11305. "type": "string",
  11306. "pattern": "^ses"
  11307. },
  11308. "requestID": {
  11309. "type": "string",
  11310. "pattern": "^que"
  11311. },
  11312. "answers": {
  11313. "type": "array",
  11314. "items": {
  11315. "$ref": "#/components/schemas/QuestionAnswer"
  11316. }
  11317. }
  11318. },
  11319. "required": ["sessionID", "requestID", "answers"],
  11320. "additionalProperties": false
  11321. },
  11322. "QuestionRejected": {
  11323. "type": "object",
  11324. "properties": {
  11325. "sessionID": {
  11326. "type": "string",
  11327. "pattern": "^ses"
  11328. },
  11329. "requestID": {
  11330. "type": "string",
  11331. "pattern": "^que"
  11332. }
  11333. },
  11334. "required": ["sessionID", "requestID"],
  11335. "additionalProperties": false
  11336. },
  11337. "Todo": {
  11338. "type": "object",
  11339. "properties": {
  11340. "content": {
  11341. "type": "string",
  11342. "description": "Brief description of the task"
  11343. },
  11344. "status": {
  11345. "type": "string",
  11346. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11347. },
  11348. "priority": {
  11349. "type": "string",
  11350. "description": "Priority level of the task: high, medium, low"
  11351. }
  11352. },
  11353. "required": ["content", "status", "priority"],
  11354. "additionalProperties": false
  11355. },
  11356. "SessionStatus": {
  11357. "anyOf": [
  11358. {
  11359. "type": "object",
  11360. "properties": {
  11361. "type": {
  11362. "type": "string",
  11363. "enum": ["idle"]
  11364. }
  11365. },
  11366. "required": ["type"],
  11367. "additionalProperties": false
  11368. },
  11369. {
  11370. "type": "object",
  11371. "properties": {
  11372. "type": {
  11373. "type": "string",
  11374. "enum": ["retry"]
  11375. },
  11376. "attempt": {
  11377. "type": "integer",
  11378. "minimum": 0
  11379. },
  11380. "message": {
  11381. "type": "string"
  11382. },
  11383. "action": {
  11384. "type": "object",
  11385. "properties": {
  11386. "reason": {
  11387. "type": "string"
  11388. },
  11389. "provider": {
  11390. "type": "string"
  11391. },
  11392. "title": {
  11393. "type": "string"
  11394. },
  11395. "message": {
  11396. "type": "string"
  11397. },
  11398. "label": {
  11399. "type": "string"
  11400. },
  11401. "link": {
  11402. "type": "string"
  11403. }
  11404. },
  11405. "required": ["reason", "provider", "title", "message", "label"],
  11406. "additionalProperties": false
  11407. },
  11408. "next": {
  11409. "type": "integer",
  11410. "minimum": 0
  11411. }
  11412. },
  11413. "required": ["type", "attempt", "message", "next"],
  11414. "additionalProperties": false
  11415. },
  11416. {
  11417. "type": "object",
  11418. "properties": {
  11419. "type": {
  11420. "type": "string",
  11421. "enum": ["busy"]
  11422. }
  11423. },
  11424. "required": ["type"],
  11425. "additionalProperties": false
  11426. }
  11427. ]
  11428. },
  11429. "Project": {
  11430. "type": "object",
  11431. "properties": {
  11432. "id": {
  11433. "type": "string"
  11434. },
  11435. "worktree": {
  11436. "type": "string"
  11437. },
  11438. "vcs": {
  11439. "type": "string",
  11440. "enum": ["git"]
  11441. },
  11442. "name": {
  11443. "type": "string"
  11444. },
  11445. "icon": {
  11446. "type": "object",
  11447. "properties": {
  11448. "url": {
  11449. "type": "string"
  11450. },
  11451. "override": {
  11452. "type": "string"
  11453. },
  11454. "color": {
  11455. "type": "string"
  11456. }
  11457. },
  11458. "additionalProperties": false
  11459. },
  11460. "commands": {
  11461. "type": "object",
  11462. "properties": {
  11463. "start": {
  11464. "type": "string",
  11465. "description": "Startup script to run when creating a new workspace (worktree)"
  11466. }
  11467. },
  11468. "additionalProperties": false
  11469. },
  11470. "time": {
  11471. "type": "object",
  11472. "properties": {
  11473. "created": {
  11474. "type": "integer",
  11475. "minimum": 0
  11476. },
  11477. "updated": {
  11478. "type": "integer",
  11479. "minimum": 0
  11480. },
  11481. "initialized": {
  11482. "type": "integer",
  11483. "minimum": 0
  11484. }
  11485. },
  11486. "required": ["created", "updated"],
  11487. "additionalProperties": false
  11488. },
  11489. "sandboxes": {
  11490. "type": "array",
  11491. "items": {
  11492. "type": "string"
  11493. }
  11494. }
  11495. },
  11496. "required": ["id", "worktree", "time", "sandboxes"],
  11497. "additionalProperties": false
  11498. },
  11499. "Pty": {
  11500. "type": "object",
  11501. "properties": {
  11502. "id": {
  11503. "type": "string",
  11504. "pattern": "^pty"
  11505. },
  11506. "title": {
  11507. "type": "string"
  11508. },
  11509. "command": {
  11510. "type": "string"
  11511. },
  11512. "args": {
  11513. "type": "array",
  11514. "items": {
  11515. "type": "string"
  11516. }
  11517. },
  11518. "cwd": {
  11519. "type": "string"
  11520. },
  11521. "status": {
  11522. "type": "string",
  11523. "enum": ["running", "exited"]
  11524. },
  11525. "pid": {
  11526. "type": "integer",
  11527. "exclusiveMinimum": 0
  11528. }
  11529. },
  11530. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11531. "additionalProperties": false
  11532. },
  11533. "OutputFormatText": {
  11534. "type": "object",
  11535. "properties": {
  11536. "type": {
  11537. "type": "string",
  11538. "enum": ["text"]
  11539. }
  11540. },
  11541. "required": ["type"],
  11542. "additionalProperties": false
  11543. },
  11544. "JSONSchema": {
  11545. "type": "object"
  11546. },
  11547. "OutputFormatJsonSchema": {
  11548. "type": "object",
  11549. "properties": {
  11550. "type": {
  11551. "type": "string",
  11552. "enum": ["json_schema"]
  11553. },
  11554. "schema": {
  11555. "$ref": "#/components/schemas/JSONSchema"
  11556. },
  11557. "retryCount": {
  11558. "type": "integer",
  11559. "minimum": 0
  11560. }
  11561. },
  11562. "required": ["type", "schema"],
  11563. "additionalProperties": false
  11564. },
  11565. "OutputFormat": {
  11566. "anyOf": [
  11567. {
  11568. "$ref": "#/components/schemas/OutputFormatText"
  11569. },
  11570. {
  11571. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11572. }
  11573. ]
  11574. },
  11575. "UserMessage": {
  11576. "type": "object",
  11577. "properties": {
  11578. "id": {
  11579. "type": "string",
  11580. "pattern": "^msg"
  11581. },
  11582. "sessionID": {
  11583. "type": "string",
  11584. "pattern": "^ses"
  11585. },
  11586. "role": {
  11587. "type": "string",
  11588. "enum": ["user"]
  11589. },
  11590. "time": {
  11591. "type": "object",
  11592. "properties": {
  11593. "created": {
  11594. "type": "integer",
  11595. "minimum": 0
  11596. }
  11597. },
  11598. "required": ["created"],
  11599. "additionalProperties": false
  11600. },
  11601. "format": {
  11602. "$ref": "#/components/schemas/OutputFormat"
  11603. },
  11604. "summary": {
  11605. "type": "object",
  11606. "properties": {
  11607. "title": {
  11608. "type": "string"
  11609. },
  11610. "body": {
  11611. "type": "string"
  11612. },
  11613. "diffs": {
  11614. "type": "array",
  11615. "items": {
  11616. "$ref": "#/components/schemas/SnapshotFileDiff"
  11617. }
  11618. }
  11619. },
  11620. "required": ["diffs"],
  11621. "additionalProperties": false
  11622. },
  11623. "agent": {
  11624. "type": "string"
  11625. },
  11626. "model": {
  11627. "type": "object",
  11628. "properties": {
  11629. "providerID": {
  11630. "type": "string"
  11631. },
  11632. "modelID": {
  11633. "type": "string"
  11634. },
  11635. "variant": {
  11636. "type": "string"
  11637. }
  11638. },
  11639. "required": ["providerID", "modelID"],
  11640. "additionalProperties": false
  11641. },
  11642. "system": {
  11643. "type": "string"
  11644. },
  11645. "tools": {
  11646. "type": "object",
  11647. "additionalProperties": {
  11648. "type": "boolean"
  11649. }
  11650. }
  11651. },
  11652. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11653. "additionalProperties": false
  11654. },
  11655. "AssistantMessage": {
  11656. "type": "object",
  11657. "properties": {
  11658. "id": {
  11659. "type": "string",
  11660. "pattern": "^msg"
  11661. },
  11662. "sessionID": {
  11663. "type": "string",
  11664. "pattern": "^ses"
  11665. },
  11666. "role": {
  11667. "type": "string",
  11668. "enum": ["assistant"]
  11669. },
  11670. "time": {
  11671. "type": "object",
  11672. "properties": {
  11673. "created": {
  11674. "type": "integer",
  11675. "minimum": 0
  11676. },
  11677. "completed": {
  11678. "type": "integer",
  11679. "minimum": 0
  11680. }
  11681. },
  11682. "required": ["created"],
  11683. "additionalProperties": false
  11684. },
  11685. "error": {
  11686. "anyOf": [
  11687. {
  11688. "$ref": "#/components/schemas/ProviderAuthError"
  11689. },
  11690. {
  11691. "$ref": "#/components/schemas/UnknownError"
  11692. },
  11693. {
  11694. "$ref": "#/components/schemas/MessageOutputLengthError"
  11695. },
  11696. {
  11697. "$ref": "#/components/schemas/MessageAbortedError"
  11698. },
  11699. {
  11700. "$ref": "#/components/schemas/StructuredOutputError"
  11701. },
  11702. {
  11703. "$ref": "#/components/schemas/ContextOverflowError"
  11704. },
  11705. {
  11706. "$ref": "#/components/schemas/APIError"
  11707. }
  11708. ]
  11709. },
  11710. "parentID": {
  11711. "type": "string",
  11712. "pattern": "^msg"
  11713. },
  11714. "modelID": {
  11715. "type": "string"
  11716. },
  11717. "providerID": {
  11718. "type": "string"
  11719. },
  11720. "mode": {
  11721. "type": "string"
  11722. },
  11723. "agent": {
  11724. "type": "string"
  11725. },
  11726. "path": {
  11727. "type": "object",
  11728. "properties": {
  11729. "cwd": {
  11730. "type": "string"
  11731. },
  11732. "root": {
  11733. "type": "string"
  11734. }
  11735. },
  11736. "required": ["cwd", "root"],
  11737. "additionalProperties": false
  11738. },
  11739. "summary": {
  11740. "type": "boolean"
  11741. },
  11742. "cost": {
  11743. "type": "number"
  11744. },
  11745. "tokens": {
  11746. "type": "object",
  11747. "properties": {
  11748. "total": {
  11749. "type": "number"
  11750. },
  11751. "input": {
  11752. "type": "number"
  11753. },
  11754. "output": {
  11755. "type": "number"
  11756. },
  11757. "reasoning": {
  11758. "type": "number"
  11759. },
  11760. "cache": {
  11761. "type": "object",
  11762. "properties": {
  11763. "read": {
  11764. "type": "number"
  11765. },
  11766. "write": {
  11767. "type": "number"
  11768. }
  11769. },
  11770. "required": ["read", "write"],
  11771. "additionalProperties": false
  11772. }
  11773. },
  11774. "required": ["input", "output", "reasoning", "cache"],
  11775. "additionalProperties": false
  11776. },
  11777. "structured": {},
  11778. "variant": {
  11779. "type": "string"
  11780. },
  11781. "finish": {
  11782. "type": "string"
  11783. }
  11784. },
  11785. "required": [
  11786. "id",
  11787. "sessionID",
  11788. "role",
  11789. "time",
  11790. "parentID",
  11791. "modelID",
  11792. "providerID",
  11793. "mode",
  11794. "agent",
  11795. "path",
  11796. "cost",
  11797. "tokens"
  11798. ],
  11799. "additionalProperties": false
  11800. },
  11801. "Message": {
  11802. "anyOf": [
  11803. {
  11804. "$ref": "#/components/schemas/UserMessage"
  11805. },
  11806. {
  11807. "$ref": "#/components/schemas/AssistantMessage"
  11808. }
  11809. ]
  11810. },
  11811. "TextPart": {
  11812. "type": "object",
  11813. "properties": {
  11814. "id": {
  11815. "type": "string",
  11816. "pattern": "^prt"
  11817. },
  11818. "sessionID": {
  11819. "type": "string",
  11820. "pattern": "^ses"
  11821. },
  11822. "messageID": {
  11823. "type": "string",
  11824. "pattern": "^msg"
  11825. },
  11826. "type": {
  11827. "type": "string",
  11828. "enum": ["text"]
  11829. },
  11830. "text": {
  11831. "type": "string"
  11832. },
  11833. "synthetic": {
  11834. "type": "boolean"
  11835. },
  11836. "ignored": {
  11837. "type": "boolean"
  11838. },
  11839. "time": {
  11840. "type": "object",
  11841. "properties": {
  11842. "start": {
  11843. "type": "integer",
  11844. "minimum": 0
  11845. },
  11846. "end": {
  11847. "type": "integer",
  11848. "minimum": 0
  11849. }
  11850. },
  11851. "required": ["start"],
  11852. "additionalProperties": false
  11853. },
  11854. "metadata": {
  11855. "type": "object"
  11856. }
  11857. },
  11858. "required": ["id", "sessionID", "messageID", "type", "text"],
  11859. "additionalProperties": false
  11860. },
  11861. "SubtaskPart": {
  11862. "type": "object",
  11863. "properties": {
  11864. "id": {
  11865. "type": "string",
  11866. "pattern": "^prt"
  11867. },
  11868. "sessionID": {
  11869. "type": "string",
  11870. "pattern": "^ses"
  11871. },
  11872. "messageID": {
  11873. "type": "string",
  11874. "pattern": "^msg"
  11875. },
  11876. "type": {
  11877. "type": "string",
  11878. "enum": ["subtask"]
  11879. },
  11880. "prompt": {
  11881. "type": "string"
  11882. },
  11883. "description": {
  11884. "type": "string"
  11885. },
  11886. "agent": {
  11887. "type": "string"
  11888. },
  11889. "model": {
  11890. "type": "object",
  11891. "properties": {
  11892. "providerID": {
  11893. "type": "string"
  11894. },
  11895. "modelID": {
  11896. "type": "string"
  11897. }
  11898. },
  11899. "required": ["providerID", "modelID"],
  11900. "additionalProperties": false
  11901. },
  11902. "command": {
  11903. "type": "string"
  11904. }
  11905. },
  11906. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11907. "additionalProperties": false
  11908. },
  11909. "ReasoningPart": {
  11910. "type": "object",
  11911. "properties": {
  11912. "id": {
  11913. "type": "string",
  11914. "pattern": "^prt"
  11915. },
  11916. "sessionID": {
  11917. "type": "string",
  11918. "pattern": "^ses"
  11919. },
  11920. "messageID": {
  11921. "type": "string",
  11922. "pattern": "^msg"
  11923. },
  11924. "type": {
  11925. "type": "string",
  11926. "enum": ["reasoning"]
  11927. },
  11928. "text": {
  11929. "type": "string"
  11930. },
  11931. "metadata": {
  11932. "type": "object"
  11933. },
  11934. "time": {
  11935. "type": "object",
  11936. "properties": {
  11937. "start": {
  11938. "type": "integer",
  11939. "minimum": 0
  11940. },
  11941. "end": {
  11942. "type": "integer",
  11943. "minimum": 0
  11944. }
  11945. },
  11946. "required": ["start"],
  11947. "additionalProperties": false
  11948. }
  11949. },
  11950. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11951. "additionalProperties": false
  11952. },
  11953. "FilePartSourceText": {
  11954. "type": "object",
  11955. "properties": {
  11956. "value": {
  11957. "type": "string"
  11958. },
  11959. "start": {
  11960. "type": "number"
  11961. },
  11962. "end": {
  11963. "type": "number"
  11964. }
  11965. },
  11966. "required": ["value", "start", "end"],
  11967. "additionalProperties": false
  11968. },
  11969. "FileSource": {
  11970. "type": "object",
  11971. "properties": {
  11972. "text": {
  11973. "$ref": "#/components/schemas/FilePartSourceText"
  11974. },
  11975. "type": {
  11976. "type": "string",
  11977. "enum": ["file"]
  11978. },
  11979. "path": {
  11980. "type": "string"
  11981. }
  11982. },
  11983. "required": ["text", "type", "path"],
  11984. "additionalProperties": false
  11985. },
  11986. "Range": {
  11987. "type": "object",
  11988. "properties": {
  11989. "start": {
  11990. "type": "object",
  11991. "properties": {
  11992. "line": {
  11993. "type": "integer",
  11994. "minimum": 0
  11995. },
  11996. "character": {
  11997. "type": "integer",
  11998. "minimum": 0
  11999. }
  12000. },
  12001. "required": ["line", "character"],
  12002. "additionalProperties": false
  12003. },
  12004. "end": {
  12005. "type": "object",
  12006. "properties": {
  12007. "line": {
  12008. "type": "integer",
  12009. "minimum": 0
  12010. },
  12011. "character": {
  12012. "type": "integer",
  12013. "minimum": 0
  12014. }
  12015. },
  12016. "required": ["line", "character"],
  12017. "additionalProperties": false
  12018. }
  12019. },
  12020. "required": ["start", "end"],
  12021. "additionalProperties": false
  12022. },
  12023. "SymbolSource": {
  12024. "type": "object",
  12025. "properties": {
  12026. "text": {
  12027. "$ref": "#/components/schemas/FilePartSourceText"
  12028. },
  12029. "type": {
  12030. "type": "string",
  12031. "enum": ["symbol"]
  12032. },
  12033. "path": {
  12034. "type": "string"
  12035. },
  12036. "range": {
  12037. "$ref": "#/components/schemas/Range"
  12038. },
  12039. "name": {
  12040. "type": "string"
  12041. },
  12042. "kind": {
  12043. "type": "integer",
  12044. "minimum": 0
  12045. }
  12046. },
  12047. "required": ["text", "type", "path", "range", "name", "kind"],
  12048. "additionalProperties": false
  12049. },
  12050. "ResourceSource": {
  12051. "type": "object",
  12052. "properties": {
  12053. "text": {
  12054. "$ref": "#/components/schemas/FilePartSourceText"
  12055. },
  12056. "type": {
  12057. "type": "string",
  12058. "enum": ["resource"]
  12059. },
  12060. "clientName": {
  12061. "type": "string"
  12062. },
  12063. "uri": {
  12064. "type": "string"
  12065. }
  12066. },
  12067. "required": ["text", "type", "clientName", "uri"],
  12068. "additionalProperties": false
  12069. },
  12070. "FilePartSource": {
  12071. "anyOf": [
  12072. {
  12073. "$ref": "#/components/schemas/FileSource"
  12074. },
  12075. {
  12076. "$ref": "#/components/schemas/SymbolSource"
  12077. },
  12078. {
  12079. "$ref": "#/components/schemas/ResourceSource"
  12080. }
  12081. ]
  12082. },
  12083. "FilePart": {
  12084. "type": "object",
  12085. "properties": {
  12086. "id": {
  12087. "type": "string",
  12088. "pattern": "^prt"
  12089. },
  12090. "sessionID": {
  12091. "type": "string",
  12092. "pattern": "^ses"
  12093. },
  12094. "messageID": {
  12095. "type": "string",
  12096. "pattern": "^msg"
  12097. },
  12098. "type": {
  12099. "type": "string",
  12100. "enum": ["file"]
  12101. },
  12102. "mime": {
  12103. "type": "string"
  12104. },
  12105. "filename": {
  12106. "type": "string"
  12107. },
  12108. "url": {
  12109. "type": "string"
  12110. },
  12111. "source": {
  12112. "$ref": "#/components/schemas/FilePartSource"
  12113. }
  12114. },
  12115. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12116. "additionalProperties": false
  12117. },
  12118. "ToolStatePending": {
  12119. "type": "object",
  12120. "properties": {
  12121. "status": {
  12122. "type": "string",
  12123. "enum": ["pending"]
  12124. },
  12125. "input": {
  12126. "type": "object"
  12127. },
  12128. "raw": {
  12129. "type": "string"
  12130. }
  12131. },
  12132. "required": ["status", "input", "raw"],
  12133. "additionalProperties": false
  12134. },
  12135. "ToolStateRunning": {
  12136. "type": "object",
  12137. "properties": {
  12138. "status": {
  12139. "type": "string",
  12140. "enum": ["running"]
  12141. },
  12142. "input": {
  12143. "type": "object"
  12144. },
  12145. "title": {
  12146. "type": "string"
  12147. },
  12148. "metadata": {
  12149. "type": "object"
  12150. },
  12151. "time": {
  12152. "type": "object",
  12153. "properties": {
  12154. "start": {
  12155. "type": "integer",
  12156. "minimum": 0
  12157. }
  12158. },
  12159. "required": ["start"],
  12160. "additionalProperties": false
  12161. }
  12162. },
  12163. "required": ["status", "input", "time"],
  12164. "additionalProperties": false
  12165. },
  12166. "ToolStateCompleted": {
  12167. "type": "object",
  12168. "properties": {
  12169. "status": {
  12170. "type": "string",
  12171. "enum": ["completed"]
  12172. },
  12173. "input": {
  12174. "type": "object"
  12175. },
  12176. "output": {
  12177. "type": "string"
  12178. },
  12179. "title": {
  12180. "type": "string"
  12181. },
  12182. "metadata": {
  12183. "type": "object"
  12184. },
  12185. "time": {
  12186. "type": "object",
  12187. "properties": {
  12188. "start": {
  12189. "type": "integer",
  12190. "minimum": 0
  12191. },
  12192. "end": {
  12193. "type": "integer",
  12194. "minimum": 0
  12195. },
  12196. "compacted": {
  12197. "type": "integer",
  12198. "minimum": 0
  12199. }
  12200. },
  12201. "required": ["start", "end"],
  12202. "additionalProperties": false
  12203. },
  12204. "attachments": {
  12205. "type": "array",
  12206. "items": {
  12207. "$ref": "#/components/schemas/FilePart"
  12208. }
  12209. }
  12210. },
  12211. "required": ["status", "input", "output", "title", "metadata", "time"],
  12212. "additionalProperties": false
  12213. },
  12214. "ToolStateError": {
  12215. "type": "object",
  12216. "properties": {
  12217. "status": {
  12218. "type": "string",
  12219. "enum": ["error"]
  12220. },
  12221. "input": {
  12222. "type": "object"
  12223. },
  12224. "error": {
  12225. "type": "string"
  12226. },
  12227. "metadata": {
  12228. "type": "object"
  12229. },
  12230. "time": {
  12231. "type": "object",
  12232. "properties": {
  12233. "start": {
  12234. "type": "integer",
  12235. "minimum": 0
  12236. },
  12237. "end": {
  12238. "type": "integer",
  12239. "minimum": 0
  12240. }
  12241. },
  12242. "required": ["start", "end"],
  12243. "additionalProperties": false
  12244. }
  12245. },
  12246. "required": ["status", "input", "error", "time"],
  12247. "additionalProperties": false
  12248. },
  12249. "ToolState": {
  12250. "anyOf": [
  12251. {
  12252. "$ref": "#/components/schemas/ToolStatePending"
  12253. },
  12254. {
  12255. "$ref": "#/components/schemas/ToolStateRunning"
  12256. },
  12257. {
  12258. "$ref": "#/components/schemas/ToolStateCompleted"
  12259. },
  12260. {
  12261. "$ref": "#/components/schemas/ToolStateError"
  12262. }
  12263. ]
  12264. },
  12265. "ToolPart": {
  12266. "type": "object",
  12267. "properties": {
  12268. "id": {
  12269. "type": "string",
  12270. "pattern": "^prt"
  12271. },
  12272. "sessionID": {
  12273. "type": "string",
  12274. "pattern": "^ses"
  12275. },
  12276. "messageID": {
  12277. "type": "string",
  12278. "pattern": "^msg"
  12279. },
  12280. "type": {
  12281. "type": "string",
  12282. "enum": ["tool"]
  12283. },
  12284. "callID": {
  12285. "type": "string"
  12286. },
  12287. "tool": {
  12288. "type": "string"
  12289. },
  12290. "state": {
  12291. "$ref": "#/components/schemas/ToolState"
  12292. },
  12293. "metadata": {
  12294. "type": "object"
  12295. }
  12296. },
  12297. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12298. "additionalProperties": false
  12299. },
  12300. "StepStartPart": {
  12301. "type": "object",
  12302. "properties": {
  12303. "id": {
  12304. "type": "string",
  12305. "pattern": "^prt"
  12306. },
  12307. "sessionID": {
  12308. "type": "string",
  12309. "pattern": "^ses"
  12310. },
  12311. "messageID": {
  12312. "type": "string",
  12313. "pattern": "^msg"
  12314. },
  12315. "type": {
  12316. "type": "string",
  12317. "enum": ["step-start"]
  12318. },
  12319. "snapshot": {
  12320. "type": "string"
  12321. }
  12322. },
  12323. "required": ["id", "sessionID", "messageID", "type"],
  12324. "additionalProperties": false
  12325. },
  12326. "StepFinishPart": {
  12327. "type": "object",
  12328. "properties": {
  12329. "id": {
  12330. "type": "string",
  12331. "pattern": "^prt"
  12332. },
  12333. "sessionID": {
  12334. "type": "string",
  12335. "pattern": "^ses"
  12336. },
  12337. "messageID": {
  12338. "type": "string",
  12339. "pattern": "^msg"
  12340. },
  12341. "type": {
  12342. "type": "string",
  12343. "enum": ["step-finish"]
  12344. },
  12345. "reason": {
  12346. "type": "string"
  12347. },
  12348. "snapshot": {
  12349. "type": "string"
  12350. },
  12351. "cost": {
  12352. "type": "number"
  12353. },
  12354. "tokens": {
  12355. "type": "object",
  12356. "properties": {
  12357. "total": {
  12358. "type": "number"
  12359. },
  12360. "input": {
  12361. "type": "number"
  12362. },
  12363. "output": {
  12364. "type": "number"
  12365. },
  12366. "reasoning": {
  12367. "type": "number"
  12368. },
  12369. "cache": {
  12370. "type": "object",
  12371. "properties": {
  12372. "read": {
  12373. "type": "number"
  12374. },
  12375. "write": {
  12376. "type": "number"
  12377. }
  12378. },
  12379. "required": ["read", "write"],
  12380. "additionalProperties": false
  12381. }
  12382. },
  12383. "required": ["input", "output", "reasoning", "cache"],
  12384. "additionalProperties": false
  12385. }
  12386. },
  12387. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12388. "additionalProperties": false
  12389. },
  12390. "SnapshotPart": {
  12391. "type": "object",
  12392. "properties": {
  12393. "id": {
  12394. "type": "string",
  12395. "pattern": "^prt"
  12396. },
  12397. "sessionID": {
  12398. "type": "string",
  12399. "pattern": "^ses"
  12400. },
  12401. "messageID": {
  12402. "type": "string",
  12403. "pattern": "^msg"
  12404. },
  12405. "type": {
  12406. "type": "string",
  12407. "enum": ["snapshot"]
  12408. },
  12409. "snapshot": {
  12410. "type": "string"
  12411. }
  12412. },
  12413. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12414. "additionalProperties": false
  12415. },
  12416. "PatchPart": {
  12417. "type": "object",
  12418. "properties": {
  12419. "id": {
  12420. "type": "string",
  12421. "pattern": "^prt"
  12422. },
  12423. "sessionID": {
  12424. "type": "string",
  12425. "pattern": "^ses"
  12426. },
  12427. "messageID": {
  12428. "type": "string",
  12429. "pattern": "^msg"
  12430. },
  12431. "type": {
  12432. "type": "string",
  12433. "enum": ["patch"]
  12434. },
  12435. "hash": {
  12436. "type": "string"
  12437. },
  12438. "files": {
  12439. "type": "array",
  12440. "items": {
  12441. "type": "string"
  12442. }
  12443. }
  12444. },
  12445. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12446. "additionalProperties": false
  12447. },
  12448. "AgentPart": {
  12449. "type": "object",
  12450. "properties": {
  12451. "id": {
  12452. "type": "string",
  12453. "pattern": "^prt"
  12454. },
  12455. "sessionID": {
  12456. "type": "string",
  12457. "pattern": "^ses"
  12458. },
  12459. "messageID": {
  12460. "type": "string",
  12461. "pattern": "^msg"
  12462. },
  12463. "type": {
  12464. "type": "string",
  12465. "enum": ["agent"]
  12466. },
  12467. "name": {
  12468. "type": "string"
  12469. },
  12470. "source": {
  12471. "type": "object",
  12472. "properties": {
  12473. "value": {
  12474. "type": "string"
  12475. },
  12476. "start": {
  12477. "type": "integer",
  12478. "minimum": 0
  12479. },
  12480. "end": {
  12481. "type": "integer",
  12482. "minimum": 0
  12483. }
  12484. },
  12485. "required": ["value", "start", "end"],
  12486. "additionalProperties": false
  12487. }
  12488. },
  12489. "required": ["id", "sessionID", "messageID", "type", "name"],
  12490. "additionalProperties": false
  12491. },
  12492. "RetryPart": {
  12493. "type": "object",
  12494. "properties": {
  12495. "id": {
  12496. "type": "string",
  12497. "pattern": "^prt"
  12498. },
  12499. "sessionID": {
  12500. "type": "string",
  12501. "pattern": "^ses"
  12502. },
  12503. "messageID": {
  12504. "type": "string",
  12505. "pattern": "^msg"
  12506. },
  12507. "type": {
  12508. "type": "string",
  12509. "enum": ["retry"]
  12510. },
  12511. "attempt": {
  12512. "type": "integer",
  12513. "minimum": 0
  12514. },
  12515. "error": {
  12516. "$ref": "#/components/schemas/APIError"
  12517. },
  12518. "time": {
  12519. "type": "object",
  12520. "properties": {
  12521. "created": {
  12522. "type": "integer",
  12523. "minimum": 0
  12524. }
  12525. },
  12526. "required": ["created"],
  12527. "additionalProperties": false
  12528. }
  12529. },
  12530. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12531. "additionalProperties": false
  12532. },
  12533. "CompactionPart": {
  12534. "type": "object",
  12535. "properties": {
  12536. "id": {
  12537. "type": "string",
  12538. "pattern": "^prt"
  12539. },
  12540. "sessionID": {
  12541. "type": "string",
  12542. "pattern": "^ses"
  12543. },
  12544. "messageID": {
  12545. "type": "string",
  12546. "pattern": "^msg"
  12547. },
  12548. "type": {
  12549. "type": "string",
  12550. "enum": ["compaction"]
  12551. },
  12552. "auto": {
  12553. "type": "boolean"
  12554. },
  12555. "overflow": {
  12556. "type": "boolean"
  12557. },
  12558. "tail_start_id": {
  12559. "type": "string",
  12560. "pattern": "^msg"
  12561. }
  12562. },
  12563. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12564. "additionalProperties": false
  12565. },
  12566. "Part": {
  12567. "anyOf": [
  12568. {
  12569. "$ref": "#/components/schemas/TextPart"
  12570. },
  12571. {
  12572. "$ref": "#/components/schemas/SubtaskPart"
  12573. },
  12574. {
  12575. "$ref": "#/components/schemas/ReasoningPart"
  12576. },
  12577. {
  12578. "$ref": "#/components/schemas/FilePart"
  12579. },
  12580. {
  12581. "$ref": "#/components/schemas/ToolPart"
  12582. },
  12583. {
  12584. "$ref": "#/components/schemas/StepStartPart"
  12585. },
  12586. {
  12587. "$ref": "#/components/schemas/StepFinishPart"
  12588. },
  12589. {
  12590. "$ref": "#/components/schemas/SnapshotPart"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/PatchPart"
  12594. },
  12595. {
  12596. "$ref": "#/components/schemas/AgentPart"
  12597. },
  12598. {
  12599. "$ref": "#/components/schemas/RetryPart"
  12600. },
  12601. {
  12602. "$ref": "#/components/schemas/CompactionPart"
  12603. }
  12604. ]
  12605. },
  12606. "PermissionAction": {
  12607. "type": "string",
  12608. "enum": ["allow", "deny", "ask"]
  12609. },
  12610. "PermissionRule": {
  12611. "type": "object",
  12612. "properties": {
  12613. "permission": {
  12614. "type": "string"
  12615. },
  12616. "pattern": {
  12617. "type": "string"
  12618. },
  12619. "action": {
  12620. "$ref": "#/components/schemas/PermissionAction"
  12621. }
  12622. },
  12623. "required": ["permission", "pattern", "action"],
  12624. "additionalProperties": false
  12625. },
  12626. "PermissionRuleset": {
  12627. "type": "array",
  12628. "items": {
  12629. "$ref": "#/components/schemas/PermissionRule"
  12630. }
  12631. },
  12632. "Session": {
  12633. "type": "object",
  12634. "properties": {
  12635. "id": {
  12636. "type": "string",
  12637. "pattern": "^ses"
  12638. },
  12639. "slug": {
  12640. "type": "string"
  12641. },
  12642. "projectID": {
  12643. "type": "string"
  12644. },
  12645. "workspaceID": {
  12646. "type": "string",
  12647. "pattern": "^wrk"
  12648. },
  12649. "directory": {
  12650. "type": "string"
  12651. },
  12652. "path": {
  12653. "type": "string"
  12654. },
  12655. "parentID": {
  12656. "type": "string",
  12657. "pattern": "^ses"
  12658. },
  12659. "summary": {
  12660. "type": "object",
  12661. "properties": {
  12662. "additions": {
  12663. "type": "number"
  12664. },
  12665. "deletions": {
  12666. "type": "number"
  12667. },
  12668. "files": {
  12669. "type": "number"
  12670. },
  12671. "diffs": {
  12672. "type": "array",
  12673. "items": {
  12674. "$ref": "#/components/schemas/SnapshotFileDiff"
  12675. }
  12676. }
  12677. },
  12678. "required": ["additions", "deletions", "files"],
  12679. "additionalProperties": false
  12680. },
  12681. "cost": {
  12682. "type": "number"
  12683. },
  12684. "tokens": {
  12685. "type": "object",
  12686. "properties": {
  12687. "input": {
  12688. "type": "number"
  12689. },
  12690. "output": {
  12691. "type": "number"
  12692. },
  12693. "reasoning": {
  12694. "type": "number"
  12695. },
  12696. "cache": {
  12697. "type": "object",
  12698. "properties": {
  12699. "read": {
  12700. "type": "number"
  12701. },
  12702. "write": {
  12703. "type": "number"
  12704. }
  12705. },
  12706. "required": ["read", "write"],
  12707. "additionalProperties": false
  12708. }
  12709. },
  12710. "required": ["input", "output", "reasoning", "cache"],
  12711. "additionalProperties": false
  12712. },
  12713. "share": {
  12714. "type": "object",
  12715. "properties": {
  12716. "url": {
  12717. "type": "string"
  12718. }
  12719. },
  12720. "required": ["url"],
  12721. "additionalProperties": false
  12722. },
  12723. "title": {
  12724. "type": "string"
  12725. },
  12726. "agent": {
  12727. "type": "string"
  12728. },
  12729. "model": {
  12730. "type": "object",
  12731. "properties": {
  12732. "id": {
  12733. "type": "string"
  12734. },
  12735. "providerID": {
  12736. "type": "string"
  12737. },
  12738. "variant": {
  12739. "type": "string"
  12740. }
  12741. },
  12742. "required": ["id", "providerID"],
  12743. "additionalProperties": false
  12744. },
  12745. "version": {
  12746. "type": "string"
  12747. },
  12748. "time": {
  12749. "type": "object",
  12750. "properties": {
  12751. "created": {
  12752. "type": "integer",
  12753. "minimum": 0
  12754. },
  12755. "updated": {
  12756. "type": "integer",
  12757. "minimum": 0
  12758. },
  12759. "compacting": {
  12760. "type": "integer",
  12761. "minimum": 0
  12762. },
  12763. "archived": {
  12764. "type": "number"
  12765. }
  12766. },
  12767. "required": ["created", "updated"],
  12768. "additionalProperties": false
  12769. },
  12770. "permission": {
  12771. "$ref": "#/components/schemas/PermissionRuleset"
  12772. },
  12773. "revert": {
  12774. "type": "object",
  12775. "properties": {
  12776. "messageID": {
  12777. "type": "string",
  12778. "pattern": "^msg"
  12779. },
  12780. "partID": {
  12781. "type": "string",
  12782. "pattern": "^prt"
  12783. },
  12784. "snapshot": {
  12785. "type": "string"
  12786. },
  12787. "diff": {
  12788. "type": "string"
  12789. }
  12790. },
  12791. "required": ["messageID"],
  12792. "additionalProperties": false
  12793. }
  12794. },
  12795. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12796. "additionalProperties": false
  12797. },
  12798. "Prompt": {
  12799. "type": "object",
  12800. "properties": {
  12801. "text": {
  12802. "type": "string"
  12803. },
  12804. "files": {
  12805. "type": "array",
  12806. "items": {
  12807. "$ref": "#/components/schemas/PromptFileAttachment"
  12808. }
  12809. },
  12810. "agents": {
  12811. "type": "array",
  12812. "items": {
  12813. "$ref": "#/components/schemas/PromptAgentAttachment"
  12814. }
  12815. },
  12816. "references": {
  12817. "type": "array",
  12818. "items": {
  12819. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12820. }
  12821. }
  12822. },
  12823. "required": ["text"],
  12824. "additionalProperties": false
  12825. },
  12826. "GlobalEvent": {
  12827. "type": "object",
  12828. "properties": {
  12829. "directory": {
  12830. "type": "string"
  12831. },
  12832. "project": {
  12833. "type": "string"
  12834. },
  12835. "workspace": {
  12836. "type": "string"
  12837. },
  12838. "payload": {
  12839. "anyOf": [
  12840. {
  12841. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12842. },
  12843. {
  12844. "$ref": "#/components/schemas/Event.tui.command.execute"
  12845. },
  12846. {
  12847. "$ref": "#/components/schemas/Event.tui.toast.show"
  12848. },
  12849. {
  12850. "$ref": "#/components/schemas/Event.tui.session.select"
  12851. },
  12852. {
  12853. "$ref": "#/components/schemas/EventServerConnected"
  12854. },
  12855. {
  12856. "$ref": "#/components/schemas/EventGlobalDisposed"
  12857. },
  12858. {
  12859. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12860. },
  12861. {
  12862. "$ref": "#/components/schemas/EventFileEdited"
  12863. },
  12864. {
  12865. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12866. },
  12867. {
  12868. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12869. },
  12870. {
  12871. "$ref": "#/components/schemas/EventLspUpdated"
  12872. },
  12873. {
  12874. "$ref": "#/components/schemas/EventMessagePartDelta"
  12875. },
  12876. {
  12877. "$ref": "#/components/schemas/EventPermissionAsked"
  12878. },
  12879. {
  12880. "$ref": "#/components/schemas/EventPermissionReplied"
  12881. },
  12882. {
  12883. "$ref": "#/components/schemas/EventSessionDiff"
  12884. },
  12885. {
  12886. "$ref": "#/components/schemas/EventSessionError"
  12887. },
  12888. {
  12889. "$ref": "#/components/schemas/EventQuestionAsked"
  12890. },
  12891. {
  12892. "$ref": "#/components/schemas/EventQuestionReplied"
  12893. },
  12894. {
  12895. "$ref": "#/components/schemas/EventQuestionRejected"
  12896. },
  12897. {
  12898. "$ref": "#/components/schemas/EventTodoUpdated"
  12899. },
  12900. {
  12901. "$ref": "#/components/schemas/EventSessionStatus"
  12902. },
  12903. {
  12904. "$ref": "#/components/schemas/EventSessionIdle"
  12905. },
  12906. {
  12907. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12908. },
  12909. {
  12910. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12911. },
  12912. {
  12913. "$ref": "#/components/schemas/EventCommandExecuted"
  12914. },
  12915. {
  12916. "$ref": "#/components/schemas/EventProjectUpdated"
  12917. },
  12918. {
  12919. "$ref": "#/components/schemas/EventSessionCompacted"
  12920. },
  12921. {
  12922. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12923. },
  12924. {
  12925. "$ref": "#/components/schemas/EventWorkspaceReady"
  12926. },
  12927. {
  12928. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12929. },
  12930. {
  12931. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12932. },
  12933. {
  12934. "$ref": "#/components/schemas/EventWorktreeReady"
  12935. },
  12936. {
  12937. "$ref": "#/components/schemas/EventWorktreeFailed"
  12938. },
  12939. {
  12940. "$ref": "#/components/schemas/EventPtyCreated"
  12941. },
  12942. {
  12943. "$ref": "#/components/schemas/EventPtyUpdated"
  12944. },
  12945. {
  12946. "$ref": "#/components/schemas/EventPtyExited"
  12947. },
  12948. {
  12949. "$ref": "#/components/schemas/EventPtyDeleted"
  12950. },
  12951. {
  12952. "$ref": "#/components/schemas/EventInstallationUpdated"
  12953. },
  12954. {
  12955. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12956. },
  12957. {
  12958. "$ref": "#/components/schemas/EventMessageUpdated"
  12959. },
  12960. {
  12961. "$ref": "#/components/schemas/EventMessageRemoved"
  12962. },
  12963. {
  12964. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12965. },
  12966. {
  12967. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12968. },
  12969. {
  12970. "$ref": "#/components/schemas/EventSessionCreated"
  12971. },
  12972. {
  12973. "$ref": "#/components/schemas/EventSessionUpdated"
  12974. },
  12975. {
  12976. "$ref": "#/components/schemas/EventSessionDeleted"
  12977. },
  12978. {
  12979. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12980. },
  12981. {
  12982. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12983. },
  12984. {
  12985. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12986. },
  12987. {
  12988. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12989. },
  12990. {
  12991. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12992. },
  12993. {
  12994. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12995. },
  12996. {
  12997. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12998. },
  12999. {
  13000. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13001. },
  13002. {
  13003. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13004. },
  13005. {
  13006. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13007. },
  13008. {
  13009. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13010. },
  13011. {
  13012. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13013. },
  13014. {
  13015. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13016. },
  13017. {
  13018. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13019. },
  13020. {
  13021. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13022. },
  13023. {
  13024. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13025. },
  13026. {
  13027. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13028. },
  13029. {
  13030. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13031. },
  13032. {
  13033. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13034. },
  13035. {
  13036. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13037. },
  13038. {
  13039. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13040. },
  13041. {
  13042. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13043. },
  13044. {
  13045. "$ref": "#/components/schemas/EventSessionNextRetried"
  13046. },
  13047. {
  13048. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13049. },
  13050. {
  13051. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13052. },
  13053. {
  13054. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13055. },
  13056. {
  13057. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13058. },
  13059. {
  13060. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13061. },
  13062. {
  13063. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13064. },
  13065. {
  13066. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13067. },
  13068. {
  13069. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13070. },
  13071. {
  13072. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13073. },
  13074. {
  13075. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13076. },
  13077. {
  13078. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13079. },
  13080. {
  13081. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13082. },
  13083. {
  13084. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13085. },
  13086. {
  13087. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13088. },
  13089. {
  13090. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13091. },
  13092. {
  13093. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13094. },
  13095. {
  13096. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13097. },
  13098. {
  13099. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13100. },
  13101. {
  13102. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13103. },
  13104. {
  13105. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13106. },
  13107. {
  13108. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13109. },
  13110. {
  13111. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13112. },
  13113. {
  13114. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13115. },
  13116. {
  13117. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13118. },
  13119. {
  13120. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13121. },
  13122. {
  13123. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13124. },
  13125. {
  13126. "$ref": "#/components/schemas/EventSessionNextRetried"
  13127. },
  13128. {
  13129. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13130. },
  13131. {
  13132. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13133. },
  13134. {
  13135. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13136. },
  13137. {
  13138. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13139. },
  13140. {
  13141. "$ref": "#/components/schemas/EventAccountAdded"
  13142. },
  13143. {
  13144. "$ref": "#/components/schemas/EventAccountRemoved"
  13145. },
  13146. {
  13147. "$ref": "#/components/schemas/EventAccountSwitched"
  13148. },
  13149. {
  13150. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13151. },
  13152. {
  13153. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13154. },
  13155. {
  13156. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13157. },
  13158. {
  13159. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13160. },
  13161. {
  13162. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13163. },
  13164. {
  13165. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13166. },
  13167. {
  13168. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13169. },
  13170. {
  13171. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13172. },
  13173. {
  13174. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13175. },
  13176. {
  13177. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13178. },
  13179. {
  13180. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13181. },
  13182. {
  13183. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13184. },
  13185. {
  13186. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13187. },
  13188. {
  13189. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13190. },
  13191. {
  13192. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13193. },
  13194. {
  13195. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13196. },
  13197. {
  13198. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13199. },
  13200. {
  13201. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13202. },
  13203. {
  13204. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13205. },
  13206. {
  13207. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13208. },
  13209. {
  13210. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13211. },
  13212. {
  13213. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13214. },
  13215. {
  13216. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13217. },
  13218. {
  13219. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13220. },
  13221. {
  13222. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13223. },
  13224. {
  13225. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13226. },
  13227. {
  13228. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13229. },
  13230. {
  13231. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13232. },
  13233. {
  13234. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13235. },
  13236. {
  13237. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13238. },
  13239. {
  13240. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13241. },
  13242. {
  13243. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13244. },
  13245. {
  13246. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13247. }
  13248. ]
  13249. }
  13250. },
  13251. "required": ["directory", "payload"],
  13252. "additionalProperties": false
  13253. },
  13254. "LogLevel": {
  13255. "type": "string",
  13256. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13257. "description": "Log level"
  13258. },
  13259. "ServerConfig": {
  13260. "type": "object",
  13261. "properties": {
  13262. "port": {
  13263. "type": "integer",
  13264. "exclusiveMinimum": 0
  13265. },
  13266. "hostname": {
  13267. "type": "string"
  13268. },
  13269. "mdns": {
  13270. "type": "boolean"
  13271. },
  13272. "mdnsDomain": {
  13273. "type": "string"
  13274. },
  13275. "cors": {
  13276. "type": "array",
  13277. "items": {
  13278. "type": "string"
  13279. }
  13280. }
  13281. },
  13282. "additionalProperties": false,
  13283. "description": "Server configuration for opencode serve and web commands"
  13284. },
  13285. "ReferenceConfigEntry": {
  13286. "anyOf": [
  13287. {
  13288. "type": "string"
  13289. },
  13290. {
  13291. "type": "object",
  13292. "properties": {
  13293. "repository": {
  13294. "type": "string",
  13295. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13296. },
  13297. "branch": {
  13298. "type": "string"
  13299. }
  13300. },
  13301. "required": ["repository"],
  13302. "additionalProperties": false
  13303. },
  13304. {
  13305. "type": "object",
  13306. "properties": {
  13307. "path": {
  13308. "type": "string",
  13309. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13310. }
  13311. },
  13312. "required": ["path"],
  13313. "additionalProperties": false
  13314. }
  13315. ]
  13316. },
  13317. "ReferenceConfig": {
  13318. "type": "object",
  13319. "additionalProperties": {
  13320. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13321. }
  13322. },
  13323. "PermissionActionConfig": {
  13324. "type": "string",
  13325. "enum": ["ask", "allow", "deny"]
  13326. },
  13327. "PermissionObjectConfig": {
  13328. "type": "object",
  13329. "additionalProperties": {
  13330. "$ref": "#/components/schemas/PermissionActionConfig"
  13331. }
  13332. },
  13333. "PermissionRuleConfig": {
  13334. "anyOf": [
  13335. {
  13336. "$ref": "#/components/schemas/PermissionActionConfig"
  13337. },
  13338. {
  13339. "$ref": "#/components/schemas/PermissionObjectConfig"
  13340. }
  13341. ]
  13342. },
  13343. "PermissionConfig": {
  13344. "anyOf": [
  13345. {
  13346. "$ref": "#/components/schemas/PermissionActionConfig"
  13347. },
  13348. {
  13349. "type": "object",
  13350. "properties": {
  13351. "read": {
  13352. "$ref": "#/components/schemas/PermissionRuleConfig"
  13353. },
  13354. "edit": {
  13355. "$ref": "#/components/schemas/PermissionRuleConfig"
  13356. },
  13357. "glob": {
  13358. "$ref": "#/components/schemas/PermissionRuleConfig"
  13359. },
  13360. "grep": {
  13361. "$ref": "#/components/schemas/PermissionRuleConfig"
  13362. },
  13363. "list": {
  13364. "$ref": "#/components/schemas/PermissionRuleConfig"
  13365. },
  13366. "bash": {
  13367. "$ref": "#/components/schemas/PermissionRuleConfig"
  13368. },
  13369. "task": {
  13370. "$ref": "#/components/schemas/PermissionRuleConfig"
  13371. },
  13372. "external_directory": {
  13373. "$ref": "#/components/schemas/PermissionRuleConfig"
  13374. },
  13375. "todowrite": {
  13376. "$ref": "#/components/schemas/PermissionActionConfig"
  13377. },
  13378. "question": {
  13379. "$ref": "#/components/schemas/PermissionActionConfig"
  13380. },
  13381. "webfetch": {
  13382. "$ref": "#/components/schemas/PermissionActionConfig"
  13383. },
  13384. "websearch": {
  13385. "$ref": "#/components/schemas/PermissionActionConfig"
  13386. },
  13387. "repo_clone": {
  13388. "$ref": "#/components/schemas/PermissionRuleConfig"
  13389. },
  13390. "repo_overview": {
  13391. "$ref": "#/components/schemas/PermissionRuleConfig"
  13392. },
  13393. "lsp": {
  13394. "$ref": "#/components/schemas/PermissionRuleConfig"
  13395. },
  13396. "doom_loop": {
  13397. "$ref": "#/components/schemas/PermissionActionConfig"
  13398. },
  13399. "skill": {
  13400. "$ref": "#/components/schemas/PermissionRuleConfig"
  13401. }
  13402. },
  13403. "additionalProperties": {
  13404. "$ref": "#/components/schemas/PermissionRuleConfig"
  13405. }
  13406. }
  13407. ]
  13408. },
  13409. "AgentConfig": {
  13410. "type": "object",
  13411. "properties": {
  13412. "model": {
  13413. "type": "string"
  13414. },
  13415. "variant": {
  13416. "type": "string"
  13417. },
  13418. "temperature": {
  13419. "type": "number"
  13420. },
  13421. "top_p": {
  13422. "type": "number"
  13423. },
  13424. "prompt": {
  13425. "type": "string"
  13426. },
  13427. "tools": {
  13428. "type": "object",
  13429. "additionalProperties": {
  13430. "type": "boolean"
  13431. }
  13432. },
  13433. "disable": {
  13434. "type": "boolean"
  13435. },
  13436. "description": {
  13437. "type": "string"
  13438. },
  13439. "mode": {
  13440. "type": "string",
  13441. "enum": ["subagent", "primary", "all"]
  13442. },
  13443. "hidden": {
  13444. "type": "boolean"
  13445. },
  13446. "options": {
  13447. "type": "object"
  13448. },
  13449. "color": {
  13450. "anyOf": [
  13451. {
  13452. "type": "string",
  13453. "pattern": "^#[0-9a-fA-F]{6}$"
  13454. },
  13455. {
  13456. "type": "string",
  13457. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13458. }
  13459. ],
  13460. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13461. },
  13462. "steps": {
  13463. "type": "integer",
  13464. "exclusiveMinimum": 0
  13465. },
  13466. "maxSteps": {
  13467. "type": "integer",
  13468. "exclusiveMinimum": 0
  13469. },
  13470. "permission": {
  13471. "$ref": "#/components/schemas/PermissionConfig"
  13472. }
  13473. },
  13474. "additionalProperties": {}
  13475. },
  13476. "ProviderConfig": {
  13477. "type": "object",
  13478. "properties": {
  13479. "api": {
  13480. "type": "string"
  13481. },
  13482. "name": {
  13483. "type": "string"
  13484. },
  13485. "env": {
  13486. "type": "array",
  13487. "items": {
  13488. "type": "string"
  13489. }
  13490. },
  13491. "id": {
  13492. "type": "string"
  13493. },
  13494. "npm": {
  13495. "type": "string"
  13496. },
  13497. "whitelist": {
  13498. "type": "array",
  13499. "items": {
  13500. "type": "string"
  13501. }
  13502. },
  13503. "blacklist": {
  13504. "type": "array",
  13505. "items": {
  13506. "type": "string"
  13507. }
  13508. },
  13509. "options": {
  13510. "type": "object",
  13511. "properties": {
  13512. "apiKey": {
  13513. "type": "string"
  13514. },
  13515. "baseURL": {
  13516. "type": "string"
  13517. },
  13518. "enterpriseUrl": {
  13519. "type": "string"
  13520. },
  13521. "setCacheKey": {
  13522. "type": "boolean"
  13523. },
  13524. "timeout": {
  13525. "anyOf": [
  13526. {
  13527. "type": "integer",
  13528. "exclusiveMinimum": 0
  13529. },
  13530. {
  13531. "type": "boolean",
  13532. "enum": [false]
  13533. }
  13534. ],
  13535. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13536. },
  13537. "chunkTimeout": {
  13538. "type": "integer",
  13539. "exclusiveMinimum": 0
  13540. }
  13541. },
  13542. "additionalProperties": {}
  13543. },
  13544. "models": {
  13545. "type": "object",
  13546. "additionalProperties": {
  13547. "type": "object",
  13548. "properties": {
  13549. "id": {
  13550. "type": "string"
  13551. },
  13552. "name": {
  13553. "type": "string"
  13554. },
  13555. "family": {
  13556. "type": "string"
  13557. },
  13558. "release_date": {
  13559. "type": "string"
  13560. },
  13561. "attachment": {
  13562. "type": "boolean"
  13563. },
  13564. "reasoning": {
  13565. "type": "boolean"
  13566. },
  13567. "temperature": {
  13568. "type": "boolean"
  13569. },
  13570. "tool_call": {
  13571. "type": "boolean"
  13572. },
  13573. "interleaved": {
  13574. "anyOf": [
  13575. {
  13576. "type": "boolean",
  13577. "enum": [true]
  13578. },
  13579. {
  13580. "type": "object",
  13581. "properties": {
  13582. "field": {
  13583. "type": "string",
  13584. "enum": ["reasoning_content", "reasoning_details"]
  13585. }
  13586. },
  13587. "required": ["field"],
  13588. "additionalProperties": false
  13589. }
  13590. ]
  13591. },
  13592. "cost": {
  13593. "type": "object",
  13594. "properties": {
  13595. "input": {
  13596. "type": "number"
  13597. },
  13598. "output": {
  13599. "type": "number"
  13600. },
  13601. "cache_read": {
  13602. "type": "number"
  13603. },
  13604. "cache_write": {
  13605. "type": "number"
  13606. },
  13607. "context_over_200k": {
  13608. "type": "object",
  13609. "properties": {
  13610. "input": {
  13611. "type": "number"
  13612. },
  13613. "output": {
  13614. "type": "number"
  13615. },
  13616. "cache_read": {
  13617. "type": "number"
  13618. },
  13619. "cache_write": {
  13620. "type": "number"
  13621. }
  13622. },
  13623. "required": ["input", "output"],
  13624. "additionalProperties": false
  13625. }
  13626. },
  13627. "required": ["input", "output"],
  13628. "additionalProperties": false
  13629. },
  13630. "limit": {
  13631. "type": "object",
  13632. "properties": {
  13633. "context": {
  13634. "type": "number"
  13635. },
  13636. "input": {
  13637. "type": "number"
  13638. },
  13639. "output": {
  13640. "type": "number"
  13641. }
  13642. },
  13643. "required": ["context", "output"],
  13644. "additionalProperties": false
  13645. },
  13646. "modalities": {
  13647. "type": "object",
  13648. "properties": {
  13649. "input": {
  13650. "type": "array",
  13651. "items": {
  13652. "type": "string",
  13653. "enum": ["text", "audio", "image", "video", "pdf"]
  13654. }
  13655. },
  13656. "output": {
  13657. "type": "array",
  13658. "items": {
  13659. "type": "string",
  13660. "enum": ["text", "audio", "image", "video", "pdf"]
  13661. }
  13662. }
  13663. },
  13664. "required": ["input", "output"],
  13665. "additionalProperties": false
  13666. },
  13667. "experimental": {
  13668. "type": "boolean"
  13669. },
  13670. "status": {
  13671. "type": "string",
  13672. "enum": ["alpha", "beta", "deprecated", "active"]
  13673. },
  13674. "provider": {
  13675. "type": "object",
  13676. "properties": {
  13677. "npm": {
  13678. "type": "string"
  13679. },
  13680. "api": {
  13681. "type": "string"
  13682. }
  13683. },
  13684. "additionalProperties": false
  13685. },
  13686. "options": {
  13687. "type": "object"
  13688. },
  13689. "headers": {
  13690. "type": "object",
  13691. "additionalProperties": {
  13692. "type": "string"
  13693. }
  13694. },
  13695. "variants": {
  13696. "type": "object",
  13697. "additionalProperties": {
  13698. "type": "object",
  13699. "properties": {
  13700. "disabled": {
  13701. "type": "boolean"
  13702. }
  13703. },
  13704. "additionalProperties": {}
  13705. },
  13706. "description": "Variant-specific configuration"
  13707. }
  13708. },
  13709. "additionalProperties": false
  13710. }
  13711. }
  13712. },
  13713. "additionalProperties": false
  13714. },
  13715. "McpLocalConfig": {
  13716. "type": "object",
  13717. "properties": {
  13718. "type": {
  13719. "type": "string",
  13720. "enum": ["local"],
  13721. "description": "Type of MCP server connection"
  13722. },
  13723. "command": {
  13724. "type": "array",
  13725. "items": {
  13726. "type": "string"
  13727. },
  13728. "description": "Command and arguments to run the MCP server"
  13729. },
  13730. "environment": {
  13731. "type": "object",
  13732. "additionalProperties": {
  13733. "type": "string"
  13734. }
  13735. },
  13736. "enabled": {
  13737. "type": "boolean"
  13738. },
  13739. "timeout": {
  13740. "type": "integer",
  13741. "exclusiveMinimum": 0
  13742. }
  13743. },
  13744. "required": ["type", "command"],
  13745. "additionalProperties": false
  13746. },
  13747. "McpOAuthConfig": {
  13748. "type": "object",
  13749. "properties": {
  13750. "clientId": {
  13751. "type": "string"
  13752. },
  13753. "clientSecret": {
  13754. "type": "string"
  13755. },
  13756. "scope": {
  13757. "type": "string"
  13758. },
  13759. "redirectUri": {
  13760. "type": "string"
  13761. }
  13762. },
  13763. "additionalProperties": false
  13764. },
  13765. "McpRemoteConfig": {
  13766. "type": "object",
  13767. "properties": {
  13768. "type": {
  13769. "type": "string",
  13770. "enum": ["remote"],
  13771. "description": "Type of MCP server connection"
  13772. },
  13773. "url": {
  13774. "type": "string",
  13775. "description": "URL of the remote MCP server"
  13776. },
  13777. "enabled": {
  13778. "type": "boolean"
  13779. },
  13780. "headers": {
  13781. "type": "object",
  13782. "additionalProperties": {
  13783. "type": "string"
  13784. }
  13785. },
  13786. "oauth": {
  13787. "anyOf": [
  13788. {
  13789. "$ref": "#/components/schemas/McpOAuthConfig"
  13790. },
  13791. {
  13792. "type": "boolean",
  13793. "enum": [false]
  13794. }
  13795. ],
  13796. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13797. },
  13798. "timeout": {
  13799. "type": "integer",
  13800. "exclusiveMinimum": 0
  13801. }
  13802. },
  13803. "required": ["type", "url"],
  13804. "additionalProperties": false
  13805. },
  13806. "LayoutConfig": {
  13807. "type": "string",
  13808. "enum": ["auto", "stretch"],
  13809. "description": "@deprecated Always uses stretch layout."
  13810. },
  13811. "ImageAttachmentConfig": {
  13812. "type": "object",
  13813. "properties": {
  13814. "auto_resize": {
  13815. "type": "boolean"
  13816. },
  13817. "max_width": {
  13818. "type": "integer",
  13819. "exclusiveMinimum": 0
  13820. },
  13821. "max_height": {
  13822. "type": "integer",
  13823. "exclusiveMinimum": 0
  13824. },
  13825. "max_base64_bytes": {
  13826. "type": "integer",
  13827. "exclusiveMinimum": 0
  13828. }
  13829. },
  13830. "additionalProperties": false
  13831. },
  13832. "AttachmentConfig": {
  13833. "type": "object",
  13834. "properties": {
  13835. "image": {
  13836. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13837. }
  13838. },
  13839. "additionalProperties": false
  13840. },
  13841. "Config": {
  13842. "type": "object",
  13843. "properties": {
  13844. "$schema": {
  13845. "type": "string"
  13846. },
  13847. "shell": {
  13848. "type": "string"
  13849. },
  13850. "logLevel": {
  13851. "$ref": "#/components/schemas/LogLevel"
  13852. },
  13853. "server": {
  13854. "$ref": "#/components/schemas/ServerConfig"
  13855. },
  13856. "command": {
  13857. "type": "object",
  13858. "additionalProperties": {
  13859. "type": "object",
  13860. "properties": {
  13861. "template": {
  13862. "type": "string"
  13863. },
  13864. "description": {
  13865. "type": "string"
  13866. },
  13867. "agent": {
  13868. "type": "string"
  13869. },
  13870. "model": {
  13871. "type": "string"
  13872. },
  13873. "subtask": {
  13874. "type": "boolean"
  13875. }
  13876. },
  13877. "required": ["template"],
  13878. "additionalProperties": false
  13879. }
  13880. },
  13881. "skills": {
  13882. "type": "object",
  13883. "properties": {
  13884. "paths": {
  13885. "type": "array",
  13886. "items": {
  13887. "type": "string"
  13888. }
  13889. },
  13890. "urls": {
  13891. "type": "array",
  13892. "items": {
  13893. "type": "string"
  13894. }
  13895. }
  13896. },
  13897. "additionalProperties": false
  13898. },
  13899. "reference": {
  13900. "$ref": "#/components/schemas/ReferenceConfig"
  13901. },
  13902. "watcher": {
  13903. "type": "object",
  13904. "properties": {
  13905. "ignore": {
  13906. "type": "array",
  13907. "items": {
  13908. "type": "string"
  13909. }
  13910. }
  13911. },
  13912. "additionalProperties": false
  13913. },
  13914. "snapshot": {
  13915. "type": "boolean"
  13916. },
  13917. "plugin": {
  13918. "type": "array",
  13919. "items": {
  13920. "anyOf": [
  13921. {
  13922. "type": "string"
  13923. },
  13924. {
  13925. "type": "array",
  13926. "prefixItems": [
  13927. {
  13928. "type": "string"
  13929. },
  13930. {
  13931. "type": "object"
  13932. }
  13933. ],
  13934. "maxItems": 2,
  13935. "minItems": 2
  13936. }
  13937. ]
  13938. }
  13939. },
  13940. "share": {
  13941. "type": "string",
  13942. "enum": ["manual", "auto", "disabled"]
  13943. },
  13944. "autoshare": {
  13945. "type": "boolean"
  13946. },
  13947. "autoupdate": {
  13948. "anyOf": [
  13949. {
  13950. "type": "boolean"
  13951. },
  13952. {
  13953. "type": "string",
  13954. "enum": ["notify"]
  13955. }
  13956. ],
  13957. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13958. },
  13959. "disabled_providers": {
  13960. "type": "array",
  13961. "items": {
  13962. "type": "string"
  13963. }
  13964. },
  13965. "enabled_providers": {
  13966. "type": "array",
  13967. "items": {
  13968. "type": "string"
  13969. }
  13970. },
  13971. "model": {
  13972. "type": "string"
  13973. },
  13974. "small_model": {
  13975. "type": "string"
  13976. },
  13977. "default_agent": {
  13978. "type": "string"
  13979. },
  13980. "username": {
  13981. "type": "string"
  13982. },
  13983. "mode": {
  13984. "type": "object",
  13985. "properties": {
  13986. "build": {
  13987. "$ref": "#/components/schemas/AgentConfig"
  13988. },
  13989. "plan": {
  13990. "$ref": "#/components/schemas/AgentConfig"
  13991. }
  13992. },
  13993. "additionalProperties": {
  13994. "$ref": "#/components/schemas/AgentConfig"
  13995. }
  13996. },
  13997. "agent": {
  13998. "type": "object",
  13999. "properties": {
  14000. "plan": {
  14001. "$ref": "#/components/schemas/AgentConfig"
  14002. },
  14003. "build": {
  14004. "$ref": "#/components/schemas/AgentConfig"
  14005. },
  14006. "general": {
  14007. "$ref": "#/components/schemas/AgentConfig"
  14008. },
  14009. "explore": {
  14010. "$ref": "#/components/schemas/AgentConfig"
  14011. },
  14012. "scout": {
  14013. "$ref": "#/components/schemas/AgentConfig"
  14014. },
  14015. "title": {
  14016. "$ref": "#/components/schemas/AgentConfig"
  14017. },
  14018. "summary": {
  14019. "$ref": "#/components/schemas/AgentConfig"
  14020. },
  14021. "compaction": {
  14022. "$ref": "#/components/schemas/AgentConfig"
  14023. }
  14024. },
  14025. "additionalProperties": {
  14026. "$ref": "#/components/schemas/AgentConfig"
  14027. }
  14028. },
  14029. "provider": {
  14030. "type": "object",
  14031. "additionalProperties": {
  14032. "$ref": "#/components/schemas/ProviderConfig"
  14033. }
  14034. },
  14035. "mcp": {
  14036. "type": "object",
  14037. "additionalProperties": {
  14038. "anyOf": [
  14039. {
  14040. "$ref": "#/components/schemas/McpLocalConfig"
  14041. },
  14042. {
  14043. "$ref": "#/components/schemas/McpRemoteConfig"
  14044. },
  14045. {
  14046. "type": "object",
  14047. "properties": {
  14048. "enabled": {
  14049. "type": "boolean"
  14050. }
  14051. },
  14052. "required": ["enabled"],
  14053. "additionalProperties": false
  14054. }
  14055. ]
  14056. }
  14057. },
  14058. "formatter": {
  14059. "anyOf": [
  14060. {
  14061. "type": "boolean"
  14062. },
  14063. {
  14064. "type": "object",
  14065. "additionalProperties": {
  14066. "type": "object",
  14067. "properties": {
  14068. "disabled": {
  14069. "type": "boolean"
  14070. },
  14071. "command": {
  14072. "type": "array",
  14073. "items": {
  14074. "type": "string"
  14075. }
  14076. },
  14077. "environment": {
  14078. "type": "object",
  14079. "additionalProperties": {
  14080. "type": "string"
  14081. }
  14082. },
  14083. "extensions": {
  14084. "type": "array",
  14085. "items": {
  14086. "type": "string"
  14087. }
  14088. }
  14089. },
  14090. "additionalProperties": false
  14091. }
  14092. }
  14093. ],
  14094. "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."
  14095. },
  14096. "lsp": {
  14097. "anyOf": [
  14098. {
  14099. "type": "boolean"
  14100. },
  14101. {
  14102. "type": "object",
  14103. "additionalProperties": {
  14104. "anyOf": [
  14105. {
  14106. "type": "object",
  14107. "properties": {
  14108. "disabled": {
  14109. "type": "boolean",
  14110. "enum": [true]
  14111. }
  14112. },
  14113. "required": ["disabled"],
  14114. "additionalProperties": false
  14115. },
  14116. {
  14117. "type": "object",
  14118. "properties": {
  14119. "command": {
  14120. "type": "array",
  14121. "items": {
  14122. "type": "string"
  14123. }
  14124. },
  14125. "extensions": {
  14126. "type": "array",
  14127. "items": {
  14128. "type": "string"
  14129. }
  14130. },
  14131. "disabled": {
  14132. "type": "boolean"
  14133. },
  14134. "env": {
  14135. "type": "object",
  14136. "additionalProperties": {
  14137. "type": "string"
  14138. }
  14139. },
  14140. "initialization": {
  14141. "type": "object"
  14142. }
  14143. },
  14144. "required": ["command"],
  14145. "additionalProperties": false
  14146. }
  14147. ]
  14148. }
  14149. }
  14150. ],
  14151. "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."
  14152. },
  14153. "instructions": {
  14154. "type": "array",
  14155. "items": {
  14156. "type": "string"
  14157. }
  14158. },
  14159. "layout": {
  14160. "$ref": "#/components/schemas/LayoutConfig"
  14161. },
  14162. "permission": {
  14163. "$ref": "#/components/schemas/PermissionConfig"
  14164. },
  14165. "tools": {
  14166. "type": "object",
  14167. "additionalProperties": {
  14168. "type": "boolean"
  14169. }
  14170. },
  14171. "attachment": {
  14172. "$ref": "#/components/schemas/AttachmentConfig"
  14173. },
  14174. "enterprise": {
  14175. "type": "object",
  14176. "properties": {
  14177. "url": {
  14178. "type": "string"
  14179. }
  14180. },
  14181. "additionalProperties": false
  14182. },
  14183. "tool_output": {
  14184. "type": "object",
  14185. "properties": {
  14186. "max_lines": {
  14187. "type": "integer",
  14188. "exclusiveMinimum": 0
  14189. },
  14190. "max_bytes": {
  14191. "type": "integer",
  14192. "exclusiveMinimum": 0
  14193. }
  14194. },
  14195. "additionalProperties": false
  14196. },
  14197. "compaction": {
  14198. "type": "object",
  14199. "properties": {
  14200. "auto": {
  14201. "type": "boolean"
  14202. },
  14203. "prune": {
  14204. "type": "boolean"
  14205. },
  14206. "tail_turns": {
  14207. "type": "integer",
  14208. "minimum": 0
  14209. },
  14210. "preserve_recent_tokens": {
  14211. "type": "integer",
  14212. "minimum": 0
  14213. },
  14214. "reserved": {
  14215. "type": "integer",
  14216. "minimum": 0
  14217. }
  14218. },
  14219. "additionalProperties": false
  14220. },
  14221. "experimental": {
  14222. "type": "object",
  14223. "properties": {
  14224. "disable_paste_summary": {
  14225. "type": "boolean"
  14226. },
  14227. "batch_tool": {
  14228. "type": "boolean"
  14229. },
  14230. "openTelemetry": {
  14231. "type": "boolean"
  14232. },
  14233. "primary_tools": {
  14234. "type": "array",
  14235. "items": {
  14236. "type": "string"
  14237. }
  14238. },
  14239. "continue_loop_on_deny": {
  14240. "type": "boolean"
  14241. },
  14242. "mcp_timeout": {
  14243. "type": "integer",
  14244. "exclusiveMinimum": 0
  14245. }
  14246. },
  14247. "additionalProperties": false
  14248. }
  14249. },
  14250. "additionalProperties": false
  14251. },
  14252. "Model": {
  14253. "type": "object",
  14254. "properties": {
  14255. "id": {
  14256. "type": "string"
  14257. },
  14258. "providerID": {
  14259. "type": "string"
  14260. },
  14261. "api": {
  14262. "type": "object",
  14263. "properties": {
  14264. "id": {
  14265. "type": "string"
  14266. },
  14267. "url": {
  14268. "type": "string"
  14269. },
  14270. "npm": {
  14271. "type": "string"
  14272. }
  14273. },
  14274. "required": ["id", "url", "npm"],
  14275. "additionalProperties": false
  14276. },
  14277. "name": {
  14278. "type": "string"
  14279. },
  14280. "family": {
  14281. "type": "string"
  14282. },
  14283. "capabilities": {
  14284. "type": "object",
  14285. "properties": {
  14286. "temperature": {
  14287. "type": "boolean"
  14288. },
  14289. "reasoning": {
  14290. "type": "boolean"
  14291. },
  14292. "attachment": {
  14293. "type": "boolean"
  14294. },
  14295. "toolcall": {
  14296. "type": "boolean"
  14297. },
  14298. "input": {
  14299. "type": "object",
  14300. "properties": {
  14301. "text": {
  14302. "type": "boolean"
  14303. },
  14304. "audio": {
  14305. "type": "boolean"
  14306. },
  14307. "image": {
  14308. "type": "boolean"
  14309. },
  14310. "video": {
  14311. "type": "boolean"
  14312. },
  14313. "pdf": {
  14314. "type": "boolean"
  14315. }
  14316. },
  14317. "required": ["text", "audio", "image", "video", "pdf"],
  14318. "additionalProperties": false
  14319. },
  14320. "output": {
  14321. "type": "object",
  14322. "properties": {
  14323. "text": {
  14324. "type": "boolean"
  14325. },
  14326. "audio": {
  14327. "type": "boolean"
  14328. },
  14329. "image": {
  14330. "type": "boolean"
  14331. },
  14332. "video": {
  14333. "type": "boolean"
  14334. },
  14335. "pdf": {
  14336. "type": "boolean"
  14337. }
  14338. },
  14339. "required": ["text", "audio", "image", "video", "pdf"],
  14340. "additionalProperties": false
  14341. },
  14342. "interleaved": {
  14343. "anyOf": [
  14344. {
  14345. "type": "boolean"
  14346. },
  14347. {
  14348. "type": "object",
  14349. "properties": {
  14350. "field": {
  14351. "type": "string",
  14352. "enum": ["reasoning_content", "reasoning_details"]
  14353. }
  14354. },
  14355. "required": ["field"],
  14356. "additionalProperties": false
  14357. }
  14358. ]
  14359. }
  14360. },
  14361. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14362. "additionalProperties": false
  14363. },
  14364. "cost": {
  14365. "type": "object",
  14366. "properties": {
  14367. "input": {
  14368. "type": "number"
  14369. },
  14370. "output": {
  14371. "type": "number"
  14372. },
  14373. "cache": {
  14374. "type": "object",
  14375. "properties": {
  14376. "read": {
  14377. "type": "number"
  14378. },
  14379. "write": {
  14380. "type": "number"
  14381. }
  14382. },
  14383. "required": ["read", "write"],
  14384. "additionalProperties": false
  14385. },
  14386. "tiers": {
  14387. "type": "array",
  14388. "items": {
  14389. "type": "object",
  14390. "properties": {
  14391. "input": {
  14392. "type": "number"
  14393. },
  14394. "output": {
  14395. "type": "number"
  14396. },
  14397. "cache": {
  14398. "type": "object",
  14399. "properties": {
  14400. "read": {
  14401. "type": "number"
  14402. },
  14403. "write": {
  14404. "type": "number"
  14405. }
  14406. },
  14407. "required": ["read", "write"],
  14408. "additionalProperties": false
  14409. },
  14410. "tier": {
  14411. "type": "object",
  14412. "properties": {
  14413. "type": {
  14414. "type": "string",
  14415. "enum": ["context"]
  14416. },
  14417. "size": {
  14418. "type": "number"
  14419. }
  14420. },
  14421. "required": ["type", "size"],
  14422. "additionalProperties": false
  14423. }
  14424. },
  14425. "required": ["input", "output", "cache", "tier"],
  14426. "additionalProperties": false
  14427. }
  14428. },
  14429. "experimentalOver200K": {
  14430. "type": "object",
  14431. "properties": {
  14432. "input": {
  14433. "type": "number"
  14434. },
  14435. "output": {
  14436. "type": "number"
  14437. },
  14438. "cache": {
  14439. "type": "object",
  14440. "properties": {
  14441. "read": {
  14442. "type": "number"
  14443. },
  14444. "write": {
  14445. "type": "number"
  14446. }
  14447. },
  14448. "required": ["read", "write"],
  14449. "additionalProperties": false
  14450. }
  14451. },
  14452. "required": ["input", "output", "cache"],
  14453. "additionalProperties": false
  14454. }
  14455. },
  14456. "required": ["input", "output", "cache"],
  14457. "additionalProperties": false
  14458. },
  14459. "limit": {
  14460. "type": "object",
  14461. "properties": {
  14462. "context": {
  14463. "type": "number"
  14464. },
  14465. "input": {
  14466. "type": "number"
  14467. },
  14468. "output": {
  14469. "type": "number"
  14470. }
  14471. },
  14472. "required": ["context", "output"],
  14473. "additionalProperties": false
  14474. },
  14475. "status": {
  14476. "type": "string",
  14477. "enum": ["alpha", "beta", "deprecated", "active"]
  14478. },
  14479. "options": {
  14480. "type": "object"
  14481. },
  14482. "headers": {
  14483. "type": "object",
  14484. "additionalProperties": {
  14485. "type": "string"
  14486. }
  14487. },
  14488. "release_date": {
  14489. "type": "string"
  14490. },
  14491. "variants": {
  14492. "type": "object",
  14493. "additionalProperties": {
  14494. "type": "object"
  14495. }
  14496. }
  14497. },
  14498. "required": [
  14499. "id",
  14500. "providerID",
  14501. "api",
  14502. "name",
  14503. "capabilities",
  14504. "cost",
  14505. "limit",
  14506. "status",
  14507. "options",
  14508. "headers",
  14509. "release_date"
  14510. ],
  14511. "additionalProperties": false
  14512. },
  14513. "Provider": {
  14514. "type": "object",
  14515. "properties": {
  14516. "id": {
  14517. "type": "string"
  14518. },
  14519. "name": {
  14520. "type": "string"
  14521. },
  14522. "source": {
  14523. "type": "string",
  14524. "enum": ["env", "config", "custom", "api"]
  14525. },
  14526. "env": {
  14527. "type": "array",
  14528. "items": {
  14529. "type": "string"
  14530. }
  14531. },
  14532. "key": {
  14533. "type": "string"
  14534. },
  14535. "options": {
  14536. "type": "object"
  14537. },
  14538. "models": {
  14539. "type": "object",
  14540. "additionalProperties": {
  14541. "$ref": "#/components/schemas/Model"
  14542. }
  14543. }
  14544. },
  14545. "required": ["id", "name", "source", "env", "options", "models"],
  14546. "additionalProperties": false
  14547. },
  14548. "ConsoleState": {
  14549. "type": "object",
  14550. "properties": {
  14551. "consoleManagedProviders": {
  14552. "type": "array",
  14553. "items": {
  14554. "type": "string"
  14555. }
  14556. },
  14557. "activeOrgName": {
  14558. "type": "string"
  14559. },
  14560. "switchableOrgCount": {
  14561. "type": "integer",
  14562. "minimum": 0
  14563. }
  14564. },
  14565. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14566. "additionalProperties": false
  14567. },
  14568. "effect_HttpApiError_InternalServerError": {
  14569. "type": "object",
  14570. "properties": {
  14571. "_tag": {
  14572. "type": "string",
  14573. "enum": ["InternalServerError"]
  14574. }
  14575. },
  14576. "required": ["_tag"],
  14577. "additionalProperties": false
  14578. },
  14579. "ToolListItem": {
  14580. "type": "object",
  14581. "properties": {
  14582. "id": {
  14583. "type": "string"
  14584. },
  14585. "description": {
  14586. "type": "string"
  14587. },
  14588. "parameters": {}
  14589. },
  14590. "required": ["id", "description", "parameters"],
  14591. "additionalProperties": false
  14592. },
  14593. "ToolList": {
  14594. "type": "array",
  14595. "items": {
  14596. "$ref": "#/components/schemas/ToolListItem"
  14597. }
  14598. },
  14599. "ToolIDs": {
  14600. "type": "array",
  14601. "items": {
  14602. "type": "string"
  14603. }
  14604. },
  14605. "WorktreeError": {
  14606. "type": "object",
  14607. "properties": {
  14608. "name": {
  14609. "type": "string",
  14610. "enum": [
  14611. "WorktreeNotGitError",
  14612. "WorktreeNameGenerationFailedError",
  14613. "WorktreeCreateFailedError",
  14614. "WorktreeStartCommandFailedError",
  14615. "WorktreeRemoveFailedError",
  14616. "WorktreeResetFailedError",
  14617. "WorktreeListFailedError"
  14618. ]
  14619. },
  14620. "data": {
  14621. "type": "object",
  14622. "properties": {
  14623. "message": {
  14624. "type": "string"
  14625. }
  14626. },
  14627. "required": ["message"],
  14628. "additionalProperties": false
  14629. }
  14630. },
  14631. "required": ["name", "data"],
  14632. "additionalProperties": false
  14633. },
  14634. "WorktreeCreateInput": {
  14635. "type": "object",
  14636. "properties": {
  14637. "name": {
  14638. "type": "string"
  14639. },
  14640. "startCommand": {
  14641. "type": "string",
  14642. "description": "Additional startup script to run after the project's start command"
  14643. }
  14644. },
  14645. "additionalProperties": false
  14646. },
  14647. "Worktree": {
  14648. "type": "object",
  14649. "properties": {
  14650. "name": {
  14651. "type": "string"
  14652. },
  14653. "branch": {
  14654. "type": "string"
  14655. },
  14656. "directory": {
  14657. "type": "string"
  14658. }
  14659. },
  14660. "required": ["name", "directory"],
  14661. "additionalProperties": false
  14662. },
  14663. "WorktreeRemoveInput": {
  14664. "type": "object",
  14665. "properties": {
  14666. "directory": {
  14667. "type": "string"
  14668. }
  14669. },
  14670. "required": ["directory"],
  14671. "additionalProperties": false
  14672. },
  14673. "WorktreeResetInput": {
  14674. "type": "object",
  14675. "properties": {
  14676. "directory": {
  14677. "type": "string"
  14678. }
  14679. },
  14680. "required": ["directory"],
  14681. "additionalProperties": false
  14682. },
  14683. "ProjectSummary": {
  14684. "type": "object",
  14685. "properties": {
  14686. "id": {
  14687. "type": "string"
  14688. },
  14689. "name": {
  14690. "type": "string"
  14691. },
  14692. "worktree": {
  14693. "type": "string"
  14694. }
  14695. },
  14696. "required": ["id", "worktree"],
  14697. "additionalProperties": false
  14698. },
  14699. "GlobalSession": {
  14700. "type": "object",
  14701. "properties": {
  14702. "id": {
  14703. "type": "string",
  14704. "pattern": "^ses"
  14705. },
  14706. "slug": {
  14707. "type": "string"
  14708. },
  14709. "projectID": {
  14710. "type": "string"
  14711. },
  14712. "workspaceID": {
  14713. "type": "string",
  14714. "pattern": "^wrk"
  14715. },
  14716. "directory": {
  14717. "type": "string"
  14718. },
  14719. "path": {
  14720. "type": "string"
  14721. },
  14722. "parentID": {
  14723. "type": "string",
  14724. "pattern": "^ses"
  14725. },
  14726. "summary": {
  14727. "type": "object",
  14728. "properties": {
  14729. "additions": {
  14730. "type": "number"
  14731. },
  14732. "deletions": {
  14733. "type": "number"
  14734. },
  14735. "files": {
  14736. "type": "number"
  14737. },
  14738. "diffs": {
  14739. "type": "array",
  14740. "items": {
  14741. "$ref": "#/components/schemas/SnapshotFileDiff"
  14742. }
  14743. }
  14744. },
  14745. "required": ["additions", "deletions", "files"],
  14746. "additionalProperties": false
  14747. },
  14748. "cost": {
  14749. "type": "number"
  14750. },
  14751. "tokens": {
  14752. "type": "object",
  14753. "properties": {
  14754. "input": {
  14755. "type": "number"
  14756. },
  14757. "output": {
  14758. "type": "number"
  14759. },
  14760. "reasoning": {
  14761. "type": "number"
  14762. },
  14763. "cache": {
  14764. "type": "object",
  14765. "properties": {
  14766. "read": {
  14767. "type": "number"
  14768. },
  14769. "write": {
  14770. "type": "number"
  14771. }
  14772. },
  14773. "required": ["read", "write"],
  14774. "additionalProperties": false
  14775. }
  14776. },
  14777. "required": ["input", "output", "reasoning", "cache"],
  14778. "additionalProperties": false
  14779. },
  14780. "share": {
  14781. "type": "object",
  14782. "properties": {
  14783. "url": {
  14784. "type": "string"
  14785. }
  14786. },
  14787. "required": ["url"],
  14788. "additionalProperties": false
  14789. },
  14790. "title": {
  14791. "type": "string"
  14792. },
  14793. "agent": {
  14794. "type": "string"
  14795. },
  14796. "model": {
  14797. "type": "object",
  14798. "properties": {
  14799. "id": {
  14800. "type": "string"
  14801. },
  14802. "providerID": {
  14803. "type": "string"
  14804. },
  14805. "variant": {
  14806. "type": "string"
  14807. }
  14808. },
  14809. "required": ["id", "providerID"],
  14810. "additionalProperties": false
  14811. },
  14812. "version": {
  14813. "type": "string"
  14814. },
  14815. "time": {
  14816. "type": "object",
  14817. "properties": {
  14818. "created": {
  14819. "type": "integer",
  14820. "minimum": 0
  14821. },
  14822. "updated": {
  14823. "type": "integer",
  14824. "minimum": 0
  14825. },
  14826. "compacting": {
  14827. "type": "integer",
  14828. "minimum": 0
  14829. },
  14830. "archived": {
  14831. "type": "number"
  14832. }
  14833. },
  14834. "required": ["created", "updated"],
  14835. "additionalProperties": false
  14836. },
  14837. "permission": {
  14838. "$ref": "#/components/schemas/PermissionRuleset"
  14839. },
  14840. "revert": {
  14841. "type": "object",
  14842. "properties": {
  14843. "messageID": {
  14844. "type": "string",
  14845. "pattern": "^msg"
  14846. },
  14847. "partID": {
  14848. "type": "string",
  14849. "pattern": "^prt"
  14850. },
  14851. "snapshot": {
  14852. "type": "string"
  14853. },
  14854. "diff": {
  14855. "type": "string"
  14856. }
  14857. },
  14858. "required": ["messageID"],
  14859. "additionalProperties": false
  14860. },
  14861. "project": {
  14862. "anyOf": [
  14863. {
  14864. "$ref": "#/components/schemas/ProjectSummary"
  14865. },
  14866. {
  14867. "type": "null"
  14868. }
  14869. ]
  14870. }
  14871. },
  14872. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14873. "additionalProperties": false
  14874. },
  14875. "McpResource": {
  14876. "type": "object",
  14877. "properties": {
  14878. "name": {
  14879. "type": "string"
  14880. },
  14881. "uri": {
  14882. "type": "string"
  14883. },
  14884. "description": {
  14885. "type": "string"
  14886. },
  14887. "mimeType": {
  14888. "type": "string"
  14889. },
  14890. "client": {
  14891. "type": "string"
  14892. }
  14893. },
  14894. "required": ["name", "uri", "client"],
  14895. "additionalProperties": false
  14896. },
  14897. "Symbol": {
  14898. "type": "object",
  14899. "properties": {
  14900. "name": {
  14901. "type": "string"
  14902. },
  14903. "kind": {
  14904. "type": "integer",
  14905. "minimum": 0
  14906. },
  14907. "location": {
  14908. "type": "object",
  14909. "properties": {
  14910. "uri": {
  14911. "type": "string"
  14912. },
  14913. "range": {
  14914. "$ref": "#/components/schemas/Range"
  14915. }
  14916. },
  14917. "required": ["uri", "range"],
  14918. "additionalProperties": false
  14919. }
  14920. },
  14921. "required": ["name", "kind", "location"],
  14922. "additionalProperties": false
  14923. },
  14924. "FileNode": {
  14925. "type": "object",
  14926. "properties": {
  14927. "name": {
  14928. "type": "string"
  14929. },
  14930. "path": {
  14931. "type": "string"
  14932. },
  14933. "absolute": {
  14934. "type": "string"
  14935. },
  14936. "type": {
  14937. "type": "string",
  14938. "enum": ["file", "directory"]
  14939. },
  14940. "ignored": {
  14941. "type": "boolean"
  14942. }
  14943. },
  14944. "required": ["name", "path", "absolute", "type", "ignored"],
  14945. "additionalProperties": false
  14946. },
  14947. "FileContent": {
  14948. "type": "object",
  14949. "properties": {
  14950. "type": {
  14951. "type": "string",
  14952. "enum": ["text", "binary"]
  14953. },
  14954. "content": {
  14955. "type": "string"
  14956. },
  14957. "diff": {
  14958. "type": "string"
  14959. },
  14960. "patch": {
  14961. "type": "object",
  14962. "properties": {
  14963. "oldFileName": {
  14964. "type": "string"
  14965. },
  14966. "newFileName": {
  14967. "type": "string"
  14968. },
  14969. "oldHeader": {
  14970. "type": "string"
  14971. },
  14972. "newHeader": {
  14973. "type": "string"
  14974. },
  14975. "hunks": {
  14976. "type": "array",
  14977. "items": {
  14978. "type": "object",
  14979. "properties": {
  14980. "oldStart": {
  14981. "type": "integer",
  14982. "minimum": 0
  14983. },
  14984. "oldLines": {
  14985. "type": "integer",
  14986. "minimum": 0
  14987. },
  14988. "newStart": {
  14989. "type": "integer",
  14990. "minimum": 0
  14991. },
  14992. "newLines": {
  14993. "type": "integer",
  14994. "minimum": 0
  14995. },
  14996. "lines": {
  14997. "type": "array",
  14998. "items": {
  14999. "type": "string"
  15000. }
  15001. }
  15002. },
  15003. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15004. "additionalProperties": false
  15005. }
  15006. },
  15007. "index": {
  15008. "type": "string"
  15009. }
  15010. },
  15011. "required": ["oldFileName", "newFileName", "hunks"],
  15012. "additionalProperties": false
  15013. },
  15014. "encoding": {
  15015. "type": "string",
  15016. "enum": ["base64"]
  15017. },
  15018. "mimeType": {
  15019. "type": "string"
  15020. }
  15021. },
  15022. "required": ["type", "content"],
  15023. "additionalProperties": false
  15024. },
  15025. "File": {
  15026. "type": "object",
  15027. "properties": {
  15028. "path": {
  15029. "type": "string"
  15030. },
  15031. "added": {
  15032. "type": "integer",
  15033. "minimum": 0
  15034. },
  15035. "removed": {
  15036. "type": "integer",
  15037. "minimum": 0
  15038. },
  15039. "status": {
  15040. "type": "string",
  15041. "enum": ["added", "deleted", "modified"]
  15042. }
  15043. },
  15044. "required": ["path", "added", "removed", "status"],
  15045. "additionalProperties": false
  15046. },
  15047. "Path": {
  15048. "type": "object",
  15049. "properties": {
  15050. "home": {
  15051. "type": "string"
  15052. },
  15053. "state": {
  15054. "type": "string"
  15055. },
  15056. "config": {
  15057. "type": "string"
  15058. },
  15059. "worktree": {
  15060. "type": "string"
  15061. },
  15062. "directory": {
  15063. "type": "string"
  15064. }
  15065. },
  15066. "required": ["home", "state", "config", "worktree", "directory"],
  15067. "additionalProperties": false
  15068. },
  15069. "VcsInfo": {
  15070. "type": "object",
  15071. "properties": {
  15072. "branch": {
  15073. "type": "string"
  15074. },
  15075. "default_branch": {
  15076. "type": "string"
  15077. }
  15078. },
  15079. "additionalProperties": false
  15080. },
  15081. "VcsFileStatus": {
  15082. "type": "object",
  15083. "properties": {
  15084. "file": {
  15085. "type": "string"
  15086. },
  15087. "additions": {
  15088. "type": "number"
  15089. },
  15090. "deletions": {
  15091. "type": "number"
  15092. },
  15093. "status": {
  15094. "type": "string",
  15095. "enum": ["added", "deleted", "modified"]
  15096. }
  15097. },
  15098. "required": ["file", "additions", "deletions", "status"],
  15099. "additionalProperties": false
  15100. },
  15101. "VcsFileDiff": {
  15102. "type": "object",
  15103. "properties": {
  15104. "file": {
  15105. "type": "string"
  15106. },
  15107. "patch": {
  15108. "type": "string"
  15109. },
  15110. "additions": {
  15111. "type": "number"
  15112. },
  15113. "deletions": {
  15114. "type": "number"
  15115. },
  15116. "status": {
  15117. "type": "string",
  15118. "enum": ["added", "deleted", "modified"]
  15119. }
  15120. },
  15121. "required": ["file", "additions", "deletions"],
  15122. "additionalProperties": false
  15123. },
  15124. "VcsApplyError": {
  15125. "type": "object",
  15126. "properties": {
  15127. "name": {
  15128. "type": "string",
  15129. "enum": ["VcsApplyError"]
  15130. },
  15131. "data": {
  15132. "type": "object",
  15133. "properties": {
  15134. "message": {
  15135. "type": "string"
  15136. },
  15137. "reason": {
  15138. "type": "string",
  15139. "enum": ["non-git", "not-clean"]
  15140. }
  15141. },
  15142. "required": ["message", "reason"],
  15143. "additionalProperties": false
  15144. }
  15145. },
  15146. "required": ["name", "data"],
  15147. "additionalProperties": false
  15148. },
  15149. "Command": {
  15150. "type": "object",
  15151. "properties": {
  15152. "name": {
  15153. "type": "string"
  15154. },
  15155. "description": {
  15156. "type": "string"
  15157. },
  15158. "agent": {
  15159. "type": "string"
  15160. },
  15161. "model": {
  15162. "type": "string"
  15163. },
  15164. "source": {
  15165. "type": "string",
  15166. "enum": ["command", "mcp", "skill"]
  15167. },
  15168. "template": {
  15169. "type": "string"
  15170. },
  15171. "subtask": {
  15172. "type": "boolean"
  15173. },
  15174. "hints": {
  15175. "type": "array",
  15176. "items": {
  15177. "type": "string"
  15178. }
  15179. }
  15180. },
  15181. "required": ["name", "template", "hints"],
  15182. "additionalProperties": false
  15183. },
  15184. "Agent": {
  15185. "type": "object",
  15186. "properties": {
  15187. "name": {
  15188. "type": "string"
  15189. },
  15190. "description": {
  15191. "type": "string"
  15192. },
  15193. "mode": {
  15194. "type": "string",
  15195. "enum": ["subagent", "primary", "all"]
  15196. },
  15197. "native": {
  15198. "type": "boolean"
  15199. },
  15200. "hidden": {
  15201. "type": "boolean"
  15202. },
  15203. "topP": {
  15204. "type": "number"
  15205. },
  15206. "temperature": {
  15207. "type": "number"
  15208. },
  15209. "color": {
  15210. "type": "string"
  15211. },
  15212. "permission": {
  15213. "$ref": "#/components/schemas/PermissionRuleset"
  15214. },
  15215. "model": {
  15216. "type": "object",
  15217. "properties": {
  15218. "modelID": {
  15219. "type": "string"
  15220. },
  15221. "providerID": {
  15222. "type": "string"
  15223. }
  15224. },
  15225. "required": ["modelID", "providerID"],
  15226. "additionalProperties": false
  15227. },
  15228. "variant": {
  15229. "type": "string"
  15230. },
  15231. "prompt": {
  15232. "type": "string"
  15233. },
  15234. "options": {
  15235. "type": "object"
  15236. },
  15237. "steps": {
  15238. "type": "number"
  15239. }
  15240. },
  15241. "required": ["name", "mode", "permission", "options"],
  15242. "additionalProperties": false
  15243. },
  15244. "LSPStatus": {
  15245. "type": "object",
  15246. "properties": {
  15247. "id": {
  15248. "type": "string"
  15249. },
  15250. "name": {
  15251. "type": "string"
  15252. },
  15253. "root": {
  15254. "type": "string"
  15255. },
  15256. "status": {
  15257. "type": "string",
  15258. "enum": ["connected", "error"]
  15259. }
  15260. },
  15261. "required": ["id", "name", "root", "status"],
  15262. "additionalProperties": false
  15263. },
  15264. "FormatterStatus": {
  15265. "type": "object",
  15266. "properties": {
  15267. "name": {
  15268. "type": "string"
  15269. },
  15270. "extensions": {
  15271. "type": "array",
  15272. "items": {
  15273. "type": "string"
  15274. }
  15275. },
  15276. "enabled": {
  15277. "type": "boolean"
  15278. }
  15279. },
  15280. "required": ["name", "extensions", "enabled"],
  15281. "additionalProperties": false
  15282. },
  15283. "MCPStatusConnected": {
  15284. "type": "object",
  15285. "properties": {
  15286. "status": {
  15287. "type": "string",
  15288. "enum": ["connected"]
  15289. }
  15290. },
  15291. "required": ["status"],
  15292. "additionalProperties": false
  15293. },
  15294. "MCPStatusDisabled": {
  15295. "type": "object",
  15296. "properties": {
  15297. "status": {
  15298. "type": "string",
  15299. "enum": ["disabled"]
  15300. }
  15301. },
  15302. "required": ["status"],
  15303. "additionalProperties": false
  15304. },
  15305. "MCPStatusFailed": {
  15306. "type": "object",
  15307. "properties": {
  15308. "status": {
  15309. "type": "string",
  15310. "enum": ["failed"]
  15311. },
  15312. "error": {
  15313. "type": "string"
  15314. }
  15315. },
  15316. "required": ["status", "error"],
  15317. "additionalProperties": false
  15318. },
  15319. "MCPStatusNeedsAuth": {
  15320. "type": "object",
  15321. "properties": {
  15322. "status": {
  15323. "type": "string",
  15324. "enum": ["needs_auth"]
  15325. }
  15326. },
  15327. "required": ["status"],
  15328. "additionalProperties": false
  15329. },
  15330. "MCPStatusNeedsClientRegistration": {
  15331. "type": "object",
  15332. "properties": {
  15333. "status": {
  15334. "type": "string",
  15335. "enum": ["needs_client_registration"]
  15336. },
  15337. "error": {
  15338. "type": "string"
  15339. }
  15340. },
  15341. "required": ["status", "error"],
  15342. "additionalProperties": false
  15343. },
  15344. "MCPStatus": {
  15345. "anyOf": [
  15346. {
  15347. "$ref": "#/components/schemas/MCPStatusConnected"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/MCPStatusDisabled"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/MCPStatusFailed"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15360. }
  15361. ]
  15362. },
  15363. "McpUnsupportedOAuthError": {
  15364. "type": "object",
  15365. "properties": {
  15366. "error": {
  15367. "type": "string"
  15368. }
  15369. },
  15370. "required": ["error"],
  15371. "additionalProperties": false
  15372. },
  15373. "NotFoundError": {
  15374. "type": "object",
  15375. "required": ["name", "data"],
  15376. "properties": {
  15377. "name": {
  15378. "type": "string",
  15379. "enum": ["NotFoundError"]
  15380. },
  15381. "data": {
  15382. "type": "object",
  15383. "required": ["message"],
  15384. "properties": {
  15385. "message": {
  15386. "type": "string"
  15387. }
  15388. }
  15389. }
  15390. }
  15391. },
  15392. "effect_HttpApiError_Forbidden": {
  15393. "type": "object",
  15394. "properties": {
  15395. "_tag": {
  15396. "type": "string",
  15397. "enum": ["Forbidden"]
  15398. }
  15399. },
  15400. "required": ["_tag"],
  15401. "additionalProperties": false
  15402. },
  15403. "ProviderAuthMethod": {
  15404. "type": "object",
  15405. "properties": {
  15406. "type": {
  15407. "type": "string",
  15408. "enum": ["oauth", "api"]
  15409. },
  15410. "label": {
  15411. "type": "string"
  15412. },
  15413. "prompts": {
  15414. "type": "array",
  15415. "items": {
  15416. "anyOf": [
  15417. {
  15418. "type": "object",
  15419. "properties": {
  15420. "type": {
  15421. "type": "string",
  15422. "enum": ["text"]
  15423. },
  15424. "key": {
  15425. "type": "string"
  15426. },
  15427. "message": {
  15428. "type": "string"
  15429. },
  15430. "placeholder": {
  15431. "type": "string"
  15432. },
  15433. "when": {
  15434. "type": "object",
  15435. "properties": {
  15436. "key": {
  15437. "type": "string"
  15438. },
  15439. "op": {
  15440. "type": "string",
  15441. "enum": ["eq", "neq"]
  15442. },
  15443. "value": {
  15444. "type": "string"
  15445. }
  15446. },
  15447. "required": ["key", "op", "value"],
  15448. "additionalProperties": false
  15449. }
  15450. },
  15451. "required": ["type", "key", "message"],
  15452. "additionalProperties": false
  15453. },
  15454. {
  15455. "type": "object",
  15456. "properties": {
  15457. "type": {
  15458. "type": "string",
  15459. "enum": ["select"]
  15460. },
  15461. "key": {
  15462. "type": "string"
  15463. },
  15464. "message": {
  15465. "type": "string"
  15466. },
  15467. "options": {
  15468. "type": "array",
  15469. "items": {
  15470. "type": "object",
  15471. "properties": {
  15472. "label": {
  15473. "type": "string"
  15474. },
  15475. "value": {
  15476. "type": "string"
  15477. },
  15478. "hint": {
  15479. "type": "string"
  15480. }
  15481. },
  15482. "required": ["label", "value"],
  15483. "additionalProperties": false
  15484. }
  15485. },
  15486. "when": {
  15487. "type": "object",
  15488. "properties": {
  15489. "key": {
  15490. "type": "string"
  15491. },
  15492. "op": {
  15493. "type": "string",
  15494. "enum": ["eq", "neq"]
  15495. },
  15496. "value": {
  15497. "type": "string"
  15498. }
  15499. },
  15500. "required": ["key", "op", "value"],
  15501. "additionalProperties": false
  15502. }
  15503. },
  15504. "required": ["type", "key", "message", "options"],
  15505. "additionalProperties": false
  15506. }
  15507. ]
  15508. }
  15509. }
  15510. },
  15511. "required": ["type", "label"],
  15512. "additionalProperties": false
  15513. },
  15514. "ProviderAuthAuthorization": {
  15515. "type": "object",
  15516. "properties": {
  15517. "url": {
  15518. "type": "string"
  15519. },
  15520. "method": {
  15521. "type": "string",
  15522. "enum": ["auto", "code"]
  15523. },
  15524. "instructions": {
  15525. "type": "string"
  15526. }
  15527. },
  15528. "required": ["url", "method", "instructions"],
  15529. "additionalProperties": false
  15530. },
  15531. "ProviderAuthError1": {
  15532. "type": "object",
  15533. "properties": {
  15534. "name": {
  15535. "type": "string",
  15536. "enum": [
  15537. "BadRequest",
  15538. "ProviderAuthOauthMissing",
  15539. "ProviderAuthOauthCodeMissing",
  15540. "ProviderAuthOauthCallbackFailed",
  15541. "ProviderAuthValidationFailed"
  15542. ]
  15543. },
  15544. "data": {
  15545. "type": "object",
  15546. "properties": {
  15547. "providerID": {
  15548. "type": "string"
  15549. },
  15550. "field": {
  15551. "type": "string"
  15552. },
  15553. "message": {
  15554. "type": "string"
  15555. },
  15556. "kind": {
  15557. "type": "string"
  15558. }
  15559. },
  15560. "additionalProperties": false
  15561. }
  15562. },
  15563. "required": ["name", "data"],
  15564. "additionalProperties": false
  15565. },
  15566. "TextPartInput": {
  15567. "type": "object",
  15568. "properties": {
  15569. "id": {
  15570. "type": "string",
  15571. "pattern": "^prt"
  15572. },
  15573. "type": {
  15574. "type": "string",
  15575. "enum": ["text"]
  15576. },
  15577. "text": {
  15578. "type": "string"
  15579. },
  15580. "synthetic": {
  15581. "type": "boolean"
  15582. },
  15583. "ignored": {
  15584. "type": "boolean"
  15585. },
  15586. "time": {
  15587. "type": "object",
  15588. "properties": {
  15589. "start": {
  15590. "type": "integer",
  15591. "minimum": 0
  15592. },
  15593. "end": {
  15594. "type": "integer",
  15595. "minimum": 0
  15596. }
  15597. },
  15598. "required": ["start"],
  15599. "additionalProperties": false
  15600. },
  15601. "metadata": {
  15602. "type": "object"
  15603. }
  15604. },
  15605. "required": ["type", "text"],
  15606. "additionalProperties": false
  15607. },
  15608. "FilePartInput": {
  15609. "type": "object",
  15610. "properties": {
  15611. "id": {
  15612. "type": "string",
  15613. "pattern": "^prt"
  15614. },
  15615. "type": {
  15616. "type": "string",
  15617. "enum": ["file"]
  15618. },
  15619. "mime": {
  15620. "type": "string"
  15621. },
  15622. "filename": {
  15623. "type": "string"
  15624. },
  15625. "url": {
  15626. "type": "string"
  15627. },
  15628. "source": {
  15629. "$ref": "#/components/schemas/FilePartSource"
  15630. }
  15631. },
  15632. "required": ["type", "mime", "url"],
  15633. "additionalProperties": false
  15634. },
  15635. "AgentPartInput": {
  15636. "type": "object",
  15637. "properties": {
  15638. "id": {
  15639. "type": "string",
  15640. "pattern": "^prt"
  15641. },
  15642. "type": {
  15643. "type": "string",
  15644. "enum": ["agent"]
  15645. },
  15646. "name": {
  15647. "type": "string"
  15648. },
  15649. "source": {
  15650. "type": "object",
  15651. "properties": {
  15652. "value": {
  15653. "type": "string"
  15654. },
  15655. "start": {
  15656. "type": "integer",
  15657. "minimum": 0
  15658. },
  15659. "end": {
  15660. "type": "integer",
  15661. "minimum": 0
  15662. }
  15663. },
  15664. "required": ["value", "start", "end"],
  15665. "additionalProperties": false
  15666. }
  15667. },
  15668. "required": ["type", "name"],
  15669. "additionalProperties": false
  15670. },
  15671. "SubtaskPartInput": {
  15672. "type": "object",
  15673. "properties": {
  15674. "id": {
  15675. "type": "string",
  15676. "pattern": "^prt"
  15677. },
  15678. "type": {
  15679. "type": "string",
  15680. "enum": ["subtask"]
  15681. },
  15682. "prompt": {
  15683. "type": "string"
  15684. },
  15685. "description": {
  15686. "type": "string"
  15687. },
  15688. "agent": {
  15689. "type": "string"
  15690. },
  15691. "model": {
  15692. "type": "object",
  15693. "properties": {
  15694. "providerID": {
  15695. "type": "string"
  15696. },
  15697. "modelID": {
  15698. "type": "string"
  15699. }
  15700. },
  15701. "required": ["providerID", "modelID"],
  15702. "additionalProperties": false
  15703. },
  15704. "command": {
  15705. "type": "string"
  15706. }
  15707. },
  15708. "required": ["type", "prompt", "description", "agent"],
  15709. "additionalProperties": false
  15710. },
  15711. "SessionBusyError": {
  15712. "type": "object",
  15713. "properties": {
  15714. "_tag": {
  15715. "type": "string",
  15716. "enum": ["SessionBusyError"]
  15717. },
  15718. "sessionID": {
  15719. "type": "string"
  15720. },
  15721. "message": {
  15722. "type": "string"
  15723. }
  15724. },
  15725. "required": ["_tag", "sessionID", "message"],
  15726. "additionalProperties": false
  15727. },
  15728. "V2SessionsResponse": {
  15729. "type": "object",
  15730. "properties": {
  15731. "items": {
  15732. "type": "array",
  15733. "items": {
  15734. "$ref": "#/components/schemas/SessionInfo"
  15735. }
  15736. },
  15737. "cursor": {
  15738. "type": "object",
  15739. "properties": {
  15740. "previous": {
  15741. "type": "string"
  15742. },
  15743. "next": {
  15744. "type": "string"
  15745. }
  15746. },
  15747. "additionalProperties": false
  15748. }
  15749. },
  15750. "required": ["items", "cursor"],
  15751. "additionalProperties": false
  15752. },
  15753. "InvalidCursorError": {
  15754. "type": "object",
  15755. "properties": {
  15756. "_tag": {
  15757. "type": "string",
  15758. "enum": ["InvalidCursorError"]
  15759. },
  15760. "message": {
  15761. "type": "string"
  15762. }
  15763. },
  15764. "required": ["_tag", "message"],
  15765. "additionalProperties": false
  15766. },
  15767. "UnauthorizedError": {
  15768. "type": "object",
  15769. "properties": {
  15770. "_tag": {
  15771. "type": "string",
  15772. "enum": ["UnauthorizedError"]
  15773. },
  15774. "message": {
  15775. "type": "string"
  15776. }
  15777. },
  15778. "required": ["_tag", "message"],
  15779. "additionalProperties": false
  15780. },
  15781. "SessionNotFoundError": {
  15782. "type": "object",
  15783. "properties": {
  15784. "_tag": {
  15785. "type": "string",
  15786. "enum": ["SessionNotFoundError"]
  15787. },
  15788. "sessionID": {
  15789. "type": "string"
  15790. },
  15791. "message": {
  15792. "type": "string"
  15793. }
  15794. },
  15795. "required": ["_tag", "sessionID", "message"],
  15796. "additionalProperties": false
  15797. },
  15798. "ServiceUnavailableError": {
  15799. "type": "object",
  15800. "properties": {
  15801. "_tag": {
  15802. "type": "string",
  15803. "enum": ["ServiceUnavailableError"]
  15804. },
  15805. "message": {
  15806. "type": "string"
  15807. },
  15808. "service": {
  15809. "type": "string"
  15810. }
  15811. },
  15812. "required": ["_tag", "message"],
  15813. "additionalProperties": false
  15814. },
  15815. "UnknownError1": {
  15816. "type": "object",
  15817. "properties": {
  15818. "_tag": {
  15819. "type": "string",
  15820. "enum": ["UnknownError"]
  15821. },
  15822. "message": {
  15823. "type": "string"
  15824. },
  15825. "ref": {
  15826. "type": "string"
  15827. }
  15828. },
  15829. "required": ["_tag", "message"],
  15830. "additionalProperties": false
  15831. },
  15832. "V2SessionMessagesResponse": {
  15833. "type": "object",
  15834. "properties": {
  15835. "items": {
  15836. "type": "array",
  15837. "items": {
  15838. "$ref": "#/components/schemas/SessionMessage"
  15839. }
  15840. },
  15841. "cursor": {
  15842. "type": "object",
  15843. "properties": {
  15844. "previous": {
  15845. "type": "string"
  15846. },
  15847. "next": {
  15848. "type": "string"
  15849. }
  15850. },
  15851. "additionalProperties": false
  15852. }
  15853. },
  15854. "required": ["items", "cursor"],
  15855. "additionalProperties": false
  15856. },
  15857. "ProviderNotFoundError": {
  15858. "type": "object",
  15859. "properties": {
  15860. "_tag": {
  15861. "type": "string",
  15862. "enum": ["ProviderNotFoundError"]
  15863. },
  15864. "providerID": {
  15865. "type": "string"
  15866. },
  15867. "message": {
  15868. "type": "string"
  15869. }
  15870. },
  15871. "required": ["_tag", "providerID", "message"],
  15872. "additionalProperties": false
  15873. },
  15874. "EventTuiPromptAppend": {
  15875. "type": "object",
  15876. "properties": {
  15877. "type": {
  15878. "type": "string",
  15879. "enum": ["tui.prompt.append"]
  15880. },
  15881. "properties": {
  15882. "type": "object",
  15883. "properties": {
  15884. "text": {
  15885. "type": "string"
  15886. }
  15887. },
  15888. "required": ["text"],
  15889. "additionalProperties": false
  15890. }
  15891. },
  15892. "required": ["type", "properties"],
  15893. "additionalProperties": false
  15894. },
  15895. "EventTuiCommandExecute": {
  15896. "type": "object",
  15897. "properties": {
  15898. "type": {
  15899. "type": "string",
  15900. "enum": ["tui.command.execute"]
  15901. },
  15902. "properties": {
  15903. "type": "object",
  15904. "properties": {
  15905. "command": {
  15906. "anyOf": [
  15907. {
  15908. "type": "string",
  15909. "enum": [
  15910. "session.list",
  15911. "session.new",
  15912. "session.share",
  15913. "session.interrupt",
  15914. "session.compact",
  15915. "session.page.up",
  15916. "session.page.down",
  15917. "session.line.up",
  15918. "session.line.down",
  15919. "session.half.page.up",
  15920. "session.half.page.down",
  15921. "session.first",
  15922. "session.last",
  15923. "prompt.clear",
  15924. "prompt.submit",
  15925. "agent.cycle"
  15926. ]
  15927. },
  15928. {
  15929. "type": "string"
  15930. }
  15931. ]
  15932. }
  15933. },
  15934. "required": ["command"],
  15935. "additionalProperties": false
  15936. }
  15937. },
  15938. "required": ["type", "properties"],
  15939. "additionalProperties": false
  15940. },
  15941. "EventTuiToastShow": {
  15942. "type": "object",
  15943. "properties": {
  15944. "type": {
  15945. "type": "string",
  15946. "enum": ["tui.toast.show"]
  15947. },
  15948. "properties": {
  15949. "type": "object",
  15950. "properties": {
  15951. "title": {
  15952. "type": "string"
  15953. },
  15954. "message": {
  15955. "type": "string"
  15956. },
  15957. "variant": {
  15958. "type": "string",
  15959. "enum": ["info", "success", "warning", "error"]
  15960. },
  15961. "duration": {
  15962. "type": "integer",
  15963. "exclusiveMinimum": 0
  15964. }
  15965. },
  15966. "required": ["message", "variant"],
  15967. "additionalProperties": false
  15968. }
  15969. },
  15970. "required": ["type", "properties"],
  15971. "additionalProperties": false
  15972. },
  15973. "EventTuiSessionSelect": {
  15974. "type": "object",
  15975. "properties": {
  15976. "type": {
  15977. "type": "string",
  15978. "enum": ["tui.session.select"]
  15979. },
  15980. "properties": {
  15981. "type": "object",
  15982. "properties": {
  15983. "sessionID": {
  15984. "type": "string",
  15985. "pattern": "^ses",
  15986. "description": "Session ID to navigate to"
  15987. }
  15988. },
  15989. "required": ["sessionID"],
  15990. "additionalProperties": false
  15991. }
  15992. },
  15993. "required": ["type", "properties"],
  15994. "additionalProperties": false
  15995. },
  15996. "Workspace": {
  15997. "type": "object",
  15998. "properties": {
  15999. "id": {
  16000. "type": "string",
  16001. "pattern": "^wrk"
  16002. },
  16003. "type": {
  16004. "type": "string"
  16005. },
  16006. "name": {
  16007. "type": "string"
  16008. },
  16009. "branch": {
  16010. "anyOf": [
  16011. {
  16012. "type": "string"
  16013. },
  16014. {
  16015. "type": "null"
  16016. }
  16017. ]
  16018. },
  16019. "directory": {
  16020. "anyOf": [
  16021. {
  16022. "type": "string"
  16023. },
  16024. {
  16025. "type": "null"
  16026. }
  16027. ]
  16028. },
  16029. "extra": {
  16030. "anyOf": [
  16031. {},
  16032. {
  16033. "type": "null"
  16034. }
  16035. ]
  16036. },
  16037. "projectID": {
  16038. "type": "string"
  16039. },
  16040. "timeUsed": {
  16041. "anyOf": [
  16042. {
  16043. "type": "number"
  16044. },
  16045. {
  16046. "type": "string",
  16047. "enum": ["NaN"]
  16048. },
  16049. {
  16050. "type": "string",
  16051. "enum": ["Infinity"]
  16052. },
  16053. {
  16054. "type": "string",
  16055. "enum": ["-Infinity"]
  16056. },
  16057. {
  16058. "type": "string",
  16059. "enum": ["Infinity", "-Infinity", "NaN"]
  16060. }
  16061. ]
  16062. }
  16063. },
  16064. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16065. "additionalProperties": false
  16066. },
  16067. "WorkspaceWarpError": {
  16068. "type": "object",
  16069. "properties": {
  16070. "name": {
  16071. "type": "string",
  16072. "enum": ["WorkspaceWarpError"]
  16073. },
  16074. "data": {
  16075. "type": "object",
  16076. "properties": {
  16077. "message": {
  16078. "type": "string"
  16079. }
  16080. },
  16081. "required": ["message"],
  16082. "additionalProperties": false
  16083. }
  16084. },
  16085. "required": ["name", "data"],
  16086. "additionalProperties": false
  16087. },
  16088. "SyncEventMessageUpdated": {
  16089. "type": "object",
  16090. "properties": {
  16091. "type": {
  16092. "type": "string",
  16093. "enum": ["sync"]
  16094. },
  16095. "name": {
  16096. "type": "string",
  16097. "enum": ["message.updated.1"]
  16098. },
  16099. "id": {
  16100. "type": "string"
  16101. },
  16102. "seq": {
  16103. "type": "number"
  16104. },
  16105. "aggregateID": {
  16106. "type": "string",
  16107. "enum": ["sessionID"]
  16108. },
  16109. "data": {
  16110. "type": "object",
  16111. "properties": {
  16112. "sessionID": {
  16113. "type": "string",
  16114. "pattern": "^ses"
  16115. },
  16116. "info": {
  16117. "$ref": "#/components/schemas/Message"
  16118. }
  16119. },
  16120. "required": ["sessionID", "info"],
  16121. "additionalProperties": false
  16122. }
  16123. },
  16124. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16125. "additionalProperties": false
  16126. },
  16127. "SyncEventMessageRemoved": {
  16128. "type": "object",
  16129. "properties": {
  16130. "type": {
  16131. "type": "string",
  16132. "enum": ["sync"]
  16133. },
  16134. "name": {
  16135. "type": "string",
  16136. "enum": ["message.removed.1"]
  16137. },
  16138. "id": {
  16139. "type": "string"
  16140. },
  16141. "seq": {
  16142. "type": "number"
  16143. },
  16144. "aggregateID": {
  16145. "type": "string",
  16146. "enum": ["sessionID"]
  16147. },
  16148. "data": {
  16149. "type": "object",
  16150. "properties": {
  16151. "sessionID": {
  16152. "type": "string",
  16153. "pattern": "^ses"
  16154. },
  16155. "messageID": {
  16156. "type": "string",
  16157. "pattern": "^msg"
  16158. }
  16159. },
  16160. "required": ["sessionID", "messageID"],
  16161. "additionalProperties": false
  16162. }
  16163. },
  16164. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16165. "additionalProperties": false
  16166. },
  16167. "SyncEventMessagePartUpdated": {
  16168. "type": "object",
  16169. "properties": {
  16170. "type": {
  16171. "type": "string",
  16172. "enum": ["sync"]
  16173. },
  16174. "name": {
  16175. "type": "string",
  16176. "enum": ["message.part.updated.1"]
  16177. },
  16178. "id": {
  16179. "type": "string"
  16180. },
  16181. "seq": {
  16182. "type": "number"
  16183. },
  16184. "aggregateID": {
  16185. "type": "string",
  16186. "enum": ["sessionID"]
  16187. },
  16188. "data": {
  16189. "type": "object",
  16190. "properties": {
  16191. "sessionID": {
  16192. "type": "string",
  16193. "pattern": "^ses"
  16194. },
  16195. "part": {
  16196. "$ref": "#/components/schemas/Part"
  16197. },
  16198. "time": {
  16199. "type": "integer",
  16200. "minimum": 0
  16201. }
  16202. },
  16203. "required": ["sessionID", "part", "time"],
  16204. "additionalProperties": false
  16205. }
  16206. },
  16207. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16208. "additionalProperties": false
  16209. },
  16210. "SyncEventMessagePartRemoved": {
  16211. "type": "object",
  16212. "properties": {
  16213. "type": {
  16214. "type": "string",
  16215. "enum": ["sync"]
  16216. },
  16217. "name": {
  16218. "type": "string",
  16219. "enum": ["message.part.removed.1"]
  16220. },
  16221. "id": {
  16222. "type": "string"
  16223. },
  16224. "seq": {
  16225. "type": "number"
  16226. },
  16227. "aggregateID": {
  16228. "type": "string",
  16229. "enum": ["sessionID"]
  16230. },
  16231. "data": {
  16232. "type": "object",
  16233. "properties": {
  16234. "sessionID": {
  16235. "type": "string",
  16236. "pattern": "^ses"
  16237. },
  16238. "messageID": {
  16239. "type": "string",
  16240. "pattern": "^msg"
  16241. },
  16242. "partID": {
  16243. "type": "string",
  16244. "pattern": "^prt"
  16245. }
  16246. },
  16247. "required": ["sessionID", "messageID", "partID"],
  16248. "additionalProperties": false
  16249. }
  16250. },
  16251. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16252. "additionalProperties": false
  16253. },
  16254. "SyncEventSessionCreated": {
  16255. "type": "object",
  16256. "properties": {
  16257. "type": {
  16258. "type": "string",
  16259. "enum": ["sync"]
  16260. },
  16261. "name": {
  16262. "type": "string",
  16263. "enum": ["session.created.1"]
  16264. },
  16265. "id": {
  16266. "type": "string"
  16267. },
  16268. "seq": {
  16269. "type": "number"
  16270. },
  16271. "aggregateID": {
  16272. "type": "string",
  16273. "enum": ["sessionID"]
  16274. },
  16275. "data": {
  16276. "type": "object",
  16277. "properties": {
  16278. "sessionID": {
  16279. "type": "string",
  16280. "pattern": "^ses"
  16281. },
  16282. "info": {
  16283. "$ref": "#/components/schemas/Session"
  16284. }
  16285. },
  16286. "required": ["sessionID", "info"],
  16287. "additionalProperties": false
  16288. }
  16289. },
  16290. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16291. "additionalProperties": false
  16292. },
  16293. "SyncEventSessionUpdated": {
  16294. "type": "object",
  16295. "properties": {
  16296. "type": {
  16297. "type": "string",
  16298. "enum": ["sync"]
  16299. },
  16300. "name": {
  16301. "type": "string",
  16302. "enum": ["session.updated.1"]
  16303. },
  16304. "id": {
  16305. "type": "string"
  16306. },
  16307. "seq": {
  16308. "type": "number"
  16309. },
  16310. "aggregateID": {
  16311. "type": "string",
  16312. "enum": ["sessionID"]
  16313. },
  16314. "data": {
  16315. "type": "object",
  16316. "properties": {
  16317. "sessionID": {
  16318. "type": "string",
  16319. "pattern": "^ses"
  16320. },
  16321. "info": {
  16322. "type": "object",
  16323. "properties": {
  16324. "id": {
  16325. "anyOf": [
  16326. {
  16327. "type": "string",
  16328. "pattern": "^ses"
  16329. },
  16330. {
  16331. "type": "null"
  16332. }
  16333. ]
  16334. },
  16335. "slug": {
  16336. "anyOf": [
  16337. {
  16338. "type": "string"
  16339. },
  16340. {
  16341. "type": "null"
  16342. }
  16343. ]
  16344. },
  16345. "projectID": {
  16346. "anyOf": [
  16347. {
  16348. "type": "string"
  16349. },
  16350. {
  16351. "type": "null"
  16352. }
  16353. ]
  16354. },
  16355. "workspaceID": {
  16356. "anyOf": [
  16357. {
  16358. "type": "string",
  16359. "pattern": "^wrk"
  16360. },
  16361. {
  16362. "type": "null"
  16363. }
  16364. ]
  16365. },
  16366. "directory": {
  16367. "anyOf": [
  16368. {
  16369. "type": "string"
  16370. },
  16371. {
  16372. "type": "null"
  16373. }
  16374. ]
  16375. },
  16376. "path": {
  16377. "anyOf": [
  16378. {
  16379. "type": "string"
  16380. },
  16381. {
  16382. "type": "null"
  16383. }
  16384. ]
  16385. },
  16386. "parentID": {
  16387. "anyOf": [
  16388. {
  16389. "type": "string",
  16390. "pattern": "^ses"
  16391. },
  16392. {
  16393. "type": "null"
  16394. }
  16395. ]
  16396. },
  16397. "summary": {
  16398. "anyOf": [
  16399. {
  16400. "type": "object",
  16401. "properties": {
  16402. "additions": {
  16403. "type": "number"
  16404. },
  16405. "deletions": {
  16406. "type": "number"
  16407. },
  16408. "files": {
  16409. "type": "number"
  16410. },
  16411. "diffs": {
  16412. "type": "array",
  16413. "items": {
  16414. "$ref": "#/components/schemas/SnapshotFileDiff"
  16415. }
  16416. }
  16417. },
  16418. "required": ["additions", "deletions", "files"],
  16419. "additionalProperties": false
  16420. },
  16421. {
  16422. "type": "null"
  16423. }
  16424. ]
  16425. },
  16426. "cost": {
  16427. "anyOf": [
  16428. {
  16429. "type": "number"
  16430. },
  16431. {
  16432. "type": "null"
  16433. }
  16434. ]
  16435. },
  16436. "tokens": {
  16437. "anyOf": [
  16438. {
  16439. "type": "object",
  16440. "properties": {
  16441. "input": {
  16442. "type": "number"
  16443. },
  16444. "output": {
  16445. "type": "number"
  16446. },
  16447. "reasoning": {
  16448. "type": "number"
  16449. },
  16450. "cache": {
  16451. "type": "object",
  16452. "properties": {
  16453. "read": {
  16454. "type": "number"
  16455. },
  16456. "write": {
  16457. "type": "number"
  16458. }
  16459. },
  16460. "required": ["read", "write"],
  16461. "additionalProperties": false
  16462. }
  16463. },
  16464. "required": ["input", "output", "reasoning", "cache"],
  16465. "additionalProperties": false
  16466. },
  16467. {
  16468. "type": "null"
  16469. }
  16470. ]
  16471. },
  16472. "share": {
  16473. "type": "object",
  16474. "properties": {
  16475. "url": {
  16476. "anyOf": [
  16477. {
  16478. "type": "string"
  16479. },
  16480. {
  16481. "type": "null"
  16482. }
  16483. ]
  16484. }
  16485. },
  16486. "additionalProperties": false
  16487. },
  16488. "title": {
  16489. "anyOf": [
  16490. {
  16491. "type": "string"
  16492. },
  16493. {
  16494. "type": "null"
  16495. }
  16496. ]
  16497. },
  16498. "agent": {
  16499. "anyOf": [
  16500. {
  16501. "type": "string"
  16502. },
  16503. {
  16504. "type": "null"
  16505. }
  16506. ]
  16507. },
  16508. "model": {
  16509. "anyOf": [
  16510. {
  16511. "type": "object",
  16512. "properties": {
  16513. "id": {
  16514. "type": "string"
  16515. },
  16516. "providerID": {
  16517. "type": "string"
  16518. },
  16519. "variant": {
  16520. "type": "string"
  16521. }
  16522. },
  16523. "required": ["id", "providerID"],
  16524. "additionalProperties": false
  16525. },
  16526. {
  16527. "type": "null"
  16528. }
  16529. ]
  16530. },
  16531. "version": {
  16532. "anyOf": [
  16533. {
  16534. "type": "string"
  16535. },
  16536. {
  16537. "type": "null"
  16538. }
  16539. ]
  16540. },
  16541. "time": {
  16542. "type": "object",
  16543. "properties": {
  16544. "created": {
  16545. "anyOf": [
  16546. {
  16547. "type": "integer",
  16548. "minimum": 0
  16549. },
  16550. {
  16551. "type": "null"
  16552. }
  16553. ]
  16554. },
  16555. "updated": {
  16556. "anyOf": [
  16557. {
  16558. "type": "integer",
  16559. "minimum": 0
  16560. },
  16561. {
  16562. "type": "null"
  16563. }
  16564. ]
  16565. },
  16566. "compacting": {
  16567. "anyOf": [
  16568. {
  16569. "type": "integer",
  16570. "minimum": 0
  16571. },
  16572. {
  16573. "type": "null"
  16574. }
  16575. ]
  16576. },
  16577. "archived": {
  16578. "anyOf": [
  16579. {
  16580. "type": "number"
  16581. },
  16582. {
  16583. "type": "null"
  16584. }
  16585. ]
  16586. }
  16587. },
  16588. "additionalProperties": false
  16589. },
  16590. "permission": {
  16591. "anyOf": [
  16592. {
  16593. "$ref": "#/components/schemas/PermissionRuleset"
  16594. },
  16595. {
  16596. "type": "null"
  16597. }
  16598. ]
  16599. },
  16600. "revert": {
  16601. "anyOf": [
  16602. {
  16603. "type": "object",
  16604. "properties": {
  16605. "messageID": {
  16606. "type": "string",
  16607. "pattern": "^msg"
  16608. },
  16609. "partID": {
  16610. "type": "string",
  16611. "pattern": "^prt"
  16612. },
  16613. "snapshot": {
  16614. "type": "string"
  16615. },
  16616. "diff": {
  16617. "type": "string"
  16618. }
  16619. },
  16620. "required": ["messageID"],
  16621. "additionalProperties": false
  16622. },
  16623. {
  16624. "type": "null"
  16625. }
  16626. ]
  16627. }
  16628. },
  16629. "additionalProperties": false
  16630. }
  16631. },
  16632. "required": ["sessionID", "info"],
  16633. "additionalProperties": false
  16634. }
  16635. },
  16636. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16637. "additionalProperties": false
  16638. },
  16639. "SyncEventSessionDeleted": {
  16640. "type": "object",
  16641. "properties": {
  16642. "type": {
  16643. "type": "string",
  16644. "enum": ["sync"]
  16645. },
  16646. "name": {
  16647. "type": "string",
  16648. "enum": ["session.deleted.1"]
  16649. },
  16650. "id": {
  16651. "type": "string"
  16652. },
  16653. "seq": {
  16654. "type": "number"
  16655. },
  16656. "aggregateID": {
  16657. "type": "string",
  16658. "enum": ["sessionID"]
  16659. },
  16660. "data": {
  16661. "type": "object",
  16662. "properties": {
  16663. "sessionID": {
  16664. "type": "string",
  16665. "pattern": "^ses"
  16666. },
  16667. "info": {
  16668. "$ref": "#/components/schemas/Session"
  16669. }
  16670. },
  16671. "required": ["sessionID", "info"],
  16672. "additionalProperties": false
  16673. }
  16674. },
  16675. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16676. "additionalProperties": false
  16677. },
  16678. "SyncEventSessionNextAgentSwitched": {
  16679. "type": "object",
  16680. "properties": {
  16681. "type": {
  16682. "type": "string",
  16683. "enum": ["sync"]
  16684. },
  16685. "name": {
  16686. "type": "string",
  16687. "enum": ["session.next.agent.switched.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. "agent": {
  16710. "type": "string"
  16711. }
  16712. },
  16713. "required": ["timestamp", "sessionID", "agent"],
  16714. "additionalProperties": false
  16715. }
  16716. },
  16717. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16718. "additionalProperties": false
  16719. },
  16720. "SyncEventSessionNextModelSwitched": {
  16721. "type": "object",
  16722. "properties": {
  16723. "type": {
  16724. "type": "string",
  16725. "enum": ["sync"]
  16726. },
  16727. "name": {
  16728. "type": "string",
  16729. "enum": ["session.next.model.switched.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. "model": {
  16752. "type": "object",
  16753. "properties": {
  16754. "id": {
  16755. "type": "string"
  16756. },
  16757. "providerID": {
  16758. "type": "string"
  16759. },
  16760. "variant": {
  16761. "type": "string"
  16762. }
  16763. },
  16764. "required": ["id", "providerID", "variant"],
  16765. "additionalProperties": false
  16766. }
  16767. },
  16768. "required": ["timestamp", "sessionID", "model"],
  16769. "additionalProperties": false
  16770. }
  16771. },
  16772. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16773. "additionalProperties": false
  16774. },
  16775. "SyncEventSessionNextPrompted": {
  16776. "type": "object",
  16777. "properties": {
  16778. "type": {
  16779. "type": "string",
  16780. "enum": ["sync"]
  16781. },
  16782. "name": {
  16783. "type": "string",
  16784. "enum": ["session.next.prompted.1"]
  16785. },
  16786. "id": {
  16787. "type": "string"
  16788. },
  16789. "seq": {
  16790. "type": "number"
  16791. },
  16792. "aggregateID": {
  16793. "type": "string",
  16794. "enum": ["sessionID"]
  16795. },
  16796. "data": {
  16797. "type": "object",
  16798. "properties": {
  16799. "timestamp": {
  16800. "type": "number"
  16801. },
  16802. "sessionID": {
  16803. "type": "string",
  16804. "pattern": "^ses"
  16805. },
  16806. "prompt": {
  16807. "$ref": "#/components/schemas/Prompt"
  16808. }
  16809. },
  16810. "required": ["timestamp", "sessionID", "prompt"],
  16811. "additionalProperties": false
  16812. }
  16813. },
  16814. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16815. "additionalProperties": false
  16816. },
  16817. "SyncEventSessionNextSynthetic": {
  16818. "type": "object",
  16819. "properties": {
  16820. "type": {
  16821. "type": "string",
  16822. "enum": ["sync"]
  16823. },
  16824. "name": {
  16825. "type": "string",
  16826. "enum": ["session.next.synthetic.1"]
  16827. },
  16828. "id": {
  16829. "type": "string"
  16830. },
  16831. "seq": {
  16832. "type": "number"
  16833. },
  16834. "aggregateID": {
  16835. "type": "string",
  16836. "enum": ["sessionID"]
  16837. },
  16838. "data": {
  16839. "type": "object",
  16840. "properties": {
  16841. "timestamp": {
  16842. "type": "number"
  16843. },
  16844. "sessionID": {
  16845. "type": "string",
  16846. "pattern": "^ses"
  16847. },
  16848. "text": {
  16849. "type": "string"
  16850. }
  16851. },
  16852. "required": ["timestamp", "sessionID", "text"],
  16853. "additionalProperties": false
  16854. }
  16855. },
  16856. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16857. "additionalProperties": false
  16858. },
  16859. "SyncEventSessionNextShellStarted": {
  16860. "type": "object",
  16861. "properties": {
  16862. "type": {
  16863. "type": "string",
  16864. "enum": ["sync"]
  16865. },
  16866. "name": {
  16867. "type": "string",
  16868. "enum": ["session.next.shell.started.1"]
  16869. },
  16870. "id": {
  16871. "type": "string"
  16872. },
  16873. "seq": {
  16874. "type": "number"
  16875. },
  16876. "aggregateID": {
  16877. "type": "string",
  16878. "enum": ["sessionID"]
  16879. },
  16880. "data": {
  16881. "type": "object",
  16882. "properties": {
  16883. "timestamp": {
  16884. "type": "number"
  16885. },
  16886. "sessionID": {
  16887. "type": "string",
  16888. "pattern": "^ses"
  16889. },
  16890. "callID": {
  16891. "type": "string"
  16892. },
  16893. "command": {
  16894. "type": "string"
  16895. }
  16896. },
  16897. "required": ["timestamp", "sessionID", "callID", "command"],
  16898. "additionalProperties": false
  16899. }
  16900. },
  16901. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16902. "additionalProperties": false
  16903. },
  16904. "SyncEventSessionNextShellEnded": {
  16905. "type": "object",
  16906. "properties": {
  16907. "type": {
  16908. "type": "string",
  16909. "enum": ["sync"]
  16910. },
  16911. "name": {
  16912. "type": "string",
  16913. "enum": ["session.next.shell.ended.1"]
  16914. },
  16915. "id": {
  16916. "type": "string"
  16917. },
  16918. "seq": {
  16919. "type": "number"
  16920. },
  16921. "aggregateID": {
  16922. "type": "string",
  16923. "enum": ["sessionID"]
  16924. },
  16925. "data": {
  16926. "type": "object",
  16927. "properties": {
  16928. "timestamp": {
  16929. "type": "number"
  16930. },
  16931. "sessionID": {
  16932. "type": "string",
  16933. "pattern": "^ses"
  16934. },
  16935. "callID": {
  16936. "type": "string"
  16937. },
  16938. "output": {
  16939. "type": "string"
  16940. }
  16941. },
  16942. "required": ["timestamp", "sessionID", "callID", "output"],
  16943. "additionalProperties": false
  16944. }
  16945. },
  16946. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16947. "additionalProperties": false
  16948. },
  16949. "SyncEventSessionNextStepStarted": {
  16950. "type": "object",
  16951. "properties": {
  16952. "type": {
  16953. "type": "string",
  16954. "enum": ["sync"]
  16955. },
  16956. "name": {
  16957. "type": "string",
  16958. "enum": ["session.next.step.started.1"]
  16959. },
  16960. "id": {
  16961. "type": "string"
  16962. },
  16963. "seq": {
  16964. "type": "number"
  16965. },
  16966. "aggregateID": {
  16967. "type": "string",
  16968. "enum": ["sessionID"]
  16969. },
  16970. "data": {
  16971. "type": "object",
  16972. "properties": {
  16973. "timestamp": {
  16974. "type": "number"
  16975. },
  16976. "sessionID": {
  16977. "type": "string",
  16978. "pattern": "^ses"
  16979. },
  16980. "agent": {
  16981. "type": "string"
  16982. },
  16983. "model": {
  16984. "type": "object",
  16985. "properties": {
  16986. "id": {
  16987. "type": "string"
  16988. },
  16989. "providerID": {
  16990. "type": "string"
  16991. },
  16992. "variant": {
  16993. "type": "string"
  16994. }
  16995. },
  16996. "required": ["id", "providerID", "variant"],
  16997. "additionalProperties": false
  16998. },
  16999. "snapshot": {
  17000. "type": "string"
  17001. }
  17002. },
  17003. "required": ["timestamp", "sessionID", "agent", "model"],
  17004. "additionalProperties": false
  17005. }
  17006. },
  17007. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17008. "additionalProperties": false
  17009. },
  17010. "SyncEventSessionNextStepEnded": {
  17011. "type": "object",
  17012. "properties": {
  17013. "type": {
  17014. "type": "string",
  17015. "enum": ["sync"]
  17016. },
  17017. "name": {
  17018. "type": "string",
  17019. "enum": ["session.next.step.ended.1"]
  17020. },
  17021. "id": {
  17022. "type": "string"
  17023. },
  17024. "seq": {
  17025. "type": "number"
  17026. },
  17027. "aggregateID": {
  17028. "type": "string",
  17029. "enum": ["sessionID"]
  17030. },
  17031. "data": {
  17032. "type": "object",
  17033. "properties": {
  17034. "timestamp": {
  17035. "type": "number"
  17036. },
  17037. "sessionID": {
  17038. "type": "string",
  17039. "pattern": "^ses"
  17040. },
  17041. "finish": {
  17042. "type": "string"
  17043. },
  17044. "cost": {
  17045. "type": "number"
  17046. },
  17047. "tokens": {
  17048. "type": "object",
  17049. "properties": {
  17050. "input": {
  17051. "type": "number"
  17052. },
  17053. "output": {
  17054. "type": "number"
  17055. },
  17056. "reasoning": {
  17057. "type": "number"
  17058. },
  17059. "cache": {
  17060. "type": "object",
  17061. "properties": {
  17062. "read": {
  17063. "type": "number"
  17064. },
  17065. "write": {
  17066. "type": "number"
  17067. }
  17068. },
  17069. "required": ["read", "write"],
  17070. "additionalProperties": false
  17071. }
  17072. },
  17073. "required": ["input", "output", "reasoning", "cache"],
  17074. "additionalProperties": false
  17075. },
  17076. "snapshot": {
  17077. "type": "string"
  17078. }
  17079. },
  17080. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17081. "additionalProperties": false
  17082. }
  17083. },
  17084. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17085. "additionalProperties": false
  17086. },
  17087. "SyncEventSessionNextStepFailed": {
  17088. "type": "object",
  17089. "properties": {
  17090. "type": {
  17091. "type": "string",
  17092. "enum": ["sync"]
  17093. },
  17094. "name": {
  17095. "type": "string",
  17096. "enum": ["session.next.step.failed.1"]
  17097. },
  17098. "id": {
  17099. "type": "string"
  17100. },
  17101. "seq": {
  17102. "type": "number"
  17103. },
  17104. "aggregateID": {
  17105. "type": "string",
  17106. "enum": ["sessionID"]
  17107. },
  17108. "data": {
  17109. "type": "object",
  17110. "properties": {
  17111. "timestamp": {
  17112. "type": "number"
  17113. },
  17114. "sessionID": {
  17115. "type": "string",
  17116. "pattern": "^ses"
  17117. },
  17118. "error": {
  17119. "$ref": "#/components/schemas/SessionErrorUnknown"
  17120. }
  17121. },
  17122. "required": ["timestamp", "sessionID", "error"],
  17123. "additionalProperties": false
  17124. }
  17125. },
  17126. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17127. "additionalProperties": false
  17128. },
  17129. "SyncEventSessionNextTextStarted": {
  17130. "type": "object",
  17131. "properties": {
  17132. "type": {
  17133. "type": "string",
  17134. "enum": ["sync"]
  17135. },
  17136. "name": {
  17137. "type": "string",
  17138. "enum": ["session.next.text.started.1"]
  17139. },
  17140. "id": {
  17141. "type": "string"
  17142. },
  17143. "seq": {
  17144. "type": "number"
  17145. },
  17146. "aggregateID": {
  17147. "type": "string",
  17148. "enum": ["sessionID"]
  17149. },
  17150. "data": {
  17151. "type": "object",
  17152. "properties": {
  17153. "timestamp": {
  17154. "type": "number"
  17155. },
  17156. "sessionID": {
  17157. "type": "string",
  17158. "pattern": "^ses"
  17159. }
  17160. },
  17161. "required": ["timestamp", "sessionID"],
  17162. "additionalProperties": false
  17163. }
  17164. },
  17165. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17166. "additionalProperties": false
  17167. },
  17168. "SyncEventSessionNextTextDelta": {
  17169. "type": "object",
  17170. "properties": {
  17171. "type": {
  17172. "type": "string",
  17173. "enum": ["sync"]
  17174. },
  17175. "name": {
  17176. "type": "string",
  17177. "enum": ["session.next.text.delta.1"]
  17178. },
  17179. "id": {
  17180. "type": "string"
  17181. },
  17182. "seq": {
  17183. "type": "number"
  17184. },
  17185. "aggregateID": {
  17186. "type": "string",
  17187. "enum": ["sessionID"]
  17188. },
  17189. "data": {
  17190. "type": "object",
  17191. "properties": {
  17192. "timestamp": {
  17193. "type": "number"
  17194. },
  17195. "sessionID": {
  17196. "type": "string",
  17197. "pattern": "^ses"
  17198. },
  17199. "delta": {
  17200. "type": "string"
  17201. }
  17202. },
  17203. "required": ["timestamp", "sessionID", "delta"],
  17204. "additionalProperties": false
  17205. }
  17206. },
  17207. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17208. "additionalProperties": false
  17209. },
  17210. "SyncEventSessionNextTextEnded": {
  17211. "type": "object",
  17212. "properties": {
  17213. "type": {
  17214. "type": "string",
  17215. "enum": ["sync"]
  17216. },
  17217. "name": {
  17218. "type": "string",
  17219. "enum": ["session.next.text.ended.1"]
  17220. },
  17221. "id": {
  17222. "type": "string"
  17223. },
  17224. "seq": {
  17225. "type": "number"
  17226. },
  17227. "aggregateID": {
  17228. "type": "string",
  17229. "enum": ["sessionID"]
  17230. },
  17231. "data": {
  17232. "type": "object",
  17233. "properties": {
  17234. "timestamp": {
  17235. "type": "number"
  17236. },
  17237. "sessionID": {
  17238. "type": "string",
  17239. "pattern": "^ses"
  17240. },
  17241. "text": {
  17242. "type": "string"
  17243. }
  17244. },
  17245. "required": ["timestamp", "sessionID", "text"],
  17246. "additionalProperties": false
  17247. }
  17248. },
  17249. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17250. "additionalProperties": false
  17251. },
  17252. "SyncEventSessionNextReasoningStarted": {
  17253. "type": "object",
  17254. "properties": {
  17255. "type": {
  17256. "type": "string",
  17257. "enum": ["sync"]
  17258. },
  17259. "name": {
  17260. "type": "string",
  17261. "enum": ["session.next.reasoning.started.1"]
  17262. },
  17263. "id": {
  17264. "type": "string"
  17265. },
  17266. "seq": {
  17267. "type": "number"
  17268. },
  17269. "aggregateID": {
  17270. "type": "string",
  17271. "enum": ["sessionID"]
  17272. },
  17273. "data": {
  17274. "type": "object",
  17275. "properties": {
  17276. "timestamp": {
  17277. "type": "number"
  17278. },
  17279. "sessionID": {
  17280. "type": "string",
  17281. "pattern": "^ses"
  17282. },
  17283. "reasoningID": {
  17284. "type": "string"
  17285. }
  17286. },
  17287. "required": ["timestamp", "sessionID", "reasoningID"],
  17288. "additionalProperties": false
  17289. }
  17290. },
  17291. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17292. "additionalProperties": false
  17293. },
  17294. "SyncEventSessionNextReasoningDelta": {
  17295. "type": "object",
  17296. "properties": {
  17297. "type": {
  17298. "type": "string",
  17299. "enum": ["sync"]
  17300. },
  17301. "name": {
  17302. "type": "string",
  17303. "enum": ["session.next.reasoning.delta.1"]
  17304. },
  17305. "id": {
  17306. "type": "string"
  17307. },
  17308. "seq": {
  17309. "type": "number"
  17310. },
  17311. "aggregateID": {
  17312. "type": "string",
  17313. "enum": ["sessionID"]
  17314. },
  17315. "data": {
  17316. "type": "object",
  17317. "properties": {
  17318. "timestamp": {
  17319. "type": "number"
  17320. },
  17321. "sessionID": {
  17322. "type": "string",
  17323. "pattern": "^ses"
  17324. },
  17325. "reasoningID": {
  17326. "type": "string"
  17327. },
  17328. "delta": {
  17329. "type": "string"
  17330. }
  17331. },
  17332. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17333. "additionalProperties": false
  17334. }
  17335. },
  17336. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17337. "additionalProperties": false
  17338. },
  17339. "SyncEventSessionNextReasoningEnded": {
  17340. "type": "object",
  17341. "properties": {
  17342. "type": {
  17343. "type": "string",
  17344. "enum": ["sync"]
  17345. },
  17346. "name": {
  17347. "type": "string",
  17348. "enum": ["session.next.reasoning.ended.1"]
  17349. },
  17350. "id": {
  17351. "type": "string"
  17352. },
  17353. "seq": {
  17354. "type": "number"
  17355. },
  17356. "aggregateID": {
  17357. "type": "string",
  17358. "enum": ["sessionID"]
  17359. },
  17360. "data": {
  17361. "type": "object",
  17362. "properties": {
  17363. "timestamp": {
  17364. "type": "number"
  17365. },
  17366. "sessionID": {
  17367. "type": "string",
  17368. "pattern": "^ses"
  17369. },
  17370. "reasoningID": {
  17371. "type": "string"
  17372. },
  17373. "text": {
  17374. "type": "string"
  17375. }
  17376. },
  17377. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17378. "additionalProperties": false
  17379. }
  17380. },
  17381. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17382. "additionalProperties": false
  17383. },
  17384. "SyncEventSessionNextToolInputStarted": {
  17385. "type": "object",
  17386. "properties": {
  17387. "type": {
  17388. "type": "string",
  17389. "enum": ["sync"]
  17390. },
  17391. "name": {
  17392. "type": "string",
  17393. "enum": ["session.next.tool.input.started.1"]
  17394. },
  17395. "id": {
  17396. "type": "string"
  17397. },
  17398. "seq": {
  17399. "type": "number"
  17400. },
  17401. "aggregateID": {
  17402. "type": "string",
  17403. "enum": ["sessionID"]
  17404. },
  17405. "data": {
  17406. "type": "object",
  17407. "properties": {
  17408. "timestamp": {
  17409. "type": "number"
  17410. },
  17411. "sessionID": {
  17412. "type": "string",
  17413. "pattern": "^ses"
  17414. },
  17415. "callID": {
  17416. "type": "string"
  17417. },
  17418. "name": {
  17419. "type": "string"
  17420. }
  17421. },
  17422. "required": ["timestamp", "sessionID", "callID", "name"],
  17423. "additionalProperties": false
  17424. }
  17425. },
  17426. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17427. "additionalProperties": false
  17428. },
  17429. "SyncEventSessionNextToolInputDelta": {
  17430. "type": "object",
  17431. "properties": {
  17432. "type": {
  17433. "type": "string",
  17434. "enum": ["sync"]
  17435. },
  17436. "name": {
  17437. "type": "string",
  17438. "enum": ["session.next.tool.input.delta.1"]
  17439. },
  17440. "id": {
  17441. "type": "string"
  17442. },
  17443. "seq": {
  17444. "type": "number"
  17445. },
  17446. "aggregateID": {
  17447. "type": "string",
  17448. "enum": ["sessionID"]
  17449. },
  17450. "data": {
  17451. "type": "object",
  17452. "properties": {
  17453. "timestamp": {
  17454. "type": "number"
  17455. },
  17456. "sessionID": {
  17457. "type": "string",
  17458. "pattern": "^ses"
  17459. },
  17460. "callID": {
  17461. "type": "string"
  17462. },
  17463. "delta": {
  17464. "type": "string"
  17465. }
  17466. },
  17467. "required": ["timestamp", "sessionID", "callID", "delta"],
  17468. "additionalProperties": false
  17469. }
  17470. },
  17471. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17472. "additionalProperties": false
  17473. },
  17474. "SyncEventSessionNextToolInputEnded": {
  17475. "type": "object",
  17476. "properties": {
  17477. "type": {
  17478. "type": "string",
  17479. "enum": ["sync"]
  17480. },
  17481. "name": {
  17482. "type": "string",
  17483. "enum": ["session.next.tool.input.ended.1"]
  17484. },
  17485. "id": {
  17486. "type": "string"
  17487. },
  17488. "seq": {
  17489. "type": "number"
  17490. },
  17491. "aggregateID": {
  17492. "type": "string",
  17493. "enum": ["sessionID"]
  17494. },
  17495. "data": {
  17496. "type": "object",
  17497. "properties": {
  17498. "timestamp": {
  17499. "type": "number"
  17500. },
  17501. "sessionID": {
  17502. "type": "string",
  17503. "pattern": "^ses"
  17504. },
  17505. "callID": {
  17506. "type": "string"
  17507. },
  17508. "text": {
  17509. "type": "string"
  17510. }
  17511. },
  17512. "required": ["timestamp", "sessionID", "callID", "text"],
  17513. "additionalProperties": false
  17514. }
  17515. },
  17516. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17517. "additionalProperties": false
  17518. },
  17519. "SyncEventSessionNextToolCalled": {
  17520. "type": "object",
  17521. "properties": {
  17522. "type": {
  17523. "type": "string",
  17524. "enum": ["sync"]
  17525. },
  17526. "name": {
  17527. "type": "string",
  17528. "enum": ["session.next.tool.called.1"]
  17529. },
  17530. "id": {
  17531. "type": "string"
  17532. },
  17533. "seq": {
  17534. "type": "number"
  17535. },
  17536. "aggregateID": {
  17537. "type": "string",
  17538. "enum": ["sessionID"]
  17539. },
  17540. "data": {
  17541. "type": "object",
  17542. "properties": {
  17543. "timestamp": {
  17544. "type": "number"
  17545. },
  17546. "sessionID": {
  17547. "type": "string",
  17548. "pattern": "^ses"
  17549. },
  17550. "callID": {
  17551. "type": "string"
  17552. },
  17553. "tool": {
  17554. "type": "string"
  17555. },
  17556. "input": {
  17557. "type": "object"
  17558. },
  17559. "provider": {
  17560. "type": "object",
  17561. "properties": {
  17562. "executed": {
  17563. "type": "boolean"
  17564. },
  17565. "metadata": {
  17566. "type": "object"
  17567. }
  17568. },
  17569. "required": ["executed"],
  17570. "additionalProperties": false
  17571. }
  17572. },
  17573. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17574. "additionalProperties": false
  17575. }
  17576. },
  17577. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17578. "additionalProperties": false
  17579. },
  17580. "SyncEventSessionNextToolProgress": {
  17581. "type": "object",
  17582. "properties": {
  17583. "type": {
  17584. "type": "string",
  17585. "enum": ["sync"]
  17586. },
  17587. "name": {
  17588. "type": "string",
  17589. "enum": ["session.next.tool.progress.1"]
  17590. },
  17591. "id": {
  17592. "type": "string"
  17593. },
  17594. "seq": {
  17595. "type": "number"
  17596. },
  17597. "aggregateID": {
  17598. "type": "string",
  17599. "enum": ["sessionID"]
  17600. },
  17601. "data": {
  17602. "type": "object",
  17603. "properties": {
  17604. "timestamp": {
  17605. "type": "number"
  17606. },
  17607. "sessionID": {
  17608. "type": "string",
  17609. "pattern": "^ses"
  17610. },
  17611. "callID": {
  17612. "type": "string"
  17613. },
  17614. "structured": {
  17615. "type": "object"
  17616. },
  17617. "content": {
  17618. "type": "array",
  17619. "items": {
  17620. "anyOf": [
  17621. {
  17622. "$ref": "#/components/schemas/ToolTextContent"
  17623. },
  17624. {
  17625. "$ref": "#/components/schemas/ToolFileContent"
  17626. }
  17627. ]
  17628. }
  17629. }
  17630. },
  17631. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17632. "additionalProperties": false
  17633. }
  17634. },
  17635. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17636. "additionalProperties": false
  17637. },
  17638. "SyncEventSessionNextToolSuccess": {
  17639. "type": "object",
  17640. "properties": {
  17641. "type": {
  17642. "type": "string",
  17643. "enum": ["sync"]
  17644. },
  17645. "name": {
  17646. "type": "string",
  17647. "enum": ["session.next.tool.success.1"]
  17648. },
  17649. "id": {
  17650. "type": "string"
  17651. },
  17652. "seq": {
  17653. "type": "number"
  17654. },
  17655. "aggregateID": {
  17656. "type": "string",
  17657. "enum": ["sessionID"]
  17658. },
  17659. "data": {
  17660. "type": "object",
  17661. "properties": {
  17662. "timestamp": {
  17663. "type": "number"
  17664. },
  17665. "sessionID": {
  17666. "type": "string",
  17667. "pattern": "^ses"
  17668. },
  17669. "callID": {
  17670. "type": "string"
  17671. },
  17672. "structured": {
  17673. "type": "object"
  17674. },
  17675. "content": {
  17676. "type": "array",
  17677. "items": {
  17678. "anyOf": [
  17679. {
  17680. "$ref": "#/components/schemas/ToolTextContent"
  17681. },
  17682. {
  17683. "$ref": "#/components/schemas/ToolFileContent"
  17684. }
  17685. ]
  17686. }
  17687. },
  17688. "provider": {
  17689. "type": "object",
  17690. "properties": {
  17691. "executed": {
  17692. "type": "boolean"
  17693. },
  17694. "metadata": {
  17695. "type": "object"
  17696. }
  17697. },
  17698. "required": ["executed"],
  17699. "additionalProperties": false
  17700. }
  17701. },
  17702. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17703. "additionalProperties": false
  17704. }
  17705. },
  17706. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17707. "additionalProperties": false
  17708. },
  17709. "SyncEventSessionNextToolFailed": {
  17710. "type": "object",
  17711. "properties": {
  17712. "type": {
  17713. "type": "string",
  17714. "enum": ["sync"]
  17715. },
  17716. "name": {
  17717. "type": "string",
  17718. "enum": ["session.next.tool.failed.1"]
  17719. },
  17720. "id": {
  17721. "type": "string"
  17722. },
  17723. "seq": {
  17724. "type": "number"
  17725. },
  17726. "aggregateID": {
  17727. "type": "string",
  17728. "enum": ["sessionID"]
  17729. },
  17730. "data": {
  17731. "type": "object",
  17732. "properties": {
  17733. "timestamp": {
  17734. "type": "number"
  17735. },
  17736. "sessionID": {
  17737. "type": "string",
  17738. "pattern": "^ses"
  17739. },
  17740. "callID": {
  17741. "type": "string"
  17742. },
  17743. "error": {
  17744. "$ref": "#/components/schemas/SessionErrorUnknown"
  17745. },
  17746. "provider": {
  17747. "type": "object",
  17748. "properties": {
  17749. "executed": {
  17750. "type": "boolean"
  17751. },
  17752. "metadata": {
  17753. "type": "object"
  17754. }
  17755. },
  17756. "required": ["executed"],
  17757. "additionalProperties": false
  17758. }
  17759. },
  17760. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17761. "additionalProperties": false
  17762. }
  17763. },
  17764. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17765. "additionalProperties": false
  17766. },
  17767. "SyncEventSessionNextRetried": {
  17768. "type": "object",
  17769. "properties": {
  17770. "type": {
  17771. "type": "string",
  17772. "enum": ["sync"]
  17773. },
  17774. "name": {
  17775. "type": "string",
  17776. "enum": ["session.next.retried.1"]
  17777. },
  17778. "id": {
  17779. "type": "string"
  17780. },
  17781. "seq": {
  17782. "type": "number"
  17783. },
  17784. "aggregateID": {
  17785. "type": "string",
  17786. "enum": ["sessionID"]
  17787. },
  17788. "data": {
  17789. "type": "object",
  17790. "properties": {
  17791. "timestamp": {
  17792. "type": "number"
  17793. },
  17794. "sessionID": {
  17795. "type": "string",
  17796. "pattern": "^ses"
  17797. },
  17798. "attempt": {
  17799. "type": "number"
  17800. },
  17801. "error": {
  17802. "$ref": "#/components/schemas/SessionNextRetry_error"
  17803. }
  17804. },
  17805. "required": ["timestamp", "sessionID", "attempt", "error"],
  17806. "additionalProperties": false
  17807. }
  17808. },
  17809. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17810. "additionalProperties": false
  17811. },
  17812. "SyncEventSessionNextCompactionStarted": {
  17813. "type": "object",
  17814. "properties": {
  17815. "type": {
  17816. "type": "string",
  17817. "enum": ["sync"]
  17818. },
  17819. "name": {
  17820. "type": "string",
  17821. "enum": ["session.next.compaction.started.1"]
  17822. },
  17823. "id": {
  17824. "type": "string"
  17825. },
  17826. "seq": {
  17827. "type": "number"
  17828. },
  17829. "aggregateID": {
  17830. "type": "string",
  17831. "enum": ["sessionID"]
  17832. },
  17833. "data": {
  17834. "type": "object",
  17835. "properties": {
  17836. "timestamp": {
  17837. "type": "number"
  17838. },
  17839. "sessionID": {
  17840. "type": "string",
  17841. "pattern": "^ses"
  17842. },
  17843. "reason": {
  17844. "type": "string",
  17845. "enum": ["auto", "manual"]
  17846. }
  17847. },
  17848. "required": ["timestamp", "sessionID", "reason"],
  17849. "additionalProperties": false
  17850. }
  17851. },
  17852. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17853. "additionalProperties": false
  17854. },
  17855. "SyncEventSessionNextCompactionDelta": {
  17856. "type": "object",
  17857. "properties": {
  17858. "type": {
  17859. "type": "string",
  17860. "enum": ["sync"]
  17861. },
  17862. "name": {
  17863. "type": "string",
  17864. "enum": ["session.next.compaction.delta.1"]
  17865. },
  17866. "id": {
  17867. "type": "string"
  17868. },
  17869. "seq": {
  17870. "type": "number"
  17871. },
  17872. "aggregateID": {
  17873. "type": "string",
  17874. "enum": ["sessionID"]
  17875. },
  17876. "data": {
  17877. "type": "object",
  17878. "properties": {
  17879. "timestamp": {
  17880. "type": "number"
  17881. },
  17882. "sessionID": {
  17883. "type": "string",
  17884. "pattern": "^ses"
  17885. },
  17886. "text": {
  17887. "type": "string"
  17888. }
  17889. },
  17890. "required": ["timestamp", "sessionID", "text"],
  17891. "additionalProperties": false
  17892. }
  17893. },
  17894. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17895. "additionalProperties": false
  17896. },
  17897. "SyncEventSessionNextCompactionEnded": {
  17898. "type": "object",
  17899. "properties": {
  17900. "type": {
  17901. "type": "string",
  17902. "enum": ["sync"]
  17903. },
  17904. "name": {
  17905. "type": "string",
  17906. "enum": ["session.next.compaction.ended.1"]
  17907. },
  17908. "id": {
  17909. "type": "string"
  17910. },
  17911. "seq": {
  17912. "type": "number"
  17913. },
  17914. "aggregateID": {
  17915. "type": "string",
  17916. "enum": ["sessionID"]
  17917. },
  17918. "data": {
  17919. "type": "object",
  17920. "properties": {
  17921. "timestamp": {
  17922. "type": "number"
  17923. },
  17924. "sessionID": {
  17925. "type": "string",
  17926. "pattern": "^ses"
  17927. },
  17928. "text": {
  17929. "type": "string"
  17930. },
  17931. "include": {
  17932. "type": "string"
  17933. }
  17934. },
  17935. "required": ["timestamp", "sessionID", "text"],
  17936. "additionalProperties": false
  17937. }
  17938. },
  17939. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17940. "additionalProperties": false
  17941. },
  17942. "EventServerConnected": {
  17943. "type": "object",
  17944. "properties": {
  17945. "id": {
  17946. "type": "string"
  17947. },
  17948. "type": {
  17949. "type": "string",
  17950. "enum": ["server.connected"]
  17951. },
  17952. "properties": {
  17953. "type": "object",
  17954. "properties": {}
  17955. }
  17956. },
  17957. "required": ["id", "type", "properties"],
  17958. "additionalProperties": false
  17959. },
  17960. "EventGlobalDisposed": {
  17961. "type": "object",
  17962. "properties": {
  17963. "id": {
  17964. "type": "string"
  17965. },
  17966. "type": {
  17967. "type": "string",
  17968. "enum": ["global.disposed"]
  17969. },
  17970. "properties": {
  17971. "type": "object",
  17972. "properties": {}
  17973. }
  17974. },
  17975. "required": ["id", "type", "properties"],
  17976. "additionalProperties": false
  17977. },
  17978. "EventServerInstanceDisposed": {
  17979. "type": "object",
  17980. "properties": {
  17981. "id": {
  17982. "type": "string"
  17983. },
  17984. "type": {
  17985. "type": "string",
  17986. "enum": ["server.instance.disposed"]
  17987. },
  17988. "properties": {
  17989. "type": "object",
  17990. "properties": {
  17991. "directory": {
  17992. "type": "string"
  17993. }
  17994. },
  17995. "required": ["directory"],
  17996. "additionalProperties": false
  17997. }
  17998. },
  17999. "required": ["id", "type", "properties"],
  18000. "additionalProperties": false
  18001. },
  18002. "EventFileEdited": {
  18003. "type": "object",
  18004. "properties": {
  18005. "id": {
  18006. "type": "string"
  18007. },
  18008. "type": {
  18009. "type": "string",
  18010. "enum": ["file.edited"]
  18011. },
  18012. "properties": {
  18013. "type": "object",
  18014. "properties": {
  18015. "file": {
  18016. "type": "string"
  18017. }
  18018. },
  18019. "required": ["file"],
  18020. "additionalProperties": false
  18021. }
  18022. },
  18023. "required": ["id", "type", "properties"],
  18024. "additionalProperties": false
  18025. },
  18026. "EventFileWatcherUpdated": {
  18027. "type": "object",
  18028. "properties": {
  18029. "id": {
  18030. "type": "string"
  18031. },
  18032. "type": {
  18033. "type": "string",
  18034. "enum": ["file.watcher.updated"]
  18035. },
  18036. "properties": {
  18037. "type": "object",
  18038. "properties": {
  18039. "file": {
  18040. "type": "string"
  18041. },
  18042. "event": {
  18043. "type": "string",
  18044. "enum": ["add", "change", "unlink"]
  18045. }
  18046. },
  18047. "required": ["file", "event"],
  18048. "additionalProperties": false
  18049. }
  18050. },
  18051. "required": ["id", "type", "properties"],
  18052. "additionalProperties": false
  18053. },
  18054. "EventLspClientDiagnostics": {
  18055. "type": "object",
  18056. "properties": {
  18057. "id": {
  18058. "type": "string"
  18059. },
  18060. "type": {
  18061. "type": "string",
  18062. "enum": ["lsp.client.diagnostics"]
  18063. },
  18064. "properties": {
  18065. "type": "object",
  18066. "properties": {
  18067. "serverID": {
  18068. "type": "string"
  18069. },
  18070. "path": {
  18071. "type": "string"
  18072. }
  18073. },
  18074. "required": ["serverID", "path"],
  18075. "additionalProperties": false
  18076. }
  18077. },
  18078. "required": ["id", "type", "properties"],
  18079. "additionalProperties": false
  18080. },
  18081. "EventLspUpdated": {
  18082. "type": "object",
  18083. "properties": {
  18084. "id": {
  18085. "type": "string"
  18086. },
  18087. "type": {
  18088. "type": "string",
  18089. "enum": ["lsp.updated"]
  18090. },
  18091. "properties": {
  18092. "type": "object",
  18093. "properties": {}
  18094. }
  18095. },
  18096. "required": ["id", "type", "properties"],
  18097. "additionalProperties": false
  18098. },
  18099. "EventMessagePartDelta": {
  18100. "type": "object",
  18101. "properties": {
  18102. "id": {
  18103. "type": "string"
  18104. },
  18105. "type": {
  18106. "type": "string",
  18107. "enum": ["message.part.delta"]
  18108. },
  18109. "properties": {
  18110. "type": "object",
  18111. "properties": {
  18112. "sessionID": {
  18113. "type": "string",
  18114. "pattern": "^ses"
  18115. },
  18116. "messageID": {
  18117. "type": "string",
  18118. "pattern": "^msg"
  18119. },
  18120. "partID": {
  18121. "type": "string",
  18122. "pattern": "^prt"
  18123. },
  18124. "field": {
  18125. "type": "string"
  18126. },
  18127. "delta": {
  18128. "type": "string"
  18129. }
  18130. },
  18131. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18132. "additionalProperties": false
  18133. }
  18134. },
  18135. "required": ["id", "type", "properties"],
  18136. "additionalProperties": false
  18137. },
  18138. "EventPermissionAsked": {
  18139. "type": "object",
  18140. "properties": {
  18141. "id": {
  18142. "type": "string"
  18143. },
  18144. "type": {
  18145. "type": "string",
  18146. "enum": ["permission.asked"]
  18147. },
  18148. "properties": {
  18149. "$ref": "#/components/schemas/PermissionRequest"
  18150. }
  18151. },
  18152. "required": ["id", "type", "properties"],
  18153. "additionalProperties": false
  18154. },
  18155. "EventPermissionReplied": {
  18156. "type": "object",
  18157. "properties": {
  18158. "id": {
  18159. "type": "string"
  18160. },
  18161. "type": {
  18162. "type": "string",
  18163. "enum": ["permission.replied"]
  18164. },
  18165. "properties": {
  18166. "type": "object",
  18167. "properties": {
  18168. "sessionID": {
  18169. "type": "string",
  18170. "pattern": "^ses"
  18171. },
  18172. "requestID": {
  18173. "type": "string",
  18174. "pattern": "^per"
  18175. },
  18176. "reply": {
  18177. "type": "string",
  18178. "enum": ["once", "always", "reject"]
  18179. }
  18180. },
  18181. "required": ["sessionID", "requestID", "reply"],
  18182. "additionalProperties": false
  18183. }
  18184. },
  18185. "required": ["id", "type", "properties"],
  18186. "additionalProperties": false
  18187. },
  18188. "EventSessionDiff": {
  18189. "type": "object",
  18190. "properties": {
  18191. "id": {
  18192. "type": "string"
  18193. },
  18194. "type": {
  18195. "type": "string",
  18196. "enum": ["session.diff"]
  18197. },
  18198. "properties": {
  18199. "type": "object",
  18200. "properties": {
  18201. "sessionID": {
  18202. "type": "string",
  18203. "pattern": "^ses"
  18204. },
  18205. "diff": {
  18206. "type": "array",
  18207. "items": {
  18208. "$ref": "#/components/schemas/SnapshotFileDiff"
  18209. }
  18210. }
  18211. },
  18212. "required": ["sessionID", "diff"],
  18213. "additionalProperties": false
  18214. }
  18215. },
  18216. "required": ["id", "type", "properties"],
  18217. "additionalProperties": false
  18218. },
  18219. "EventSessionError": {
  18220. "type": "object",
  18221. "properties": {
  18222. "id": {
  18223. "type": "string"
  18224. },
  18225. "type": {
  18226. "type": "string",
  18227. "enum": ["session.error"]
  18228. },
  18229. "properties": {
  18230. "type": "object",
  18231. "properties": {
  18232. "sessionID": {
  18233. "type": "string",
  18234. "pattern": "^ses"
  18235. },
  18236. "error": {
  18237. "anyOf": [
  18238. {
  18239. "$ref": "#/components/schemas/ProviderAuthError"
  18240. },
  18241. {
  18242. "$ref": "#/components/schemas/UnknownError"
  18243. },
  18244. {
  18245. "$ref": "#/components/schemas/MessageOutputLengthError"
  18246. },
  18247. {
  18248. "$ref": "#/components/schemas/MessageAbortedError"
  18249. },
  18250. {
  18251. "$ref": "#/components/schemas/StructuredOutputError"
  18252. },
  18253. {
  18254. "$ref": "#/components/schemas/ContextOverflowError"
  18255. },
  18256. {
  18257. "$ref": "#/components/schemas/APIError"
  18258. }
  18259. ]
  18260. }
  18261. },
  18262. "additionalProperties": false
  18263. }
  18264. },
  18265. "required": ["id", "type", "properties"],
  18266. "additionalProperties": false
  18267. },
  18268. "EventQuestionAsked": {
  18269. "type": "object",
  18270. "properties": {
  18271. "id": {
  18272. "type": "string"
  18273. },
  18274. "type": {
  18275. "type": "string",
  18276. "enum": ["question.asked"]
  18277. },
  18278. "properties": {
  18279. "$ref": "#/components/schemas/QuestionRequest"
  18280. }
  18281. },
  18282. "required": ["id", "type", "properties"],
  18283. "additionalProperties": false
  18284. },
  18285. "EventQuestionReplied": {
  18286. "type": "object",
  18287. "properties": {
  18288. "id": {
  18289. "type": "string"
  18290. },
  18291. "type": {
  18292. "type": "string",
  18293. "enum": ["question.replied"]
  18294. },
  18295. "properties": {
  18296. "$ref": "#/components/schemas/QuestionReplied"
  18297. }
  18298. },
  18299. "required": ["id", "type", "properties"],
  18300. "additionalProperties": false
  18301. },
  18302. "EventQuestionRejected": {
  18303. "type": "object",
  18304. "properties": {
  18305. "id": {
  18306. "type": "string"
  18307. },
  18308. "type": {
  18309. "type": "string",
  18310. "enum": ["question.rejected"]
  18311. },
  18312. "properties": {
  18313. "$ref": "#/components/schemas/QuestionRejected"
  18314. }
  18315. },
  18316. "required": ["id", "type", "properties"],
  18317. "additionalProperties": false
  18318. },
  18319. "EventTodoUpdated": {
  18320. "type": "object",
  18321. "properties": {
  18322. "id": {
  18323. "type": "string"
  18324. },
  18325. "type": {
  18326. "type": "string",
  18327. "enum": ["todo.updated"]
  18328. },
  18329. "properties": {
  18330. "type": "object",
  18331. "properties": {
  18332. "sessionID": {
  18333. "type": "string",
  18334. "pattern": "^ses"
  18335. },
  18336. "todos": {
  18337. "type": "array",
  18338. "items": {
  18339. "$ref": "#/components/schemas/Todo"
  18340. }
  18341. }
  18342. },
  18343. "required": ["sessionID", "todos"],
  18344. "additionalProperties": false
  18345. }
  18346. },
  18347. "required": ["id", "type", "properties"],
  18348. "additionalProperties": false
  18349. },
  18350. "EventSessionStatus": {
  18351. "type": "object",
  18352. "properties": {
  18353. "id": {
  18354. "type": "string"
  18355. },
  18356. "type": {
  18357. "type": "string",
  18358. "enum": ["session.status"]
  18359. },
  18360. "properties": {
  18361. "type": "object",
  18362. "properties": {
  18363. "sessionID": {
  18364. "type": "string",
  18365. "pattern": "^ses"
  18366. },
  18367. "status": {
  18368. "$ref": "#/components/schemas/SessionStatus"
  18369. }
  18370. },
  18371. "required": ["sessionID", "status"],
  18372. "additionalProperties": false
  18373. }
  18374. },
  18375. "required": ["id", "type", "properties"],
  18376. "additionalProperties": false
  18377. },
  18378. "EventSessionIdle": {
  18379. "type": "object",
  18380. "properties": {
  18381. "id": {
  18382. "type": "string"
  18383. },
  18384. "type": {
  18385. "type": "string",
  18386. "enum": ["session.idle"]
  18387. },
  18388. "properties": {
  18389. "type": "object",
  18390. "properties": {
  18391. "sessionID": {
  18392. "type": "string",
  18393. "pattern": "^ses"
  18394. }
  18395. },
  18396. "required": ["sessionID"],
  18397. "additionalProperties": false
  18398. }
  18399. },
  18400. "required": ["id", "type", "properties"],
  18401. "additionalProperties": false
  18402. },
  18403. "EventMcpToolsChanged": {
  18404. "type": "object",
  18405. "properties": {
  18406. "id": {
  18407. "type": "string"
  18408. },
  18409. "type": {
  18410. "type": "string",
  18411. "enum": ["mcp.tools.changed"]
  18412. },
  18413. "properties": {
  18414. "type": "object",
  18415. "properties": {
  18416. "server": {
  18417. "type": "string"
  18418. }
  18419. },
  18420. "required": ["server"],
  18421. "additionalProperties": false
  18422. }
  18423. },
  18424. "required": ["id", "type", "properties"],
  18425. "additionalProperties": false
  18426. },
  18427. "EventMcpBrowserOpenFailed": {
  18428. "type": "object",
  18429. "properties": {
  18430. "id": {
  18431. "type": "string"
  18432. },
  18433. "type": {
  18434. "type": "string",
  18435. "enum": ["mcp.browser.open.failed"]
  18436. },
  18437. "properties": {
  18438. "type": "object",
  18439. "properties": {
  18440. "mcpName": {
  18441. "type": "string"
  18442. },
  18443. "url": {
  18444. "type": "string"
  18445. }
  18446. },
  18447. "required": ["mcpName", "url"],
  18448. "additionalProperties": false
  18449. }
  18450. },
  18451. "required": ["id", "type", "properties"],
  18452. "additionalProperties": false
  18453. },
  18454. "EventCommandExecuted": {
  18455. "type": "object",
  18456. "properties": {
  18457. "id": {
  18458. "type": "string"
  18459. },
  18460. "type": {
  18461. "type": "string",
  18462. "enum": ["command.executed"]
  18463. },
  18464. "properties": {
  18465. "type": "object",
  18466. "properties": {
  18467. "name": {
  18468. "type": "string"
  18469. },
  18470. "sessionID": {
  18471. "type": "string",
  18472. "pattern": "^ses"
  18473. },
  18474. "arguments": {
  18475. "type": "string"
  18476. },
  18477. "messageID": {
  18478. "type": "string",
  18479. "pattern": "^msg"
  18480. }
  18481. },
  18482. "required": ["name", "sessionID", "arguments", "messageID"],
  18483. "additionalProperties": false
  18484. }
  18485. },
  18486. "required": ["id", "type", "properties"],
  18487. "additionalProperties": false
  18488. },
  18489. "EventProjectUpdated": {
  18490. "type": "object",
  18491. "properties": {
  18492. "id": {
  18493. "type": "string"
  18494. },
  18495. "type": {
  18496. "type": "string",
  18497. "enum": ["project.updated"]
  18498. },
  18499. "properties": {
  18500. "$ref": "#/components/schemas/Project"
  18501. }
  18502. },
  18503. "required": ["id", "type", "properties"],
  18504. "additionalProperties": false
  18505. },
  18506. "EventSessionCompacted": {
  18507. "type": "object",
  18508. "properties": {
  18509. "id": {
  18510. "type": "string"
  18511. },
  18512. "type": {
  18513. "type": "string",
  18514. "enum": ["session.compacted"]
  18515. },
  18516. "properties": {
  18517. "type": "object",
  18518. "properties": {
  18519. "sessionID": {
  18520. "type": "string",
  18521. "pattern": "^ses"
  18522. }
  18523. },
  18524. "required": ["sessionID"],
  18525. "additionalProperties": false
  18526. }
  18527. },
  18528. "required": ["id", "type", "properties"],
  18529. "additionalProperties": false
  18530. },
  18531. "EventVcsBranchUpdated": {
  18532. "type": "object",
  18533. "properties": {
  18534. "id": {
  18535. "type": "string"
  18536. },
  18537. "type": {
  18538. "type": "string",
  18539. "enum": ["vcs.branch.updated"]
  18540. },
  18541. "properties": {
  18542. "type": "object",
  18543. "properties": {
  18544. "branch": {
  18545. "type": "string"
  18546. }
  18547. },
  18548. "additionalProperties": false
  18549. }
  18550. },
  18551. "required": ["id", "type", "properties"],
  18552. "additionalProperties": false
  18553. },
  18554. "EventWorkspaceReady": {
  18555. "type": "object",
  18556. "properties": {
  18557. "id": {
  18558. "type": "string"
  18559. },
  18560. "type": {
  18561. "type": "string",
  18562. "enum": ["workspace.ready"]
  18563. },
  18564. "properties": {
  18565. "type": "object",
  18566. "properties": {
  18567. "name": {
  18568. "type": "string"
  18569. }
  18570. },
  18571. "required": ["name"],
  18572. "additionalProperties": false
  18573. }
  18574. },
  18575. "required": ["id", "type", "properties"],
  18576. "additionalProperties": false
  18577. },
  18578. "EventWorkspaceFailed": {
  18579. "type": "object",
  18580. "properties": {
  18581. "id": {
  18582. "type": "string"
  18583. },
  18584. "type": {
  18585. "type": "string",
  18586. "enum": ["workspace.failed"]
  18587. },
  18588. "properties": {
  18589. "type": "object",
  18590. "properties": {
  18591. "message": {
  18592. "type": "string"
  18593. }
  18594. },
  18595. "required": ["message"],
  18596. "additionalProperties": false
  18597. }
  18598. },
  18599. "required": ["id", "type", "properties"],
  18600. "additionalProperties": false
  18601. },
  18602. "EventWorkspaceStatus": {
  18603. "type": "object",
  18604. "properties": {
  18605. "id": {
  18606. "type": "string"
  18607. },
  18608. "type": {
  18609. "type": "string",
  18610. "enum": ["workspace.status"]
  18611. },
  18612. "properties": {
  18613. "type": "object",
  18614. "properties": {
  18615. "workspaceID": {
  18616. "type": "string",
  18617. "pattern": "^wrk"
  18618. },
  18619. "status": {
  18620. "type": "string",
  18621. "enum": ["connected", "connecting", "disconnected", "error"]
  18622. }
  18623. },
  18624. "required": ["workspaceID", "status"],
  18625. "additionalProperties": false
  18626. }
  18627. },
  18628. "required": ["id", "type", "properties"],
  18629. "additionalProperties": false
  18630. },
  18631. "EventWorktreeReady": {
  18632. "type": "object",
  18633. "properties": {
  18634. "id": {
  18635. "type": "string"
  18636. },
  18637. "type": {
  18638. "type": "string",
  18639. "enum": ["worktree.ready"]
  18640. },
  18641. "properties": {
  18642. "type": "object",
  18643. "properties": {
  18644. "name": {
  18645. "type": "string"
  18646. },
  18647. "branch": {
  18648. "type": "string"
  18649. }
  18650. },
  18651. "required": ["name"],
  18652. "additionalProperties": false
  18653. }
  18654. },
  18655. "required": ["id", "type", "properties"],
  18656. "additionalProperties": false
  18657. },
  18658. "EventWorktreeFailed": {
  18659. "type": "object",
  18660. "properties": {
  18661. "id": {
  18662. "type": "string"
  18663. },
  18664. "type": {
  18665. "type": "string",
  18666. "enum": ["worktree.failed"]
  18667. },
  18668. "properties": {
  18669. "type": "object",
  18670. "properties": {
  18671. "message": {
  18672. "type": "string"
  18673. }
  18674. },
  18675. "required": ["message"],
  18676. "additionalProperties": false
  18677. }
  18678. },
  18679. "required": ["id", "type", "properties"],
  18680. "additionalProperties": false
  18681. },
  18682. "EventPtyCreated": {
  18683. "type": "object",
  18684. "properties": {
  18685. "id": {
  18686. "type": "string"
  18687. },
  18688. "type": {
  18689. "type": "string",
  18690. "enum": ["pty.created"]
  18691. },
  18692. "properties": {
  18693. "type": "object",
  18694. "properties": {
  18695. "info": {
  18696. "$ref": "#/components/schemas/Pty"
  18697. }
  18698. },
  18699. "required": ["info"],
  18700. "additionalProperties": false
  18701. }
  18702. },
  18703. "required": ["id", "type", "properties"],
  18704. "additionalProperties": false
  18705. },
  18706. "EventPtyUpdated": {
  18707. "type": "object",
  18708. "properties": {
  18709. "id": {
  18710. "type": "string"
  18711. },
  18712. "type": {
  18713. "type": "string",
  18714. "enum": ["pty.updated"]
  18715. },
  18716. "properties": {
  18717. "type": "object",
  18718. "properties": {
  18719. "info": {
  18720. "$ref": "#/components/schemas/Pty"
  18721. }
  18722. },
  18723. "required": ["info"],
  18724. "additionalProperties": false
  18725. }
  18726. },
  18727. "required": ["id", "type", "properties"],
  18728. "additionalProperties": false
  18729. },
  18730. "EventPtyExited": {
  18731. "type": "object",
  18732. "properties": {
  18733. "id": {
  18734. "type": "string"
  18735. },
  18736. "type": {
  18737. "type": "string",
  18738. "enum": ["pty.exited"]
  18739. },
  18740. "properties": {
  18741. "type": "object",
  18742. "properties": {
  18743. "id": {
  18744. "type": "string",
  18745. "pattern": "^pty"
  18746. },
  18747. "exitCode": {
  18748. "type": "integer",
  18749. "minimum": 0
  18750. }
  18751. },
  18752. "required": ["id", "exitCode"],
  18753. "additionalProperties": false
  18754. }
  18755. },
  18756. "required": ["id", "type", "properties"],
  18757. "additionalProperties": false
  18758. },
  18759. "EventPtyDeleted": {
  18760. "type": "object",
  18761. "properties": {
  18762. "id": {
  18763. "type": "string"
  18764. },
  18765. "type": {
  18766. "type": "string",
  18767. "enum": ["pty.deleted"]
  18768. },
  18769. "properties": {
  18770. "type": "object",
  18771. "properties": {
  18772. "id": {
  18773. "type": "string",
  18774. "pattern": "^pty"
  18775. }
  18776. },
  18777. "required": ["id"],
  18778. "additionalProperties": false
  18779. }
  18780. },
  18781. "required": ["id", "type", "properties"],
  18782. "additionalProperties": false
  18783. },
  18784. "EventInstallationUpdated": {
  18785. "type": "object",
  18786. "properties": {
  18787. "id": {
  18788. "type": "string"
  18789. },
  18790. "type": {
  18791. "type": "string",
  18792. "enum": ["installation.updated"]
  18793. },
  18794. "properties": {
  18795. "type": "object",
  18796. "properties": {
  18797. "version": {
  18798. "type": "string"
  18799. }
  18800. },
  18801. "required": ["version"],
  18802. "additionalProperties": false
  18803. }
  18804. },
  18805. "required": ["id", "type", "properties"],
  18806. "additionalProperties": false
  18807. },
  18808. "EventInstallationUpdate-available": {
  18809. "type": "object",
  18810. "properties": {
  18811. "id": {
  18812. "type": "string"
  18813. },
  18814. "type": {
  18815. "type": "string",
  18816. "enum": ["installation.update-available"]
  18817. },
  18818. "properties": {
  18819. "type": "object",
  18820. "properties": {
  18821. "version": {
  18822. "type": "string"
  18823. }
  18824. },
  18825. "required": ["version"],
  18826. "additionalProperties": false
  18827. }
  18828. },
  18829. "required": ["id", "type", "properties"],
  18830. "additionalProperties": false
  18831. },
  18832. "EventMessageUpdated": {
  18833. "type": "object",
  18834. "properties": {
  18835. "id": {
  18836. "type": "string"
  18837. },
  18838. "type": {
  18839. "type": "string",
  18840. "enum": ["message.updated"]
  18841. },
  18842. "properties": {
  18843. "type": "object",
  18844. "properties": {
  18845. "sessionID": {
  18846. "type": "string",
  18847. "pattern": "^ses"
  18848. },
  18849. "info": {
  18850. "$ref": "#/components/schemas/Message"
  18851. }
  18852. },
  18853. "required": ["sessionID", "info"],
  18854. "additionalProperties": false
  18855. }
  18856. },
  18857. "required": ["id", "type", "properties"],
  18858. "additionalProperties": false
  18859. },
  18860. "EventMessageRemoved": {
  18861. "type": "object",
  18862. "properties": {
  18863. "id": {
  18864. "type": "string"
  18865. },
  18866. "type": {
  18867. "type": "string",
  18868. "enum": ["message.removed"]
  18869. },
  18870. "properties": {
  18871. "type": "object",
  18872. "properties": {
  18873. "sessionID": {
  18874. "type": "string",
  18875. "pattern": "^ses"
  18876. },
  18877. "messageID": {
  18878. "type": "string",
  18879. "pattern": "^msg"
  18880. }
  18881. },
  18882. "required": ["sessionID", "messageID"],
  18883. "additionalProperties": false
  18884. }
  18885. },
  18886. "required": ["id", "type", "properties"],
  18887. "additionalProperties": false
  18888. },
  18889. "EventMessagePartUpdated": {
  18890. "type": "object",
  18891. "properties": {
  18892. "id": {
  18893. "type": "string"
  18894. },
  18895. "type": {
  18896. "type": "string",
  18897. "enum": ["message.part.updated"]
  18898. },
  18899. "properties": {
  18900. "type": "object",
  18901. "properties": {
  18902. "sessionID": {
  18903. "type": "string",
  18904. "pattern": "^ses"
  18905. },
  18906. "part": {
  18907. "$ref": "#/components/schemas/Part"
  18908. },
  18909. "time": {
  18910. "type": "integer",
  18911. "minimum": 0
  18912. }
  18913. },
  18914. "required": ["sessionID", "part", "time"],
  18915. "additionalProperties": false
  18916. }
  18917. },
  18918. "required": ["id", "type", "properties"],
  18919. "additionalProperties": false
  18920. },
  18921. "EventMessagePartRemoved": {
  18922. "type": "object",
  18923. "properties": {
  18924. "id": {
  18925. "type": "string"
  18926. },
  18927. "type": {
  18928. "type": "string",
  18929. "enum": ["message.part.removed"]
  18930. },
  18931. "properties": {
  18932. "type": "object",
  18933. "properties": {
  18934. "sessionID": {
  18935. "type": "string",
  18936. "pattern": "^ses"
  18937. },
  18938. "messageID": {
  18939. "type": "string",
  18940. "pattern": "^msg"
  18941. },
  18942. "partID": {
  18943. "type": "string",
  18944. "pattern": "^prt"
  18945. }
  18946. },
  18947. "required": ["sessionID", "messageID", "partID"],
  18948. "additionalProperties": false
  18949. }
  18950. },
  18951. "required": ["id", "type", "properties"],
  18952. "additionalProperties": false
  18953. },
  18954. "EventSessionCreated": {
  18955. "type": "object",
  18956. "properties": {
  18957. "id": {
  18958. "type": "string"
  18959. },
  18960. "type": {
  18961. "type": "string",
  18962. "enum": ["session.created"]
  18963. },
  18964. "properties": {
  18965. "type": "object",
  18966. "properties": {
  18967. "sessionID": {
  18968. "type": "string",
  18969. "pattern": "^ses"
  18970. },
  18971. "info": {
  18972. "$ref": "#/components/schemas/Session"
  18973. }
  18974. },
  18975. "required": ["sessionID", "info"],
  18976. "additionalProperties": false
  18977. }
  18978. },
  18979. "required": ["id", "type", "properties"],
  18980. "additionalProperties": false
  18981. },
  18982. "EventSessionUpdated": {
  18983. "type": "object",
  18984. "properties": {
  18985. "id": {
  18986. "type": "string"
  18987. },
  18988. "type": {
  18989. "type": "string",
  18990. "enum": ["session.updated"]
  18991. },
  18992. "properties": {
  18993. "type": "object",
  18994. "properties": {
  18995. "sessionID": {
  18996. "type": "string",
  18997. "pattern": "^ses"
  18998. },
  18999. "info": {
  19000. "$ref": "#/components/schemas/Session"
  19001. }
  19002. },
  19003. "required": ["sessionID", "info"],
  19004. "additionalProperties": false
  19005. }
  19006. },
  19007. "required": ["id", "type", "properties"],
  19008. "additionalProperties": false
  19009. },
  19010. "EventSessionDeleted": {
  19011. "type": "object",
  19012. "properties": {
  19013. "id": {
  19014. "type": "string"
  19015. },
  19016. "type": {
  19017. "type": "string",
  19018. "enum": ["session.deleted"]
  19019. },
  19020. "properties": {
  19021. "type": "object",
  19022. "properties": {
  19023. "sessionID": {
  19024. "type": "string",
  19025. "pattern": "^ses"
  19026. },
  19027. "info": {
  19028. "$ref": "#/components/schemas/Session"
  19029. }
  19030. },
  19031. "required": ["sessionID", "info"],
  19032. "additionalProperties": false
  19033. }
  19034. },
  19035. "required": ["id", "type", "properties"],
  19036. "additionalProperties": false
  19037. },
  19038. "EventSessionNextAgentSwitched": {
  19039. "type": "object",
  19040. "properties": {
  19041. "id": {
  19042. "type": "string"
  19043. },
  19044. "type": {
  19045. "type": "string",
  19046. "enum": ["session.next.agent.switched"]
  19047. },
  19048. "properties": {
  19049. "type": "object",
  19050. "properties": {
  19051. "timestamp": {
  19052. "type": "number"
  19053. },
  19054. "sessionID": {
  19055. "type": "string",
  19056. "pattern": "^ses"
  19057. },
  19058. "agent": {
  19059. "type": "string"
  19060. }
  19061. },
  19062. "required": ["timestamp", "sessionID", "agent"],
  19063. "additionalProperties": false
  19064. }
  19065. },
  19066. "required": ["id", "type", "properties"],
  19067. "additionalProperties": false
  19068. },
  19069. "EventSessionNextModelSwitched": {
  19070. "type": "object",
  19071. "properties": {
  19072. "id": {
  19073. "type": "string"
  19074. },
  19075. "type": {
  19076. "type": "string",
  19077. "enum": ["session.next.model.switched"]
  19078. },
  19079. "properties": {
  19080. "type": "object",
  19081. "properties": {
  19082. "timestamp": {
  19083. "type": "number"
  19084. },
  19085. "sessionID": {
  19086. "type": "string",
  19087. "pattern": "^ses"
  19088. },
  19089. "model": {
  19090. "type": "object",
  19091. "properties": {
  19092. "id": {
  19093. "type": "string"
  19094. },
  19095. "providerID": {
  19096. "type": "string"
  19097. },
  19098. "variant": {
  19099. "type": "string"
  19100. }
  19101. },
  19102. "required": ["id", "providerID", "variant"],
  19103. "additionalProperties": false
  19104. }
  19105. },
  19106. "required": ["timestamp", "sessionID", "model"],
  19107. "additionalProperties": false
  19108. }
  19109. },
  19110. "required": ["id", "type", "properties"],
  19111. "additionalProperties": false
  19112. },
  19113. "PromptSource": {
  19114. "type": "object",
  19115. "properties": {
  19116. "start": {
  19117. "type": "number"
  19118. },
  19119. "end": {
  19120. "type": "number"
  19121. },
  19122. "text": {
  19123. "type": "string"
  19124. }
  19125. },
  19126. "required": ["start", "end", "text"],
  19127. "additionalProperties": false
  19128. },
  19129. "PromptFileAttachment": {
  19130. "type": "object",
  19131. "properties": {
  19132. "uri": {
  19133. "type": "string"
  19134. },
  19135. "mime": {
  19136. "type": "string"
  19137. },
  19138. "name": {
  19139. "type": "string"
  19140. },
  19141. "description": {
  19142. "type": "string"
  19143. },
  19144. "source": {
  19145. "$ref": "#/components/schemas/PromptSource"
  19146. }
  19147. },
  19148. "required": ["uri", "mime"],
  19149. "additionalProperties": false
  19150. },
  19151. "PromptAgentAttachment": {
  19152. "type": "object",
  19153. "properties": {
  19154. "name": {
  19155. "type": "string"
  19156. },
  19157. "source": {
  19158. "$ref": "#/components/schemas/PromptSource"
  19159. }
  19160. },
  19161. "required": ["name"],
  19162. "additionalProperties": false
  19163. },
  19164. "PromptReferenceAttachment": {
  19165. "type": "object",
  19166. "properties": {
  19167. "name": {
  19168. "type": "string"
  19169. },
  19170. "kind": {
  19171. "type": "string",
  19172. "enum": ["local", "git", "invalid"]
  19173. },
  19174. "uri": {
  19175. "type": "string"
  19176. },
  19177. "repository": {
  19178. "type": "string"
  19179. },
  19180. "branch": {
  19181. "type": "string"
  19182. },
  19183. "target": {
  19184. "type": "string"
  19185. },
  19186. "targetUri": {
  19187. "type": "string"
  19188. },
  19189. "problem": {
  19190. "type": "string"
  19191. },
  19192. "source": {
  19193. "$ref": "#/components/schemas/PromptSource"
  19194. }
  19195. },
  19196. "required": ["name", "kind"],
  19197. "additionalProperties": false
  19198. },
  19199. "EventSessionNextPrompted": {
  19200. "type": "object",
  19201. "properties": {
  19202. "id": {
  19203. "type": "string"
  19204. },
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["session.next.prompted"]
  19208. },
  19209. "properties": {
  19210. "type": "object",
  19211. "properties": {
  19212. "timestamp": {
  19213. "type": "number"
  19214. },
  19215. "sessionID": {
  19216. "type": "string",
  19217. "pattern": "^ses"
  19218. },
  19219. "prompt": {
  19220. "$ref": "#/components/schemas/Prompt"
  19221. }
  19222. },
  19223. "required": ["timestamp", "sessionID", "prompt"],
  19224. "additionalProperties": false
  19225. }
  19226. },
  19227. "required": ["id", "type", "properties"],
  19228. "additionalProperties": false
  19229. },
  19230. "EventSessionNextSynthetic": {
  19231. "type": "object",
  19232. "properties": {
  19233. "id": {
  19234. "type": "string"
  19235. },
  19236. "type": {
  19237. "type": "string",
  19238. "enum": ["session.next.synthetic"]
  19239. },
  19240. "properties": {
  19241. "type": "object",
  19242. "properties": {
  19243. "timestamp": {
  19244. "type": "number"
  19245. },
  19246. "sessionID": {
  19247. "type": "string",
  19248. "pattern": "^ses"
  19249. },
  19250. "text": {
  19251. "type": "string"
  19252. }
  19253. },
  19254. "required": ["timestamp", "sessionID", "text"],
  19255. "additionalProperties": false
  19256. }
  19257. },
  19258. "required": ["id", "type", "properties"],
  19259. "additionalProperties": false
  19260. },
  19261. "EventSessionNextShellStarted": {
  19262. "type": "object",
  19263. "properties": {
  19264. "id": {
  19265. "type": "string"
  19266. },
  19267. "type": {
  19268. "type": "string",
  19269. "enum": ["session.next.shell.started"]
  19270. },
  19271. "properties": {
  19272. "type": "object",
  19273. "properties": {
  19274. "timestamp": {
  19275. "type": "number"
  19276. },
  19277. "sessionID": {
  19278. "type": "string",
  19279. "pattern": "^ses"
  19280. },
  19281. "callID": {
  19282. "type": "string"
  19283. },
  19284. "command": {
  19285. "type": "string"
  19286. }
  19287. },
  19288. "required": ["timestamp", "sessionID", "callID", "command"],
  19289. "additionalProperties": false
  19290. }
  19291. },
  19292. "required": ["id", "type", "properties"],
  19293. "additionalProperties": false
  19294. },
  19295. "EventSessionNextShellEnded": {
  19296. "type": "object",
  19297. "properties": {
  19298. "id": {
  19299. "type": "string"
  19300. },
  19301. "type": {
  19302. "type": "string",
  19303. "enum": ["session.next.shell.ended"]
  19304. },
  19305. "properties": {
  19306. "type": "object",
  19307. "properties": {
  19308. "timestamp": {
  19309. "type": "number"
  19310. },
  19311. "sessionID": {
  19312. "type": "string",
  19313. "pattern": "^ses"
  19314. },
  19315. "callID": {
  19316. "type": "string"
  19317. },
  19318. "output": {
  19319. "type": "string"
  19320. }
  19321. },
  19322. "required": ["timestamp", "sessionID", "callID", "output"],
  19323. "additionalProperties": false
  19324. }
  19325. },
  19326. "required": ["id", "type", "properties"],
  19327. "additionalProperties": false
  19328. },
  19329. "EventSessionNextStepStarted": {
  19330. "type": "object",
  19331. "properties": {
  19332. "id": {
  19333. "type": "string"
  19334. },
  19335. "type": {
  19336. "type": "string",
  19337. "enum": ["session.next.step.started"]
  19338. },
  19339. "properties": {
  19340. "type": "object",
  19341. "properties": {
  19342. "timestamp": {
  19343. "type": "number"
  19344. },
  19345. "sessionID": {
  19346. "type": "string",
  19347. "pattern": "^ses"
  19348. },
  19349. "agent": {
  19350. "type": "string"
  19351. },
  19352. "model": {
  19353. "type": "object",
  19354. "properties": {
  19355. "id": {
  19356. "type": "string"
  19357. },
  19358. "providerID": {
  19359. "type": "string"
  19360. },
  19361. "variant": {
  19362. "type": "string"
  19363. }
  19364. },
  19365. "required": ["id", "providerID", "variant"],
  19366. "additionalProperties": false
  19367. },
  19368. "snapshot": {
  19369. "type": "string"
  19370. }
  19371. },
  19372. "required": ["timestamp", "sessionID", "agent", "model"],
  19373. "additionalProperties": false
  19374. }
  19375. },
  19376. "required": ["id", "type", "properties"],
  19377. "additionalProperties": false
  19378. },
  19379. "EventSessionNextStepEnded": {
  19380. "type": "object",
  19381. "properties": {
  19382. "id": {
  19383. "type": "string"
  19384. },
  19385. "type": {
  19386. "type": "string",
  19387. "enum": ["session.next.step.ended"]
  19388. },
  19389. "properties": {
  19390. "type": "object",
  19391. "properties": {
  19392. "timestamp": {
  19393. "type": "number"
  19394. },
  19395. "sessionID": {
  19396. "type": "string",
  19397. "pattern": "^ses"
  19398. },
  19399. "finish": {
  19400. "type": "string"
  19401. },
  19402. "cost": {
  19403. "type": "number"
  19404. },
  19405. "tokens": {
  19406. "type": "object",
  19407. "properties": {
  19408. "input": {
  19409. "type": "number"
  19410. },
  19411. "output": {
  19412. "type": "number"
  19413. },
  19414. "reasoning": {
  19415. "type": "number"
  19416. },
  19417. "cache": {
  19418. "type": "object",
  19419. "properties": {
  19420. "read": {
  19421. "type": "number"
  19422. },
  19423. "write": {
  19424. "type": "number"
  19425. }
  19426. },
  19427. "required": ["read", "write"],
  19428. "additionalProperties": false
  19429. }
  19430. },
  19431. "required": ["input", "output", "reasoning", "cache"],
  19432. "additionalProperties": false
  19433. },
  19434. "snapshot": {
  19435. "type": "string"
  19436. }
  19437. },
  19438. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19439. "additionalProperties": false
  19440. }
  19441. },
  19442. "required": ["id", "type", "properties"],
  19443. "additionalProperties": false
  19444. },
  19445. "SessionErrorUnknown": {
  19446. "type": "object",
  19447. "properties": {
  19448. "type": {
  19449. "type": "string",
  19450. "enum": ["unknown"]
  19451. },
  19452. "message": {
  19453. "type": "string"
  19454. }
  19455. },
  19456. "required": ["type", "message"],
  19457. "additionalProperties": false
  19458. },
  19459. "EventSessionNextStepFailed": {
  19460. "type": "object",
  19461. "properties": {
  19462. "id": {
  19463. "type": "string"
  19464. },
  19465. "type": {
  19466. "type": "string",
  19467. "enum": ["session.next.step.failed"]
  19468. },
  19469. "properties": {
  19470. "type": "object",
  19471. "properties": {
  19472. "timestamp": {
  19473. "type": "number"
  19474. },
  19475. "sessionID": {
  19476. "type": "string",
  19477. "pattern": "^ses"
  19478. },
  19479. "error": {
  19480. "$ref": "#/components/schemas/SessionErrorUnknown"
  19481. }
  19482. },
  19483. "required": ["timestamp", "sessionID", "error"],
  19484. "additionalProperties": false
  19485. }
  19486. },
  19487. "required": ["id", "type", "properties"],
  19488. "additionalProperties": false
  19489. },
  19490. "EventSessionNextTextStarted": {
  19491. "type": "object",
  19492. "properties": {
  19493. "id": {
  19494. "type": "string"
  19495. },
  19496. "type": {
  19497. "type": "string",
  19498. "enum": ["session.next.text.started"]
  19499. },
  19500. "properties": {
  19501. "type": "object",
  19502. "properties": {
  19503. "timestamp": {
  19504. "type": "number"
  19505. },
  19506. "sessionID": {
  19507. "type": "string",
  19508. "pattern": "^ses"
  19509. }
  19510. },
  19511. "required": ["timestamp", "sessionID"],
  19512. "additionalProperties": false
  19513. }
  19514. },
  19515. "required": ["id", "type", "properties"],
  19516. "additionalProperties": false
  19517. },
  19518. "EventSessionNextTextDelta": {
  19519. "type": "object",
  19520. "properties": {
  19521. "id": {
  19522. "type": "string"
  19523. },
  19524. "type": {
  19525. "type": "string",
  19526. "enum": ["session.next.text.delta"]
  19527. },
  19528. "properties": {
  19529. "type": "object",
  19530. "properties": {
  19531. "timestamp": {
  19532. "type": "number"
  19533. },
  19534. "sessionID": {
  19535. "type": "string",
  19536. "pattern": "^ses"
  19537. },
  19538. "delta": {
  19539. "type": "string"
  19540. }
  19541. },
  19542. "required": ["timestamp", "sessionID", "delta"],
  19543. "additionalProperties": false
  19544. }
  19545. },
  19546. "required": ["id", "type", "properties"],
  19547. "additionalProperties": false
  19548. },
  19549. "EventSessionNextTextEnded": {
  19550. "type": "object",
  19551. "properties": {
  19552. "id": {
  19553. "type": "string"
  19554. },
  19555. "type": {
  19556. "type": "string",
  19557. "enum": ["session.next.text.ended"]
  19558. },
  19559. "properties": {
  19560. "type": "object",
  19561. "properties": {
  19562. "timestamp": {
  19563. "type": "number"
  19564. },
  19565. "sessionID": {
  19566. "type": "string",
  19567. "pattern": "^ses"
  19568. },
  19569. "text": {
  19570. "type": "string"
  19571. }
  19572. },
  19573. "required": ["timestamp", "sessionID", "text"],
  19574. "additionalProperties": false
  19575. }
  19576. },
  19577. "required": ["id", "type", "properties"],
  19578. "additionalProperties": false
  19579. },
  19580. "EventSessionNextReasoningStarted": {
  19581. "type": "object",
  19582. "properties": {
  19583. "id": {
  19584. "type": "string"
  19585. },
  19586. "type": {
  19587. "type": "string",
  19588. "enum": ["session.next.reasoning.started"]
  19589. },
  19590. "properties": {
  19591. "type": "object",
  19592. "properties": {
  19593. "timestamp": {
  19594. "type": "number"
  19595. },
  19596. "sessionID": {
  19597. "type": "string",
  19598. "pattern": "^ses"
  19599. },
  19600. "reasoningID": {
  19601. "type": "string"
  19602. }
  19603. },
  19604. "required": ["timestamp", "sessionID", "reasoningID"],
  19605. "additionalProperties": false
  19606. }
  19607. },
  19608. "required": ["id", "type", "properties"],
  19609. "additionalProperties": false
  19610. },
  19611. "EventSessionNextReasoningDelta": {
  19612. "type": "object",
  19613. "properties": {
  19614. "id": {
  19615. "type": "string"
  19616. },
  19617. "type": {
  19618. "type": "string",
  19619. "enum": ["session.next.reasoning.delta"]
  19620. },
  19621. "properties": {
  19622. "type": "object",
  19623. "properties": {
  19624. "timestamp": {
  19625. "type": "number"
  19626. },
  19627. "sessionID": {
  19628. "type": "string",
  19629. "pattern": "^ses"
  19630. },
  19631. "reasoningID": {
  19632. "type": "string"
  19633. },
  19634. "delta": {
  19635. "type": "string"
  19636. }
  19637. },
  19638. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19639. "additionalProperties": false
  19640. }
  19641. },
  19642. "required": ["id", "type", "properties"],
  19643. "additionalProperties": false
  19644. },
  19645. "EventSessionNextReasoningEnded": {
  19646. "type": "object",
  19647. "properties": {
  19648. "id": {
  19649. "type": "string"
  19650. },
  19651. "type": {
  19652. "type": "string",
  19653. "enum": ["session.next.reasoning.ended"]
  19654. },
  19655. "properties": {
  19656. "type": "object",
  19657. "properties": {
  19658. "timestamp": {
  19659. "type": "number"
  19660. },
  19661. "sessionID": {
  19662. "type": "string",
  19663. "pattern": "^ses"
  19664. },
  19665. "reasoningID": {
  19666. "type": "string"
  19667. },
  19668. "text": {
  19669. "type": "string"
  19670. }
  19671. },
  19672. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19673. "additionalProperties": false
  19674. }
  19675. },
  19676. "required": ["id", "type", "properties"],
  19677. "additionalProperties": false
  19678. },
  19679. "EventSessionNextToolInputStarted": {
  19680. "type": "object",
  19681. "properties": {
  19682. "id": {
  19683. "type": "string"
  19684. },
  19685. "type": {
  19686. "type": "string",
  19687. "enum": ["session.next.tool.input.started"]
  19688. },
  19689. "properties": {
  19690. "type": "object",
  19691. "properties": {
  19692. "timestamp": {
  19693. "type": "number"
  19694. },
  19695. "sessionID": {
  19696. "type": "string",
  19697. "pattern": "^ses"
  19698. },
  19699. "callID": {
  19700. "type": "string"
  19701. },
  19702. "name": {
  19703. "type": "string"
  19704. }
  19705. },
  19706. "required": ["timestamp", "sessionID", "callID", "name"],
  19707. "additionalProperties": false
  19708. }
  19709. },
  19710. "required": ["id", "type", "properties"],
  19711. "additionalProperties": false
  19712. },
  19713. "EventSessionNextToolInputDelta": {
  19714. "type": "object",
  19715. "properties": {
  19716. "id": {
  19717. "type": "string"
  19718. },
  19719. "type": {
  19720. "type": "string",
  19721. "enum": ["session.next.tool.input.delta"]
  19722. },
  19723. "properties": {
  19724. "type": "object",
  19725. "properties": {
  19726. "timestamp": {
  19727. "type": "number"
  19728. },
  19729. "sessionID": {
  19730. "type": "string",
  19731. "pattern": "^ses"
  19732. },
  19733. "callID": {
  19734. "type": "string"
  19735. },
  19736. "delta": {
  19737. "type": "string"
  19738. }
  19739. },
  19740. "required": ["timestamp", "sessionID", "callID", "delta"],
  19741. "additionalProperties": false
  19742. }
  19743. },
  19744. "required": ["id", "type", "properties"],
  19745. "additionalProperties": false
  19746. },
  19747. "EventSessionNextToolInputEnded": {
  19748. "type": "object",
  19749. "properties": {
  19750. "id": {
  19751. "type": "string"
  19752. },
  19753. "type": {
  19754. "type": "string",
  19755. "enum": ["session.next.tool.input.ended"]
  19756. },
  19757. "properties": {
  19758. "type": "object",
  19759. "properties": {
  19760. "timestamp": {
  19761. "type": "number"
  19762. },
  19763. "sessionID": {
  19764. "type": "string",
  19765. "pattern": "^ses"
  19766. },
  19767. "callID": {
  19768. "type": "string"
  19769. },
  19770. "text": {
  19771. "type": "string"
  19772. }
  19773. },
  19774. "required": ["timestamp", "sessionID", "callID", "text"],
  19775. "additionalProperties": false
  19776. }
  19777. },
  19778. "required": ["id", "type", "properties"],
  19779. "additionalProperties": false
  19780. },
  19781. "EventSessionNextToolCalled": {
  19782. "type": "object",
  19783. "properties": {
  19784. "id": {
  19785. "type": "string"
  19786. },
  19787. "type": {
  19788. "type": "string",
  19789. "enum": ["session.next.tool.called"]
  19790. },
  19791. "properties": {
  19792. "type": "object",
  19793. "properties": {
  19794. "timestamp": {
  19795. "type": "number"
  19796. },
  19797. "sessionID": {
  19798. "type": "string",
  19799. "pattern": "^ses"
  19800. },
  19801. "callID": {
  19802. "type": "string"
  19803. },
  19804. "tool": {
  19805. "type": "string"
  19806. },
  19807. "input": {
  19808. "type": "object"
  19809. },
  19810. "provider": {
  19811. "type": "object",
  19812. "properties": {
  19813. "executed": {
  19814. "type": "boolean"
  19815. },
  19816. "metadata": {
  19817. "type": "object"
  19818. }
  19819. },
  19820. "required": ["executed"],
  19821. "additionalProperties": false
  19822. }
  19823. },
  19824. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19825. "additionalProperties": false
  19826. }
  19827. },
  19828. "required": ["id", "type", "properties"],
  19829. "additionalProperties": false
  19830. },
  19831. "ToolTextContent": {
  19832. "type": "object",
  19833. "properties": {
  19834. "type": {
  19835. "type": "string",
  19836. "enum": ["text"]
  19837. },
  19838. "text": {
  19839. "type": "string"
  19840. }
  19841. },
  19842. "required": ["type", "text"],
  19843. "additionalProperties": false
  19844. },
  19845. "ToolFileContent": {
  19846. "type": "object",
  19847. "properties": {
  19848. "type": {
  19849. "type": "string",
  19850. "enum": ["file"]
  19851. },
  19852. "uri": {
  19853. "type": "string"
  19854. },
  19855. "mime": {
  19856. "type": "string"
  19857. },
  19858. "name": {
  19859. "type": "string"
  19860. }
  19861. },
  19862. "required": ["type", "uri", "mime"],
  19863. "additionalProperties": false
  19864. },
  19865. "EventSessionNextToolProgress": {
  19866. "type": "object",
  19867. "properties": {
  19868. "id": {
  19869. "type": "string"
  19870. },
  19871. "type": {
  19872. "type": "string",
  19873. "enum": ["session.next.tool.progress"]
  19874. },
  19875. "properties": {
  19876. "type": "object",
  19877. "properties": {
  19878. "timestamp": {
  19879. "type": "number"
  19880. },
  19881. "sessionID": {
  19882. "type": "string",
  19883. "pattern": "^ses"
  19884. },
  19885. "callID": {
  19886. "type": "string"
  19887. },
  19888. "structured": {
  19889. "type": "object"
  19890. },
  19891. "content": {
  19892. "type": "array",
  19893. "items": {
  19894. "anyOf": [
  19895. {
  19896. "$ref": "#/components/schemas/ToolTextContent"
  19897. },
  19898. {
  19899. "$ref": "#/components/schemas/ToolFileContent"
  19900. }
  19901. ]
  19902. }
  19903. }
  19904. },
  19905. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19906. "additionalProperties": false
  19907. }
  19908. },
  19909. "required": ["id", "type", "properties"],
  19910. "additionalProperties": false
  19911. },
  19912. "EventSessionNextToolSuccess": {
  19913. "type": "object",
  19914. "properties": {
  19915. "id": {
  19916. "type": "string"
  19917. },
  19918. "type": {
  19919. "type": "string",
  19920. "enum": ["session.next.tool.success"]
  19921. },
  19922. "properties": {
  19923. "type": "object",
  19924. "properties": {
  19925. "timestamp": {
  19926. "type": "number"
  19927. },
  19928. "sessionID": {
  19929. "type": "string",
  19930. "pattern": "^ses"
  19931. },
  19932. "callID": {
  19933. "type": "string"
  19934. },
  19935. "structured": {
  19936. "type": "object"
  19937. },
  19938. "content": {
  19939. "type": "array",
  19940. "items": {
  19941. "anyOf": [
  19942. {
  19943. "$ref": "#/components/schemas/ToolTextContent"
  19944. },
  19945. {
  19946. "$ref": "#/components/schemas/ToolFileContent"
  19947. }
  19948. ]
  19949. }
  19950. },
  19951. "provider": {
  19952. "type": "object",
  19953. "properties": {
  19954. "executed": {
  19955. "type": "boolean"
  19956. },
  19957. "metadata": {
  19958. "type": "object"
  19959. }
  19960. },
  19961. "required": ["executed"],
  19962. "additionalProperties": false
  19963. }
  19964. },
  19965. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  19966. "additionalProperties": false
  19967. }
  19968. },
  19969. "required": ["id", "type", "properties"],
  19970. "additionalProperties": false
  19971. },
  19972. "EventSessionNextToolFailed": {
  19973. "type": "object",
  19974. "properties": {
  19975. "id": {
  19976. "type": "string"
  19977. },
  19978. "type": {
  19979. "type": "string",
  19980. "enum": ["session.next.tool.failed"]
  19981. },
  19982. "properties": {
  19983. "type": "object",
  19984. "properties": {
  19985. "timestamp": {
  19986. "type": "number"
  19987. },
  19988. "sessionID": {
  19989. "type": "string",
  19990. "pattern": "^ses"
  19991. },
  19992. "callID": {
  19993. "type": "string"
  19994. },
  19995. "error": {
  19996. "$ref": "#/components/schemas/SessionErrorUnknown"
  19997. },
  19998. "provider": {
  19999. "type": "object",
  20000. "properties": {
  20001. "executed": {
  20002. "type": "boolean"
  20003. },
  20004. "metadata": {
  20005. "type": "object"
  20006. }
  20007. },
  20008. "required": ["executed"],
  20009. "additionalProperties": false
  20010. }
  20011. },
  20012. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20013. "additionalProperties": false
  20014. }
  20015. },
  20016. "required": ["id", "type", "properties"],
  20017. "additionalProperties": false
  20018. },
  20019. "SessionNextRetry_error": {
  20020. "type": "object",
  20021. "properties": {
  20022. "message": {
  20023. "type": "string"
  20024. },
  20025. "statusCode": {
  20026. "type": "number"
  20027. },
  20028. "isRetryable": {
  20029. "type": "boolean"
  20030. },
  20031. "responseHeaders": {
  20032. "type": "object",
  20033. "additionalProperties": {
  20034. "type": "string"
  20035. }
  20036. },
  20037. "responseBody": {
  20038. "type": "string"
  20039. },
  20040. "metadata": {
  20041. "type": "object",
  20042. "additionalProperties": {
  20043. "type": "string"
  20044. }
  20045. }
  20046. },
  20047. "required": ["message", "isRetryable"],
  20048. "additionalProperties": false
  20049. },
  20050. "EventSessionNextRetried": {
  20051. "type": "object",
  20052. "properties": {
  20053. "id": {
  20054. "type": "string"
  20055. },
  20056. "type": {
  20057. "type": "string",
  20058. "enum": ["session.next.retried"]
  20059. },
  20060. "properties": {
  20061. "type": "object",
  20062. "properties": {
  20063. "timestamp": {
  20064. "type": "number"
  20065. },
  20066. "sessionID": {
  20067. "type": "string",
  20068. "pattern": "^ses"
  20069. },
  20070. "attempt": {
  20071. "type": "number"
  20072. },
  20073. "error": {
  20074. "$ref": "#/components/schemas/SessionNextRetry_error"
  20075. }
  20076. },
  20077. "required": ["timestamp", "sessionID", "attempt", "error"],
  20078. "additionalProperties": false
  20079. }
  20080. },
  20081. "required": ["id", "type", "properties"],
  20082. "additionalProperties": false
  20083. },
  20084. "EventSessionNextCompactionStarted": {
  20085. "type": "object",
  20086. "properties": {
  20087. "id": {
  20088. "type": "string"
  20089. },
  20090. "type": {
  20091. "type": "string",
  20092. "enum": ["session.next.compaction.started"]
  20093. },
  20094. "properties": {
  20095. "type": "object",
  20096. "properties": {
  20097. "timestamp": {
  20098. "type": "number"
  20099. },
  20100. "sessionID": {
  20101. "type": "string",
  20102. "pattern": "^ses"
  20103. },
  20104. "reason": {
  20105. "type": "string",
  20106. "enum": ["auto", "manual"]
  20107. }
  20108. },
  20109. "required": ["timestamp", "sessionID", "reason"],
  20110. "additionalProperties": false
  20111. }
  20112. },
  20113. "required": ["id", "type", "properties"],
  20114. "additionalProperties": false
  20115. },
  20116. "EventSessionNextCompactionDelta": {
  20117. "type": "object",
  20118. "properties": {
  20119. "id": {
  20120. "type": "string"
  20121. },
  20122. "type": {
  20123. "type": "string",
  20124. "enum": ["session.next.compaction.delta"]
  20125. },
  20126. "properties": {
  20127. "type": "object",
  20128. "properties": {
  20129. "timestamp": {
  20130. "type": "number"
  20131. },
  20132. "sessionID": {
  20133. "type": "string",
  20134. "pattern": "^ses"
  20135. },
  20136. "text": {
  20137. "type": "string"
  20138. }
  20139. },
  20140. "required": ["timestamp", "sessionID", "text"],
  20141. "additionalProperties": false
  20142. }
  20143. },
  20144. "required": ["id", "type", "properties"],
  20145. "additionalProperties": false
  20146. },
  20147. "EventSessionNextCompactionEnded": {
  20148. "type": "object",
  20149. "properties": {
  20150. "id": {
  20151. "type": "string"
  20152. },
  20153. "type": {
  20154. "type": "string",
  20155. "enum": ["session.next.compaction.ended"]
  20156. },
  20157. "properties": {
  20158. "type": "object",
  20159. "properties": {
  20160. "timestamp": {
  20161. "type": "number"
  20162. },
  20163. "sessionID": {
  20164. "type": "string",
  20165. "pattern": "^ses"
  20166. },
  20167. "text": {
  20168. "type": "string"
  20169. },
  20170. "include": {
  20171. "type": "string"
  20172. }
  20173. },
  20174. "required": ["timestamp", "sessionID", "text"],
  20175. "additionalProperties": false
  20176. }
  20177. },
  20178. "required": ["id", "type", "properties"],
  20179. "additionalProperties": false
  20180. },
  20181. "ModelV2Info": {
  20182. "type": "object",
  20183. "properties": {
  20184. "id": {
  20185. "type": "string"
  20186. },
  20187. "apiID": {
  20188. "type": "string"
  20189. },
  20190. "providerID": {
  20191. "type": "string"
  20192. },
  20193. "family": {
  20194. "type": "string"
  20195. },
  20196. "name": {
  20197. "type": "string"
  20198. },
  20199. "endpoint": {
  20200. "anyOf": [
  20201. {
  20202. "type": "object",
  20203. "properties": {
  20204. "type": {
  20205. "type": "string",
  20206. "enum": ["unknown"]
  20207. }
  20208. },
  20209. "required": ["type"],
  20210. "additionalProperties": false
  20211. },
  20212. {
  20213. "type": "object",
  20214. "properties": {
  20215. "type": {
  20216. "type": "string",
  20217. "enum": ["openai/responses"]
  20218. },
  20219. "url": {
  20220. "type": "string"
  20221. },
  20222. "websocket": {
  20223. "type": "boolean"
  20224. }
  20225. },
  20226. "required": ["type", "url"],
  20227. "additionalProperties": false
  20228. },
  20229. {
  20230. "type": "object",
  20231. "properties": {
  20232. "type": {
  20233. "type": "string",
  20234. "enum": ["openai/completions"]
  20235. },
  20236. "url": {
  20237. "type": "string"
  20238. },
  20239. "reasoning": {
  20240. "anyOf": [
  20241. {
  20242. "type": "object",
  20243. "properties": {
  20244. "type": {
  20245. "type": "string",
  20246. "enum": ["reasoning_content"]
  20247. }
  20248. },
  20249. "required": ["type"],
  20250. "additionalProperties": false
  20251. },
  20252. {
  20253. "type": "object",
  20254. "properties": {
  20255. "type": {
  20256. "type": "string",
  20257. "enum": ["reasoning_details"]
  20258. }
  20259. },
  20260. "required": ["type"],
  20261. "additionalProperties": false
  20262. }
  20263. ]
  20264. }
  20265. },
  20266. "required": ["type", "url"],
  20267. "additionalProperties": false
  20268. },
  20269. {
  20270. "type": "object",
  20271. "properties": {
  20272. "type": {
  20273. "type": "string",
  20274. "enum": ["anthropic/messages"]
  20275. },
  20276. "url": {
  20277. "type": "string"
  20278. }
  20279. },
  20280. "required": ["type", "url"],
  20281. "additionalProperties": false
  20282. },
  20283. {
  20284. "type": "object",
  20285. "properties": {
  20286. "type": {
  20287. "type": "string",
  20288. "enum": ["aisdk"]
  20289. },
  20290. "package": {
  20291. "type": "string"
  20292. },
  20293. "url": {
  20294. "type": "string"
  20295. }
  20296. },
  20297. "required": ["type", "package"],
  20298. "additionalProperties": false
  20299. }
  20300. ]
  20301. },
  20302. "capabilities": {
  20303. "type": "object",
  20304. "properties": {
  20305. "tools": {
  20306. "type": "boolean"
  20307. },
  20308. "input": {
  20309. "type": "array",
  20310. "items": {
  20311. "type": "string"
  20312. }
  20313. },
  20314. "output": {
  20315. "type": "array",
  20316. "items": {
  20317. "type": "string"
  20318. }
  20319. }
  20320. },
  20321. "required": ["tools", "input", "output"],
  20322. "additionalProperties": false
  20323. },
  20324. "options": {
  20325. "type": "object",
  20326. "properties": {
  20327. "headers": {
  20328. "type": "object",
  20329. "additionalProperties": {
  20330. "type": "string"
  20331. }
  20332. },
  20333. "body": {
  20334. "type": "object"
  20335. },
  20336. "aisdk": {
  20337. "type": "object",
  20338. "properties": {
  20339. "provider": {
  20340. "type": "object"
  20341. },
  20342. "request": {
  20343. "type": "object"
  20344. }
  20345. },
  20346. "required": ["provider", "request"],
  20347. "additionalProperties": false
  20348. },
  20349. "variant": {
  20350. "type": "string"
  20351. }
  20352. },
  20353. "required": ["headers", "body", "aisdk"],
  20354. "additionalProperties": false
  20355. },
  20356. "variants": {
  20357. "type": "array",
  20358. "items": {
  20359. "type": "object",
  20360. "properties": {
  20361. "id": {
  20362. "type": "string"
  20363. },
  20364. "headers": {
  20365. "type": "object",
  20366. "additionalProperties": {
  20367. "type": "string"
  20368. }
  20369. },
  20370. "body": {
  20371. "type": "object"
  20372. },
  20373. "aisdk": {
  20374. "type": "object",
  20375. "properties": {
  20376. "provider": {
  20377. "type": "object"
  20378. },
  20379. "request": {
  20380. "type": "object"
  20381. }
  20382. },
  20383. "required": ["provider", "request"],
  20384. "additionalProperties": false
  20385. }
  20386. },
  20387. "required": ["id", "headers", "body", "aisdk"],
  20388. "additionalProperties": false
  20389. }
  20390. },
  20391. "time": {
  20392. "type": "object",
  20393. "properties": {
  20394. "released": {
  20395. "anyOf": [
  20396. {
  20397. "type": "number"
  20398. },
  20399. {
  20400. "type": "string",
  20401. "enum": ["NaN"]
  20402. },
  20403. {
  20404. "type": "string",
  20405. "enum": ["Infinity"]
  20406. },
  20407. {
  20408. "type": "string",
  20409. "enum": ["-Infinity"]
  20410. },
  20411. {
  20412. "type": "string",
  20413. "enum": ["Infinity", "-Infinity", "NaN"]
  20414. }
  20415. ]
  20416. }
  20417. },
  20418. "required": ["released"],
  20419. "additionalProperties": false
  20420. },
  20421. "cost": {
  20422. "type": "array",
  20423. "items": {
  20424. "type": "object",
  20425. "properties": {
  20426. "tier": {
  20427. "type": "object",
  20428. "properties": {
  20429. "type": {
  20430. "type": "string",
  20431. "enum": ["context"]
  20432. },
  20433. "size": {
  20434. "type": "integer"
  20435. }
  20436. },
  20437. "required": ["type", "size"],
  20438. "additionalProperties": false
  20439. },
  20440. "input": {
  20441. "type": "number"
  20442. },
  20443. "output": {
  20444. "type": "number"
  20445. },
  20446. "cache": {
  20447. "type": "object",
  20448. "properties": {
  20449. "read": {
  20450. "type": "number"
  20451. },
  20452. "write": {
  20453. "type": "number"
  20454. }
  20455. },
  20456. "required": ["read", "write"],
  20457. "additionalProperties": false
  20458. }
  20459. },
  20460. "required": ["input", "output", "cache"],
  20461. "additionalProperties": false
  20462. }
  20463. },
  20464. "status": {
  20465. "type": "string",
  20466. "enum": ["alpha", "beta", "deprecated", "active"]
  20467. },
  20468. "enabled": {
  20469. "type": "boolean"
  20470. },
  20471. "limit": {
  20472. "type": "object",
  20473. "properties": {
  20474. "context": {
  20475. "type": "integer"
  20476. },
  20477. "input": {
  20478. "type": "integer"
  20479. },
  20480. "output": {
  20481. "type": "integer"
  20482. }
  20483. },
  20484. "required": ["context", "output"],
  20485. "additionalProperties": false
  20486. }
  20487. },
  20488. "required": [
  20489. "id",
  20490. "apiID",
  20491. "providerID",
  20492. "name",
  20493. "endpoint",
  20494. "capabilities",
  20495. "options",
  20496. "variants",
  20497. "time",
  20498. "cost",
  20499. "status",
  20500. "enabled",
  20501. "limit"
  20502. ],
  20503. "additionalProperties": false
  20504. },
  20505. "EventCatalogModelUpdated": {
  20506. "type": "object",
  20507. "properties": {
  20508. "id": {
  20509. "type": "string"
  20510. },
  20511. "type": {
  20512. "type": "string",
  20513. "enum": ["catalog.model.updated"]
  20514. },
  20515. "properties": {
  20516. "type": "object",
  20517. "properties": {
  20518. "model": {
  20519. "$ref": "#/components/schemas/ModelV2Info"
  20520. }
  20521. },
  20522. "required": ["model"],
  20523. "additionalProperties": false
  20524. }
  20525. },
  20526. "required": ["id", "type", "properties"],
  20527. "additionalProperties": false
  20528. },
  20529. "EventModels-devRefreshed": {
  20530. "type": "object",
  20531. "properties": {
  20532. "id": {
  20533. "type": "string"
  20534. },
  20535. "type": {
  20536. "type": "string",
  20537. "enum": ["models-dev.refreshed"]
  20538. },
  20539. "properties": {
  20540. "type": "object",
  20541. "properties": {}
  20542. }
  20543. },
  20544. "required": ["id", "type", "properties"],
  20545. "additionalProperties": false
  20546. },
  20547. "AccountV2OAuthCredential": {
  20548. "type": "object",
  20549. "properties": {
  20550. "type": {
  20551. "type": "string",
  20552. "enum": ["oauth"]
  20553. },
  20554. "refresh": {
  20555. "type": "string"
  20556. },
  20557. "access": {
  20558. "type": "string"
  20559. },
  20560. "expires": {
  20561. "type": "integer",
  20562. "minimum": 0
  20563. }
  20564. },
  20565. "required": ["type", "refresh", "access", "expires"],
  20566. "additionalProperties": false
  20567. },
  20568. "AccountV2ApiKeyCredential": {
  20569. "type": "object",
  20570. "properties": {
  20571. "type": {
  20572. "type": "string",
  20573. "enum": ["api"]
  20574. },
  20575. "key": {
  20576. "type": "string"
  20577. },
  20578. "metadata": {
  20579. "type": "object",
  20580. "additionalProperties": {
  20581. "type": "string"
  20582. }
  20583. }
  20584. },
  20585. "required": ["type", "key"],
  20586. "additionalProperties": false
  20587. },
  20588. "AccountV2Credential": {
  20589. "anyOf": [
  20590. {
  20591. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20592. },
  20593. {
  20594. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20595. }
  20596. ]
  20597. },
  20598. "AccountV2Info": {
  20599. "type": "object",
  20600. "properties": {
  20601. "id": {
  20602. "type": "string"
  20603. },
  20604. "serviceID": {
  20605. "type": "string"
  20606. },
  20607. "description": {
  20608. "type": "string"
  20609. },
  20610. "credential": {
  20611. "$ref": "#/components/schemas/AccountV2Credential"
  20612. }
  20613. },
  20614. "required": ["id", "serviceID", "description", "credential"],
  20615. "additionalProperties": false
  20616. },
  20617. "EventAccountAdded": {
  20618. "type": "object",
  20619. "properties": {
  20620. "id": {
  20621. "type": "string"
  20622. },
  20623. "type": {
  20624. "type": "string",
  20625. "enum": ["account.added"]
  20626. },
  20627. "properties": {
  20628. "type": "object",
  20629. "properties": {
  20630. "account": {
  20631. "$ref": "#/components/schemas/AccountV2Info"
  20632. }
  20633. },
  20634. "required": ["account"],
  20635. "additionalProperties": false
  20636. }
  20637. },
  20638. "required": ["id", "type", "properties"],
  20639. "additionalProperties": false
  20640. },
  20641. "EventAccountRemoved": {
  20642. "type": "object",
  20643. "properties": {
  20644. "id": {
  20645. "type": "string"
  20646. },
  20647. "type": {
  20648. "type": "string",
  20649. "enum": ["account.removed"]
  20650. },
  20651. "properties": {
  20652. "type": "object",
  20653. "properties": {
  20654. "account": {
  20655. "$ref": "#/components/schemas/AccountV2Info"
  20656. }
  20657. },
  20658. "required": ["account"],
  20659. "additionalProperties": false
  20660. }
  20661. },
  20662. "required": ["id", "type", "properties"],
  20663. "additionalProperties": false
  20664. },
  20665. "EventAccountSwitched": {
  20666. "type": "object",
  20667. "properties": {
  20668. "id": {
  20669. "type": "string"
  20670. },
  20671. "type": {
  20672. "type": "string",
  20673. "enum": ["account.switched"]
  20674. },
  20675. "properties": {
  20676. "type": "object",
  20677. "properties": {
  20678. "serviceID": {
  20679. "type": "string"
  20680. },
  20681. "from": {
  20682. "type": "string"
  20683. },
  20684. "to": {
  20685. "type": "string"
  20686. }
  20687. },
  20688. "required": ["serviceID"],
  20689. "additionalProperties": false
  20690. }
  20691. },
  20692. "required": ["id", "type", "properties"],
  20693. "additionalProperties": false
  20694. },
  20695. "SessionInfo": {
  20696. "type": "object",
  20697. "properties": {
  20698. "id": {
  20699. "type": "string",
  20700. "pattern": "^ses"
  20701. },
  20702. "parentID": {
  20703. "type": "string",
  20704. "pattern": "^ses"
  20705. },
  20706. "projectID": {
  20707. "type": "string"
  20708. },
  20709. "workspaceID": {
  20710. "type": "string",
  20711. "pattern": "^wrk"
  20712. },
  20713. "path": {
  20714. "type": "string"
  20715. },
  20716. "agent": {
  20717. "type": "string"
  20718. },
  20719. "model": {
  20720. "type": "object",
  20721. "properties": {
  20722. "id": {
  20723. "type": "string"
  20724. },
  20725. "providerID": {
  20726. "type": "string"
  20727. },
  20728. "variant": {
  20729. "type": "string"
  20730. }
  20731. },
  20732. "required": ["id", "providerID", "variant"],
  20733. "additionalProperties": false
  20734. },
  20735. "cost": {
  20736. "type": "number"
  20737. },
  20738. "tokens": {
  20739. "type": "object",
  20740. "properties": {
  20741. "input": {
  20742. "type": "number"
  20743. },
  20744. "output": {
  20745. "type": "number"
  20746. },
  20747. "reasoning": {
  20748. "type": "number"
  20749. },
  20750. "cache": {
  20751. "type": "object",
  20752. "properties": {
  20753. "read": {
  20754. "type": "number"
  20755. },
  20756. "write": {
  20757. "type": "number"
  20758. }
  20759. },
  20760. "required": ["read", "write"],
  20761. "additionalProperties": false
  20762. }
  20763. },
  20764. "required": ["input", "output", "reasoning", "cache"],
  20765. "additionalProperties": false
  20766. },
  20767. "time": {
  20768. "type": "object",
  20769. "properties": {
  20770. "created": {
  20771. "type": "number"
  20772. },
  20773. "updated": {
  20774. "type": "number"
  20775. },
  20776. "archived": {
  20777. "type": "number"
  20778. }
  20779. },
  20780. "required": ["created", "updated"],
  20781. "additionalProperties": false
  20782. },
  20783. "title": {
  20784. "type": "string"
  20785. }
  20786. },
  20787. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20788. "additionalProperties": false
  20789. },
  20790. "SessionDelivery": {
  20791. "type": "string",
  20792. "enum": ["immediate", "deferred"]
  20793. },
  20794. "SessionMessageAgentSwitched": {
  20795. "type": "object",
  20796. "properties": {
  20797. "id": {
  20798. "type": "string"
  20799. },
  20800. "metadata": {
  20801. "type": "object"
  20802. },
  20803. "time": {
  20804. "type": "object",
  20805. "properties": {
  20806. "created": {
  20807. "type": "number"
  20808. }
  20809. },
  20810. "required": ["created"],
  20811. "additionalProperties": false
  20812. },
  20813. "type": {
  20814. "type": "string",
  20815. "enum": ["agent-switched"]
  20816. },
  20817. "agent": {
  20818. "type": "string"
  20819. }
  20820. },
  20821. "required": ["id", "time", "type", "agent"],
  20822. "additionalProperties": false
  20823. },
  20824. "SessionMessageModelSwitched": {
  20825. "type": "object",
  20826. "properties": {
  20827. "id": {
  20828. "type": "string"
  20829. },
  20830. "metadata": {
  20831. "type": "object"
  20832. },
  20833. "time": {
  20834. "type": "object",
  20835. "properties": {
  20836. "created": {
  20837. "type": "number"
  20838. }
  20839. },
  20840. "required": ["created"],
  20841. "additionalProperties": false
  20842. },
  20843. "type": {
  20844. "type": "string",
  20845. "enum": ["model-switched"]
  20846. },
  20847. "model": {
  20848. "type": "object",
  20849. "properties": {
  20850. "id": {
  20851. "type": "string"
  20852. },
  20853. "providerID": {
  20854. "type": "string"
  20855. },
  20856. "variant": {
  20857. "type": "string"
  20858. }
  20859. },
  20860. "required": ["id", "providerID", "variant"],
  20861. "additionalProperties": false
  20862. }
  20863. },
  20864. "required": ["id", "time", "type", "model"],
  20865. "additionalProperties": false
  20866. },
  20867. "SessionMessageUser": {
  20868. "type": "object",
  20869. "properties": {
  20870. "id": {
  20871. "type": "string"
  20872. },
  20873. "metadata": {
  20874. "type": "object"
  20875. },
  20876. "time": {
  20877. "type": "object",
  20878. "properties": {
  20879. "created": {
  20880. "type": "number"
  20881. }
  20882. },
  20883. "required": ["created"],
  20884. "additionalProperties": false
  20885. },
  20886. "text": {
  20887. "type": "string"
  20888. },
  20889. "files": {
  20890. "type": "array",
  20891. "items": {
  20892. "$ref": "#/components/schemas/PromptFileAttachment"
  20893. }
  20894. },
  20895. "agents": {
  20896. "type": "array",
  20897. "items": {
  20898. "$ref": "#/components/schemas/PromptAgentAttachment"
  20899. }
  20900. },
  20901. "references": {
  20902. "type": "array",
  20903. "items": {
  20904. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20905. }
  20906. },
  20907. "type": {
  20908. "type": "string",
  20909. "enum": ["user"]
  20910. }
  20911. },
  20912. "required": ["id", "time", "text", "type"],
  20913. "additionalProperties": false
  20914. },
  20915. "SessionMessageSynthetic": {
  20916. "type": "object",
  20917. "properties": {
  20918. "id": {
  20919. "type": "string"
  20920. },
  20921. "metadata": {
  20922. "type": "object"
  20923. },
  20924. "time": {
  20925. "type": "object",
  20926. "properties": {
  20927. "created": {
  20928. "type": "number"
  20929. }
  20930. },
  20931. "required": ["created"],
  20932. "additionalProperties": false
  20933. },
  20934. "sessionID": {
  20935. "type": "string",
  20936. "pattern": "^ses"
  20937. },
  20938. "text": {
  20939. "type": "string"
  20940. },
  20941. "type": {
  20942. "type": "string",
  20943. "enum": ["synthetic"]
  20944. }
  20945. },
  20946. "required": ["id", "time", "sessionID", "text", "type"],
  20947. "additionalProperties": false
  20948. },
  20949. "SessionMessageShell": {
  20950. "type": "object",
  20951. "properties": {
  20952. "id": {
  20953. "type": "string"
  20954. },
  20955. "metadata": {
  20956. "type": "object"
  20957. },
  20958. "time": {
  20959. "type": "object",
  20960. "properties": {
  20961. "created": {
  20962. "type": "number"
  20963. },
  20964. "completed": {
  20965. "type": "number"
  20966. }
  20967. },
  20968. "required": ["created"],
  20969. "additionalProperties": false
  20970. },
  20971. "type": {
  20972. "type": "string",
  20973. "enum": ["shell"]
  20974. },
  20975. "callID": {
  20976. "type": "string"
  20977. },
  20978. "command": {
  20979. "type": "string"
  20980. },
  20981. "output": {
  20982. "type": "string"
  20983. }
  20984. },
  20985. "required": ["id", "time", "type", "callID", "command", "output"],
  20986. "additionalProperties": false
  20987. },
  20988. "SessionMessageAssistantText": {
  20989. "type": "object",
  20990. "properties": {
  20991. "type": {
  20992. "type": "string",
  20993. "enum": ["text"]
  20994. },
  20995. "text": {
  20996. "type": "string"
  20997. }
  20998. },
  20999. "required": ["type", "text"],
  21000. "additionalProperties": false
  21001. },
  21002. "SessionMessageAssistantReasoning": {
  21003. "type": "object",
  21004. "properties": {
  21005. "type": {
  21006. "type": "string",
  21007. "enum": ["reasoning"]
  21008. },
  21009. "id": {
  21010. "type": "string"
  21011. },
  21012. "text": {
  21013. "type": "string"
  21014. }
  21015. },
  21016. "required": ["type", "id", "text"],
  21017. "additionalProperties": false
  21018. },
  21019. "SessionMessageToolStatePending": {
  21020. "type": "object",
  21021. "properties": {
  21022. "status": {
  21023. "type": "string",
  21024. "enum": ["pending"]
  21025. },
  21026. "input": {
  21027. "type": "string"
  21028. }
  21029. },
  21030. "required": ["status", "input"],
  21031. "additionalProperties": false
  21032. },
  21033. "SessionMessageToolStateRunning": {
  21034. "type": "object",
  21035. "properties": {
  21036. "status": {
  21037. "type": "string",
  21038. "enum": ["running"]
  21039. },
  21040. "input": {
  21041. "type": "object"
  21042. },
  21043. "structured": {
  21044. "type": "object"
  21045. },
  21046. "content": {
  21047. "type": "array",
  21048. "items": {
  21049. "anyOf": [
  21050. {
  21051. "$ref": "#/components/schemas/ToolTextContent"
  21052. },
  21053. {
  21054. "$ref": "#/components/schemas/ToolFileContent"
  21055. }
  21056. ]
  21057. }
  21058. }
  21059. },
  21060. "required": ["status", "input", "structured", "content"],
  21061. "additionalProperties": false
  21062. },
  21063. "SessionMessageToolStateCompleted": {
  21064. "type": "object",
  21065. "properties": {
  21066. "status": {
  21067. "type": "string",
  21068. "enum": ["completed"]
  21069. },
  21070. "input": {
  21071. "type": "object"
  21072. },
  21073. "attachments": {
  21074. "type": "array",
  21075. "items": {
  21076. "$ref": "#/components/schemas/PromptFileAttachment"
  21077. }
  21078. },
  21079. "content": {
  21080. "type": "array",
  21081. "items": {
  21082. "anyOf": [
  21083. {
  21084. "$ref": "#/components/schemas/ToolTextContent"
  21085. },
  21086. {
  21087. "$ref": "#/components/schemas/ToolFileContent"
  21088. }
  21089. ]
  21090. }
  21091. },
  21092. "structured": {
  21093. "type": "object"
  21094. }
  21095. },
  21096. "required": ["status", "input", "content", "structured"],
  21097. "additionalProperties": false
  21098. },
  21099. "SessionMessageToolStateError": {
  21100. "type": "object",
  21101. "properties": {
  21102. "status": {
  21103. "type": "string",
  21104. "enum": ["error"]
  21105. },
  21106. "input": {
  21107. "type": "object"
  21108. },
  21109. "content": {
  21110. "type": "array",
  21111. "items": {
  21112. "anyOf": [
  21113. {
  21114. "$ref": "#/components/schemas/ToolTextContent"
  21115. },
  21116. {
  21117. "$ref": "#/components/schemas/ToolFileContent"
  21118. }
  21119. ]
  21120. }
  21121. },
  21122. "structured": {
  21123. "type": "object"
  21124. },
  21125. "error": {
  21126. "$ref": "#/components/schemas/SessionErrorUnknown"
  21127. }
  21128. },
  21129. "required": ["status", "input", "content", "structured", "error"],
  21130. "additionalProperties": false
  21131. },
  21132. "SessionMessageAssistantTool": {
  21133. "type": "object",
  21134. "properties": {
  21135. "type": {
  21136. "type": "string",
  21137. "enum": ["tool"]
  21138. },
  21139. "id": {
  21140. "type": "string"
  21141. },
  21142. "name": {
  21143. "type": "string"
  21144. },
  21145. "provider": {
  21146. "type": "object",
  21147. "properties": {
  21148. "executed": {
  21149. "type": "boolean"
  21150. },
  21151. "metadata": {
  21152. "type": "object"
  21153. }
  21154. },
  21155. "required": ["executed"],
  21156. "additionalProperties": false
  21157. },
  21158. "state": {
  21159. "anyOf": [
  21160. {
  21161. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21162. },
  21163. {
  21164. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21165. },
  21166. {
  21167. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21168. },
  21169. {
  21170. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21171. }
  21172. ]
  21173. },
  21174. "time": {
  21175. "type": "object",
  21176. "properties": {
  21177. "created": {
  21178. "type": "number"
  21179. },
  21180. "ran": {
  21181. "type": "number"
  21182. },
  21183. "completed": {
  21184. "type": "number"
  21185. },
  21186. "pruned": {
  21187. "type": "number"
  21188. }
  21189. },
  21190. "required": ["created"],
  21191. "additionalProperties": false
  21192. }
  21193. },
  21194. "required": ["type", "id", "name", "state", "time"],
  21195. "additionalProperties": false
  21196. },
  21197. "SessionMessageAssistant": {
  21198. "type": "object",
  21199. "properties": {
  21200. "id": {
  21201. "type": "string"
  21202. },
  21203. "metadata": {
  21204. "type": "object"
  21205. },
  21206. "time": {
  21207. "type": "object",
  21208. "properties": {
  21209. "created": {
  21210. "type": "number"
  21211. },
  21212. "completed": {
  21213. "type": "number"
  21214. }
  21215. },
  21216. "required": ["created"],
  21217. "additionalProperties": false
  21218. },
  21219. "type": {
  21220. "type": "string",
  21221. "enum": ["assistant"]
  21222. },
  21223. "agent": {
  21224. "type": "string"
  21225. },
  21226. "model": {
  21227. "type": "object",
  21228. "properties": {
  21229. "id": {
  21230. "type": "string"
  21231. },
  21232. "providerID": {
  21233. "type": "string"
  21234. },
  21235. "variant": {
  21236. "type": "string"
  21237. }
  21238. },
  21239. "required": ["id", "providerID", "variant"],
  21240. "additionalProperties": false
  21241. },
  21242. "content": {
  21243. "type": "array",
  21244. "items": {
  21245. "anyOf": [
  21246. {
  21247. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21248. },
  21249. {
  21250. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21251. },
  21252. {
  21253. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21254. }
  21255. ]
  21256. }
  21257. },
  21258. "snapshot": {
  21259. "type": "object",
  21260. "properties": {
  21261. "start": {
  21262. "type": "string"
  21263. },
  21264. "end": {
  21265. "type": "string"
  21266. }
  21267. },
  21268. "additionalProperties": false
  21269. },
  21270. "finish": {
  21271. "type": "string"
  21272. },
  21273. "cost": {
  21274. "type": "number"
  21275. },
  21276. "tokens": {
  21277. "type": "object",
  21278. "properties": {
  21279. "input": {
  21280. "type": "number"
  21281. },
  21282. "output": {
  21283. "type": "number"
  21284. },
  21285. "reasoning": {
  21286. "type": "number"
  21287. },
  21288. "cache": {
  21289. "type": "object",
  21290. "properties": {
  21291. "read": {
  21292. "type": "number"
  21293. },
  21294. "write": {
  21295. "type": "number"
  21296. }
  21297. },
  21298. "required": ["read", "write"],
  21299. "additionalProperties": false
  21300. }
  21301. },
  21302. "required": ["input", "output", "reasoning", "cache"],
  21303. "additionalProperties": false
  21304. },
  21305. "error": {
  21306. "$ref": "#/components/schemas/SessionErrorUnknown"
  21307. }
  21308. },
  21309. "required": ["id", "time", "type", "agent", "model", "content"],
  21310. "additionalProperties": false
  21311. },
  21312. "SessionMessageCompaction": {
  21313. "type": "object",
  21314. "properties": {
  21315. "type": {
  21316. "type": "string",
  21317. "enum": ["compaction"]
  21318. },
  21319. "reason": {
  21320. "type": "string",
  21321. "enum": ["auto", "manual"]
  21322. },
  21323. "summary": {
  21324. "type": "string"
  21325. },
  21326. "include": {
  21327. "type": "string"
  21328. },
  21329. "id": {
  21330. "type": "string"
  21331. },
  21332. "metadata": {
  21333. "type": "object"
  21334. },
  21335. "time": {
  21336. "type": "object",
  21337. "properties": {
  21338. "created": {
  21339. "type": "number"
  21340. }
  21341. },
  21342. "required": ["created"],
  21343. "additionalProperties": false
  21344. }
  21345. },
  21346. "required": ["type", "reason", "summary", "id", "time"],
  21347. "additionalProperties": false
  21348. },
  21349. "SessionMessage": {
  21350. "anyOf": [
  21351. {
  21352. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21353. },
  21354. {
  21355. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21356. },
  21357. {
  21358. "$ref": "#/components/schemas/SessionMessageUser"
  21359. },
  21360. {
  21361. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21362. },
  21363. {
  21364. "$ref": "#/components/schemas/SessionMessageShell"
  21365. },
  21366. {
  21367. "$ref": "#/components/schemas/SessionMessageAssistant"
  21368. },
  21369. {
  21370. "$ref": "#/components/schemas/SessionMessageCompaction"
  21371. }
  21372. ]
  21373. },
  21374. "ProviderV2Info": {
  21375. "type": "object",
  21376. "properties": {
  21377. "id": {
  21378. "type": "string"
  21379. },
  21380. "name": {
  21381. "type": "string"
  21382. },
  21383. "enabled": {
  21384. "anyOf": [
  21385. {
  21386. "type": "boolean",
  21387. "enum": [false]
  21388. },
  21389. {
  21390. "type": "object",
  21391. "properties": {
  21392. "via": {
  21393. "type": "string",
  21394. "enum": ["env"]
  21395. },
  21396. "name": {
  21397. "type": "string"
  21398. }
  21399. },
  21400. "required": ["via", "name"],
  21401. "additionalProperties": false
  21402. },
  21403. {
  21404. "type": "object",
  21405. "properties": {
  21406. "via": {
  21407. "type": "string",
  21408. "enum": ["account"]
  21409. },
  21410. "service": {
  21411. "type": "string"
  21412. }
  21413. },
  21414. "required": ["via", "service"],
  21415. "additionalProperties": false
  21416. },
  21417. {
  21418. "type": "object",
  21419. "properties": {
  21420. "via": {
  21421. "type": "string",
  21422. "enum": ["custom"]
  21423. },
  21424. "data": {
  21425. "type": "object"
  21426. }
  21427. },
  21428. "required": ["via", "data"],
  21429. "additionalProperties": false
  21430. }
  21431. ]
  21432. },
  21433. "env": {
  21434. "type": "array",
  21435. "items": {
  21436. "type": "string"
  21437. }
  21438. },
  21439. "endpoint": {
  21440. "anyOf": [
  21441. {
  21442. "type": "object",
  21443. "properties": {
  21444. "type": {
  21445. "type": "string",
  21446. "enum": ["unknown"]
  21447. }
  21448. },
  21449. "required": ["type"],
  21450. "additionalProperties": false
  21451. },
  21452. {
  21453. "type": "object",
  21454. "properties": {
  21455. "type": {
  21456. "type": "string",
  21457. "enum": ["openai/responses"]
  21458. },
  21459. "url": {
  21460. "type": "string"
  21461. },
  21462. "websocket": {
  21463. "type": "boolean"
  21464. }
  21465. },
  21466. "required": ["type", "url"],
  21467. "additionalProperties": false
  21468. },
  21469. {
  21470. "type": "object",
  21471. "properties": {
  21472. "type": {
  21473. "type": "string",
  21474. "enum": ["openai/completions"]
  21475. },
  21476. "url": {
  21477. "type": "string"
  21478. },
  21479. "reasoning": {
  21480. "anyOf": [
  21481. {
  21482. "type": "object",
  21483. "properties": {
  21484. "type": {
  21485. "type": "string",
  21486. "enum": ["reasoning_content"]
  21487. }
  21488. },
  21489. "required": ["type"],
  21490. "additionalProperties": false
  21491. },
  21492. {
  21493. "type": "object",
  21494. "properties": {
  21495. "type": {
  21496. "type": "string",
  21497. "enum": ["reasoning_details"]
  21498. }
  21499. },
  21500. "required": ["type"],
  21501. "additionalProperties": false
  21502. }
  21503. ]
  21504. }
  21505. },
  21506. "required": ["type", "url"],
  21507. "additionalProperties": false
  21508. },
  21509. {
  21510. "type": "object",
  21511. "properties": {
  21512. "type": {
  21513. "type": "string",
  21514. "enum": ["anthropic/messages"]
  21515. },
  21516. "url": {
  21517. "type": "string"
  21518. }
  21519. },
  21520. "required": ["type", "url"],
  21521. "additionalProperties": false
  21522. },
  21523. {
  21524. "type": "object",
  21525. "properties": {
  21526. "type": {
  21527. "type": "string",
  21528. "enum": ["aisdk"]
  21529. },
  21530. "package": {
  21531. "type": "string"
  21532. },
  21533. "url": {
  21534. "type": "string"
  21535. }
  21536. },
  21537. "required": ["type", "package"],
  21538. "additionalProperties": false
  21539. }
  21540. ]
  21541. },
  21542. "options": {
  21543. "type": "object",
  21544. "properties": {
  21545. "headers": {
  21546. "type": "object",
  21547. "additionalProperties": {
  21548. "type": "string"
  21549. }
  21550. },
  21551. "body": {
  21552. "type": "object"
  21553. },
  21554. "aisdk": {
  21555. "type": "object",
  21556. "properties": {
  21557. "provider": {
  21558. "type": "object"
  21559. },
  21560. "request": {
  21561. "type": "object"
  21562. }
  21563. },
  21564. "required": ["provider", "request"],
  21565. "additionalProperties": false
  21566. }
  21567. },
  21568. "required": ["headers", "body", "aisdk"],
  21569. "additionalProperties": false
  21570. }
  21571. },
  21572. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21573. "additionalProperties": false
  21574. },
  21575. "EventTuiToastShow1": {
  21576. "type": "object",
  21577. "properties": {
  21578. "id": {
  21579. "type": "string"
  21580. },
  21581. "type": {
  21582. "type": "string",
  21583. "enum": ["tui.toast.show"]
  21584. },
  21585. "properties": {
  21586. "type": "object",
  21587. "properties": {
  21588. "title": {
  21589. "type": "string"
  21590. },
  21591. "message": {
  21592. "type": "string"
  21593. },
  21594. "variant": {
  21595. "type": "string",
  21596. "enum": ["info", "success", "warning", "error"]
  21597. },
  21598. "duration": {
  21599. "type": "integer",
  21600. "exclusiveMinimum": 0
  21601. }
  21602. },
  21603. "required": ["message", "variant"],
  21604. "additionalProperties": false
  21605. }
  21606. },
  21607. "required": ["id", "type", "properties"],
  21608. "additionalProperties": false
  21609. },
  21610. "ModelV2Info1": {
  21611. "type": "object",
  21612. "properties": {
  21613. "id": {
  21614. "type": "string"
  21615. },
  21616. "apiID": {
  21617. "type": "string"
  21618. },
  21619. "providerID": {
  21620. "type": "string"
  21621. },
  21622. "family": {
  21623. "type": "string"
  21624. },
  21625. "name": {
  21626. "type": "string"
  21627. },
  21628. "endpoint": {
  21629. "anyOf": [
  21630. {
  21631. "type": "object",
  21632. "properties": {
  21633. "type": {
  21634. "type": "string",
  21635. "enum": ["unknown"]
  21636. }
  21637. },
  21638. "required": ["type"],
  21639. "additionalProperties": false
  21640. },
  21641. {
  21642. "type": "object",
  21643. "properties": {
  21644. "type": {
  21645. "type": "string",
  21646. "enum": ["openai/responses"]
  21647. },
  21648. "url": {
  21649. "type": "string"
  21650. },
  21651. "websocket": {
  21652. "type": "boolean"
  21653. }
  21654. },
  21655. "required": ["type", "url"],
  21656. "additionalProperties": false
  21657. },
  21658. {
  21659. "type": "object",
  21660. "properties": {
  21661. "type": {
  21662. "type": "string",
  21663. "enum": ["openai/completions"]
  21664. },
  21665. "url": {
  21666. "type": "string"
  21667. },
  21668. "reasoning": {
  21669. "anyOf": [
  21670. {
  21671. "type": "object",
  21672. "properties": {
  21673. "type": {
  21674. "type": "string",
  21675. "enum": ["reasoning_content"]
  21676. }
  21677. },
  21678. "required": ["type"],
  21679. "additionalProperties": false
  21680. },
  21681. {
  21682. "type": "object",
  21683. "properties": {
  21684. "type": {
  21685. "type": "string",
  21686. "enum": ["reasoning_details"]
  21687. }
  21688. },
  21689. "required": ["type"],
  21690. "additionalProperties": false
  21691. }
  21692. ]
  21693. }
  21694. },
  21695. "required": ["type", "url"],
  21696. "additionalProperties": false
  21697. },
  21698. {
  21699. "type": "object",
  21700. "properties": {
  21701. "type": {
  21702. "type": "string",
  21703. "enum": ["anthropic/messages"]
  21704. },
  21705. "url": {
  21706. "type": "string"
  21707. }
  21708. },
  21709. "required": ["type", "url"],
  21710. "additionalProperties": false
  21711. },
  21712. {
  21713. "type": "object",
  21714. "properties": {
  21715. "type": {
  21716. "type": "string",
  21717. "enum": ["aisdk"]
  21718. },
  21719. "package": {
  21720. "type": "string"
  21721. },
  21722. "url": {
  21723. "type": "string"
  21724. }
  21725. },
  21726. "required": ["type", "package"],
  21727. "additionalProperties": false
  21728. }
  21729. ]
  21730. },
  21731. "capabilities": {
  21732. "type": "object",
  21733. "properties": {
  21734. "tools": {
  21735. "type": "boolean"
  21736. },
  21737. "input": {
  21738. "type": "array",
  21739. "items": {
  21740. "type": "string"
  21741. }
  21742. },
  21743. "output": {
  21744. "type": "array",
  21745. "items": {
  21746. "type": "string"
  21747. }
  21748. }
  21749. },
  21750. "required": ["tools", "input", "output"],
  21751. "additionalProperties": false
  21752. },
  21753. "options": {
  21754. "type": "object",
  21755. "properties": {
  21756. "headers": {
  21757. "type": "object",
  21758. "additionalProperties": {
  21759. "type": "string"
  21760. }
  21761. },
  21762. "body": {
  21763. "type": "object"
  21764. },
  21765. "aisdk": {
  21766. "type": "object",
  21767. "properties": {
  21768. "provider": {
  21769. "type": "object"
  21770. },
  21771. "request": {
  21772. "type": "object"
  21773. }
  21774. },
  21775. "required": ["provider", "request"],
  21776. "additionalProperties": false
  21777. },
  21778. "variant": {
  21779. "type": "string"
  21780. }
  21781. },
  21782. "required": ["headers", "body", "aisdk"],
  21783. "additionalProperties": false
  21784. },
  21785. "variants": {
  21786. "type": "array",
  21787. "items": {
  21788. "type": "object",
  21789. "properties": {
  21790. "id": {
  21791. "type": "string"
  21792. },
  21793. "headers": {
  21794. "type": "object",
  21795. "additionalProperties": {
  21796. "type": "string"
  21797. }
  21798. },
  21799. "body": {
  21800. "type": "object"
  21801. },
  21802. "aisdk": {
  21803. "type": "object",
  21804. "properties": {
  21805. "provider": {
  21806. "type": "object"
  21807. },
  21808. "request": {
  21809. "type": "object"
  21810. }
  21811. },
  21812. "required": ["provider", "request"],
  21813. "additionalProperties": false
  21814. }
  21815. },
  21816. "required": ["id", "headers", "body", "aisdk"],
  21817. "additionalProperties": false
  21818. }
  21819. },
  21820. "time": {
  21821. "type": "object",
  21822. "properties": {
  21823. "released": {
  21824. "anyOf": [
  21825. {
  21826. "type": "number"
  21827. },
  21828. {
  21829. "type": "string",
  21830. "enum": ["NaN"]
  21831. },
  21832. {
  21833. "type": "string",
  21834. "enum": ["Infinity"]
  21835. },
  21836. {
  21837. "type": "string",
  21838. "enum": ["-Infinity"]
  21839. }
  21840. ]
  21841. }
  21842. },
  21843. "required": ["released"],
  21844. "additionalProperties": false
  21845. },
  21846. "cost": {
  21847. "type": "array",
  21848. "items": {
  21849. "type": "object",
  21850. "properties": {
  21851. "tier": {
  21852. "type": "object",
  21853. "properties": {
  21854. "type": {
  21855. "type": "string",
  21856. "enum": ["context"]
  21857. },
  21858. "size": {
  21859. "type": "integer"
  21860. }
  21861. },
  21862. "required": ["type", "size"],
  21863. "additionalProperties": false
  21864. },
  21865. "input": {
  21866. "type": "number"
  21867. },
  21868. "output": {
  21869. "type": "number"
  21870. },
  21871. "cache": {
  21872. "type": "object",
  21873. "properties": {
  21874. "read": {
  21875. "type": "number"
  21876. },
  21877. "write": {
  21878. "type": "number"
  21879. }
  21880. },
  21881. "required": ["read", "write"],
  21882. "additionalProperties": false
  21883. }
  21884. },
  21885. "required": ["input", "output", "cache"],
  21886. "additionalProperties": false
  21887. }
  21888. },
  21889. "status": {
  21890. "type": "string",
  21891. "enum": ["alpha", "beta", "deprecated", "active"]
  21892. },
  21893. "enabled": {
  21894. "type": "boolean"
  21895. },
  21896. "limit": {
  21897. "type": "object",
  21898. "properties": {
  21899. "context": {
  21900. "type": "integer"
  21901. },
  21902. "input": {
  21903. "type": "integer"
  21904. },
  21905. "output": {
  21906. "type": "integer"
  21907. }
  21908. },
  21909. "required": ["context", "output"],
  21910. "additionalProperties": false
  21911. }
  21912. },
  21913. "required": [
  21914. "id",
  21915. "apiID",
  21916. "providerID",
  21917. "name",
  21918. "endpoint",
  21919. "capabilities",
  21920. "options",
  21921. "variants",
  21922. "time",
  21923. "cost",
  21924. "status",
  21925. "enabled",
  21926. "limit"
  21927. ],
  21928. "additionalProperties": false
  21929. },
  21930. "BadRequestError": {
  21931. "type": "object",
  21932. "required": ["name", "data"],
  21933. "properties": {
  21934. "name": {
  21935. "type": "string",
  21936. "enum": ["BadRequest"]
  21937. },
  21938. "data": {
  21939. "type": "object",
  21940. "required": ["message"],
  21941. "properties": {
  21942. "message": {
  21943. "type": "string"
  21944. },
  21945. "kind": {
  21946. "type": "string",
  21947. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  21948. }
  21949. }
  21950. }
  21951. }
  21952. }
  21953. }
  21954. },
  21955. "security": [],
  21956. "tags": [
  21957. {
  21958. "name": "control",
  21959. "description": "Control plane routes."
  21960. },
  21961. {
  21962. "name": "global",
  21963. "description": "Global server routes."
  21964. },
  21965. {
  21966. "name": "event",
  21967. "description": "Instance event stream route."
  21968. },
  21969. {
  21970. "name": "config",
  21971. "description": "Experimental HttpApi config routes."
  21972. },
  21973. {
  21974. "name": "experimental",
  21975. "description": "Experimental HttpApi read-only routes."
  21976. },
  21977. {
  21978. "name": "file",
  21979. "description": "Experimental HttpApi file routes."
  21980. },
  21981. {
  21982. "name": "instance",
  21983. "description": "Experimental HttpApi instance read routes."
  21984. },
  21985. {
  21986. "name": "mcp",
  21987. "description": "Experimental HttpApi MCP routes."
  21988. },
  21989. {
  21990. "name": "project",
  21991. "description": "Experimental HttpApi project routes."
  21992. },
  21993. {
  21994. "name": "pty",
  21995. "description": "Experimental HttpApi PTY routes."
  21996. },
  21997. {
  21998. "name": "question",
  21999. "description": "Question routes."
  22000. },
  22001. {
  22002. "name": "permission",
  22003. "description": "Experimental HttpApi permission routes."
  22004. },
  22005. {
  22006. "name": "provider",
  22007. "description": "Experimental HttpApi provider routes."
  22008. },
  22009. {
  22010. "name": "session",
  22011. "description": "Experimental HttpApi session routes."
  22012. },
  22013. {
  22014. "name": "sync",
  22015. "description": "Experimental HttpApi sync routes."
  22016. },
  22017. {
  22018. "name": "v2",
  22019. "description": "Experimental v2 routes."
  22020. },
  22021. {
  22022. "name": "v2 messages",
  22023. "description": "Experimental v2 message routes."
  22024. },
  22025. {
  22026. "name": "v2 models",
  22027. "description": "Experimental v2 model routes."
  22028. },
  22029. {
  22030. "name": "v2 providers",
  22031. "description": "Experimental v2 provider routes."
  22032. },
  22033. {
  22034. "name": "tui",
  22035. "description": "Experimental HttpApi TUI routes."
  22036. },
  22037. {
  22038. "name": "workspace",
  22039. "description": "Experimental HttpApi workspace routes."
  22040. },
  22041. {
  22042. "name": "pty",
  22043. "description": "PTY websocket route."
  22044. }
  22045. ]
  22046. }